WO2018176245A1 - 一种应用程序的控制方法和终端 - Google Patents

一种应用程序的控制方法和终端 Download PDF

Info

Publication number
WO2018176245A1
WO2018176245A1 PCT/CN2017/078504 CN2017078504W WO2018176245A1 WO 2018176245 A1 WO2018176245 A1 WO 2018176245A1 CN 2017078504 W CN2017078504 W CN 2017078504W WO 2018176245 A1 WO2018176245 A1 WO 2018176245A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
running
foreground
background
terminal
Prior art date
Application number
PCT/CN2017/078504
Other languages
English (en)
French (fr)
Inventor
李卓希
Original Assignee
深圳市卓希科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市卓希科技有限公司 filed Critical 深圳市卓希科技有限公司
Priority to PCT/CN2017/078504 priority Critical patent/WO2018176245A1/zh
Publication of WO2018176245A1 publication Critical patent/WO2018176245A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and a terminal for controlling an application.
  • the current mobile terminal generally supports multi-tasking, and can run one or more applications in the background, so that restarting the application running in the background will reduce the loading time, but the number of applications running in the background will increase the CPU of the terminal.
  • Resources or memory resources which can cause the running of applications running in the foreground to be fluent, so there is a need for a way to improve the smooth running of the application.
  • a technical problem to be solved by the embodiments of the present invention is to provide a method and a terminal for controlling an application. It can selectively close applications running in the background to increase the hardware resources available to applications running in the foreground and improve the smooth operation of applications running in the foreground.
  • an embodiment of the present invention provides a method for controlling an application, including:
  • the terminal monitors the running time of the application running in the foreground, and the foreground operation indicates that the application interface is displayed on the display screen.
  • the monitoring method can be used: when the terminal detects that an application switches to the foreground, the timer is started, and the timer is used to monitor The runtime of the application.
  • the preset duration of the preset is set in the non-volatile memory of the terminal, and the preset duration can be set as needed.
  • the terminal determines whether the running time of the application running in the foreground is greater than the preset duration, and if the result is determined. As a result, it indicates that the application will remain in the foreground for a long time, and it is necessary to ensure the smoothness of the application running in the foreground.
  • the terminal determines at least one application currently running in the background, and selects a target application from at least one application running in the background according to a preset selection rule, where the selection rule includes but is not limited to CPU usage, memory usage, and usage frequency, and the target
  • the number of applications may be one or more, and is not limited in this embodiment.
  • the target application is all running applications in the background.
  • the terminal closes the process of the target application, which can increase the hardware resources available to the application running in the foreground; the terminal receives the exit instruction for the application running in the foreground, and the exit instruction is used to close the application running in the foreground, or run the foreground Application switching
  • Running in the background for example, the terminal detects a click gesture on the return key, and switches the application running in the foreground to the background; the terminal detects the click gesture on the close button in the interface of the application, and runs the application in the foreground. shut down.
  • the terminal selectively closes the application running in the background to increase the available hardware resources of the application running in the foreground, and improve the operational fluency of the application running in the foreground.
  • the terminal pre-stores a state table indicating an running state of the application, where the state table stores the status flag of the application, for example, 1 indicates foreground operation, 0 indicates background operation, and the terminal may Querying at least one application running in the background according to the state table, obtaining the memory usage of each application in at least one application, the application with the largest memory usage being the most targeted application, and the terminal closing the process of the target application.
  • the terminal closes the application with the largest memory usage in at least one application running in the background, provides more available memory space for the application running in the foreground, and improves the fluency of the application running in the foreground.
  • the terminal pre-stores a state table indicating an running state of the application, where the state table stores the status flag of the application, for example, 1 indicates foreground operation, 0 indicates background operation, and the terminal may Querying at least one application running in the background according to the state table, obtaining the CPU usage of each application in at least one application, the application with the largest CPU usage being the most targeted application, and the terminal closing the process of the target application.
  • the terminal closes the application with the largest CPU usage in at least one application running in the background, provides more available CPU resources for the application running in the foreground, and improves the fluency of the application running in the foreground.
  • the terminal pre-stores a state table indicating an running state of the application, where the state table stores the status flag of the application, for example, 1 indicates foreground operation, 0 indicates background operation, and the terminal may Querying at least one application running in the background according to the state table, obtaining the frequency of use of each application in at least one application, and the frequency of use indicates the number of times the application switches to the foreground within a preset duration, for example, the frequency of application usage Indicates the number of times the application is switched to the foreground within 1 day. Each time the application switches to the foreground, the frequency of use is increased by one; the application that uses the least frequently is the most targeted application, and the terminal closes the process of the target application.
  • the terminal closes the application with the largest occupancy rate in at least one application running in the background, closes the infrequently used background application, provides more available hardware resources for the application running in the foreground, and improves the application running in the foreground.
  • the fluency
  • the process of shutting down the target application further includes: Holding the running status information and running data of the target application, the running status information indicates the specified status during the running process, for example, for the e-book application, the running status information includes the last reading position, and the running data includes reading marks, bookmarks or comments; For the video application, the running status information indicates the last playing position, and the running data includes comments, volume, interface theme information, etc., and the next time the target application is started, the operating state information and the running data can be restored to the state before the closing. .
  • the method further includes: the program running in the foreground is a video application or a game application.
  • the second aspect further provides a terminal, including: a monitoring module, a selection module, a shutdown module, and a startup module.
  • a monitoring module for monitoring the running time of an application running in the foreground
  • a selection module configured to: when the running time is greater than a preset duration, select a target application from at least one application running in the background according to a preset selection rule;
  • a startup module configured to start the process of the target application in the background when receiving an exit instruction for the application running in the foreground.
  • the selecting module is configured to:
  • the selecting module is configured to:
  • the shutdown module is further configured to:
  • the running status information and running data of the target application are saved.
  • the method further includes:
  • the program running in the foreground is a video application or a game application.
  • FIG. 1 is a schematic flow chart of a control method of an application program according to the present invention.
  • FIG. 2 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 3 is another schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a method for controlling an application program according to an embodiment of the present invention.
  • the method includes:
  • the terminal monitors the running time of the application running in the foreground, and the foreground operation indicates that the application interface is displayed on the display screen.
  • the monitoring method is applicable: when the terminal detects that an application switches to the foreground, the timer is started, and the timer is started. To monitor the running time of the application.
  • the preset duration of the preset is set in the non-volatile memory of the terminal, and the preset duration can be set according to the requirement.
  • the terminal determines whether the running time of the application running in the foreground is greater than the preset duration. If the judgment result is yes, it indicates that the application will remain in the foreground for a long time, and it is necessary to ensure the smoothness of the application running in the foreground.
  • the terminal determines at least one application currently running in the background, and selects a target application from at least one application running in the background according to a preset selection rule, where the selection rule includes but is not limited to CPU usage, memory usage, and usage frequency, and the target
  • the number of applications may be one or more, and is not limited in this embodiment. For example: the target application is all running applications in the background.
  • the terminal closes the process of the target application, which can increase the application running in the foreground. Available hardware resources.
  • the terminal receives an exit instruction for the application running in the foreground, and the exit instruction is used to close the application running in the foreground, or switch the application running in the foreground to run in the background, for example, the terminal detects the click on the return key. Gesture, switch the application running in the foreground to run in the background; the terminal detects the click gesture on the close button in the interface of the application, and closes the application running in the foreground.
  • the terminal selectively closes the application running in the background to increase the available hardware resources of the application running in the foreground, and improve the operational fluency of the application running in the foreground.
  • the selecting the target application from the at least one application running in the background according to the preset selection rule comprises:
  • the terminal pre-stores a state table indicating an running state of the application, and the state table stores a status flag of the application, for example, 1 indicates foreground running, 0 indicates background running, and the terminal may query at least one running in the background according to the state table.
  • the application obtains the memory usage of each application in at least one application, the application with the largest memory usage is the most targeted application, and the terminal closes the process of the target application.
  • the terminal closes the application with the largest memory usage in at least one application running in the background, provides more available memory space for the application running in the foreground, and improves the fluency of the application running in the foreground.
  • the selecting the target application from the at least one application running in the background according to the preset selection rule comprises:
  • the terminal pre-stores a state table indicating an running state of the application, and the state table stores a status flag of the application, for example, 1 indicates foreground operation, 0 indicates background operation, and the terminal root Querying at least one application running in the background according to the state table, obtaining the frequency of use of each application in at least one application, and the frequency of use indicates the number of times of switching to the foreground within the preset duration of the application, for example, the frequency of application application Indicates the number of times the application is switched to the foreground within 1 day.
  • the frequency of use is increased by one; the application that uses the least frequently is the most targeted application, and the terminal closes the process of the target application.
  • the terminal closes the application with the largest occupancy rate in at least one application running in the background, closes the infrequently used background application, provides more available hardware resources for the application running in the foreground, and improves the application running in the foreground.
  • the fluency
  • the process of closing the target application further includes:
  • the running status information and running data of the target application are saved.
  • the process of closing the target application further includes: maintaining running state information and running data of the target application, and the running state information indicates a specified state during the running process, for example, for the e-book application, the running state information includes the last reading. Location, the running data includes reading marks, bookmarks or comments; for the video application, the running status information indicates the last playing position, the running data includes comments, volume, interface theme information, etc., and the next time the target application is launched, it can be maintained according to The running status information and the running data are restored to the state before the shutdown.
  • it also includes:
  • the program running in the foreground is a video application or a game application.
  • FIG. 2 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal in the embodiment of the present invention is used to execute the control method of an application in FIG. 1 , and the terminology and process involved may be implemented by referring to FIG. 1 .
  • the terminal 2 includes a monitoring module 201, a selection module 202, a shutdown module 203, and a startup module 204.
  • a monitoring module for monitoring the running time of an application running in the foreground
  • a selection module configured to: when the running time is greater than a preset duration, select a target application from at least one application running in the background according to a preset selection rule;
  • a startup module configured to start the process of the target application in the background when receiving an exit instruction for the application running in the foreground.
  • the selection module is used to:
  • the selection module is used to:
  • the shutdown module is further configured to:
  • the running status information and running data of the target application are saved.
  • the method further includes:
  • the program running in the foreground is a video application or a game application.
  • FIG. 3 is a schematic diagram of another structure of a terminal according to an embodiment of the present invention.
  • the terminal 3 includes a processor 301, a memory 302, and a transceiver 303.
  • the transceiver 303 is configured to transmit and receive data with and from an external device.
  • the number of processors 301 in the terminal 3 may be one or more.
  • processor 301, memory 302, and transceiver 303 may be connected by a bus system or other means.
  • Terminal 3 can be used to perform the method shown in FIG.
  • the program code is stored in the memory 302.
  • the processor 301 is configured to call program code stored in the memory 302 for performing the following operations:
  • the processor 301 executing the selecting the target application from the at least one application running in the background according to the preset selection rule comprises:
  • the processor 301 executing the selecting the target application from the at least one application running in the background according to the preset selection rule comprises:
  • the processor 301 performs the process of shutting down the target application, and further includes:
  • the running status information and running data of the target application are saved.
  • the program running in the foreground is a video application or a game application.
  • the terminal provided by the embodiment of the present invention includes but is not limited to piggybacking Or terminals of other operating systems, such as mobile phones.
  • Other terminals may also be used, such as a laptop or tablet or desktop computer with a touch-sensitive surface (eg, a touch screen display and/or a touch pad).
  • a terminal including a display and a touch-sensitive surface is described. It should be understood, however, that the terminal can include one or more other physical user interface devices, such as a physical keyboard, mouse, and/or joystick.
  • Terminals typically support a variety of applications, such as one or more of the following: a drawing application, a rendering application, a word processing application, a web page creation application, a disk editing application, a spreadsheet application, a gaming application, Telephony applications, video conferencing applications, email applications, instant messaging applications, workout support applications, photo management applications, digital camera applications, digital video camera applications, web browsing applications, digital music player applications Program, and/or digital video player application.
  • applications such as one or more of the following: a drawing application, a rendering application, a word processing application, a web page creation application, a disk editing application, a spreadsheet application, a gaming application, Telephony applications, video conferencing applications, email applications, instant messaging applications, workout support applications, photo management applications, digital camera applications, digital video camera applications, web browsing applications, digital music player applications Program, and/or digital video player application.
  • the various applications that can be executed on the terminal can use at least one shared physical user interface device, such as a touch-sensitive surface.
  • One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal may be adjusted and/or changed from one application to the next and/or adjusted and/or varied within the respective application.
  • the shared physical architecture of the terminal such as a touch-sensitive surface, can be utilized for the user.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种应用程序的控制方法和终端,包括:监测前台运行的应用程序的运行时长(S101);当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序(S102);关闭所述目标应用程序的进程(S103);接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程(S104)。采用该方法,提高前台运行的应用程序的流畅度。

