A method and device for keeping application alive

By jumping to the settings page in the terminal operating system to change the background running mode of the application, the problem of the application continuing to work in the background is solved and the keep-alive effect of the application is achieved.

CN112612589BActive Publication Date: 2024-10-15吉林亿联银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011570096.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-26
Publication Date
2024-10-15
Estimated Expiration
2040-12-26

AI Technical Summary

Technical Problem

Existing technology makes it difficult for applications to continue working in the background, especially IM instant messaging and sports applications that require real-time monitoring of data in the background.

Method used

The terminal operating system receives the application's request to change the background running mode of the process and jumps to the settings page. The user can choose to change the background running mode of the process to the keep running mode, thereby starting the background service and allowing the application to continue running in the background.

Benefits of technology

It enables the application to maintain necessary functions in the background and ensures the application's keep-alive effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112612589B_ABST
    Figure CN112612589B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for keeping an application alive. In this method, when a terminal operating system receives a request from an application to change the background running mode of a process, the terminal operating system jumps to a settings page, allowing a user to set the background running mode of the process on the settings page. On this basis, when the terminal operating system receives a request for a first option selection from the settings page, the background running mode of the application process is changed to a keep running mode. The application process can keep running in the background, ensuring that the application can keep necessary functions working continuously in the background, thereby keeping the application alive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for keeping an application alive. Background Art

[0002] Keeping alive means that the necessary functions can continue to work when the app (application) is not in the foreground. For example, when IM instant messaging applications and information applications are not in the foreground, timely message push is required in the background, or sports applications need to monitor the user's sports data in real time in the background.

[0003] However, how to keep the application alive becomes a problem. Summary of the invention

[0004] In order to solve the above technical problems, the embodiment of the present application provides a method and device for keeping an application alive, so as to achieve the purpose of keeping the application alive. The technical solution is as follows:

[0005] A method for keeping an application alive, comprising:

[0006] When receiving the request for changing the background running mode of the process sent by the application, the terminal operating system jumps to a setting page, wherein the setting page includes a first option for representing the background running mode of the process;

[0007] When the terminal operating system receives the selection request for the first option from the setting page, it changes the background running mode of the process of the application to the target mode, and the target mode at least includes: a keep running mode.

[0008] When receiving a request from the application to change the background operation mode of the process, jumping to the setting page includes:

[0009] When receiving a request for changing the background running mode of a process sent by an application, outputting a sub-interface on a page of the application, the sub-interface including a sub-option indicating that the background running mode of the process can be changed;

[0010] When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to the setting interface.

[0011] After the background operation mode of the process of the application is changed to the target mode, the method further includes:

[0012] The terminal operating system jumps to the page of the application so that the terminal operating system jumps to the page of the application so that when the application determines that the page of the application is jumped to by the terminal operating system, it determines whether the background running mode of its process is the target mode, and if it is the target mode, sends a request to the terminal operating system to start the background service;

[0013] When receiving the request to start the background service, the terminal operating system starts the background service of the application and causes the background to run the process of the application according to the target mode.

[0014] A method for keeping an application alive, comprising:

[0015] The application determines whether the background operation mode of its process is a target mode, wherein the target mode at least includes a keep-running mode;

[0016] If not, sending a request for changing the background running mode of the process to the terminal operating system, so that the terminal operating system jumps to a setting page containing a first option for representing the background running mode of the process when receiving the request for changing the background running mode of the process sent by the application, and changes the background running mode of the process of the application to the target mode when receiving a selection request for the first option from the setting page;

[0017] If so, a request to start the background service is sent to the terminal operating system, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode.

[0018] The method further comprises:

[0019] The application determines whether the terminal operating system triggers a jump to the application page;

[0020] If yes, return to the step of determining whether the background running mode of the process is the target mode.

[0021] A keep-alive device for an application, comprising:

[0022] A first jump module, configured to jump to a setting page when receiving a request for changing the background running mode of a process sent by an application, wherein the setting page includes a first option for representing the background running mode of the process;

[0023] The changing module is used to change the background running mode of the process of the application to the target mode when receiving a selection request for the first option from the setting page, and the target mode at least includes: a keep running mode.

[0024] The first jump module is specifically used to:

