CN108693948B - Frame rate adjusting method and device, terminal equipment and storage medium - Google Patents
Frame rate adjusting method and device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN108693948B CN108693948B CN201810258437.3A CN201810258437A CN108693948B CN 108693948 B CN108693948 B CN 108693948B CN 201810258437 A CN201810258437 A CN 201810258437A CN 108693948 B CN108693948 B CN 108693948B
- Authority
- CN
- China
- Prior art keywords
- image
- frame image
- current frame
- variation
- frame rate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
- G06F1/3265—Power saving in display device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application discloses a frame rate adjusting method, a frame rate adjusting device, terminal equipment and a storage medium, wherein the method comprises the steps of obtaining a current frame image and a historical frame image pushed by an application program; detecting whether a focus touch event is triggered or not, and if not, determining the image variation of the current frame image and the historical frame image; and if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an update frame rate, wherein the update frame rate is smaller than the original frame rate of the current frame image, so that the power consumption of the terminal equipment is obviously reduced, and the operation efficiency and the function use of the terminal equipment are not influenced.
Description
Technical Field
Embodiments of the present disclosure relate to computer technologies, and in particular, to a frame rate adjustment method, an apparatus, a terminal device, and a storage medium.
Background
With the increase of the popularity of the terminal devices, more and more users use the terminal devices to execute various functions to meet their own needs, such as playing games and entertainments by relying on strong hardware processing capability and unobstructed network environment. With the continuous and powerful functions of the terminal device, the power consumption of the terminal device is too fast when the user uses the functions, so that the user needs to frequently charge the terminal device.
In the prior art, the terminal device can reduce the power consumption by reducing the screen brightness and the data processing speed, but this way sacrifices part of the performance of the terminal device, so that the operating efficiency of the terminal device is reduced, and there are defects and improvements are needed.
Disclosure of Invention
The invention provides a frame rate adjusting method, a frame rate adjusting device, terminal equipment and a storage medium, which can obviously reduce the power consumption of the terminal equipment and simultaneously do not influence the operation efficiency and the function use of the terminal equipment.
In a first aspect, an embodiment of the present application provides a frame rate adjustment method, including:
acquiring a current frame image and a historical frame image pushed by an application program;
detecting whether a focus touch event is triggered or not, and if not, determining the image variation of the current frame image and the historical frame image;
and if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an updating frame rate, wherein the updating frame rate is less than the original frame rate of the current frame image.
In a second aspect, an embodiment of the present application further provides a frame rate adjusting apparatus, including:
the image acquisition module is used for acquiring a current frame image and a historical frame image pushed by an application program;
the variable quantity determining module is used for detecting whether a focus touch event is triggered or not, and if not, determining the image variable quantities of the current frame image and the historical frame image;
and the frame rate adjusting module is used for discarding the current frame image or displaying the current frame image according to an update frame rate if the image variation meets a preset condition, wherein the update frame rate is smaller than the original frame rate of the current frame image.
In a third aspect, an embodiment of the present application further provides a terminal device, including: the frame rate adjustment method comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the frame rate adjustment method according to the embodiment of the application.
In a fourth aspect, an embodiment of the present application further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are used to execute the frame rate adjustment method according to the embodiment of the present application when executed by a terminal device processor.
According to the scheme, a current frame image and a historical frame image pushed by an application program are obtained, whether a focus touch event is triggered is detected, if not, the image variation of the current frame image and the image variation of the historical frame image are determined, if the image variation meets a preset condition, the current frame image is discarded or the current frame image is displayed according to an updating frame rate, and the updating frame rate is smaller than an original frame rate of the current frame image, so that the power consumption of terminal equipment is remarkably reduced, and meanwhile, the operation efficiency and the function use of the terminal equipment are not influenced.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a frame rate adjustment method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of setting an image variation threshold according to an embodiment of the present application;
fig. 3 is a flowchart of another frame rate adjustment method according to an embodiment of the present invention;
fig. 4 is a flowchart of another frame rate adjustment method provided in an embodiment of the present invention;
fig. 5 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application;
fig. 6 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application;
fig. 7 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application;
fig. 8 is a block diagram illustrating a frame rate adjustment apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a frame rate adjustment method provided in an embodiment of the present application, which is applicable to refresh and adjust a frame rate of an image displayed by an application program run by a terminal device, where the method may be executed by the terminal device provided in the embodiment of the present application, and a frame rate adjustment device of the terminal device may be implemented in a software and/or hardware manner, as shown in fig. 1, a specific scheme provided in this embodiment is as follows:
step S101, acquiring a current frame image and a historical frame image pushed by an application program.
The application program is an application installed in the terminal device, and may be a game application program, a live broadcast application program, or another application program with a high requirement for image display. The frame image is a still image picture, and the frame is a single image picture of the minimum unit in the image motion picture. The current frame image is a frame image to be displayed by the display unit of the terminal equipment, and the historical frame image is a frame image which is displayed by the display unit of the terminal equipment and is finished. During the operation of the terminal device, for example, when the game application program is running, the image is always refreshed and displayed at a higher frame rate (e.g., 60Fps), and in some cases, the refreshing and displaying at such a high frame rate are not required to be maintained, which causes higher resource consumption.
The application program prepares frame data to be drawn, and after the preparation is finished, the frame data is pushed to a Central Processing Unit (CPU) for control Processing, and then the image is rendered and drawn by a Graphics Processing Unit (GPU) and finally displayed through a display screen of the terminal equipment. In the application, before the image is drawn by the GPU, the frame rate of the current frame image is adjusted.
In one embodiment, a current frame image pushed by an application program is acquired, and a displayed historical frame image is drawn, wherein the historical frame image can be acquired through data pushed by a display unit of the terminal equipment, and can also be acquired through the application program with a historical image storage function, and the current frame image can also be acquired from a storage data pool.
Step S102, whether a focus touch event is triggered or not is detected, and if not, the image variation of the current frame image and the image variation of the historical frame image are determined.
When a user uses the terminal device, the user can touch the screen to trigger a related preset function of the application program, for example, click a focus control in the current display interface, where the focus control is an input window that can currently receive user touch, key response, and the like. In this step, after the current frame image and the historical frame image are acquired in step S101, it is determined whether the terminal device triggers a focus touch event, and if there is no relevant touch interaction, the current frame image and the historical frame image are correspondingly compared to determine the image variation of the current frame image and the historical frame image.
In an embodiment, if a focus touch event is detected, intercepting the focus touch event, taking an android operating system as an example, intercepting the focus touch event by an onInterceptTouchEvent () method, optionally, intercepting the focus touch event by calling the onInterceptHoverEvent () method, thereby terminating the transmission of the focus touch event, and after the frame rate of a current frame image is adjusted and displayed subsequently, responding to the focus touch event by calling the onTouchEvent () method.
In another embodiment, detecting whether the focus touch event is triggered comprises: and when the focus control is detected to be touched, judging whether the touch event is a false touch event, and if not, determining the touch event is a focus touch event. The user usually holds the terminal device in the process of using the terminal device, and a false touch phenomenon may exist, wherein the false touch event refers to that the user touches the screen of the terminal device with the hand, but does not touch the terminal device with the application program for interaction. Specifically, when it is detected that a focus control in a display screen is touched, the number and the position of touch points are obtained, and if a touch area larger than a preset area (e.g., 1 square centimeter) is detected, it is determined that a false touch event occurs. Therefore, the phenomenon that the mistaken touch of the user is judged to be the trigger of the focus touch event is avoided, and the scheme is further improved.
It should be noted that, the step of detecting whether to trigger the focus touch event may be performed before step S101, that is, whether to trigger the focus touch event is detected, and if not, the current frame image and the historical frame image pushed by the application are acquired, and then image variation amounts of the current frame image and the historical frame image are determined, which is not limited in this application.
In one embodiment, the image variation amount represents a variation degree of the current frame image and the displayed historical frame image, and may be a parameter obtained by performing normalization, and the parameter value ranges from 0 to 1. Optionally, the image variation may be at least one of a geometric variation, a displacement variation, and a scaling variation, and accordingly, the geometric variation, the displacement variation, and the scaling variation are parameters obtained after normalization. The geometric body is used as a basic unit for forming an image picture, and the image data of the current frame image and the historical frame image which are obtained contain a vertex and a topological boundary, so that the coordinate and the size of the geometric body can be determined, and the geometric body variation (representing the variation of the size and the quantity of the geometric body in the frame image) is obtained through normalization processing; when the displacement variation is determined, respectively marking a horizontal axis and a vertical axis of the display screen as a coordinate system from 0 to 1, mapping the geometric body into the coordinate system according to the position of the geometric body in a frame image picture, thereby obtaining the geometric body with the vertex coordinate from 0 to 1, and further calculating the displacement variation of the geometric body (representing the variation of the displacement of the geometric body in the frame image); when the scaling variation is determined, the resolution corresponding to the geometric object may be determined according to the vertex and the topological boundary of the geometric object in the frame image, and the resolution is matched with the resolution of the entire frame image to obtain the scaling variation (representing the scaling variation of the geometric object in the frame image).
In an embodiment, the image variation of the current frame image and the historical frame image is obtained through an image normalization processing algorithm, which may specifically be:
and step S103, if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an update frame rate.
In an embodiment, the preset condition that the image variation amount is smaller than the preset threshold may be that the image variation amount is smaller than the preset threshold, where the preset threshold may be a unified default threshold used by all the applications, or may be a threshold set separately according to image display characteristics of different applications, for example, for an application with frequent image variation and more scene changes, the preset threshold may be relatively smaller, and for an application with infrequent image variation, that is, many static scenes, the preset threshold may be relatively larger. Optionally, when the image variation is only one variation (for example, any one of the geometric variation, the displacement variation and the scaling variation), only calculating whether the variation is smaller than a preset threshold; if the image variation includes any two or three of the image variations, the preset condition is satisfied that each type of variation parameter is smaller than a respective preset threshold. Illustratively, as shown in fig. 2, fig. 2 is a schematic diagram of setting an image variation threshold according to an embodiment of the present application, where the image variation includes three types of geometric variation, displacement variation, and scaling variation, and accordingly, the respective corresponding thresholds are set to 0.5, 0.32, and 0.48 in sequence, and when the determined geometric variation of the current frame image and the determined geometric variation of the historical frame image is less than 0.5, and the displacement variation is less than 0.32, and the scaling variation is less than 0.48, the following steps are performed: and discarding the current frame image or displaying the current frame image according to the updated frame rate.
The updated frame rate is less than the original frame rate of the current frame image, and if the original frame rate of the current frame is 60Fps, the updated frame rate may be 30 Fps. For example, when the current frame image is displayed at the updated frame rate, the updated frame rate may be obtained by multiplying the original frame rate of the current frame image by a fixed coefficient (e.g. 0.3, 0.5, or 0.8, etc.), and the current frame image is refreshed and displayed according to the updated frame rate, or the updated frame rate may be obtained by subtracting the fixed value (e.g. -20, 30, or 50, etc.) from the original frame rate of the current frame image. And discarding the current frame image, namely, directly skipping the current frame image without rendering and drawing, and acquiring the next frame image and performing corresponding similar adjustment processing.
Optionally, fig. 3 is a flowchart of another frame rate adjustment method according to an embodiment of the present invention, where when the image variation includes a geometry variation, a displacement variation, and a scaling variation, the current frame image and the historical frame image are correspondingly compared to determine the geometry variation, the displacement variation, and the scaling variation, respectively, where if it is detected that any one of the variations does not satisfy the condition (i.e., is greater than or equal to the corresponding preset threshold), it is determined that the current frame rate adjustment condition is not satisfied, the frame rate adjustment is not performed, and the remaining variations do not need to be determined and a determination of whether the remaining variations satisfy the condition is performed. Specifically, the method comprises the following steps:
step S1011, acquiring a current frame image and a historical frame image pushed by an application program;
step S1012, determining whether to trigger a focus touch event, if not, executing step S1013, and if so, executing step S1020.
Step S1013, determining the geometric variation of the current frame image and the historical frame image;
step S1014, determining whether a first preset condition is satisfied (wherein the first preset condition may be that the geometric variation is less than 0.5), if so, executing step S1015, otherwise, executing step S1020;
step S1015, determining displacement variation of the current frame image and the historical frame image;
step S1016, determining whether a second preset condition is satisfied (wherein the second preset condition may be that the displacement variation is smaller than 0.32), if so, executing step S1017, and if not, executing step S1020;
step S1017, determining the scaling variable quantity of the current frame image and the historical frame image;
step S1018, determining whether a third preset condition is met (wherein the third preset condition may be that the zoom variation is smaller than 0.48), if so, executing step S1019, and if not, executing step S1020;
step S1019, discarding the current frame image or displaying the current frame image according to the updated frame rate.
And step S1020, drawing the image according to the original frame rate of the current frame image.
According to the above content, in the process of drawing the frame image provided by the application program, when it is determined that the terminal device does not trigger the focus touch event, the current frame image and the historical frame image are compared to reasonably reduce the frame rate of the current frame image or directly give up drawing the current frame image, so that the power consumption of the terminal device is saved on the premise of not influencing the user experience and the application program performance.
Fig. 4 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application, where optionally, the determining an image variation amount of the current frame image and the historical frame image includes: and judging whether the application program is an application program in a preset list or not, or judging whether a display image of the application program is rendered through openGL or not, and if so, determining the image variation of the current frame image and the historical frame image. As shown in fig. 4, the technical solution is as follows:
step S201, acquiring a current frame image and a historical frame image pushed by an application.
Step S202, judging whether the application program is the application program in the preset list, if so, executing step S203, and if not, executing step S205.
The configuration mode of the preset list comprises a local configuration mode and an online pushing mode, the local configuration mode is stored under a/system/etc/arc.ini directory, the online configuration mode is stored under a/data/system/arc.ini directory, the list of the online configuration directory is preferentially read, if the preset list in the online configuration directory does not exist, the preset list under the local configuration directory is read, and if the local preset list is abnormal, the step S203 or the step S205 can be directly executed.
In an embodiment, the preset list is determined through testing, and specifically, the test contents of the application programs in the preset list include a performance test, a power consumption test and a stability test. The performance test comprises the steps that when the frame rate adjusting method of the scheme is executed, the application program is guaranteed to run without jamming, and the associated application of the application program can run normally and is not influenced by the frame rate adjusting method; the power consumption test comprises the steps of ensuring that the terminal equipment is not influenced in endurance and standby, and obviously saving the electric quantity in the real-time frame rate adjusting method in the running process of the application program in the preset list (for example, when the application program monument executes the frame rate adjusting scheme, 88mA electric quantity is saved to the maximum extent, and the electricity saving proportion is 31%); the stability test comprises that the phenomena of flash back and restart are not generated in the running process of the application program. Optionally, when the application programs in the preset list are preliminarily screened, Top200 applications published in the application mall may be separately tested to determine the preset list, and the static scene and the dynamic scene proportion of the application programs may be considered simultaneously in the screening process, and for the application programs with the static scene proportion greater than 10%, for example, the preset list may be used.
Step S203, determining whether the display image of the application program is rendered through openGL, if so, executing step S204, otherwise, executing step S205.
The method may further include determining whether to render and draw the image through Vulkan (cross-platform 2D and 3D drawing application program interface), if so, performing step S204, and if not, performing step S205.
Step S204, whether a focus touch event is triggered is detected, if not, the image variation of the current frame image and the image variation of the historical frame image are determined, and if the image variation meets a preset condition, the current frame image is discarded or displayed according to an updating frame rate.
And step S205, drawing the image according to the original frame rate of the current frame image.
Therefore, the frame rate of the application program in the preset list or the application program for image display through a specific rendering and drawing mode is adjusted, wherein the application program in the preset list is selected through strict tests, and the power consumption of the terminal device is saved to the greatest extent on the premise that the normal operation of the application program is guaranteed without influencing the user experience.
Fig. 5 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application, where optionally, the determining an image variation amount of the current frame image and the historical frame image includes: and judging whether the image drawing frame rate in the historical frame image is greater than a frame rate threshold value, if so, determining the image variation of the current frame image and the historical frame image. As shown in fig. 5, the technical solution is as follows:
step S301, acquiring a historical display frame image of a preset time period.
Wherein the preset time period may be 1 second, 2 seconds, 3 seconds, or the like.
Step S302, judging whether the image drawing frame rate in the history display frame image is larger than a frame rate threshold value, if so, executing step S303, otherwise, executing step S305.
Optionally, if the frame rates of the displayed historical display frame images are all greater than the frame rate threshold (e.g., 60Fps), it is determined that the frame rates need to be adjusted to save power consumption, and step S303 is performed.
Step S303, obtaining a current frame image and a historical frame image pushed by an application program, detecting whether a focus touch event is triggered, and if not, determining image variation amounts of the current frame image and the historical frame image.
And step S304, if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an update frame rate.
And step S305, drawing the image according to the original frame rate of the current frame image.
As can be seen from the above, the frame rate of the application display image continuously displayed at the high frame rate is adjusted, so as to save the power consumption of the terminal device by discarding the frame or reducing the frame rate of the frame.
Fig. 6 is a flowchart of another frame rate adjustment method provided in the embodiment of the present application, and optionally, the discarding the current frame image or displaying the current frame image according to a preset frame rate includes: and if the previous frame image of the current frame image is not adjusted, discarding the current frame image or displaying the current frame image according to a preset frame rate. As shown in fig. 6, the technical solution is as follows:
step S401, acquiring a current frame image and a historical frame image pushed by an application program.
Step S402, whether a focus touch event is triggered or not is detected, and if not, the image variation of the current frame image and the image variation of the historical frame image are determined.
And S403, judging whether the image variation meets a preset condition, if so, executing S404, and if not, executing S406.
Step S404, determining whether the frame rate of the previous frame image of the current frame image is adjusted, if not, performing step S405, and if so, performing step S406.
Wherein, the step of determining whether the frame rate of the previous frame image has been adjusted includes whether the previous frame image is discarded or the frame rate is reduced for image drawing and displaying, and if the previous frame image is found to have been subjected to the corresponding frame reduction processing, the step of not adjusting the frame rate of the current frame image is executed, that is, the step S406 is executed.
Step S405, discarding the current frame image or displaying the current frame image according to the updated frame rate.
And step S406, drawing the image according to the original frame rate of the current frame image.
Therefore, in the process of adjusting the image frame rate, if the previous frame of the current frame image is subjected to the frame rate reduction processing, the current frame image is drawn according to the normal frame rate in order to ensure the user experience, and if the previous frame image is not subjected to the frame rate reduction processing, the frame rate reduction adjustment is performed on the current frame image, so that the power consumption of the terminal device is reduced while the user experience and the application program performance are ensured.
Fig. 7 is a flowchart of another frame rate adjustment method provided in an embodiment of the present application, where optionally, the acquiring a current frame image and a historical frame image pushed by an application includes: acquiring a current frame image pushed by an application program and image data of a frame before the current frame image; accordingly, the determining the image variation amount of the current frame image and the historical frame image includes: determining an image variation amount of the current frame image and image data of a frame previous to the current frame image. As shown in fig. 7, the technical solution is as follows:
step 501, acquiring a current frame image and a historical frame image pushed by an application program.
Step S502, whether a focus touch event is triggered or not is detected, and if not, the image variation of the current frame image and the image data of the previous frame of the current frame image are determined.
Optionally, when determining the image variation, the current frame image and the previous frame image of the current frame image in the historical frame image may be compared to determine the image variation, or the current frame image and adjacent continuous N frame images in the historical frame image may be compared respectively, where N may be 2, 3, 5, and the like, and after averaging the comparison result, it is determined whether the comparison result meets the preset condition.
Step S503, judging whether the image variation meets a preset condition, if so, executing step S504, and if not, executing step S505.
Step S504, discarding the current frame image or displaying the current frame image according to the updated frame rate.
And step S505, drawing the image according to the original frame rate of the current frame image.
From the above, in the process of calculating the image variation of the current frame image and the historical frame image, in order to improve the calculation efficiency, the current frame image and the previous frame image may be compared to quickly determine whether frame rate adjustment is required, and if so, adjacent consecutive frames of images in the current frame image and the historical frame image may be compared respectively to more accurately determine whether frame rate adjustment is required for the current frame image, so that the frame rate adjustment method is further optimized.
Fig. 8 is a block diagram of a frame rate adjustment apparatus according to an embodiment of the present application, where the apparatus is configured to execute the frame rate adjustment method according to the embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 8, the apparatus specifically includes: an image acquisition module 101, a variation determination module 102, and a frame rate adjustment module 103, wherein,
the image obtaining module 101 is configured to obtain a current frame image and a historical frame image pushed by an application program.
The application program prepares frame data to be drawn, and after the preparation is finished, the frame data is pushed to a Central Processing Unit (CPU) for control Processing, and then the image is rendered and drawn by a Graphics Processing Unit (GPU) and finally displayed through a display screen of the terminal equipment. In the application, before the image is drawn by the GPU, the frame rate of the current frame image is adjusted.
In one embodiment, a current frame image pushed by an application program is acquired, and a displayed historical frame image is drawn, wherein the historical frame image can be acquired through data pushed by a display unit of the terminal equipment, and can also be acquired through the application program with a historical image storage function, and the current frame image can also be acquired from a storage data pool.
A variation determining module 102, configured to detect whether a screen touch event is triggered, and if not, determine image variations of the current frame image and the historical frame image, where the image variations include at least one of a geometry variation, a displacement variation, and a scaling variation.
When a user uses the terminal device, the user can touch the screen to trigger a related preset function of the application program, for example, click a focus control in the current display interface, where the focus control is an input window that can currently receive user touch, key response, and the like. In this step, after the current frame image and the historical frame image are acquired in step S101, it is determined whether the terminal device triggers a focus touch event, and if there is no relevant touch interaction, the current frame image and the historical frame image are correspondingly compared to determine the image variation of the current frame image and the historical frame image.
In an embodiment, if a focus touch event is detected, intercepting the focus touch event, taking an android operating system as an example, intercepting the focus touch event by an onInterceptTouchEvent () method, optionally, intercepting the focus touch event by calling the onInterceptHoverEvent () method, thereby terminating the transmission of the focus touch event, and after the frame rate of a current frame image is adjusted and displayed subsequently, responding to the focus touch event by calling the onTouchEvent () method.
In another embodiment, detecting whether the focus touch event is triggered comprises: and when the focus control is detected to be touched, judging whether the touch event is a false touch event, and if not, determining the touch event is a focus touch event. The user usually holds the terminal device in the process of using the terminal device, and a false touch phenomenon may exist, wherein the false touch event refers to that the user touches the screen of the terminal device with the hand, but does not touch the terminal device with the application program for interaction. Specifically, when it is detected that a focus control in a display screen is touched, the number and the position of touch points are obtained, and if a touch area larger than a preset area (e.g., 1 square centimeter) is detected, it is determined that a false touch event occurs. Therefore, the phenomenon that the mistaken touch of the user is judged to be the trigger of the focus touch event is avoided, and the scheme is further improved.
It should be noted that, the step of detecting whether to trigger the focus touch event may be performed before step S101, that is, whether to trigger the focus touch event is detected, and if not, the current frame image and the historical frame image pushed by the application are acquired, and then image variation amounts of the current frame image and the historical frame image are determined, which is not limited in this application.
In one embodiment, the image variation amount represents a variation degree of the current frame image and the displayed historical frame image, and may be a parameter obtained by performing normalization, and the parameter value ranges from 0 to 1. Optionally, the image variation may be at least one of a geometric variation, a displacement variation, and a scaling variation, and accordingly, the geometric variation, the displacement variation, and the scaling variation are parameters obtained after normalization. The geometric body is used as a basic unit for forming an image picture, and the image data of the current frame image and the historical frame image which are obtained contain a vertex and a topological boundary, so that the coordinate and the size of the geometric body can be determined, and the geometric body variation (representing the variation of the size and the quantity of the geometric body in the frame image) is obtained through normalization processing; when the displacement variation is determined, respectively marking a horizontal axis and a vertical axis of the display screen as a coordinate system from 0 to 1, mapping the geometric body into the coordinate system according to the position of the geometric body in a frame image picture, thereby obtaining the geometric body with the vertex coordinate from 0 to 1, and further calculating the displacement variation of the geometric body (representing the variation of the displacement of the geometric body in the frame image); when the scaling variation is determined, the resolution corresponding to the geometric object may be determined according to the vertex and the topological boundary of the geometric object in the frame image, and the resolution is matched with the resolution of the entire frame image to obtain the scaling variation (representing the scaling variation of the geometric object in the frame image).
A frame rate adjusting module 103, configured to discard the current frame image or display the current frame image according to an update frame rate if the image variation satisfies a preset condition, where the update frame rate is smaller than an original frame rate of the current frame image.
In an embodiment, the preset condition that the image variation amount is smaller than the preset threshold may be that the image variation amount is smaller than the preset threshold, where the preset threshold may be a unified default threshold used by all the applications, or may be a threshold set separately according to image display characteristics of different applications, for example, for an application with frequent image variation and more scene changes, the preset threshold may be relatively smaller, and for an application with infrequent image variation, that is, many static scenes, the preset threshold may be relatively larger. Optionally, when the image variation is only one variation (for example, any one of the geometric variation, the displacement variation and the scaling variation), only calculating whether the variation is smaller than a preset threshold; if the image variation includes any two or three of the image variations, the preset condition is satisfied that each type of variation parameter is smaller than a respective preset threshold.
The updated frame rate is less than the original frame rate of the current frame image, and if the original frame rate of the current frame is 60Fps, the updated frame rate may be 30 Fps. For example, when the current frame image is displayed at the updated frame rate, the updated frame rate may be obtained by multiplying the original frame rate of the current frame image by a fixed coefficient (e.g. 0.3, 0.5, or 0.8, etc.), and the current frame image is refreshed and displayed according to the updated frame rate, or the updated frame rate may be obtained by subtracting the fixed value (e.g. -20, 30, or 50, etc.) from the original frame rate of the current frame image. And discarding the current frame image, namely, directly skipping the current frame image without rendering and drawing, and acquiring the next frame image and performing corresponding similar adjustment processing.
According to the above content, in the process of drawing the frame image provided by the application program, when it is determined that the terminal device does not trigger the focus touch event, the current frame image and the historical frame image are compared to reasonably reduce the frame rate of the current frame image or directly give up drawing the current frame image, so that the power consumption of the terminal device is saved on the premise of not influencing the user experience and the application program performance.
In a possible embodiment, the variation determining module 102 is specifically configured to:
if a focus touch event is detected, intercepting the focus touch event, and the frame rate adjustment module 103 is further configured to: and responding to the focus touch event after discarding the current frame image or displaying the current frame image according to an updated frame rate.
In a possible embodiment, the variation determining module 102 is specifically configured to:
and when the focus control is detected to be touched, judging whether the touch event is a false touch event, and if not, determining the touch event is a focus touch event.
In a possible embodiment, the variation determining module 102 is specifically configured to:
and judging whether the application program is an application program in a preset list or not, or judging whether a display image of the application program is rendered through openGL or not, and if so, determining the image variation of the current frame image and the historical frame image.
In a possible embodiment, the variation determining module 102 is specifically configured to:
and judging whether the image drawing frame rate in the historical frame image is greater than a frame rate threshold value, if so, determining the image variation of the current frame image and the historical frame image.
In one possible embodiment, the image variation includes a geometry variation, a displacement variation and a scaling variation, and the image variation satisfying a preset condition includes:
the geometric body variation, the displacement variation and the scaling variation are all smaller than or equal to respective preset thresholds.
In a possible embodiment, the frame rate adjusting module 103 is specifically configured to:
and if the previous frame image of the current frame image is not adjusted, discarding the current frame image or displaying the current frame image according to a preset frame rate.
In a possible embodiment, the image acquisition module 101 is specifically configured to:
acquiring a current frame image pushed by an application program and image data of a frame before the current frame image; the variation determining module 102 is specifically configured to:
determining an image variation amount of the current frame image and image data of a frame previous to the current frame image.
In a possible embodiment, the frame rate adjusting module 103 is specifically configured to:
adjusting the frame rate of the current frame image to be half of the original frame rate;
and drawing the current frame image according to the adjusted frame rate.
In this embodiment, a terminal device is provided on the basis of the foregoing embodiments, fig. 9 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 9, the terminal device 200 includes: memory 201, processor (CPU) 202, peripheral interfaces 203, RF (Radio Frequency) circuitry 205, audio circuitry 206, speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, Wifi module 213, other input/control devices 210, and external port 204, which communicate via one or more communication buses or signal lines 207.
It should be understood that the illustrated terminal device 200 is only one example of a terminal device, and that the terminal device 200 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 following describes in detail a terminal device for rights management of multi-open applications provided in this embodiment, where the terminal device is a smart phone as an example.
A memory 201, the memory 201 being accessible by the CPU202, the peripheral interface 203, and the like, the memory 201 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.
A peripheral interface 203, said peripheral interface 203 may connect input and output peripherals of the device to the CPU202 and the memory 201.
An I/O subsystem 209, the I/O subsystem 209 may connect input and output peripherals on the device, such as a touch screen 212 and other input/control devices 210, to the peripheral interface 203. The I/O subsystem 209 may include a display controller 2091 and one or more input controllers 2092 for controlling the other input/control devices 210. Where one or more input controllers 2092 receive electrical signals from or transmit electrical signals to other input/control devices 210, the other input/control devices 210 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 2092 may be coupled to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 212, the touch screen 212 being an input interface and an output interface between the user terminal and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 2091 within the I/O subsystem 209 receives electrical signals from the touch screen 212 or transmits electrical signals to the touch screen 212. The touch screen 212 detects a contact on the touch screen, and the display controller 2091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 212, i.e., implements a human-machine interaction, and the user interface object displayed on the touch screen 212 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 205 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, the RF circuitry 205 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 205 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 205 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 (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 206 is mainly used to receive audio data from the peripheral interface 203, convert the audio data into an electric signal, and transmit the electric signal to the speaker 211.
And a speaker 211 for reproducing the voice signal received by the handset from the wireless network through the RF circuit 205 into sound and playing the sound to the user.
And the power management chip 208 is used for supplying power and managing power to the hardware connected with the CPU202, the I/O subsystem and the peripheral interface.
The frame rate adjusting device and the terminal device for the terminal device provided in the above embodiments may execute the frame rate adjusting method for the terminal device provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For details of the technology not described in detail in the above embodiments, reference may be made to a frame rate adjustment method of a terminal device provided in any embodiment of the present invention.
Embodiments of the present application further provide a storage medium containing terminal device executable instructions, which when executed by a terminal device processor, are configured to perform a frame rate adjustment method, where the method includes:
acquiring a current frame image and a historical frame image pushed by an application program;
detecting whether a focus touch event is triggered or not, and if not, determining the image variation of the current frame image and the historical frame image;
and if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an updating frame rate, wherein the updating frame rate is less than the original frame rate of the current frame image.
In a possible embodiment, if a focus touch event is detected, intercepting the focus touch event, and after discarding the current frame image or displaying the current frame image according to an updated frame rate, correspondingly, further including:
responding to the focus touch event.
In one possible embodiment, the detecting whether to trigger the focus touch event includes:
and when the focus control is detected to be touched, judging whether the touch event is a false touch event, and if not, determining the touch event is a focus touch event.
In one possible embodiment, the determining the image variation amount of the current frame image and the historical frame image includes:
and judging whether the application program is an application program in a preset list or not, or judging whether a display image of the application program is rendered through openGL or not, and if so, determining the image variation of the current frame image and the historical frame image.
In one possible embodiment, the determining the image variation amount of the current frame image and the historical frame image includes:
and judging whether the image drawing frame rate in the historical frame image is greater than a frame rate threshold value, if so, determining the image variation of the current frame image and the historical frame image.
In one possible embodiment, the image variation includes a geometry variation, a displacement variation and a scaling variation, and the image variation satisfying a preset condition includes:
the geometric body variation, the displacement variation and the scaling variation are all smaller than or equal to respective preset thresholds.
In a possible embodiment, said discarding the current frame image or displaying the current frame image according to a preset frame rate includes:
and if the previous frame image of the current frame image is not adjusted, discarding the current frame image or displaying the current frame image according to a preset frame rate.
In one possible embodiment, the obtaining of the current frame image and the historical frame image pushed by the application includes:
acquiring a current frame image pushed by an application program and image data of a frame before the current frame image; accordingly, the determining the image variation amount of the current frame image and the historical frame image includes:
determining an image variation amount of the current frame image and image data of a frame previous to the current frame image.
In a possible embodiment, the displaying the current frame image according to the updated frame rate includes:
adjusting the frame rate of the current frame image to be half of the original frame rate;
and drawing the current frame image according to the adjusted 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 by 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, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the operation of the frame rate adjustment method described above, and may also perform related operations in the frame rate adjustment method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention 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 invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. The frame rate adjustment method is characterized by comprising the following steps:
acquiring a current frame image and a historical frame image pushed by an application program;
if the application program is an application program in a preset list, detecting whether a focus touch event is triggered, and if not, determining the image variation of the current frame image and the historical frame image;
if the image variation meets a preset condition, discarding the current frame image or displaying the current frame image according to an updating frame rate, wherein the updating frame rate is less than the original frame rate of the current frame image;
and if the application program is not the application program in the preset list or a focus touch event is detected, drawing the image according to the original frame rate of the current frame image.
2. The method according to claim 1, wherein if a focus touch event is detected, intercepting the focus touch event, and after discarding the current frame image or displaying the current frame image at an updated frame rate, further comprising:
responding to the focus touch event.
3. The method of claim 1, wherein the detecting whether a focus touch event is triggered comprises:
and when the focus control is detected to be touched, judging whether the touch event is a false touch event, and if not, determining the touch event is a focus touch event.
4. The method according to any one of claims 1 to 3, wherein the image variation includes a geometry variation, a displacement variation and a scaling variation, and the image variation satisfies a preset condition including:
the geometric body variation, the displacement variation and the scaling variation are all smaller than or equal to respective preset thresholds.
5. The method of claim 4, wherein the discarding the current frame image or displaying the current frame image at a preset frame rate comprises:
and if the previous frame image of the current frame image is not adjusted, discarding the current frame image or displaying the current frame image according to a preset frame rate.
6. The method of claim 4, wherein the obtaining the current frame image and the historical frame image pushed by the application comprises:
acquiring a current frame image pushed by an application program and image data of a frame before the current frame image; accordingly, the determining the image variation amount of the current frame image and the historical frame image includes:
determining an image variation amount of the current frame image and image data of a frame previous to the current frame image.
7. The method of claim 4, wherein displaying the current frame image at an updated frame rate comprises:
adjusting the frame rate of the current frame image to be half of the original frame rate;
and drawing the current frame image according to the adjusted frame rate.
8. The frame rate adjustment device is characterized by comprising:
the image acquisition module is used for acquiring a current frame image and a historical frame image pushed by an application program;
a variation determining module, configured to detect whether a focus touch event is triggered if the application is an application in a preset list, and if not, determine image variations of the current frame image and the historical frame image;
and the frame rate adjusting module is configured to discard the current frame image or display the current frame image according to an update frame rate if the image variation satisfies a preset condition, where the update frame rate is smaller than an original frame rate of the current frame image, and perform image drawing according to the original frame rate of the current frame image if the application program is not an application program in the preset list or a focus touch event is detected.
9. A terminal device, comprising: processor, memory and computer program stored on the memory and executable on the processor, characterized in that the processor implements the frame rate adjustment method according to any of claims 1 to 7 when executing the computer program.
10. A storage medium containing terminal device-executable instructions, which when executed by a terminal device processor, are configured to perform a frame rate adjustment method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810258437.3A CN108693948B (en) | 2018-03-27 | 2018-03-27 | Frame rate adjusting method and device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810258437.3A CN108693948B (en) | 2018-03-27 | 2018-03-27 | Frame rate adjusting method and device, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108693948A CN108693948A (en) | 2018-10-23 |
CN108693948B true CN108693948B (en) | 2020-12-11 |
Family
ID=63844345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810258437.3A Active CN108693948B (en) | 2018-03-27 | 2018-03-27 | Frame rate adjusting method and device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108693948B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109669528B (en) * | 2018-12-20 | 2021-06-04 | Oppo广东移动通信有限公司 | Terminal processing component control method and device, computer equipment and storage medium |
CN111083417B (en) * | 2019-12-10 | 2021-10-19 | Oppo广东移动通信有限公司 | Image processing method and related product |
CN113781949B (en) * | 2021-09-26 | 2023-10-27 | Oppo广东移动通信有限公司 | Image display method, display driving chip, display screen module and terminal |
CN116723350B (en) * | 2023-05-11 | 2024-05-31 | 广州道然信息科技有限公司 | Method for automatically capturing picture to prevent interference |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104916267A (en) * | 2014-03-11 | 2015-09-16 | 延世大学校产学协力团 | Method for managing power in electronic device and the electronic device |
CN104951266A (en) * | 2015-06-11 | 2015-09-30 | 联想(北京)有限公司 | Screen adjustment method and electronic device |
CN105427785A (en) * | 2014-09-17 | 2016-03-23 | 联发科技股份有限公司 | Processor for use in dynamic refresh rate switching and related electronic device and method |
CN105917290A (en) * | 2014-01-17 | 2016-08-31 | 三星电子株式会社 | Frame rate control method and electronic device thereof |
CN106201548A (en) * | 2016-07-22 | 2016-12-07 | 惠州Tcl移动通信有限公司 | The control method of a kind of mobile terminal key event and system |
CN106506856A (en) * | 2016-11-30 | 2017-03-15 | 努比亚技术有限公司 | A kind of screen-refresh control method and terminal |
WO2017160606A1 (en) * | 2016-03-18 | 2017-09-21 | Microsoft Technology Licensing, Llc | Opportunistic frame dropping for variable-frame-rate encoding |
CN107728900A (en) * | 2017-09-29 | 2018-02-23 | 努比亚技术有限公司 | Gesture operation method, mobile terminal and the storage medium of virtual key |
-
2018
- 2018-03-27 CN CN201810258437.3A patent/CN108693948B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105917290A (en) * | 2014-01-17 | 2016-08-31 | 三星电子株式会社 | Frame rate control method and electronic device thereof |
CN104916267A (en) * | 2014-03-11 | 2015-09-16 | 延世大学校产学协力团 | Method for managing power in electronic device and the electronic device |
CN105427785A (en) * | 2014-09-17 | 2016-03-23 | 联发科技股份有限公司 | Processor for use in dynamic refresh rate switching and related electronic device and method |
CN104951266A (en) * | 2015-06-11 | 2015-09-30 | 联想(北京)有限公司 | Screen adjustment method and electronic device |
WO2017160606A1 (en) * | 2016-03-18 | 2017-09-21 | Microsoft Technology Licensing, Llc | Opportunistic frame dropping for variable-frame-rate encoding |
CN106201548A (en) * | 2016-07-22 | 2016-12-07 | 惠州Tcl移动通信有限公司 | The control method of a kind of mobile terminal key event and system |
CN106506856A (en) * | 2016-11-30 | 2017-03-15 | 努比亚技术有限公司 | A kind of screen-refresh control method and terminal |
CN107728900A (en) * | 2017-09-29 | 2018-02-23 | 努比亚技术有限公司 | Gesture operation method, mobile terminal and the storage medium of virtual key |
Also Published As
Publication number | Publication date |
---|---|
CN108693948A (en) | 2018-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108646906B (en) | Frame rate adjusting method and device, storage medium and intelligent terminal | |
CN108810281B (en) | Lost frame compensation method, lost frame compensation device, storage medium and terminal | |
CN108648259B (en) | Image drawing method and device, storage medium and intelligent terminal | |
CN109157839B (en) | Frame rate regulation and control method, device, storage medium and terminal | |
CN108693948B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN108762465B (en) | Frame rate self-adaptive adjusting method and device, storage medium and intelligent terminal | |
CN108811055B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN108628429B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN106817753B (en) | Method and device for saving electricity by switching background gray scales and mobile terminal | |
CN106782431A (en) | A kind of screen backlight brightness adjusting method, device and mobile terminal | |
CN109064538B (en) | View rendering method and device, storage medium and intelligent terminal | |
CN108733193B (en) | Method and device for intelligently adjusting frame rate, storage medium and intelligent terminal | |
CN106951054B (en) | Application control method and device and mobile terminal | |
CN109460364B (en) | Application program detection method and device, storage medium and mobile terminal | |
US11138956B2 (en) | Method for controlling display of terminal, storage medium, and electronic device | |
CN108521607B (en) | Method and device for processing advertisements in video, storage medium and intelligent terminal | |
CN108519808A (en) | Frame per second method of adjustment, device, terminal device and storage medium | |
CN103488450A (en) | Method, device and terminal equipment for projecting picture | |
CN108594982B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN106776259B (en) | Mobile terminal frame rate detection method and device and mobile terminal | |
CN106937258B (en) | A kind of control method of broadcast, device and mobile terminal | |
KR101722413B1 (en) | Graphics voltage reduction for load line optimization | |
CN108712556B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN108811056B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN108966005B (en) | Video resolution adjusting method and device, storage medium and 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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |