WO2023071582A1 - 一种应用保活方法及电子设备 - Google Patents

一种应用保活方法及电子设备 Download PDF

Info

Publication number
WO2023071582A1
WO2023071582A1 PCT/CN2022/118833 CN2022118833W WO2023071582A1 WO 2023071582 A1 WO2023071582 A1 WO 2023071582A1 CN 2022118833 W CN2022118833 W CN 2022118833W WO 2023071582 A1 WO2023071582 A1 WO 2023071582A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
electronic device
user
preview interface
alive
Prior art date
Application number
PCT/CN2022/118833
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 EP22885469.1A priority Critical patent/EP4227806A4/en
Priority to US18/038,345 priority patent/US20240004699A1/en
Publication of WO2023071582A1 publication Critical patent/WO2023071582A1/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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Definitions

  • the present application relates to the field of terminal technologies, and in particular to an application keep-alive method and electronic equipment.
  • Multiple applications are usually installed in electronic devices such as mobile phones, and these applications can provide users with rich application services.
  • video applications, music applications, and shopping applications can be installed on the mobile phone.
  • users can open multiple applications, such as using video applications to cache videos in the background, background music applications to play music, and reading applications to read.
  • the mobile phone can judge whether to kill the process according to the power consumption and memory usage of each application, without considering the actual needs of the user, making it easy for the mobile phone to accidentally close the applications that the user still needs. affect user experience.
  • the present application provides an application keep-alive method and electronic equipment.
  • an embodiment of the present application provides an application keep-alive method, the method includes: the electronic device automatically performs a first locking operation on a first application running in the background to add a first type of application lock to the first application; wherein , the first application is an application predicted by the electronic device that the user needs to continue to use, and the first locking operation is used to make the first application a kept-alive state.
  • the electronic device displays a multitasking interface; wherein, the multitasking interface includes a preview interface of multiple recently used applications, the multiple recently used applications include the first application and the second application, and the multiple applications
  • the preview interface includes a first preview interface and a second preview interface, the first preview interface is a preview interface of the first application, and the second preview interface is a preview interface of the second application.
  • a first identifier is displayed on the first preview interface of the multitasking interface, where the first identifier is used to indicate that the first application is added with a first type of application lock.
  • the electronic device In response to the user's second operation on the second preview interface, the electronic device performs a second locking operation on the second application to add a second type of application lock to the second application, and displays a second logo on the second preview interface;
  • the second identifier is used to indicate that the second application is added with a second type of application lock, and the second locking operation is used to make the second application into a kept-alive state.
  • the electronic device (such as a mobile phone) can predict which applications are still needed by the user (ie, the first application), and automatically add the first type of application lock (ie, a smart lock) to the first application , the first application can be kept alive, preventing the first application from being automatically killed by the electronic device.
  • the electronic device can also receive a user's operation to add a second type of application lock (ie, a manual lock) to an application (eg, a second application), which can meet the personalized needs of the user.
  • the appearance of the first logo is different from that of the second logo.
  • the default keep-alive duration of the application corresponding to the first type of application lock is shorter than the default keep-alive duration of the application corresponding to the second type of application lock.
  • the application to which the manual lock is added (that is, the application corresponding to the second type of application lock) can be kept alive by default, which means that the application to which the manual lock has been added (if the user has not changed it) is always in the keep-alive state.
  • the application to which the smart lock is added (that is, the application corresponding to the first type of application lock) is kept alive by default for a fixed value (for example, the first value, the second value).
  • a first keep-alive duration related to the first identifier is also displayed on the first preview interface, where the first keep-alive duration is the remaining duration of the first application being kept alive. Understandably, the first keep-alive duration can be changed in real time, and by displaying the first keep-alive duration, the user can be prompted about the remaining keep-alive duration of the first application, which is convenient for the user to manage.
  • the maximum value of the first keep-alive duration is a first value or a second value
  • the first value is a preset value
  • the second value is determined according to the customary running time of the first application and the current time value
  • the habitual running time of the first application is the time period during which the user is accustomed to using the first application. That is to say, multiple applications to which the smart lock is added may have the same initial keep-alive duration (that is, the maximum value of the first keep-alive duration), for example, the preset first value; multiple applications to which the smart lock is added may also With different initial keep-alive durations (that is, the second value), the second value of the application is a value determined according to the customary running time of the application and the current time.
  • the electronic device restores the remaining duration of the first application to be kept alive to the first value. That is, the user can refresh the remaining keep-alive duration (also called the first keep-alive duration) of the application by pulling down the preview interface of the added smart lock application.
  • the remaining keep-alive duration also called the first keep-alive duration
  • the method further includes: in response to the user's first operation on the first identifier in the first preview interface, the electronic device displays a setting box; wherein, the setting box includes multiple setting options, and the multiple setting options use For the user to set the first keep-alive duration or the first application's keep-alive strategy; in response to the user's operation of selecting the first option among multiple setting options, the electronic device updates the first keep-alive duration to the preset value corresponding to the first option Set a value; or, in response to the user’s operation of selecting the second option among multiple setting options, the electronic device displays an input box, and in response to the user’s operation of inputting a third value in the input box, the electronic device updates the first keep-alive duration is a third value; or, in response to the user's operation of selecting a third option among the plurality of setting options, the electronic device displays a setting page of the keep-alive policy corresponding to the first application.
  • the setting box includes multiple setting options, and the multiple setting options use For the user to set
  • the electronic device can set the remaining keep-alive duration of the smart lock application according to the needs of the user.
  • the user can select an option (for example, the first option) from the multiple time options provided by the electronic device to set the remaining keep-alive time of the smart lock application, or he can enter any value in the input box by himself (for example, third numerical value), or, the electronic device can display the keep-alive policy corresponding to the first application in the settings page to modify the keep-alive policy corresponding to the first application (the keep-alive policy can be related to time, place, sports status and other factors).
  • the method further includes: in response to the user's operation of selecting the first option or the second option among the multiple setting options, the electronic device updates the first identification to the second identification. It can be seen that when the electronic device receives the user's operation of changing the keep-alive time of the first application, the application lock type of the application changes (from the first type of application lock to the second type of application lock).
  • the method further includes: in response to the user's first operation on the second identification in the second preview interface, the electronic device displays a setting box; wherein, the setting box includes multiple setting options, and the multiple setting options use For the user to set the second keep-alive duration, the second keep-alive duration is the remaining duration of the second application being kept alive; in response to the user's operation of selecting the first option among multiple setting options, the electronic device will Displaying the second keep-alive duration, the second keep-alive duration is the preset value corresponding to the first option; or, in response to the user's operation of selecting the second option among multiple setting options, the electronic device displays the input box; in response to the user's In the operation of inputting the third numerical value in the input box, the electronic device displays the second keep-alive duration on the second preview interface, and the second keep-alive duration is the third numerical value.
  • the electronic device can set the remaining keep-alive duration of the manual lock application according to user requirements.
  • the user can select an option (for example, the first option) from multiple time options provided by the electronic device to set the remaining keep-alive duration of the manual lock application, or enter any value in the input box by itself (for example, third value).
  • the method further includes at least one of the following: in response to the user's second operation on the first identification in the first preview interface, the electronic device performs an unlock operation on the first application and no longer display the first logo in the second preview interface; or, in response to the user’s second operation on the second logo on the second preview interface, the electronic device performs an unlock operation on the second application and no longer displays the second logo on the second preview interface . That is, the user can unlock the first application by clicking the first logo or other operations, or click the second logo to unlock the first application.
  • the electronic device After the electronic device unlocks the first application, the first logo can be hidden to indicate that the first application is not In the keep-alive state again, the electronic device may hide the second identification after unlocking the second application, to indicate that the second application is no longer in the keep-alive state.
  • the electronic device automatically performs a first locking operation on the first application running in the background, including: in response to determining that the first application is executing a preset task in the background, the electronic device performs the first locking operation on the first application lock operation; wherein, the preset task is a task executed in response to a user requirement.
  • the application that performs tasks that meet the user's needs can be considered as an application that the user needs to continue to use, and the electronic device can automatically lock the application to avoid being killed by the electronic device.
  • the method further includes: in response to determining that the first application has finished executing the preset task, the electronic device performs an unlocking operation on the first application and no longer displays the first logo on the first preview interface. It can be seen that after the first application executes the preset task (which can be understood as satisfying the user's needs), it is considered that the application is not an application that the user needs to continue to use, and the electronic device automatically unlocks it.
  • the preset task is a download task.
  • the electronic device automatically performs the first locking operation on the first application running in the background, including: in response to determining that the current time is within the customary running time of the first application, the electronic device performs the first locking operation on the first application A locking operation; wherein, the habitual running time of the first application is a period of time during which the user is used to using the first application. It can be seen that when the first application is running in the background, if the current time is within the habitual use time of the first application, the application can be considered as the application that the user needs to continue to use, and the electronic device can automatically lock it.
  • the electronic device automatically performs the first locking operation on the first application running in the background, including: in response to determining that the current time is within the customary running time of the first application and the running environment requirements of the first application are consistent with The state information of the electronic device matches, and the electronic device performs a first locking operation on the first application; wherein, the operating environment requirement of the first application is used to indicate the first application's requirement for the state information of the electronic device, and the state information includes the Bluetooth connection state , network connection status, location information, and at least one of remaining power.
  • the multitasking interface further includes a cleaning option
  • the method further includes: in response to the user's first operation on the cleaning option, the electronic device closes an unlocked application among multiple applications and the preview interface of the application ; In response to the user's second operation on the cleaning option, the electronic device closes the application that has been added with the first type of application lock, including the first application, and the preview interface of the application among the multiple applications; in response to the user's operation on the cleaning In the third operation of the option, the electronic device closes the application to which the second type of application lock is added, including the second application, and the preview interface of the application among the multiple applications.
  • the unlocked application is most likely to be an application that the user does not need to continue to use
  • the application with the first type of application lock may be the application that the user still needs to use
  • the application with the second type of application lock has a high probability It is an application that users still need to continue using.
  • the electronic device can clean up multiple recently run applications in batches: when the user clicks the cleanup option for the first time, the electronic device only cleans up the unlocked apps, and when the user clicks the cleanup option for the second time, the electronic device can clean up and add a smart lock
  • the application (such as the first application)
  • the electronic device can clean up the application with a manual lock (such as the second application), which can not only clean up the application, but also retain as much as possible the user's most likely to continue to use application.
  • the multitasking interface further includes a cleaning option
  • the method further includes: in response to the user's first operation on the cleaning option, the electronic device closes an unlocked application among multiple applications and the preview interface of the application ; In response to the user's second operation on the cleaning option, the electronic device at least closes the preview interface currently visible to the user on the multitasking interface and the corresponding application, or the electronic device at least closes the preview interface currently visible to the user on the multitasking interface The preview interface with the largest display area and the corresponding application.
  • the electronic device can clean up multiple recently run applications in batches: when the user clicks the cleanup option for the first time, the electronic device only cleans up the unlocked applications; when the user clicks the cleanup option again, the electronic device can clean up the apps displayed on the multitasking interface. All preview interfaces and corresponding applications on the multitasking interface, or only the preview interface with the largest display area and corresponding applications on the multitasking interface, can be cleared by the electronic device, which is more intuitive for users.
  • the method further includes: in response to the user's operation on the cleaning option, the electronic device displays cleaning information; wherein the cleaning information is used to indicate the type, quantity and name of the applications cleaned by the electronic device. That is, the electronic device can clearly display the type, quantity, and name of the applications it cleans up, which is more intuitive for users.
  • the first preview interface and the second preview interface are adjacent to each other, wherein, in the first case, the first preview interface is fully displayed and the second preview interface is partially displayed, and in the second case, the first preview interface is partially displayed.
  • the preview interface is partially displayed or fully displayed, and the displayed part of the second preview interface is more than that displayed in the first case.
  • the preview interfaces of multiple recently used applications can be displayed in different forms in the multitasking interface.
  • the first situation can be: multiple preview interfaces are arranged horizontally in a row, and there is no gap between any two adjacent preview interfaces.
  • the second situation can be: multiple preview interfaces can be arranged horizontally in a row, and any two adjacent preview interfaces There is an overlapping area between them (the first preview interface can be partially displayed or fully displayed and the displayed part of the second preview interface is more than the displayed part in the first case).
  • the present application provides an electronic device, including: a processor, a memory, a communication module, and one or more computer programs; wherein, the processor is coupled to the communication module and the memory, and the above-mentioned one or more computer programs are stored In the memory, when the server is running, the processor executes one or more computer programs stored in the memory, so that the server executes the application keep-alive method described in any one of the above.
  • the present application provides a computer storage medium, including computer instructions, and when the computer instructions are run on a server, the server is made to execute the application keep-alive method described in any one of the first aspect.
  • the present application provides a chip system, which includes one or more interface circuits and one or more processors.
  • the interface circuit and the processor are interconnected by wires.
  • the chip system can be applied to an electronic device including a communication module and a memory.
  • the interface circuit can read instructions stored in the memory in the electronic device and send the instructions to the processor.
  • the electronic device can be made to execute the application keep-alive method according to any one of the first aspect.
  • the present application provides a computer program product, which, when running on a server, causes the server to execute the application keep-alive method described in any one of the first aspects.
  • the electronic device described in the second aspect provided above, the computer storage medium described in the third aspect, and the computer program product described in the fifth aspect are all used to perform the corresponding method provided above, therefore , the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
  • FIG. 1A is a schematic structural diagram of an electronic device provided by the present application.
  • FIG. 1B is a software architecture diagram of an electronic device provided by the present application.
  • FIG. 2A is an interface diagram provided by this application.
  • FIG. 2B is an interface diagram provided by this application.
  • FIG. 3A is an interface switching diagram provided by this application.
  • FIG. 3B is an interface switching diagram provided by the present application.
  • Fig. 4 is a kind of interface diagram provided by this application.
  • FIG. 5 is an interface switching diagram provided by the present application.
  • FIG. 6 is an interface switching diagram provided by the present application.
  • FIG. 7A is an interface switching diagram provided by this application.
  • Figure 7B is an interface diagram provided by this application.
  • FIG. 8A is an interface switching diagram provided by this application.
  • FIG. 8B is an interface switching diagram provided by this application.
  • FIG. 9A is an interface switching diagram provided by this application.
  • FIG. 9B is an interface switching diagram provided by this application.
  • FIG. 10A is an interface switching diagram provided by this application.
  • FIG. 10B is an interface diagram provided by this application.
  • FIG. 10C is an interface diagram provided by this application.
  • FIG. 10D is an interface diagram provided by this application.
  • FIG. 10E is an interface switching diagram provided by this application.
  • Figure 11A is an interface switching diagram provided by this application.
  • FIG. 11B is an interface switching diagram provided by this application.
  • FIG. 11C is an interface switching diagram provided by this application.
  • Figure 11D is an interface switching diagram provided by this application.
  • Figure 12 is an interface switching diagram provided by the present application.
  • FIG. 13 is an interface switching diagram provided by this application.
  • FIG. 14 is an interface switching diagram provided by this application.
  • FIG. 15 is an interface switching diagram provided by this application.
  • FIG. 16 is an interface switching diagram provided by this application.
  • FIG. 17 is an interface switching diagram provided by this application.
  • Figure 18 is an interface diagram provided by this application.
  • FIG. 19 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
  • Killing the background can be the behavior of closing the application with large memory or high power consumption in the recent task list when the mobile phone is running out of memory or the remaining power is insufficient. This behavior can ensure that the electronic device has sufficient running time.
  • the memory makes it run smoothly while also saving power to extend the standby time of electronic devices.
  • both power consumption and large operating memory are occupied.
  • the above solution has the following characteristics: when the mobile phone automatically kills the background, it will determine the power consumption and memory usage of each application in the recent task list, and judge whether the application needs to be disabled according to the power consumption and memory usage of each application. closure. As a result, if an application takes up a large amount of memory or consumes high power, the application is likely to be closed regardless of whether the application is still needed by the user. In other words, the current mechanism of automatically killing the background of the mobile phone may cause the mobile phone to accidentally close some applications that the user needs to continue to use in the future, affecting the user experience.
  • the present application provides an application keep-alive method and an electronic device.
  • the electronic device can automatically perform a first locking operation on a first application running in the background, so as to add a first type of application lock to the first application (which can be understood as a smart lock).
  • the first application is an application that the electronic device predicts that the user will continue to use.
  • the first application may be an application that is executing a preset task (eg, a download task) in response to a user's demand, or may be an application that conforms to the user's usage habits, and so on.
  • a preset task eg, a download task
  • Locking the first application can make the first application keep alive, prevent the first application from being closed when the electronic device automatically kills the background, and continue to provide services for users.
  • the electronic device can also display a multitasking interface.
  • the multitasking interface includes a preview interface of multiple applications recently used by the user.
  • the multiple applications recently used may include the above-mentioned first application and the second application, and the second application is an application that the electronic device predicts that the user may continue to use.
  • the preview interfaces of multiple applications include a first preview interface and a second preview interface, the first preview interface is a preview interface of the first application, and the second preview interface is a preview interface of the second application.
  • the electronic device may display a first identifier on the first preview interface, where the first identifier is used to indicate that the first application is added with the first type of application lock.
  • the electronic device may also receive a second user operation on the second preview interface, and in response to the second operation, the electronic device performs a second locking operation on the second application to add a second type of application lock to the second application (it can be understood is a manual lock), and a second logo is displayed on the second preview interface, and the second logo is used to indicate that the second application is added with a second type of application lock.
  • the application keep-alive method provided in the embodiment of the present application can be applied to electronic equipment.
  • the electronic device specifically may be a mobile phone, a tablet computer, a television (also called a smart screen, a large-screen device, etc.), a notebook computer, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a handheld computer, a netbook, Personal digital assistants (Personal Digital Assistant, PDA), wearable electronic devices, vehicle-mounted devices (also referred to as in-vehicle devices), virtual reality devices, etc., are not limited in this embodiment of the present application.
  • electronic device 100 can comprise: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charging management module 140, power management Module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indication device 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • the structure shown in this embodiment does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit, NPU
  • the software system of the above-mentioned electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the software structure of the electronic device 200 is illustrated by taking the Android system with a layered architecture as an example.
  • FIG. 1B is a block diagram of the software structure of the electronic device 200 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include applications (applications, APPs) such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • applications applications, APPs
  • camera gallery
  • calendar call
  • map navigation
  • WLAN wireless local area network
  • Bluetooth Bluetooth
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include activity manager, window manager service, content provider, view system, resource manager, notification manager and system interface (system UI) etc., the embodiments of the present application do not impose any limitation on this.
  • the above-mentioned activity manager is used to manage the life cycle of each application.
  • Applications usually run on the electronic device 200 in the form of activities.
  • For each activity there will be a corresponding application record (Activity Record) in the activity manager, and this Activity Record records the state of the activity of the application.
  • the activity manager can use this Activity Record as an identifier to schedule the activity process of the application.
  • the above-mentioned window manager is used to manage graphical user interface (graphical user interface, GUI) resources used on the screen, specifically, it can be used for: obtaining the size of the display screen, creating and destroying windows, displaying and hiding windows, layout of windows, setting of focus Management and input method and wallpaper management, etc.
  • GUI graphical user interface
  • the above-mentioned content providers are used to store and obtain data, and make these data accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • Each display interface can consist of one or more controls.
  • controls may include interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
  • the above-mentioned notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sending out prompt sounds, vibrating, and flashing lights, etc.
  • the above-mentioned system UI is the core application of the Android system, responsible for feedback system and application status and maintaining interaction with users.
  • the system UI includes a status bar, a navigation bar, a notification panel, and a recent task interface (recents), etc.
  • the system library and kernel layer below the application framework layer can be called the underlying system, which includes the underlying display system for providing display services, for example, the underlying display system includes the display driver in the kernel layer and the surface in the system library Manager (surface manager), etc.
  • the Android runtime includes a core library and a virtual machine.
  • the Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library may include multiple functional modules. For example: Surface Manager, Media Libraries, OpenGL ES, SGL, etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • SGL is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, etc., which are not limited in this embodiment of the present application.
  • the application keep-alive method provided in the embodiment of the present application will be specifically introduced below.
  • the mobile phone includes a recent task list (or called a multi-task list), and the recent task list includes multiple applications recently run by the mobile phone (or can be understood as multiple applications recently used by the user).
  • the multiple recently run applications may include applications that have been killed by the mobile phone (that is, applications that have been closed), applications running in the foreground, and applications running in the background.
  • the application running in the foreground is visible and can run in the current window of the mobile phone (the window currently being displayed), and the user can directly interact with the application running in the foreground.
  • Applications running in the background are invisible and can usually be run in the resource manager, and the user cannot directly interact with the APP running in the background.
  • the mobile phone can automatically perform a first locking operation on the first application among the multiple applications that have been running recently.
  • the first locking operation can refer to the operation of adding a smart lock to the first application by the mobile phone, and the first locking operation can make the first application a state of being kept alive (which can be understood as a state that will not be automatically killed by the mobile phone). ), to prevent the first application from being closed when the mobile phone automatically kills the background. Understandably, when the mobile phone automatically kills the background, the application to which the smart lock is added (that is, in the keep-alive state) may not be closed, so that the application to which the smart lock is added can keep running.
  • the first application is an application predicted by the electronic device that the user needs to continue to use.
  • the first application may include two types: the first type is an application running in the background and conforming to the user's usage habits; the second type is an application running in the background and executing a preset task in response to the user's demand. Next, how the mobile phone determines the first application from the recent task list will be described in detail.
  • the mobile phone may acquire habitual usage data, and judge whether multiple recently run applications are the first application according to the habitual usage data.
  • the habitual usage data may be used to reflect the user's habitual usage time, habitual location, and habitual usage status of each application.
  • the mobile phone may display a setting interface 201 .
  • the setting interface 201 may include multiple setting options, such as wireless and network, device connection, battery, application keep alive 202 and so on.
  • the mobile phone may display an application keep-alive setting interface 203 as shown in (b) of FIG. 2A .
  • the application keep-alive setting interface 203 can provide the user with the option of setting the same type of application keep-alive policy (for example, the video-type application keep-alive policy 204, the game-type application keep-alive policy, etc.) Options (for example, Honor Video 205, Xiao Xiao Le, etc.).
  • all applications can be arranged centrally according to their application types, which is convenient for users to manage and view.
  • Honor Video 205, a video application, and b video application are all video applications and can be arranged in a centralized manner.
  • Xiaoxiaole and "Doudizhu" are game applications and can be arranged in a centralized manner.
  • the mobile phone may receive the user's operation of clicking the video application keep-alive policy 204, and in response to the operation, the mobile phone may display an interface 206 as shown in (c) in FIG. 2A.
  • the interface 206 may include an input field 207 and an application selection field 208 .
  • the input column 207 is available for the user to set the habitual use time (i.e. the "time” in the interface 206), the habitual use location (i.e. the "place” in the interface 206), the habitual use state (i.e. the "exercise” in the interface 206) status"), etc.
  • the application selection column 208 includes all video applications pre-classified by the mobile phone (such as Honor Video 205, a-video application, b-video application, etc.).
  • the application selection bar 208 allows the user to manually select applications that need to be classified into the video category, so as to meet the user's individual needs. For example, the user can input or select "Monday to Friday 20:00-21:00" in the column "Time” in the input column 207, input or select "Home” in the column “Location”, and select “Home” in the column “Status”. Enter or select "Still” in this column, and after selecting other video applications except Honor Video 205 in the application selection column 208, click Confirm option 209.
  • the mobile phone can set the habitual use time of video applications other than Honor Video 205 to "Monday to Friday 20:00-21:00", set the habitual location to "home”, and set the habitual The usage status is set to "Still”. It can be seen that the mobile phone can set the habitual usage data of similar applications in batches, which is convenient for users to manage in a unified manner.
  • the mobile phone may receive the user's operation of clicking the Honor video 205, and in response to the operation, the mobile phone may display an interface 210 as shown in (b) in FIG. 2B.
  • the interface 210 includes a display area 1 and a display area 2 .
  • Display area 1 can indicate the current keep-alive policy of Honor video 205 (for example, the time is "Monday 8:30-9:00", the location is "home”, and the status is "stationary").
  • the display area 2 may include the keep-alive policies of various applications (such as video applications, game applications, and communication applications) (for example, the video application keep-alive policy is: the time is "Monday to Friday 20:00-21: 00", location is "home”, status is "stationary”).
  • the video application keep-alive policy is: the time is "Monday to Friday 20:00-21: 00", location is "home”, status is "stationary”
  • the user wants to quickly change the keep-alive policy of the Honor Video 205, he can directly select a keep-alive policy of a type of application from the display area 2, and click the save option 211.
  • the mobile phone may receive an operation in which the user selects "follow the video application keep-alive policy" in the display area 2 and clicks the save option 211, and changes the keep-alive policy of the Honor Video 205 to the video application keep-alive policy.
  • the mobile phone can receive the user's operation of clicking the save option 211 after setting the keep-alive policy in the display area 1, and change the keep-alive policy of the Honor Video 205 to a value set by the user. It should be noted that, as shown in (c) in FIG. 2B , after the mobile phone is set successfully, the mobile phone can automatically refresh the keep-alive policy of the Honor video 205 in the display area 1 .
  • each parameter in the keep-alive policy may be set by default to the corresponding parameter value in the habitual usage data collected and extracted by the mobile phone.
  • the mobile phone can independently determine whether the application running in the background is an application that the user needs to continue to use according to the user's habitual location, habitual state, or any of the other parameters included in the habitual data.
  • Applications Exemplarily, when the application a is backgrounded, the mobile phone can determine whether the current time matches the customary usage time corresponding to the application a.
  • the current time may refer to the current system time of the mobile phone, and the matching of the current time with the customary usage time corresponding to application a may mean that the current time is within the range indicated by the customary usage time.
  • the system time (that is, the current time) when application a is running is 8:20, and the customary use time of application a is 8:00-9:00, since 8:20 is at the time of 8:00-9:00 Within the range, it can be considered that the current time matches the customary usage time corresponding to application a. If the current time matches the habitual use time corresponding to application a, the mobile phone may use application a as the application that the user needs to continue using (ie, the first application). Exemplarily, the user's habitual usage data may be shown in Table 1:
  • the mobile phone independently judges whether the application running in the background is an application that the user needs to continue to use based on parameters such as habitual location and habitual use state. .
  • the mobile phone can also be comprehensively judged according to the user's habitual location, habitual use state and other parameters in the habitual operation data.
  • the habitual place of use can be understood as the regular place where the user uses the corresponding application, for example, the habitual place of use of the music application can be on the way to work, and the habitual place of use of the video application can be at home, etc.
  • the habitual use state can be understood as the state that the user is in when using the corresponding application.
  • a habitual use state of a video application may be a static state
  • a habitual use state of a sports application may be a motion state.
  • the mobile phone can determine whether the current time matches the habitual use time corresponding to application b, determine whether the current location of the phone matches the habitual use location corresponding to application b, and determine the user's current location. Whether the running state matches the habitual use state corresponding to application b. If the current time matches the habitual use time, the current location matches the habitual use location, and the user's current exercise state matches the habitual use state, the mobile phone can use application b as the user The application that needs to be used continuously (that is, the first application).
  • the mobile phone can also comprehensively determine whether the application running in the background is the first application in combination with habitual use data, operating environment requirements of each application, and status information of the mobile phone.
  • the running environment requirement of the application may indicate the requirement of the application on the status information of the mobile phone, such as whether to connect to Bluetooth, whether to connect to the Internet, whether the power is sufficient, and so on.
  • the state information may include at least one of the Bluetooth connection state, the network connection state, and the remaining power.
  • the mobile phone should further confirm the network Connection Status. If the network connection status indicates that the mobile phone is connected to the Internet, the mobile phone can use the application b as an application that the user needs to continue using. Otherwise, the mobile phone will not use application b as an application that the user needs to continue using.
  • the mobile phone may pre-configure a keep-alive task (also called a preset task) for each application.
  • Keep-alive tasks may include tasks performed by applications to satisfy user needs.
  • the keep-alive task may be set by the mobile phone according to the type of the application.
  • the keep-alive task of a music application may be playing music
  • the keep-alive task of a video application may be buffering a video.
  • the keep-alive task may also be set by the user. The mobile phone can monitor whether each application running in the background is executing a corresponding keep-alive task.
  • the mobile phone regards the application as an application that the user still needs to use, and adds a smart lock to it to prevent the application from being automatically closed by the mobile phone.
  • various applications and corresponding keep-alive tasks may be shown in Table 2:
  • the keep-alive task of the music application is to play music
  • the keep-alive task of the train travel application is to grab tickets
  • the keep-alive task of the video application is to cache videos
  • the keep-alive task of the game application is to play games.
  • the mobile phone can automatically add a smart lock to the music application.
  • Table 2 is only an example, and actually one application may correspond to one or more keep-alive tasks.
  • the mobile phone after the mobile phone adds a smart lock to the first application, it may also add a smart lock logo (also called the first logo) to the first application on the recent task interface (or called the multitasking interface).
  • the recent task interface is used to display the preview interface of multiple recently used applications and the locking status of each application.
  • the mobile phone may receive an operation of opening the recent task interface by the user, and in response to the operation, the mobile phone may display the recent task interface.
  • the operation for the user to open the recent task interface may include various types.
  • the mobile phone can receive the user's operation of sliding up the bottom of the screen and keeping the finger touching the screen without lifting it, and in response to this operation, the mobile phone can display the (b) shows the recent task interface 301 .
  • the recent task interface 301 may include a preview interface 302 of a gallery application, a preview interface 303 of a train travel application, and a preview interface 304 of a video application.
  • the mobile phone also displays a first lock icon 305 on the preview interface 303 of the train travel application, and the first lock icon 305 is used to indicate that the train travel application has been added with a smart lock by the mobile phone.
  • displaying the first lock icon 305 on the preview interface 303 can also be understood as displaying the first lock icon 305 at a preset position near the preview interface 303, for example, four corners of the preview interface 303, up, down, left, and right.
  • the first lock icon 305 is displayed at any position such as the corner, the preview interface 303, etc., and no specific limitation is set here.
  • the mobile phone may display a virtual navigation bar 306 at the bottom of the screen.
  • the virtual navigation bar 306 includes a plurality of virtual buttons, such as a back button, a home button and a function button 307 .
  • the mobile phone may receive the user's operation of clicking the function key 307, and in response to the operation, the mobile phone may display the recent task interface 301 as shown in (b) of FIG. 3B.
  • the order in which the preview interfaces of the multiple applications are arranged in the recent task interface 301 corresponds to the order in which the multiple applications are used by the user.
  • the user uses the gallery application, the train travel application and the video application in sequence, then in the recent task interface 301, the preview interface 302 of the gallery application, the preview interface 303 of the train travel application and the preview interface 304 of the video application Arranged sequentially from top to bottom or right to left.
  • the preview interface that can be displayed on the recent task interface is limited.
  • the recent task interface 301 shown in FIG. 3B the recent task interface 301 only displays the preview interface 302 of the gallery application, the preview interface 303 of the train travel application, and the preview interface 304 of the video application, but this does not represent the recently used Apps only include gallery app, train travel app and video app.
  • the recently used applications may also include other applications except the gallery application, the train travel application and the video application, and the preview interfaces of other applications may be displayed on the recent task interface 301 by the user sliding left or right on the screen.
  • the mobile phone may display the remaining keep-alive duration of the first application on the first preview interface (which may be understood as the remaining duration of the first application being kept alive, and may also be referred to as the first keep-alive duration).
  • the mobile phone may display status information 403 on a preview interface 403 of the train travel application.
  • the status information 403 may be used to indicate the remaining keep-alive duration of the train travel application.
  • the status information 403 may be "keeping alive, counting down: 9 minutes and 58 seconds".
  • the remaining keep-alive duration of the first application is equal to the initial keep-alive duration of the first application, wherein the initial keep-alive duration may refer to the maximum duration for which the first application is kept alive. Thereafter, if the user does not reset or refresh the remaining keep-alive duration of the first application, the remaining keep-alive duration of the first application will continue to decrease until it becomes 0.
  • the initial keep-alive duration of each application can be the same, for example, a preset first value (which can be understood as a preset value), and the first value can be 5 minutes, 10 minutes, or 1 hour Wait for any value. That is, the mobile phone can add a smart lock to each application that is determined to be used by the user, and the initial keep-alive duration of the application is the same, which is the first value. In some designs, the mobile phone can receive the user's pull-down operation on the first preview interface, and in response to the operation, the mobile phone restores the remaining keep-alive duration of the first application to the first value, allowing the user to quickly extend the keep-alive duration of the first application duration.
  • a preset first value which can be understood as a preset value
  • the first value can be 5 minutes, 10 minutes, or 1 hour Wait for any value. That is, the mobile phone can add a smart lock to each application that is determined to be used by the user, and the initial keep-alive duration of the application is the same, which is the
  • the initial keep-alive duration of each application may be different, for example, the second value.
  • the second value is determined by the mobile phone according to the current time and the customary running time of the application. The second value at least enables the application to be kept alive during its customary running time.
  • the current time is 8:40
  • the customary running time of application c is 8:30-9:00, so to ensure that application c can stay alive between 8:40-9:00 and not be killed
  • the initial keep-alive duration of the application c may be at least 20 minutes.
  • the second value may also be the estimated time required by the mobile phone for the application to perform the keep-alive task.
  • the second value at least enables the application to be in a keep-alive state during execution of the keep-alive task.
  • the mobile phone can estimate the time required for caching the video file according to the size of the video file and the network speed, for example, 30 minutes, then the mobile phone can set the initial keep-alive duration of the video application to 30 minutes.
  • the mobile phone may not display the remaining keep-alive duration of the first application on the first preview interface. It should be noted that not displaying the remaining keep-alive duration of the first application does not mean that the first application is always in the keep-alive state.
  • the mobile phone can monitor the task process of the keep-alive task of the first application in real time, and once it is determined that the keep-alive task is completed, the smart lock of the first application can be automatically canceled (ie, the first application is unlocked).
  • the mobile phone can add a smart lock to the video application that is performing the cache task, and when the mobile phone detects that the cache task is completed or receives a notification that the cache task is completed, the smart lock of the video application is automatically canceled.
  • the mobile phone can automatically add a smart lock to the first application, but the user can also select an application (for example, a second application) to lock it.
  • the mobile phone may display a recent task interface 501, which includes a preview interface 502 of a gallery application, a preview interface 503 of a train travel application, and a preview interface 504 of a video application. If the user wants the train travel application not to be killed by the mobile phone, he can pull down the preview interface 503 of the train travel application.
  • the mobile phone may receive the user's operation of pulling down the preview interface 503 of the train travel application, and in response to the operation, the mobile phone may add a manual lock to the train travel application (that is, perform a second locking operation on the train travel application).
  • the mobile phone can display a second lock icon 505 on the preview interface 503 of the train travel application, and the second lock icon 505 is used to indicate A manual lock has been added to the Train Travel app.
  • the second application can always be kept alive. In other words, by default, the keep-alive duration of the application to which the manual lock is added is longer than the keep-alive duration of the application to which the smart lock is added.
  • the user can manage multiple recently used applications. For example, set the keep-alive duration of the application, set the keep-alive policy of the application, unlock the application, clean the application, etc. Next, the process of setting the keep-alive duration for the application, unlocking the application, and cleaning the application will be explained respectively.
  • the recent task interface can provide a way for the user to set the keep-alive duration of the locked application.
  • the mobile phone may display a recent task interface 601, and the recent task interface 601 includes a preview interface 602 of the train travel application.
  • a first lock icon 603 and first status information 604 are displayed on the preview interface 602 .
  • the first lock icon 603 is used to indicate that the train travel application has been added with a smart lock
  • the first status information 604 is used to indicate that the train travel application is in a keep-alive state
  • the keep-alive duration remains 9 minutes and 58 seconds.
  • the mobile phone can receive the user's first operation on the first lock icon 603 (for example, the operation of long pressing the first lock icon 603), and in response to this operation, as shown in (b) in Figure 6, the mobile phone can display the settings Block 605.
  • the setting box 605 may include unlocking options, setting keep-alive duration options 606, setting keep-alive policy options 607, closing application options, and the like.
  • the mobile phone may receive the user's operation of clicking the option 606 to set the keep-alive duration, and in response to the operation, the mobile phone displays the keep-alive duration setting interface 608 as shown in (c) of FIG. 6 .
  • the keep-alive duration setting interface 608 may provide the user with multiple options for setting the keep-alive duration, for example, 5 minutes, 10 minutes, "20 minutes" 609 , custom and so on.
  • the mobile phone After the mobile phone receives the user's operation of selecting the keep-alive duration, it can set the keep-alive duration of the application to the value selected by the user. Exemplarily, if the user wishes to set the keep-alive duration of the train travel application to 20 minutes, he may click "20 minutes" 609 .
  • the mobile phone can receive the user's second operation on "20 minutes” 609 (for example, click on the operation of "20 minutes” 609), and in response to this operation, as shown in (d) in Figure 6, the mobile phone will first lock the icon 603 is changed to the second lock icon 610, and the first status information 604 is changed to the second status information 611.
  • the second lock icon 610 is used to indicate that the train travel application has been manually locked
  • the second status information 611 is used to indicate that the train travel application is in a keep-alive state, and the keep-alive duration remains 20 minutes. It can be understood that if the application to which the smart lock is originally added, the mobile phone can change the lock type of the application after the user sets the keep-alive duration, that is, from the smart lock to the manual lock.
  • the mobile phone can also receive the user's click operation on the first state information 604, and in response to this operation, the mobile phone can directly display the keep-alive duration setting interface 605 as shown in (c) in Figure 6 to quickly set or modify the keep-alive duration.
  • the mobile phone may display a recent task interface 701, and the recent task interface 701 includes a preview interface 702 of the train travel application.
  • a second lock icon 703 is displayed on the preview interface 702 of the train travel application.
  • the second lock icon 703 is used to indicate that a manual lock has been added to the train travel application.
  • the mobile phone can receive the user's first operation on the second lock icon 703 (for example, the operation of long pressing the second lock icon 703), and in response to this operation, as shown in (b) in Figure 7A, the mobile phone can display the settings Block 704.
  • the setting box 704 may include unlocking options, setting keep-alive duration options 705, setting keep-alive policy options, closing application options, and the like.
  • the mobile phone may receive the user's operation of clicking the option 705 to set the keep-alive duration, and in response to the operation, the mobile phone displays the keep-alive duration setting interface 706 as shown in (c) of FIG. 7A .
  • the keep-alive duration setting interface 706 may provide the user with multiple options for setting the keep-alive duration, such as 5 minutes, 10 minutes, 20 minutes, "custom" 707 and so on. After receiving the user's operation of selecting to set the keep-alive duration, the mobile phone sets the keep-alive duration of the application as the value input by the user.
  • the mobile phone may receive the user's second operation on "Customize” 707 (for example, the operation of clicking "Customize” 707), and in response to this operation, as shown in (d) in FIG. 7A, the mobile phone displays an input box 708.
  • the mobile phone can receive the operation that the user selects or enters for 15 minutes in the input box 708 and confirms it.
  • the mobile phone can redisplay the recent task interface 701, and display the status information 709 on the preview interface 702 of the train travel application (as shown in FIG. 7B).
  • the status information 709 is used to indicate that the train travel application is in the keep-alive state, and the keep-alive duration remains 20 minutes.
  • the recent task interface may also provide a way for the user to set a keep-alive policy for the application.
  • the mobile phone may display a recent task interface 801 .
  • the recent task interface 801 may include a preview interface 802 of the Honor video.
  • the preview interface 802 displays a first lock icon 803, and the first lock icon 803 is used to indicate that the Honor video is added with a smart lock.
  • the mobile phone may receive an operation of long pressing the first lock icon 803 by the user, and in response to the operation, the mobile phone displays a setting box 804 as shown in (b) in FIG. 8A .
  • the setting box 804 may include unlocking options, setting keep-alive duration options, setting keep-alive policy options 805, closing application options, and the like. If the user wants to set or change the keep-alive policy of the Honor video, he can click the set keep-alive policy option 805, and in response to this operation, the mobile phone can display the keep-alive policy setting interface.
  • the keep-alive policy setting interface can be as shown in (c) in FIG. options, no longer auto-keep alive, etc.
  • the prompt message 807 may indicate that the keep-alive policy of the application is set according to the user's usage habits, for example, "According to your usage habits, the keep-alive rules of Honor Video are as follows, and you can modify them as needed.”
  • the setting area 808 is available for the user to set parameters such as time, location, and exercise status.
  • Association option 809 can provide users with a way to apply the keep-alive policy of Honor Video to all video applications.
  • the mobile phone can receive the user's operation of clicking the save option, and in response to this operation, the mobile phone applies the keep-alive policy of Honor Video to all video applications.
  • the survival strategy of all travel apps including Honor Video is: the habitual use time is 20:00-21:00 from Monday to Friday, the habitual use location is home, and the habitual use state is static. If the user wishes to no longer automatically keep the glory video alive, he can check "no longer automatically keep alive" in the keep alive policy setting interface 806.
  • the mobile phone can receive the user's operation of clicking the setting keep-alive policy option 805, and in response to this operation, the mobile phone displays the ) shows the keep-alive policy setting interface 810.
  • the keep-alive policy setting interface 810 may include prompt information 811 , a setting area 812 , a selection area 813 , a cancel option, a save option, and the like.
  • the prompt information 811 may indicate the type of the application, and indicate that the keep-alive policy of the application is the keep-alive policy of the type mentioned in the application.
  • the setting area 808 allows users to freely set parameters such as time, location, and motion status, and can provide the option of "apply to all video applications”.
  • the selection area 813 provides keep-alive strategies for multiple types of applications (such as video applications, game applications, information applications, etc.) for users to choose. If the user does not want to adopt the keep-alive policy provided in the selection area 813, he can set various parameters in the setting area 812 as needed, and select "apply to all video applications”.
  • the parameters are applied to the keep-alive policy of the Honor video app, and the keep-alive policy of the Honor video app is applied to all video apps. If the user wishes to adopt a keep-alive strategy in the selection area 813 (such as a game-type application keep-alive strategy), he can select the "game-type application keep-alive strategy" and click the save option. In response to this operation, the mobile phone saves the game The application keep-alive policy is applied to the Honor video application. Similarly, if the user wishes not to automatically keep the Honor video application alive, he can check "no longer automatically keep alive" in the keep alive policy setting interface 810 .
  • a keep-alive strategy in the selection area 813 such as a game-type application keep-alive strategy
  • the mobile phone can manage the application's keep-alive policy from the setting page, and can also set the most applied keep-alive policy on the multi-tasking interface. Multiple entries are convenient for user management and are more practical, which can effectively improve user experience. .
  • the recent tasks interface also provides a way for users to clean up apps.
  • cleaning the application can be understood as deleting the recent use record of the application.
  • For an application that is still running, cleaning the application can be understood as killing the application and deleting the recent use record of the application.
  • There are many ways to clean up the apps on the mobile phone which are as follows: the first one is to clean up unlocked apps, apps with smart locks, and apps with manual locks in batches. The second is to clean up unlocked and locked applications (including added smart locks and manual locks) in batches. The third method is to clean up the applications corresponding to the preview interface currently visible to the user on the multitasking interface in batches. Fourth, only clean up the applications that the user wants to clean up.
  • the most recently used applications include the gallery application, train travel application, honor video and calculator in order of use, among which the gallery application is the first application used by the user, and the calculator is the last application used by the user , a smart lock was added to the gallery application, a manual lock was added to the train travel application and calculator, and no lock was added to the Honor video.
  • the first is to clean up unlocked, smart-locked, and manually-locked apps in batches.
  • the mobile phone may display a recent task interface 901 .
  • the recent task interface 901 may include a preview interface 902 of a gallery application, a preview interface 903 of a train travel application, and a preview interface 904 of a video application.
  • a first lock icon 905 is displayed on the preview interface 902 of the gallery application, and a second lock icon 906 is displayed on the preview interface 903 of the train travel application.
  • the first lock icon 905 is used to indicate that a smart lock has been added to the gallery application
  • the second lock icon 906 is used to indicate that a manual lock has been added to the train travel application
  • no lock has been added to the video application (so the preview interface of the video application 904 does not display the first lock icon or the second lock icon).
  • the recent task interface 901 also includes a cleanup icon 907, and the mobile phone can receive an operation of clicking the cleanup icon 907 by the user. In response to this operation, the mobile phone can clean up (or be understood as killing or closing) unlocked applications in multiple recently running applications. application (i.e. video application). After the mobile phone cleans up the video application, as shown in (b) in FIG. preview interface 909 of the browser.
  • the first cleaning information 908 is used to remind the user that the mobile phone has cleaned up the unlocked applications, the number of cleaned applications, and the names of the cleaned applications.
  • the first cleaning information 908 can be "1 unlocked application has been cleaned: video application ".
  • the mobile phone can receive the user's operation of clicking the cleanup icon 907 again.
  • the mobile phone can clean up all applications (that is, the gallery application) to which the smart lock is added, and as shown in (c) in FIG.
  • the preview interface 802 of the gallery application is closed and the second cleaning information 910 is displayed.
  • the second cleaning information 910 is used to remind the user that the mobile phone has cleaned up the applications that add the smart lock, the number of the cleaned applications, and the names of the cleaned applications.
  • the second cleaning information 908 can be "1 smart lock application has been cleaned: Gallery application”.
  • the mobile phone can receive the user's operation of clicking the cleaning icon 907 again, and in response to this operation, the mobile phone can clean up all applications (ie, train travel applications and calculators) that have been added with manual locks, and as shown in (d) in Figure 9A, the mobile phone
  • the third cleaning information 911 is displayed.
  • the third cleaning information 911 is used to remind the user that the mobile phone has cleaned up the applications that add manual locks, the number of cleaned applications, and the names of the cleaned applications.
  • the third cleaning information 911 can be "cleared 2 manually locked applications: travel apps, calculators".
  • the above-mentioned first clean-up information 908, second clean-up information 910, and third clean-up information 911 may disappear after a preset time.
  • the mobile phone may not display the first cleaning information 908 , the second cleaning information 910 and the third cleaning information 911 .
  • the first clearing information, the second clearing information, and the third clearing information that appear later can refer to the settings of the first clearing information 908, the second clearing information 910, and the third clearing information 911. It will disappear after a set time, or it can not be displayed directly.
  • the second is to clean up unlocked and locked (including added smart locks and manual locks) applications in batches.
  • the mobile phone receives the cleaning command for the first time, it can clean up the unlocked applications first; application).
  • the mobile phone can receive the user's operation of clicking the cleaning icon 907, and respond to In this operation, the mobile phone can clean up the unlocked applications (i.e., video applications) in multiple recently running applications, and close the preview interface 904 of the video application on the recent task interface 901 and display the cleaning information 912 (as shown in FIG.
  • the cleaning information 912 is used to remind the user that the mobile phone has cleaned unlocked applications, the number of cleaned applications, and the names of the cleaned applications.
  • the cleaning information 912 may be "1 unlocked application has been cleaned: video application”.
  • the mobile phone can receive the user's operation of clicking the cleaning icon 907 again, and in response to this operation, the mobile phone can clean up all locked applications (that is, the gallery application, the train travel application, and the calculator), and display the icon shown in (c) in Figure 9B. Clear message 913.
  • the cleaning information 913 is used to remind the user that the mobile phone has cleaned up the applications that add manual locks and smart locks, the number of cleaned applications, and the names of the cleaned applications. , train travel app, calculator".
  • the first cleaning method and the second cleaning method both clean up unlocked applications first, and then clean up locked applications, which can prevent the mobile phone from directly cleaning up applications that users need to continue using.
  • the third way is that the mobile phone cleans up the applications corresponding to the preview interface currently visible to the user on the recent task interface in batches.
  • the mobile phone may receive the first cleaning operation initiated by the user, and in response to the operation, the mobile phone may clean up unlocked applications.
  • the mobile phone may also receive a second cleaning operation initiated by the user, and in response to the operation, the mobile phone may clean up the preview interface currently visible to the user on the recent task interface and the corresponding application.
  • the preview interface currently visible to the user may be all preview interfaces displayed on the recent task interface (such as preview interface 902, preview interface 903, and preview interface 904 in (a) of FIG. 9A ).
  • FIG. 10A see the text part of FIG.
  • the mobile phone can receive the user's operation of clicking the cleaning icon 907, and respond to This operation, as shown in (b) in FIG. 10A , the mobile phone closes the preview interface 904 of the video application on the recent task interface 901 , and displays the cleaning information 1001 and the preview interface 909 of the calculator on the recent task interface 901 .
  • the mobile phone may receive the user's operation of clicking the cleaning icon 907 again, and in response to this operation, as shown in (c) in FIG. 902 , the preview interface 903 of the train travel application and the preview interface 909 of the calculator, and close the gallery application, the train travel application and the calculator.
  • the mobile phone can also display cleaning information 1002 on the recent task interface 901 .
  • the cleaning information 1002 is used to remind the user that the mobile phone has cleaned up the currently visible applications, the number of cleaned applications, and the names of the cleaned applications. calculator".
  • the mobile phone may also only clean up the preview interface with the largest display area (ie, the preview interface 903 of the train travel application) among the preview interfaces currently visible to the user.
  • the recent task interface may display preview interfaces of multiple applications recently used in different forms.
  • multiple preview interfaces are arranged horizontally in a row, and there is no overlapping area between any two adjacent preview interfaces.
  • multiple preview interfaces may be arranged horizontally in a row, and there is an overlapping area between any two adjacent preview interfaces, such as the recent task interface shown in FIG. 10B .
  • multiple preview interfaces can be divided into multiple columns, and each column includes multiple preview interfaces that do not overlap each other, such as the recent task interface shown in FIG. 10C or FIG. 10D (where the electronic device is a tablet). It should be noted that the arrangement of multiple preview interfaces in the recent task interface is different, which should not affect the specific implementation of the present application.
  • the mobile phone may display a recent task interface 1003 as shown in (a) in FIG. 10E .
  • the recent task interface 1003 may include a preview interface 1004 of a gallery application, a preview interface 1005 of a train travel application, a preview interface 1006 of a video application, and a preview interface 1007 of a calculator.
  • the mobile phone displays the second cleaning icon 1008 on the preview interface 1004 of the gallery application, the first cleaning icon 1009 on the preview interface 1005 of the train travel application, and the first cleaning icon 1010 on the preview interface 1007 of the calculator.
  • the second cleaning icon 1008 is used to indicate that the gallery application is added with a smart lock
  • the first cleaning icon 1009 is used to indicate that the train travel application is added with a manual lock
  • the first cleaning icon 1010 is used to indicate that the calculator is added with a manual lock.
  • the recent task interface 1003 can also include a cleanup icon 1011, and the mobile phone can receive the user’s click on the cleanup icon 1011.
  • the mobile phone can close the unlocked application on the recent task interface 1003 (ie video application), and display cleaning information 1012.
  • the mobile phone may also receive the user clicking the cleanup icon 1011 again, and in response to this operation, the mobile phone may close the applications currently visible to the user on the recent task interface 1003 (that is, the gallery application, the train travel application, and the calculator), or the mobile phone may close the recent task All locked applications on the interface 1005 (i.e. gallery application, train travel application, calculator); and further, as shown in (c) in Figure 10E, the mobile phone can also display cleaning information 1013 to prompt the application to be cleaned number and name etc.
  • the mobile phone can clean up some applications that the user wishes to clean up.
  • the applications cleaned by the mobile phone are selected by the user according to actual needs.
  • the mobile phone can receive the user's operation of long pressing the cleaning icon 907, and respond In this operation, the mobile phone displays a cleaning prompt box 1101 .
  • the cleanup prompt box 1101 is used to provide the user with multiple cleanup options, such as "clean up unlocked apps" 1102, "clean up smart lock apps” 1103, "clean up manual lock apps” 1104, "clean up all apps” 1105, etc. .
  • the mobile phone can clean up unlocked apps (i.e., video apps) and corresponding preview interfaces, and display clearing information 1106 on the recent task interface 901, preview interface 902 of the gallery application, train The preview interface 903 of the travel application and the preview interface 909 of the calculator. If the user wishes to clean up the application to which the smart lock has been added, as shown in (a) and (b) in FIG.
  • the mobile phone can clean up the application to which the smart lock is added (that is, the gallery application) and the corresponding preview interface, and display the preview interface 903 of the train travel application on the recent task interface 901, the video Application preview interface 904 , calculator preview interface 909 and cleaning information 1107 .
  • the user wants to clean up the application with manual lock added, as shown in (a) and (b) in Figure 11C, the user can click "clean up manual lock application" 1104.
  • the mobile phone can clean up the manually locked applications (i.e.
  • the mobile phone can also receive the user's operation of sliding up the preview interface in the recent task interface, and in response to the operation, the mobile phone clears the preview interface and the corresponding application. For example, when the user wishes to clean up the train travel application, he may slide up the preview interface (not shown in the figure) of the train travel application.
  • the mobile phone may display a recent task interface 1201, and the recent task interface 1201 includes a preview interface 1202 of the train travel application.
  • the mobile phone may also display a first lock icon 1203 and status information 1204 on the preview interface 1202 of the train travel application.
  • the first lock icon 1203 is used to indicate that the train travel application has been added with a smart lock
  • the status information 1204 is used to indicate that the train travel application is in a keep-alive state, and the keep-alive duration remains 9 minutes and 58 seconds.
  • the mobile phone may receive the user's second operation (for example, the operation of clicking the first lock icon 1203), and in response to this operation, the mobile phone performs an unlocking operation on the locked train travel application. After the mobile phone unlocks the train travel application, as shown in (b) in FIG. 12 , the first lock icon 1203 and status information 1204 can be hidden to indicate that the train travel application is no longer in the keep-alive state.
  • the mobile phone can also receive the user's operation of pulling down the preview interface 1202 (corresponding to the train travel application).
  • the application performs an unlocking operation, and hides the original first lock icon 1203 and status information 1204 in the recent task interface 1201 (shown in (b) in FIG. 13 ).
  • Fig. 12 and Fig. 13 only take unlocking the smart lock as an example to illustrate the process of the user unlocking the application to which the smart lock is added. Since the user unlocks the application with the smart lock and the manual lock in the same process, please refer to Figure 12, Figure 13 and related texts for the process of the user unlocking the application with the manual lock, and will not repeat them here.
  • the mobile phone may also display a list of smart lock applications on the negative screen.
  • the smart lock application list includes multiple smart lock added applications (ie, smart lock applications).
  • the mobile phone may display a negative screen 1401 , and the negative screen 1401 includes a keep-alive application list 1402 .
  • the keep-alive application list 1402 is used to display the application icon, keep-alive duration and lock identification of the smart lock application.
  • the keep-alive application list 1402 may include an icon 1403 for a train travel application, an icon for a music application, and an icon for a browser. Among them, there are 25 minutes left in the keep-alive time of the music application, and 60 minutes left in the keep-alive time of the browser.
  • the user can perform management operations on the applications in the keep-alive application list 1402, such as unlocking, changing the keep-alive duration, setting a keep-alive policy, and so on.
  • a second operation may be initiated on the icon 1403 of the train travel application (ie, an operation of long pressing the train travel application icon 1403 ).
  • the mobile phone may display a setting box 1404 as shown in (b) of FIG. 14 .
  • the setting box 1404 may include an unlocking option 1405, setting a keep-alive duration option 1406, setting a keep-alive policy option 1407, closing an application option, and the like.
  • the mobile phone may receive the user's operation of clicking the setting keep-alive duration option 1406, and in response to the operation, as shown in (c) in FIG. 14 , the mobile phone may display a keep-alive duration setting interface 1408.
  • the keep-alive duration setting interface 1408 is used to provide the user with multiple options for setting the keep-alive duration, such as 5 minutes, "10 minutes” 1409, 20 minutes, custom and so on.
  • the mobile phone After the mobile phone receives the user's operation of choosing to set the keep-alive duration, it can set the keep-alive duration of the train travel application according to the time selected by the user. Exemplarily, if the user wishes to set the keep-alive duration of the train travel application to 10 minutes, he may click "10 minutes" 1409 .
  • the mobile phone may set the keep-alive duration of the train travel application to 10 minutes. As shown in (d) in FIG. 14 , the mobile phone may also display the keep-alive duration 1410 (ie countdown: 10 minutes) of the train travel application in the keep-alive application list 1402 . If the user wants to unlock the smart lock of the train travel application, as shown in (a) in FIG. 15 , the user can click on the unlock option 1405 . In response to the user's operation of clicking the unlock option 1405, the mobile phone can unlock the train travel application, and as shown in (b) in FIG. 15 , the mobile phone hides the icon of the train travel application in the keep-alive application list 1402.
  • the mobile phone can respond to this operation and display the keep-alive strategy setting page (for example, the interface 212 shown in (b) in FIG. 2B ). Its principle and interface are similar to those for setting the keep-alive policy described above, and will not be repeated here.
  • the user can click the close application option 1407 .
  • the mobile phone can directly close the train travel application, and the mobile phone hides the icon of the train travel application in the keep alive application list 1402.
  • the mobile phone may also receive an operation of clicking the icon of the train travel application by the user, and in response to the operation, the mobile phone may display the interface of the train travel application. That is, the user may click an application icon in the keep-alive application list to open an application interface corresponding to the application icon.
  • the mobile phone may also display a list of smart lock applications on the global search interface.
  • the mobile phone may display a main interface 1601 .
  • the mobile phone may receive the user's operation of pulling down the main interface 1601 , and in response to the operation, as shown in (b) in FIG. 16 , the mobile phone may display the global search interface 1602 .
  • the global search interface 1602 includes a keep-alive application list 1603 .
  • the keep-alive application list 1603 is used to display application icons and keep-alive durations of smart lock applications.
  • the keep-alive application list 1603 may include an icon of a train travel application, an icon of a music application, and an icon of a browser. Among them, there are 25 minutes left in the keep-alive time of the music application, and 60 minutes left in the keep-alive time of the browser.
  • the mobile phone may also display a smart lock application list in the drop-down menu bar.
  • the mobile phone may display a main interface 1701 .
  • the mobile phone may receive the user's operation of pulling down the top of the screen, and in response to the operation, the mobile phone may display a drop-down menu bar 1702 as shown in (b) of FIG. 17 .
  • the pull-down menu bar 1702 includes a keep-alive application list 1703 .
  • the keep-alive application list 1703 is used to display application icons and keep-alive durations of smart lock applications.
  • the user can also manage the applications in the keep-alive application list, and the management method and specific interface are the same as those for managing the applications in the keep-alive application list 1402.
  • the process is similar, so the specific content can refer to the above content and Figure 14-15, and will not be repeated here.
  • a first lock icon (eg, first lock icon 205, first lock icon 603, etc.) is added.
  • the mobile phone when the mobile phone displays relevant information of the smart lock application in the keep-alive application list (keep-alive application list 1402 and keep-alive application list 1603), it can simultaneously display information about the smart lock application in the recent task interface.
  • the application adds a first lock icon (eg, first lock icon 205, first lock icon 603, etc.).
  • the mobile phone may display relevant information of the smart lock application and the relevant information of the manual lock application in the keep-alive application list (keep-alive application list 1402 and keep-alive application list 1603).
  • the mobile phone may display a global search interface 1801 .
  • the global search interface 1801 includes a list 1802 of keep-alive applications.
  • the keep-alive application list 1802 includes an icon 1803 of a train travel application, an icon 1804 of a music application, an icon 1805 of a browser, two first lock icons 1806 used to identify the train travel application and the music application respectively, and a first lock icon 1806 used to identify the browser application
  • the two first lock icons 1806 are respectively used to indicate that the train travel application and the music application have been added with smart locks by the mobile phone
  • the second lock icon 1807 is used to indicate that the browser has been manually locked by the mobile phone. It should be noted that the positions of the first lock icon 1806 and the second lock icon 1807 may not be limited to the positions shown in FIG. corner, upper left corner, etc.).
  • the present application provides an application keeping alive method and an electronic device.
  • the electronic device can automatically lock the first application among the recently used multiple applications, so that the first application is kept alive and prevents the first application from being automatically closed by the electronic device. , continue to provide services to users.
  • the present application also provides a chip system 1900 , as shown in FIG. 19 , the chip system 1900 includes at least one processor 1901 and at least one interface circuit 1902 .
  • the processor 1901 and the interface circuit 1902 can be interconnected through wires.
  • interface circuit 1902 may be used to receive signals from other devices (eg, memory of an electronic device).
  • the interface circuit 1902 may be used to send signals to other devices (such as the processor 1901).
  • the interface circuit 1902 can read instructions stored in the memory of the electronic device, and send the instructions to the processor 1901 .
  • the electronic device may be made to execute various steps in the foregoing embodiments.
  • Each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially 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
  • the medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供一种应用保活方法及电子设备,可预测用户还需要使用的应用,并自动给该应用添加智能锁,使该应用处于保活状态,避免被电子设备自动关闭。该方法包括:电子设备自动对运行在后台的第一应用进行第一加锁操作;其中,第一应用为电子设备预测的用户还需要继续使用的应用;响应于用户的第一操作,电子设备显示多任务界面;其中,多任务界面包括第一应用对应的第一预览界面和第二应用对应的第二预览界面;在多任务界面的第一预览界面中显示第一标识以指示第一应用被添加第一类型的应用锁。响应于用户对第二预览界面的第二操作,电子设备对第二应用进行第二加锁操作,并在第二预览界面中显示第二标识以指示第二应用被添加第二类型的应用锁。