[0025] When receiving a request for changing the background running mode of a process sent by an application, outputting a sub-interface on a page of the application, the sub-interface including a sub-option indicating that the background running mode of the process can be changed;

[0026] When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to the setting interface.

[0027] The device also includes:

[0028] A second jump module is used to jump to the page of the application so that the terminal operating system jumps to the page of the application, so that when the application determines that the jump to the page of the application is triggered by the terminal operating system, it determines whether the background running mode of its process is the target mode, and if it is the target mode, sends a request to the terminal operating system to start the background service;

[0029] The running module is used to start the background service of the application program when receiving the request to start the background service, and to make the background run the process of the application program according to the target mode.

[0030] A keep-alive device for an application, comprising:

[0031] A first judgment module is used to judge whether the background operation mode of the process is a target mode, and the target mode at least includes a keep-running mode;

[0032] a first sending module, configured to send a request for changing the background running mode of the process to the terminal operating system if the mode is not the target mode, so that the terminal operating system, when receiving the request for changing the background running mode of the process sent by the application, jumps to a setting page containing a first option for characterizing the background running mode of the process, and when receiving a selection request for the first option from the setting page, changes the background running mode of the process of the application to the target mode;

[0033] The second sending module is used to send a request to start the background service to the terminal operating system if it is a target mode, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode.

[0034] The device also includes:

[0035] The second judgment module is used to judge whether the terminal operating system triggers the jump to the page of the application program. If so, it returns to execute the first judgment module to judge whether the background running mode of the process is the target mode.

[0036] Compared with the prior art, the beneficial effects of this application are:

[0037] In the present application, when the terminal operating system receives a request from an application to change the background running mode of a process, it jumps to the settings page, so that the user can set the background running mode of the process on the settings page. On this basis, when the terminal operating system receives a request for the first option selection from the settings page, the background running mode of the application process is changed to a keep running mode. The application process can keep running in the background, ensuring that the application can keep the necessary functions working continuously in the background, thereby keeping the application alive. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 This is a flow chart of a method for keeping an application alive provided in Example 1 of the present application;

[0040] Figure 2 This is a flow chart of a method for keeping an application alive provided in Example 2 of the present application;

[0041] Figure 3 This is a flow chart of a method for keeping an application alive provided in Example 3 of the present application;

[0042] Figure 4 This is a flow chart of a method for keeping an application alive provided in Example 4 of the present application;

[0043] Figure 5 This is a flow chart of a method for keeping an application alive provided in Example 5 of the present application;

[0044] Figure 6 It is a logical structure diagram of a keep-alive device of an application program provided by the present application;

[0045] Figure 7It is a schematic diagram of the logical structure of another keep-alive device of an application program provided in the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] Reference Figure 1 , is a flow chart of a method for keeping an application alive provided in Example 1 of the present application, which method can be applied to a terminal operating system, such as Figure 1 As shown, the method may include but is not limited to the following steps:

[0049] Step S11 : When receiving a request from an application program to change the background operation mode of a process, the terminal operating system jumps to a setting page, wherein the setting page includes a first option for representing the background operation mode of the process.

[0050] In this embodiment, the application can be configured so that the application has the authority to apply for changing the background operation mode of the process. After the application is configured, the application can initiate a request to change the background operation mode of the process when the background operation mode of the process needs to be changed.

[0051] Accordingly, when receiving the request for changing the background operation mode of the process sent by the application, the terminal operating system can jump to the setting page, wherein the setting page at least includes a first option for setting the background operation mode of the process.

[0052] After jumping to the setting page, the user can operate the first option on the setting page to set the background running mode of the process.

[0053] In this embodiment, when the terminal operating system is provided with a whitelist function (which can be understood as: a function that allows applications to consume power, under which the operation of applications is not restricted), the application initiates a request to change the background operation mode of the process, which may include: the application initiates a request to apply to join the whitelist.

[0054] Accordingly, when the terminal operating system receives the request initiated by the application program to apply for joining the whitelist, it jumps to the setting page.

[0055] Step S12: When the terminal operating system receives a selection request for the first option from the setting page, the terminal operating system changes the background running mode of the application process to the target mode, and the target mode at least includes: a keep running mode.

[0056] When the terminal operating system changes the background running mode of the application process to the keep-running mode, the application process can keep running in the background, ensuring that the application can keep necessary functions working continuously in the background, thereby keeping the application alive.