Description

一种应用程序的控制方法和终端 技术领域
本发明涉及计算机领域,尤其涉及一种应用程序的控制方法和终端。
背景技术
目前的移动终端一般支持多任务处理,能在后台运行一个或多个应用程序,这样重新启动后台运行的应用程序会减少加载时间,但是随时后台运行的应用程序的增多,会消耗终端大量的CPU资源或内存资源,这样会导致正在前台运行的应用程序的运行流畅性,因此亟待一种提高应用程序运行流畅性的方法。
发明内容
本发明实施例所要解决的技术问题在于,提供一种应用程序的控制方法和终端。能够对后台运行的应用程序进行选择性的关闭,以增加前台运行的应用程序可用的硬件资源,提高前台运行的应用程序的操作流畅性。
第一方面,本发明实施例提供了一种应用程序的控制方法,包括:
终端监测前台运行的应用程序的运行时长,前台运行表示显示屏上显示应用程序的界面,监测的方法可用是:终端检测到有应用程序切换到前台运行时,启动计时器,通过计时器来监测应用程序的运行时长。终端的非易失性存储器中预先存放设置的预设时长,预设时长可根据需要进行设置,本实施例不作限制,终端判断前台运行的应用程序的运行时长是否大于预设时长,若判断结果为是,表明该应用程序在很长一段时间内会保持在前台运行,此时需要保证该前台运行的应用程序的流畅性。终端确定当前在后台运行的至少一个应用程序,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序,选择规则包括但不限于CPU占用率、内存占用率和使用频率,目标应用程序的数量可以是一个或多个,本实施例不作限制。例如:目标应用程序为所有的后台运行的应用程序。终端关闭目标应用程序的进程,这样可以增加前台运行的应用程序可用的硬件资源;终端接收到针对前台运行的应用程序的退出指令,退出指令用于关闭前台运行的应用程序,或将前台运行的应用程序切换 为后台运行,例如:终端检测到返回键上的单击手势,将前台运行的应用程序切换到后台运行;终端检测到应用程序的界面中关闭按钮上的单击手势,将前台运行的应用程序关闭。上述实施例,终端对后台运行的应用程序进行选择性的关闭,以增加前台运行的应用程序可用的硬件资源,提高前台运行的应用程序的操作流畅性。
在本方面的一种可能的实施方式中,终端预先存储有表示应用程序的运行状态的状态表,状态表中存储应用程序的状态标志位,例如1表示前台运行,0表示后台运行;终端可根据状态表查询后台运行的至少一个应用程序,获取至少一个应用程序中每个应用程序的内存占用率,将内存占用率最大的应用程序最为目标应用程序,终端关闭目标应用程序的进程。上述实施例,终端关闭后台运行的至少一个应用程序中内存占用率最大的应用程序,为前台运行的应用程序提供更对可用的内存空间,提高前台运行的应用程序的流畅度。
在本方面的一种可能的实施方式中,终端预先存储有表示应用程序的运行状态的状态表,状态表中存储应用程序的状态标志位,例如1表示前台运行,0表示后台运行;终端可根据状态表查询后台运行的至少一个应用程序,获取至少一个应用程序中每个应用程序的CPU占用率,将CPU占用率最大的应用程序最为目标应用程序,终端关闭目标应用程序的进程。上述实施例,终端关闭后台运行的至少一个应用程序中CPU占用率最大的应用程序,为前台运行的应用程序提供更对可用的CPU资源,提高前台运行的应用程序的流畅度。
在本方面的一种可能的实施方式中,终端预先存储有表示应用程序的运行状态的状态表,状态表中存储应用程序的状态标志位,例如1表示前台运行,0表示后台运行;终端可根据状态表查询后台运行的至少一个应用程序,获取至少一个应用程序中每个应用程序的使用频率,使用频率表示应用程序的预设时长内的切换到前台的次数,例如:应用程序的使用频率表示1天内应用程序被切换到前台的次数,应用程序每切换到前台一次,使用频率加1;终端将使用频率最小的应用程序最为目标应用程序,终端关闭目标应用程序的进程。上述实施例,终端关闭后台运行的至少一个应用程序中使用占用率最大的应用程序,关闭不常用的后台应用程序,为前台运行的应用程序提供更对可用的硬件资源,提高前台运行的应用程序的流畅度。
在本方面的一种可能的实施方式中,关闭目标应用程序的进程还包括:保 持目标应用程序的运行状态信息和运行数据,运行状态信息表示运行过程中的指定状态,例如:对于电子书应用程序,运行状态信息包括上次阅读位置,运行数据包括阅读标记、书签或评论;对于视频应用程序,运行状态信息表示上次播放位置,运行数据包括评论、音量、界面主题信息等,在下次启动目标应用程序时,可根据保持的运行状态信息和运行数据恢复到关闭前的状态。
在本方面的一种可能的实施方式中,还包括:前台运行的程序为视频应用程序或游戏应用程序。
相应地,第二方面还提供了一种终端,包括:监测模块、选择模块、关闭模块和启动模块。
监测模块,用于监测前台运行的应用程序的运行时长;
选择模块,用于当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序;
关闭模块,用于关闭所述目标应用程序的进程;
启动模块,用于接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
在本方面的一种可能的实施方式中,所述选择模块用于:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
在本方面的一种可能的实施方式中,所述选择模块用于:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
在本方面的一种可能的实施方式中,所述关闭模块还用于:
保存所述目标应用程序的运行状态信息和运行数据。
在本方面的一种可能的实施方式中,还包括:
所述前台运行的程序为视频应用程序或游戏应用程序。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的一种应用程序的控制方法的流程示意图;
图2是本发明实施例提供的一种终端的结构示意图;
图3是本发明实施例提供的一种终端的另一结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,图1是本发明实施例提供的一种应用程序的控制方法的流程示意图,在本发明实施例中,所述方法包括:
S101、监测前台运行的应用程序的运行时长。
具体的,终端监测前台运行的应用程序的运行时长,前台运行表示显示屏上显示应用程序的界面,监测的方法可用是:终端检测到有应用程序切换到前台运行时,启动计时器,通过计时器来监测应用程序的运行时长。
S102、当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序。
具体的,终端的非易失性存储器中预先存放设置的预设时长,预设时长可根据需要进行设置,本实施例不作限制,终端判断前台运行的应用程序的运行时长是否大于预设时长,若判断结果为是,表明该应用程序在很长一段时间内会保持在前台运行,此时需要保证该前台运行的应用程序的流畅性。终端确定当前在后台运行的至少一个应用程序,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序,选择规则包括但不限于CPU占用率、内存占用率和使用频率,目标应用程序的数量可以是一个或多个,本实施例不作限制。例如:目标应用程序为所有的后台运行的应用程序。
S103、关闭所述目标应用程序的进程。
其中,终端关闭目标应用程序的进程,这样可以增加前台运行的应用程序 可用的硬件资源。
S104、接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
具体的,终端接收到针对前台运行的应用程序的退出指令,退出指令用于关闭前台运行的应用程序,或将前台运行的应用程序切换为后台运行,例如:终端检测到返回键上的单击手势,将前台运行的应用程序切换到后台运行;终端检测到应用程序的界面中关闭按钮上的单击手势,将前台运行的应用程序关闭。
实施上述实施例,终端对后台运行的应用程序进行选择性的关闭,以增加前台运行的应用程序可用的硬件资源,提高前台运行的应用程序的操作流畅性。
可选的,所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
具体的,终端预先存储有表示应用程序的运行状态的状态表,状态表中存储应用程序的状态标志位,例如1表示前台运行,0表示后台运行;终端可根据状态表查询后台运行的至少一个应用程序,获取至少一个应用程序中每个应用程序的内存占用率,将内存占用率最大的应用程序最为目标应用程序,终端关闭目标应用程序的进程。上述实施例,终端关闭后台运行的至少一个应用程序中内存占用率最大的应用程序,为前台运行的应用程序提供更对可用的内存空间,提高前台运行的应用程序的流畅度。
可选的,所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
具体的,终端预先存储有表示应用程序的运行状态的状态表,状态表中存储应用程序的状态标志位,例如1表示前台运行,0表示后台运行;终端可根 据状态表查询后台运行的至少一个应用程序,获取至少一个应用程序中每个应用程序的使用频率,使用频率表示应用程序的预设时长内的切换到前台的次数,例如:应用程序的使用频率表示1天内应用程序被切换到前台的次数,应用程序每切换到前台一次,使用频率加1;终端将使用频率最小的应用程序最为目标应用程序,终端关闭目标应用程序的进程。上述实施例,终端关闭后台运行的至少一个应用程序中使用占用率最大的应用程序,关闭不常用的后台应用程序,为前台运行的应用程序提供更对可用的硬件资源,提高前台运行的应用程序的流畅度。
可选的,所述关闭所述目标应用程序的进程,还包括:
保存所述目标应用程序的运行状态信息和运行数据。
具体的,关闭目标应用程序的进程还包括:保持目标应用程序的运行状态信息和运行数据,运行状态信息表示运行过程中的指定状态,例如:对于电子书应用程序,运行状态信息包括上次阅读位置,运行数据包括阅读标记、书签或评论;对于视频应用程序,运行状态信息表示上次播放位置,运行数据包括评论、音量、界面主题信息等,在下次启动目标应用程序时,可根据保持的运行状态信息和运行数据恢复到关闭前的状态。
可选的,还包括:
所述前台运行的程序为视频应用程序或游戏应用程序。
参见图2,为本发明实施例提供的一种终端的结构示意图,本发明实施例的终端用于执行图1中的一种应用程序的控制方法,所涉及的术语和过程可参照图1实施例的描述。终端2包括:监测模块201、选择模块202、关闭模块203和启动模块204。
监测模块,用于监测前台运行的应用程序的运行时长;
选择模块,用于当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序;
关闭模块,用于关闭所述目标应用程序的进程;
启动模块,用于接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
在一种可能的实施方式中,所述选择模块用于:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
在一种可能的实施方式中,所述选择模块用于:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
在一种可能的实施方式中,所述关闭模块还用于:
保存所述目标应用程序的运行状态信息和运行数据。
在本方面的一种可能的实施方式中,还包括:
所述前台运行的程序为视频应用程序或游戏应用程序。
本发明实施例和方法实施例一基于同一构思,其带来的技术效果也相同,具体过程可参照方法实施例一的描述,此处不再赘述。
参见图3,为本发明实施例提供的一种终端的另一结构示意图,在本发明实施例中,终端3包括处理器301、存储器302和收发器303。收发器303用于与外部设备之间收发数据。终端3中的处理器301的数量可以是一个或多个。本发明的一些实施例中,处理器301、存储器302和收发器303可通过总线系统或其他方式连接。终端3可以用于执行图1所示的方法。关于本实施例涉及的术语的含义以及举例,可以参考图1对应的实施例。此处不再赘述。
其中,存储器302中存储程序代码。处理器301用于调用存储器302中存储的程序代码,用于执行以下操作:
监测前台运行的应用程序的运行时长;
当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序;
关闭所述目标应用程序的进程;
接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
在一种可能的实施方式中,处理器301执行所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
在一种可能的实施方式中,处理器301执行所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
确定后台运行的至少一个应用程序;
获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
在一种可能的实施方式中,处理器301执行所述关闭所述目标应用程序的进程,还包括:
保存所述目标应用程序的运行状态信息和运行数据。
在一种可能的实施方式中所述前台运行的程序为视频应用程序或游戏应用程序。
本发明实施例提供的终端包括但不限于搭载
Figure PCTCN2017078504-appb-000001
或者其它操作系统的终端,诸如移动电话。也可以是其它终端,诸如具有触敏表面(例如,触摸屏显示器和/或触控板)的膝上型计算机或平板电脑或台式计算机。
在下面的讨论中,介绍了一种包括显示器和触敏表面的终端。然而应当理解,终端可以包括一个或多个其他物理用户接口设备,诸如物理键盘、鼠标和/或操作杆。
终端通常支持多种应用程序,诸如以下中的一种或多种:画图应用程序、呈现应用程序、文字处理应用程序、网页创建应用程序、盘编辑应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息应用程序、锻炼支持应用程序、相片管理应用程序、数字相机应用程序、数字视频摄像机应用程序、网络浏览应用程序、数字音乐播放器应用程序、和/或数字视频播放器应用程序。
可在终端上执行的各种应用程序可使用至少一个共用的物理用户接口设备,诸如触敏表面。触敏表面的一种或多种功能以及显示在终端上的相应信息可从一种应用程序调整和/或变化至下一种应用程序和/或在相应应用程序内被调整和/或变化。这样,终端的共用物理架构(诸如触敏表面)可利用对于用户而 言直观清楚的用户界面来支持各种应用程序。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。

