技术领域technical field
本发明涉及移动终端技术领域,尤其涉及一种应用程序的降帧方法、装置、移动终端及可读存储介质。The present invention relates to the technical field of mobile terminals, and in particular to a frame reduction method and device for application programs, a mobile terminal and a readable storage medium.
背景技术Background technique
随着电子技术的不断发展,用户通过智能手机、平板电脑等移动终端操作网络游戏已成为一种重要娱乐方式。With the continuous development of electronic technology, it has become an important form of entertainment for users to operate online games through mobile terminals such as smartphones and tablet computers.
目前,对于大多数游戏场景,帧率为30FPS(Frame Per Second,画面每秒传输帧数)时基本就可以满足人的视觉要求,但是目前绝大部分网络游戏都将帧率提高到了60FPS,由此可以明显的提升交互感和逼真感。At present, for most game scenes, a frame rate of 30FPS (Frame Per Second, the number of frames transmitted per second) can basically meet human visual requirements, but most of the current online games have increased the frame rate to 60FPS. This can significantly improve the sense of interaction and realism.
由于移动终端的电池电量有限,游戏的帧率越高,移动终端CPU(CentralProcessing Unit,中央处理器)和GPU(Graphics Processing Unit,图形处理器)的负荷也会越高,进而导致移动终端的耗电量也越高,从而缩短了移动终端的使用时长。而对于部分游戏而言,其并不需要较高的帧率,如棋牌类游戏,如果这部分游戏应用仍旧以较高的帧率运行,则难免会浪费较多的电池电量,影响移动终端的使用时长。Due to the limited battery power of the mobile terminal, the higher the frame rate of the game, the higher the load on the CPU (Central Processing Unit, central processing unit) and GPU (Graphics Processing Unit, graphics processing unit) of the mobile terminal will be, which in turn leads to the consumption of the mobile terminal. The power is also higher, thereby shortening the use time of the mobile terminal. For some games, it does not require a higher frame rate, such as chess and card games, if these game applications still run at a higher frame rate, it will inevitably waste more battery power and affect the performance of the mobile terminal. How long to use.
发明内容Contents of the invention
本发明实施例的主要目的在于提供一种应用程序的降帧方法、装置、移动终端及可读存储介质,可以解决现有技术中部分游戏的帧率较高,从而影响移动终端使用时长的技术问题。The main purpose of the embodiments of the present invention is to provide a method and device for reducing the frame rate of an application program, a mobile terminal and a readable storage medium, which can solve the problem that the frame rate of some games in the prior art is relatively high, thereby affecting the use time of the mobile terminal. question.
为实现上述目的,本发明实施例第一方面提供一种应用程序的降帧方法,该方法包括:In order to achieve the above object, the first aspect of the embodiment of the present invention provides a frame reduction method for an application, the method comprising:
当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;When it is detected that the target application program is running in the foreground, the frame value of the target application program at each moment in the preset time period is obtained to obtain a frame value set;
根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;According to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped, determine the frame drop size corresponding to the frame value interval;
根据所述帧数值区间对应的降帧大小,对所述目标应用程序中属于所述帧数值区间内的待刷新的帧数值进行降帧处理。According to the frame down size corresponding to the frame value range, perform frame down processing on the frame values to be refreshed within the frame value range in the target application program.
为实现上述目的,本发明实施例第二方面提供一种应用程序的降帧装置,该装置包括:In order to achieve the above object, the second aspect of the embodiment of the present invention provides an application program frame reduction device, the device includes:
获取模块,用于当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;An acquisition module, configured to acquire the frame values of the target application at each moment within a preset time period when it is detected that the target application is running in the foreground, to obtain a set of frame values;
确定模块,用于根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;A determining module, configured to determine the size of the frame drop corresponding to the frame value range according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped;
处理模块,用于根据所述帧数值区间对应的降帧大小,对所述目标应用程序中属于所述帧数值区间内的待刷新的帧数值进行降帧处理。The processing module is configured to perform frame reduction processing on the frame values to be refreshed within the frame value range in the target application program according to the frame drop size corresponding to the frame value range.
为实现上述目的,本发明实施例第三方面提供一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现第一方面的应用程序的降帧方法中的各个步骤。To achieve the above object, the third aspect of the embodiment of the present invention provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, Each step in the frame reduction method of the application program in the first aspect is realized.
为实现上述目的,本发明实施例第四方面提供一种可读存储介质,所述可读存储介质为计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现第一方面的应用程序的降帧方法中的各个步骤。In order to achieve the above object, the fourth aspect of the embodiment of the present invention provides a readable storage medium, the readable storage medium is a computer readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, Each step in the frame reduction method of the application program in the first aspect is realized.
本发明实施例所提供的应用程序的降帧方法,包括:当检测到目标应用程序在前台运行时,获取目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合,根据该帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定上述帧数值区间对应的降帧大小,然后根据上述帧数值区间对应的降帧大小,对目标应用程序中属于上述帧数值区间内的待刷新的帧数值进行降帧处理。相较于现有技术,本发明实施例可以预先确定待降帧的帧数值区间,然后根据目标应用程序在预设时间段内各个时刻的帧数值大小,确定上述帧数值区间对应的降帧大小,然后对目标应用程序中属于上述帧数值区间内的待刷新的帧数值进行降帧处理,即本发明实施例只有在目标应用程序待刷新的帧数值属于预设的帧数值区间内时,才会对目标应用程序进行降帧处理,从而可以在保证用户显示界面不出现卡顿的前提下,选择性的对目标应用程序进行降帧处理,以此来延长移动终端的使用时长。The frame reduction method of an application program provided by the embodiment of the present invention includes: when it is detected that the target application program is running in the foreground, acquiring the frame value of the target application program at each moment within a preset time period, and obtaining a frame value set, according to the According to the size of each frame value in the frame value set and the preset frame value interval to be dropped, determine the frame drop size corresponding to the above frame value range, and then according to the frame drop size corresponding to the above frame value range, perform the The frame values to be refreshed within the above frame value range are subjected to frame down processing. Compared with the prior art, the embodiment of the present invention can predetermine the frame value interval of the frame to be dropped, and then determine the frame drop size corresponding to the above frame value interval according to the frame value size of the target application program at each moment within the preset time period , and then perform frame down processing on the frame values to be refreshed in the target application program that belong to the above-mentioned frame value range, that is, only when the frame values to be refreshed in the target application program fall within the preset frame value range in the embodiment of the present invention, the Frame down processing will be performed on the target application program, so that under the premise of ensuring that the user display interface does not appear stuck, frame down processing can be selectively performed on the target application program, so as to prolong the use time of the mobile terminal.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without creative work.
图1为一种移动终端的结构框图;Fig. 1 is a structural block diagram of a mobile terminal;
图2为本发明第一实施例中应用程序的降帧方法的流程示意图;FIG. 2 is a schematic flowchart of a method for reducing frames of an application program in the first embodiment of the present invention;
图3为本发明第一实施例中步骤202的细化步骤的流程示意图;FIG. 3 is a schematic flow chart of the refinement steps of step 202 in the first embodiment of the present invention;
图4为本发明第二实施例中应用程序的降帧方法的流程示意图;FIG. 4 is a schematic flowchart of a method for reducing frames of an application program in a second embodiment of the present invention;
图5为本发明第二实施例中步骤404的细化步骤的流程示意图;FIG. 5 is a schematic flow chart of the refinement steps of step 404 in the second embodiment of the present invention;
图6为本发明第三实施例中应用程序的降帧装置的程序模块示意图;FIG. 6 is a schematic diagram of program modules of an application program frame reduction device in a third embodiment of the present invention;
图7为本发明第三实施例中确定模块602的细化程序模块示意图;FIG. 7 is a schematic diagram of a detailed program module of the determination module 602 in the third embodiment of the present invention;
图8为本发明第四实施例中应用程序的降帧装置的程序模块示意图;FIG. 8 is a schematic diagram of the program modules of the application program frame reduction device in the fourth embodiment of the present invention;
图9为本发明第四实施例中降帧模块802的细化程序模块示意图。FIG. 9 is a schematic diagram of the refinement program module of the frame reduction module 802 in the fourth embodiment of the present invention.
具体实施方式Detailed ways
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
参照图1,图1示出了一种移动终端的结构框图。本发明实施例提供的应用程序的降帧方法可应用于如图1所示的移动终端10中,移动终端10可以但不限于包括:需依靠电池维持正常运行且支持网络及下载功能的智能手机、笔记本、平板电脑、穿戴智能设备等。Referring to FIG. 1, FIG. 1 shows a structural block diagram of a mobile terminal. The frame reduction method of the application program provided by the embodiment of the present invention can be applied to the mobile terminal 10 shown in Figure 1. The mobile terminal 10 can include, but is not limited to: a smart phone that needs to rely on batteries to maintain normal operation and supports network and download functions. , notebooks, tablets, wearable smart devices, etc.
如图1所示,移动终端10包括存储器101及一个或多个(图中仅示出一个)处理器103,另外,还可以包括存储控制器102、外设接口104与触控屏幕105。这些组件通过一条或多条通讯总线/信号线106相互通讯。As shown in FIG. 1 , the mobile terminal 10 includes a memory 101 and one or more (only one is shown in the figure) processors 103 , and may also include a storage controller 102 , a peripheral interface 104 and a touch screen 105 . These components communicate with each other via one or more communication buses/signal lines 106 .
可以理解,图1所示的结构仅为示意,其并不对移动终端的结构造成限定。移动终端10还可包括比图1所示更多或者更少的组件,或者具有与图1所示不同的配置。图1所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the mobile terminal. The mobile terminal 10 may also include more or fewer components than those shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 . Each component shown in FIG. 1 may be implemented by hardware, software or a combination thereof.
存储器101可用于存储软件程序以及模块,如本发明实施例中的应用程序的降帧方法及移动终端对应的程序指令/模块,处理器103通过运行存储在存储器101内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的应用程序的降帧方法。The memory 101 can be used to store software programs and modules, such as the method for reducing the frame of the application program in the embodiment of the present invention and the program instructions/modules corresponding to the mobile terminal. The processor 103 runs the software programs and modules stored in the memory 101, thereby Executing various functional applications and data processing, that is, implementing the above-mentioned frame reduction method of the application program.
存储器101可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器101可进一步包括相对于处理器103远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。处理器103以及其他可能的组件对存储器101的访问可在存储控制器102的控制下进行。The memory 101 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 101 may further include a memory that is remotely located relative to the processor 103, and these remote memories may be connected to the mobile terminal 10 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 101 by the processor 103 and possibly other components may be under the control of the memory controller 102 .
外设接口104将各种输入/输入装置耦合至CPU以及存储器101。处理器103运行存储器101内的各种软件、指令以执行移动终端10的各种功能以及进行数据处理。The peripheral interface 104 couples various input/output devices to the CPU and the memory 101 . The processor 103 runs various software and instructions in the memory 101 to execute various functions of the mobile terminal 10 and perform data processing.
在一些实施例中,外设接口104、处理器103以及存储控制器102可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。In some embodiments, peripheral interface 104, processor 103, and memory controller 102 may be implemented in a single chip. In some other instances, they can be implemented by independent chips respectively.
触控屏幕105在移动终端与用户之间同时提供一个输出及输入界面。具体地,触控屏幕105向用户显示视频输出,这些视频输出的内容可包括文字、图形、视频、及其任意组合。一些输出结果是对应于一些用户界面对象。触控屏幕105还接收用户的输入,例如用户的点击、滑动等手势操作,以便用户界面对象对这些用户的输入做出响应。检测用户输入的技术可以是基于电阻式、电容式或者其他任意可能的触控检测技术。触控屏幕105显示单元的具体实例包括但并不限于液晶显示器或发光聚合物显示器。The touch screen 105 simultaneously provides an output and input interface between the mobile terminal and the user. Specifically, the touch screen 105 displays video output to the user, and the content of the video output may include text, graphics, video, and any combination thereof. Some output results correspond to some user interface objects. The touch screen 105 also receives user input, such as user gesture operations such as clicking and sliding, so that the user interface objects respond to these user inputs. The technique for detecting user input may be based on resistive, capacitive or any other possible touch detection techniques. Specific examples of the display unit of the touch screen 105 include, but are not limited to, a liquid crystal display or a light emitting polymer display.
基于上述移动终端描述本发明实施例中应用程序的降帧方法。The frame reduction method of the application program in the embodiment of the present invention is described based on the above mobile terminal.
现有技术中,存在由于部分游戏的帧率较高,而导致移动终端的使用时长缩短的技术问题。In the prior art, there is a technical problem that the usage time of the mobile terminal is shortened due to the high frame rate of some games.
为了解决上述技术问题,本发明实施例提出了一种应用程序的降帧方法,在该方法中,可以预先确定待降帧的帧数值区间,然后根据目标应用程序在预设时间段内各个时刻的帧数值大小,来确定上述帧数值区间对应的降帧大小,然后对目标应用程序中属于上述帧数值区间内的待刷新的帧数值进行降帧处理,即本发明实施例只有在目标应用程序待刷新的帧数值属于预设的帧数值区间内时,才会对目标应用程序进行降帧处理,从而可以在保证在用户显示界面不出现卡顿的前提下,选择性的对目标应用程序进行降帧处理,以此来延长移动终端的使用时长。In order to solve the above-mentioned technical problems, the embodiment of the present invention proposes a frame reduction method for an application program. In this method, the frame value range to be reduced can be determined in advance, and then the target application program can to determine the size of frame reduction corresponding to the above frame value interval, and then perform frame reduction processing on the frame values to be refreshed in the above frame value range in the target application program, that is, the embodiment of the present invention can only When the frame value to be refreshed falls within the preset frame value range, the target application program will be subjected to frame reduction processing, so that the target application program can be selectively processed on the premise of ensuring that the user display interface does not appear stuck. Frame down processing, in order to prolong the use time of the mobile terminal.
请参阅图2,图2为本发明第一实施例中应用程序的降帧方法的流程示意图,本发明实施例中,上述应用程序的降帧方法包括:Please refer to FIG. 2. FIG. 2 is a schematic flow chart of the frame reduction method of the application program in the first embodiment of the present invention. In the embodiment of the present invention, the frame reduction method of the above application program includes:
步骤201、当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;Step 201, when it is detected that the target application program is running in the foreground, obtain the frame value of the target application program at each moment within a preset time period, and obtain a frame value set;
本发明实施例中,预先确定需要进行降帧处理的目标应用程序,例如游戏应用、视频播放应用等,当检测到目标应用程序在移动终端的前台运行时,便获取该目标应用程序在预设时间段内各个时刻的帧数值,得到帧数值集合。In the embodiment of the present invention, the target application program that needs to perform frame reduction processing is determined in advance, such as a game application, a video playback application, etc., and when it is detected that the target application program is running in the foreground of the mobile terminal, the preset The frame values at each moment in the time period to obtain a set of frame values.
其中,上述预设时间段的时长可由技术人员通过大量实验获得,也可以由移动终端用户自行设置。例如,假设上述预设时间段为3分钟,则当检测到上述目标应用程序在前台运行时,获取该目标应用程序在之后的3分钟内各时刻的帧数值,得到帧数值集合。Wherein, the length of the above-mentioned preset time period can be obtained by technicians through a large number of experiments, and can also be set by mobile terminal users themselves. For example, assuming that the above-mentioned preset time period is 3 minutes, when it is detected that the above-mentioned target application program is running in the foreground, the frame value of the target application program at each moment in the next 3 minutes is obtained to obtain a frame value set.
其中,可以理解的是,上述各个时刻的帧数值可以表示为上述目标应用程序每秒刷新或显示的帧数,例如当某一时刻的帧数值为30时,表示在该时刻刷新或显示的帧数为30帧。其中,上述预设时间段的时长与上述帧数值集合中的帧数值的个数为正比,例如,当所述预设时长为3分钟时,则上述帧数值集合中的帧数值总个数为180个。Wherein, it can be understood that the above-mentioned frame values at each moment can be expressed as the number of frames refreshed or displayed by the above-mentioned target application program per second, for example, when the frame value at a certain moment is 30, it means the frame refreshed or displayed at that moment The number is 30 frames. Wherein, the duration of the above-mentioned preset time period is proportional to the number of frame values in the above-mentioned frame value set, for example, when the preset time length is 3 minutes, then the total number of frame values in the above-mentioned frame value set is 180.
步骤202、根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;Step 202, according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped, determine the frame drop size corresponding to the frame value interval;
本发明实施例中,在得到上述帧数值之后,即可根据帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,来确定该帧数值区间对应的降帧大小。In the embodiment of the present invention, after the above-mentioned frame value is obtained, the size of the reduced frame corresponding to the frame value range can be determined according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped.
可以理解的是,对于游戏应用来说,帧率为30FPS时基本就可以满足人的视觉要求,若将帧率提升至60FPS,虽然可以明显提升交互感和逼真感,但是却会增加移动终端的负荷;另外,当超过帧率超过60FPS时,一般人就不容易察觉到有明显的流畅度提升了,这样便只会白白浪费移动终端电池的电能。因此,本发明实施例可以在目标应用程序待刷新的帧数值大于预设的降帧阈值(如40)时,才对该目标应用程序进行降帧处理。It is understandable that for game applications, a frame rate of 30FPS can basically meet human visual requirements. If the frame rate is raised to 60FPS, although the sense of interaction and realism can be significantly improved, it will increase the In addition, when the frame rate exceeds 60FPS, it is difficult for ordinary people to notice a significant improvement in fluency, which will only waste the battery power of the mobile terminal. Therefore, in the embodiment of the present invention, when the number of frames to be refreshed by the target application program is greater than a preset frame reduction threshold (for example, 40), the frame reduction process is performed on the target application program.
其中,可以预先设置若干个需要进行降帧的帧数值区间,例如:[30,39]、[40,49]、[50,59]、[60,+∞]等,然后基于上述帧数值集合中各个帧数值的大小,确定各个帧数值在上述各个帧数值区间内的分布情况,根据该分布情况即可确定各个帧数值区间对应的降帧大小。Among them, you can pre-set several frame value intervals that need to be lowered, such as: [30,39], [40,49], [50,59], [60,+∞], etc., and then based on the above frame value set The size of each frame value in the frame determines the distribution of each frame value in the above-mentioned frame value range, and the frame drop size corresponding to each frame value range can be determined according to the distribution.
步骤203、根据所述帧数值区间对应的降帧大小,对所述目标应用程序中属于所述帧数值区间内的待刷新的帧数值进行降帧处理。Step 203 : Perform frame down processing on the frame values to be refreshed within the frame value range in the target application program according to the frame down size corresponding to the frame value range.
本发明实施例中,在确定各个帧数值区间对应的降帧大小之后,即可根据各个帧数值区间对应的降帧大小,对目标应用程序中属于上述任意一个帧数值区间内的待刷新的帧数值进行降帧处理。例如,假设帧数值区间[30,39]与[40,49]对应的降帧大小分别为3帧和5帧,则当目标应用程序待刷新的帧数值处于帧数值区间[30,39]内时,则将目标应用程序待刷新的帧数减少3帧;当目标应用程序待刷新的帧数值处于帧数值区间[40,49]内时,则将目标应用程序待刷新的帧数减少5帧。In the embodiment of the present invention, after determining the down frame size corresponding to each frame value range, the frames to be refreshed belonging to any one of the above frame value ranges in the target application program can be processed according to the frame down size corresponding to each frame value range The value is down-framed. For example, assuming that the frame value ranges [30,39] and [40,49] correspond to frame drop sizes of 3 frames and 5 frames respectively, then when the frame value to be refreshed by the target application is within the frame value range [30,39] , then reduce the number of frames to be refreshed by the target application by 3 frames; when the number of frames to be refreshed by the target application is in the frame value range [40,49], reduce the number of frames to be refreshed by the target application by 5 frames .
本发明实施例所提供的应用程序的降帧方法,相较于现有技术而言,可以预先确定待降帧的帧数值区间,然后根据目标应用程序在预设时间段内各个时刻的帧数值大小,确定上述帧数值区间对应的降帧大小,然后对目标应用程序中属于上述帧数值区间内的待刷新的帧数值进行降帧处理,即本发明实施例只有在目标应用程序待刷新的帧数值属于预设的帧数值区间内时,才会对目标应用程序进行降帧处理,从而可以在保证用户显示界面不出现卡顿的前提下,选择性的对目标应用程序进行降帧处理,以此来延长移动终端的使用时长。Compared with the prior art, the frame reduction method of the application program provided by the embodiment of the present invention can predetermine the frame value interval of the frame to be reduced, and then according to the frame value of the target application program at each moment within the preset time period Size, determine the frame drop size corresponding to the above frame value interval, and then perform frame drop processing on the frame values to be refreshed that belong to the above frame value range in the target application program, that is, in the embodiment of the present invention, only the frames to be refreshed in the target application program When the value falls within the preset frame value range, the target application program will be subjected to frame reduction processing, so that the target application program can be selectively reduced frame processing on the premise of ensuring that the user display interface does not appear stuck, so as to This prolongs the usage time of the mobile terminal.
进一步地,基于本发明第一实施例,参照图3,图3为本发明第一实施例中步骤202的细化步骤的流程示意图,本发明实施例中,上述步骤202包括:Further, based on the first embodiment of the present invention, referring to FIG. 3, FIG. 3 is a schematic flowchart of the detailed steps of step 202 in the first embodiment of the present invention. In the embodiment of the present invention, the above step 202 includes:
步骤301、按照所述帧数值集合中各个帧数值的大小,确定属于所述帧数值区间的帧数值的个数占所述帧数值集合总个数的比值,并作为所述帧数值区间的目标比值;Step 301, according to the size of each frame value in the frame value set, determine the ratio of the number of frame values belonging to the frame value range to the total number of the frame value set, and use it as the target of the frame value range ratio;
本发明实施例中,可以按照上述帧数值集合中各个帧数值的大小,确定各个帧数值区间内包含的上述帧数值集合中的帧数值的个数,然后再确定各个帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值,并将确定的各个比值作为上述各个帧数值区间对应的目标比值。In the embodiment of the present invention, according to the size of each frame value in the above frame value set, the number of frame values in the above frame value set contained in each frame value interval can be determined, and then the frame value in each frame value interval can be determined The ratio of the number to the total number of the above-mentioned frame value sets, and each determined ratio is used as the target ratio corresponding to each of the above-mentioned frame value intervals.
例如,假设上述帧数值集合中总共包括180个帧数值,帧数值区间[30,39]内包含的帧数值的个数为90个、帧数值区间[40,49]内包含的帧数值的个数为18个,则帧数值区间[30,39]对应的目标比值为0.5、帧数值区间[40,49]对应的目标比值为0.1。For example, assuming that the above frame value set includes a total of 180 frame values, the number of frame values contained in the frame value range [30,39] is 90, and the number of frame values contained in the frame value range [40,49] If the number is 18, the target ratio corresponding to the frame value interval [30,39] is 0.5, and the target ratio corresponding to the frame value interval [40,49] is 0.1.
步骤302、根据所述帧数值区间的目标比值,确定所述帧数值区间对应的降帧大小。Step 302 , according to the target ratio of the frame value interval, determine the size of the down frame corresponding to the frame value interval.
本发明实施例中,可以预先设置上述帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值与降帧大小之间的对应关系。In the embodiment of the present invention, the corresponding relationship between the ratio of the number of frame values in the frame value range to the total number of the frame value sets and the size of the dropped frame may be preset.
可以理解的是,当目标应用程序在预设时间段内各个时刻的帧数值绝大多数都集中在某个帧数值区间内时,若对处于该帧数值区间内的待刷新的帧数值进行较大幅度的降帧处理,则会明显的改变用户的视觉体验;而当目标应用程序在预设时间段内各个时刻的帧数值只有极少部分属于该帧数值区间时,若对处于该帧数值区间内的待刷新的帧数值进行较大幅度的降帧处理,则不容易引起用户的注意。因此,上述帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值与降帧大小之间可以为反比例关系,即帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值越大,则该帧数值区间对应的降帧大小越小。It is understandable that when most of the frame values of the target application at each moment within the preset time period are concentrated in a certain frame value range, if the frame values to be refreshed within the frame value range are compared Substantial frame reduction processing will obviously change the user's visual experience; and when only a small part of the frame value of the target application at each moment within the preset time period belongs to the frame value range, if the target application is in the frame value range If the frame values to be refreshed in the interval are subjected to relatively large frame reduction processing, it is not easy to attract the user's attention. Therefore, the ratio of the number of frame values in the frame value interval to the total number of the frame value set and the frame drop size can be inversely proportional, that is, the number of frame values in the frame value interval accounts for the above frame value set The larger the ratio of the total number, the smaller the down frame size corresponding to the frame value range.
具体的,上述步骤302包括:Specifically, the above step 302 includes:
查找预置的所述帧数值区间内的帧数值的个数占所述帧数值集合总个数的比值与降帧大小之间的对应关系,确定与所述目标比值对应的降帧大小,并作为所述帧数值区间对应的降帧大小。Finding the correspondence between the ratio of the number of frame values in the preset frame value range to the total number of frame value sets and the frame drop size, determining the frame drop size corresponding to the target ratio, and It is used as the down frame size corresponding to the frame value range.
本发明实施例中,在确定上述帧数值区间的目标比值之后,即可查找预置的上述帧数值区间内的帧数值的个数占所述帧数值集合总个数的比值与降帧大小之间的对应关系,然后确定与上述帧数值区间的目标比值所对应的降帧大小,并作为上述帧数值区间的降帧大小。In the embodiment of the present invention, after determining the target ratio of the above-mentioned frame value range, the ratio of the number of frame values in the preset frame value range to the total number of frame value sets and the size of the frame drop can be searched. The corresponding relationship between them, and then determine the frame drop size corresponding to the target ratio of the above-mentioned frame value interval, and use it as the frame drop size of the above-mentioned frame value interval.
本发明实施例所提供的应用程序的降帧方法,可以按照上述帧数值集合中各个帧数值的大小,确定属于上述帧数值区间的帧数值的个数占上述帧数值集合总个数的比值,并作为上述帧数值区间的目标比值,然后根据上述帧数值区间的目标比值,确定上述帧数值区间对应的降帧大小,即本发明实施例可以根据目标应用程序在预设时间段内各个时刻的帧数值的分布情况,来确定各个帧数值区间对应的降帧大小,从而可以在保证用户显示界面不出现卡顿的前提下,对目标应用程序进行差异化的降帧处理,以此来延长移动终端的使用时长。The frame reduction method of the application program provided by the embodiment of the present invention can determine the ratio of the number of frame values belonging to the above-mentioned frame value range to the total number of the above-mentioned frame value sets according to the size of each frame value in the above-mentioned frame value set, And as the target ratio of the above-mentioned frame value interval, and then according to the target ratio of the above-mentioned frame value interval, determine the size of the frame drop corresponding to the above-mentioned frame value interval, that is, the embodiment of the present invention can be based on the target application at each moment in the preset time period. The distribution of frame values is used to determine the frame drop size corresponding to each frame value range, so that the target application can be differentially dropped frame processing on the premise of ensuring that the user display interface does not appear stuck, so as to extend the mobile The duration of use of the terminal.
进一步地,基于本发明第一实施例,参照图4,图4为本发明第二实施例中应用程序的降帧方法的流程示意图,本发明实施例中,上述应用程序的降帧方法包括:Further, based on the first embodiment of the present invention, refer to FIG. 4 . FIG. 4 is a schematic flow chart of a frame reduction method for an application program in a second embodiment of the present invention. In the embodiment of the present invention, the above frame reduction method for an application program includes:
步骤401、当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;Step 401, when it is detected that the target application program is running in the foreground, obtain the frame value of the target application program at each moment within a preset time period, and obtain a frame value set;
步骤402、根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;Step 402, according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped, determine the frame drop size corresponding to the frame value interval;
本发明实施例中,上述步骤401至步骤402与本发明第一实施例中步骤201至步骤202所描述的内容基本一致,请参阅本发明第一实施例,在此不再赘述。In the embodiment of the present invention, the above-mentioned steps 401 to 402 are basically the same as those described in steps 201 to 202 in the first embodiment of the present invention. Please refer to the first embodiment of the present invention, and details will not be repeated here.
步骤403、确定所述目标应用程序待刷新的帧数值,并判断所述待刷新的帧数值是否属于所述帧数值区间;Step 403: Determine the frame value to be refreshed by the target application program, and determine whether the frame value to be refreshed belongs to the frame value range;
步骤404、若所述待刷新的帧数值属于所述帧数值区间内,则根据所述帧数值区间对应的降帧大小,对所述待刷新的帧数值进行降帧处理。Step 404: If the frame value to be refreshed belongs to the frame value range, perform frame down processing on the frame value to be refreshed according to the frame down size corresponding to the frame value range.
本发明实施例中,当确定各个帧数值对应的降帧大小之后,确定目标应用程序待刷新的帧数值,然后判断待刷新的帧数值是否处于上述帧数值区间内,若处于,则基于待刷新的帧数值所处于的帧数值区间对应的降帧大小,对待刷新的帧数值进行降帧处理。In the embodiment of the present invention, after determining the down frame size corresponding to each frame value, determine the frame value to be refreshed by the target application program, and then determine whether the frame value to be refreshed is within the above-mentioned frame value range, and if so, based on the frame value to be refreshed The frame value corresponding to the frame value interval of the value of the frame is dropped, and the frame value to be refreshed is subjected to frame drop processing.
具体的,参照图5,图5为本发明第二实施例中步骤404的细化步骤的流程示意图,本发明实施例中,上述步骤404包括:Specifically, referring to FIG. 5, FIG. 5 is a schematic flowchart of the detailed steps of step 404 in the second embodiment of the present invention. In the embodiment of the present invention, the above step 404 includes:
步骤501、利用所述待刷新的帧数值以及所述帧数值区间对应的降帧大小,确定丢帧间隔;Step 501, using the frame value to be refreshed and the frame drop size corresponding to the frame value interval to determine the frame loss interval;
本发明实施例中,可以根据待刷新的帧数值与上述帧数值区间对应的降帧大小的比值来确定上述丢帧间隔,例如,假设上述待刷新的帧数值为50、上述帧数值区间对应的降帧大小为5帧,则上述丢帧间隔为9帧;假设上述待刷新的帧数值为50、上述帧数值区间对应的降帧大小为6帧,则上述丢帧间隔为8帧。In the embodiment of the present invention, the above-mentioned frame loss interval can be determined according to the ratio of the frame value to be refreshed to the frame drop size corresponding to the above-mentioned frame value range, for example, assuming that the above-mentioned frame value to be refreshed is 50, and If the frame drop size is 5 frames, the frame drop interval is 9 frames; assuming that the number of frames to be refreshed is 50 and the frame drop size corresponding to the frame value range is 6 frames, the frame drop interval is 8 frames.
步骤502、按照所述丢帧间隔对所述目标应用程序待刷新的多帧图像进行丢帧处理,得到用于刷新的帧图像;Step 502: Perform frame dropping processing on the multi-frame images to be refreshed by the target application program according to the frame dropping interval, to obtain frame images for refreshing;
本发明实施例中,当上述丢帧间隔为9帧时,则表示上述应用程序每刷新9帧图像之后便需要丢弃一帧图像,例如,假设待刷新的帧数值为50、丢帧间隔为9帧,则将待刷新的第10帧、第20帧、第30帧、第40帧、第50帧图像确定为需要丢弃的帧图像,将除需要丢弃的帧图像之外的其他帧图像确定为用于刷新的帧图像。In the embodiment of the present invention, when the above-mentioned frame dropping interval is 9 frames, it means that the above-mentioned application program needs to discard one frame of image after refreshing 9 frames of images. For example, assuming that the number of frames to be refreshed is 50, and the frame dropping interval is 9 frame, the 10th frame, the 20th frame, the 30th frame, the 40th frame, and the 50th frame image to be refreshed are determined as the frame image to be discarded, and the other frame images except the frame image to be discarded are determined as Frame image for refresh.
步骤503、利用所述用于刷新的帧图像在显示界面上进行刷新。Step 503 , refresh the display interface by using the frame image for refreshing.
本发明实施例中,在确定用于刷新的帧图像之后,则将用于刷新的帧图像在显示界面进行刷新。In the embodiment of the present invention, after the frame image used for refreshing is determined, the frame image used for refreshing is refreshed on the display interface.
本发明实施例所提供的应用程序的降帧方法,包括:在确定帧数值区间对应的降帧大小之后,确定目标应用程序待刷新的帧数值,然后判断待刷新的帧数值是否属于上述帧数值区间内,若属于,则根据上述帧数值区间对应的降帧大小,对待刷新的帧数值进行降帧处理。即本发明实施例能够根据目标应用程序待刷新的帧数值的大小,来确定是否需要对目标应用程序待刷新的帧数值进行降帧处理,若确定需要进行降帧处理,则按照待刷新的帧数值的大小来确定需要降低的帧数,进而进行降帧处理,避免了由于降帧处理而使目标应用程序出现卡顿的情况。The frame reduction method of an application program provided by the embodiment of the present invention includes: after determining the frame reduction size corresponding to the frame value interval, determining the frame value of the target application program to be refreshed, and then judging whether the frame value to be refreshed belongs to the above frame value In the interval, if it belongs to, the frame value to be refreshed is subjected to frame reduction processing according to the frame reduction size corresponding to the above frame value interval. That is, the embodiment of the present invention can determine whether to perform frame reduction processing on the frame value to be refreshed by the target application program according to the size of the frame value to be refreshed by the target application program. The size of the numerical value is used to determine the number of frames that need to be reduced, and then the frame reduction process is performed to avoid the situation that the target application program is stuck due to the frame reduction process.
为了解决上述技术问题,本发明实施例还提出了一种应用程序的降帧装置,请参阅图6,图6为本发明第三实施例中应用程序的降帧装置的程序模块示意图,本发明实施例中,上述应用程序的降帧装置包括:In order to solve the above technical problems, the embodiment of the present invention also proposes an application program frame reduction device, please refer to Fig. 6, Fig. 6 is a schematic diagram of the program modules of the application program frame reduction device in the third embodiment of the present invention, the present invention In an embodiment, the frame reduction device of the above-mentioned application program includes:
获取模块601,用于当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;An acquisition module 601, configured to acquire frame values of the target application at each moment within a preset time period when it is detected that the target application is running in the foreground, to obtain a set of frame values;
本发明实施例中,预先确定需要进行降帧处理的目标应用程序,例如游戏应用、视频播放应用等,当检测到目标应用程序在移动终端的前台运行时,获取模块601便获取该目标应用程序在预设时间段内各个时刻的帧数值,得到帧数值集合。In the embodiment of the present invention, the target application program that needs to be processed by frame reduction is predetermined, such as game application, video playback application, etc., when it is detected that the target application program is running in the foreground of the mobile terminal, the acquisition module 601 acquires the target application program The frame values at each moment in the preset time period to obtain a set of frame values.
其中,上述预设时间段的时长可由技术人员通过大量实验获得,也可以由移动终端用户自行设置。例如,假设上述预设时间段为3分钟,则当检测到上述目标应用程序在前台运行时,获取该目标应用程序在之后的3分钟内各时刻的帧数值,得到帧数值集合。Wherein, the length of the above-mentioned preset time period can be obtained by technicians through a large number of experiments, and can also be set by mobile terminal users themselves. For example, assuming that the above-mentioned preset time period is 3 minutes, when it is detected that the above-mentioned target application program is running in the foreground, the frame value of the target application program at each moment in the next 3 minutes is obtained to obtain a frame value set.
其中,可以理解的是,上述各个时刻的帧数值可以表示为上述目标应用程序每秒刷新或显示的帧数,例如当某一时刻的帧数值为30时,表示在该时刻刷新或显示的帧数为30帧。其中,上述预设时间段的时长与上述帧数值集合中的帧数值的个数为正比,例如,当所述预设时长为3分钟时,则上述帧数值集合中的帧数值总个数为180个。Wherein, it can be understood that the above-mentioned frame values at each moment can be expressed as the number of frames refreshed or displayed by the above-mentioned target application program per second, for example, when the frame value at a certain moment is 30, it means the frame refreshed or displayed at that moment The number is 30 frames. Wherein, the duration of the above-mentioned preset time period is proportional to the number of frame values in the above-mentioned frame value set, for example, when the preset time length is 3 minutes, then the total number of frame values in the above-mentioned frame value set is 180.
确定模块602,用于根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;A determining module 602, configured to determine the size of the reduced frame corresponding to the frame value interval according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be reduced;
本发明实施例中,在得到上述帧数值之后,确定模块602即可根据帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,来确定该帧数值区间对应的降帧大小。In the embodiment of the present invention, after obtaining the above-mentioned frame value, the determining module 602 can determine the frame value corresponding to the frame value range according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be dropped size.
可以理解的是,对于游戏应用来说,帧率为30FPS时基本就可以满足人的视觉要求,若将帧率提升至60FPS,虽然可以明显提升交互感和逼真感,但是却会增加移动终端的负荷;另外,当超过帧率超过60FPS时,一般人就不容易察觉到有明显的流畅度提升了,这样便只会白白浪费移动终端电池的电能。因此,本发明实施例可以在目标应用程序待刷新的帧数值大于预设的降帧阈值(如40)时,才对该目标应用程序进行降帧处理。It is understandable that for game applications, a frame rate of 30FPS can basically meet human visual requirements. If the frame rate is raised to 60FPS, although the sense of interaction and realism can be significantly improved, it will increase the In addition, when the frame rate exceeds 60FPS, it is difficult for ordinary people to notice a significant improvement in fluency, which will only waste the battery power of the mobile terminal. Therefore, in the embodiment of the present invention, when the number of frames to be refreshed by the target application program is greater than a preset frame reduction threshold (for example, 40), the frame reduction process is performed on the target application program.
其中,可以预先设置若干个需要进行降帧的帧数值区间,例如:[30,39]、[40,49]、[50,59]、[60,+∞]等,然后基于上述帧数值集合中各个帧数值的大小,确定各个帧数值在上述各个帧数值区间内的分布情况,根据该分布情况即可确定各个帧数值区间对应的降帧大小。Among them, you can pre-set several frame value intervals that need to be lowered, such as: [30,39], [40,49], [50,59], [60,+∞], etc., and then based on the above frame value set The size of each frame value in the frame determines the distribution of each frame value in the above-mentioned frame value range, and the frame drop size corresponding to each frame value range can be determined according to the distribution.
处理模块603,用于根据所述帧数值区间对应的降帧大小,对所述目标应用程序中属于所述帧数值区间内的待刷新的帧数值进行降帧处理。The processing module 603 is configured to perform frame reduction processing on the frame values to be refreshed within the frame value range in the target application program according to the frame drop size corresponding to the frame value range.
本发明实施例中,在确定各个帧数值区间对应的降帧大小之后,即可根据各个帧数值区间对应的降帧大小,对目标应用程序中属于上述任意一个帧数值区间内的待刷新的帧数值进行降帧处理。例如,假设帧数值区间[30,39]与[40,49]对应的降帧大小分别为3帧和5帧,则当目标应用程序待刷新的帧数值处于帧数值区间[30,39]内时,则将目标应用程序待刷新的帧数减少3帧;当目标应用程序待刷新的帧数值处于帧数值区间[40,49]内时,则将目标应用程序待刷新的帧数减少5帧。In the embodiment of the present invention, after determining the down frame size corresponding to each frame value range, the frames to be refreshed belonging to any one of the above frame value ranges in the target application program can be processed according to the frame down size corresponding to each frame value range The value is down-framed. For example, assuming that the frame value ranges [30,39] and [40,49] correspond to frame drop sizes of 3 frames and 5 frames respectively, then when the frame value to be refreshed by the target application is within the frame value range [30,39] , then reduce the number of frames to be refreshed by the target application by 3 frames; when the number of frames to be refreshed by the target application is in the frame value range [40,49], reduce the number of frames to be refreshed by the target application by 5 frames .
本发明实施例所提供的应用程序的降帧装置,相较于现有技术而言,可以预先确定待降帧的帧数值区间,然后根据目标应用程序在预设时间段内各个时刻的帧数值大小,确定上述帧数值区间对应的降帧大小,然后对目标应用程序中属于上述帧数值区间内的待刷新的帧数值进行降帧处理,即本发明实施例只有在目标应用程序待刷新的帧数值属于预设的帧数值区间内时,才会对目标应用程序进行降帧处理,从而可以在保证用户显示界面不出现卡顿的前提下,选择性的对目标应用程序进行降帧处理,以此来延长移动终端的使用时长。Compared with the prior art, the application frame reduction device provided by the embodiment of the present invention can predetermine the frame value range to be reduced, and then according to the frame value of the target application program at each moment within the preset time period Size, determine the frame drop size corresponding to the above frame value interval, and then perform frame drop processing on the frame values to be refreshed that belong to the above frame value range in the target application program, that is, in the embodiment of the present invention, only the frames to be refreshed in the target application program When the value falls within the preset frame value range, the target application program will be subjected to frame reduction processing, so that the target application program can be selectively reduced frame processing on the premise of ensuring that the user display interface does not appear stuck, so as to This prolongs the usage time of the mobile terminal.
进一步地,基于本发明第三实施例,参照图7,图7为本发明第三实施例中确定模块602的细化程序模块示意图,本发明实施例中,上述确定模块602包括:Further, based on the third embodiment of the present invention, refer to FIG. 7, which is a schematic diagram of a detailed program module of the determining module 602 in the third embodiment of the present invention. In the embodiment of the present invention, the above-mentioned determining module 602 includes:
第一确定模块701,用于按照所述帧数值集合中各个帧数值的大小,确定属于所述帧数值区间的帧数值的个数占所述帧数值集合总个数的比值,并作为所述帧数值区间的目标比值;The first determining module 701 is configured to determine the ratio of the number of frame values belonging to the frame value range to the total number of frame value sets according to the size of each frame value in the frame value set, and use it as the The target ratio of the frame value interval;
本发明实施例中,第一确定模块701可以按照上述帧数值集合中各个帧数值的大小,确定各个帧数值区间内包含的上述帧数值集合中的帧数值的个数,然后再确定各个帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值,并将确定的各个比值作为上述各个帧数值区间对应的目标比值。In the embodiment of the present invention, the first determination module 701 can determine the number of frame values in the above-mentioned frame value set contained in each frame value interval according to the size of each frame value in the above-mentioned frame value set, and then determine each frame value The ratio of the number of frame values in the interval to the total number of the above-mentioned frame value sets, and each determined ratio is used as the target ratio corresponding to each of the above-mentioned frame value intervals.
例如,假设上述帧数值集合中总共包括180个帧数值,帧数值区间[30,39]内包含的帧数值的个数为90个、帧数值区间[40,49]内包含的帧数值的个数为18个,则帧数值区间[30,39]对应的目标比值为0.5、帧数值区间[40,49]对应的目标比值为0.1。For example, assuming that the above frame value set includes a total of 180 frame values, the number of frame values contained in the frame value range [30,39] is 90, and the number of frame values contained in the frame value range [40,49] If the number is 18, the target ratio corresponding to the frame value interval [30,39] is 0.5, and the target ratio corresponding to the frame value interval [40,49] is 0.1.
第二确定模块702,用于根据所述帧数值区间的目标比值,确定所述帧数值区间对应的降帧大小。The second determination module 702 is configured to determine a frame drop size corresponding to the frame value interval according to the target ratio of the frame value interval.
本发明实施例中,可以预先设置上述帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值与降帧大小之间的对应关系。In the embodiment of the present invention, the corresponding relationship between the ratio of the number of frame values in the frame value range to the total number of the frame value sets and the size of the dropped frame may be preset.
可以理解的是,当目标应用程序在预设时间段内各个时刻的帧数值绝大多数都集中在某个帧数值区间内时,若对处于该帧数值区间内的待刷新的帧数值进行较大幅度的降帧处理,则会明显的改变用户的视觉体验;而当目标应用程序在预设时间段内各个时刻的帧数值只有极少部分属于该帧数值区间时,若对处于该帧数值区间内的待刷新的帧数值进行较大幅度的降帧处理,则不容易引起用户的注意。因此,上述帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值与降帧大小之间可以为反比例关系,即帧数值区间内的帧数值的个数占上述帧数值集合总个数的比值越大,则该帧数值区间对应的降帧大小越小。It is understandable that when most of the frame values of the target application at each moment within the preset time period are concentrated in a certain frame value range, if the frame values to be refreshed within the frame value range are compared Substantial frame reduction processing will obviously change the user's visual experience; and when only a small part of the frame value of the target application at each moment within the preset time period belongs to the frame value range, if the target application is in the frame value range If the frame values to be refreshed in the interval are subjected to relatively large frame reduction processing, it is not easy to attract the user's attention. Therefore, the ratio of the number of frame values in the frame value interval to the total number of the frame value set and the frame drop size can be inversely proportional, that is, the number of frame values in the frame value interval accounts for the above frame value set The larger the ratio of the total number, the smaller the down frame size corresponding to the frame value range.
具体的,上述第二确定模块702用于:Specifically, the above-mentioned second determination module 702 is used for:
查找预置的所述帧数值区间内的帧数值的个数占所述帧数值集合总个数的比值与降帧大小之间的对应关系,确定与所述目标比值对应的降帧大小,并作为所述帧数值区间对应的降帧大小。Finding the correspondence between the ratio of the number of frame values in the preset frame value range to the total number of frame value sets and the frame drop size, determining the frame drop size corresponding to the target ratio, and It is used as the down frame size corresponding to the frame value range.
本发明实施例中,在确定上述帧数值区间的目标比值之后,即可查找预置的上述帧数值区间内的帧数值的个数占所述帧数值集合总个数的比值与降帧大小之间的对应关系,然后确定与上述帧数值区间的目标比值所对应的降帧大小,并作为上述帧数值区间的降帧大小。In the embodiment of the present invention, after determining the target ratio of the above-mentioned frame value range, the ratio of the number of frame values in the preset frame value range to the total number of frame value sets and the size of the frame drop can be searched. The corresponding relationship between them, and then determine the frame drop size corresponding to the target ratio of the above-mentioned frame value interval, and use it as the frame drop size of the above-mentioned frame value interval.
本发明实施例所提供的应用程序的降帧装置,可以按照上述帧数值集合中各个帧数值的大小,确定属于上述帧数值区间的帧数值的个数占上述帧数值集合总个数的比值,并作为上述帧数值区间的目标比值,然后根据上述帧数值区间的目标比值,确定上述帧数值区间对应的降帧大小,即本发明实施例可以根据目标应用程序在预设时间段内各个时刻的帧数值的分布情况,来确定各个帧数值区间对应的降帧大小,从而可以在保证用户显示界面不出现卡顿的前提下,对目标应用程序进行差异化的降帧处理,以此来延长移动终端的使用时长。The frame reduction device of the application program provided by the embodiment of the present invention can determine the ratio of the number of frame values belonging to the above-mentioned frame value range to the total number of the above-mentioned frame value sets according to the size of each frame value in the above-mentioned frame value set, And as the target ratio of the above-mentioned frame value interval, and then according to the target ratio of the above-mentioned frame value interval, determine the size of the frame drop corresponding to the above-mentioned frame value interval, that is, the embodiment of the present invention can be based on the target application at each moment in the preset time period. The distribution of frame values is used to determine the frame drop size corresponding to each frame value range, so that the target application can be differentially dropped frame processing on the premise of ensuring that the user display interface does not appear stuck, so as to extend the mobile The duration of use of the terminal.
进一步地,基于本发明第三实施例,参照图8,图8为本发明第四实施例中应用程序的降帧装置的程序模块示意图,本发明实施例中,上述应用程序的降帧装置包括:Further, based on the third embodiment of the present invention, refer to FIG. 8 . FIG. 8 is a schematic diagram of the program modules of the application program frame reduction device in the fourth embodiment of the present invention. In the embodiment of the present invention, the above application program frame reduction device includes :
获取模块601,用于当检测到目标应用程序在前台运行时,获取所述目标应用程序在预设时间段内各时刻的帧数值,得到帧数值集合;An acquisition module 601, configured to acquire frame values of the target application at each moment within a preset time period when it is detected that the target application is running in the foreground, to obtain a set of frame values;
确定模块602,用于根据所述帧数值集合中各个帧数值的大小及预置的待降帧的帧数值区间,确定所述帧数值区间对应的降帧大小;A determining module 602, configured to determine the size of the reduced frame corresponding to the frame value interval according to the size of each frame value in the frame value set and the preset frame value interval of the frame to be reduced;
判断模块801,用于确定所述目标应用程序待刷新的帧数值,并判断所述待刷新的帧数值是否属于所述帧数值区间;A judging module 801, configured to determine the frame value to be refreshed by the target application program, and judge whether the frame value to be refreshed belongs to the frame value range;
降帧模块802,用于若所述待刷新的帧数值属于所述帧数值区间内,则根据所述帧数值区间对应的降帧大小,对所述待刷新的帧数值进行降帧处理。The frame down module 802 is configured to perform frame down processing on the frame value to be refreshed according to the frame down size corresponding to the frame value range if the frame value to be refreshed belongs to the frame value range.
本发明实施例中,当确定各个帧数值对应的降帧大小之后,确定目标应用程序待刷新的帧数值,然后判断待刷新的帧数值是否处于上述帧数值区间内,若处于,则基于待刷新的帧数值所处于的帧数值区间对应的降帧大小,对待刷新的帧数值进行降帧处理。In the embodiment of the present invention, after determining the down frame size corresponding to each frame value, determine the frame value to be refreshed by the target application program, and then determine whether the frame value to be refreshed is within the above-mentioned frame value range, and if so, based on the frame value to be refreshed The frame value corresponding to the frame value interval of the value of the frame is dropped, and the frame value to be refreshed is subjected to frame drop processing.
具体的,参照图9,图9为本发明第四实施例中降帧模块802的细化程序模块示意图,本发明实施例中,上述降帧模块802包括:Specifically, referring to FIG. 9, FIG. 9 is a schematic diagram of a detailed program module of the frame reduction module 802 in the fourth embodiment of the present invention. In the embodiment of the present invention, the above frame reduction module 802 includes:
第三确定模块901,用于利用所述待刷新的帧数值以及所述帧数值区间对应的降帧大小,确定丢帧间隔;The third determination module 901 is configured to determine the frame loss interval by using the frame value to be refreshed and the frame drop size corresponding to the frame value range;
本发明实施例中,可以根据待刷新的帧数值与上述帧数值区间对应的降帧大小的比值来确定上述丢帧间隔,例如,假设上述待刷新的帧数值为50、上述帧数值区间对应的降帧大小为5帧,则上述丢帧间隔为9帧;假设上述待刷新的帧数值为50、上述帧数值区间对应的降帧大小为6帧,则上述丢帧间隔为8帧。In the embodiment of the present invention, the above-mentioned frame loss interval can be determined according to the ratio of the frame value to be refreshed to the frame drop size corresponding to the above-mentioned frame value range, for example, assuming that the above-mentioned frame value to be refreshed is 50, and If the frame drop size is 5 frames, the frame drop interval is 9 frames; assuming that the number of frames to be refreshed is 50 and the frame drop size corresponding to the frame value range is 6 frames, the frame drop interval is 8 frames.
丢帧模块902,用于按照所述丢帧间隔对所述目标应用程序待刷新的多帧图像进行丢帧处理,得到用于刷新的帧图像;A frame dropping module 902, configured to perform frame dropping processing on multiple frames of images to be refreshed by the target application program according to the frame dropping interval, to obtain frame images for refreshing;
本发明实施例中,当上述丢帧间隔为9帧时,则表示上述应用程序每刷新9帧图像之后便需要丢弃一帧图像,例如,假设待刷新的帧数值为50、丢帧间隔为9帧,则将待刷新的第10帧、第20帧、第30帧、第40帧、第50帧图像确定为需要丢弃的帧图像,将除需要丢弃的帧图像之外的其他帧图像确定为用于刷新的帧图像。In the embodiment of the present invention, when the above-mentioned frame dropping interval is 9 frames, it means that the above-mentioned application program needs to discard one frame of image after refreshing 9 frames of images. For example, assuming that the number of frames to be refreshed is 50, and the frame dropping interval is 9 frame, the 10th frame, the 20th frame, the 30th frame, the 40th frame, and the 50th frame image to be refreshed are determined as the frame image to be discarded, and the other frame images except the frame image to be discarded are determined as Frame image for refresh.
刷新模块903,利用所述用于刷新的帧图像在显示界面上进行刷新。The refreshing module 903 is used to refresh the display interface by using the frame image used for refreshing.
本发明实施例中,在确定用于刷新的帧图像之后,则将用于刷新的帧图像在显示界面进行刷新。In the embodiment of the present invention, after the frame image used for refreshing is determined, the frame image used for refreshing is refreshed on the display interface.
本发明实施例所提供的应用程序的降帧装置,在确定帧数值区间对应的降帧大小之后,确定目标应用程序待刷新的帧数值,然后判断待刷新的帧数值是否属于上述帧数值区间内,若属于,则根据上述帧数值区间对应的降帧大小,对待刷新的帧数值进行降帧处理。即本发明实施例能够根据目标应用程序待刷新的帧数值的大小,来确定是否需要对目标应用程序待刷新的帧数值进行降帧处理,若确定需要进行降帧处理,则按照待刷新的帧数值的大小来确定需要降低的帧数,进而进行降帧处理,避免了由于降帧处理而使目标应用程序出现卡顿的情况。The application frame reduction device provided by the embodiment of the present invention, after determining the frame reduction size corresponding to the frame value range, determines the frame value of the target application program to be refreshed, and then judges whether the frame value to be refreshed belongs to the above frame value range , if it belongs to, the frame value to be refreshed is subjected to frame reduction processing according to the frame reduction size corresponding to the above frame value range. That is, the embodiment of the present invention can determine whether to perform frame reduction processing on the frame value to be refreshed by the target application program according to the size of the frame value to be refreshed by the target application program. The size of the numerical value is used to determine the number of frames that need to be reduced, and then the frame reduction process is performed to avoid the situation that the target application program is stuck due to the frame reduction process.
本发明实施例还提供一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时,实现第一实施例至第二实施例中任意一个实施例中的应用程序的降帧方法中的各个步骤。An embodiment of the present invention also provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, the first embodiment to the second embodiment are implemented. The various steps in the frame reduction method of the application program in any embodiment.
本发明实施例还提供一种可读存储介质,该可读存储介质为计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时,实现第一实施例至第二实施例中任意一个实施例中的应用程序的降帧方法中的各个步骤。An embodiment of the present invention also provides a readable storage medium, which is a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the first embodiment to the second embodiment are realized. Each step in the frame reduction method of the application program in any one of the embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media that can store program codes.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
以上为对本发明所提供的一种应用程序的降帧方法、装置、移动终端及可读存储介质的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。The above is a description of an application frame reduction method, device, mobile terminal and readable storage medium provided by the present invention. For those skilled in the art, according to the idea of the embodiment of the present invention, in the specific implementation and application scope There will be changes in all the above. In summary, the content of this specification should not be construed as limiting the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711158177.4ACN107959965B (en) | 2017-11-20 | 2017-11-20 | Frame reduction method, device, mobile terminal and readable storage medium for application program |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711158177.4ACN107959965B (en) | 2017-11-20 | 2017-11-20 | Frame reduction method, device, mobile terminal and readable storage medium for application program |
| Publication Number | Publication Date |
|---|---|
| CN107959965Atrue CN107959965A (en) | 2018-04-24 |
| CN107959965B CN107959965B (en) | 2021-03-19 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711158177.4AActiveCN107959965B (en) | 2017-11-20 | 2017-11-20 | Frame reduction method, device, mobile terminal and readable storage medium for application program |
| Country | Link |
|---|---|
| CN (1) | CN107959965B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108810281A (en)* | 2018-06-22 | 2018-11-13 | Oppo广东移动通信有限公司 | Lost frame compensation method, lost frame compensation device, storage medium and terminal |
| CN109669528A (en)* | 2018-12-20 | 2019-04-23 | Oppo广东移动通信有限公司 | Processing component control method, device, computer equipment and the storage medium of terminal |
| CN113377485A (en)* | 2021-07-07 | 2021-09-10 | 掌阅科技股份有限公司 | Refreshing display method of ink screen device, electronic device and storage medium |
| CN113721755A (en)* | 2021-09-13 | 2021-11-30 | 三星电子(中国)研发中心 | Screen power saving method and device |
| CN115359763A (en)* | 2022-08-16 | 2022-11-18 | 广州文石信息科技有限公司 | Ink screen display control method, device, equipment and storage medium |
| WO2023011032A1 (en)* | 2021-08-05 | 2023-02-09 | 哲库科技(上海)有限公司 | Image processing method, image processing chip, and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110249077A1 (en)* | 2010-04-07 | 2011-10-13 | Abuan Joe S | Video Conference Network Management for a Mobile Device |
| CN104580969A (en)* | 2013-10-23 | 2015-04-29 | 中兴通讯股份有限公司 | Video frame rate adjusting method and device |
| CN104754200A (en)* | 2013-12-31 | 2015-07-01 | 联芯科技有限公司 | Method and system for adjusting automatic exposure |
| US20150310655A1 (en)* | 2014-02-18 | 2015-10-29 | Charles Hill | Techniques for displaying content on a display to reduce screenshot quality |
| CN105117191A (en)* | 2015-09-08 | 2015-12-02 | 广东欧珀移动通信有限公司 | Display control method and device for a mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110249077A1 (en)* | 2010-04-07 | 2011-10-13 | Abuan Joe S | Video Conference Network Management for a Mobile Device |
| CN104580969A (en)* | 2013-10-23 | 2015-04-29 | 中兴通讯股份有限公司 | Video frame rate adjusting method and device |
| CN104754200A (en)* | 2013-12-31 | 2015-07-01 | 联芯科技有限公司 | Method and system for adjusting automatic exposure |
| US20150310655A1 (en)* | 2014-02-18 | 2015-10-29 | Charles Hill | Techniques for displaying content on a display to reduce screenshot quality |
| CN105117191A (en)* | 2015-09-08 | 2015-12-02 | 广东欧珀移动通信有限公司 | Display control method and device for a mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108810281A (en)* | 2018-06-22 | 2018-11-13 | Oppo广东移动通信有限公司 | Lost frame compensation method, lost frame compensation device, storage medium and terminal |
| CN108810281B (en)* | 2018-06-22 | 2020-12-11 | Oppo广东移动通信有限公司 | Lost frame compensation method, device, storage medium and terminal |
| CN109669528A (en)* | 2018-12-20 | 2019-04-23 | Oppo广东移动通信有限公司 | Processing component control method, device, computer equipment and the storage medium of terminal |
| CN109669528B (en)* | 2018-12-20 | 2021-06-04 | Oppo广东移动通信有限公司 | Terminal processing component control method and device, computer equipment and storage medium |
| CN113377485A (en)* | 2021-07-07 | 2021-09-10 | 掌阅科技股份有限公司 | Refreshing display method of ink screen device, electronic device and storage medium |
| WO2023279571A1 (en)* | 2021-07-07 | 2023-01-12 | 掌阅科技股份有限公司 | Method for refreshing display of ink screen device, electronic device, and storage medium |
| WO2023011032A1 (en)* | 2021-08-05 | 2023-02-09 | 哲库科技(上海)有限公司 | Image processing method, image processing chip, and electronic device |
| CN115706768A (en)* | 2021-08-05 | 2023-02-17 | 哲库科技(上海)有限公司 | Image processing method, image processing chip and electronic equipment |
| CN113721755A (en)* | 2021-09-13 | 2021-11-30 | 三星电子(中国)研发中心 | Screen power saving method and device |
| CN113721755B (en)* | 2021-09-13 | 2023-11-21 | 三星电子(中国)研发中心 | Screen power saving method and device |
| CN115359763A (en)* | 2022-08-16 | 2022-11-18 | 广州文石信息科技有限公司 | Ink screen display control method, device, equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN107959965B (en) | 2021-03-19 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107959965A (en) | Frame dropping method, device, mobile terminal and the readable storage medium storing program for executing of application program | |
| CN105718875B (en) | A kind of visual fatigue detection method and user terminal | |
| CN104731543B (en) | The display methods and device of a kind of screen refresh rate | |
| CN111816139B (en) | Screen refresh rate switching method and electronic equipment | |
| AU2018287392B2 (en) | Method for recommending lock-screen wallpaper and related products | |
| US20220382448A1 (en) | Machine Translation Method and Electronic Device | |
| US10037070B2 (en) | Image display method and display system | |
| CN106941625A (en) | A playback control method and device for a mobile terminal, and a mobile terminal | |
| CN104091579A (en) | Method for adjusting screen refreshing rate and terminal | |
| CN104407799B (en) | A method and system for avoiding touch screen misoperation during video playback | |
| CN105117191A (en) | Display control method and device for a mobile terminal | |
| CN110727561A (en) | Detection method, device, terminal and storage medium for abnormal heat dissipation | |
| CN108965981A (en) | Video playing method and device, storage medium and electronic equipment | |
| CN106941621B (en) | Mobile terminal control method and device and mobile terminal | |
| CN107479987A (en) | Eye protection method and device for mobile terminal, mobile terminal and storage medium | |
| CN112035877A (en) | Information hiding method, device, electronic device and readable storage medium | |
| CN112150444A (en) | Recognition method, device and electronic device for attribute feature of face image | |
| CN114077465A (en) | UI interface rendering method, device, electronic device and storage medium | |
| CN114242023A (en) | Display brightness adjustment method, display brightness adjustment device and electronic equipment | |
| CN108966005A (en) | A kind of adjusting method of video resolution, device, storage medium and terminal | |
| CN113806000A (en) | Display method and device and electronic equipment | |
| CN112806070B (en) | Network power consumption adjusting method, network power consumption adjusting device and mobile terminal | |
| CN106095649A (en) | Icon display method, device and mobile terminal | |
| CN116560837A (en) | Cache resource adjustment method and device, electronic equipment and readable storage medium | |
| CN111814840A (en) | Method, system, equipment and medium for evaluating quality of face image |
| 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 |