[0057] In the present application, when the terminal operating system receives a request from an application to change the background running mode of a process, it jumps to the settings page, so that the user can set the background running mode of the process on the settings page. On this basis, when the terminal operating system receives a request for the first option selection from the settings page, the background running mode of the application process is changed to a keep running mode. The application process can keep running in the background, ensuring that the application can keep the necessary functions working continuously in the background, thereby keeping the application alive.

[0058] As another optional embodiment of the present application, refer to Figure 2 , is a flow chart of Embodiment 2 of a method for keeping an application alive provided by the present application. This embodiment is mainly an extension of the method for keeping an application alive described in Embodiment 1 above, such as Figure 2 As shown, the method may include but is not limited to the following steps:

[0059] Step S21: When receiving a request for changing the background running mode of a process from an application, the terminal operating system outputs a sub-interface on the page of the application, wherein the sub-interface includes a sub-option indicating that the background running mode of the process can be changed.

[0060] When the terminal operating system receives a request from an application to change the background running mode of a process, it outputs a sub-interface on the application's page. The sub-interface includes a sub-option indicating whether the background running mode of the process can be changed, so that the user can determine whether to allow the background running mode of the process to be changed by selecting the sub-option in the sub-interface.

[0061] Step S22: When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to a setting interface, wherein the setting page includes a first option for representing a background running mode of a process.

[0062] Step S23: When the terminal operating system receives the selection request for the first option from the setting page, it changes the background running mode of the process of the application to the target mode, and the target mode at least includes: a keep running mode.

[0063] The detailed process of step S23 can refer to the relevant introduction of step S12 in embodiment 1, which will not be repeated here.

[0064] When the terminal operating system receives a request from an application to change the background running mode of a process, it outputs a sub-interface on the application's page. The sub-interface includes a sub-option indicating whether the background running mode of the process can be changed. The user can determine whether to allow the background running mode of the process to be changed by selecting the sub-option in the sub-interface, thereby enabling the user to participate in changing the background running mode of the process and improving the user experience.

[0065] As another optional embodiment of the present application, refer to Figure 3 , is a flow chart of Embodiment 3 of a method for keeping an application alive provided by the present application. This embodiment is mainly an extension of the method for keeping an application alive described in Embodiment 1 above, such as Figure 3 As shown, the method may include but is not limited to the following steps:

[0066] Step S31: When receiving a request for changing the background running mode of a process sent by an application, the terminal operating system jumps to a setting page, wherein the setting page includes a first option for representing the background running mode of the process.

[0067] Step S32: When the terminal operating system receives the selection request for the first option from the setting page, it changes the background running mode of the process of the application to the target mode, and the target mode at least includes: a keep running mode.

[0068] The detailed process of steps S31-S32 can refer to the relevant introduction of steps S11-S12 in Example 1, which will not be repeated here.

[0069] Step S33, the terminal operating system jumps to the page of the application, so that when the application determines that the terminal operating system triggers the jump to the page of the application, it determines whether the background running mode of its process is the target mode. If it is the target mode, it sends a request to the terminal operating system to start the background service.

[0070] Step S34: When receiving the request to start the background service, the terminal operating system starts the background service of the application and enables the background to run the process of the application according to the target mode.

[0071] In this embodiment, after the background running mode of the application process is changed to the target mode, the page of the application is jumped to enable the application to determine whether the background running mode of its process is the target mode to confirm whether the background running mode of the application process is changed successfully. If it is the target mode, it is confirmed that the background running mode of the process is changed successfully, and a request to start the background service can be sent to the terminal operating system, and then the terminal operating system runs the application process in the background according to the target mode, thereby ensuring the reliability of the background running program change of the application process.

[0072] Reference Figure 4 , is a flow chart of a method for keeping an application alive provided in Example 4 of the present application. The method can be applied to applications such as Figure 2 As shown, the method may include but is not limited to the following steps:

[0073] Step S41: The application determines whether the background operation mode of its process is a target mode, where the target mode at least includes a keep-running mode.

[0074] If not, execute step S42; if so, execute step S43.

[0075] Step S42: Send a request for changing the background running mode of the process to the terminal operating system, so that when the terminal operating system receives the request for changing the background running mode of the process sent by the application, it jumps to a setting page containing a first option for characterizing the background running mode of the process, and when a selection request for the first option is received from the setting page, the background running mode of the process of the application is changed to the target mode.