Description

一种应用保活方法及电子设备
本申请要求于2021年10月29日提交国家知识产权局、申请号为202111277639.0发明名称为“一种应用保活方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种应用保活方法及电子设备。
背景技术
手机等电子设备中通常安装有多个应用,这些应用可向用户提供丰富的应用服务。例如,手机可安装视频应用、音乐应用及购物应用等。在日常使用场景中,用户可以开启多个应用,例如利用视频应用后台缓存视频,后台音乐应用播放音乐,利用阅读应用进行阅读等。
现有技术中,手机在运行内存不足或是剩余电量不足时,可以自动清理占用内存较大或耗电量较高的应用。例如,视频应用在缓存过程中,既耗电又占用较大的内存空间,手机自动清理后台应用时,很可能将视频应用的后台进程杀死,从而导致缓存中止。
显然,上述清理后台应用的过程中,手机可根据各个应用的耗电量、内存占用情况等判断是否杀死进程而并未考虑用户的实际需求,使得手机容易误关闭用户还需要使用的应用,影响用户体验。
发明内容
本申请提供一种应用保活方法及电子设备。
第一方面,本申请实施例提供一种应用保活方法,方法包括:电子设备自动对运行在后台的第一应用进行第一加锁操作以给第一应用添加第一类型的应用锁;其中,第一应用为电子设备预测的用户还需要继续使用的应用,第一加锁操作用于使第一应用成为被保活的状态。响应于用户的第一操作,电子设备显示多任务界面;其中,多任务界面包括最近使用的多个应用的预览界面,最近使用的多个应用包括第一应用和第二应用,多个应用的预览界面包括第一预览界面和第二预览界面,第一预览界面为第一应用的预览界面,第二预览界面为第二应用的预览界面。在多任务界面的第一预览界面中显示第一标识,其中,第一标识用于指示第一应用被添加第一类型的应用锁。响应于用户对第二预览界面的第二操作,电子设备对第二应用进行第二加锁操作以给第二应用添加第二类型的应用锁,并在第二预览界面中显示第二标识;其中,第二标识用于指示第二应用被添加第二类型的应用锁,第二加锁操作用于使第二应用成为被保活的状态。
基于上述实施例提供的方法,电子设备(例如手机)可预测哪些应用为用户还需要使用的应用(即第一应用),并自动给第一应用添加第一类型的应用锁(即智能锁),可使第一应用处于保活状态,避免第一应用被电子设备自动杀死。此外,电子设备还可接收用户的操作而给应用(例如,第二应用)添加第二类型的应用锁(即手动锁),可满足用户的个性化需求。
在一种实现方式中,第一标识与第二标识的外观不同。通过给第一应用和第二应用添 加不同的标识(如给第一应用添加第一标识,给第二应用添加第二标识),便于用户区分,便于用户区分。
在一种实现方式中,第一类型的应用锁对应的应用默认被保活的时长短于第二类型的应用锁对应的应用默认被保活的时长。被添加手动锁的应用(即第二类型的应用锁对应的应用)默认被保活的时长可为永久,即被添加手动锁的应用(在用户未更改的情况下)一直处于保活状态,被添加智能锁的应用(即第一类型的应用锁对应的应用)默认被保活的时长为固定值(例如,第一数值、第二数值)。
在一种实现方式中,在第一预览界面中还显示了与第一标识相关的第一保活时长,第一保活时长为第一应用被保活的剩余时长。可以理解地,该第一保活时长可实时变化,通过显示第一保活时长,可提示用户第一应用的剩余保活时长,便于用户进行管理。
在一种实现方式中,第一保活时长的最大值为第一数值或者第二数值,第一数值为预设的数值,第二数值为根据第一应用的习惯运行时间及当前时间确定的值,第一应用的习惯运行时间为用户习惯使用第一应用的时间段。也即,被添加智能锁的多个应用可以具备相同的初始保活时长(即第一保活时长的最大值),例如为预设的第一数值;被添加智能锁的多个应用也可以具备不同的初始保活时长(即第二数值),该应用的第二数值为根据该应用的习惯运行时间及当前时间确定的值。
在一种实现方式中,响应于用户对第一预览界面的下拉操作,电子设备将第一应用被保活的剩余时长恢复为第一数值。也即,用户可通过下拉被添加智能锁应用的预览界面,才刷新该应用的剩余保活时长(又称为第一保活时长)。
在一种实现方式中,方法还包括:响应于用户在第一预览界面中对第一标识的第一操作,电子设备显示设置框;其中,设置框包括多个设置选项,多个设置选项用于供用户设置第一保活时长或第一应用的保活策略;响应于用户在多个设置选项中选择第一选项的操作,电子设备将第一保活时长更新为第一选项对应的预设值;或者,响应于用户在多个设置选项中选择第二选项的操作,电子设备显示输入框,响应于用户在输入框中输入第三数值的操作,电子设备将第一保活时长更新为第三数值;或者,响应于用户在所述多个设置选项中选择第三选项的操作,所述电子设备显示所述第一应用对应的保活策略的设置页。
基于上述实施例提供的方法,电子设备可根据用户的需求设置智能锁应用的剩余保活时长。此外,用户可从电子设备提供的多个时间选项中选择一个选项(例如,第一选项)的方式来设置智能锁应用的剩余保活时长,也可以自行在输入框中输入任意数值(例如,第三数值)的方式,或者,可以在电子设备显示所述第一应用对应的保活策略的设置页中修改所述第一应用对应的保活策略(保活策略可以和时间、地点、运动状态等因素相关)。
在一种实现方式中,方法还包括:响应于用户在多个设置选项中选择第一选项或第二选项的操作,电子设备将第一标识更新为第二标识。可见,电子设备接收到用户更改第一应用的保活时间的操作,该应用的应用锁类型便发生变化(由第一类型的应用锁变为第二类型的应用锁)。
在一种实现方式中,方法还包括:响应于用户在第二预览界面中对第二标识的第一操作,电子设备显示设置框;其中,设置框包括多个设置选项,多个设置选项用于供用户设置第二保活时长,第二保活时长为第二应用被保活的剩余时长;响应于用户在多个设置选项中选择第一选项的操作,电子设备在第二预览界面上显示第二保活时长,第二保活时长 为第一选项对应的预设值;或者,响应于用户在多个设置选项中选择第二选项的操作,电子设备显示输入框;响应于用户在输入框中输入第三数值的操作,电子设备在第二预览界面上显示第二保活时长,第二保活时长为第三数值。
基于上述实施例提供的方法,电子设备可根据用户的需求设置手动锁应用的剩余保活时长。此外,用户可从电子设备提供的多个时间选项中选择一个选项(例如,第一选项)的方式来设置手动锁应用的剩余保活时长,也可以自行在输入框中输入任意数值(例如,第三数值)的方式。
在一种实现方式中,方法还包括以下中的至少一项:响应于用户在第一预览界面中对第一标识的第二操作,电子设备对第一应用进行解锁操作并在第一预览界面中不再显示第一标识;或,响应于用户在第二预览界面中对第二标识的第二操作,电子设备对第二应用进行解锁操作并在第二预览界面中不再显示第二标识。也即,用户可通过点击第一标识等操作来解锁第一应用、或者点击第二标识等操作来解锁第一应用,电子设备解锁第一应用后可隐藏第一标识,以表征第一应用不再处于保活状态,电子设备解锁第二应用后可隐藏第二标识,以表征第二应用不再处于保活状态。
在一种实现方式中,电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:响应于确定第一应用正在后台执行预设任务,电子设备对第一应用进行第一加锁操作;其中,预设任务为响应于用户需求而执行的任务。可见,执行满足用户需求的任务的应用,可以认为用户还需要继续使用的应用,电子设备可自动对其进行加锁操作,避免被电子设备杀死。
在一种实现方式中,方法还包括:响应于确定第一应用执行完预设任务,电子设备对第一应用进行解锁操作并在第一预览界面中不再显示第一标识。可见,在第一应用执行完预设任务(可以理解为满足了用户需求)后,便认为该应用不是用户还需要继续使用的应用,电子设备自动对其解锁。
在一种实现方式中,预设任务为下载任务。
在一种实现方式中,电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:响应于确定当前时间在第一应用的习惯运行时间内,电子设备对第一应用进行第一加锁操作;其中,第一应用的习惯运行时间为用户习惯使用第一应用的时间段。可见,当第一应用运行在后台时,若当前时间在第一应用的习惯使用时间内,则可认为该应用是用户还需要继续使用的应用,电子设备可自动对其进行加锁操作。
在一种实现方式中,电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:响应于确定当前时间在第一应用的习惯运行时间内且第一应用的运行环境需求与电子设备的状态信息匹配,电子设备对第一应用进行第一加锁操作;其中,第一应用的运行环境需求用于指示第一应用对电子设备的状态信息的需求,状态信息包括蓝牙连接状态、网络连接状态、位置信息、剩余电量中的至少一种。可见,当第一应用运行在后台时,若当前时间在第一应用的习惯使用时间内且第一应用的运行环境需求与电子设备的状态信息匹配,则可认为该应用是用户还需要继续使用的应用,电子设备可对其进行加锁操作。
在一种实现方式中,多任务界面还包括清理选项,方法还包括:响应于用户对清理选项的第一次操作,电子设备关闭多个应用中未被加锁的应用及该应用的预览界面;响应于用户对清理选项的第二次操作,电子设备关闭多个应用中包括第一应用在内的被添加了第 一类型的应用锁的应用及该应用的预览界面;响应于用户对清理选项的第三次操作,电子设备关闭多个应用中包括第二应用在内的被添加了第二类型的应用锁的应用及该应用的预览界面。
可以理解地,未加锁的应用大概率是用户不需要继续使用的应用,添加第一类型的应用锁的应用可能是用户还需要继续使用的应用,添加第二类型的应用锁的应用大概率是用户还需要继续使用的应用。因此,电子设备可分批清理最近运行的多个应用:用户第一次点击清理选项时,电子设备仅清理未加锁的应用,用户第二次点击清理选项时,电子设备可清理添加智能锁的应用(例如第一应用),用户第三次点击清理选项时,电子设备可清理添加手动锁的应用(例如第二应用),既能够清理应用,又能尽可能保留用户最可能继续使用的应用。
在一种实现方式中,多任务界面还包括清理选项,方法还包括:响应于用户对清理选项的第一次操作,电子设备关闭多个应用中未被加锁的应用及该应用的预览界面;响应于用户对清理选项的第二次操作,电子设备至少关闭多任务界面上当前对用户可见的预览界面及对应的应用,或电子设备至少关闭多任务界面上当前对用户可见的预览界面中显示面积最大的预览界面及对应的应用。可见,电子设备可分批清理最近运行的多个应用:用户第一次点击清理选项时,电子设备仅清理未加锁的应用;用户再次点击清理选项时,电子设备可清理多任务界面上显示的所有预览界面及对应的应用,或者仅清理多任务界面上显示面积最大的预览界面及对应的应用,这种方式可使电子设备清晰地展示其清理了哪些应用,对于用户而言更加直观。
在一种实现方式中,方法还包括:响应于用户对清理选项的操作,电子设备显示清理信息;其中,清理信息用于指示电子设备清理的应用的类型、数量及名称。也即,电子设备清晰可展示其所清理应用的类型、数量及名称等,对于用户而言更加直观。
在一种实现方式中,第一预览界面与第二预览界面彼此相邻,其中,在第一情况下第一预览界面被全部显示且第二预览界面被部分显示,在第二情况下第一预览界面被部分显示或全部显示且第二预览界面被显示的部分多于第一情况下被显示的部分。可见,在多任务界面中可以不同的形式展示最近使用的多个应用的预览界面,例如第一情况可为:多个预览界面呈一列横向排布,且任意两个相邻的预览界面间不存在重叠的区域(可使第一预览界面被全部显示且第二预览界面被部分显示),第二情况可为:多个预览界面可呈一列横向排布,且任意两个相邻的预览界面间存在重叠的区域(可使第一预览界面被部分显示或全部显示且第二预览界面被显示的部分多于第一情况下被显示的部分)。
第二方面,本申请提供一种电子设备,包括:处理器、存储器、通信模块以及一个或多个计算机程序;其中,处理器与通信模块和存储器均耦合,上述一个或多个计算机程序被存储在存储器中,当服务器运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使服务器执行上述任一项所述的应用保活方法。
第三方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在服务器上运行时,使得服务器执行如第一方面中任一项所述的应用保活方法。
第四方面,本申请提供一种芯片系统,该芯片系统包括一个或多个接口电路和一个或多个处理器。该接口电路和处理器通过线路互联。该芯片系统可以应用于包括通信模块和存储器的电子设备。该接口电路可以读取电子设备中存储器中存储的指令,并将该指令发 送给处理器。当所述指令被处理器执行时,可使得电子设备执行如第一方面中任一项的应用保活方法。
第五方面,本申请提供一种计算机程序产品,当计算机程序产品在服务器上运行时,使得服务器执行如第一方面中任一项所述的应用保活方法。
可以理解地,上述提供的第二方面所述的电子设备、第三方面所述的计算机存储介质,以及第五方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1A为本申请提供的一种电子设备的结构示意图;
图1B为本申请提供的一种电子设备的软件架构图;
图2A为本申请提供的一种界面图;
图2B为本申请提供的一种界面图;
图3A为本申请提供的一种界面切换图;
图3B为本申请提供的一种界面切换图;
图4为本申请提供的一种界面图;
图5为本申请提供的一种界面切换图;
图6为本申请提供的一种界面切换图;
图7A为本申请提供的一种界面切换图;
图7B为本申请提供的一种界面图;
图8A为本申请提供的一种界面切换图;
图8B为本申请提供的一种界面切换图;
图9A为本申请提供的一种界面切换图;
图9B为本申请提供的一种界面切换图;
图10A为本申请提供的一种界面切换图;
图10B为本申请提供的一种界面图;
图10C为本申请提供的一种界面图;
图10D为本申请提供的一种界面图;
图10E为本申请提供的一种界面切换图;
图11A为本申请提供的一种界面切换图;
图11B为本申请提供的一种界面切换图;
图11C为本申请提供的一种界面切换图;
图11D为本申请提供的一种界面切换图;
图12为本申请提供的一种界面切换图;
图13为本申请提供的一种界面切换图;
图14为本申请提供的一种界面切换图;
图15为本申请提供的一种界面切换图;
图16为本申请提供的一种界面切换图;
图17为本申请提供的一种界面切换图;
图18为本申请提供的一种界面图;
图19为本申请实施例提供一种芯片系统的结构示意图。
具体实施方式
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
目前,电子设备(如手机)可以自动杀后台。杀后台可以是手机在其运行内存不足或是剩余电量不足时,在最近任务列表中关闭运行内存较大或是耗电量较高的应用的行为,这种行为可以保证电子设备有充足的运行内存使其流畅运行,同时还能节约电量延长电子设备的待机时间。示例性的,视频APP在缓存过程中,既耗电又占用较大的运行内存,手机自动杀后台时,很可能将视频APP相关的进程杀死,使得视频APP被关闭,从而导致缓存中止。
上述方案具有以下特点:手机自动杀后台时,会确定最近任务列表中各个应用的耗电量、内存占用情况等信息,并根据每个应用的耗电量及内存占用情况判断该应用是否需要被关闭。这就导致,若某个应用占用了较大的内存或者耗电量较高,无论该应用是否为用户还需要继续使用的,该应用都很可能会被关闭。换句话说,目前手机自动杀后台的机制导致手机可能误关闭一些用户接下来还需要继续使用的应用,影响用户体验。
针对上述问题,本申请提供一种应用保活方法及电子设备,电子设备可自动对运行在后台的第一应用进行第一加锁操作,以给第一应用添加第一类型的应用锁(可以理解为智能锁)。其中,第一应用为电子设备预测用户还需要继续使用的应用。例如,第一应用可以为响应用户需求而正在执行预设任务(例如,下载任务)的应用,或者可以为符合用户使用习惯的应用等等。后续实施例中将结合具体示例阐述哪些应用为用户还需要使用的应用(即第一应用),故此不予赘述。给第一应用加锁可使第一应用成为被保活的状态,避免第一应用在电子设备自动杀后台时被关闭,持续为用户提供服务。
此外,电子设备还可显示多任务界面。多任务界面包括用户最近使用的多个应用的预览界面,最近使用的多个应用可包括上述第一应用和第二应用,第二应用为电子设备预测用户还可能继续使用的应用。多个应用的预览界面包括第一预览界面和第二预览界面,第一预览界面为第一应用的预览界面,第二预览界面为第二应用的预览界面。电子设备可在第一预览界面中显示第一标识,该第一标识用于指示第一应用被添加第一类型的应用锁。电子设备还可接收用户对第二预览界面的第二操作,响应于该第二操作,电子设备对第二应用进行第二加锁操作以给第二应用添加第二类型的应用锁(可以理解为手动锁),并在第二预览界面中显示第二标识,第二标识用于指示第二应用被添加第二类型的应用锁。
本申请实施例提供的应用保活方法可应用于电子设备中。其中,该电子设备具体可以为手机、平板电脑、电视(也可称为智慧屏、大屏设备等)、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备、车载设备(也可称为车机)、虚拟现实设备等,本申请实施例对此不做任何限制。
如图1A所示,电子设备100(如手机)可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140, 电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
上述电子设备200的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备200的软件结构。图1B是本申请实施例的电子设备200的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图1B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序(application,APP)。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图1B所示,应用程序框架层可以包括活动管理器(activity manager),窗口管理器(window manager service),内容提供器,视图系统,资源管理器,通知管理器及系统界面(system UI)等,本申请实施例对此不做任何限制。
上述活动管理器用于管理每个应用的生命周期。应用通常以activity的形式运行在电子设备200中。对于每一个activity,在活动管理器中都会有一个与之对应的应用记录(Activity Record),这个Activity Record记录了该应用的activity的状态。活动管理器可以利用这个Activity Record作为标识,调度应用的activity进程。
上述窗口管理器用于管理在屏幕上使用的图形用户界面(graphical user interface,GUI)资源,具体可用于:获取显示屏大小、窗口的创建和销毁、窗口的显示与隐藏、窗口的布局、焦点的管理以及输入法和壁纸管理等。
上述内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
上述视图系统可用于构建应用程序的显示界面。每个显示界面可以由一个或多个控件组成。一般而言,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、 导航栏、微件(widget)等界面元素。
上述通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,振动,指示灯闪烁等。
上述system UI为Android系统的核心应用,负责反馈系统及应用状态并与用户保持交互。system UI包括状态栏(status bar)、导航栏(navigation bar)与通知栏(notification panel),以及近期任务界面(recents)等。
应用程序框架层以下的系统库和内核层等可称为底层系统,底层系统中包括用于提供显示服务的底层显示系统,例如,底层显示系统包括内核层中的显示驱动以及系统库中的表面管理器(surface manager)等。
如图1B所示,Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
如图1B所示,系统库可以包括多个功能模块。例如:表面管理器,媒体库(Media Libraries),OpenGL ES,SGL等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。OpenGL ES用于实现三维图形绘图,图像渲染,合成,和图层处理等。SGL是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动等,本申请实施例对此不做任何限制。
下面以电子设备100为手机为例,对本申请实施例提供的应用保活方法进行具体介绍。
手机包括最近任务列表(或称为多任务列表),最近任务列表包括手机最近运行的多个应用(或者可以理解为用户最近使用的多个应用)。其中,最近运行的多个应用可包括已经被手机杀死(即已经关闭的应用)的应用、运行在前台的应用及运行在后台的应用。运行在前台的应用是可见的,可以在手机的当前窗口(当前正在显示的窗口)中运行,且用户可以直接与前台运行的应用交互。运行在后台的应用是不可见的,通常可以在资源管理器中运行,且用户无法直接与后台运行的APP的交互。
手机可自动对最近运行的多个应用中的第一应用进行第一加锁操作。其中,第一加锁操作可指手机给第一应用添加智能锁的操作,该第一加锁操作可使第一应用成为被保活的状态(可以理解为不会被手机自动杀死的状态),以避免该第一应用在手机自动杀后台时被关闭。可以理解地,手机自动杀后台时,可以不关闭被添加智能锁(即处于保活状态)的应用,从而使被添加智能锁的应用可保持运行状态。
其中,第一应用为电子设备预测的用户还需要继续使用的应用。具体的,第一应用可以包括两种类型:第一种类型为运行在后台且符合用户使用习惯的应用;第二种类型为运 行在后台且正响应用户需求而正在执行预设任务的应用。接下来,将具体说明手机如何从最近任务列表中确定第一应用。
对于第一种类型,手机可获取习惯使用数据,并根据习惯使用数据判断最近运行的多个应用是否为第一应用。其中,习惯使用数据可用于反映用户对每个应用的习惯使用时间、习惯使用地点、习惯使用状态等。
手机可获取习惯使用数据的途径可包括两种:一是手机可收集用户在使用每个应用时的习惯,并从中提取出习惯使用数据。二是手机可为用户提供设置保活策略(可以理解为设置习惯使用数据)的途径,响应于用户的设置操作而获取习惯使用数据。示例性的,如图2A中的(a)所示,手机可显示设置界面201。该设置界面201可包括多个设置选项,例如无线和网络、设备连接、电池、应用保活202等。用户希望自行设置保活策略时,可点击该应用保活202的选项。响应于该操作,手机可显示如图2A中的(b)所示的应用保活设置界面203。该应用保活设置界面203可为用户提供设置同类型应用保活策略的选项(例如,视频类应用保活策略204、游戏类应用保活策略等)及单独设置某个应用的保活策略的选项(例如,荣耀视频205、消消乐等)。其中,所有应用可根据其所属的应用类型集中排列,便于用户管理及查看。例如,荣耀视频205、a视频应用、b视频应用均为视频类应用,可以集中排列,消消乐、“斗地主”都是游戏类应用,可以集中排列。
示例性的,手机可接收用户点击视频类应用保活策略204的操作,响应于该操作,手机可显示如图2A中的(c)所示的界面206。该界面206可包括输入栏207及应用选择栏208。输入栏207可供用户设置视频类应用的习惯使用时间(即界面206中的“时间”)、习惯使用地点(即界面206中的“地点”)、习惯使用状态(即界面206中的“运动状态”)等。应用选择栏208中包括所有被手机预分类至视频类应用(例如荣耀视频205、a视频应用、b视频应用等)。应用选择栏208可供用户手动选择需要被分类至视频类应用,以满足用户的个性化需求。例如,用户可在输入栏207中“时间”这一栏输入或选择“周一至周五20:00-21:00”,在“地点”这一栏输入或选择“家”,在“状态”这一栏输入或选择“静止”,并在应用选择栏208中选择除荣耀视频205以外的其他视频类应用后,点击确认选项209。响应于该操作,手机可将除荣耀视频205以外的其他视频类应用的习惯使用时间设置为“周一至周五20:00-21:00”,将习惯使用地点设置为“家”,将习惯使用状态设置为“静止”。可见,手机可以批量设置同类应用的习惯使用数据,便于用户统一管理。
示例性的,如图2B中的(a)所示,手机可接收用户点击荣耀视频205的操作,响应于该操作,手机可显示如图2B中的(b)所示的界面210。界面210包括显示区域1及显示区域2。显示区域1可指示荣耀视频205当前的保活策略(例如,时间为“周一8:30-9:00”、地点为“家”、状态为“静止”)。显示区域2可包括各类应用(例如视频类应用、游戏类应用、通讯类应用)的保活策略(例如,视频类应用保活策略为:时间为“周一至周五20:00-21:00”、地点为“家”、状态为“静止”)。若用户希望快速更改荣耀视频205的保活策略,可直接从显示区域2中任选一类应用的保活策略,并点击保存选项211。例如,手机可接收用户在显示区域2中选择“遵循视频类应用保活策略”并点击保存选项211的操作,将荣耀视频205的保活策略更改视频类应用保活策略。若用户希望自行设置荣耀视频205的保活策略,可在显示区域1中分别输入或选择时间、地点及状态。手机可接收用户在显示区域1中设置保活策略后点击保存选项211的操作,将荣耀视频205的保活策略更改为 用户自行设置的值。需要说明的是,如图2B中的(c)所示,在手机设置成功后,手机可在显示区域1中自动刷新荣耀视频205的保活策略。
在一种可选的设计中,若用户未手动设置保活策略,则该保活策略中的各项参数可以默认设置为手机采集并提取的习惯使用数据中的对应参数值。
在一种可选的设计中,手机可根据用户的习惯使用地点、习惯使用状态或者习惯使用数据包括的其他参数中的任意一种参数,单独判断运行在后台的应用是否为用户还需要继续使用的应用。示例性的,手机可在应用a被后台化时,判断当前时间与应用a对应的习惯使用时间是否匹配。其中,当前时间可指手机当前的系统时间,当前时间与应用a对应的习惯使用时间匹配可指当前时间在习惯使用时间所指示的范围内。例如,应用a运行时的系统时间(即当前时间)为8:20,应用a的习惯使用时间为8:00-9:00,则由于8:20在8:00-9:00这一时间范围内,可以认为当前时间与应用a对应的习惯使用时间匹配。若当前时间与应用a对应的习惯使用时间匹配,手机可将应用a作为用户需要继续使用的应用(即第一应用)。示例性的,用户的习惯使用数据可以如表1所示:
表1
应用名称 习惯使用时间
音乐应用 8:00-8:30
阅读应用 8:00-8:30
视频应用 12:00-13:00
运动应用 20:30-21:00
…… ……
根据表1可知,用户习惯在早上8:00-8:30期间使用音乐应用及阅读应用,习惯在中午12:00-13:00期间使用视频应用,以及习惯在晚上20:30-21:00期间使用运动应用。因此,若音乐应用及阅读应用在早上8:00-8:30期间处于后台运行状态,则在此期间可以认为音乐应用及阅读应用需要保活,手机可以给音乐应用及阅读应用添加智能锁。若视频应用在中午12:00-13:00期间处于后台运行状态,则在此期间可以认为视频应用需要保活,手机可以给视频应用添加智能锁。若运动应用在晚上20:30-21:00期间处于后台运行状态,则在此期间可以认为运动应用需要保活,手机可以给运动应用添加智能锁。
需要说明的是,手机根据习惯使用地点、习惯使用状态等参数单独判断运行在后台的应用是否为用户还需要继续使用的应用的方式,与前述关于习惯使用时间的内容类似,在此不再赘述。
在另一种可选的设计中,手机还可以根据用户的习惯使用地点、习惯使用状态及习惯运行数据中的其他参数综合进行判断。该习惯使用地点可理解为用户使用对应应用的常规地点,例如音乐应用的习惯使用地点可为上班途中,视频应用的习惯使用地点可为家里等。该习惯使用状态可理解为用户使用对应应用时所处的状态。例如视频应用的习惯使用状态可以为静止状态,运动应用的习惯使用状态可以为运动状态。
示例性的,手机可在应用b被后台化时,判断当前时间与应用b对应的习惯使用时间是否匹配、判断机当前所处位置与该应用b对应的习惯使用地点是否匹配以及判断用户当前的运行状态与应用b对应的习惯使用状态是否匹配,若当前时间与习惯使用时间匹配、当前所处位置与习惯使用地点匹配且用户当前的运动状态与习惯使用状态匹配,手机可将 应用b作为用户需要继续使用的应用(即第一应用)。
在一种设计中,手机还可以结合习惯使用数据、每个应用的运行环境需求、手机的状态信息综合判断后台运行的应用是否为第一应用。其中,应用的运行环境需求可指示应用对手机的状态信息的需求,例如是否需要连接蓝牙、是否连网、电量是否充足等。可见,状态信息可包括蓝牙连接状态、网络连接状态、剩余电量中的至少一种。示例性的,若应用b只能在连网的情况下才能正常运行,则手机在确认当前时间、位置和/或运动状态与该应用b对应的习惯使用数据匹配时,手机还应进一步确认网络连接状态。若网络连接状态指示手机已连网,手机可将应用b作为用户需要继续使用的应用。否则,手机不会将应用b作为用户需要继续使用的应用。
对于第二种类型,手机可预先给每个应用配置保活任务(又称为预设任务)。保活任务可包括应用为满足用户需求而执行的任务。在一种可选的实施方式中,该保活任务可以是手机根据应用的类型设置的。例如音乐类应用的保活任务可以为播放音乐,视频类应用的保活任务可以为缓存视频。在另一种可选的实施方式中,该保活任务也可由用户自行设置。手机可以监测运行在后台的每个应用是否正在执行对应的保活任务。若确定任意一个应用正在执行对应的保活任务,则手机将该应用作为用户还需要继续使用的应用,给其添加智能锁,避免该应用被手机自动关闭。示例性的,各个应用及对应的保活任务可以如表2所示:
表2
应用名称 保活任务
音乐应用 播放音乐
火车出行应用 抢票
视频应用 缓存视频
游戏应用 正在游戏
…… ……
根据表2可知,音乐应用的保活任务是播放音乐,火车出行应用的保活任务是抢票,视频应用的保活任务是缓存视频,游戏应用的保活任务是正在游戏。如此,若视频应用正在缓存视频,则为了避免手机自动关闭视频应用导致缓存中止,手机可以自动给视频APP添加智能锁。若火车出行应用正在抢票,则为了避免手机自动关闭火车出行应用导致无法抢票,手机可以自动给火车出行应用添加智能锁。若音乐应用正在播放音乐,则为了避免手机自动关闭音乐应用导致中断播放音乐,手机可以自动给音乐应用添加智能锁。需要说明的是,表2仅为示例,实际上一个应用可以对应一个或多个保活任务。
在本申请实施例中,手机给第一应用添加智能锁后,还可以在最近任务界面(或称为多任务界面)上给第一应用添加智能锁标识(又可以称为第一标识)。其中,最近任务界面用于显示最近使用的多个应用的预览界面,以及各个应用的加锁情况。手机可以接收用户开启最近任务界面的操作,响应于该操作,手机可以显示最近任务界面。其中,用户开启最近任务界面的操作可以包括多种。在一种设计中,如图3A中的(a)所示,手机可接收用户在屏幕底部上滑并保持手指触摸屏幕不抬起的操作,响应于该操作,手机可显示如图3A中的(b)所示的最近任务界面301。最近任务界面301可包括图库应用的预览界面302、火车出行应用的预览界面303、视频应用的预览界面304。此外,手机还在火车出行 应用的预览界面303上显示第一加锁图标305,该第一加锁图标305用于指示火车出行应用被手机添加了智能锁。需要说明的是,在预览界面303上显示第一加锁图标305,也可理解为在预览界面303附近的预设位置显示该第一加锁图标305,例如在预览界面303的上下左右四个角、预览界面303内等任意位置显示第一加锁图标305,在此不做具体限制。
在另一种设计中,如图3B中的(a)所示,手机可在屏幕底部显示虚拟导航栏306。虚拟导航栏306包括多个虚拟按键,如返回键、Home键及功能键307。手机可接收用户点击功能键307的操作,响应于该操作,手机可以显示如图3B中的(b)所示的最近任务界面301。
需要说明的是,多个应用的预览界面在最近任务界面301中的排列顺序与多个应用被用户使用的先后顺序对应。示例性的,用户按照先后顺序依次使用了图库应用、火车出行应用及视频应用,则在最近任务界面301中,图库应用的预览界面302、火车出行应用的预览界面303以及视频应用的预览界面304从上至下或从右至左依次排列。
还需要说明的是,由于手机屏幕尺寸的局限性,最近任务界面上可显示的预览界面有限。例如,在图3B所示的最近任务界面301中,最近任务界面301仅显示了图库应用的预览界面302、火车出行应用的预览界面303及视频应用的预览界面304,但这并不代表最近使用的应用仅包括图库应用、火车出行应用及视频应用这3个应用。最近使用的应用还可包括除图库应用、火车出行应用及视频应用以外的其他应用,其他应用的预览界面可通过用户左滑或右滑屏幕的方式显示于最近任务界面301上。
在本申请实施例中,手机可以在第一预览界面上显示第一应用的剩余保活时长(可以理解为第一应用被保活的剩余时长,又可以称为第一保活时长)。示例性的,仍然以第一应用为火车出行应用为例,如图4所示,手机可在火车出行应用的预览界面403上显示状态信息403。该状态信息403可用于指示火车出行应用的剩余保活时长。例如,状态信息403可以为“保活中,倒计时:9分58秒”。
手机给第一应用添加智能锁时,第一应用的剩余保活时长与第一应用的初始保活时长相等,其中,初始保活时长可指第一应用被保活的最大时长。此后,在用户未重新设置或者刷新第一应用的剩余保活时长的情况下,第一应用的剩余保活时长将持续减少,直至变为0。
在一种设计中,每个应用的初始保活时长可以相同,例如为预设的第一数值(可以理解为一个预设的数值),该第一数值可以为5分钟、10分钟、1小时等任意数值。也即,手机可以给每个被确定为用户还需要继续使用的应用添加智能锁,且该应用的初始保活时长相同,均为第一数值。在一些设计中,手机可接收用户对第一预览界面的下拉操作,响应于该操作,手机将第一应用的剩余保活时长恢复为第一数值,可使用户快速延长第一应用的保活时长。
在一种设计中,每个应用的初始保活时长可以不同,例如为第二数值。第二数值为手机根据当前时间与应用的习惯运行时间确定的。第二数值至少可使该应用在其习惯运行时间内可处于保活状态。示例性的,当前时间为8:40,应用c的习惯运行时间为8:30-9:00,则为保证应用c可在8:40-9:00之间处于保活状态不被杀死,该应用c的初始保活时长至少可以为20分钟。又或者,第二数值也可为手机预估应用执行保活任务所需的时间。第二数值至少可使该应用可在执行该保活任务期间处于保活状态。示例性的,视频应用在缓存 视频时,手机可以根据视频文件的大小及网速估算缓存视频文件需要的时间,例如为30分钟,则手机可以将视频应用的初始保活时长设置为30分钟。
在一种设计中,手机也可不在第一预览界面上显示第一应用的剩余保活时长。需要说明的是,不显示第一应用的剩余保活时长并不意味着第一应用一直处于保活状态。手机可实时监测第一应用的保活任务的任务进程,一旦确定该保活任务执行完毕,则可自动取消第一应用的智能锁(即对第一应用进行解锁操作)。示例性的,手机可给正在进行缓存任务的视频应用添加智能锁,当手机监测到缓存任务执行完毕或接收到缓存任务执行完毕的通知时,自动取消视频应用的智能锁。
在本申请实施例中,不仅手机可以自动给第一应用添加智能锁,用户也可自行选择应用(例如,第二应用)对其进行加锁操作。示例性的,如图5中的(a)所示,手机可显示最近任务界面501,最近任务界面501包括图库应用的预览界面502、火车出行应用的预览界面503及视频应用的预览界面504。若用户希望火车出行应用不被手机杀死,可以下拉火车出行应用的预览界面503。手机可接收用户下拉火车出行应用的预览界面503的操作,响应于该操作,手机可以给火车出行应用添加手动锁(即对火车出行应用进行第二加锁操作)。为了便于用户了解手机是否给应用加锁,如图5中的(b)所示,手机可在火车出行应用的预览界面503上显示第二加锁图标505,第二加锁图标505用于指示火车出行应用被添加了手动锁。需要说明的是,第二应用被添加手动锁后,第二应用便可一直处于保活状态。换句话说,默认情况下,被添加手动锁的应用的保活时长大于被添加智能锁的应用的保活时长。
手机显示最近任务界面时,用户可对最近使用的多个应用进行管理。例如,设置应用的保活时长、设置应用的保活策略、给应用解锁、清理应用等。接下来,将分别说明给应用设置保活时长、给应用解锁、清理应用的过程。
最近任务界面可为用户提供设置被加锁应用的保活时长的途径。示例性的,如图6中的(a)所示,手机可以显示最近任务界面601,最近任务界面601包括火车出行应用的预览界面602。预览界面602上显示有第一加锁图标603以及第一状态信息604。其中,第一加锁图标603用于指示火车出行应用被添加智能锁,第一状态信息604用于指示火车出行应用处于保活状态,且保活时长剩余9分58秒。手机可接收用户对第一加锁图标603的第一操作(例如,长按第一加锁图标603的操作),响应于该操作,如图6中的(b)所示,手机可显示设置框605。设置框605可包括解锁选项、设置保活时长选项606、设置保活策略选项607及关闭应用选项等。手机可接收用户点击设置保活时长选项606的操作,响应于该操作,手机显示如图6中的(c)所示的保活时长设置界面608。保活时长设置界面608可为用户提供多个设置保活时长的选项,例如5分钟、10分钟、“20分钟”609、自定义等。手机接收到用户选择保活时长的操作后,可将应用的保活时长设置为用户选择的值。示例性的,若用户希望将火车出行应用的保活时长设置为20分钟,则可点击“20分钟”609。手机可接收用户对“20分钟”609的第二操作(例如,点击“20分钟”609的操作),响应于该操作,如图6中的(d)所示,手机将第一加锁图标603更改为第二加锁图标610,将第一状态信息604更改为第二状态信息611。其中,第二加锁图标610用于指示火车出行应用被添加手动锁,第二状态信息611用于指示火车出行应用处于保活状态,且保活时长剩余20分钟。可以理解地,若原本被添加智能锁的应用,在用户设置其保活时长后, 手机可以更改该应用的加锁类型,即从智能锁更改为手动锁。
在一种可选的设计中,手机也可接收用户对第一状态信息604的点击操作,响应于该操作,手机可直接显示如图6中的(c)所示的保活时长设置界面605,实现对保活时长的快速设置或修改。
需要说明的是,上述内容仅以已经配置有保活时长的应用为例来说明用户设置保活时长的过程。对于未设置保活时长的应用,用户也可以利用上述流程设置其保活时长,具体内容请参阅图6及相关文字内容,在此不再赘述。
用户还可以给被添加手动锁的应用设置保活时长。示例性的,如图7A中的(a)所示,手机可显示最近任务界面701,最近任务界面701包括火车出行应用的预览界面702。火车出行应用的预览界面702上显示有第二加锁图标703。其中,第二加锁图标703用于指示火车出行应用被添加手动锁。手机可以接收用户对第二加锁图标703的第一操作(例如,长按第二加锁图标703的操作),响应于该操作,如图7A中的(b)所示,手机可显示设置框704。设置框704可包括解锁选项、设置保活时长选项705、设置保活策略选项及关闭应用选项等。手机可接收用户点击设置保活时长选项705的操作,响应于该操作,手机显示如图7A中的(c)所示的保活时长设置界面706。保活时长设置界面706可为用户提供多个设置保活时长的选项,例如5分钟、10分钟、20分钟、“自定义”707等。手机接收到用户选择设置保活时长的操作后,将应用的保活时长设置为用户输入的值。示例性的,若用户希望将火车出行应用的保活时长设置为15分钟,则可以点击“自定义”707。手机可以接收用户对“自定义”707的第二操作(例如,点击“自定义”707的操作),响应于该操作,如图7A中的(d)所示,手机显示输入框708。手机可接收用户在输入框708中选择或输入15分钟并确定的操作,响应于该操作,手机可重新显示最近任务界面701,并在火车出行应用的预览界面702上显示状态信息709(如图7B所示)。其中,状态信息709用于指示火车出行应用处于保活状态,且保活时长剩余20分钟。
最近任务界面还可为用户提供设置应用的保活策略的途径。示例性的,如图8A中的(a)所示,手机可显示最近任务界面801。最近任务界面801可包括荣耀视频的预览界面802。该预览界面802显示有第一加锁图标803,第一加锁图标803用于指示荣耀视频被添加智能锁。手机可接收用户长按第一加锁图标803的操作,响应于该操作,手机显示如图8A中的(b)所示的设置框804。设置框804可包括解锁选项、设置保活时长选项、设置保活策略选项805及关闭应用选项等。若用户希望设置或更改荣耀视频的保活策略,可点击设置保活策略选项805,响应于该操作,手机可显示保活策略设置界面。在一种可选的设计中,保活策略设置界面可如图8A中的(c)所示,保活策略设置界面806可包括提示信息807、设置区808、关联选项809、取消选项、保存选项、不再自动保活等。其中,提示信息807可指示该应用的保活策略是根据用户的使用习惯设置的,例如“根据您的使用习惯,荣耀视频的保活规则如下,您可按需修改”。设置区808可供用户设置时间、地点、运动状态等参数。关联选项809可为用户提供将荣耀视频的保活策略应用至所有视频类应用的途径。当用户在设置区808中设置了参数并选中关联选项809时,手机可接收用户点击保存选项的操作,响应于该操作,手机将荣耀视频的保活策略应用至所有视频类应用。如此,包括荣耀视频在内的所有出行类应用的保活策略均为:习惯使用时间为周一至周五20:00-21:00,习惯使用地点为家,习惯使用状态为静止。若用户希望不再自动保活荣耀视 频,则可在保活策略设置界面806中勾选“不再自动保活”。
在一种可选的设计中,如图8B的(a)、(b)所示,手机可接收用户点击设置保活策略选项805的操作,响应于该操作,手机显示如图8B的(c)所示的保活策略设置界面810。该保活策略设置界面810可包括提示信息811、设置区812、选择区813、取消选项、保存选项等。其中,提示信息811可指示该应用的类型,以及说明该应用的保活策略为该应用所述类型的保活策略。例如为“荣耀视频为视频类应用,目前系统为该应用选择了视频类应用的保活策略(根据您使用视频类应用的使用习惯确定)”。设置区808可供用户自由设置时间、地点、运动状态等参数,并可以提供“应用到所有视频类应用”的选项。选择区813提供了多类应用(例如视频类应用、游戏类应用、资讯类应用等)的保活策略供用户进行选择。若用户不希望采用选择区813中提供的保活策略,则可以自行在设置区812按需设置各项参数,并可选中“应用到所有视频类应用”,响应于该操作,手机将各项参数应用至荣耀视频应用的保活策略,并将荣耀视频应用的保活策略应用到所有视频类应用。若用户希望采用选择区813中的一种保活策略(例如游戏类应用保活策略),则可选中该“游戏类应用保活策略”并点击保存选项,响应于该操作,手机将游戏类应用保活策略应用至该荣耀视频应用。同理,若用户希望不再自动保活荣耀视频应用,则可在保活策略设置界面810中勾选“不再自动保活”。
可见,手机既可以从设置页面处对应用的保活策略进行管理,也可在多任务界面最应用的保活策略进行设置,多个入口便于用户管理,实用性较强,能有效提升用户体验。
最近任务界面还可为用户提供清理应用的途径。对于已经被杀死的应用,清理该应用可以理解为删除该应用的最近使用记录。对于还在运行的应用,清理该应用可理解为杀死该应用并删除该应用的最近使用记录。手机清理应用的方式可以包括多种,分别为:第一种,分批次清理未加锁、被添加智能锁、被添加手动锁的应用。第二种,分批次清理未加锁、被加锁(包括被添加智能锁和手动锁)的应用。第三种,分批清理多任务界面上当前对用户可见的预览界面所对应的应用。第四种,仅清理用户希望清理的应用。
接下来,将以以下场景为例,分别说明手机批量清理应用的各种方法。该场景具体为:最近使用的多个应用包括按照使用先后顺序排列的图库应用、火车出行应用、荣耀视频及计算器,其中图库应用为用户最先使用的应用,计算器为用户最后使用的应用,图库应用被添加智能锁,火车出行应用及计算器被添加手动锁,荣耀视频未被添加任何锁。
第一种,手机分批次清理未加锁、被添加智能锁、被添加手动锁的应用。具体的,手机可在第一次接收到清理指令时,先清理未加锁应用;在第二次接收到清理指令时,再清理添加智能锁的应用;在第三次接收到清理指令时,再清理添加手动锁的应用。示例性的,如图9A中的(a)所示,手机可以显示最近任务界面901。最近任务界面901可包括图库应用的预览界面902、火车出行应用的预览界面903、视频应用的预览界面904。图库应用的预览界面902上显示有第一加锁图标905,火车出行应用的预览界面903上显示有第二加锁图标906。该第一加锁图标905用于指示图库应用被添加了智能锁,第二加锁图标906用于指示火车出行应用被添加了手动锁,视频应用未被加任何锁(故视频应用的预览界面904上并未显示第一加锁图标或第二加锁图标)。最近任务界面901上还包括清理图标907,手机可以接收用户点击清理图标907的操作,响应于该操作,手机可清理(或者理解为杀掉或关闭)多个最近运行的应用中的未加锁应用(即视频应用)。在手机清理视频应用后, 如图9A中的(b)所示,手机可在最近任务界面901上关闭(或理解为不再显示)视频应用的预览界面804以及显示第一清理信息908、计算器的预览界面909。第一清理信息908用于提示用户手机清理了未加锁应用、清理应用的数量及被清理应用的名称等,例如,第一清理信息908可以为“已清理1个未加锁应用:视频应用”。手机可以接收用户再次点击清理图标907的操作,响应于该操作,手机可以清理所有被添加智能锁的应用(即图库应用),且如图9A中的(c)所示,手机在最近任务界面901上关闭图库应用的预览界面802以及显示第二清理信息910。第二清理信息910用于提示用户手机清理了添加智能锁的应用、清理应用的数量及被清理应用的名称等,例如,第二清理信息908可以为“已清理1个智能加锁应用:图库应用”。手机可以接收用户再次点击清理图标907的操作,响应于该操作,手机可以清理所有被添加手动锁的应用(即火车出行应用及计算器),且如图9A中的(d)所示,手机显示第三清理信息911。第三清理信息911用于提示用户手机清理了添加手动锁的应用、清理应用的数量及被清理应用的名称等,例如,第三清理信息911可以为“已清理2个手动加锁应用:火车出行应用、计算器”。在本申请实施例中,上述的第一清理信息908、第二清理信息910及第三清理信息911,可以在预设时间后消失。又或者,手机可以不显示第一清理信息908及第二清理信息910及第三清理信息911。需要说明的是,后文出现的第一清理信息、第二清理信息及第三清理信息均可以参考第一清理信息908、第二清理信息910及第三清理信息911的设置,即可以在预设时间后消失,也可以直接不显示。
第二种,手机分批次清理未加锁、被加锁(包括被添加智能锁和手动锁)的应用。具体的,手机可在第一次接收到清理指令时,先清理未加锁应用;在第二次接收到清理指令时,再清理所有被加锁应用(添加智能锁的应用及添加手动锁的应用)。示例性的,如图9B中的(a)所示(关于最近任务界面901的相关描述见图9A的文字部分,在此不再赘述),手机可以接收用户点击清理图标907的操作,响应于该操作,手机可清理多个最近运行的应用中的未加锁应用(即视频应用),并在最近任务界面901上关闭视频应用的预览界面904以及显示清理信息912(如图9B中的(b)所示)及计算器的预览界面909。清理信息912用于提示用户手机清理了未加锁应用、清理应用的数量及被清理应用的名称等,例如,清理信息912可以为“已清理1个未加锁应用:视频应用”。手机可以接收用户再次点击清理图标907的操作,响应于该操作,手机可清理所有加锁应用(即图库应用、火车出行应用以及计算器),并显示如图9B中的(c)所示的清理信息913。清理信息913用于提示用户手机清理了添加手动锁及智能锁的应用、清理应用的数量及被清理应用的名称等,例如,清理信息913可以为“已清理3个手动加锁应用:图库应用、火车出行应用、计算器”。
可以理解地,第一种清理方式及第二种清理方式均为先清理未加锁应用,再清理加锁应用,可避免手机直接清理用户还需要继续使用的应用。
第三种,手机分批清理最近任务界面上当前对用户可见的预览界面所对应的应用。具体的,手机可接收用户发起的第一次清理操作,响应于该操作,手机可以清理未加锁应用。手机还可接收用户发起的第二次清理操作,响应于该操作,手机可以清理最近任务界面上当前对用户可见的预览界面及对应的应用。其中,当前对用户可见的预览界面可为最近任务界面上显示的所有预览界面(例如图9A的(a)中的预览界面902、预览界面903及预 览界面904)。示例性的,如图10A中的(a)所示(关于最近任务界面901的相关描述见图9A的文字部分,在此不再赘述),手机可以接收用户点击清理图标907的操作,响应于该操作,如图10A中的(b)所示,手机在最近任务界面901上关闭视频应用的预览界面904,并在最近任务界面901显示清理信息1001及计算器的预览界面909。手机可以接收用户再次点击清理图标907的操作,响应于该操作,如图10A中的(c)所示,手机在最近任务界面901上关闭当前对用户可见的预览界面(即图库应用的预览界面902、火车出行应用的预览界面903及计算器的预览界面909),并关闭图库应用、火车出行应用及计算器。手机还可在最近任务界面901上显示清理信息1002。清理信息1002用于提示用户手机清理了当前可见的应用、清理应用的数量及被清理应用的名称等,例如,清理信息913可以为“已清理3个可见的应用:图库应用、火车出行应用、计算器”。在一种可选的设计中,手机接收到用户再次点击清理图标907时,也可仅清理当前对用户可见的预览界面中显示面积最大的预览界面(即火车出行应用的预览界面903)。
可以理解地,最近任务界面可以不同的形式展示最近使用的多个应用的预览界面。前文所述的最近任务界面中,多个预览界面呈一列横向排布,且任意两个相邻的预览界面间不存在重叠的区域。在其他实施方式中,多个预览界面可呈一列横向排布,且任意两个相邻的预览界面间存在重叠的区域,例如图10B所示的最近任务界面。又例如,多个预览界面可分为多列,每列包括彼此不重叠的多个预览界面,例如图10C或图10D(其中电子设备为平板)所示的最近任务界面。需要说明的是,多个预览界面在最近任务界面中排布的方式不同,并不应当影响本申请的具体实现。
示例性的,最近任务界面按图10B所示的方式显示预览界面时,手机可以显示如图10E中的(a)所示的最近任务界面1003。最近任务界面1003可包括图库应用的预览界面1004、火车出行应用的预览界面1005、视频应用的预览界面1006及计算器的预览界面1007。手机在图库应用的预览界面1004上显示第二清理图标1008、在火车出行应用的预览界面1005上显示显示第一清理图标1009以及在计算器的预览界面1007上显示第一清理图标1010。该第二清理图标1008用于指示图库应用被添加智能锁,第一清理图标1009用于指示火车出行应用被添加手动锁,第一清理图标1010用于指示计算器被添加手动锁。最近任务界面1003还可包括清理图标1011,手机可以接收用户点击清理图标1011,响应于该操作,如图10E中的(b)所示,手机可以在最近任务界面1003上关闭未加锁的应用(即视频应用),并显示清理信息1012。手机还可以接收用户再次点击清理图标1011,响应于该操作,手机可以关闭最近任务界面1003上当前对用户可见的应用(即图库应用、火车出行应用、计算器),或者,手机可以关闭最近任务界面1005上所有被加锁的应用(即图库应用、火车出行应用、计算器);且进一步地,如图10E中的(c)所示,手机还可显示清理信息1013,以提示被清理应用的数量及名称等。
第四种,手机可清理用户希望清理的部分应用。这种情况下,手机所清理的应用是用户根据实际需求选择的。示例性的,如图11A中的(a)所示(关于最近任务界面901的相关描述见图9A的文字部分,在此不再赘述),手机可以接收用户长按清理图标907的操作,响应于该操作,手机显示清理提示框1101。清理提示框1101用于给用户提供多个清理应用的选项,例如“清理未加锁加应用”1102,“清理智能锁应用”1103,“清理手动锁应用”1104,“清理所有应用”1105等。若用户希望清理未加锁加应用,则可以点击“清理未加 锁加应用”1102如图11A中的(b)所示,响应于用户点击“清理未加锁加应用”1102的操作,如图11A中的(c)所示,手机可清理未被加锁的应(即视频应用)及对应的预览界面,并在最近任务界面901上显示清理信息1106、图库应用的预览界面902、火车出行应用的预览界面903及计算器的预览界面909。若用户希望清理被添加了智能锁的应用,如图11B中的(a)、(b)所示,用户可以点击“清理智能锁应用”1103,响应于用户点击“清理智能锁应用”1103的操作,如图11B中的(c)所示,手机可清理被添加智能锁的应用(即图库应用)及对应的预览界面,并在最近任务界面901上显示火车出行应用的预览界面903、视频应用的预览界面904、计算器的预览界面909及清理信息1107。若用户希望清理被添加了手动锁的应用,如图11C中的(a)、(b)所示,用户可以点击“清理手动锁应用”1104,响应于用户点击“清理手动锁应用”1104的操作,如图11C中的(c)所示,手机可清理被添加手动锁的应用(即火车出行应用和计算器)及对应的预览界面,并可在最近任务界面901上显示图库应用的预览界面902、视频应用的预览界面904及清理信息1108。若用户希望清理所有应用,如图11D中的(a)、(b)所示,用户可以点击“清理所有应用”1105,响应于用户点击“清理所有应用”1105的操作,如图11D中的(c)所示,手机可以清理最近运行的所有应用(即图库应用、火车出行应用、视频应用及计算器)及对应的预览界面,并在最近任务界面901上显示清理信息1109。
在一种可选的设计中,手机还可接收用户在最近任务界面中上滑预览界面的操作,响应于该操作,手机清理该预览界面及对应的应用。例如,用户希望清理火车出行应用时,可上滑火车出行应用的预览界面(图未示)。
应用被加锁(智能锁或手动锁后),用户可以对其进行解锁操作。在一种设计中,如图12中的(a)所示,手机可以显示最近任务界面1201,最近任务界面1201包括火车出行应用的预览界面1202。手机还可在火车出行应用的预览界面1202上显示第一加锁图标1203以及状态信息1204。其中,第一加锁图标1203用于指示火车出行应用被添加智能锁,状态信息1204用于指示火车出行应用处于保活状态,且保活时长剩余9分58秒。手机可以接收用户的第二操作(例如,点击第一加锁图标1203的操作),响应于该操作,手机对已加锁的火车出行应用进行解锁操作。手机对火车出行应用进行解锁操作后,如图12中的(b)所示,可以在隐藏第一加锁图标1203以及状态信息1204,以表明火车出行应用已经不再处于保活状态。
在另一种设计中,如图13中的(a)所示,手机还可以接收用户下拉预览界面1202(对应于火车出行应用)的操作,响应于该操作,手机对已加锁的火车出行应用进行解锁操作,并在最近任务界面1201中隐藏原有的第一加锁图标1203以及状态信息1204(图13中的(b)所示)。
需要说明的是,图12及图13仅以解除智能锁为例,说明用户对被添加智能锁的应用进行解锁的过程。鉴于用户对添加智能锁和手动锁的应用的解锁过程相同,因此关于用户对被添加手动锁的应用进行解锁的过程请参考图12、图13及相关文字,在此不再赘述。
在本申请实施例中,手机还可以在负一屏显示智能锁应用列表。智能锁应用列表包括多个被添加智能锁的应用(即智能锁应用)。示例性的,如图14中的(a)所示,手机可以显示负一屏1401,负一屏1401包括保活应用列表1402。保活应用列表1402用于显示智能锁应用的应用图标、保活时长及加锁标识。例如,保活应用列表1402可以包括火车 出行应用的图标1403、音乐应用的图标及浏览器的图标。其中,音乐应用的保活时长剩余25分钟,浏览器的保活时长剩余60分钟。
用户可以对保活应用列表1402中的应用进行管理操作,例如解锁、更改保活时长、设置保活策略等。示例性的,若用户希望更改火车出行应用的保活时长,可以对火车出行应用的图标1403发起第二操作(即长按火车出行应用的图标1403的操作)。响应于用户长按图标1403的操作,手机可以显示如图14中的(b)所示的设置框1404。设置框1404可包括解锁选项1405、设置保活时长选项1406、设置保活策略选项1407、关闭应用选项等。手机可以接收用户点击设置保活时长选项1406的操作,响应于该操作,如图14中的(c)所示,手机可以显示保活时长设置界面1408。保活时长设置界面1408用于为用户提供多个设置保活时长的选项,例如5分钟、“10分钟”1409、20分钟、自定义等。手机接收到用户选择设置保活时长的操作后,可以根据用户选择的时间设置火车出行应用的保活时长。示例性的,若用户希望将火车出行应用的保活时长设置为10分钟,则可以点击“10分钟”1409。响应于用户点击“10分钟”1409的操作,手机可以将火车出行应用的保活时长设置为10分钟。如图14中的(d)所示,手机还可以在保活应用列表1402中显示火车出行应用的保活时长1410(即倒计时:10分钟)。若用户希望解除火车出行应用的智能锁,如图15中的(a)所示,用户可以点击解锁选项1405。响应于用户点击解锁选项1405的操作,手机可以对火车出行应用进行解锁操作,且如图15中的(b)所示,手机在保活应用列表1402中隐藏火车出行应用的图标。若用户希望设置火车出行应用的保活策略,则可点击设置保活策略选项1407,手机可响应该操作而显示保活策略设置页面(例如图2B中的(b)所示的界面212)。其原理及界面与前述设置保活策略的原理及界面相似,在此不再赘述。若用户希望直接关闭火车出行应用,用户可以点击关闭应用选项1407。响应于用户点击关闭应用选项1407的操作,手机可以直接关闭火车出行应用,手机在保活应用列表1402中隐藏火车出行应用的图标。
需要说明的是,手机还可以接收用户点击火车出行应用的图标的操作,响应于该操作,手机可以显示火车出行应用的界面。也即,用户可以通过点击保活应用列表中的应用图标,以打开该应用图标对应的应用界面。
在本申请实施例中,手机还可以在全局搜索界面显示智能锁应用列表。示例性的,如图16中的(a)所示,手机可以显示主界面1601。手机可以接收用户下拉主界面1601的操作,响应于该操作,如图16中的(b)所示,手机可以显示全局搜索界面1602。全局搜索界面1602中包括保活应用列表1603。保活应用列表1603用于显示智能锁应用的应用图标及保活时长。例如,保活应用列表1603可以包括火车出行应用的图标、音乐应用的图标及浏览器的图标。其中,音乐应用的保活时长剩余25分钟,浏览器的保活时长剩余60分钟。
在本申请实施例中,手机还可以在下拉菜单栏显示智能锁应用列表。示例性的,如图17中的(a)所示,手机可以显示主界面1701。手机可接收用户下拉屏幕顶部的操作,响应于该操作,手机可显示如图17中的(b)所示的下拉菜单栏1702。下拉菜单栏1702中包括保活应用列表1703。保活应用列表1703用于显示智能锁应用的应用图标及保活时长。
需要说明的是,在全局搜索界面和下拉菜单栏中,用户同样可以对保活应用列表中的应用进行管理操作,其管理方法及具体界面与对保活应用列表1402中的应用进行管理操 作的过程类似,因此具体内容可以参照前述内容及图14-图15,在此不再赘述。
在一种可选的实施方式中,手机在保活应用列表(保活应用列表1402及保活应用列表1603)中显示智能锁应用的相关信息时,可以不在最近任务界面显示中给智能锁应用添加第一加锁图标(例如,第一加锁图标205、第一加锁图标603等)。
在一种可选的实施方式中,手机在保活应用列表(保活应用列表1402及保活应用列表1603)中显示智能锁应用的相关信息时,可以同时在最近任务界面显示中给智能锁应用添加第一加锁图标(例如,第一加锁图标205、第一加锁图标603等)。
在一种可选的实施方式中,手机可以在保活应用列表(保活应用列表1402及保活应用列表1603)中显示智能锁应用的相关信息及手动锁应用的相关信息。示例性的,如图18所示,手机可以显示全局搜索界面1801。全局搜索界面1801包括保活应用列表1802。保活应用列表1802包括火车出行应用的图标1803、音乐应用的图标1804、浏览器的图标1805、两个分别用于标识火车出行应用和音乐应用的第一加锁图标1806及用于标识浏览器的第二加锁图标1807。其中,两个第一加锁图标1806分别用于标识火车出行应用和音乐应用被手机添加了智能锁,第二加锁图标1807用于标识浏览器被手机添加了手动锁。需要说明的是,第一加锁图标1806及第二加锁图标1807的位置可以不仅限于图18中所示的位置,还可在其他任意便于标识应用的位置(例如,可以位于应用图标的右上角、左上角等位置)。
本申请提供一种应用保活方法及电子设备,电子设备可以自动给最近使用的多个应用中的第一应用加锁,使第一应用处于保活状态,避免第一应用被电子设备自动关闭,持续为用户提供服务。
本申请还提供一种芯片系统1900,如图19所示,该芯片系统1900包括至少一个处理器1901和至少一个接口电路1902。处理器1901和接口电路1902可通过线路互联。例如,接口电路1902可用于从其它装置(例如,电子设备的存储器)接收信号。又例如,接口电路1902可用于向其它装置(例如处理器1901)发送信号。
例如,接口电路1902可读取电子设备中存储器中存储的指令,并将该指令发送给处理器1901。当所述指令被处理器1901执行时,可使得电子设备执行上述各实施例中的各个步骤。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算 机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (40)

  1. 一种应用保活方法,其特征在于,所述方法包括:
    电子设备自动对运行在后台的第一应用进行第一加锁操作以给所述第一应用添加第一类型的应用锁;其中,所述第一应用为电子设备预测的用户还需要继续使用的应用,所述第一加锁操作用于使所述第一应用成为被保活的状态;
    响应于用户的第一操作,所述电子设备显示多任务界面;其中,所述多任务界面包括最近使用的多个应用的预览界面,所述最近使用的多个应用包括所述第一应用和第二应用,所述多个应用的预览界面包括第一预览界面和第二预览界面,所述第一预览界面为所述第一应用的预览界面,所述第二预览界面为所述第二应用的预览界面;
    在所述多任务界面的所述第一预览界面中显示第一标识,其中,所述第一标识用于指示所述第一应用被添加第一类型的应用锁;
    响应于用户对第二预览界面的第二操作,所述电子设备对所述第二应用进行第二加锁操作以给所述第二应用添加第二类型的应用锁,并在所述第二预览界面中显示第二标识;其中,所述第二标识用于指示所述第二应用被添加第二类型的应用锁,所述第二加锁操作用于使所述第二应用成为被保活的状态。
  2. 根据权利要求1所述的方法,其特征在于,第一标识与所述第二标识的外观不同。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一类型的应用锁对应的应用默认被保活的时长短于所述第二类型的应用锁对应的应用默认被保活的时长。
  4. 根据权利要求1-3任一所述的方法,其特征在于,在所述第一预览界面中还显示了与所述第一标识相关的第一保活时长,所述第一保活时长为所述第一应用被保活的剩余时长。
  5. 根据权利要求4所述的方法,其特征在于,所述第一保活时长的最大值为第一数值或者第二数值,所述第一数值为预设的数值,所述第二数值为根据所述第一应用的习惯运行时间及当前时间确定的值,所述第一应用的习惯运行时间为用户习惯使用所述第一应用的时间段。
  6. 根据权利要求5所述的方法,其特征在于,响应于用户对所述第一预览界面的下拉操作,所述电子设备将所述第一应用被保活的剩余时长恢复为第一数值。
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述第一预览界面中对所述第一标识的第一操作,所述电子设备显示设置框;其中,所述设置框包括多个设置选项,所述多个设置选项用于供用户设置所述第一保活时长或所述第一应用的保活策略;
    响应于用户在所述多个设置选项中选择第一选项的操作,所述电子设备将所述第一保活时长更新为所述第一选项对应的预设值;或者,
    响应于用户在所述多个设置选项中选择第二选项的操作,所述电子设备显示输入框,响应于用户在所述输入框中输入第三数值的操作,所述电子设备将所述第一保活时长更新为所述第三数值;或者,
    响应于用户在所述多个设置选项中选择第三选项的操作,所述电子设备显示所述第一应用对应的保活策略的设置页。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述多个设置选项中选择所述第一选项或所述第二选项的操作,所述电子设备将所述第一标识更新为所述第二标识。
  9. 根据权利要求1-8中任意一项所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述第二预览界面中对所述第二标识的第一操作,所述电子设备显示设置框;其中,所述设置框包括多个设置选项,所述多个设置选项用于供用户设置第二保活时长,所述第二保活时长为所述第二应用被保活的剩余时长;
    响应于用户在所述多个设置选项中选择第一选项的操作,所述电子设备在所述第二预览界面上显示所述第二保活时长,所述第二保活时长为所述第一选项对应的预设值;
    或者,响应于用户在所述多个设置选项中选择第二选项的操作,所述电子设备显示输入框;
    响应于用户在所述输入框中输入第三数值的操作,所述电子设备在所述第二预览界面上显示所述第二保活时长,所述第二保活时长为所述第三数值。
  10. 根据权利要求1-9中任意一项所述的方法,其特征在于,所述方法还包括以下中的至少一项:
    响应于用户在所述第一预览界面中对所述第一标识的第二操作,所述电子设备对所述第一应用进行解锁操作并在所述第一预览界面中不再显示所述第一标识;或,
    响应于用户在所述第二预览界面中对所述第二标识的第二操作,所述电子设备对所述第二应用进行解锁操作并在所述第二预览界面中不再显示所述第二标识。
  11. 根据权利要求1-10中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定所述第一应用正在后台执行预设任务,所述电子设备对所述第一应用进行第一加锁操作;其中,所述预设任务为响应于用户需求而执行的任务。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    响应于确定所述第一应用执行完所述预设任务,所述电子设备对所述第一应用进行解锁操作并在所述第一预览界面中不再显示所述第一标识。
  13. 根据权利要求11-12中任意一项所述的方法,其特征在于,所述预设任务为下载任务。
  14. 根据权利要求1-13中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定当前时间在所述第一应用的习惯运行时间内,所述电子设备对所述第一应用进行第一加锁操作;其中,所述第一应用的习惯运行时间为用户习惯使用所述第一应用的时间段。
  15. 根据权利要求1-13中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定当前时间在第一应用的习惯运行时间内且所述第一应用的运行环境需求与所述电子设备的状态信息匹配,所述电子设备对所述第一应用进行第一加锁操作;其中,所述第一应用的运行环境需求用于指示所述第一应用对所述电子设备的状态信息的需求,所述状态信息包括蓝牙连接状态、网络连接状态、位置信息、剩余电量中的至少一种。
  16. 根据权利要求1-15中任意一项所述的方法,其特征在于,所述多任务界面还包括 清理选项,所述方法还包括:
    响应于用户对所述清理选项的第一次操作,所述电子设备关闭所述多个应用中未被加锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第二次操作,所述电子设备关闭所述多个应用中包括了所述第一应用在内的被添加了第一类型的应用锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第三次操作,所述电子设备关闭所述多个应用中包括了所述第二应用在内的被添加了第二类型的应用锁的应用及该应用的预览界面。
  17. 根据权利要求1-15中任意一项所述的方法,其特征在于,所述多任务界面还包括清理选项,所述方法还包括:
    响应于用户对所述清理选项的第一次操作,所述电子设备关闭所述多个应用中未被加锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第二次操作,所述电子设备至少关闭所述多任务界面上当前对用户可见的预览界面及对应的应用,或所述电子设备至少关闭所述多任务界面上当前对用户可见的预览界面中显示面积最大的预览界面及对应的应用。
  18. 根据权利要求16或17所述的方法,其特征在于,所述方法还包括:
    响应于用户对所述清理选项的操作,所述电子设备显示清理信息;其中,所述清理信息用于指示所述电子设备清理的应用的类型、数量及名称。
  19. 根据权利要求1-18中任意一项所述的方法,其特征在于,所述第一预览界面与所述第二预览界面彼此相邻,其中,在第一情况下所述第一预览界面被全部显示且所述第二预览界面被部分显示,在第二情况下所述第一预览界面被部分显示或全部显示且所述第二预览界面被显示的部分多于第一情况下被显示的部分。
  20. 一种电子设备,其特征在于,包括处理器,所述处理器和存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时使得所述电子设备实现权利要求1-19中任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,包括计算机指令;
    当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-19中任一项所述的方法。
  22. 一种应用保活方法,其特征在于,所述方法包括:
    电子设备自动对运行在后台的第一应用进行第一加锁操作以给所述第一应用添加第一类型的应用锁,所述第一类型的应用锁为所述电子设备主动添加的应用锁;其中,所述第一应用为电子设备预测的用户还需要继续使用的应用,所述第一加锁操作用于使所述第一应用成为被保活的状态;
    响应于用户的第一操作,所述电子设备显示多任务界面;其中,所述多任务界面包括最近使用的多个应用的预览界面,所述最近使用的多个应用包括所述第一应用和第二应用,所述多个应用的预览界面包括第一预览界面和第二预览界面,所述第一预览界面为所述第一应用的预览界面,所述第二预览界面为所述第二应用的预览界面;
    在所述多任务界面的所述第一预览界面中显示第一标识,其中,所述第一标识用于指示所述第一应用被添加第一类型的应用锁;
    响应于用户对第二预览界面的第二操作,所述电子设备对所述第二应用进行第二加锁 操作以给所述第二应用添加第二类型的应用锁,并在所述第二预览界面中显示第二标识;其中,所述第二标识用于指示所述第二应用被添加第二类型的应用锁,所述第二加锁操作用于使所述第二应用成为被保活的状态,所述第二类型的应用锁为所述电子设备响应用户操作而添加的应用锁。
  23. 根据权利要求22所述的方法,其特征在于,第一标识与所述第二标识的外观不同。
  24. 根据权利要求22所述的方法,其特征在于,所述第一类型的应用锁对应的应用默认被保活的时长短于所述第二类型的应用锁对应的应用默认被保活的时长。
  25. 根据权利要求22所述的方法,其特征在于,在所述第一预览界面中还显示了与所述第一标识相关的第一保活时长,所述第一保活时长为所述第一应用被保活的剩余时长。
  26. 根据权利要求25所述的方法,其特征在于,所述第一保活时长的最大值为第一数值或者第二数值,所述第一数值为预设的数值,所述第二数值为根据所述第一应用的习惯运行时间及当前时间确定的值,所述第一应用的习惯运行时间为用户习惯使用所述第一应用的时间段。
  27. 根据权利要求26所述的方法,其特征在于,响应于用户对所述第一预览界面的下拉操作,所述电子设备将所述第一应用被保活的剩余时长恢复为第一数值。
  28. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述第一预览界面中对所述第一标识的第一操作,所述电子设备显示设置框;其中,所述设置框包括多个设置选项,所述多个设置选项用于供用户设置第一保活时长或所述第一应用的保活策略,所述第一保活时长为所述第一应用被保活的剩余时长;
    响应于用户在所述多个设置选项中选择第一选项的操作,所述电子设备将所述第一保活时长更新为所述第一选项对应的预设值;或者,
    响应于用户在所述多个设置选项中选择第二选项的操作,所述电子设备显示输入框,响应于用户在所述输入框中输入第三数值的操作,所述电子设备将所述第一保活时长更新为所述第三数值;或者,
    响应于用户在所述多个设置选项中选择第三选项的操作,所述电子设备显示所述第一应用对应的保活策略的设置页。
  29. 根据权利要求28所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述多个设置选项中选择所述第一选项或所述第二选项的操作,所述电子设备将所述第一标识更新为所述第二标识。
  30. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述方法还包括:
    响应于用户在所述第二预览界面中对所述第二标识的第一操作,所述电子设备显示设置框;其中,所述设置框包括多个设置选项,所述多个设置选项用于供用户设置第二保活时长,所述第二保活时长为所述第二应用被保活的剩余时长;
    响应于用户在所述多个设置选项中选择第一选项的操作,所述电子设备在所述第二预览界面上显示所述第二保活时长,所述第二保活时长为所述第一选项对应的预设值;
    或者,响应于用户在所述多个设置选项中选择第二选项的操作,所述电子设备显示输入框;
    响应于用户在所述输入框中输入第三数值的操作,所述电子设备在所述第二预览界面上显示所述第二保活时长,所述第二保活时长为所述第三数值。
  31. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述方法还包括以下中的至少一项:
    响应于用户在所述第一预览界面中对所述第一标识的第二操作,所述电子设备对所述第一应用进行解锁操作并在所述第一预览界面中不再显示所述第一标识;或,
    响应于用户在所述第二预览界面中对所述第二标识的第二操作,所述电子设备对所述第二应用进行解锁操作并在所述第二预览界面中不再显示所述第二标识。
  32. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定所述第一应用正在后台执行预设任务,所述电子设备对所述第一应用进行第一加锁操作;其中,所述预设任务为响应于用户需求而执行的任务。
  33. 根据权利要求32所述的方法,其特征在于,所述方法还包括:
    响应于确定所述第一应用执行完所述预设任务,所述电子设备对所述第一应用进行解锁操作并在所述第一预览界面中不再显示所述第一标识。
  34. 根据权利要求32所述的方法,其特征在于,所述预设任务为下载任务。
  35. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定当前时间在所述第一应用的习惯运行时间内,所述电子设备对所述第一应用进行第一加锁操作;其中,所述第一应用的习惯运行时间为用户习惯使用所述第一应用的时间段。
  36. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述电子设备自动对运行在后台的第一应用进行第一加锁操作,包括:
    响应于确定当前时间在第一应用的习惯运行时间内且所述第一应用的运行环境需求与所述电子设备的状态信息匹配,所述电子设备对所述第一应用进行第一加锁操作;其中,所述第一应用的运行环境需求用于指示所述第一应用对所述电子设备的状态信息的需求,所述状态信息包括蓝牙连接状态、网络连接状态、位置信息、剩余电量中的至少一种。
  37. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述多任务界面还包括清理选项,所述方法还包括:
    响应于用户对所述清理选项的第一次操作,所述电子设备关闭所述多个应用中未被加锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第二次操作,所述电子设备关闭所述多个应用中包括了所述第一应用在内的被添加了第一类型的应用锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第三次操作,所述电子设备关闭所述多个应用中包括了所述第二应用在内的被添加了第二类型的应用锁的应用及该应用的预览界面。
  38. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述多任务界面还包括清理选项,所述方法还包括:
    响应于用户对所述清理选项的第一次操作,所述电子设备关闭所述多个应用中未被加锁的应用及该应用的预览界面;
    响应于用户对所述清理选项的第二次操作,所述电子设备至少关闭所述多任务界面上当前对用户可见的预览界面及对应的应用,或所述电子设备至少关闭所述多任务界面上当 前对用户可见的预览界面中显示面积最大的预览界面及对应的应用。
  39. 根据权利要求38所述的方法,其特征在于,所述方法还包括:
    响应于用户对所述清理选项的操作,所述电子设备显示清理信息;其中,所述清理信息用于指示所述电子设备清理的应用的类型、数量及名称。
  40. 根据权利要求22-27中任意一项所述的方法,其特征在于,所述第一预览界面与所述第二预览界面彼此相邻,其中,在第一情况下所述第一预览界面被全部显示且所述第二预览界面被部分显示,在第二情况下所述第一预览界面被部分显示或全部显示且所述第二预览界面被显示的部分多于第一情况下被显示的部分。
