WO2017206885A1 - 应用程序的关闭方法、装置、存储介质及电子设备 - Google Patents

应用程序的关闭方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2017206885A1
WO2017206885A1 PCT/CN2017/086482 CN2017086482W WO2017206885A1 WO 2017206885 A1 WO2017206885 A1 WO 2017206885A1 CN 2017086482 W CN2017086482 W CN 2017086482W WO 2017206885 A1 WO2017206885 A1 WO 2017206885A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
level
application
function level
target
Prior art date
Application number
PCT/CN2017/086482
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 广东欧珀移动通信有限公司
Publication of WO2017206885A1 publication Critical patent/WO2017206885A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for shutting down an application.
  • the embodiment of the invention provides a method, a device, a storage medium and an electronic device for closing an application, which can improve the speed of restarting the application while reducing the power consumption of the terminal.
  • an embodiment of the present invention provides a method for shutting down an application, including:
  • the corresponding function in the application is closed according to the first target function level.
  • an embodiment of the present invention provides a device for shutting down an application, including: a setting module, a first receiving module, a first acquiring module, and a first closing module;
  • the setting module is configured to set a function level for a function in an application
  • the first receiving module is configured to receive a first function close request triggered by a first operation of the user, where the first function close request carries first operation information corresponding to the first operation;
  • the first obtaining module is configured to acquire a corresponding first target function level according to the first function closing request
  • the first closing module is configured to close a corresponding function in the application according to the first target function level.
  • an embodiment of the present invention provides a storage medium storing a plurality of instructions, the instructions being adapted to be loaded by a processor and executing a shutdown method of all or part of the applications as described above.
  • an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and operable in the processor, when the processor executes the computer program A shutdown method that implements all or part of the application as described above.
  • the embodiment of the invention provides a method, a device, a storage medium and an electronic device for closing an application, which can improve the speed of restarting the application while reducing the power consumption of the terminal.
  • FIG. 1 is a schematic flowchart of a method for shutting down an application program according to an embodiment of the present invention.
  • FIG. 2 is another schematic flowchart of a method for shutting down an application according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an apparatus for shutting down an application program according to an embodiment of the present invention.
  • FIG. 4 is another schematic structural diagram of an apparatus for shutting down an application according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 6 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • a smart terminal In order to implement various functions to meet various needs of users, a smart terminal usually installs various kinds of applications (which may be simply referred to as applications). However, the application installed on the smart terminal consumes a large amount of power and reduces the endurance of the smart terminal.
  • Embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for closing an application. The details will be described separately below.
  • the inventor of the present application designed a smart terminal to close the application program in order to reduce the consumption of the smart terminal and improve the endurance of the intelligent terminal, specifically to close all functions in the application (including the main function).
  • the smart terminal automatically closes the application, or closes the application according to the user's operation; specifically, the smart terminal can monitor the user's operation on the smart terminal, and then close the corresponding application based on the operation.
  • the inventor of the present application in the design of the design, turns off all functions in the smart terminal at one time, although the power consumption of the smart terminal can be reduced.
  • the smart terminal restarts the application that has closed all functions, the smart terminal needs to recall all the functions of the application, which will cause the application to restart slowly.
  • the present application provides a new scheme for closing an application, as follows:
  • An application shutdown method includes:
  • the corresponding function in the application is closed according to the first target function level.
  • the step of setting a function level for a function in an application specifically includes:
  • the function level is set for the function in the application based on the call relationship.
  • the first target function level is lower than a highest function level; the step of closing a corresponding function in the application according to the first target function level specifically includes:
  • the function corresponding to the first objective function level in the application is closed, and the function level is lower than the function of the first target function level.
  • the shutdown method further includes:
  • a corresponding remaining unclosed function in the application is closed according to the second target function level.
  • the step of closing the corresponding remaining unclosed function in the application according to the second target function level specifically includes:
  • the function corresponding to the second objective function level in the remaining unclosed functions is closed, and the function level is lower than the function of the second objective function level.
  • the shutdown method further includes:
  • the first operation comprises a pressing operation
  • the step of receiving a first function shutdown request triggered by the user for the first operation of the terminal comprises:
  • the first function close request is triggered.
  • the step of closing the corresponding function in the application according to the first target function level further includes:
  • the corresponding function in the application is closed according to the first target function level.
  • the embodiment of the present invention adopts a function level setting function for the function in the application, and then receives a first function close request triggered by the user performing the first operation on the terminal, where the first function close request carries the user to perform the first operation on the terminal.
  • the first operation information acquires a corresponding first target function level according to the first function shutdown request, and closes a corresponding function in the application according to the first target function level; the solution may close the application based on a user operation on the terminal
  • the corresponding function can reduce the power consumption of the terminal, and since the solution does not directly close the application, but closes the corresponding function in the application, therefore, when the application needs to be restarted, it needs to be recalled and executed.
  • the function can be used to speed up the application restart while reducing the power consumption of the terminal.
  • An embodiment of the present invention provides a method for closing an application, where the method for closing the application includes: setting a function level to a function in the application; and receiving a first function shutdown request triggered by the user for the first operation of the terminal,
  • the first function close request carries the first operation information corresponding to the first operation; the corresponding first target function level is obtained according to the first function close request; and the corresponding function in the application is closed according to the first target function level.
  • FIG. 1 is a schematic flowchart of a method for shutting down an application according to an embodiment of the present invention.
  • the specific process of the application closing method may be as follows:
  • the application may be an application running in the background, such as WeChat, QQ, etc. running in the background; generally, a main function is required when writing a program that can run on the operating system.
  • the main function means to establish a separate process, and the process becomes the entry point of the program, calling other sub-functions (called methods in some OOP languages, such as Java), of course, other called sub-functions can also Then call more functions, so the running track of the whole program is like a stack, which can be called the call stack.
  • the main function is both the entry point of the program and the exit of the program. Usually you can also specify an exit. Code exits again to indicate the final result of the program.
  • the function level can be set based on the calling relationship between the functions in the application; that is, the step "setting the function level to the function in the application" may specifically include:
  • the main function can be set to a first-level (highest level) function, and the sub-function directly called by the main function can be set as a second-level function, and the sub-function directly called by the second-level function can be set as a three-level function.
  • the sub-function directly called by the three-level function is set as a four-level function, and so on; or, it can be arranged in reverse order, and if there are three levels of functions, the main function can be set to a three-level (highest level) function.
  • the sub-function directly called by the main function is set as a secondary function, and the sub-function of the second-level function call is set as a first-level function.
  • the function level may be indicated by a numerical form, a letter form, or the like; in the numerical form, for example, a 1 represents a first-level function, and 2 represents a The secondary function, 3 represents a three-level function, where the higher the number represents the higher the level, or the smaller the number represents the higher the level and so on.
  • the first function close request triggered by the first operation of the user is received by the user, and the first function close request carries the first operation information corresponding to the first operation.
  • the first operation may be a touch operation of the user, such as pressing, tapping, etc.
  • the first operation information may be information such as pressing force, pressing frequency, or the number of tappings, tapping parts, and the like.
  • the position of the touch can be not limited to the terminal display screen, but also the back, side, and the like of the terminal, which is not specifically limited in the present invention.
  • the pressing pressure value corresponding to the pressing operation may be evaluated to determine whether the condition is satisfied, and if the condition is satisfied, the first function closing request may be triggered. That is, the specific process of the step “receiving the first function shutdown request triggered by the user for the first operation of the terminal” may be as follows:
  • the first function close request is triggered.
  • the first preset function level may be preset.
  • the user may be provided with an editable selection interface, and a sliding control may be set on the interface for sliding display function level, and the user may be at the interface.
  • Set the first target function level such as can be set to level 2, and then save.
  • the terminal may send a get request, call the related process, obtain relevant data of the set first target function level from the corresponding storage area, and return the data to the terminal to obtain the first objective function.
  • the level is level two.
  • the corresponding first target function level may be acquired based on the foregoing operation information.
  • the first operation is a tap operation
  • the first operation information is a tap count.
  • the number of taps and the function level may be mapped in advance. Relationship, different tap times correspond to different function levels, to obtain a mapping relationship set, and obtain a corresponding first objective function level according to the mapping relationship set.
  • the application may be an application that is preset by the user and can be automatically processed, as a preset application.
  • the application identifier and the preset application identifier set may be determined according to the application.
  • the application is a preset application; that is, before closing the corresponding function in the application according to the first target function level, it may also include:
  • the first target function level can be set lower than the highest function level to keep the application main function not closed; when the corresponding function is closed, The function of the first target level can be turned off, and other lower-level functions can be closed, that is, the specific process of the step "closing the corresponding function in the application according to the first objective function level" can be as follows:
  • the application corresponds to a first-level function, a second-level function, a three-level function, a four-level function, and a five-level function (lowest level), assuming that the first objective function level is five, which is easy.
  • the target function level is obtained as the lowest function level, and the five-level function is closed at this time; if the first target function level is four, the four-level function and the five-level function can be closed together.
  • the terminal may be further operated to close the remaining function; that is, after the corresponding function in the application is closed according to the first target function level, the following steps may also be included:
  • the corresponding remaining unclosed function in the application is closed according to the second objective function level.
  • the application corresponds to a first-level function, a second-level function, a third-level function, a four-level function, and a five-level function (lowest level). If the first objective function level is five, at this time, The five-level function has been closed. Assuming that the second objective function level is one level, the first-level function (ie, the main function) can be closed, and all remaining functions can be closed.
  • the specific process of the step of “closing the corresponding remaining unclosed function in the application according to the second target function level” may be as follows:
  • the application corresponds to a first-level function, a second-level function, a third-level function, a four-level function, and a five-level function (lowest level). If the first objective function level is five, then the five-level function has It is turned off, and assuming that the second objective function level is three, the three-level function and the fourth-level function can be turned off.
  • all remaining functions may be closed to close the corresponding application; that is, when it is determined that the second objective function is not at the highest function level, and the corresponding remaining in the application is closed.
  • you can also include the following steps:
  • the application corresponds to a first-level function, a second-level function, a third-level function, a four-level function, and a five-level function (lowest level).
  • the second objective function level is four
  • the first The target function level is five levels.
  • the four-level function and the five-level function have been closed.
  • the third objective function level is one level, all remaining unclosed functions in the application can be closed, including the first-level function, two.
  • the method for closing the application sets a function level to a function in the application, and then receives a first function close request triggered by the user performing the first operation on the terminal, the first
  • the function close request carries the first operation information of the user performing the first operation on the terminal, obtains the corresponding first target function level according to the first function shutdown request, and closes the corresponding function in the application according to the first target function level;
  • the solution can close the corresponding function in the application based on the user's operation on the terminal, and can reduce the power consumption of the terminal, and since the solution does not directly close the application, but closes the corresponding function in the application, therefore, it needs to be restarted.
  • you start the application you need to recall and execute the closed function, which can speed up the application restart while reducing the power consumption of the terminal.
  • An embodiment of the present invention provides a device for shutting down an application, including: a setting module, a first receiving module, a first acquiring module, and a first closing module;
  • the setting module is configured to set a function level for a function in an application
  • the first receiving module is configured to receive a first function close request triggered by a first operation of the user, where the first function close request carries first operation information corresponding to the first operation;
  • the first obtaining module is configured to acquire a corresponding first target function level according to the first function closing request
  • the first closing module is configured to close a corresponding function in the application according to the first target function level.
  • the setting module is specifically configured to acquire a calling relationship between functions in an application; and set a function level to a function in the application according to the calling relationship.
  • the first objective function level is lower than a highest function level
  • the first shutdown module is specifically configured to determine whether the first target function level is the lowest function level; if yes, close the function corresponding to the first target function level in the application; if not, then close the a function corresponding to the first objective function level in the application, and a function whose function level is lower than the first target function level.
  • the apparatus further includes: a second receiving module, a second acquiring module, and a second closing module;
  • the second receiving module is configured to receive, after the first shutdown module closes the corresponding function in the application according to the first target function level, a second function close request triggered by the user for the second operation of the terminal,
  • the second function close request carries the second operation information corresponding to the second operation
  • the second acquiring module is configured to acquire a corresponding second target function level according to the second operation information, where the second target function level is higher than the first target function level;
  • the second shutdown module is configured to close a corresponding remaining unclosed function in the application according to the second target function level.
  • sequence closing device of the application is specifically integrated in the terminal, the application running in the background is WeChat, and the highest function level is one level as an example for detailed description.
  • the function corresponding to WeChat includes a first-level (highest level) function, a second-level function, a three-level function, a four-level function, and a five-level (lowest level) function.
  • FIG. 2 is another schematic flowchart of a method for shutting down an application according to an embodiment of the present invention.
  • the specific process of the method for closing the application may be as follows:
  • the terminal sets a function level for a function in the application.
  • the function level when setting a function level to a function in an application, the function level may be set based on a calling relationship between functions in the application; that is, the step “setting a function level to a function in the application” may specifically include :
  • the main function can be set as a first-level function
  • the sub-function directly called by the main function can be set as a second-level function
  • the sub-function directly called by the second-level function can be set as a three-level function
  • the three-level function can be The subfunction directly called by the function is set to a four-level function, and so on.
  • the function level may be indicated in a numerical form, such as 1 for a level function, 2 for a level 2 function, and 3 for a level 3 function.
  • the function level can be indicated in alphabetical form, such as A for a level one function, B for a level two function, and C for a level three function.
  • the terminal receives a first function close request triggered by the first operation of the user, and closes a function of a lowest function level in the application according to the first function close request.
  • the first operation may be a touch operation, such as pressing, tapping, and the like by the user, in order to avoid the erroneous operation, wherein the first function close request may carry the first operation information corresponding to the first operation, such as pressing force. , the number of hits, etc.
  • the first function close request is triggered, and the operation information may be determined. Taking the number of taps as an example, it may be determined whether the number of taps satisfies a preset condition, for example, determining whether the tap is two consecutive times. By tapping, specifically, it can be determined whether the number of taps is two consecutive taps, and if so, whether the time interval between the two taps is less than a preset time interval, and if it is less than, the tap is determined to be two consecutive taps. At this point, the first function close request can be triggered.
  • the first function close request is received, and the obtaining instruction may be sent, and the terminal may acquire the function level function corresponding to the first function obtaining request according to the obtaining instruction, and is closed in the embodiment.
  • the application corresponding to the first level function may also be determined to determine whether it is a preset application that can be automatically processed; for example, the application may be obtained.
  • (ie, WeChat) application identifier determining whether there is a sample application identifier that is the same as the application identifier in the preset identifier set, and if yes, determining that WeChat is a preset application, and the first level function corresponding to WeChat can be Close it.
  • the terminal receives the second function shutdown request triggered by the second operation of the user, and closes the function in the application that is higher than the lowest function level and lower than the highest function level according to the second function shutdown request, and the following level function.
  • the function level corresponding to the second function close request may be preset by the user, and may be any one of the second level, the third level, and the fourth level.
  • the function level is closed according to the function level set by the user.
  • the terminal receives a third function close request triggered by the third operation of the user, and closes all remaining functions in the application according to the third function close request.
  • the terminal closes the secondary function and the tertiary function according to the second function shutdown request, after receiving the third function shutdown request, all remaining functions corresponding to the WeChat, that is, the primary function and the secondary function may be closed.
  • the method for closing an application uses a terminal to set a function level to a function in an application, and then receives a first function shutdown request triggered by a first operation of the user, and is closed according to the first function.
  • Request to close the function of the lowest function level in the application and then receive the second function close request triggered by the second operation of the user, according to the second function close request, the function level in the application is higher than the lowest function level, and lower than the highest function.
  • the scheme may be based on the user to the terminal By closing the corresponding function in the application instead of shutting down the application directly, you can increase the speed at which the application restarts while reducing the power consumption of the terminal.
  • FIG. 3 is a schematic structural diagram of an apparatus for shutting down an application program according to an embodiment of the present invention.
  • the apparatus for shutting down the application program may include a setting module 301, a first receiving module 302, a first acquiring module 303, and a A module 304 is closed; as follows:
  • the setting module 301 is configured to set a function level for a function in the application
  • the first receiving module 302 is configured to receive a first function close request triggered by the user for the first operation of the terminal, where the first function close request carries the first operation information corresponding to the first operation;
  • the first obtaining module 303 is configured to acquire a corresponding first target function level according to the first function closing request
  • the first closing module 304 is configured to close a corresponding function in the application according to the first target function level.
  • the setting module 301 is specifically configured to acquire a calling relationship between functions in an application; and set a function level to a function in the application according to the calling relationship.
  • the first objective function level is below a highest function level
  • the first closing module 304 is specifically configured to determine whether the first target function level is the lowest function level; if yes, close the function corresponding to the first target function level in the application; if not, close the application The function corresponding to the first objective function level and the function level lower than the first objective function level.
  • FIG. 4 is another schematic structural diagram of an apparatus for shutting down an application according to an embodiment of the present invention.
  • the shutdown apparatus may further include: a second receiving module 305 and a second acquiring module 306. And a second shutdown module 307;
  • the second receiving module 305 is configured to: after the first shutdown module closes the corresponding function in the application according to the first target function level, receive a second function close request triggered by the second operation of the user, the first The second function close request carries the second operation information corresponding to the second operation;
  • the second obtaining module 306 is configured to obtain a corresponding second target function level according to the second operation information, where the second target function level is higher than the first target function level;
  • the second shutdown module 307 is configured to close a corresponding remaining unclosed function in the application according to the second target function level.
  • the closing device of the application program provided by the embodiment of the present invention sets the function level to the function in the application program by using the setting module 301, and the first receiving module 302 receives the first function triggered by the user performing the first operation on the terminal.
  • the first function closing request carries the first operation information of the user performing the first operation on the terminal, and the first obtaining module 303 acquires the corresponding first target function level according to the first function closing request, and the first closing module 304
  • the corresponding function in the application is closed according to the first target function level; the solution can close the corresponding function in the application based on the operation of the terminal by the user, and the power consumption of the terminal can be reduced, and the application is not directly closed because the solution does not directly close the application. Instead, the corresponding function in the application is closed. Therefore, when the application needs to be restarted, it is necessary to re-call and execute the closed function. Compared with the prior art, the terminal power consumption can be reduced while being improved. The speed at which the application restarts.
  • the foregoing modules may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities.
  • the foregoing modules refer to the foregoing method embodiments, and details are not described herein again.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention
  • FIG. 6 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device 400 includes a processor 401, a memory 402, a display unit 403, and a power source 404.
  • a processor 401 for executing instructions stored in the main memory 401
  • a memory 402 for storing data
  • a display unit 403 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device 400 includes a processor 401, a memory 402, a display unit 403, and a power source 404.
  • the structure of the electronic device 400 illustrated in FIG. 5 does not constitute a limitation to the electronic device 400.
  • Electronic device 400 may include more or fewer components than illustrated, or some components in combination, or a different component arrangement.
  • the electronic device 400 includes a terminal, such as a smart phone, a tablet computer, and the like.
  • the processor 401 is a control center of the electronic device 400.
  • the processor 401 connects various portions of the entire electronic device 400 using various interfaces and lines, performs various functions of the electronic device 400 by running or executing an application stored in the memory 402, and recalling data stored in the memory 402. The data is processed to provide overall monitoring of the electronic device 400.
  • the processor 401 loads the executable file corresponding to one or more program processes into the memory 402 according to the following instructions, and the program stored in the memory 402 is executed by the processor 401, thereby implementing various functions: a function setting function level in the application; receiving a first function close request triggered by the user for the first operation of the electronic device, the first function close request carrying the first operation information corresponding to the first operation; The first function close request acquires a corresponding first target function level; the corresponding function in the application is closed according to the first target function level.
  • the processor 401 is further configured to: acquire a call relationship between functions in an application; and set a function level to a function in the application according to the call relationship.
  • the processor 401 is further configured to: determine whether the first target function level is a lowest function level; if yes, close a function corresponding to the first target function level in the application; If not, the function corresponding to the first objective function level in the application is closed, and the function level is lower than the function of the first target function level.
  • the processor 401 is further configured to receive a second function close request triggered by a second operation of the electronic device, where the second function close request carries a second corresponding to the second operation And second operation information; acquiring a corresponding second target function level according to the second operation information, the second target function level being higher than the first target function level; closing the application according to the second target function level The corresponding remaining unclosed function in .
  • the processor 401 is further configured to: determine whether the second target function level is the highest function level; if yes, close all remaining unclosed functions in the application; if not, then Closing a function corresponding to the second objective function level in the remaining unclosed functions, and a function having a function level lower than the second objective function level.
  • the processor 401 is further configured to receive a third function close request triggered by a third operation of the electronic device, where the third function close request carries a third corresponding to the third operation Three operation information; acquiring a corresponding third target function level according to the third function shutdown request, the third target function level being higher than the second target function level; closing all remaining unclosed functions in the application .
  • the processor 401 is further configured to: receive a pressing operation of the user for the electronic device; acquire a pressing pressure value corresponding to the pressing operation; determine whether the pressing pressure value is greater than a preset threshold; Then the first function close request is triggered.
  • the processor 401 is further configured to: obtain an application identifier of the application; determine whether a sample application identifier that is the same as the application identifier exists in the preset identifier set; if yes, perform the The first objective function level closes a corresponding function in the application.
  • Memory 402 can be used to store applications and data.
  • the application stored in the memory 402 contains executable program code.
  • Applications can form various functional modules.
  • the processor 401 executes various functional applications and data processing by running an application stored in the memory 402.
  • the display screen 403 can be used to display information input by the user to the electronic device 400 or information provided to the user and various graphical user interfaces of the electronic device 400. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof.
  • the control circuit 404 is electrically connected to the display screen 403 for controlling the state of the display screen 403 under the scheduling of the processor 401.
  • the electronic device 400 can also include a radio frequency circuit 405.
  • the radio frequency circuit 405 is configured to send and receive radio frequency signals, such as establishing a communication link with a plurality of servers, and receiving data packets sent from the server.
  • electronic device 400 also includes a power source 406.
  • Power source 406 is used to power various components of electronic device 400.
  • the power supply 406 can be logically coupled to the processor 401 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the electronic device 400 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the electronic device 400 sets a function level to a function in an application, and then receives a first function close request triggered by the user performing a first operation on the electronic device, the first function.
  • the closing request carries the first operation information that the user performs the first operation on the electronic device, acquires the corresponding first target function level according to the first function shutdown request, and closes the corresponding function in the application according to the first target function level;
  • the solution can close the corresponding function in the application based on the user's operation on the electronic device, and can reduce the power consumption of the electronic device, and since the solution does not directly close the application, but closes the corresponding function in the application, therefore, When you need to restart the application, you need to recall and execute the closed function, which can improve the speed of the application restart while reducing the power consumption of the electronic device.
  • the storage is stored in a memory of the electronic device and executed by at least one processor within the electronic device, and may include a flow of an embodiment of the information distribution method during execution.
  • the storage medium may include: a read only memory (ROM, Read) Only Memory), Random Access Memory (RAM), disk or CD.
  • each functional module may be integrated into one processing chip, or each module may exist physically separately, or may have two or more modules. Integrated in one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the principles and embodiments of the present invention are described herein with reference to specific examples. The description of the above embodiments is only for the purpose of understanding the method of the present invention and the core idea thereof. Also, those skilled in the art according to the present invention The present invention is not limited by the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