Claims (10)

  1. 一种应用程序的控制方法,其特征在于,包括:
    监测前台运行的应用程序的运行时长;
    当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序;
    关闭所述目标应用程序的进程;
    接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
  2. 如权利要求1所述的方法,其特征在于,所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
    确定后台运行的至少一个应用程序;
    获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
  3. 如权利要求1所述的方法,其特征在于,所述根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序包括:
    确定后台运行的至少一个应用程序;
    获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
  4. 如权利要求1所述的方法,其特征在于,所述关闭所述目标应用程序的进程,还包括:
    保存所述目标应用程序的运行状态信息和运行数据。
  5. 如权利要求1-4任意一项所述的方法,其特征在于,
    所述前台运行的程序为视频应用程序或游戏应用程序。
  6. 一种终端,其特征在于,包括:
    监测模块,用于监测前台运行的应用程序的运行时长;
    选择模块,用于当所述运行时长大于预设时长时,根据预设的选择规则从后台运行的至少一个应用程序中选择目标应用程序;
    关闭模块,用于关闭所述目标应用程序的进程;
    启动模块,用于接收到针对所述前台运行的应用程序的退出指令时,在后台启动所述目标应用程序的进程。
  7. 如权利要求6所述的终端,其特征在于,所述选择模块用于:
    确定后台运行的至少一个应用程序;
    获取所述至少一个应用程序的内存占用率,将内存占用率最大的应用程序作为所述目标应用程序。
  8. 如权利要求6所述的终端,其特征在于,所述选择模块用于:
    确定后台运行的至少一个应用程序;
    获取所述至少一个应用程序的使用频率,将使用频率最小的应用程序作为目标应用程序。
  9. 如权利要求6所述的终端,其特征在于,所述关闭模块还用于:
    保存所述目标应用程序的运行状态信息和运行数据。
  10. 如权利要求6-9任意一项所述的终端,其特征在于,
    所述前台运行的程序为视频应用程序或游戏应用程序。
