WO2017206879A1 - 一种移动终端应用程序的处理方法、装置、存储介质及电子设备 - Google Patents
一种移动终端应用程序的处理方法、装置、存储介质及电子设备 Download PDFInfo
- Publication number
- WO2017206879A1 WO2017206879A1 PCT/CN2017/086476 CN2017086476W WO2017206879A1 WO 2017206879 A1 WO2017206879 A1 WO 2017206879A1 CN 2017086476 W CN2017086476 W CN 2017086476W WO 2017206879 A1 WO2017206879 A1 WO 2017206879A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- mobile terminal
- sensor connection
- currently
- standby state
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/3287—Power saving characterised by the action undertaken by switching off individual functional units in the computer system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present invention relates to the field of power processing technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for processing a mobile terminal application.
- the intelligent system has been the largest intelligent terminal operating system platform for the user group.
- the intelligent terminal is the most commonly used and most important electronic device for many users.
- the various sensor devices in the intelligent terminal provide hardware for the application diversification function. basis.
- the use of non-standard sensors, such as holding the sensor during standby does not release, resulting in the system not being able to sleep, the sensor device continues to consume power, significantly increasing the standby power consumption of the smart terminal.
- the embodiments of the present invention provide a method, a device, a storage medium, and an electronic device for processing a mobile terminal application, which can reduce the standby power consumption of the smart terminal, and are beneficial to improving the endurance capability of the smart terminal.
- an embodiment of the present invention provides a processing method of a mobile terminal application, and a processing method of the mobile terminal application includes the following steps:
- the application is exited and the application is restricted from holding the corresponding sensor connection.
- an embodiment of the present invention provides a processing device for a mobile terminal application, where the processing device of the mobile terminal application includes:
- a standby detection module configured to detect whether the mobile terminal is currently in a standby state
- Traversing module for traversing all available sensor connection interfaces when detecting that the mobile terminal is currently in a standby state
- a filtering judging module configured to determine whether an application corresponding to the available sensor connection interface meets a filtering condition
- the application prohibiting module is configured to, if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, exit the application, and restrict the application from holding a corresponding sensor connection.
- 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 following steps:
- the application is exited and the application is restricted from holding the corresponding sensor connection.
- 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:
- the application is exited and the application is restricted from holding the corresponding sensor connection.
- the embodiments of the present invention provide a method, a device, a storage medium, and an electronic device for processing a mobile terminal application, which can reduce the standby power consumption of the smart terminal, and are beneficial to improving the endurance capability of the smart terminal.
- FIG. 1 is a schematic flowchart of an implementation process of a mobile terminal application processing method according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a detailed implementation process of a mobile terminal application processing method according to an embodiment of the present invention
- FIG. 3 is a schematic block diagram of a processing apparatus of a mobile terminal application program according to an embodiment of the present invention.
- FIG. 4 is a detailed block diagram of a processing apparatus of a mobile terminal application program 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 disclosure.
- FIG. 6 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
- the execution subject of the embodiment of the present invention may be a mobile terminal.
- the mobile terminal may include a mobile phone (or "cellular" phone such as a smart phone) and a computer with a mobile terminal, such as a tablet computer, and may also be a mobile device built into a portable, pocket-sized, handheld vehicle computer, and
- the wireless access network exchanges languages and/or data.
- personal communication services Personal Communication Service, PCS
- PCS Personal Communication Service
- PCS Personal Communication Service
- Cordless Telephone Session Initiation Protocol (Session Initiation) Protocol, SIP) Telephone, Wireless Local Loop (WLL) Station
- Personal Digital Assistant (Personal Digital) Devices such as Assistant, PDA) are not limited herein.
- An embodiment of the present invention provides a method for processing a mobile terminal application, including:
- the detecting whether the mobile terminal is currently in a standby state comprises:
- the detecting whether the mobile terminal is currently in a standby state comprises:
- the processing method of the mobile terminal application further includes:
- the processing method of the mobile terminal application further includes:
- the application is kept open and the application is allowed to hold a corresponding sensor connection.
- the processing method of the mobile terminal application before the step of detecting whether the mobile terminal is currently in a standby state, the processing method of the mobile terminal application further includes:
- the application When an application needs to use a sensor, the application is assigned a sensor connection interface through which the application can invoke the sensor to operate.
- the processing method of the mobile terminal application further includes:
- the step of traversing all available sensor connection interfaces is performed.
- a method for processing a mobile terminal application is provided. Referring to FIG. 1 , the processing method of the mobile terminal application is applied to the mobile terminal, and specifically includes the following steps:
- step S101 it is detected whether the mobile terminal is currently in a standby state
- the implementation scheme of detecting whether the mobile terminal is currently in the standby state may be: detecting whether the screen of the mobile terminal is in a blanking state, and if yes, determining that the mobile terminal is currently in a standby state; if detecting that the screen of the mobile terminal is in a bright screen State, it can be determined that the mobile terminal is currently in a non-standby state.
- the following manner may also be used to determine whether the mobile terminal is currently in a standby state: for example, detecting whether an operation instruction of the user on the physical button and the touch screen is received within a preset time, if the user does not receive the physical pair within the preset time
- the operation command of the button and the touch screen can determine that the mobile terminal is currently in the standby state; if the user receives the operation command of the physical button or the touch screen within the preset time, it can be determined that the mobile terminal is currently in the non-standby state.
- the application when an application needs to use a sensor, the application is assigned a sensor connection interface through which the application can invoke the sensor to operate.
- the sensor management framework can be divided into a client, a server, and a HAL (abstract layer) layer.
- the client encapsulates the sensor interface for the application
- the server is responsible for the management of all sensor data
- the HAL layer encapsulates the direct access of the server to the Kernel.
- the server reads the sensor data from the HAL layer and writes it to the pipeline, and the client reads the server data through the pipeline.
- the application When the application needs to use the sensor, first obtain the client's SystemSensorManager system sensor management instance, and register the listening interface through the instance. After registering the listening interface, the server provides a SensorEventConnection sensor connection interface for the client.
- the sensor connection interface is assigned to the application. Through the sensor connection interface, the application can obtain data from the sensor through the client.
- the server invokes the enable interface of the sensor device to enable the sensor device.
- the server invokes the disable interface of the sensor device to disable the sensor device.
- the mobile terminal system adds a dumpConnections method to the SensorEventConnection class in the SensorService system service of the native layer.
- the dumpConnections method saves the sensor type corresponding to the SensorEventConnection object, the sensor name, and the application UID (unique identifier) that registered the sensor in the specified string.
- step S102 when it is detected that the mobile terminal is currently in the standby state, traverse all available sensor connection interfaces;
- the mobile terminal system adds a service print determination mechanism in the dump method of the SensorService system service of the native layer. Get the list of args parameters passed in by the dump method. When the parameter list contains preset keywords such as "connections" parameter, it traverses all available SensorEventConnection sensor connection interfaces in the SensorService system service, calls the above dumpConnections method, returns the sensor type corresponding to each sensor connection interface, and registers the sensor. Apply UID.
- the method further includes: determining, when the mobile terminal is currently in the standby state, determining whether the power consumption management function is enabled; When the function is turned on, the step of traversing all available sensor connection interfaces is performed. It can be understood that an interface can be provided, and an open interface of the power management function and a closed interface are provided on the interface. When the user clicks the open interface, the power management function is automatically started, and when the user clicks the close This power management function is automatically turned off when the interface is connected.
- the method further comprises: acquiring an application corresponding to the available sensor connection interface and a sensor connection held by the application.
- step S103 it is determined whether the application corresponding to the available sensor connection interface meets the filtering condition.
- step S104 exiting the application according to the acquired sensor connection held by the application, and restricting the application from holding a corresponding sensor connection.
- step S103 it is determined whether the application corresponding to the available sensor connection interface meets the filtering condition; wherein the filtering condition is: when the mobile terminal is in the standby state, keeping the application open, and allowing the The application holds the corresponding sensor connection, ie the application does not release the sensor connection;
- the power management function application stores a set of mechanisms for judging whether to allow the application to hold the sensor in the standby state (ie, the filtering conditions mentioned above), for example, can define a sports application, a navigation application, a system built-in application.
- Several types of applications allow the sensor to be held in standby mode, and other applications are prohibited from holding the sensor during standby. Therefore, if the defined application is allowed to hold the sensor connection while in standby, the defined application is filtered out in step S103. The application that is not filtered out in step S103 needs to go to step S104 to perform the corresponding operation.
- the power management application of the mobile terminal system calls the dump method of the SensorService system service, and the parameter "connections" is input, and the correspondence between all applications and the holding sensors during standby is obtained.
- the application list that allows the sensor to be held in standby can be generated by the security module of the mobile terminal, or can be selected by the user, or can be pushed by the cloud server, and the like.
- the application list that allows the sensor to be held in standby may be stored in the file mode on the mobile terminal side, or may be stored in the database on the mobile terminal side, or stored in a cloud server manner.
- the mobile terminal calls up the application list that is held in the mobile terminal and allows the sensor to be held in standby mode.
- the mobile terminal is triggered to read from the cloud server a list of applications that allow the sensor to be held in standby.
- step S104 if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, the application is exited, and the application is restricted from holding the corresponding sensor connection.
- the application is killed, and the application is restricted from being started by broadcasting, service, or the like.
- the processing method of the mobile terminal application detects whether the mobile terminal is currently in a standby state; when detecting that the mobile terminal is currently in a standby state, traverses all available sensor connection interfaces; Whether the application corresponding to the sensor connection interface meets the filtering condition; if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, exiting the application and restricting the application to hold the corresponding sensor connection. That is, the present invention automatically exits an application that does not meet the filtering condition during standby, and restricts the application from holding a corresponding sensor connection. Therefore, the mobile terminal system of the present invention can be dormant during standby, effectively reducing the power consumption of the mobile terminal, thereby increasing the standby power consumption of the mobile terminal, and improving the endurance capability of the mobile terminal.
- step S201 the mobile phone automatically detects whether it is in the blank screen
- step S202 if it is detected that the mobile phone is off, it is further determined whether the power consumption management function is turned on;
- step S203 if it is determined that the power consumption management function is enabled, traversing all available SensorEventConnection sensor connection interfaces in the SensorService system service;
- step S204 the dumpConnections method is called, and the sensor type corresponding to each sensor connection interface and the application UID registering the sensor are returned;
- step S205 it is determined whether the application corresponding to the application UID corresponding to the available sensor connection interface meets the filtering condition
- step S206 if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, the application is exited, and the application is restricted from holding the corresponding sensor connection.
- the power management function application stores a set of mechanisms for judging whether to allow the application to hold the sensor in the standby state (ie, the filtering conditions mentioned above), for example, can define a sports application, a navigation application, a system built-in application.
- a sports application ie, a navigation application
- a system built-in application ie, a navigation application
- applications allow the sensor to be held in standby mode, and other applications are prohibited from holding the sensor during standby.
- the application corresponding to the sensor connection interface is not a sports application, a navigation application, and a system built-in application, it may be determined that the application corresponding to the connection interface does not meet the filtering condition, Is the need to release the sensor connection.
- step S207 it is determined whether all the SensorEventConnection sensor connection interfaces in the SensorService system service are traversed;
- step S208 if it is determined that all available SensorEventConnection sensor connection interfaces in the SensorService system service are traversed, the operation ends. If it is determined that all the available SensorEventConnection sensor connection interfaces in the SensorService system service are not traversed, then returning to step S203 to perform the traversal of the next available SensorEventConnection sensor connection interface in the SensorService system service.
- the embodiment of the invention further provides a processing device for a mobile terminal application, comprising:
- a standby detection module configured to detect whether the mobile terminal is currently in a standby state
- Traversing module for traversing all available sensor connection interfaces when detecting that the mobile terminal is currently in a standby state
- a filtering judging module configured to determine whether an application corresponding to the available sensor connection interface meets a filtering condition
- the application prohibiting module is configured to, if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, exit the application, and restrict the application from holding a corresponding sensor connection.
- the standby detection module is specifically configured to:
- the standby detection module is specifically configured to:
- the processing device of the mobile terminal application further includes:
- an obtaining module configured to acquire an application corresponding to the available sensor connection interface and a sensor connection held by the application.
- the processing device of the mobile terminal application further includes:
- the application permission module is configured to keep the application in an open state if it is determined that the application corresponding to the available sensor connection interface meets the filtering condition, and allow the application to hold a corresponding sensor connection.
- the processing device of the mobile terminal application further includes:
- An interface allocation module is configured to assign a sensor connection interface to the application when the application needs to use the sensor, and the application can call the sensor to work through the sensor connection interface.
- the processing device of the mobile terminal application further includes:
- the power consumption management judging module is configured to determine whether the power consumption management function is enabled when detecting that the mobile terminal is currently in a standby state;
- the traversal module is specifically configured to traverse all available sensor connection interfaces if it is determined that the power consumption management function is enabled.
- FIG. 3 and FIG. 4 are schematic diagrams of a processing device of a mobile terminal application program according to an embodiment of the present invention; for convenience of description, only parts related to the embodiment of the present invention are shown.
- the processing device of the mobile terminal application includes a standby detection module 101, a traversal module 102, a filter determination module 103, and an application prohibition module 104.
- the processing device of the mobile terminal application may be a software unit, a hardware unit or a combination of software and hardware built in the mobile terminal.
- the standby detection module 101 is configured to detect whether the mobile terminal is currently in a standby state
- the implementation scheme of detecting whether the mobile terminal is currently in the standby state may be: detecting whether the screen of the mobile terminal is in a blanking state, and if yes, determining that the mobile terminal is currently in a standby state; if detecting that the screen of the mobile terminal is in a bright screen State, it can be determined that the mobile terminal is currently in a non-standby state.
- the following manner may also be used to determine whether the mobile terminal is currently in a standby state: for example, detecting whether an operation instruction of the user on the physical button and the touch screen is received within a preset time, if the user does not receive the physical pair within the preset time
- the operation command of the button and the touch screen can determine that the mobile terminal is currently in the standby state; if the user receives the operation command of the physical button or the touch screen within the preset time, it can be determined that the mobile terminal is currently in the non-standby state.
- the traversing module 102 is configured to traverse all available sensor connection interfaces when detecting that the mobile terminal is currently in a standby state;
- the filtering judging module 103 is configured to determine whether the application corresponding to the available sensor connection interface meets the filtering condition
- the power management function application stores a set of mechanisms for judging whether to allow the application to hold the sensor in the standby state (ie, the filtering conditions mentioned above), for example, can define a sports application, a navigation application, a system built-in application.
- a sports application ie, a navigation application
- a system built-in application ie, a navigation application
- applications allow the sensor to be held in standby mode, and other applications are prohibited from holding the sensor during standby.
- the application prohibiting module 104 is configured to, if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, exit the application, and restrict the application from holding a corresponding sensor connection.
- processing device of the mobile terminal application further includes:
- the obtaining module 105 is configured to acquire an application corresponding to the available sensor connection interface and a sensor connection held by the application.
- processing device of the mobile terminal application further includes:
- the application permission module 106 is configured to keep the application in an open state if it is determined that the application corresponding to the available sensor connection interface meets the filtering condition, and allow the application to hold a corresponding sensor connection.
- processing device of the mobile terminal application further includes:
- the interface allocation module 107 is configured to allocate, to the application, a sensor connection interface when the application needs to use the sensor, and the application can call the sensor to work through the sensor connection interface.
- processing device of the mobile terminal application further includes:
- the power consumption management judging module 108 is configured to determine whether the power consumption management function is enabled when detecting that the mobile terminal is currently in a standby state;
- the traversing module 102 is specifically configured to traverse all available sensor connection interfaces if it is determined that the power consumption management function is enabled.
- 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.
- the processing device of the mobile terminal application detects whether the mobile terminal is currently in the standby state; when detecting that the mobile terminal is currently in the standby state, traverses all available sensor connection interfaces; Whether the application corresponding to the sensor connection interface meets the filtering condition; if it is determined that the application corresponding to the available sensor connection interface does not meet the filtering condition, exiting the application and restricting the application to hold the corresponding sensor connection. That is, the present invention automatically exits an application that does not meet the filtering condition during standby, and restricts the application from holding a corresponding sensor connection. Therefore, the mobile terminal system of the present invention can be dormant during standby, effectively reducing the power consumption of the mobile terminal, thereby increasing the standby power consumption of the mobile terminal, and improving the endurance capability of the mobile terminal.
- an embodiment of the present 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 application is exited and the application is restricted from holding the corresponding sensor connection.
- an electronic device is also provided, and the electronic device may be a device such as a smart phone or a tablet computer.
- the electronic device 300 includes a processor 301, a memory 302, a display screen 303, and a control circuit 304.
- the processor 301 is electrically connected to the memory 302, the display screen 303, and the control circuit 304, respectively.
- the processor 301 is a control center of the electronic device 300, 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 302, and calling data stored in the memory 302.
- the various functions and processing data of the device enable overall monitoring of the electronic device.
- the processor 301 in the electronic device 300 loads the instructions corresponding to the process of one or more applications into the memory 302 according to the following steps, and is stored in the memory 302 by the processor 301.
- the application thus implementing various functions:
- the application is exited and the application is restricted from holding the corresponding sensor connection.
- the processor is further configured to perform the following steps:
- the processor is further configured to perform the following steps:
- the application is kept open and the application is allowed to hold a corresponding sensor connection.
- the processor is further configured to perform the following steps before the step of detecting whether the electronic device is currently in a standby state:
- the application When an application needs to use a sensor, the application is assigned a sensor connection interface through which the application can invoke the sensor to operate.
- the processor is further configured to perform the following steps:
- the step of traversing all available sensor connection interfaces is performed.
- Memory 302 can be used to store applications and data.
- the application stored in the memory 302 contains instructions executable in the processor.
- Applications can form various functional modules.
- the processor 301 executes various functional applications and data processing by running an application stored in the memory 302.
- the display screen 303 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 304 is electrically connected to the display screen 303 for controlling the display screen 303 to display information.
- the electronic device 300 further includes: a radio frequency circuit 305, an input unit 306, an audio circuit 307, a sensor 308, and a power source 309.
- the processor 301 is electrically connected to the radio frequency circuit 305, the input unit 306, the audio circuit 307, the sensor 308, and the power source 309, respectively.
- the radio frequency circuit 305 is configured to transmit and receive 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 306 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 306 can include a fingerprint identification module.
- the audio circuit 307 can provide an audio interface between the user and the terminal through a speaker and a microphone.
- Electronic device 300 may also include at least one type of sensor 308, 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 309 is used to power various components of electronic device 300.
- the power source 309 can be logically coupled to the processor 301 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
- the electronic device 300 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
- the electronic device detects whether the electronic device is currently in a standby state; when detecting that the electronic device is currently in a standby state, traverses all available sensor connection interfaces; and determines an application corresponding to the available sensor connection interface. Whether the filter condition is met; if it is determined that the application corresponding to the available sensor connection interface does not meet the filter condition, the application is exited, and the application is restricted from holding the corresponding sensor connection. That is, the present invention automatically exits an application that does not meet the filtering condition during standby, and restricts the application from holding a corresponding sensor connection. Therefore, the mobile terminal system of the present invention can be dormant during standby, effectively reducing the power consumption of the electronic device, thereby increasing the standby power consumption of the electronic device, and improving the endurance capability of the electronic device.
- the storage medium may include: a read only memory (ROM, Read) Only Memory), Random Access Memory (RAM), disk or CD.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
一种移动终端应用程序的处理方法、装置、存储介质及电子设备,该方法包括:检测移动终端当前是否处于待机状态(S101);当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口(S102);判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件(S103);如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接(S104)。
Description
本发明涉及功耗处理技术领域,具体涉及一种移动终端应用程序的处理方法、装置、存储介质及电子设备。
目前,智能系统己经是用户群最大的智能终端操作系统平台,智能终端是目前许多用户最常用且最重要的电子设备,智能终端中各种各样的传感器设备给应用多元化功能提供了硬件基础。然而,不规范的传感器使用方法,例如在待机期间仍持有传感器不释放,导致系统无法休眠、传感器设备持续耗电,明显增大智能终端的待机功耗。
本发明实施例提供一种移动终端应用程序的处理方法、装置、存储介质及电子设备,可以减少智能终端的待机功耗,有利于提升智能终端的续航能力。
第一方面,本发明实施例提供了一种移动终端应用程序的处理方法,所述移动终端应用程序的处理方法,包括以下步骤:
检测移动终端当前是否处于待机状态;
当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
第二方面,本发明实施例提供了一种移动终端应用程序的处理装置,所述移动终端应用程序的处理装置,包括:
待机检测模块,用于检测移动终端当前是否处于待机状态;
遍历模块,用于当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
过滤判断模块,用于判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
应用程序禁止模块,用于如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
第三方面,本发明实施例提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:
检测移动终端当前是否处于待机状态;
当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
第四方面,本发明实施例提供了一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
检测电子设备当前是否处于待机状态;
当检测到电子设备当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
本发明实施例提供一种移动终端应用程序的处理方法、装置、存储介质及电子设备,可以减少智能终端的待机功耗,有利于提升智能终端的续航能力。
图1是本发明实施例提供的移动终端应用程序的处理方法的实现流程示意图;
图2是本发明实施例提供的移动终端应用程序的处理方法的详细实现流程示意图;
图3是本发明实施例提供的移动终端应用程序的处理装置的模块示意图;
图4是本发明实施例提供的移动终端应用程序的处理装置的详细模块示意图;
图5为本发明实施例提供的电子设备的结构示意图;
图6为本发明实施例提供的电子设备的另一结构示意图。
请参照附图中的图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所示例的本发明的具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。
本发明原理以上述文字来说明,其并不代表为一种限制,本领域技术人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。本发明的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。
需要说明的是,本发明实施例的执行主体可以为移动终端。移动终端可以包括移动电话(或称为“蜂窝”电话,如智能手机)和具有移动终端的计算机,例如,平板电脑,还可以是便携式、袖珍式、手持式车载计算机内置的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal
Communication Service,PCS)电话、无绳电话、会话发起协议(Session Initiation
Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital
Assistant,PDA)等设备,在此不作限定。
本发明实施例提供了一种移动终端应用程序的处理方法,包括:
检测移动终端当前是否处于待机状态;
当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。在一些实施例中,所述检测移动终端当前是否处于待机状态,包括:
检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令;
如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则判定所述移动终端当前处于待机状态;
如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则判定所述移动终端当前处于非待机状态。
在一些实施例中,所述检测移动终端当前是否处于待机状态,包括:
检测移动终端的屏幕是否处于熄屏状态;
如果检测移动终端的屏幕处于熄屏状态,则判定所述移动终端当前处于待机状态;
如果检测移动终端的屏幕处于亮屏状态,则判定所述移动终端当前处于非待机状态。
在一些实施例中,在所述遍历所有可用的传感器连接接口的步骤之后,所述移动终端应用程序的处理方法还包括:
获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
在一些实施例中,所述移动终端应用程序的处理方法,还包括:
如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
在一些实施例中,在所述检测移动终端当前是否处于待机状态的步骤之前,所述移动终端应用程序的处理方法还包括:
当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
在一些实施例中,在所述检测移动终端当前是否处于待机状态的步骤之后,所述移动终端应用程序的处理方法还包括:
当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;
如果判断出功耗管理功能开启,则执行所述遍历所有可用的传感器连接接口的步骤。
一实施方式中,提供了一种移动终端应用程序的处理方法;请参阅图1,所述移动终端应用程序的处理方法,应用于移动终端中,具体包括如下步骤:
在步骤S101中,检测移动终端当前是否处于待机状态;
其中,检测移动终端当前是否处于待机状态的实现方案可以为:检测移动终端的屏幕是否处于熄屏状态,如果是,则可以判定该移动终端当前处于待机状态;如果检测移动终端的屏幕处于亮屏状态,则可以判定该移动终端当前处于非待机状态。
然而,也可以采用如下方式进行判断移动终端当前是否处于待机状态:如,检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令,如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则可以判定该移动终端当前处于待机状态;如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则可以判定该移动终端当前处于非待机状态。
然而,可以理解的是,并不限于上述判断方式,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。
在本发明实施例中,当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
下面详细描述管理传感器的功能架构。
在移动终端Android系统中,传感器管理框架可分为客户端、服务端、HAL(抽象层)层。其中客户端为应用程序封装使用传感器的接口,服务端负责所有传感器数据的管理,HAL层封装了服务端对Kernel(内核)的直接访问。服务端从HAL层中读取传感器数据,并写入到管道中,客户端通过管道读取服务端数据。
当应用程序需要使用传感器时,首先获取客户端的SystemSensorManager系统传感器管理实例,通过该实例注册监听接口。注册监听接口后,服务端会为客户端提供一个SensorEventConnection传感器连接接口,该传感器连接接口分配给应用程序,通过该传感器连接接口,应用程序通过客户端可以从传感器中获取数据。
当客户端注册监听接口时,服务端会调用传感器设备的enable(使能)接口,使能该传感器设备。当客户端取消注册监听接口时,服务端会调用传感器设备的disable(禁用)接口,禁用该传感器设备。
在本发明实施例中,移动终端系统在native层的SensorService系统服务中,为SensorEventConnection类添加dumpConnections方法。dumpConnections方法将该SensorEventConnection对象对应的传感器类型、传感器名字和注册该传感器的应用UID(唯一标识符)保存在指定的字符串中。
在步骤S102中,当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
在本发明实施例中,移动终端系统在native层的SensorService系统服务的dump方法中,添加服务打印判断机制。获取dump方法传入的args参数列表。当该参数列表中包含预设关键字如”connections”参数时,遍历SensorService系统服务中所有可用的SensorEventConnection传感器连接接口,调用上述dumpConnections方法,返回每个传感器连接接口对应的传感器类型和注册该传感器的应用UID。
在本发明实施例中,在所述检测移动终端当前是否处于待机状态的步骤之后,还包括:当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;如果判断出功耗管理功能开启,则执行所述遍历所有可用的传感器连接接口的步骤。可以理解的是,可以提供一界面,在该界面上提供一个功耗管理功能的开启接口和一个关闭接口,当用户点击该开启接口时,便自动启动该功耗管理功能,当用户点击该关闭接口时,便自动关闭该功耗管理功能。
然而,可以理解的是,在所述遍历所有可用的传感器连接接口的步骤之后,还包括:获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。以方便步骤S103判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件。以及方便步骤S104,根据获取的所述应用程序持有的传感器连接,来退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
在步骤S103中,判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;其中,所述过滤条件为:在移动终端处于待机状态时,保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接,即应用程序不释放传感器连接;
其中,功耗管理功能应用中保存有一套判断是否允许应用程序在待机状态时持有传感器的机制(即上述提到的过滤条件),例如:可以定义运动类应用、导航类应用、系统内置应用等几类应用允许待机时持有传感器,除此之外的其他应用在待机时禁止持有传感器。因此,若允许定义的应用在待机时持有传感器连接,则在步骤S103中会过滤掉该定义的应用。而没有在步骤S103中过滤掉的应用则需要转向步骤S104中进行相应的操作。
然而,可以理解的是,移动终端系统的功耗管理应用调用SensorService系统服务的dump方法,并传入参数“connections”,获取待机期间所有应用与持有传感器的对应关系。
然而,可以理解的是,允许待机时持有传感器的应用名单,可以由移动终端的安全模块所生成,也可以由用户自行选择,或者是可以由云服务器进行推送等等。
在本发明实施例中,允许待机时持有传感器的应用名单,可以是文件方式存储在移动终端侧、或者可以是以数据库方式存储在移动终端侧,或者是基于云服务器方式存储。
对于文件方式存储或数据库方式存储的情况下,移动终端在开启功耗管理功能后,会从移动终端侧调出该事先保存在移动终端的允许待机时持有传感器的应用名单。
如果是基于云服务器方式存储,那么移动终端在开启功耗管理功能后,会触发移动终端从云服务器中读取允许待机时持有传感器的应用名单。
在步骤S104中,如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
例如,如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则杀死该应用程序,并限制该应用程序通过广播、服务等方式启动。
然而,可以理解的是,如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
由上可知,本实施例提供的移动终端应用程序的处理方法,通过检测移动终端当前是否处于待机状态;当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。即本发明在待机时自动退出不符合过滤条件的应用程序,并限制所述应用程序持有对应的传感器连接。因此本发明的移动终系统能够在待机时得到休眠,有效降低移动终端的耗电,从而增大了移动终端的待机功耗,有利于提升移动终端的续航能力。
一实施方式中,请参阅图2,下面详细描述本发明实施例提供的移动终端应用程序的处理方法的实现流程。
在步骤S201中,手机自动检测是否处于熄屏;
在步骤S202中,如果检测到手机熄屏,则进一步判断功耗管理功能是否开启;
在步骤S203中,如果判断出功耗管理功能开启,则遍历SensorService系统服务中所有可用的SensorEventConnection传感器连接接口;
在步骤S204中,调用dumpConnections方法,返回每个传感器连接接口对应的传感器类型和注册该传感器的应用UID;
在步骤S205中,判断所述可用的传感器连接接口对应的应用UID对应的应用程序是否符合过滤条件;
在步骤S206中,如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
其中,功耗管理功能应用中保存有一套判断是否允许应用程序在待机状态时持有传感器的机制(即上述提到的过滤条件),例如:可以定义运动类应用、导航类应用、系统内置应用等几类应用允许待机时持有传感器,除此之外的其他应用在待机时禁止持有传感器。
在该步骤中,例如,当判断出传感器连接接口对应的应用程序不属运动类应用、导航类应用、和系统内置应用,那么可以判定出所述连接接口对应的应用程序不符合过滤条件,因此,是需要释放传感器连接。
在步骤S207中,判断是否遍历完SensorService系统服务中所有可用的SensorEventConnection传感器连接接口;
在步骤S208中,如果判断出遍历完SensorService系统服务中所有可用的SensorEventConnection传感器连接接口,则结束本次操作。如果判断出没有遍历完SensorService系统服务中所有可用的SensorEventConnection传感器连接接口,则返回步骤S203中执行遍历SensorService系统服务中下一个可用的SensorEventConnection传感器连接接口。
本发明实施例还提供一种移动终端应用程序的处理装置,包括:
待机检测模块,用于检测移动终端当前是否处于待机状态;
遍历模块,用于当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
过滤判断模块,用于判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
应用程序禁止模块,用于如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
在一些实施例中,所述待机检测模块具体用于:
检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令;
如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则判定所述移动终端当前处于待机状态;
如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则判定所述移动终端当前处于非待机状态。
在一些实施例中,所述待机检测模块具体用于:
检测移动终端的屏幕是否处于熄屏状态;
如果检测移动终端的屏幕处于熄屏状态,则判定所述移动终端当前处于待机状态;
如果检测移动终端的屏幕处于亮屏状态,则判定所述移动终端当前处于非待机状态。
在一些实施例中,所述移动终端应用程序的处理装置,还包括:
获取模块,用于获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
在一些实施例中,所述移动终端应用程序的处理装置,还包括:
应用程序允许模块,用于如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
在一些实施例中,所述移动终端应用程序的处理装置,还包括:
接口分配模块,用于当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
在一些实施例中,所述移动终端应用程序的处理装置,还包括:
功耗管理判断模块,用于当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;
所述遍历模块,具体用于如果判断出功耗管理功能开启,则遍历所有可用的传感器连接接口。
一实施方式中,请一并参阅图3及图4,为本发明实施例提供的移动终端应用程序的处理装置的模块示意图;为了便于说明,仅示出了与本发明实施例相关的部分。所述移动终端应用程序的处理装置包括:待机检测模块101、遍历模块102、过滤判断模块103、应用程序禁止模块104。所述移动终端应用程序的处理装置可以是内置于移动终端中的软件单元、硬件单元或者是软硬件结合的单元。
待机检测模块101,用于检测移动终端当前是否处于待机状态;
其中,检测移动终端当前是否处于待机状态的实现方案可以为:检测移动终端的屏幕是否处于熄屏状态,如果是,则可以判定该移动终端当前处于待机状态;如果检测移动终端的屏幕处于亮屏状态,则可以判定该移动终端当前处于非待机状态。
然而,也可以采用如下方式进行判断移动终端当前是否处于待机状态:如,检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令,如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则可以判定该移动终端当前处于待机状态;如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则可以判定该移动终端当前处于非待机状态。
然而,可以理解的是,并不限于上述判断方式,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。
遍历模块102,用于当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
过滤判断模块103,用于判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
其中,功耗管理功能应用中保存有一套判断是否允许应用程序在待机状态时持有传感器的机制(即上述提到的过滤条件),例如:可以定义运动类应用、导航类应用、系统内置应用等几类应用允许待机时持有传感器,除此之外的其他应用在待机时禁止持有传感器。
应用程序禁止模块104,用于如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
进一步的,所述移动终端应用程序的处理装置,还包括:
获取模块105,用于获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
进一步的,所述移动终端应用程序的处理装置,还包括:
应用程序允许模块106,用于如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
进一步的,所述移动终端应用程序的处理装置,还包括:
接口分配模块107,用于当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
进一步的,所述移动终端应用程序的处理装置,还包括:
功耗管理判断模块108,用于当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;
所述遍历模块102,具体用于如果判断出功耗管理功能开启,则遍历所有可用的传感器连接接口。
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。
由上可知,本实施例提供的移动终端应用程序的处理装置,通过检测移动终端当前是否处于待机状态;当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。即本发明在待机时自动退出不符合过滤条件的应用程序,并限制所述应用程序持有对应的传感器连接。因此本发明的移动终系统能够在待机时得到休眠,有效降低移动终端的耗电,从而增大了移动终端的待机功耗,有利于提升移动终端的续航能力。
一实施方式中,本发明实施例还提供了一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:
检测移动终端当前是否处于待机状态;
当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
一实施方式中,还提供一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图5所示,电子设备300包括处理器301、存储器302、显示屏303以及控制电路304。其中,处理器301分别与存储器302、显示屏303、控制电路304电性连接。
处理器301是电子设备300的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器302内的应用程序,以及调用存储在存储器302内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
在本实施例中,电子设备300中的处理器301会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器302中,并由处理器301来运行存储在存储器302中的应用程序,从而实现各种功能:
检测电子设备当前是否处于待机状态;
当检测到电子设备当前处于待机状态时,遍历所有可用的传感器连接接口;
判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;
如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
在一些实施例中,在所述遍历所有可用的传感器连接接口的步骤之后,所述处理器还用于执行以下步骤:
获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
在一些实施例中,所述处理器还用于执行以下步骤:
如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
在一些实施例中,在所述检测电子设备当前是否处于待机状态的步骤之前,所述处理器还用于执行以下步骤:
当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
在一些实施例中,在所述检测电子设备当前是否处于待机状态的步骤之后,所述处理器还用于执行以下步骤:
当检测到电子设备当前处于待机状态时,判断功耗管理功能是否开启;
如果判断出功耗管理功能开启,则执行所述遍历所有可用的传感器连接接口的步骤。
存储器302可用于存储应用程序和数据。存储器302存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器301通过运行存储在存储器302的应用程序,从而执行各种功能应用以及数据处理。
显示屏303可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。
控制电路304与显示屏303电性连接,用于控制显示屏303显示信息。
在一些实施例中,如图6所示,电子设备300还包括:射频电路305、输入单元306、音频电路307、传感器308以及电源309。其中,处理器301分别与射频电路305、输入单元306、音频电路307、传感器308以及电源309电性连接。
射频电路305用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。
输入单元306可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元306可以包括指纹识别模组。
音频电路307可通过扬声器、传声器提供用户与终端之间的音频接口。
电子设备300还可以包括至少一种传感器308,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;
至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
电源309用于给电子设备300的各个部件供电。在一些实施例中,电源309可以通过电源管理系统与处理器301逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图6中未示出,电子设备300还可以包括摄像头、蓝牙模块等,在此不再赘述。
本发明实施例提供的电子设备,通过检测电子设备当前是否处于待机状态;当检测到电子设备当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。即本发明在待机时自动退出不符合过滤条件的应用程序,并限制所述应用程序持有对应的传感器连接。因此本发明的移动终系统能够在待机时得到休眠,有效降低电子设备的耗电,从而增大了电子设备的待机功耗,有利于提升电子设备的续航能力。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read
Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
综上所述,虽然本发明已以实施例揭露如上,但上述实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。
Claims (20)
- 一种移动终端应用程序的处理方法,其中,所述移动终端应用程序的处理方法,包括以下步骤:检测移动终端当前是否处于待机状态;当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,所述检测移动终端当前是否处于待机状态,包括:检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令;如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则判定所述移动终端当前处于待机状态;如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则判定所述移动终端当前处于非待机状态。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,所述检测移动终端当前是否处于待机状态,包括:检测移动终端的屏幕是否处于熄屏状态;如果检测移动终端的屏幕处于熄屏状态,则判定所述移动终端当前处于待机状态;如果检测移动终端的屏幕处于亮屏状态,则判定所述移动终端当前处于非待机状态。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,在所述遍历所有可用的传感器连接接口的步骤之后,还包括:获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,所述移动终端应用程序的处理方法,还包括:如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,在所述检测移动终端当前是否处于待机状态的步骤之前,还包括:当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
- 如权利要求1所述的移动终端应用程序的处理方法,其中,在所述检测移动终端当前是否处于待机状态的步骤之后,还包括:当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;如果判断出功耗管理功能开启,则执行所述遍历所有可用的传感器连接接口的步骤。
- 一种移动终端应用程序的处理装置,其中,所述移动终端应用程序的处理装置,包括:待机检测模块,用于检测移动终端当前是否处于待机状态;遍历模块,用于当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;过滤判断模块,用于判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;应用程序禁止模块,用于如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述待机检测模块具体用于:检测在预设时间内是否接收到用户对物理按键和触摸屏的操作指令;如果在预设时间内没有接收到用户对物理按键和触摸屏的操作指令,则判定所述移动终端当前处于待机状态;如果在预设时间内有接收到用户对物理按键或触摸屏的操作指令,则判定所述移动终端当前处于非待机状态。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述待机检测模块具体用于:检测移动终端的屏幕是否处于熄屏状态;如果检测移动终端的屏幕处于熄屏状态,则判定所述移动终端当前处于待机状态;如果检测移动终端的屏幕处于亮屏状态,则判定所述移动终端当前处于非待机状态。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述移动终端应用程序的处理装置,还包括:获取模块,用于获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述移动终端应用程序的处理装置,还包括:应用程序允许模块,用于如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述移动终端应用程序的处理装置,还包括:接口分配模块,用于当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
- 如权利要求8所述的移动终端应用程序的处理装置,其中,所述移动终端应用程序的处理装置,还包括:功耗管理判断模块,用于当检测到移动终端当前处于待机状态时,判断功耗管理功能是否开启;所述遍历模块,具体用于如果判断出功耗管理功能开启,则遍历所有可用的传感器连接接口。
- 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:检测移动终端当前是否处于待机状态;当检测到移动终端当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
- 一种电子设备,其中,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:检测电子设备当前是否处于待机状态;当检测到电子设备当前处于待机状态时,遍历所有可用的传感器连接接口;判断所述可用的传感器连接接口对应的应用程序是否符合过滤条件;如果判断出所述可用的传感器连接接口对应的应用程序不符合过滤条件,则退出所述应用程序,并限制所述应用程序持有对应的传感器连接。
- 如权利要求16所述的电子设备,其中,在所述遍历所有可用的传感器连接接口的步骤之后,所述处理器还用于执行以下步骤:获取所述可用的传感器连接接口对应的应用程序以及所述应用程序持有的传感器连接。
- 如权利要求16所述的电子设备,其中,所述处理器还用于执行以下步骤:如果判断出所述可用的传感器连接接口对应的应用程序符合过滤条件,则保持所述应用程序处于开启状态,并允许所述应用程序持有对应的传感器连接。
- 如权利要求16所述的电子设备,其中,在所述检测电子设备当前是否处于待机状态的步骤之前,所述处理器还用于执行以下步骤:当应用程序需要使用传感器时,给所述应用程序分配一传感器连接接口,通过所述传感器连接接口,所述应用程序能调用所述传感器进行工作。
- 如权利要求16所述的电子设备,其中,在所述检测电子设备当前是否处于待机状态的步骤之后,所述处理器还用于执行以下步骤:当检测到电子设备当前处于待机状态时,判断功耗管理功能是否开启;如果判断出功耗管理功能开启,则执行所述遍历所有可用的传感器连接接口的步骤。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP17805824.4A EP3407162B1 (en) | 2016-05-31 | 2017-05-29 | Mobile terminal application program processing method and apparatus, storage medium, and electronic device |
US16/078,506 US10955904B2 (en) | 2016-05-31 | 2017-05-29 | Method, apparatus and storage medium for processing application of mobile terminal and electronic device |
US16/243,467 US10579129B2 (en) | 2016-05-31 | 2019-01-09 | Method, apparatus and storage medium for processing application of mobile terminal and electronic device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610379894.9 | 2016-05-31 | ||
CN201610379894.9A CN106095051B (zh) | 2016-05-31 | 2016-05-31 | 一种移动终端应用程序的处理方法、装置及移动终端 |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/078,506 A-371-Of-International US10955904B2 (en) | 2016-05-31 | 2017-05-29 | Method, apparatus and storage medium for processing application of mobile terminal and electronic device |
US16/243,467 Continuation US10579129B2 (en) | 2016-05-31 | 2019-01-09 | Method, apparatus and storage medium for processing application of mobile terminal and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017206879A1 true WO2017206879A1 (zh) | 2017-12-07 |
Family
ID=57230619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/086476 WO2017206879A1 (zh) | 2016-05-31 | 2017-05-29 | 一种移动终端应用程序的处理方法、装置、存储介质及电子设备 |
Country Status (4)
Country | Link |
---|---|
US (2) | US10955904B2 (zh) |
EP (1) | EP3407162B1 (zh) |
CN (1) | CN106095051B (zh) |
WO (1) | WO2017206879A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109753405A (zh) * | 2018-12-05 | 2019-05-14 | 东软集团股份有限公司 | 应用资源消耗的检测方法、装置、存储介质和电子设备 |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106102144B (zh) * | 2016-05-31 | 2017-09-01 | 广东欧珀移动通信有限公司 | 一种基于移动终端的传感器处理方法及装置 |
CN106095051B (zh) | 2016-05-31 | 2019-02-01 | Oppo广东移动通信有限公司 | 一种移动终端应用程序的处理方法、装置及移动终端 |
CN109195210B (zh) * | 2018-08-28 | 2021-03-26 | 努比亚技术有限公司 | 一种省电方法、移动终端及计算机可读存储介质 |
CN110109528B (zh) * | 2019-03-29 | 2021-10-22 | 努比亚技术有限公司 | 应用程序的管控方法、移动终端及计算机可读存储介质 |
CN113721785B (zh) * | 2021-07-07 | 2022-08-12 | 荣耀终端有限公司 | 一种触摸屏采样率的调整方法及电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103235687A (zh) * | 2013-04-02 | 2013-08-07 | 广东欧珀移动通信有限公司 | 一种设置传感器开启状态的方法、装置和移动设备 |
CN104199670A (zh) * | 2014-09-16 | 2014-12-10 | 太仓红码软件技术有限公司 | 一种应用程序的关闭方法、装置及其移动终端 |
CN104298547A (zh) * | 2014-09-26 | 2015-01-21 | 小米科技有限责任公司 | 终端设置方法及装置 |
CN104298336A (zh) * | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | 移动终端及其应用程序的控制方法和装置 |
CN106095051A (zh) * | 2016-05-31 | 2016-11-09 | 广东欧珀移动通信有限公司 | 一种移动终端应用程序的处理方法、装置及移动终端 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8677158B2 (en) | 2011-08-10 | 2014-03-18 | Microsoft Corporation | System and method for assigning a power management classification including exempt, suspend, and throttling to an process based upon various factors of the process |
US8788863B2 (en) | 2011-08-10 | 2014-07-22 | Microsoft Corporation | System and method for restoring and/or continuing execution functionality to various processes based on predefined power classifications while transitioning a computing environment from connected standby state to execution state |
TWI582573B (zh) | 2012-09-14 | 2017-05-11 | 宏碁股份有限公司 | 電腦系統及電源管理方法 |
CN103037108A (zh) * | 2012-12-10 | 2013-04-10 | 乐蛙科技(上海)有限公司 | 一种智能移动终端的省电方法 |
US9336068B2 (en) | 2013-06-07 | 2016-05-10 | Apple Inc. | Throttling of application access to resources |
KR101477179B1 (ko) | 2013-07-19 | 2014-12-29 | 삼성전자주식회사 | 어플리케이션의 전력 효율을 결정하고 표시하는 방법 및 단말기 |
KR102137097B1 (ko) * | 2014-08-21 | 2020-07-23 | 삼성전자주식회사 | 소모 전류 저감 방법 및 이를 지원하는 전자 장치 |
CN105183137B (zh) * | 2015-09-09 | 2018-06-01 | 厦门美图移动科技有限公司 | 一种移动终端及其唤醒锁控制方法和控制系统 |
CN105302274B (zh) * | 2015-09-22 | 2018-12-04 | 广东欧珀移动通信有限公司 | 一种传感器控制方法及装置 |
-
2016
- 2016-05-31 CN CN201610379894.9A patent/CN106095051B/zh active Active
-
2017
- 2017-05-29 US US16/078,506 patent/US10955904B2/en active Active
- 2017-05-29 EP EP17805824.4A patent/EP3407162B1/en active Active
- 2017-05-29 WO PCT/CN2017/086476 patent/WO2017206879A1/zh active Application Filing
-
2019
- 2019-01-09 US US16/243,467 patent/US10579129B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103235687A (zh) * | 2013-04-02 | 2013-08-07 | 广东欧珀移动通信有限公司 | 一种设置传感器开启状态的方法、装置和移动设备 |
CN104298336A (zh) * | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | 移动终端及其应用程序的控制方法和装置 |
CN104199670A (zh) * | 2014-09-16 | 2014-12-10 | 太仓红码软件技术有限公司 | 一种应用程序的关闭方法、装置及其移动终端 |
CN104298547A (zh) * | 2014-09-26 | 2015-01-21 | 小米科技有限责任公司 | 终端设置方法及装置 |
CN106095051A (zh) * | 2016-05-31 | 2016-11-09 | 广东欧珀移动通信有限公司 | 一种移动终端应用程序的处理方法、装置及移动终端 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3407162A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109753405A (zh) * | 2018-12-05 | 2019-05-14 | 东软集团股份有限公司 | 应用资源消耗的检测方法、装置、存储介质和电子设备 |
CN109753405B (zh) * | 2018-12-05 | 2022-05-31 | 东软集团股份有限公司 | 应用资源消耗的检测方法、装置、存储介质和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
EP3407162A1 (en) | 2018-11-28 |
EP3407162A4 (en) | 2019-05-22 |
US10579129B2 (en) | 2020-03-03 |
US20190113963A1 (en) | 2019-04-18 |
EP3407162B1 (en) | 2022-11-30 |
US10955904B2 (en) | 2021-03-23 |
CN106095051A (zh) | 2016-11-09 |
US20190155369A1 (en) | 2019-05-23 |
CN106095051B (zh) | 2019-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017206879A1 (zh) | 一种移动终端应用程序的处理方法、装置、存储介质及电子设备 | |
WO2019088802A1 (ko) | 전자 장치 및 전자 장치 간 음성으로 기능을 실행하는 방법 | |
WO2013043004A2 (en) | Apparatus and method for controlling screen rotation in a portable terminal | |
WO2017164585A1 (en) | Electronic device and control method thereof | |
WO2017206878A1 (zh) | 一种基于唤醒锁的处理方法、装置、存储介质及电子设备 | |
WO2017206870A1 (zh) | 一种传感器关闭方法、装置、存储介质及电子设备 | |
WO2021118061A1 (ko) | 전자 장치 및 이를 이용한 레이아웃 구성 방법 | |
WO2016029449A1 (zh) | 防误触触摸屏的方法和装置 | |
WO2017206862A1 (zh) | 一种基于亮屏锁的处理方法、装置、存储介质及电子设备 | |
WO2017206892A1 (zh) | 一种移动终端的传感器处理方法、装置、存储介质及电子设备 | |
WO2018076819A1 (zh) | 数据的上传方法、装置、存储介质、电子设备及系统 | |
WO2017206886A1 (zh) | 一种唤醒锁释放方法、装置、存储介质及电子设备 | |
WO2018062894A1 (ko) | 전력을 제어하는 전자 장치 | |
WO2017206865A1 (zh) | 一种应用程序的关闭方法、装置、存储介质及电子设备 | |
WO2018026164A1 (en) | Method of processing touch events and electronic device adapted thereto | |
WO2016188285A1 (zh) | 一种终端应用的进程管理方法及装置 | |
WO2017206885A1 (zh) | 应用程序的关闭方法、装置、存储介质及电子设备 | |
WO2017071326A1 (zh) | 一种终端的控制方法、装置和系统 | |
WO2017206867A1 (zh) | 一种传感器的关闭方法、装置、存储介质及电子设备 | |
WO2018076869A1 (zh) | 一种数据备份方法、装置、存储介质和电子设备 | |
WO2017206880A1 (zh) | 终端数据处理方法、装置、存储介质及电子设备 | |
WO2018076890A1 (zh) | 数据备份的方法、装置、存储介质、服务器及系统 | |
WO2019039729A1 (en) | METHOD FOR CHANGING THE CONTENT SIZE DISPLAYED ON A DISPLAY DEVICE, AND RELATED ELECTRONIC DEVICE | |
WO2017206881A1 (zh) | 一种关联应用的处理方法、装置、存储介质及电子设备 | |
WO2019088400A1 (ko) | 시간 정보를 제공하는 전자 장치 및 전자 장치의 동작 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 2017805824 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2017805824 Country of ref document: EP Effective date: 20180824 |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17805824 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |