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

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

Info

Publication number
WO2017206866A1
WO2017206866A1 PCT/CN2017/086463 CN2017086463W WO2017206866A1 WO 2017206866 A1 WO2017206866 A1 WO 2017206866A1 CN 2017086463 W CN2017086463 W CN 2017086463W WO 2017206866 A1 WO2017206866 A1 WO 2017206866A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
level
application
function level
target
Prior art date
Application number
PCT/CN2017/086463
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 WO2017206866A1 publication Critical patent/WO2017206866A1/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
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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

Definitions

  • the present invention relates to the field of electronic device technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for closing an application.
  • Embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for closing an application, which can improve the speed of restarting an application.
  • an embodiment of the present invention provides a method for shutting down an application, including:
  • an embodiment of the present invention provides a device shutdown apparatus, including: a setting module, a location determining module, a level acquiring module, and a shutdown module;
  • the setting module is configured to set a function level for a function in an application
  • the location determining module is configured to determine an operating location of the user for the terminal
  • the level obtaining module is configured to acquire an objective function level corresponding to the operation location
  • the shutdown module is configured to close a function corresponding to the target function level in the application.
  • an embodiment of the present invention provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform the method provided by any one of the embodiments of the present invention.
  • an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • Embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for closing an application, which can improve the speed of restarting an application.
  • FIG. 1 is a schematic flowchart of a method for closing an application according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another method for shutting down an application according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for shutting down a sensor according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for shutting down an application program according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device for shutting down a second application program according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • smart terminals In order to achieve various functions to meet various needs of users, usually, smart terminals install a variety of applications, but the applications installed on the smart terminals consume a large amount of power and reduce the endurance of the smart terminals.
  • An embodiment of the present invention provides a method for shutting down an application, including the following steps:
  • the step of obtaining a corresponding target function level specifically includes:
  • the step of setting a function level to a function in an application specifically includes:
  • the function level is set for the function in the application based on the call relationship.
  • the step of setting a function level to a function in an application specifically includes:
  • the step of closing the function corresponding to the target function level in the application specifically includes:
  • the sensor call function in the sensor call function set is turned off according to the target function level.
  • the step of the target function is lower than the highest level, and the step of closing the function corresponding to the target function level in the application specifically includes:
  • the function corresponding to the target function level in the application is closed, and the function level is lower than the function of the target function level.
  • the shutdown method further includes:
  • the step of closing the function corresponding to the target function level in the application is executed.
  • the step of acquiring the target function level corresponding to the operation location comprises:
  • the embodiment of the invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the following steps:
  • the embodiment of the present invention will be described from the perspective of a device for shutting down the device.
  • the device for shutting down the device may be integrated into the terminal, and the terminal may be a mobile Internet device (such as a smart phone or a tablet) or a smart wearable device (such as Smart watches) and other electronic devices.
  • FIG. 1 is a schematic flowchart of a method for shutting down an application according to an embodiment of the present invention. :
  • step S101 a function level is set for a function in the application.
  • the computer When the computer compiles or runs, it uses a function to complete the relevant commands.
  • the function body In the application, the function body is executed by calling the function.
  • the implementation of each function in the application is performed by the function. Specifically, Combining a series of statements that perform a function is a function.
  • the main function means to establish an independent process, and the process becomes the entry point of the program, calling other functions and methods. So the running track of the whole program is like a stack. Sometimes we call it the call stack.
  • the main function is both the entry point of the program and the exit of the program. Usually we can also specify a return value and exit to indicate the final result of the program. what does it look like. Since the main function shoulders the burden of entry and exit, it is best not to put too much detail in the main function, which is not conducive to maintenance and expansion.
  • the main function should be as simple as possible, and the specific implementation details should be encapsulated into the called sub-function.
  • the embodiment of the present invention can set the function level according to the calling relationship between the functions in the application, that is, the step of setting the function level to the function in the application may specifically include:
  • the function level set for the function in the application can be expressed in a variety of ways, such as using a number to define a function in the program as a level 1 function, a level 2 function, a level 3 function, etc., and can also use letters to program
  • the functions are defined as A-level functions, B-level functions, C-level functions, etc. Therefore, the function level can be defined with different parameters.
  • Step S102 determining an operation location of the user for the terminal.
  • the operation of the terminal for the terminal may be an operation such as pressing, double-clicking, etc., wherein the operation of the user for the terminal may be a touch screen operation on the terminal, and of course, the operation position of the user for the terminal is not limited to the operation of the touch screen, It is an operation on the rear shell, the side rail, and the like of the terminal, and the present invention does not further limit this.
  • the preset screen area corresponding to the clicked position is determined, and the corresponding target function level is obtained according to the preset screen area, according to the preset screen area.
  • the steps of obtaining the corresponding target function level may specifically include:
  • Step S103 obtaining an objective function level corresponding to the operation position.
  • the function level information corresponding to the operation position is searched, and the target function level is determined according to the function level information.
  • the corresponding target function level may be obtained based on the foregoing operation location, for example, pre-establishing a mapping relationship between the click position and the function level on the touch screen of the terminal, and obtaining a corresponding target according to the position and mapping relationship of the user clicking on the touch screen. Function level.
  • Step S104 the function corresponding to the target function level in the application is closed.
  • the preset application set can be preset by the user, and the application in the set does not need to be closed by the method provided by the solution, for example, the target function level can be obtained.
  • the identification information of the function and then determining, according to the identification information and the preset application identifier set, whether the application corresponding to the function is a preset application, that is, before the step of closing the function according to the target function level, the method further Can include:
  • the step of closing the function corresponding to the target function level in the application is executed.
  • the embodiment of the present invention sets a function level for a function in an application, determines an operation position of the user for the terminal, and acquires a function level corresponding to the operation position, and closes a function corresponding to the target function level in the application;
  • the solution can close the corresponding function in the application based on the user's operation position 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.
  • FIG. 2 is a schematic flowchart of a method for shutting down an application according to an embodiment of the present invention.
  • the method for closing the application of this embodiment includes:
  • Step S201 Acquire a calling relationship between functions in the application, and set a function level on the function in the application according to the calling relationship.
  • the embodiment of the present invention sets a function level to a function in an application according to the calling relationship, and any third-party application stores a main function.
  • the main function can be set as a first-level function
  • the function that can be called directly by the main function is set as a second-level function
  • the first-level function is directly called as a three-level function, and so on.
  • Step S202 determining an operation location of the user for the terminal, and determining a target area on the terminal according to the operation position.
  • each area of the N area may be divided in advance on the touch screen, which is a first area, a second area, and an Nth area, and then it is determined in which area the operation position of the terminal belongs to the user, if the user operates In the first area, it is determined that the first area is the target area; if the user operation falls within the second area, it is determined that the second area is the target area.
  • Step S203 triggering a function close request according to the target area, wherein the function closes the request carrying level information.
  • the mapping relationship between the preset area and the function close request may be established in advance, and after determining the target area, the same preset area sample is searched in the mapping relationship set according to the target area, and then the The function close request corresponding to the preset area sample.
  • Step S204 Acquire an objective function level corresponding to the function shutdown request.
  • the function close request may carry function level information, that is, the function close request is extracted to obtain corresponding function level information, and the target function level is determined according to the function level information.
  • step S205 it is determined whether the target function level is the lowest function level. If yes, step S206 is performed, and if no, step S207 is performed.
  • Step S206 closing the function corresponding to the target function level in the application.
  • Step S207 the function corresponding to the target function level in the application and the function whose function level is lower than the target function level are closed.
  • the function is closed.
  • the function corresponding to the first target function level in the application that is, close all functions in the second function level; if three function levels are set for the function in the application, that is, the main function is the first function level, the main function call
  • the function is a second function level, and the function that can be called by the function in the second function level is the third function level, and the first target function level is, for example, the second function level, and the first target function level is not the lowest function level.
  • the function corresponding to the first target function level in the application and the function whose function level is lower than the first target function level are closed, that is, all functions in the second function level are closed, and all functions in the third function level are closed.
  • the embodiment of the present invention sets a function level for a function in an application, determines an operation position of the user for the terminal, and acquires a function level corresponding to the operation position, and closes a function corresponding to the target function level in the application;
  • the solution can close the corresponding function in the application based on the user's operation position 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.
  • FIG. 3 is a schematic flowchart of a method for shutting down an application according to an embodiment of the present invention. Methods include:
  • Step S301 determining a sensor calling function set in the terminal system, and setting a function level on a function of the sensor calling function set.
  • the setting level of the sensor calling function in the system may be set according to the frequency of use of the sensor, for example, the sensor calling function corresponding to the sensor with a higher frequency is set to a higher level, and will be used.
  • the sensor calling function corresponding to the lower frequency sensor is set to a lower level, that is, the step of setting the function level to the sensor calling function in the application may specifically include:
  • Step S302 determining an operation location of the user for the terminal.
  • the step of carrying the function level information may specifically include:
  • Step S303 acquiring an objective function level corresponding to the operation position.
  • the corresponding target function level may be obtained based on the foregoing operation location, for example, pre-establishing a mapping relationship between the click position and the function level on the touch screen of the terminal, and acquiring a corresponding target function level according to the position clicked by the user on the touch screen.
  • Step S304 the sensor calling function corresponding to the target function level in the system is closed.
  • the step of closing the sensor calling function according to the target function level may specifically include:
  • the sensor call function corresponding to the target function level is closed, and the sensor call function whose function level is lower than the target function level.
  • the sensor calling function in the target function level is turned off.
  • the sensor name corresponding to the sensor calling function may be displayed on the display screen of the terminal, and the user has been prompted.
  • the embodiment of the present invention determines a function calling function set in the terminal system, sets a function level of the function in the function calling function set of the sensor, determines an operation position of the user for the terminal, and acquires a function level corresponding to the operation position, Finally, the sensor calling function corresponding to the target function level in the terminal system is closed; the solution can be based on the sensor calling function in the terminal system, and the functions are set to multiple levels, which can reduce the power consumption of the terminal, and The solution does not directly shut down all the sensors, which can improve the efficiency of the sensor while reducing the power consumption of the terminal.
  • An embodiment of the present invention provides a device shutdown apparatus, including: a setting module, a location determining module, a level acquiring module, and a shutdown module;
  • the setting module is configured to set a function level for a function in an application
  • the location determining module is configured to determine an operating location of the user for the terminal
  • the level obtaining module is configured to acquire an objective function level corresponding to the operation location
  • the shutdown module is configured to close a function corresponding to the target function level in the application
  • the level obtaining module specifically includes: an area determining submodule and an obtaining submodule;
  • the area determining sub-module is configured to determine a preset preset screen area of the operation location on the terminal;
  • the obtaining submodule is configured to obtain a corresponding target function level according to the preset screen area.
  • the setting module specifically includes: a relationship acquiring submodule and a setting submodule;
  • the relationship obtaining submodule is configured to acquire a calling relationship between functions in an application
  • the first setting submodule is configured to set a function level to a function in an application according to the calling relationship.
  • the setting module is specifically configured to: determine a sensor calling function set in the terminal system, and set a function level to a function in the sensor calling function set;
  • the shutdown module is specifically configured to close the sensor calling function according to the target function level.
  • the target function level is lower than a highest level
  • the shutdown module specifically includes: a determining submodule and a closing submodule
  • the determining submodule is configured to determine whether the target function level is the lowest function level
  • the closing sub-module is configured to: when the determining sub-module determines to be YES, close a function corresponding to the target function level in the application, and when the determining sub-module determines to be no, close the application The function corresponding to the target function level and the function level lower than the function of the target function level.
  • the embodiment of the present invention further provides an application closing device, where the closing device of the application can be integrated in a terminal, and the terminal can be a mobile internet device (such as a smart phone or a tablet), and an intelligent device. Wear all kinds of electronic devices such as smart watches.
  • the closing device of the application includes: a setting module 401, a position determining module 402, a level obtaining module 403, and a closing module 404;
  • the setting module 401 is configured to set a function level for a function in the application
  • the location determining module 402 is configured to determine an operating location of the user for the terminal;
  • the level obtaining module 403 is configured to obtain a corresponding target function level according to the operation location;
  • the closing module 404 is configured to close a function corresponding to the target function level in the application.
  • the level obtaining 403 specifically includes: an area determining sub-module 4031 and an obtaining sub-module 4032;
  • the area determining submodule 4031 is configured to determine a target area on the terminal according to the operating position
  • the obtaining submodule 4032 is configured to trigger a function close request according to the target area.
  • the setting module 401 specifically includes: a relationship obtaining submodule 4011 and a setting submodule 4012;
  • the relationship obtaining submodule 4011 is configured to acquire a calling relationship between functions in an application
  • the first setting sub-module 4012 is configured to set a function level to a function in the application according to the calling relationship.
  • the setting module 401 is specifically configured to: determine a sensor calling function set in the terminal system, and set a function level on a function in the sensor calling function set;
  • the module 404 is closed, specifically for closing the sensor calling function according to the target function level.
  • the target function level is lower than the highest level
  • the closing module 404 specifically includes: a determining submodule and a closing submodule
  • the determining submodule is configured to determine whether the target function level is the lowest function level
  • the closing sub-module is configured to close the function corresponding to the target function level in the application when the determining sub-module determines to be YES, and close the function corresponding to the target function level in the application, and the function level when the determining sub-module determines to be no. A function below the target function level.
  • the setting module 401 is used to set a function level for the function in the application
  • the location determining module 402 determines the operating position of the user for the terminal
  • the level obtaining module 403 obtains the target function level corresponding to the operating position, and closes the module.
  • 404 closes the function corresponding to the target function level in the application; the solution can close the corresponding function in the application based on the user's operation position on the terminal, can reduce the power consumption of the terminal, and since the solution does not directly close the application, It is to close the corresponding function in the application, so 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 terminal.
  • 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.
  • An embodiment of the present invention further provides an electronic device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • an electronic device which may be a device such as a smart phone or a tablet.
  • the electronic device 500 includes a processor 501, a memory 502, a display screen 503, and a control circuit 504.
  • the processor 501 is electrically connected to the memory 502, the display screen 503, and the control circuit 504, respectively.
  • the processor 501 is a control center of the electronic device 500, and connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 502, and calling data stored in the memory 502.
  • the various functions and processing data of the device enable overall monitoring of the electronic device.
  • the processor 501 in the electronic device 500 loads the instructions corresponding to the process of one or more applications into the memory 502 according to the following steps, and is stored and stored in the memory 502 by the processor 501.
  • the application thus implementing various functions:
  • the processor 501 is configured to perform the following steps:
  • the processor 501 is configured to perform the following steps:
  • the function level is set for the function in the application based on the call relationship.
  • the steps of setting a function level to a function in an application specifically include:
  • the processor 501 is configured to perform the following steps:
  • the sensor call function in the sensor call function set is turned off according to the target function level.
  • the processor 501 is configured to perform the following steps:
  • the function corresponding to the target function level in the application is closed, and the function level is lower than the function of the target function level.
  • the processor 501 is further configured to perform the following steps:
  • the step of closing the function corresponding to the target function level in the application is executed.
  • the processor 501 is configured to perform the following steps:
  • Memory 502 can be used to store applications and data.
  • the application stored in the memory 502 contains instructions executable in the processor.
  • Applications can form various functional modules.
  • the processor 501 executes various functional applications and data processing by running an application stored in the memory 502.
  • the display screen 503 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof.
  • the control circuit 504 is electrically connected to the display screen 503 for controlling the display screen 503 to display information.
  • the electronic device 500 further includes a radio frequency circuit 505, an input unit 506, an audio circuit 507, a sensor 508, and a power source 509.
  • the processor 501 is electrically connected to the radio frequency circuit 505, the input unit 506, the audio circuit 507, the sensor 508, and the power source 509, respectively.
  • the radio frequency circuit 505 is used for transmitting and receiving radio frequency signals to establish wireless communication with network devices or other electronic devices through wireless communication, and to transmit and receive signals with network devices or other electronic devices.
  • the input unit 506 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls.
  • the input unit 506 can include a fingerprint identification module.
  • the audio circuit 507 can provide an audio interface between the user and the terminal through a speaker and a microphone.
  • Electronic device 500 may also include at least one type of sensor 508, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.;
  • Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like that can be configured in the terminal are not described herein.
  • Power source 509 is used to power various components of electronic device 500.
  • the power supply 509 can be logically coupled to the processor 501 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
  • the electronic device 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the electronic device sets a function level to a function in an application, determines an operation position of the user for the terminal, and acquires a function level corresponding to the operation position, and closes a function corresponding to the target function level in the application program;
  • the solution can close the corresponding function in the application based on the user's operation position 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.
  • ROM read only memory
  • RAM Random Access Memory
  • the functional modules may be integrated into one processing chip, or each module may exist separately or physically. Two or more modules are integrated in one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