一种应用程序的关闭方法、装置、存储介质及终端,该方法包括:对应用程序中的函数设置函数级别(101);接收用户通过对终端进行第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带用户对该终端进行第一操作的第一操作信息(102);根据第一函数关闭请求获取相应的第一目标函数级别(103);根据第一目标函数级别关闭应用程序中相应的函数(104)。

Description

应用程序的关闭方法、装置、存储介质及电子设备 技术领域
本发明涉及通信技术领域,特别涉及一种应用程序的关闭方法、装置、存储介质及电子设备。
背景技术
随着智能终端的发展,智能终端能够兼容的功能越来越多,不仅丰富用户生活,还给用户带来便利。随着移动终端设备已日益融入人们生活、应用功能日趋完善,给用户带来了极大便利以及提高用户体验。
技术问题
本发明实施例提供一种应用程序的关闭方法、装置、存储介质及电子设备,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
技术解决方案
第一方面,本发明实施例提供一种应用程序的关闭方法,包括:
对应用程序中的函数设置函数级别;
接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
根据所述第一函数关闭请求获取相应的第一目标函数级别;
根据所述第一目标函数级别关闭所述应用程序中相应的函数。
第二方面,本发明实施例提供了一种应用程序的关闭装置,包括:设置模块、第一接收模块、第一获取模块和第一关闭模块;
所述设置模块,用于对应用程序中的函数设置函数级别;
所述第一接收模块,用于接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
所述第一获取模块,用于根据所述第一函数关闭请求获取相应的第一目标函数级别;
所述第一关闭模块,用于根据所述第一目标函数级别关闭所述应用程序中相应的函数。
第三方面,本发明实施例提供一种存储介质,存储有多条指令,所述指令适于由处理器加载并执行如上述全部或部分的应用程序的关闭方法。
第四方面,本发明实施例提供一种电子设备,包括存储器、处理器,以及存储在所述存储器中并可在所述处理器中运行的计算机程序,所述处理器执行所述计算机程序时实现如上述全部或部分的应用程序的关闭方法。
有益效果
本发明实施例提供一种应用程序的关闭方法、装置、存储介质及电子设备,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
附图说明
图1是本发明实施例提供的应用程序的关闭方法的流程示意图。
图2是本发明实施例提供的应用程序的关闭方法的另一流程示意图。
图3是本发明实施例提供的应用程序的关闭装置的结构示意图。
图4是本发明实施例提供的应用程序的关闭装置的另一结构示意图。
图5是本发明实施例提供的电子设备的结构示意图。
图6是本发明实施例提供的电子设备的另一结构示意图。
本发明的最佳实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了实现各种功能以满足用户的各种需求,通常智能终端会安装各种各样的应用程序(可以简称为应用)。但是,智能终端上安装的应用程序会消耗大量的电量,降低智能终端的续航能力。
本发明实施例提供一种应用程序的关闭方法、装置、存储介质及电子设备。以下将分别进行详细说明。
本申请的发明人在长期研发过程中,为了减低智能终端电量的消耗,进而提升智能终端的续航能力,设计了智能终端关闭应用程序的方案,具体是关闭应用程序中所有的函数(包括主函数、子函数等等);比如智能终端自动关闭应用程序,或者根据用户的操作来关闭应用程序;具体地,智能终端可以监测用户对智能终端的操作,然后,基于该操作关闭相应的应用程序。
然而,本申请的发明人在该设计的方案中,一次性关闭智能终端内的所有函数,虽然可以降低智能终端电量消耗。但是智能终端在重新启动已被关闭所有函数的应用程序时,智能终端需要重新调用该应用程序的所有函数,会导致应用程序重新启动的速度比较慢。
为此,本申请提供一种新的关闭应用程序的方案,具体的如下:
一种应用程序的关闭方法,其包括:
对应用程序中的函数设置函数级别;
接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
根据所述第一函数关闭请求获取相应的第一目标函数级别;
根据所述第一目标函数级别关闭所述应用程序中相应的函数。
在一些实施例中,所述对应用程序中的函数设置函数级别的步骤具体包括:
获取应用程序中函数之间的调用关系;
根据所述调用关系对应用程序中的函数设置函数级别。
在一些实施例中,所述第一目标函数级别低于最高函数级别;所述根据所述第一目标函数级别关闭所述应用程序中相应的函数的步骤具体包括:
判断所述第一目标函数级别是否为最低函数级别;
若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;
若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
在一些实施例中,在根据所述第一目标函数级别关闭所述应用程序中相应的函数之后,所述关闭方法还包括:
接收用户针对终端的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;
根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;
根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
在一些实施例中,所述根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数的步骤具体包括:
判断所述第二目标函数级别是否为最高函数级别;
若是,则关闭所述应用程序中所有的剩余未关闭函数;
若否,则关闭所述剩余未关闭函数中所述第二目标函数级别对应的函数,以及函数级别低于所述第二目标函数级别的函数。
在一些实施例中,在判断所述第二目标函数不为最高函数级别,以及关闭所述应用程序中相应的剩余未关闭函数之后,所述关闭方法还包括:
接收用户针对终端的第三操作所触发的第三函数关闭请求,所述第三函数关闭请求携带所述第三操作对应的第三操作信息;
根据所述第三函数关闭请求获取相应的第三目标函数级别,所述第三目标函数级别高于所述第二目标函数级别;
关闭所述应用程序中所有的剩余未关闭函数。
在一些实施例中,所述第一操作包括按压操作,所述接收用户针对终端的第一操作所触发的第一函数关闭请求的步骤包括:
接收用户针对终端的按压操作;
获取所述按压操作对应的按压压力值;
判断所述按压压力值是否大于预设阈值;
若大于,则触发第一函数关闭请求。
在一些实施例中,所述根据所述第一目标函数级别关闭所述应用程序中相应的函数的步骤之前还包括:
获取所述应用程序的应用标识;
判断在预设标识集合中是否存在与所述应用标识相同的样本应用标识;
若是,则执行根据所述第一目标函数级别关闭所述应用程序中相应的函数。
本发明实施例采用对应用程序中的函数设置函数级别,然后,接收用户通过对终端进行第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带用户对该终端进行第一操作的第一操作信息,根据该第一函数关闭请求获取相应的第一目标函数级别,根据该第一目标函数级别关闭该应用程序中相应的函数;该方案可以基于用户对终端的操作关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
本发明实施例提供一种应用程序的关闭方法,该应用程序的关闭方法,包括:对应用程序中的函数设置函数级别;接收用户针对终端的第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带第一操作对应的第一操作信息;根据第一函数关闭请求获取相应的第一目标函数级别;根据第一目标函数级别关闭应用程序中相应的函数。
如图1所示,图1为本发明实施例应用程序的关闭方法的流程示意图,该应用程序的关闭方法,具体流程可以如下:
101、对应用程序中的函数设置函数级别。
具体地,该应用程序可以是后台运行的应用程序,如后台运行的微信、QQ等;一般地,在编写一个能运行在操作系统上的程序时,都需要一个主函数。主函数意味着建立一个独立进程,且该进程成为了程序的入口,对其它各子函数(在某些OOP语言里称作方法,比如Java)进行调用,当然,其它被调用的子函数也可以再去调用更多函数,这样整个程序的运行轨迹就像一种栈,可以称之为调用栈。主函数既是程序的入口,又是程序的出口,通常还可以指定一个exit code再退出,以表明程序最后的结果。
由于主函数肩负着入口和出口的重任,为了维护和扩展,主函数应该尽量简洁,具体的实现细节可以封装到被调用的子函数里面去。因此,在对应用程序中的函数设置函数级别时,可以基于应用程序中各函数之间的调用关系对函数级别进行设置;也即步骤“对应用程序中的函数设置函数级别”具体可以包括:
获取应用程序中函数之间的调用关系;
根据该调用关系对应用程序中的函数设置函数级别。
比如,可以将主函数设置为一级(最高级)函数,可以将该主函数直接调用的子函数设置为二级函数,可以将该二级函数直接调用的子函数设置为三级函数,可以将该三级函数直接调用的子函数设置为四级函数,以此类推;又或者,可以进行逆序排列,假设有三个层次的函数,则可以将主函数设置为三级(最高级)函数,将主函数直接调用的子函数设置为二级函数,将该第二级别的函数调用的子函数设置为一级函数。
在具体实施过程中,该应用程序中函数级别的表现形式可以有多种,比如,可以用数字形式、字母形式等指示函数级别;以数字形式为例,如以1代表一级函数,2代表二级函数,3代表三级函数,其中,数字越大代表的级别越高,或者数字越小代表的级别越高以此类推。
102、接收用户针对终端的第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带第一操作对应的第一操作信息。
具体地,第一操作可以是用户针对终端设备的按压、敲击等触控操作,对应地,该第一操作信息可以是按压力度、按压频率等信息,或者敲击次数、敲击部位等信息;而触控的位置可以不仅限于终端显示屏,还可以是终端背部、侧面等部位,本发明对此不作具体限定。
比如,以在终端显示屏进行按压操作为例,为了避免误操作,可以对该按压操作对应的按压压力值进行评估,判断是否满足条件,若满足条件则可以触发的第一函数关闭请求,也即,步骤“接收用户针对终端的第一操作所触发的第一函数关闭请求”具体流程可以如下:
接收用户针对终端的按压操作;
获取该按压操作对应的按压压力值;
判断所述按压压力值是否大于预设阈值;
若大于,则触发第一函数关闭请求。
103、根据第一函数关闭请求获取相应的第一目标函数级别。
具体地,可以对该第一预设函数级别进行预先设置,比如,可以为用户提供一个可编辑的选择界面,可以在该界面设一个滑动控件,用于滑动显示函数级别,用户可以在该界面设定第一目标函数级别,如可以设定为二级,然后保存。在函数关闭请求被触发后,终端可以发送获取请求,调用相关进程,从相应的存储区域中获取设定的第一目标函数级别的相关数据,并将该数据返回给终端,得到第一目标函数级别为二级。
优选地,可以基于上述操作信息获取相应的第一目标函数级别,比如,以第一操作为敲击操作、第一操作信息为敲击次数为例,可以预先将敲击次数与函数级别建立映射关系,不同敲击次数对应不同的函数级别,以得到映射关系集合,根据该映射关系集合获取相应的第一目标函数级别。
104、根据第一目标函数级别关闭应用程序中相应的函数。
在实际应用中,该应用程序可以是由用户预先设定的,可以进行自动处理的应用程序,以作为预设应用程序,比如,可以根据该应用程序的应用标识和预设应用标识集合判断该应用程序是否为预设应用程序;也即在根据第一目标函数级别关闭应用程序中相应的函数之前,还可以包括:
获取该应用程序的应用标识;
判断在预设标识集合中是否存在与该应用标识相同的样本应用标识;
若是,则执行根据第一目标函数级别关闭应用程序中相应的函数。
为了可以减少终端功耗,同时又可以让应用程序保持正常运行,可以将该第一目标函数级别设置低于最高函数级别,以保持应用程序主函数不被关闭;而在关闭相应的函数时,可以在关闭第一目标级别的函数的同时,还可以关闭其他较低级别的函数,也即步骤“根据第一目标函数级别关闭应用程序中相应的函数”的具体流程可以如下:
判断第一目标函数级别是否为最低函数级别;
若是,则关闭应用程序中第一目标函数级别对应的函数;
若否,则关闭应用程序中第一目标函数级别对应的函数,以及函数级别低于第一目标函数级别的函数。
比如,以最高级别为一级为例,应用程序对应有一级函数、二级函数、三级函数、四级函数、五级函数(最低级),假设该第一目标函数级别为五级,容易得到该目标函数级别为最低函数级别,此时执行关闭五级函数;假设该第一目标函数级别为四级,则可以将四级函数、五级函数一同关闭。
为了进一步减少终端功耗,可以对终端进一步地操作,以关闭剩余函数;也即在根据第一目标函数级别关闭应用程序中相应的函数之后,还可以包括以下步骤:
接收用户针对终端的第二操作所触发的第二函数关闭请求,第二函数关闭请求携带第二操作对应的第二操作信息;
根据第二操作信息获取相应的第二目标函数级别,第二目标函数级别高于第一目标函数级别;
根据第二目标函数级别关闭应用程序中相应的剩余未关闭函数。
比如,以最高级别为一级为例,应用程序对应有一级函数、二级函数、三级函数、四级函数、五级函数(最低级),若第一目标函数级别为五级,此时五级函数已被关闭,假设该第二目标函数级别为一级,则可以关闭该一级函数(即主函数),同时还可以关闭所有剩余的函数。
可选地,步骤“根据第二目标函数级别关闭应用程序中相应的剩余未关闭函数”具体流程可以如下:
判断第二目标函数级别是否为最高函数级别;
若是,则关闭应用程序中所有的剩余未关闭函数;
若否,则关闭剩余未关闭函数中第二目标函数级别对应的函数,以及函数级别低于第二目标函数级别的函数。
在实际应用中,为了可以让应用程序保持正常运行,同时减少终端功耗,可以关闭剩余函数中函数级别高于第一目标函数级别,同时又低于最高函数级别的函数,比如,仍以最高级别为一级为例,应用程序对应有一级函数、二级函数、三级函数、四级函数、五级函数(最低级),若第一目标函数级别为五级,此时五级函数已被关闭,假设该第二目标函数级别为三级,则可以关闭三级函数和四级函数。
优选地,为了更进一步地减少终端功耗,可以将剩余的所有函数关闭,以关闭对应的应用程序;也即在判断第二目标函数不为最高函数级别,以及关闭应用程序中相应的剩余未关闭函数之后,还可以包括以下步骤:
接收用户针对终端的第三操作所触发的第三函数关闭请求,第三函数关闭请求携带第三操作对应的第三操作信息;
根据第三函数关闭请求获取相应的第三目标函数级别,第三目标函数级别高于第二目标函数级别;
关闭应用程序中所有的剩余未关闭函数。
比如,以最高级别为一级为例,应用程序对应有一级函数、二级函数、三级函数、四级函数、五级函数(最低级),若第二目标函数级别为四级,第一目标函数级别为五级,此时,四级函数、五级函数已被关闭,假设第三目标函数级别为一级,则可以关闭应用程序中所有的剩余未关闭函,包括一级函数、二级函数、三级函数;假设第三目标函数级别为三级,还是可以关闭应用程序中所有的剩余未关闭函,包括一级函数、二级函数、三级函数。
由上可知,本发明实施例提供的应用程序的关闭方法,采用对应用程序中的函数设置函数级别,然后,接收用户通过对终端进行第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带用户对该终端进行第一操作的第一操作信息,根据该第一函数关闭请求获取相应的第一目标函数级别,根据该第一目标函数级别关闭该应用程序中相应的函数;该方案可以基于用户对终端的操作关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
根据以上实施例所描述的方法,以下将举例作进一步详细说明。
本发明实施例提供一种应用程序的关闭装置,其包括:设置模块、第一接收模块、第一获取模块和第一关闭模块;
所述设置模块,用于对应用程序中的函数设置函数级别;
所述第一接收模块,用于接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
所述第一获取模块,用于根据所述第一函数关闭请求获取相应的第一目标函数级别;
所述第一关闭模块,用于根据所述第一目标函数级别关闭所述应用程序中相应的函数。
在一些实施例中,所述设置模块具体用于获取应用程序中函数之间的调用关系;根据所述调用关系对应用程序中的函数设置函数级别。
在一些实施例中,所述第一目标函数级别低于最高函数级别;
所述第一关闭模块,具体用于判断所述第一目标函数级别是否为最低函数级别;若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
在一些实施例中,所述装置还包括:第二接收模块、第二获取模块和第二关闭模块;
所述第二接收模块,用于在第一关闭模块根据所述第一目标函数级别关闭所述应用程序中相应的函数之后,接收用户针对终端的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;
所述第二获取模块,用于根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;
所述第二关闭模块,用于根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
在本实施例中,将以该应用程的序关闭装置具体集成在终端,在后台运行的应用程序为微信,最高函数级别为一级为例进行详细描述。
需要说明的是,在本实施例中,微信对应的函数包括有一级(最高级)函数、二级函数、三级函数、四级函数、五级(最低级)函数。
如图2所示,图2为本发明实施例提供的应用程序的关闭方法的另一流程示意图,该应用程序的关闭方法,具体流程可以如下:
201、终端对应用程序中的函数设置函数级别。
具体地,在对应用程序中的函数设置函数级别时,可以基于应用程序中各函数之间的调用关系对函数级别进行设置;也即步骤“对应用程序中的函数设置函数级别”具体可以包括:
获取应用程序中函数之间的调用关系;
根据该调用关系对应用程序中的函数设置函数级别。
比如,可以将主函数设置为一级函数,可以将该主函数直接调用的子函数设置为二级函数,可以将该二级函数直接调用的子函数设置为三级函数,可以将该三级函数直接调用的子函数设置为四级函数,以此类推。
在具体实施过程中,该应用程序中函数级别的表现形式可以有多种,比如,可以用数字形式指示函数级别,如以1代表一级函数,2代表二级函数,3代表三级函数,或者,可以用字母形式指示函数级别,如以A代表一级函数,B代表二级函数,C代表三级函数等。
202、终端接收用户的第一操作所触发的第一函数关闭请求,根据第一函数关闭请求关闭应用程序中最低函数级别的函数。
具体地,第一操作可以是用户针对终端设备的按压、敲击等触控操作,为了避免误操作,其中,该第一函数关闭请求可以携带第一操作对应的第一操作信息,比如按压力度、敲击次数等。
为了避免误操作而触发第一函数关闭请求,可以对该操作信息进行判断,以敲击次数为例,可以判断敲击次数是否满足预设条件,比如,判断该敲击是否为连续两次的敲击,具体地,可以判断敲击次数是否为连续的两次敲击,若是,进而判断两次敲击的时间间隔是否小于预设时间间隔,若小于,则判断为连续两次的敲击,此时可以触发第一函数关闭请求。
在具体实施过程中,接收到第一函数关闭请求,可以发送获取指令,终端可以根据该获取指令获取该与该第一函数获取请求相应的函数级别的函数进行关闭,在本实施例中设为最低函数级别的函数,即一级函数。
优选地,在关闭该一级函数之前,还可以对该一级函数对应的应用程序(即微信)进行判断,以确定是否为可以自动进行处理的预设应用程序;比如,可以获取该应用程序(即微信)的应用标识,判断在预设标识集合中是否存在与该应用标识相同的样本应用标识,若存在,则判定为微信为预设应用程序,此时可以对微信对应的一级函数进行关闭。
203、终端接收用户的第二操作所触发的第二函数关闭请求,根据第二函数关闭请求关闭应用程序中函数级别高于最低函数级别,同时低于最高函数级别的函数,及其以下级别的函数。
具体地,该第二函数关闭请求对应的函数等级可以由用户预先进行设定,可以是二级、三级、四级中任意一种,在执行函数关闭时,根据用户设置的函数等级,关闭的函数可以有多种,比如,可以关闭三级函数、四级函数,或者二级函数、三级函数、四级函数,而不可以是二级函数、四级函数。
204、终端接收用户的第三操作所触发的第三函数关闭请求,根据第三函数关闭请求关闭应用程序中所有剩余的函数。
比如,终端根据第二函数关闭请求对应关闭了二级函数和三级函数,则在接收到第三函数关闭请求后,可以关闭微信对应的所有剩余的函数,即一级函数和二级函数。
由上可知,本发明实施例提供的应用程序的关闭方法,采用终端对应用程序中的函数设置函数级别,然后,接收用户的第一操作所触发的第一函数关闭请求,根据第一函数关闭请求关闭应用程序中最低函数级别的函数,再接收用户的第二操作所触发的第二函数关闭请求,根据第二函数关闭请求关闭应用程序中函数级别高于最低函数级别,同时低于最高函数级别的函数,及其以下级别的函数,最后接收用户的第三操作所触发的第三函数关闭请求,根据第三函数关闭请求关闭应用程序中所有剩余的函数;该方案可以基于用户对终端的操作关闭应用程序中相应的函数,而非直接关闭应用程序,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
为了更好地实施以上方法,本发明实施例还提供一种应用程序的关闭装置,该闭装置可以集成在终端中,该终端具体可以包括手机、平板电脑、笔记本电脑等设备。如图3所示,图3为本发明实施例所提供的应用程序的关闭装置的结构示意图,该应用程序的关闭装置可以包括设置模块301、第一接收模块302、第一获取模块303和第一关闭模块304;如下:
该设置模块301,用于对应用程序中的函数设置函数级别;
该第一接收模块302,用于接收用户针对终端的第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带该第一操作对应的第一操作信息;
该第一获取模块303,用于根据该第一函数关闭请求获取相应的第一目标函数级别;
该第一关闭模块304,用于根据该第一目标函数级别关闭该应用程序中相应的函数。
在一些实施例中,该设置模块301具体用于获取应用程序中函数之间的调用关系;根据该调用关系对应用程序中的函数设置函数级别。
在一些实施例中,该第一目标函数级别低于最高函数级别;
该第一关闭模块304,具体可以用于判断该第一目标函数级别是否为最低函数级别;若是,则关闭该应用程序中该第一目标函数级别对应的函数;若否,则关闭该应用程序中该第一目标函数级别对应的函数,以及函数级别低于该第一目标函数级别的函数。
在一些实施例中,请参阅图4,图4为本发明实施例所提供的应用程序的关闭装置的另一结构示意图,该关闭装置还可以包括:第二接收模块305、第二获取模块306和第二关闭模块307;
该第二接收模块305,用于在第一关闭模块根据该第一目标函数级别关闭该应用程序中相应的函数之后,接收用户针对终端的第二操作所触发的第二函数关闭请求,该第二函数关闭请求携带该第二操作对应的第二操作信息;
该第二获取模块306,用于根据该第二操作信息获取相应的第二目标函数级别,该第二目标函数级别高于该第一目标函数级别;
该第二关闭模块307,用于根据该第二目标函数级别关闭该应用程序中相应的剩余未关闭函数。
由上可知,本发明实施例提供的应用程序的关闭装置,采用设置模块301对应用程序中的函数设置函数级别,第一接收模块302接收用户通过对终端进行第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带用户对该终端进行第一操作的第一操作信息,第一获取模块303根据该第一函数关闭请求获取相应的第一目标函数级别,第一关闭模块304根据该第一目标函数级别关闭该应用程序中相应的函数;该方案可以基于用户对终端的操作关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,相对现有技术而言,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。
参考图5和图6,图5为本发明实施例提供的电子设备的结构示意图,图6为本发明实施例提供的电子设备的另一结构示意图。电子设备400包括处理器401、存储器402、显示单元403以及电源404。本领域技术人员可以理解,图5中示出的电子设备400的结构并不构成对电子设备400的限定。电子设备400可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。需要说明的是,电子设备400包括有终端,比如智能手机、平板电脑等。
其中,处理器401是电子设备400的控制中心。处理器401利用各种接口和线路连接整个电子设备400的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备400的各种功能和处理数据,从而对电子设备400进行整体监控。
处理器401会按照如下的指令,将一个或一个以上的程序进程对应的可执行文件加载到存储器402中,并由处理器401来运行存储在存储器402中的程序,从而实现各种功能:对应用程序中的函数设置函数级别;接收用户针对电子设备的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;根据所述第一函数关闭请求获取相应的第一目标函数级别;根据所述第一目标函数级别关闭所述应用程序中相应的函数。
在一些实施例中,所述处理器401还可以用于,获取应用程序中函数之间的调用关系;根据所述调用关系对应用程序中的函数设置函数级别。
在一些实施例中,所述处理器401还可以用于,判断所述第一目标函数级别是否为最低函数级别;若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
在一些实施例中,所述处理器401还可以用于,接收用户针对电子设备的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
在一些实施例中,所述处理器401还可以用于,判断所述第二目标函数级别是否为最高函数级别;若是,则关闭所述应用程序中所有的剩余未关闭函数;若否,则关闭所述剩余未关闭函数中所述第二目标函数级别对应的函数,以及函数级别低于所述第二目标函数级别的函数。
在一些实施例中,所述处理器401还可以用于,接收用户针对电子设备的第三操作所触发的第三函数关闭请求,所述第三函数关闭请求携带所述第三操作对应的第三操作信息;根据所述第三函数关闭请求获取相应的第三目标函数级别,所述第三目标函数级别高于所述第二目标函数级别;关闭所述应用程序中所有的剩余未关闭函数。
在一些实施例中,所述处理器401还可以用于,接收用户针对电子设备的按压操作;获取该按压操作对应的按压压力值;判断所述按压压力值是否大于预设阈值;若大于,则触发第一函数关闭请求。
在一些实施例中,所述处理器401还可以用于,获取所述应用程序的应用标识;判断在预设标识集合中是否存在与所述应用标识相同的样本应用标识;若是,则执行根据所述第一目标函数级别关闭所述应用程序中相应的函数。
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行程序代码。应用程序可以组成各种功能模块。处理器401通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。
显示屏403可用于显示由用户输入到电子设备400的信息或提供给用户的信息以及电子设备400的各种图形用户接口。这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。
控制电路404与显示屏403电性连接,在处理器401的调度下,用于控制显示屏403的状态。
电子设备400还可包括还包括射频电路405。射频电路405用于收发射频信号,比如与多个服务器建立通信链路,接收从服务器发送的数据包。
在一些实施例中,电子设备400还包括电源406。电源406用于给电子设备400的各个部件供电。电源406可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图5和图6中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。
由上述可知,本发明实施例提供的电子设备400,采用对应用程序中的函数设置函数级别,然后,接收用户通过对电子设备进行第一操作所触发的第一函数关闭请求,该第一函数关闭请求携带用户对该电子设备进行第一操作的第一操作信息,根据该第一函数关闭请求获取相应的第一目标函数级别,根据该第一目标函数级别关闭该应用程序中相应的函数;该方案可以基于用户对电子设备的操作关闭应用程序中相应的函数,可以降低电子设备的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低电子设备电量消耗的同时,提升应用程序重新启动的速度。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,如存储在电子设备的存储器中,并由电子设备内的至少一个处理器进行加载和执行。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如信息发布方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
以上对本发明实施例提供的一种应用程序关闭方法和装置进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (20)

  1. 一种应用程序的关闭方法,其包括:
    对应用程序中的函数设置函数级别;
    接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
    根据所述第一函数关闭请求获取相应的第一目标函数级别;
    根据所述第一目标函数级别关闭所述应用程序中相应的函数。
  2. 如权利要求1所述的关闭方法,其中,所述对应用程序中的函数设置函数级别的步骤具体包括:
    获取应用程序中函数之间的调用关系;
    根据所述调用关系对应用程序中的函数设置函数级别。
  3. 如权利要求1所述的关闭方法,其中,所述第一目标函数级别低于最高函数级别;所述根据所述第一目标函数级别关闭所述应用程序中相应的函数的步骤具体包括:
    判断所述第一目标函数级别是否为最低函数级别;
    若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;
    若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
  4. 如权利要求3所述的关闭方法,其中,在根据所述第一目标函数级别关闭所述应用程序中相应的函数之后,所述关闭方法还包括:
    接收用户针对终端的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;
    根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;
    根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
  5. 如权利要求4所述的关闭方法,其中,所述根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数的步骤具体包括:
    判断所述第二目标函数级别是否为最高函数级别;
    若是,则关闭所述应用程序中所有的剩余未关闭函数;
    若否,则关闭所述剩余未关闭函数中所述第二目标函数级别对应的函数,以及函数级别低于所述第二目标函数级别的函数。
  6. 如权利要求5所述的关闭方法,其中,在判断所述第二目标函数不为最高函数级别,以及关闭所述应用程序中相应的剩余未关闭函数之后,所述关闭方法还包括:
    接收用户针对终端的第三操作所触发的第三函数关闭请求,所述第三函数关闭请求携带所述第三操作对应的第三操作信息;
    根据所述第三函数关闭请求获取相应的第三目标函数级别,所述第三目标函数级别高于所述第二目标函数级别;
    关闭所述应用程序中所有的剩余未关闭函数。
  7. 如权利要求1所述的关闭方法,其中,所述第一操作包括按压操作,所述接收用户针对终端的第一操作所触发的第一函数关闭请求的步骤包括:
    接收用户针对终端的按压操作;
    获取所述按压操作对应的按压压力值;
    判断所述按压压力值是否大于预设阈值;
    若大于,则触发第一函数关闭请求。
  8. 如权利要求1所述的关闭方法,其中,所述根据所述第一目标函数级别关闭所述应用程序中相应的函数的步骤之前还包括:
    获取所述应用程序的应用标识;
    判断在预设标识集合中是否存在与所述应用标识相同的样本应用标识;
    若是,则执行根据所述第一目标函数级别关闭所述应用程序中相应的函数。
  9. 一种应用程序的关闭装置,其包括:设置模块、第一接收模块、第一获取模块和第一关闭模块;
    所述设置模块,用于对应用程序中的函数设置函数级别;
    所述第一接收模块,用于接收用户针对终端的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
    所述第一获取模块,用于根据所述第一函数关闭请求获取相应的第一目标函数级别;
    所述第一关闭模块,用于根据所述第一目标函数级别关闭所述应用程序中相应的函数。
  10. 如权利要求9所述的关闭装置,其中,所述设置模块具体用于获取应用程序中函数之间的调用关系;根据所述调用关系对应用程序中的函数设置函数级别。
  11. 如权利要求9所述的关闭装置,其中,所述第一目标函数级别低于最高函数级别;
    所述第一关闭模块,具体用于判断所述第一目标函数级别是否为最低函数级别;若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
  12. 如权利要求11所述的关闭装置,其中,所述装置还包括:第二接收模块、第二获取模块和第二关闭模块;
    所述第二接收模块,用于在第一关闭模块根据所述第一目标函数级别关闭所述应用程序中相应的函数之后,接收用户针对终端的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;
    所述第二获取模块,用于根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;
    所述第二关闭模块,用于根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
  13. 一种存储介质,其中,所述存储介质中存储有多条指令,所述多条指令适于由处理器加载以执行如权利要求1至8任一项所述的方法。
  14. 一种电子设备,其包括存储器、处理器以及存储在所述存储器中并可在所述处理中运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
    对应用程序中的函数设置函数级别;
    接收用户针对电子设备的第一操作所触发的第一函数关闭请求,所述第一函数关闭请求携带所述第一操作对应的第一操作信息;
    根据所述第一函数关闭请求获取相应的第一目标函数级别;
    根据所述第一目标函数级别关闭所述应用程序中相应的函数。
  15. 如权利要求14所述的电子设备,其中,所述第一目标函数级别低于最高函数级别;所述处理器还用于执行以下步骤:
    判断所述第一目标函数级别是否为最低函数级别;
    若是,则关闭所述应用程序中所述第一目标函数级别对应的函数;
    若否,则关闭所述应用程序中所述第一目标函数级别对应的函数,以及函数级别低于所述第一目标函数级别的函数。
  16. 如权利要求15所述的电子设备,其中,所述处理器还用于执行以下步骤:
    接收用户针对电子设备的第二操作所触发的第二函数关闭请求,所述第二函数关闭请求携带所述第二操作对应的第二操作信息;
    根据所述第二操作信息获取相应的第二目标函数级别,所述第二目标函数级别高于所述第一目标函数级别;
    根据所述第二目标函数级别关闭所述应用程序中相应的剩余未关闭函数。
  17. 如权利要求16所述的电子设备,其中,所述处理器还用于执行以下步骤:
    判断所述第二目标函数级别是否为最高函数级别;
    若是,则关闭所述应用程序中所有的剩余未关闭函数;
    若否,则关闭所述剩余未关闭函数中所述第二目标函数级别对应的函数,以及函数级别低于所述第二目标函数级别的函数。
  18. 如权利要求17所述的电子设备,其中,所述处理器还用于执行以下步骤:
    接收用户针对终端的第三操作所触发的第三函数关闭请求,所述第三函数关闭请求携带所述第三操作对应的第三操作信息;
    根据所述第三函数关闭请求获取相应的第三目标函数级别,所述第三目标函数级别高于所述第二目标函数级别;
    关闭所述应用程序中所有的剩余未关闭函数。
  19. 如权利要求14所述的电子设备,其中,所述处理器还用于执行以下步骤:
    接收用户针对终端的按压操作;
    获取所述按压操作对应的按压压力值;
    判断所述按压压力值是否大于预设阈值;
    若大于,则触发第一函数关闭请求。
  20. 如权利要求14所述的电子设备,其中,所述处理器还用于执行以下步骤:
    获取所述应用程序的应用标识;
    判断在预设标识集合中是否存在与所述应用标识相同的样本应用标识;
    若是,则执行根据所述第一目标函数级别关闭所述应用程序中相应的函数。