PCT/CN2017/078504 2017-03-29 2017-03-29 一种应用程序的控制方法和终端 WO2018176245A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/078504 WO2018176245A1 (zh) 2017-03-29 2017-03-29 一种应用程序的控制方法和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/078504 WO2018176245A1 (zh) 2017-03-29 2017-03-29 一种应用程序的控制方法和终端

Publications (1)

Publication Number Publication Date
WO2018176245A1 true WO2018176245A1 (zh) 2018-10-04

Family

ID=63673850

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/078504 WO2018176245A1 (zh) 2017-03-29 2017-03-29 一种应用程序的控制方法和终端

Country Status (1)

Country Link
WO (1) WO2018176245A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298336A (zh) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 移动终端及其应用程序的控制方法和装置
CN104834517A (zh) * 2015-04-08 2015-08-12 来安县新元机电设备设计有限公司 一种移动终端省电的方法及移动终端
CN105094936A (zh) * 2015-09-24 2015-11-25 广东小天才科技有限公司 应用于移动终端的后台应用程序清理方法和装置
CN105335099A (zh) * 2015-09-25 2016-02-17 深圳市金立通信设备有限公司 一种内存清理方法及终端
CN106125882A (zh) * 2016-06-15 2016-11-16 深圳市万普拉斯科技有限公司 一种应用程序的管理方法以及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298336A (zh) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 移动终端及其应用程序的控制方法和装置
CN104834517A (zh) * 2015-04-08 2015-08-12 来安县新元机电设备设计有限公司 一种移动终端省电的方法及移动终端
CN105094936A (zh) * 2015-09-24 2015-11-25 广东小天才科技有限公司 应用于移动终端的后台应用程序清理方法和装置
CN105335099A (zh) * 2015-09-25 2016-02-17 深圳市金立通信设备有限公司 一种内存清理方法及终端
CN106125882A (zh) * 2016-06-15 2016-11-16 深圳市万普拉斯科技有限公司 一种应用程序的管理方法以及电子设备