PCT/CN2022/118833 2021-10-29 2022-09-14 一种应用保活方法及电子设备 WO2023071582A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22885469.1A EP4227806A4 (en) 2021-10-29 2022-09-14 METHOD FOR MAINTAINING APPLICATION CONNECTION AND ELECTRONIC DEVICE
US18/038,345 US20240004699A1 (en) 2021-10-29 2022-09-14 Application Keep-Alive Method and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111277639.0 2021-10-29
CN202111277639.0A CN114168355B (zh) 2021-10-29 2021-10-29 一种应用保活方法及电子设备

Publications (1)

Publication Number Publication Date
WO2023071582A1 true WO2023071582A1 (zh) 2023-05-04

Family

ID=80477963

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/118833 WO2023071582A1 (zh) 2021-10-29 2022-09-14 一种应用保活方法及电子设备

Country Status (4)

Country Link
US (1) US20240004699A1 (zh)
EP (1) EP4227806A4 (zh)
CN (1) CN114168355B (zh)
WO (1) WO2023071582A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168355B (zh) * 2021-10-29 2022-10-21 荣耀终端有限公司 一种应用保活方法及电子设备
CN118158779A (zh) * 2022-12-07 2024-06-07 中兴通讯股份有限公司 应用的处理方法、系统、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067060A1 (en) * 2011-09-09 2013-03-14 David G. Thaler Wake Pattern Management
CN112099757A (zh) * 2020-09-21 2020-12-18 珠海格力电器股份有限公司 一种应用保活的方法以及装置
CN112162783A (zh) * 2020-09-27 2021-01-01 珠海格力电器股份有限公司 音乐播放应用保活处理方法、系统、存储介质及电子设备
CN112988282A (zh) * 2021-04-27 2021-06-18 荣耀终端有限公司 应用保活方法和终端设备
CN114168355A (zh) * 2021-10-29 2022-03-11 荣耀终端有限公司 一种应用保活方法及电子设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7739385B1 (en) * 2003-06-16 2010-06-15 Cisco Technology, Inc. Explicit locking of resources in devices accessible on a network
DE112012002774T5 (de) * 2011-07-01 2014-03-20 Stoneware Inc. Verfahren und Vorrichtung für einen keep-alive Push-Agenten
US8775631B2 (en) * 2012-07-13 2014-07-08 Seven Networks, Inc. Dynamic bandwidth adjustment for browsing or streaming activity in a wireless network based on prediction of user behavior when interacting with mobile applications
CN105637919A (zh) * 2013-06-11 2016-06-01 七网络有限责任公司 优化无线网络中的保活和其他后台流量
CN105446582A (zh) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 一种关闭后台程序的方法及装置
CN106156561B (zh) * 2016-06-28 2021-02-09 北京小米移动软件有限公司 应用加锁方法、应用解锁方法和装置
CN109086599A (zh) * 2018-07-09 2018-12-25 维沃移动通信有限公司 一种应用程序加锁方法、解锁方法及终端设备
CN109992310B (zh) * 2019-03-12 2024-04-05 中国平安财产保险股份有限公司 应用程序保活方法、装置、计算机设备和存储介质
CN113220258B (zh) * 2020-01-21 2023-12-08 华为技术有限公司 一种语音消息预览方法及电子设备
CN113360222A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 一种应用信息的显示方法及相关设备
CN112084488A (zh) * 2020-08-27 2020-12-15 广州新视展投资咨询有限公司 应用权限管理方法、装置及系统
CN113325988B (zh) * 2021-08-04 2021-11-16 荣耀终端有限公司 多任务管理方法和终端设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067060A1 (en) * 2011-09-09 2013-03-14 David G. Thaler Wake Pattern Management
CN112099757A (zh) * 2020-09-21 2020-12-18 珠海格力电器股份有限公司 一种应用保活的方法以及装置
CN112162783A (zh) * 2020-09-27 2021-01-01 珠海格力电器股份有限公司 音乐播放应用保活处理方法、系统、存储介质及电子设备
CN112988282A (zh) * 2021-04-27 2021-06-18 荣耀终端有限公司 应用保活方法和终端设备
CN114168355A (zh) * 2021-10-29 2022-03-11 荣耀终端有限公司 一种应用保活方法及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4227806A4