[0076] The detailed process of steps S41-S42 can be found in the relevant introduction of the method introduced in any one of embodiments 1-3, and will not be repeated here.

[0077] Step S43, sending a request to start the background service to the terminal operating system, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode.

[0078] As another optional embodiment of the present application, refer to Figure 5 , is a flow chart of Embodiment 5 of a method for keeping an application alive provided by the present application. This embodiment is mainly an extension of the method for keeping an application alive described in Embodiment 4 above. Figure 5 As shown, the method may include but is not limited to the following steps:

[0079] Step S51: The application determines whether the background operation mode of its process is a target mode, where the target mode at least includes a keep-running mode.

[0080] If not, execute step S52; if so, execute step S53.

[0081] Step S52: Send a request for changing the background running mode of the process to the terminal operating system, so that when the terminal operating system receives the request for changing the background running mode of the process sent by the application, it jumps to a setting page containing a first option for characterizing the background running mode of the process, and when a selection request for the first option is received from the setting page, the background running mode of the process of the application is changed to the target mode, and the target mode at least includes: maintaining the running mode.

[0082] Step S53: Send a request to start the background service to the terminal operating system, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode.

[0083] Step S54: The application determines whether the terminal operating system triggers a jump to the application page.

[0084] If yes, the process returns to step S51.

[0085] In this embodiment, after the background running mode of the application process is changed to the target mode, the page of the application is jumped to enable the application to determine whether the background running mode of its process is the target mode to confirm whether the background running mode of the application process is changed successfully. If it is the target mode, it is confirmed that the background running mode of the process is changed successfully, and a request to start the background service can be sent to the terminal operating system, and then the terminal operating system runs the application process in the background according to the target mode, thereby ensuring the reliability of the background running program change of the application process.

[0086] Next, the keep-alive device of the application provided in the present application is introduced. The keep-alive device of the application introduced below and the keep-alive method of the application introduced above can be referred to each other.

[0087] See also Figure 6 The application keep-alive device includes: a first jump module 100 and a change module 200.

[0088] A first jump module 100 is used to jump to a setting page when receiving a request for changing the background running mode of a process sent by an application, wherein the setting page includes a first option for representing the background running mode of the process;

[0089] The changing module 200 is used to change the background running mode of the process of the application to the target mode when receiving a selection request for the first option from the setting page, and the target mode at least includes: a keep running mode.

[0090] In this embodiment, the first jump module 100 can be specifically used for:

[0091] When receiving a request for changing the background running mode of a process sent by an application, outputting a sub-interface on a page of the application, the sub-interface including a sub-option indicating that the background running mode of the process can be changed;

[0092] When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to the setting interface.

[0093] In this embodiment, the application program keep-alive device may further include:

[0094] A second jump module is used to jump to the page of the application so that the terminal operating system jumps to the page of the application, so that when the application determines that the jump to the page of the application is triggered by the terminal operating system, it determines whether the background running mode of its process is the target mode, and if it is the target mode, sends a request to the terminal operating system to start the background service;

[0095] The running module is used to start the background service of the application program when receiving the request to start the background service, and to make the background run the process of the application program according to the target mode.

[0096] In another embodiment of the present application, another application keep-alive device is provided. Figure 7 , the application's keepalive devices include:

[0097] A first determining module 300 , a first sending module 400 and a second sending module 500 .

[0098] A first determination module 300 is used to determine whether the background operation mode of the process is a target mode, wherein the target mode at least includes a keep-running mode;

[0099] The first sending module 400 is used for sending a request for changing the background running mode of the process to the terminal operating system if it is not the target mode, so that the terminal operating system jumps to a setting page containing a first option for representing the background running mode of the process when receiving the request for changing the background running mode of the process sent by the application, and changes the background running mode of the process of the application to the target mode when receiving a selection request for the first option from the setting page;

[0100] The second sending module 500 is used to send a request to start the background service to the terminal operating system if it is a target mode, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode.

[0101] The above device may also include:

[0102] The second judgment module is used to judge whether the terminal operating system triggers the jump to the page of the application program. If so, it returns to execute the first judgment module 300 to judge whether the background running mode of its process is the target mode.