PCT/CN2017/086482 2016-05-31 2017-05-29 应用程序的关闭方法、装置、存储介质及电子设备 WO2017206885A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610383705.5A CN106095492B (zh) 2016-05-31 2016-05-31 一种应用程序的关闭方法和装置
CN201610383705.5 2016-05-31

Publications (1)

Publication Number Publication Date
WO2017206885A1 true WO2017206885A1 (zh) 2017-12-07

Family

ID=57447964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086482 WO2017206885A1 (zh) 2016-05-31 2017-05-29 应用程序的关闭方法、装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN106095492B (zh)
WO (1) WO2017206885A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095048B (zh) * 2016-05-31 2019-02-12 Oppo广东移动通信有限公司 一种函数的关闭方法及装置
CN106095492B (zh) * 2016-05-31 2017-11-07 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106095487B (zh) * 2016-05-31 2019-07-16 Oppo广东移动通信有限公司 一种应用程序的关闭方法和装置
CN106020908B (zh) * 2016-05-31 2019-04-12 Oppo广东移动通信有限公司 一种函数关闭方法及装置
CN106850947A (zh) * 2016-12-15 2017-06-13 广州视源电子科技股份有限公司 一种开机动画的控制方法及装置
CN112135294A (zh) * 2020-09-21 2020-12-25 Oppo广东移动通信有限公司 无线加密方法及其客户终端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866069A (zh) * 2015-06-12 2015-08-26 广东小天才科技有限公司 一种自动清理后台应用程序的方法及装置
CN105278370A (zh) * 2015-09-30 2016-01-27 小米科技有限责任公司 节电模式开启方法及装置
CN106020907A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106020910A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106095492A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092691B (zh) * 2013-01-23 2019-03-01 Oppo广东移动通信有限公司 一种安卓系统的进程管理方法和管理单元
CN103176842B (zh) * 2013-03-15 2016-04-27 广东欧珀移动通信有限公司 后台进程管理方法及其移动终端
US8914013B2 (en) * 2013-04-25 2014-12-16 Airwatch Llc Device management macros

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866069A (zh) * 2015-06-12 2015-08-26 广东小天才科技有限公司 一种自动清理后台应用程序的方法及装置
CN105278370A (zh) * 2015-09-30 2016-01-27 小米科技有限责任公司 节电模式开启方法及装置
CN106020907A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106020910A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106095492A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置