Landscapes

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

Abstract

一种应用程序的关闭方法、装置、存储介质及电子设备;该关闭方法包括:对应用程序中的函数设置函数级别(S101),确定用户针对终端的操作位置(S102),获取该操作位置对应的目标函数级别(S103),关闭应用程序中该目标函数级别对应的函数(S104)。

Description

一种应用程序的关闭方法、装置、存储介质及电子设备 技术领域
本发明涉及电子设备技术领域,具体涉及一种应用程序的关闭方法、装置、存储介质及电子设备。
背景技术
随着智能终端的普及,越来越多用户使用智能终端进行学习、娱乐等等,移动终端例如智能手机的功能越来越强大,不仅丰富用户生活,还给用户带来便利,与此同时各种智能终端的应用程序也被开发出来,以满足用户的不同应用需求。
技术问题
本发明实施例提供一种应用程序的关闭方法、装置、存储介质及电子设备,可以提升应用程序重新启动的速度。
技术解决方案
第一方面,本发明实施例提供了一种应用程序的关闭方法,包括:
对应用程序中的函数设置函数级别;
确定用户针对终端的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
第二方面,本发明实施例提供了一种应用程序的关闭装置,包括:设置模块、位置确定模块、级别获取模块以及关闭模块;
所述设置模块,用于对应用程序中的函数设置函数级别;
所述位置确定模块,用于确定用户针对终端的操作位置;
所述级别获取模块,用于获取所述操作位置对应的目标函数级别;
所述关闭模块,用于关闭所述应用程序中所述目标函数级别对应的函数。
第三方面,本发明实施例提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行本发明实施例任一提供的方法。
第四方面,本发明实施例提供了一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
对应用程序中的函数设置函数级别;
确定用户针对电子设备的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
有益效果
本发明实施例提供一种应用程序的关闭方法、装置、存储介质及电子设备,可以提升应用程序重新启动的速度。
附图说明
图1为本发明实施例提供的一种应用程序的关闭方法的流程示意图;
图2为本发明实施例提供的另一种应用程序的关闭方法的流程示意图;
图3为本发明实施例提供的一种传感器的关闭方法的流程示意图;
图4为本发明实施例提供的一种应用程序的关闭装置的结构示意图;
图5为本发明实施例提供的第二种应用程序的关闭装置的结构示意图;
图6为本发明实施例提供的电子设备的结构示意图;
图7为本发明实施例提供的电子设备的另一结构示意图。
本发明的最佳实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了实现各种功能以满足用户的各种需求,通常智能终端会安装各种各样的应用程序,但是,智能终端上安装的应用程序会消耗大量的电量,降低智能终端的续航能力。
目前关闭应用程序时通常会关闭应用程序中所有的函数(如主函数、子函数等等),然而,这种应用程序关闭方案虽然可以降低终端电量消耗,但是由于该方案是关闭应用程序中所有的函数,如果在关闭应用程序之后,智能终端需要重新启动该应用程序,那么此时,智能终端需要重新调用该应用程序的所有函数,会导致应用程序重新启动的速度比较慢。
本发明实施例提供了一种应用程序的关闭方法,包括以下步骤:
对应用程序中的函数设置函数级别;
确定用户针对终端的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
一实施例中,所述获取相应的目标函数级别的步骤具体包括:
确定所述操作位置在所述终端上对应的预设屏幕区域;
根据所述预设屏幕区域获取相应的目标函数级别。
一实施例中,所述对应用程序中的函数设置函数级别的步骤具体包括:
获取应用程序中函数之间的调用关系;
根据所述调用关系对应用程序中的函数设置函数级别。
一实施例中,所述对应用程序中的函数设置函数级别的步骤具体包括:
确定所述终端系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
所述关闭所述应用程序中所述目标函数级别对应的函数的步骤具体包括:
根据所述目标函数级别关闭传感器调用函数集合中所述传感器调用函数。
一实施例中,所述目标函数级别低于最高级别,所述关闭所述应用程序中所述目标函数级别对应的函数的步骤具体包括:
判断所述目标函数级别是否为最低函数级别;
若是,则关闭所述应用程序当中所述目标函数级别对应的函数;
若否,则关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
一实施例中,在关闭所述应用程序中所述目标函数级别对应的函数之前,获取目标函数级别之后,所述关闭方法还包括:
获取目标函数级别当中函数的标识信息;
判断在预设标识集合当中是否存在与上述标识信息相同的样本标识;
若否,则执行关闭应用程序中该目标函数级别对应的函数的步骤。
一实施例中,获取所述操作位置对应的目标函数级别的步骤包括:
根据所述操作位置确定终端上的目标区域;
根据所述目标区域触发函数关闭请求,其中该函数关闭请求携带级别信息;
获取函数关闭请求对应的目标函数级别。
本发明实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:
对应用程序中的函数设置函数级别;
确定用户针对终端的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
本发明实施例将从应用程序的关闭装置的角度进行描述,该应用程序的关闭装置具体可以集成在终端中,该终端可以为移动互联网设备(如智能手机、平板电脑)、智能穿戴设备(如智能手表)等各类电子设备。
在一优选实施例中,提供了一种应用程序的关闭方法,请参阅图1,图1为本发明实施例提供的应用程序的关闭方法的流程示意图,本实施例的应用程序的关闭方法包括:
步骤S101,对应用程序中的函数设置函数级别。
在计算机编译或运行时,使用某个函数来完成相关命令,在应用程序中通过对函数的调用来执行函数体,应用程序中每个功能的实现都是由函数来进行的,具体来说,把一系列执行某个功能的语句组合在一起就是函数。
在实际应用当中,编写一个能运行在操作系统上的应用程序,都需要一个主函数,主函数意味着建立一个独立进程,且该进程成为了程序的入口,对其它各函数、方法进行调用,这样整个程序的运行轨迹就像一种栈,有时我们称之为调用栈,主函数既是程序的入口,又是程序的出口,通常我们还可以指定一个返回值再退出,以表明程序最后的结果是什么样的。由于主函数肩负着入口和出口的重任,所以最好不要把太多的细节方面的逻辑直接放在主函数内,这样不利于维护和扩展。主函数应该尽量简洁,具体的实现细节应该封装到被调用的子函数里面去。
本发明实施例便可以根据应用程序中函数之间的调用关系来设置函数级别,即上述对应用程序中的函数设置函数级别的步骤可以具体包括:
获取应用程序中函数之间的调用关系;
根据该调用关系对应用程序中的函数设置函数级别。
其中,对应用程序中的函数设置的函数级别可以用多种方式来表示,比如利用数字将程序中的函数定义为1级函数、2级函数、3级函数等,还可以利用字母将程序中的函数定义为A级函数、B级函数、C级函数等等,因此,对该函数级别可以用不同的参数进行定义。
步骤S102,确定用户针对终端的操作位置。
具体的,上述用户针对终端的操作可以为按压、双击等操作,其中,用户针对终端的操作可以为对终端的触摸屏操作,当然该用户针对终端的操作位置也不仅限于对触摸屏的操作,还可以是对终端的后壳、侧边栏等位置的操作,本发明对此不做进一步限定。
以用户针对终端的操作为点击终端的触摸屏为例,在用户点击后,确定点击的位置对应的预设屏幕区域,并根据该预设屏幕区域获取相应的目标函数级别,上述根据预设屏幕区域获取相应的目标函数级别的步骤可以具体包括:
获取操作位置与预设屏幕区域之间的预设对应关系;
判断预设对应关系中是否存在与用户针对终端的操作位置相对应的预设屏幕区域;
若存在,则获取与所述预设屏幕区域相对应的函数级别。
步骤S103,获取操作位置相对应的目标函数级别。
具体的,查找与该操作位置对应的函数级别信息,根据该函数级别信息确定目标函数级别。
可选的,可以基于上述操作位置获取相应的目标函数级别,比如,预先建立终端触摸屏上面的点击位置与函数级别之间的映射关系,根据用户在触摸屏上点击的位置和映射关系获取相应的目标函数级别。
步骤S104,关闭应用程序中该目标函数级别对应的函数。
在实际应用当中,考虑到本方案的灵活性,可以由用户预先设定预设应用程序集合,针对该集合当中的应用程序不必用本方案提供的方法来进行关闭,比如,可以获取目标函数级别当中的函数的标识信息,然后根据该标识信息和预设应用程序标识集合判断该函数所对应的应用程序是否为预设应用程序,也即在根据目标函数级别关闭函数的步骤之前,该方法还可以包括:
获取目标函数级别当中函数的标识信息;
判断在预设标识集合当中是否存在与上述标识信息相同的样本标识;
若否,则执行关闭应用程序中该目标函数级别对应的函数的步骤。
由上可知,本发明实施例采用对应用程序中的函数设置函数级别,确定用户针对终端的操作位置,并获取该操作位置对应的函数级别,关闭应用程序中该目标函数级别对应的函数;该方案可以基于用户对终端的操作位置关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
在一优选实施例中,在上述实施例的基础上对本发明方案提供的应用程序的关闭方法做进一步说明,请参阅图2,图2为本发明实施例提供的应用程序的关闭方法的流程示意图,本实施例的应用程序的关闭方法包括:
步骤S201,获取应用程序中函数之间的调用关系,并根据该调用关系对应用程序中的函数设置函数级别。
本发明实施例将根据该调用关系对应用程序中的函数设置函数级别,任何一个第三方应用都存一个主函数,比如,在一个应用程序当中,可以将该主函数设置为一级函数,将主函数可以直接调用的函数设置为二级函数,将二级函数直接调用的设置为三级函数,以此类推。
步骤S202,确定用户针对终端的操作位置,并根据该操作位置确定终端上的目标区域。
以终端的触摸屏为例,可以预先在触摸屏上划分N各区域,分别为第一区域、第二区域……第N区域,然后判断用户针对终端的操作位置落在哪个区域当中,若用户操作落在第一区域当中,则确定第一区域即为目标区域;若用户操作落在第二区域当中,则确定第二区域即为目标区域。
步骤S203,根据上述目标区域触发函数关闭请求,其中该函数关闭请求携带级别信息。
在本发明实施例中,可以预先建立预设区域与函数关闭请求之间的映射关系集合,在确定目标区域后根据该目标区域在上述映射关系集合当中查找相同的预设区域样本,然后获取该预设区域样本所对应的函数关闭请求。
步骤S204,获取函数关闭请求对应的目标函数级别。
其中,该函数关闭请求可以携带函数级别信息,即对该函数关闭请求进行提取以得到对应的函数级别信息,根据该函数级别信息确定目标函数级别。
步骤S205,判断目标函数级别是否为最低函数级别,若是,则执行步骤S206,若否,则执行步骤S207。
步骤S206,关闭应用程序当中目标函数级别对应的函数。
步骤S207,关闭应用程序当中目标函数级别对应的函数,以及函数级别低于目标函数级别的函数。
比如,若是对应用程序中的函数设置两个函数级别,即主函数为第一函数级别,主函数调用的函数为第二函数级别,此时第一目标函数级别即为最低函数级别,则关闭应用程序中该第一目标函数级别对应的函数,也就是关闭第二函数级别当中的所有函数;若是对应用程序中的函数设置三个函数级别,即主函数为第一函数级别,主函数调用的函数为第二函数级别,第二函数级别当中函数能够调用的函数为第三函数级别,第一目标函数级别譬如为第二函数级别,此时该第一目标函数级别不为最低函数级别,则关闭应用程序中该第一目标函数级别对应的函数,以及函数级别低于第一目标函数级别的函数,也就是关闭第二函数级别当中的所有函数,以及第三函数级别当中所有的函数。
由上可知,本发明实施例采用对应用程序中的函数设置函数级别,确定用户针对终端的操作位置,并获取该操作位置对应的函数级别,关闭应用程序中该目标函数级别对应的函数;该方案可以基于用户对终端的操作位置关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
在一优选实施例中,从应用程序的关闭装置的角度进行描述,请参阅图3,图3为本发明实施例提供的一种应用程序的关闭方法的流程示意图,本实施例的传感器的关闭方法包括:
步骤S301,确定终端系统中的传感器调用函数集合,对该传感器调用函数集合当中的函数设置函数级别。
一些实施例中,本发明实施例对系统中的传感器调用函数设置级别可以根据传感器的使用频率来进行设置,比如将使用频率较高的传感器所对应的传感器调用函数设置为较高级别,将使用频率较低的传感器所对应的传感器调用函数设置为较低级别,即上述对应用程序当中的传感器调用函数设置函数级别的步骤可以具体包括:
获取传感器调用函数所对应的传感器;
确定传感器在终端中的使用频率;
根据使用频率对传感器调用函数设置函数级别。
步骤S302,确定用户针对终端的操作位置。
比如,以用户针对终端的操作为点击终端的触摸屏为例,在用户点击后,确定点击的位置并判断该点击位置是否满足预设条件,若是,则可以根据该点击位置触发函数关闭请求,该请求携带函数级别信息,也即上述根据该操作位置触发函数关闭请求的步骤可以具体包括:
获取操作位置与函数关闭请求之间的预设对应关系;
判断预设对应关系中是否存在与用户针对终端的操作位置相对应的预设区域;
若存在,则获取与所述预设区域相对应的函数关闭请求。
步骤S303,获取与操作位置相对应的目标函数级别。
可选的,可以基于上述操作位置获取相应的目标函数级别,比如,预先建立终端触摸屏上面的点击位置与函数级别之间的映射关系,根据用户在触摸屏上点击的位置获取相应的目标函数级别。
步骤S304,关闭系统中与该目标函数级别对应的传感器调用函数。
具体的,上述根据目标函数级别关闭传感器调用函数的步骤可以具体包括:
判断目标函数级别是否为最低函数级别;
若是,则关闭与目标函数级别对应的传感器调用函数;
若否,则关闭与目标函数级别对应的传感器调用函数,以及函数级别低于目标函数级别的传感器调用函数。
关闭该目标函数级别当中的传感器调用函数,一些实施例中,在关闭传感器调用函数之后,可以将该传感器调用函数所对应的传感器名称显示至终端的显示屏上,已提示用户。
由上可知,本发明实施例采用确定终端系统中的传感器调用函数集合,对该传感器调用函数集合当中的函数设置函数级别,确定用户针对终端的操作位置,并获取该操作位置对应的函数级别,最后关闭终端系统中该目标函数级别对应的传感器调用函数;本方案该方案可以基于关闭终端系统中的传感器调用函数,并对这些函数设置为多个级别,可以降低终端的电量消耗,且由于该方案并没有直接关闭全部的传感器,可以在降低终端电量消耗的同时,提升了传感器的使用效率。
本发明实施例提供了一种应用程序的关闭装置,包括:设置模块、位置确定模块、级别获取模块以及关闭模块;
所述设置模块,用于对应用程序中的函数设置函数级别;
所述位置确定模块,用于确定用户针对终端的操作位置;
所述级别获取模块,用于获取所述操作位置对应的目标函数级别;
所述关闭模块,用于关闭所述应用程序中所述目标函数级别对应的函数
一实施例中,所述级别获取模块具体包括:区域确定子模块和获取子模块;
所述区域确定子模块,用于确定所述操作位置在所述终端上对应的预设屏幕区域;
所述获取子模块,用于根据所述预设屏幕区域获取相应的目标函数级别。
一实施例中,所述设置模块具体包括:关系获取子模块和设置子模块;
所述关系获取子模块,用于获取应用程序中函数之间的调用关系;
所述第一设置子模块,用于根据所述调用关系对应用程序中的函数设置函数级别。
一实施例中,所述设置模块具体用于:确定所述终端系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
所述关闭模块,具体用于根据所述目标函数级别关闭所述传感器调用函数。
一实施例中,所述目标函数级别低于最高级别,所述关闭模块具体包括:判断子模块和关闭子模块;
所述判断子模块,用于判断所述目标函数级别是否为最低函数级别;
所述关闭子模块,用于当所述判断子模块判断为是时,关闭所述应用程序当中所述目标函数级别对应的函数,当所述判断子模块判断为否时,关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
在一优选实施例中,本发明实施例还提供一种应用程序的关闭装置,该应用程序的关闭装置可以集成在终端中,该终端可以为移动互联网设备(如智能手机、平板电脑)、智能穿戴设备(如智能手表)等各类电子设备。如图4所示,该应用程序的关闭装置包括:设置模块401、位置确定模块402、级别获取模块403以及关闭模块404;
该设置模块401,用于对应用程序中的函数设置函数级别;
该位置确定模块402,用于确定用户针对终端的操作位置;
该级别获取模块403,用于根据上述操作位置获取相应的目标函数级别;
该关闭模块404,用于关闭应用程序中该目标函数级别对应的函数。
一些实施例中,如图5所示,在本方案提供的应用程序的关闭装置中,上述级别获取403具体包括:区域确定子模块4031和获取子模块4032;
该区域确定子模块4031,用于根据操作位置确定终端上的目标区域;
该获取子模块4032,用于根据目标区域触发函数关闭请求。
上述设置模块401具体包括:关系获取子模块4011和设置子模块4012;
该关系获取子模块4011,用于获取应用程序中函数之间的调用关系;
该第一设置子模块4012,用于根据调用关系对应用程序中的函数设置函数级别。
可选的,设置模块401具体用于:确定终端系统中的传感器调用函数集合,对传感器调用函数集合当中的函数设置函数级别;
关闭模块404,具体用于根据目标函数级别关闭传感器调用函数。
在本发明实施例中,目标函数级别低于最高级别,关闭模块404具体包括:判断子模块和关闭子模块;
该判断子模块,用于判断目标函数级别是否为最低函数级别;
该关闭子模块,用于当判断子模块判断为是时,关闭应用程序当中目标函数级别对应的函数,当判断子模块判断为否时,关闭应用程序当中目标函数级别对应的函数,以及函数级别低于目标函数级别的函数。
由上可知,本发明实施例采用设置模块401对应用程序中的函数设置函数级别,位置确定模块402确定用户针对终端的操作位置,由级别获取模块403获取操作位置对应的目标函数级别,关闭模块404关闭应用程序中该目标函数级别对应的函数;该方案可以基于用户对终端的操作位置关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。
本发明实施例还提供了一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
对应用程序中的函数设置函数级别;
确定用户针对电子设备的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
在一优选实施例中,还提供一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图6所示,电子设备500包括处理器501、存储器502、显示屏503以及控制电路504。其中,处理器501分别与存储器502、显示屏503、控制电路504电性连接。
处理器501是电子设备500的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
在本实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器502中,并由处理器501来运行存储在存储器502中的应用程序,从而实现各种功能:
对应用程序中的函数设置函数级别;
确定用户针对电子设备的操作位置,并获取所述操作位置对应的目标函数级别;
关闭所述应用程序中所述目标函数级别对应的函数。
在一些实施例中,所述处理器501用于执行以下步骤:
确定所述操作位置在所述电子设备上对应的预设屏幕区域;
根据所述预设屏幕区域获取相应的目标函数级别。
在一些实施例中,所述处理器501用于执行以下步骤:
获取应用程序中函数之间的调用关系;
根据所述调用关系对应用程序中的函数设置函数级别。
所述对应用程序中的函数设置函数级别的步骤具体包括:
在一些实施例中,所述处理器501用于执行以下步骤:
确定所述电子设备系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
根据所述目标函数级别关闭传感器调用函数集合中所述传感器调用函数。
在一些实施例中,所述处理器501用于执行以下步骤:
判断所述目标函数级别是否为最低函数级别;
若是,则关闭所述应用程序当中所述目标函数级别对应的函数;
若否,则关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
在一些实施例中,在关闭所述应用程序中所述目标函数级别对应的函数之前,获取目标函数级别之后,所述处理器501还用于执行以下步骤:
获取目标函数级别当中函数的标识信息;
判断在预设标识集合当中是否存在与上述标识信息相同的样本标识;
若否,则执行关闭应用程序中该目标函数级别对应的函数的步骤。
在一些实施例中,所述处理器501用于执行以下步骤:
根据所述操作位置确定电子设备上的目标区域;
根据所述目标区域触发函数关闭请求,其中该函数关闭请求携带级别信息;
获取函数关闭请求对应的目标函数级别。
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器501通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。
显示屏503可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。
控制电路504与显示屏503电性连接,用于控制显示屏503显示信息。
在一些实施例中,如图6所示,电子设备500还包括:射频电路505、输入单元506、音频电路507、传感器508以及电源509。其中,处理器501分别与射频电路505、输入单元506、音频电路507、传感器508以及电源509电性连接。
射频电路505用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。
输入单元506可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元506可以包括指纹识别模组。
音频电路507可通过扬声器、传声器提供用户与终端之间的音频接口。
电子设备500还可以包括至少一种传感器508,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等; 至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
电源509用于给电子设备500的各个部件供电。在一些实施例中,电源509可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图7中未示出,电子设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。
本发明实施例提供的电子设备,对应用程序中的函数设置函数级别,确定用户针对终端的操作位置,并获取该操作位置对应的函数级别,关闭应用程序中该目标函数级别对应的函数;该方案可以基于用户对终端的操作位置关闭应用程序中相应的函数,可以降低终端的电量消耗,且由于该方案并没有直接关闭应用程序,而是关闭应用程序中相应的函数,因此,在需要重新启动该应用程序时,需要重新调用并且执行关闭的函数即可,可以在降低终端电量消耗的同时,提升应用程序重新启动的速度。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如信息发布方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
以上对本发明实施例提供的一种应用程序的关闭方法、装置、存储介质及电子设备进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (20)

  1. 一种应用程序的关闭方法,其中,包括以下步骤:
    对应用程序中的函数设置函数级别;
    确定用户针对终端的操作位置,并获取所述操作位置对应的目标函数级别;
    关闭所述应用程序中所述目标函数级别对应的函数。
  2. 如权利要求1所述的关闭方法,其中,所述获取相应的目标函数级别的步骤具体包括:
    确定所述操作位置在所述终端上对应的预设屏幕区域;
    根据所述预设屏幕区域获取相应的目标函数级别。
  3. 如权利要求1所述的关闭方法,其中,所述对应用程序中的函数设置函数级别的步骤具体包括:
    获取应用程序中函数之间的调用关系;
    根据所述调用关系对应用程序中的函数设置函数级别。
  4. 如权利要求1所述的关闭方法,其中,所述对应用程序中的函数设置函数级别的步骤具体包括:
    确定所述终端系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
    所述关闭所述应用程序中所述目标函数级别对应的函数的步骤具体包括:
    根据所述目标函数级别关闭传感器调用函数集合中所述传感器调用函数。
  5. 如权利要求1所述的关闭方法,其中,所述目标函数级别低于最高级别,所述关闭所述应用程序中所述目标函数级别对应的函数的步骤具体包括:
    判断所述目标函数级别是否为最低函数级别;
    若是,则关闭所述应用程序当中所述目标函数级别对应的函数;
    若否,则关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
  6. 如权利要求1所述的关闭方法,其中,在关闭所述应用程序中所述目标函数级别对应的函数之前,获取目标函数级别之后,所述关闭方法还包括:
    获取目标函数级别当中函数的标识信息;
    判断在预设标识集合当中是否存在与上述标识信息相同的样本标识;
    若否,则执行关闭应用程序中所述目标函数级别对应的函数的步骤。
  7. 如权利要求1所述的关闭方法,其中,获取所述操作位置对应的目标函数级别的步骤包括:
    根据所述操作位置确定终端上的目标区域;
    根据所述目标区域触发函数关闭请求,其中,所述函数关闭请求携带级别信息;
    获取所述函数关闭请求对应的目标函数级别。
  8. 一种应用程序的关闭装置,其中,包括:设置模块、位置确定模块、级别获取模块以及关闭模块;
    所述设置模块,用于对应用程序中的函数设置函数级别;
    所述位置确定模块,用于确定用户针对终端的操作位置;
    所述级别获取模块,用于获取所述操作位置对应的目标函数级别;
    所述关闭模块,用于关闭所述应用程序中所述目标函数级别对应的函数。
  9. 如权利要求8所述的关闭装置,其中,所述级别获取模块具体包括:区域确定子模块和获取子模块;
    所述区域确定子模块,用于确定所述操作位置在所述终端上对应的预设屏幕区域;
    所述获取子模块,用于根据所述预设屏幕区域获取相应的目标函数级别。
  10. 如权利要求8所述的关闭装置,其中,所述设置模块具体包括:关系获取子模块和设置子模块;
    所述关系获取子模块,用于获取应用程序中函数之间的调用关系;
    所述第一设置子模块,用于根据所述调用关系对应用程序中的函数设置函数级别。
  11. 如权利要求8所述的关闭装置,其中,
    所述设置模块,具体用于:确定所述终端系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
    所述关闭模块,具体用于:根据所述目标函数级别关闭所述传感器调用函数。
  12. 如权利要求8所述的关闭装置,其中,所述目标函数级别低于最高级别,所述关闭模块具体包括:判断子模块和关闭子模块;
    所述判断子模块,用于判断所述目标函数级别是否为最低函数级别;
    所述关闭子模块,用于当所述判断子模块判断为是时,关闭所述应用程序当中所述目标函数级别对应的函数,当所述判断子模块判断为否时,关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
  13. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行如权利要求1-7任一项所述的方法。
  14. 一种电子设备,其中,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
    对应用程序中的函数设置函数级别;
    确定用户针对电子设备的操作位置,并获取所述操作位置对应的目标函数级别;
    关闭所述应用程序中所述目标函数级别对应的函数。
  15. 如权利要求14所述的电子设备,其中,所述处理器用于执行以下步骤:
    确定所述操作位置在所述电子设备上对应的预设屏幕区域;
    根据所述预设屏幕区域获取相应的目标函数级别。
  16. 如权利要求14所述的电子设备,其中,所述处理器用于执行以下步骤:
    获取应用程序中函数之间的调用关系;
    根据所述调用关系对应用程序中的函数设置函数级别。
  17. 如权利要求14所述的电子设备,其中,所述处理器用于执行以下步骤:
    确定所述电子设备系统中的传感器调用函数集合,对所述传感器调用函数集合当中的函数设置函数级别;
    根据所述目标函数级别关闭传感器调用函数集合中所述传感器调用函数。
  18. 如权利要求14所述的电子设备,其中,所述处理器用于执行以下步骤:
    判断所述目标函数级别是否为最低函数级别;
    若是,则关闭所述应用程序当中所述目标函数级别对应的函数;
    若否,则关闭所述应用程序当中所述目标函数级别对应的函数,以及函数级别低于所述目标函数级别的函数。
  19. 如权利要求14所述的电子设备,其中,在关闭所述应用程序中所述目标函数级别对应的函数之前,获取目标函数级别之后,所述处理器还用于执行以下步骤:
    获取目标函数级别当中函数的标识信息;
    判断在预设标识集合当中是否存在与上述标识信息相同的样本标识;
    若否,则执行关闭应用程序中所述目标函数级别对应的函数的步骤。
  20. 如权利要求14所述的电子设备,其中,所述处理器用于执行以下步骤:
    根据所述操作位置确定电子设备上的目标区域;
    根据所述目标区域触发函数关闭请求,其中所述函数关闭请求携带级别信息;
    获取函数关闭请求对应的目标函数级别。