[0103] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0105] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0106] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0107] The above is a detailed introduction to a file protection method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for keeping an application alive, characterized in that: include: When receiving the request for changing the background running mode of the process sent by the application, the terminal operating system jumps to a setting page, wherein the setting page includes a first option for representing the background running mode of the process; When the terminal operating system receives the selection request for the first option from the setting page, the background operation mode of the process of the application is changed to a target mode, so that the application has the authority to apply for changing the background operation mode of the process, and the target mode at least includes: a keep operation mode; The terminal operating system jumps to the page of the application program, so that the terminal operating system jumps to the page of the application program, so that when the application program determines that the page of the application program is jumped to by the terminal operating system, it determines whether the background operation mode of its process is the target mode, and if it is the target mode, it confirms that the background operation mode of the process is changed successfully, and sends a request to the terminal operating system to start the background service; When receiving the request to start the background service, the terminal operating system starts the background service of the application and causes the background to run the process of the application according to the target mode.

2. The method according to claim 1, characterized in that When receiving a request from the application to change the background operation mode of the process, jumping to the setting page includes: When receiving a request for changing the background running mode of a process sent by an application, outputting a sub-interface on a page of the application, the sub-interface including a sub-option indicating that the background running mode of the process can be changed; When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to the setting interface.

3. A method for keeping an application alive, characterized in that: include: The application determines whether the background operation mode of its process is a target mode, wherein the target mode at least includes a keep-running mode; If not, sending a request for changing the background running mode of the process to the terminal operating system, so that when the terminal operating system receives the request for changing the background running mode of the process sent by the application, it jumps to a setting page containing a first option for representing the background running mode of the process, and when receiving a selection request for the first option from the setting page, it changes the background running mode of the process of the application to the target mode, so that the application has the authority to apply for changing the background running mode of the process; If yes, sending a request to start the background service to the terminal operating system, so that when the terminal operating system receives the request to start the background service, it starts the background service of the application and runs the process of the application in the background according to the target mode; The application determines whether the terminal operating system triggers a jump to the application page; If yes, return to the step of determining whether the background running mode of the process is the target mode.

4. A keep-alive device for an application, characterized in that: include: A first jump module, configured to jump to a setting page when receiving a request for changing the background running mode of a process sent by an application, wherein the setting page includes a first option for representing the background running mode of the process; a change module, configured to change the background operation mode of the process of the application to a target mode when receiving a selection request for the first option from the setting page, so that the application has the authority to apply for changing the background operation mode of the process, wherein the target mode at least includes: a keep operation mode; A second jump module is used to jump to the page of the application so that the terminal operating system jumps to the page of the application, so that when the application determines that the terminal operating system triggers the jump to the page of the application, it determines whether the background running mode of its process is the target mode, and if it is the target mode, it confirms that the background running mode of the process is successfully changed, and sends a request to the terminal operating system to start the background service; The running module is used to start the background service of the application program when receiving the request to start the background service, and to make the background run the process of the application program according to the target mode.

5. The device according to claim 4, characterized in that The first jump module is specifically used to: When receiving a request for changing the background running mode of a process sent by an application, outputting a sub-interface on a page of the application, the sub-interface including a sub-option indicating that the background running mode of the process can be changed; When receiving a selection request for the sub-option in the sub-interface, the terminal operating system jumps to the setting interface.

6. A keep-alive device for an application, characterized in that: include: A first judgment module is used to judge whether the background operation mode of the process is a target mode, and the target mode at least includes a keep-running mode; A first sending module, configured to send a request for changing the background running mode of the process to the terminal operating system if the mode is not the target mode, so that the terminal operating system, when receiving the request for changing the background running mode of the process sent by the application, jumps to a setting page containing a first option for characterizing the background running mode of the process, and when receiving a selection request for the first option from the setting page, changes the background running mode of the process of the application to the target mode, so that the application has the authority to apply for changing the background running mode of the process; The second sending module is used to send a request to start the background service to the terminal operating system if it is a target mode, so that the terminal operating system starts the background service of the application when receiving the request to start the background service, and runs the process of the application in the background according to the target mode; The second judgment module is used to judge whether the terminal operating system triggers the jump to the page of the application program. If so, it returns to execute the first judgment module to judge whether the background running mode of the process is the target mode.