Also Published As

Publication number Publication date
CN106095492B (zh) 2017-11-07
CN106095492A (zh) 2016-11-09

Similar Documents

Publication Publication Date Title
WO2017206885A1 (zh) 应用程序的关闭方法、装置、存储介质及电子设备
WO2017069595A1 (en) Electronic device and method for executing function using speech recognition thereof
WO2017206878A1 (zh) 一种基于唤醒锁的处理方法、装置、存储介质及电子设备
WO2018021678A1 (en) Electronic device and method for operating the same
WO2017206862A1 (zh) 一种基于亮屏锁的处理方法、装置、存储介质及电子设备
WO2018076841A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2018076889A1 (zh) 数据备份的方法、装置、系统、存储介质及服务器
WO2017206870A1 (zh) 一种传感器关闭方法、装置、存储介质及电子设备
WO2018076861A1 (zh) 数据传输的控制方法、装置、存储介质、服务器及系统
WO2018076812A1 (zh) 数据请求的响应方法、装置、存储介质、服务器及系统
WO2017206875A1 (zh) 一种基于数据包的处理方法、装置、存储介质及电子设备
WO2018076869A1 (zh) 一种数据备份方法、装置、存储介质和电子设备
WO2017206883A1 (zh) 一种应用处理方法、装置、存储介质及电子设备
WO2018076867A1 (zh) 数据备份的删除方法、装置、系统、存储介质和服务器
WO2017067286A1 (zh) 一种指纹模板更新方法、装置及终端
WO2018076819A1 (zh) 数据的上传方法、装置、存储介质、电子设备及系统
WO2017206886A1 (zh) 一种唤醒锁释放方法、装置、存储介质及电子设备
WO2017206867A1 (zh) 一种传感器的关闭方法、装置、存储介质及电子设备
WO2018161580A1 (zh) 广播的控制方法、装置、存储介质及电子设备
WO2017206879A1 (zh) 一种移动终端应用程序的处理方法、装置、存储介质及电子设备
WO2018062894A1 (ko) 전력을 제어하는 전자 장치
WO2018076829A1 (zh) 终端数据的处理方法、装置、系统、存储介质及服务器
WO2018076840A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2018056642A2 (en) Electronic device and method thereof for managing applications
WO2016188285A1 (zh) 一种终端应用的进程管理方法及装置

Legal Events

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

Ref document number: 17805830

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17805830

Country of ref document: EP

Kind code of ref document: A1