PCT/CN2017/086463 2016-05-31 2017-05-29 一种应用程序的关闭方法、装置、存储介质及电子设备 WO2017206866A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610379765.X 2016-05-31
CN201610379765.XA CN106095487B (zh) 2016-05-31 2016-05-31 一种应用程序的关闭方法和装置

Publications (1)

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

Family

ID=57230532

Family Applications (1)

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

Country Status (2)

Country Link
CN (1) CN106095487B (zh)
WO (1) WO2017206866A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095487B (zh) * 2016-05-31 2019-07-16 Oppo广东移动通信有限公司 一种应用程序的关闭方法和装置
CN106095049B (zh) * 2016-05-31 2018-12-11 广东欧珀移动通信有限公司 传感器调用函数的关闭方法及装置
CN109874165B (zh) * 2019-03-29 2021-09-14 努比亚技术有限公司 一种及时关闭可穿戴设备传感器的方法、可穿戴设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040100457A1 (en) * 2002-11-21 2004-05-27 Mandle Thomas C. Method and system for switching power and loading and closing applications in a portable computing device using a removable pointing device
CN104156226A (zh) * 2013-05-15 2014-11-19 索尼公司 混合内存设备的挂起或关机方法
CN104866069A (zh) * 2015-06-12 2015-08-26 广东小天才科技有限公司 一种自动清理后台应用程序的方法及装置
CN105278370A (zh) * 2015-09-30 2016-01-27 小米科技有限责任公司 节电模式开启方法及装置
CN106020908A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种函数关闭方法及装置
CN106095487A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106095492A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402364A (zh) * 2010-09-10 2012-04-04 北京创新方舟科技有限公司 一种根据用户的触摸屏操作进行应用调用的方法与设备
CN103176842B (zh) * 2013-03-15 2016-04-27 广东欧珀移动通信有限公司 后台进程管理方法及其移动终端
US9547363B2 (en) * 2014-07-16 2017-01-17 Mediatek Inc. Power-saving method and associated electronic device
CN105260117B (zh) * 2015-09-30 2020-11-10 北京小米移动软件有限公司 应用程序控制方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040100457A1 (en) * 2002-11-21 2004-05-27 Mandle Thomas C. Method and system for switching power and loading and closing applications in a portable computing device using a removable pointing device
CN104156226A (zh) * 2013-05-15 2014-11-19 索尼公司 混合内存设备的挂起或关机方法
CN104866069A (zh) * 2015-06-12 2015-08-26 广东小天才科技有限公司 一种自动清理后台应用程序的方法及装置
CN105278370A (zh) * 2015-09-30 2016-01-27 小米科技有限责任公司 节电模式开启方法及装置
CN106020908A (zh) * 2016-05-31 2016-10-12 广东欧珀移动通信有限公司 一种函数关闭方法及装置
CN106095487A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置
CN106095492A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 一种应用程序的关闭方法和装置

