CN109157839B - Frame rate regulation and control method, device, storage medium and terminal - Google Patents

Frame rate regulation and control method, device, storage medium and terminal Download PDF

Info

Publication number
CN109157839B
CN109157839B CN201811201767.5A CN201811201767A CN109157839B CN 109157839 B CN109157839 B CN 109157839B CN 201811201767 A CN201811201767 A CN 201811201767A CN 109157839 B CN109157839 B CN 109157839B
Authority
CN
China
Prior art keywords
frame rate
target application
standard deviation
frame
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811201767.5A
Other languages
Chinese (zh)
Other versions
CN109157839A (en
Inventor
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811201767.5A priority Critical patent/CN109157839B/en
Publication of CN109157839A publication Critical patent/CN109157839A/en
Application granted granted Critical
Publication of CN109157839B publication Critical patent/CN109157839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Abstract

The embodiment of the application discloses a frame rate regulation and control method, a frame rate regulation and control device, a storage medium and a terminal. The method comprises the steps of detecting that a frame rate regulation event is triggered; acquiring an average frame rate and a frame interval standard deviation of a target application in target sampling time; and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate. By adopting the technical scheme, the average frame rate and the frame interval standard deviation of the target application in the target sampling time can be calculated in advance, whether the system frame rate is adjusted to the average frame rate of the target application is judged based on the frame interval standard deviation, the adjustment of the system frame rate based on historical frame rate information is realized to provide a personalized frame rate adjusting and controlling scheme, the use habit of a user is effectively adapted, and the method and the device are easy to popularize to other intelligent terminals.

Description

Frame rate regulation and control method, device, storage medium and terminal
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a frame rate regulation and control method, a frame rate regulation and control device, a storage medium and a terminal.
Background
With the development of technology, the processing capability and the function of the intelligent terminal are greatly improved, and the intelligent terminal becomes a necessity for life, work and entertainment of people. In an intelligent terminal equipped with an operating system, the intelligent terminal presents various display screens at different times by continuously refreshing the display screens.
The display refreshing process in the intelligent terminals such as the mobile phone mainly comprises picture drawing operation, picture synthesis operation and display operation. Taking the application of games or videos as an example, based on a synchronous (Vsync) refresh mechanism, the system performs a drawing (Render) operation to draw respective images; after all the applications finish Render operation, the system executes composition operation to synthesize the images drawn by the applications into a display frame; then, the display frame is output to the screen for final display. However, the smart terminal in the related art has a drawback in frame rate control. For example, the frame rate is dynamically adjusted in the form of a white list, and for each application, the regulation and control strategy is fixed, so that the universality is not strong.
Disclosure of Invention
The embodiment of the application provides a frame rate regulation method, a frame rate regulation device, a storage medium and a terminal, which can optimize a frame rate regulation scheme in the related technology.
In a first aspect, an embodiment of the present application provides a frame rate control method, including:
detecting that a frame rate regulation event is triggered;
acquiring an average frame rate and a frame interval standard deviation of a target application in target sampling time;
and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate.
In a second aspect, an embodiment of the present application further provides a frame rate control device, where the frame rate control device includes:
the event detection module is used for detecting that a frame rate regulation and control event is triggered;
the average frame rate acquisition module is used for acquiring the average frame rate and the frame interval standard deviation of the target application in the target sampling time;
and the system frame rate adjusting module is used for adjusting the system frame rate to the average frame rate when the frame interval standard deviation meets a preset condition.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a frame rate adjustment method according to an embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and executable by the processor, where the processor executes the computer program to implement the frame rate adjustment and control method according to the embodiment of the present application.
The embodiment of the application provides a frame rate regulation and control scheme, wherein if a frame rate regulation and control event is triggered, the average frame rate and the frame interval standard deviation of a target application in target sampling time are obtained; and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate. By adopting the technical scheme, the average frame rate and the frame interval standard deviation of the target application in the target sampling time can be calculated in advance, whether the system frame rate is adjusted to the average frame rate of the target application is judged based on the frame interval standard deviation, the adjustment of the system frame rate based on historical frame rate information is realized to provide a personalized frame rate regulation and control scheme, the use habits of users are effectively adapted, and the method and the system are easy to popularize to other intelligent terminals.
Drawings
Fig. 1 is a flowchart of a frame rate control method according to an embodiment of the present disclosure;
FIG. 2a is a schematic diagram of a display process according to an embodiment of the present invention;
FIG. 2b is a diagram of a Vsync display refresh mechanism according to an embodiment of the invention
Fig. 3 is a flowchart of another frame rate adjustment and control method according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a frame rate control apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 6 is a block diagram of a structure of a smart phone according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a frame rate adjustment method according to an embodiment of the present disclosure, where the method may be performed by a frame rate adjustment device, where the device may be implemented by software and/or hardware, and may be generally integrated in a terminal. As shown in fig. 1, the method includes:
step 110, detecting that a frame rate adjustment event is triggered.
For example, the terminal in the embodiment of the present application may include a device provided with an operating system, such as a mobile phone, a tablet computer, a notebook computer, a handheld game console, and a smart appliance. The type of the operating system in the embodiment of the present application is not limited, and may include an Android (Android) operating system, a Windows (Windows) operating system, an apple (ios) operating system, and the like.
It should be noted that, when the target application is started or ended, the target application sends setting information to the background service of the operating system, and when the setting information is detected, a frame rate adjustment event is triggered. The target application may be an application currently started and run by the terminal. It will be appreciated that the target application may be any application installed on the terminal. For example, the target application may be a third-party game application installed in the terminal, and after the third-party game accesses the background service, the corresponding scene ID is issued when the game starts or ends. The scene ID is a unique identifier for indicating the start or end of a game, and may be a number or a character such as a combination of a letter and a number. The game application is opened and the game application is ended corresponding to different scene IDs, i.e., corresponding to different characters.
The background service may be a background Daemon preset in the terminal by a terminal manufacturer for optimizing performance/power consumption, and may be a Daemon program or the like. The Daemon () program is a server-side program that runs all the time, also called a Daemon process. The Daemon program is generally used as system service, and generally runs in a system background without a control terminal and interaction with a foreground.
Taking a game application as an example, when a scene ID issued when the game application starts is detected, a frame rate regulation event is triggered. If the scene ID corresponding to the application program can be obtained, the scene ID is compared with the ID standard characters corresponding to the application program. If the scene ID is an ID standard character which represents the start of the application under the application program, determining the scene ID issued when the game application is detected to start, and correspondingly triggering a frame rate regulation event to instruct the terminal to execute the system frame rate regulation related operation.
In this embodiment of the present application, the game information of the game at the preset office may be counted to form a sample space, which is used to calculate the average frame rate and the frame interval standard deviation, and then a frame rate adjustment event is triggered each time a scene ID issued when the game application starts is detected. The game is returned to the game hall from the end of loading to the end of game, which may be called a game, and the game information of the counted game in the preset game may form a sample space. It can be understood that, for the game application corresponding to the sample space, even if the scene ID issued when the game application is detected to start is detected, the frame rate regulation event is not triggered, but frame rate related parameters of the game are calculated, such as a reference average frame rate and a frame interval reference standard deviation.
It should be noted that, for different third party games, the definition of one game may be different and associated with the definition of the third party game. For example, for a game such as a game in which a player is glory or a battlefield is stimulated, the start and stop of a game may be from the end of loading to the end of the game, and the game returns to the game hall.
It should be noted that there are many ways to trigger the frame rate adjustment event, and the embodiment of the present application is not limited in particular. For example, when the scene identifier is a preset start identifier, the background server notifies the Surface flunger to start calculation of the average frame rate and the standard deviation of the frame interval. The frame rate adjustment event may be triggered by a notification sent by the background server to the Surface flag. For another example, when the number of game plays exceeds the preset threshold, if the scene ID issued when the game is accessed to the background service is detected again, a frame rate adjustment event is triggered, and the like.
And step 120, obtaining the average frame rate and the frame interval standard deviation of the target application in the target sampling time.
The target sampling time may be a preset time period, or a set of time intervals corresponding to the starting and ending of the target application for a preset number of times. For example, the target sampling time is 50 hours. For another example, the target sampling time is a time interval from start to end of each target application, and a set of the time intervals of a preset number of times is used as the target sampling time, or a sum of the time intervals is used as the target sampling time.
Optionally, the target sampling time may also be a time period between an opening time of a certain function in the target application and a closing time of the function, or may also be a time period of any period of time in an opening state of the target application, and of course, the target running time period may also be a time period between a starting time and an ending time when the target application runs a certain script or runs a certain copy, which is not specifically limited in this embodiment of the present invention.
Taking a game application as an example, the average frame rate may be determined according to the number of frames and the time interval in the time interval corresponding to the target application from each turn-on to turn-off within the target sampling time. The number of frames refers to the number of generated frames, that is, the number of frames processed and displayed in a period of time, and the frames may refer to still images. For example, the number of frames in the time interval corresponding to each game within the target sampling time is counted, and the reference average frame rate of each game is determined according to the ratio of the number of frames to the time interval. And determining the average frame rate according to the game number corresponding to the target sampling time and the reference average frame rate and the game number. And calculating the standard deviation of the frame interval based on the standard deviation formula according to the average frame rate. For example, the average frame rate is 50, the frame rate of each frame in the target sampling time interval (the derivative of the time for which each frame is drawn and synthesized to be displayed can be taken as the frame rate of the frame) is 50, 52, 50, 53, 50, 52, 49, 50, 49 and 45, respectively, and the calculation formula of the frame interval standard deviation is as follows:
Figure BDA0001830177010000051
illustratively, outside the target sampling time, the average frame rate and the standard deviation of the frame interval of the target application within the target sampling time are obtained each time the target application is started. Taking the game as an example, the target sampling time may be the time of 10 games, i.e. the sample data in the sample space is 10 sets. When detecting the scene ID issued when the game application is started and the scene ID issued when the game application is ended, considering that a game is detected, acquiring the frame number in the time interval of the game, taking the frame number and the time interval corresponding to the game as samples in the sample space, and calculating the reference average frame rate and the frame interval reference standard deviation according to the frame number and the time interval. And calculating the average frame rate and the frame interval standard deviation of 10 games according to the reference average frame rate and the frame interval reference standard deviation of each game, and storing. If the scene ID issued when the game application is started is detected again, the game information (including the average frame rate and the frame interval standard deviation) is obtained from the storage position of the average frame rate and the frame interval standard deviation.
Step 130, when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate.
It should be noted that, if the frame interval standard deviation is an average value of the frame interval reference standard deviations in the time intervals of starting and ending of the target application program, when the frame interval standard deviation exceeds a preset threshold, it is determined that the frame interval standard deviation meets a preset condition. If the frame interval standard deviation is a set of frame interval reference standard deviations in the time interval of starting and ending of each target application program, when at least one frame interval standard deviation exceeds a preset threshold, determining that the frame interval standard deviation meets a preset condition, and specifying the number of frame interval standard deviations exceeding the preset threshold according to actual needs to serve as a threshold for judging whether the preset condition is met.
The system frame rate may also be referred to as a frame rate of the Surface flanger (layer composition module).
For convenience of understanding, the following uses the Android system as an example, and a process from generation to display of a display screen in the Android system is briefly described. Fig. 2a is a schematic diagram of a display process according to an embodiment of the present invention.
Firstly, in an Application (Application) layer, each Application program (hereinafter, referred to as Application or APP) comprises 1 or a plurality of layers, each Application APP1, APP2, 8230, the APPN independently executes layer drawing (Render) operation (i.e. drawing images on the layers) according to the Application design condition (generally determined by the corresponding installation package APK), and after the drawing operation is finished, each Application sends all the drawn layers to a layer synthesis module (Surface maker) for executing the layer synthesis operation.
Then, at an application Framework (Framework) layer, all layers (including visible layers and invisible layers) form a layer list, which is defined as ListAll. And the layer composition module selects a visible layer from the ListAll to form a visible layer list, and the visible layer list is defined as a DisplayList. Then, the layer composition module finds out a free FB from three Frame buffers (BF or Buffer for short) that can be recycled in the system, and superimposes layers included in the DisplayList together through composition (composite) operation on the free FB according to application configuration information, such as which layer should be set at the bottom, which layer should be set at the top, which area is a visible area, and which area is a transparent area, to obtain a final picture to be displayed.
Finally, at the Kernel layer, the to-be-displayed picture can be transmitted to the Display hardware (including the Display controller and the Display screen, so that the to-be-displayed picture is finally displayed on the Display screen.
In addition, the Android system introduces a synchronous (Vsync) refresh mechanism in the display refresh process. Fig. 2b is a schematic diagram of a Vsync display refresh mechanism according to an embodiment of the present invention. Specifically, the Vsync refresh mechanism is a unified management mechanism that inserts a "heartbeat", that is, a system synchronization (Vsync) signal, in the whole display process, and the signal is sent to the CPU by the display controller to generate a Vsync interrupt, so as to control that each layer drawing operation and layer composition operation need to be completed according to the heartbeat, thereby incorporating key steps in the whole display process into the Vsync. The frequency of the Vsync signal is currently typically 60Hz. As shown in fig. 2b, assuming that the period of the Vsync signal is T, regardless of the transmission delay of the signal, after the first Vsync signal Vsync1 reaches the CPU, the CPU forwards the first Vsync signal Vsync1 to each application, and each application starts to perform a drawing operation in response to a user's touch slide or the like on the display screen; and obtaining a plurality of layers drawn by each application after each application finishes the drawing operation. After the second Vsync signal Vsync2 reaches the CPU, the CPU forwards the second Vsync signal Vsync2 to the layer composition module, and the layer composition module starts to perform layer composition operation to combine a plurality of layers drawn by each application, thereby generating a picture to be displayed. After the third Vsync signal Vsync3 reaches the CPU, the system starts to perform display refresh and finally displays the picture to be displayed on the display screen. As can be seen from the above description, the frequencies of the Vsync signals received by the application program, the layer composition module, and the display screen are consistent and are fixed values set in advance.
Illustratively, if the frame interval standard deviation meets the preset condition, the Surface flanger is notified by the background service to adjust the Vsync signal of the system, so as to fix the system frame rate to the average frame rate.
According to the technical scheme of the embodiment of the application, if the frame rate regulation event is triggered, the average frame rate and the frame interval standard deviation of the target application in the target sampling time are obtained; and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate. By adopting the technical scheme, the average frame rate and the frame interval standard deviation of the target application in the target sampling time can be calculated in advance, whether the system frame rate is adjusted to the average frame rate of the target application is judged based on the frame interval standard deviation, the adjustment of the system frame rate based on historical frame rate information is realized to provide a personalized frame rate regulation and control scheme, the use habits of users are effectively adapted, and the method and the system are easy to popularize to other intelligent terminals.
In some examples, detecting that the frame rate adjustment event is triggered may be performed by detecting a scene identifier corresponding to the target application; and judging whether the scene identifier is a preset opening identifier, and if so, triggering a frame rate regulation and control event. By adopting the technical scheme, the frame rate regulation and control event can be triggered when the target application is started, and the situation that the frame rate is unstable due to the fact that the system frame rate is regulated in the game running process is avoided. For example, the game application comprises high, middle and low frame rates, and if the user selects the high frame rate, the system frame rate performs drawing and displaying at the frame rate. After the system is operated for a period of time, the frame rate of the system is adjusted to the average frame rate, which may cause unstable frame rate when switching occurs, thereby affecting the smoothness of the game.
In some examples, before triggering the frame rate adjustment event, the method further includes: recording the opening times of the target application; when the times are less than the preset sampling times, determining the reference average frame rate and the frame interval reference standard deviation in the corresponding time interval from the starting to the ending of the target application each time; and when the times are equal to the preset sampling times, determining the average frame rate according to the reference average frame rate, and determining the frame interval standard deviation according to the frame interval reference standard deviation. By adopting the technical scheme, the operation data of the target application in the target time can be examined in advance, the reference frame rate and the frame interval standard deviation of each time of the operation of the target application are calculated based on the operation data, and the average frame rate and the frame interval standard deviation in the target time interval are calculated based on the reference frame rate and the frame interval standard deviation. Whether the system frame rate of the target application in the subsequent operation is regulated or not is determined based on the frame interval standard deviation in the target time interval, so that the dynamic regulation of the frame rate can be more suitable for the use habit of a user.
In some examples, after adjusting the system frame rate to the average frame rate, the method further includes:
if the scene identifier corresponding to the target application is detected to be a preset end identifier, the system frame rate is adjusted to the default frame rate by adjusting the frame synchronization information, so that the average frame rate corresponding to the target application is used as the system frame rate in the running process of the target application. By adopting the technical scheme, the system frame rate is adjusted to the average frame rate corresponding to the target application during the operation of the target application, and the system frame rate is restored to the default system frame rate of the terminal after the operation is finished, so that the condition that the display quality is influenced due to the unmatched frame rates when other applications are operated can be avoided, and the display is smoother.
Fig. 3 is a flowchart of another frame rate adjustment method according to an embodiment of the present application, and as shown in fig. 3, the method includes:
step 301, detecting a scene identifier corresponding to the target application.
It should be noted that the scene identifier, i.e., the scene ID, is a unique identifier for indicating the start or end of the game. The target application may be a default application of the system, such as some game applications (which may be determined by analyzing historical usage data), or may be an application that the user selects on his/her own as needed. For example, when the user installs the third-party application, the application program is marked as the target application, and the target application can be stored through the white list.
Illustratively, when it is detected that the target application runs, a background server (e.g., a daemon process) obtains a scene identifier issued by the target application.
Step 302, when the scene identifier is a preset opening identifier, acquiring the number of times that the target application is opened.
It should be noted that, when it is detected that the scene identifier of the target application is the corresponding start identifier each time, 1 is added to the start times of the target application to obtain the latest start times of the target application, and the latest start times are used as the start times of the target application.
Step 303, determining whether the number of times is smaller than a preset sampling number, if so, performing step 304, otherwise, performing step 305.
It should be noted that the preset sampling times are defaulted by the system, or may be set by the user according to actual needs.
Step 304, determining a reference average frame rate and a reference standard deviation of frame intervals in a time interval corresponding to the time interval from the starting to the ending of the target application each time.
Illustratively, when a first scene ID issued when the game application starts and a second scene ID issued when the game application ends are detected later, it is determined that one time of game application starting to ending is detected, and a time period from the detection of the first scene ID to the detection of the second scene ID is recorded as a time interval corresponding to the time of game application starting to ending. And acquiring the number of frames in a time interval corresponding to the time interval from the starting to the ending of the game application each time. The sample space can be formed according to the number of frames and the time interval in the time interval corresponding to the starting to the ending each time. And determining the reference average frame rate and the frame interval reference standard deviation in the corresponding time interval from the start to the end of each target application according to the frame number and the corresponding time interval.
Step 305, determining whether the number of times is equal to a preset sampling number, if so, executing step 306, otherwise, executing step 307.
Step 306, determining the average frame rate according to the reference average frame rate, and determining the frame interval standard deviation according to the frame interval reference standard deviation.
For example, if the game application is installed for the first time, after the game application accesses the background server, 10 game information of the game application running is recorded, and 10 reference average frame rates and 10 reference standard deviations of frame intervals are obtained. The average frame rate is calculated as the average of the 10 reference average frame rates. Further, the average of the 10 frame interval reference standard deviations is calculated as the frame interval standard deviation.
And 307, determining that the times are greater than the preset sampling times, and triggering a frame rate regulation event.
Step 308, determining whether the frame interval standard deviation exceeds a preset threshold, if yes, performing step 309, otherwise, performing step 311.
Step 309, adjusting the system frame rate to the average frame rate by adjusting the frame synchronization information.
The frame synchronization information includes a Vsync signal, and accordingly, the adjustment of the frame synchronization information may be an adjustment of the Vsync signal, thereby realizing adjustment of parameters related to frame image display, such as a drawing frame rate, a composite frame rate, and a refresh rate.
And when the frame interval standard deviation exceeds a preset threshold value, the background service computer informs a VSYNC model of a Surface Flinger switching system so that the Surface Flinger receives Vsync signals with different frequencies.
Step 310, if it is detected that the scene identifier corresponding to the target application is a preset end identifier, adjusting the system frame rate to a default frame rate by adjusting the frame synchronization information.
It should be noted that the default frame rate may be understood as a frame rate value before the system frame rate is switched to the average frame rate.
In the embodiment of the present application, if the system frame rate is fixed to the average frame rate of the game application, after the game application exits, the system frame rate is restored to the default frame rate of the terminal, that is, the frame rate before the system frame rate is adjusted, or the frame rate before the game application is considered to be running.
And step 311, keeping the system frame rate unchanged.
It should be noted that, maintaining the system frame rate may be maintaining the system frame rate at the default frame rate.
According to the technical scheme of the embodiment, the reference average frame rate and the frame interval reference standard deviation in each game application operation time are determined based on the frame number and time in each game application operation time interval in the sample space, and then the average frame rate and the frame interval standard deviation of the target application in the sampling time are determined. Whether a fixed system frame rate is needed or not is judged according to a comparison result of the frame interval standard deviation and a preset threshold, if yes, the Surface flag switching system frame rate is notified through background service, system-level frame rate regulation is achieved, the use habit of a user can be effectively adapted, compared with a dynamic frame rate regulation scheme based on a white name list in the related technology, the method and the device have higher intelligence and are easy to popularize to other intelligent terminals.
Fig. 4 is a block diagram of a frame rate control apparatus provided in an embodiment of the present application, where the apparatus may be implemented by software and/or hardware, and is generally integrated in a terminal, and the frame rate control apparatus may dynamically control a system frame rate when a system runs by executing a frame rate control method. As shown in fig. 4, the apparatus includes:
an event detection module 410, configured to detect that a frame rate adjustment event is triggered;
an average frame rate obtaining module 420, configured to obtain an average frame rate and a frame interval standard deviation of the target application within the target sampling time;
a system frame rate adjusting module 430, configured to adjust the system frame rate to the average frame rate when the frame interval standard deviation meets a preset condition.
The embodiment of the application provides a frame rate regulation and control device, wherein if a frame rate regulation and control event is triggered, an average frame rate and a frame interval standard deviation of a target application in a target sampling time are obtained; and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate. By adopting the technical scheme, the average frame rate and the frame interval standard deviation of the target application in the target sampling time can be pre-calculated to form a sample space, whether the system frame rate is adjusted to the average frame rate of the target application is judged based on the frame interval standard deviation in the sample space, the adjustment of the system frame rate based on historical frame rate information is realized to provide a personalized frame rate adjusting and controlling scheme, the use habit of a user is effectively adapted, and the method and the system are easy to popularize to other intelligent terminals.
Optionally, the event detecting module 410 is specifically configured to:
detecting a scene identifier corresponding to a target application;
and triggering a frame rate regulation and control event when the scene identifier is a preset opening identifier.
Optionally, the target sampling time includes a time interval corresponding to the time interval from the start to the end of the target application.
Optionally, the method further includes:
the frequency recording module is used for recording the frequency of starting the target application before triggering a frame rate regulation event;
the reference frame rate calculation module is used for determining a reference average frame rate and a frame interval reference standard deviation in a time interval corresponding to the time interval from the starting to the ending of each target application when the times are less than the preset sampling times;
and the frame rate calculation module is used for determining the average frame rate according to the reference average frame rate and determining the frame interval standard deviation according to the frame interval reference standard deviation when the times are equal to the preset sampling times.
Optionally, the frame rate calculating module is specifically configured to:
acquiring the frame number in a time interval corresponding to the time interval from the starting to the ending of the target application each time;
and determining a reference average frame rate and a frame interval reference standard deviation in a corresponding time interval from the start to the end of the target application each time according to the frame number and the time interval.
Optionally, the system frame rate adjusting module 430 is specifically configured to:
and if the frame interval standard deviation in the target sampling time exceeds a preset threshold value, adjusting the system frame rate to the average frame rate in a mode of adjusting frame synchronization information.
Optionally, the method further includes:
and the frame rate recovery module is used for adjusting the system frame rate to the default frame rate in a frame synchronization information adjusting mode if the scene identifier corresponding to the target application is detected to be a preset end identifier after the system frame rate is adjusted to the average frame rate.
Embodiments of the present application further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a frame rate control method, including:
detecting that a frame rate regulation event is triggered;
acquiring the average frame rate and the frame interval standard deviation of the target application in the target sampling time;
and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected via a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, in the storage medium including computer-executable instructions provided in the embodiments of the present application, the computer-executable instructions are not limited to the frame rate adjustment and control operation described above, and may also perform related operations in the frame rate adjustment and control method provided in any embodiment of the present application.
The embodiment of the present application provides a terminal, where an operating system is provided in the terminal, and the terminal may integrate the frame rate control device provided in the embodiment of the present application. The terminal can be a smart phone, a PAD (PAD), a handheld game console, a smart television and the like. Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 5, the terminal includes a memory 510 and a processor 520. The memory 510 is configured to store an average frame rate and a frame interval standard deviation corresponding to a computer program and a target application; the processor 520 reads and executes the computer programs stored in the memory 510. The processor 520, when executing the computer program, realizes the steps of: detecting that a frame rate regulation event is triggered; acquiring an average frame rate and a frame interval standard deviation of a target application in target sampling time; and when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate.
The memory and the processor listed in the above examples are part of the components of the terminal, and the terminal may further include other components. Taking a smart phone as an example, a possible structure of the terminal is described. Fig. 6 is a block diagram of a structure of a smart phone according to an embodiment of the present application. As shown in fig. 6, the smart phone may include: memory 601, a Central Processing Unit (CPU) 602 (also known as a processor, hereinafter CPU), a peripheral interface 603, a Radio Frequency (RF) circuit 605, an audio circuit 606, a speaker 611, a touch screen 612, a power management chip 608, an input/output (I/O) subsystem 609, other input/control devices 610, and an external port 604, which communicate via one or more communication buses or signal lines 607.
It should be understood that the illustrated smartphone 600 is merely one example of a terminal, and that the smartphone 600 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The smart phone integrated with the frame rate control device according to this embodiment will be described in detail below.
A memory 601, the memory 601 being accessible by the CPU602, the peripheral interface 603, and the like, the memory 601 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices. The memory 601 stores a computer program, and may further store a preset file, a preset white list, and the like.
A peripherals interface 603, said peripherals interface 603 allowing to connect input and output peripherals of the device to the CPU602 and the memory 601.
An I/O subsystem 609, the I/O subsystem 609 may connect input and output peripherals on the device, such as a touch screen 612 and other input/control devices 610, to the peripheral interface 603. The I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610. Where one or more input controllers 6092 receive electrical signals from or transmit electrical signals to other input/control devices 610, the other input/control devices 610 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 6092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 612, which touch screen 612 is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or transmits electrical signals to the touch screen 612. The touch screen 612 detects a contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 612, that is, to implement a human-computer interaction, where the user interface object displayed on the touch screen 612 may be an icon for running a game, an icon for networking to a corresponding network, or the like. It is worth mentioning that the device may also include a light mouse, which is a touch sensitive surface that does not display visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 605 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 605 converts electrical signals to or from electromagnetic signals and communicates with a communication network and other devices. RF circuitry 605 may include known circuitry for performing these functions, including but not limited to an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603, convert the audio data into an electric signal, and transmit the electric signal to the speaker 611.
The speaker 611 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 605 into sound and play the sound to the user.
The power management chip 608 is used for supplying power and managing power to the hardware connected to the CPU602, the I/O subsystem, and the peripheral interface.
The terminal provided by the embodiment of the application can calculate the average frame rate and the frame interval standard deviation of the target application in the target sampling time in advance, judge whether the system frame rate is adjusted to the average frame rate of the target application based on the frame interval standard deviation, adjust the system frame rate based on the historical frame rate information to provide a personalized frame rate regulation and control scheme, effectively adapt to the use habits of users, and is easy to popularize to other intelligent terminals.
The frame rate control device, the storage medium and the terminal provided in the above embodiments may execute the frame rate control method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For details of the frame rate control method provided in any embodiment of the present application, reference may be made to the technical details not described in detail in the above embodiments.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. A frame rate control method, comprising:
detecting that a frame rate regulation event is triggered;
acquiring an average frame rate and a frame interval standard deviation of a target application in target sampling time, wherein the target application is an application program which is started and operated at present by a terminal;
when the target application program is started each time, acquiring the average frame rate and the frame interval standard deviation of the target application in the target sampling time, when detecting a scene identification issued when the target application is started and a scene identification issued when the target application is ended, acquiring the number of frames in the sampling time interval of the target application, taking the number of frames and the time interval corresponding to the sampling time interval as samples in a sample space, calculating the reference average frame rate and the frame interval reference standard deviation according to the number of frames and the time interval, calculating the average frame rate and the frame interval standard deviation of preset sampling times according to the reference average frame rate and the frame interval reference standard deviation, storing the average frame rate and the frame interval standard deviation, and if detecting the scene identification issued when the application is started again, acquiring the sampling information by the storage positions of the average frame rate and the frame interval standard deviation;
when the scene identification of the target application is detected to be a corresponding opening identification each time, adding 1 to the opening times of the target application to obtain the latest opening times of the target application, taking the latest opening times as the opening times of the target application, and triggering a frame rate regulation and control event if the times are greater than the preset sampling times;
when the frame interval standard deviation meets a preset condition, adjusting the system frame rate to the average frame rate;
the target sampling time comprises a time interval corresponding to the time interval from the start to the end of the target application.
2. The method of claim 1, wherein detecting that a frame rate adjustment event is triggered comprises:
detecting a scene identifier corresponding to a target application;
and triggering a frame rate regulation and control event when the scene identifier is a preset opening identifier.
3. The method of claim 1, further comprising, prior to triggering a frame rate adjustment event:
recording the opening times of the target application;
when the times are less than the preset sampling times, determining a reference average frame rate and a frame interval reference standard deviation in a time interval corresponding to the time interval from the starting to the ending of the target application each time;
and when the times are equal to the preset sampling times, determining the average frame rate according to the reference average frame rate, and determining the frame interval standard deviation according to the frame interval reference standard deviation.
4. The method of claim 3, wherein determining the reference average frame rate and the reference standard deviation for frame intervals in the time interval corresponding to each time the target application is started to ended comprises:
acquiring the frame number in a time interval corresponding to the time interval from the starting to the ending of the target application each time;
and determining a reference average frame rate and a frame interval reference standard deviation in a corresponding time interval from the start to the end of the target application each time according to the frame number and the time interval.
5. The method of claim 3, wherein adjusting the system frame rate to the average frame rate when the frame interval standard deviation satisfies a preset condition comprises:
and if the frame interval standard deviation in the target sampling time exceeds a preset threshold value, adjusting the system frame rate to the average frame rate in a mode of adjusting frame synchronization information.
6. The method of any of claims 1-5, further comprising, after adjusting the system frame rate to the average frame rate:
and if the scene identifier corresponding to the target application is detected to be a preset ending identifier, adjusting the system frame rate to a default frame rate in a mode of adjusting frame synchronization information.
7. A frame rate control apparatus, comprising:
the event detection module is used for detecting that a frame rate regulation and control event is triggered;
the average frame rate acquisition module is used for acquiring the average frame rate and the frame interval standard deviation of a target application in target sampling time, wherein the target application is an application program which is started and operated by a terminal at present;
a system frame rate adjusting module, configured to adjust the system frame rate to the average frame rate when the frame interval standard deviation meets a preset condition;
when the target application program is started each time, acquiring the average frame rate and the frame interval standard deviation of the target application in the target sampling time, when detecting a scene identification issued when the target application is started and a scene identification issued when the target application is ended, acquiring the number of frames in the sampling time interval of the target application, taking the number of frames and the time interval corresponding to the sampling time interval as samples in a sample space, calculating the reference average frame rate and the frame interval reference standard deviation according to the number of frames and the time interval, calculating the average frame rate and the frame interval standard deviation of preset sampling times according to the reference average frame rate and the frame interval reference standard deviation, storing the average frame rate and the frame interval standard deviation, and if detecting the scene identification issued when the application is started again, acquiring the sampling information by the storage positions of the average frame rate and the frame interval standard deviation;
when the scene identification of the target application is detected to be a corresponding opening identification each time, adding 1 to the opening times of the target application to obtain the latest opening times of the target application, taking the latest opening times as the opening times of the target application, and triggering a frame rate regulation and control event if the times are greater than the preset sampling times;
the target sampling time comprises a time interval corresponding to the time interval from the start to the end of the target application.
8. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the frame rate control method according to any one of claims 1-6.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the frame rate control method according to any one of claims 1 to 6 when executing the computer program.
CN201811201767.5A 2018-10-16 2018-10-16 Frame rate regulation and control method, device, storage medium and terminal Active CN109157839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811201767.5A CN109157839B (en) 2018-10-16 2018-10-16 Frame rate regulation and control method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811201767.5A CN109157839B (en) 2018-10-16 2018-10-16 Frame rate regulation and control method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN109157839A CN109157839A (en) 2019-01-08
CN109157839B true CN109157839B (en) 2022-10-11

Family

ID=64878216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811201767.5A Active CN109157839B (en) 2018-10-16 2018-10-16 Frame rate regulation and control method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN109157839B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131423A (en) * 2019-06-25 2020-12-25 杭州海康威视数字技术股份有限公司 Picture acquisition method, device and system
CN110366035B (en) * 2019-07-19 2021-08-24 广州酷狗计算机科技有限公司 Frame rate control method, apparatus, computer device and computer-readable storage medium
CN110647366B (en) * 2019-09-19 2023-08-22 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for processing blocking
CN110659136B (en) * 2019-09-19 2022-07-15 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for limiting frame rate
CN110860086B (en) * 2019-11-08 2023-08-15 武汉微派网络科技有限公司 Data processing method, readable storage medium, and electronic device
CN111084985B (en) * 2019-12-23 2023-05-26 上海米哈游天命科技有限公司 Parameter adjusting method and device of input equipment, terminal equipment and medium
CN112637680B (en) * 2020-12-18 2023-03-24 努比亚技术有限公司 Display frame rate processing control method, device and computer readable storage medium
CN114632329B (en) * 2022-05-16 2022-10-25 荣耀终端有限公司 Terminal equipment performance adjusting method and related device
WO2024040613A1 (en) * 2022-08-26 2024-02-29 京东方科技集团股份有限公司 Image processing method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080022276A (en) * 2006-09-06 2008-03-11 엘지전자 주식회사 Method and apparatus for controlling screen of (an) image display device
CN105100675A (en) * 2015-09-11 2015-11-25 Tcl集团股份有限公司 Terminal video communication quality adjusting method and system
CN107800989A (en) * 2017-10-16 2018-03-13 深圳市天视通电子科技有限公司 Image display method, system and Network Personal Video Recorder based on the detection of dynamic frame per second
CN108427630A (en) * 2018-03-15 2018-08-21 腾讯科技(深圳)有限公司 Performance information acquisition methods, device, terminal and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080022276A (en) * 2006-09-06 2008-03-11 엘지전자 주식회사 Method and apparatus for controlling screen of (an) image display device
CN105100675A (en) * 2015-09-11 2015-11-25 Tcl集团股份有限公司 Terminal video communication quality adjusting method and system
CN107800989A (en) * 2017-10-16 2018-03-13 深圳市天视通电子科技有限公司 Image display method, system and Network Personal Video Recorder based on the detection of dynamic frame per second
CN108427630A (en) * 2018-03-15 2018-08-21 腾讯科技(深圳)有限公司 Performance information acquisition methods, device, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN109157839A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN109157839B (en) Frame rate regulation and control method, device, storage medium and terminal
CN106933328B (en) Method and device for controlling frame rate of mobile terminal and mobile terminal
CN106919402B (en) Mobile terminal control method and device and mobile terminal
CN106919401B (en) Method and device for dynamically adjusting resolution and mobile terminal
CN106941563B (en) control method and device for refresh rate of mobile terminal and mobile terminal
CN106933587B (en) Layer drawing control method and device and mobile terminal
US10475413B2 (en) Method and apparatus for adjusting backlight brightness of screen, and mobile terminal
CN107748686B (en) Application program starting optimization method and device, storage medium and intelligent terminal
CN106933327B (en) Method and device for controlling frame rate of mobile terminal and mobile terminal
US10863213B2 (en) Method and device for controlling frame rate of electronic device, storage medium, and electronic device
EP3584676B1 (en) Method, device, medium, and electronic apparatus for dynamically adjusting power saving level of terminal
CN106951054B (en) Application control method and device and mobile terminal
US10504466B2 (en) Method, device and non-transitory computer-readable medium for control of refresh frequency of display unit
CN108646906B (en) Frame rate adjusting method and device, storage medium and intelligent terminal
US20200008142A1 (en) Method for Controlling Terminal, and Terminal
US20190034073A1 (en) Control method based on screen-off gestures, and storage medium and mobile terminal thereof
CN108521607B (en) Method and device for processing advertisements in video, storage medium and intelligent terminal
CN109460364B (en) Application program detection method and device, storage medium and mobile terminal
CN106896899B (en) Control method and device for drawing image of mobile terminal and mobile terminal
CN106658691B (en) Display control method and device and mobile terminal
CN106817753B (en) Method and device for saving electricity by switching background gray scales and mobile terminal
CN108648259B (en) Image drawing method and device, storage medium and intelligent terminal
CN107402712B (en) Touch operation response method and device, storage medium and terminal
CN107422916B (en) Touch operation response method and device, storage medium and terminal
CN106776259B (en) Mobile terminal frame rate detection method and device and mobile terminal

Legal Events

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