Similar Documents

Publication Publication Date Title
US20200241746A1 (en) Multi-task management method and terminal device
KR102385757B1 (ko) 메시지 대화 이력의 신속 내비게이션
US10613701B2 (en) Customizable bladed applications
TWI656471B (zh) Task management method, device and terminal device for multitasking interface
WO2021082739A1 (zh) 多任务界面管理方法及电子设备
KR20140027353A (ko) 이머시브 애플리케이션으로서의 데스크탑
US20140298245A1 (en) Display Instance Management
KR20140043360A (ko) 이머시브 쉘 및 애플리케이션 쉘의 디스플레이
KR101904955B1 (ko) 터치 기반의 모바일 기기에서의 컴퓨팅 자원 할당방법 및 장치
JP2010287205A (ja) 電子装置、コンピュータ実行システム及びその応用プログラムの表示制御方法
WO2022127152A1 (zh) 控制方法、装置、终端设备及存储介质
KR20140001031A (ko) 단말 장치 및 단말 장치의 제어 방법
WO2013122217A1 (ja) 情報処理装置
WO2018176245A1 (zh) 一种应用程序的控制方法和终端
WO2022161218A1 (zh) 图标移动方法、装置及电子设备
JP2016126371A (ja) 情報処理装置、情報処理システム、情報処理装置の制御方法、およびプログラム
WO2018082256A1 (zh) 一种终端及其切换应用的方法
US20170277311A1 (en) Asynchronous Interaction Handoff To System At Arbitrary Time
US11606457B2 (en) Technology and method for selectively providing network function to application of device
CN115390652A (zh) 显示方法和电子设备
CN107423039B (zh) 一种界面刷新的方法及终端
WO2018209464A1 (zh) 一种联系人列表控制方法和终端
WO2018157364A1 (zh) 一种应用程序的冻结方法和终端
WO2018209463A1 (zh) 一种控制歌曲播放的方法和终端
US20220292627A1 (en) Method and electronic device for boosting graphics performance

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17903027

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17903027

Country of ref document: EP

Kind code of ref document: A1