Also Published As

Publication number Publication date
CN106095487A (zh) 2016-11-09
CN106095487B (zh) 2019-07-16

Similar Documents

Publication Publication Date Title
WO2018076818A1 (zh) 数据的备份方法、装置、电子设备、存储介质及系统
WO2018076866A1 (zh) 数据处理方法、装置、存储介质、电子设备及服务器
WO2017206867A1 (zh) 一种传感器的关闭方法、装置、存储介质及电子设备
WO2018161578A1 (zh) 动态调节屏幕刷新率的方法、装置、存储介质及电子设备
WO2017206878A1 (zh) 一种基于唤醒锁的处理方法、装置、存储介质及电子设备
WO2018076819A1 (zh) 数据的上传方法、装置、存储介质、电子设备及系统
WO2018161585A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2018090823A1 (zh) 一种系统分区关键数据的保护方法及系统、终端
WO2019078617A1 (en) ELECTRONIC APPARATUS AND VOICE RECOGNITION METHOD
WO2018166199A1 (zh) 定位精度等级调整方法、装置、存储介质及电子设备
WO2015180013A1 (zh) 一种终端的触摸操作方法及装置
WO2017206870A1 (zh) 一种传感器关闭方法、装置、存储介质及电子设备
WO2018161602A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2017206885A1 (zh) 应用程序的关闭方法、装置、存储介质及电子设备
WO2017206865A1 (zh) 一种应用程序的关闭方法、装置、存储介质及电子设备
WO2018076812A1 (zh) 数据请求的响应方法、装置、存储介质、服务器及系统
WO2018161572A1 (zh) 移动终端帧率的控制方法、装置、存储介质及电子设备
WO2017206879A1 (zh) 一种移动终端应用程序的处理方法、装置、存储介质及电子设备
WO2018076864A1 (zh) 一种数据同步方法、装置、存储介质及电子设备
WO2018076830A1 (zh) 数据同步周期的调整方法、装置、电子设备、存储介质及系统
WO2017206873A1 (zh) 一种应用程序的关闭方法、装置、存储介质及电子设备
WO2017206892A1 (zh) 一种移动终端的传感器处理方法、装置、存储介质及电子设备
WO2020180034A1 (ko) 사용자 선택 기반의 정보를 제공하는 방법 및 장치
WO2018129960A1 (zh) 闪屏处理方法、装置、存储介质及电子设备
WO2016064140A1 (en) Providing method for inputting and electronic device

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: 17805811

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: 17805811

Country of ref document: EP

Kind code of ref document: A1