Also Published As

Publication number Publication date
EP4227806A4 (en) 2024-01-24
CN114168355B (zh) 2022-10-21
US20240004699A1 (en) 2024-01-04
EP4227806A1 (en) 2023-08-16
CN114168355A (zh) 2022-03-11

Similar Documents

Publication Publication Date Title
WO2023071582A1 (zh) 一种应用保活方法及电子设备
US9325795B2 (en) Method of and system for providing application store service
CN107209624B (zh) 设备个性化的设备、方法、装置和存储器设备
CN104007893B (zh) 用于在便携式终端中提供用户界面的方法和装置
US9432314B2 (en) Quick navigation of message conversation history
CN102365615B (zh) 无边框用户界面
EP2528310B1 (en) Mobile terminal and mode controlling method therein
KR101825799B1 (ko) 다수의 애플리케이션들로부터 수신된 통지들을 디스플레이하기 위한 시스템들 및 방법들
RU2535582C2 (ru) Предоставление выбранных данных при помощи заблокированного устройства отображения
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
CN110110262A (zh) 浏览器内存管理方法、装置和设备
WO2019206158A1 (zh) 一种界面显示方法、装置及设备
US20240111473A1 (en) Distributed display method and terminal for application interface
CN108027706A (zh) 一种应用界面显示方法以及终端设备
CN113766064B (zh) 一种日程处理方法及电子设备
EP2237143B1 (en) Information processing device and program
JP2009163509A (ja) 情報処理装置及びプログラム
US20120246592A1 (en) Method for customizing user interface and electronic device thereof
WO2021135578A1 (zh) 页面处理方法、装置、存储介质及终端设备
WO2024016917A1 (zh) 日历视图的显示方法、电子设备及可读存储介质
WO2011032428A1 (zh) 一种移动终端中的个性化动画实现方法及装置
KR20200058511A (ko) 아이콘 디스플레이 방법, 디바이스, 및 시스템
CN108205408A (zh) 消息展示方法及装置
WO2023016479A1 (zh) 权限优化方法及相关设备
CN114997186B (zh) 翻译控件的控制方法及电子设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022885469

Country of ref document: EP

Effective date: 20230508

WWE Wipo information: entry into national phase

Ref document number: 18038345

Country of ref document: US

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

Ref document number: 22885469

Country of ref document: EP

Kind code of ref document: A1