CN106102144B - A kind of sensor processing method and device based on mobile terminal - Google Patents

A kind of sensor processing method and device based on mobile terminal Download PDF

Info

Publication number
CN106102144B
CN106102144B CN201610383735.6A CN201610383735A CN106102144B CN 106102144 B CN106102144 B CN 106102144B CN 201610383735 A CN201610383735 A CN 201610383735A CN 106102144 B CN106102144 B CN 106102144B
Authority
CN
China
Prior art keywords
sensor
connecting interface
mobile terminal
queue
current active
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN201610383735.6A
Other languages
Chinese (zh)
Other versions
CN106102144A (en
Inventor
张俊
王彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610383735.6A priority Critical patent/CN106102144B/en
Publication of CN106102144A publication Critical patent/CN106102144A/en
Priority to PCT/CN2017/086527 priority patent/WO2017206891A1/en
Application granted granted Critical
Publication of CN106102144B publication Critical patent/CN106102144B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • H04W52/028Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof switching on or off only a part of the equipment circuit blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention provides a kind of sensor processing method and device based on mobile terminal, comprises the following steps:Detect whether mobile terminal is currently in holding state;When detecting mobile terminal and being currently at holding state, sensor current active connecting interface queue is traveled through;Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;If it is judged that the corresponding application program of the connecting interface does not meet filter condition, then the connecting interface is removed into the current active connecting interface queue, connected with discharging the corresponding sensor of the connecting interface.The mobile whole system of the present invention can obtain dormancy when standby, due to it is standby when release sensor connection, therefore the effectively power consumption of reduction mobile terminal, so as to increase the stand-by power consumption of mobile terminal, is conducive to being lifted the endurance of mobile terminal.

Description

A kind of sensor processing method and device based on mobile terminal
Technical field
The present invention relates to power consumption processing technology field, more particularly to a kind of sensor processing method based on mobile terminal and Device.
Background technology
At present, intelligence system oneself through being the maximum intelligent terminal operation system platform of customer group, intelligent terminal is to be permitted at present Multi-user is the most frequently used and most important electronic equipment, and various sensor devices are to being applied pluralistic function in intelligent terminal There is provided hardware foundation.However, nonstandard sensor application method, for example, still hold sensor in standby period and do not discharge, Cause system can not dormancy, sensor device continuous drain, hence it is evident that the stand-by power consumption of increase intelligent terminal.Existing intelligent terminal In optimised power consumption scheme, lack to it is standby when the method for limiting that uses of sensor, be unfavorable for being lifted the endurance of intelligent terminal.
Therefore, it is necessary to a kind of new technical scheme is proposed, to solve above-mentioned technical problem.
The content of the invention
In view of this, it is an object of the invention to provide a kind of sensor processing method and device based on mobile terminal, Aim to solve the problem that what prior art was present still holds sensor in standby period and do not discharge, cause system can not dormancy, sensor set Standby continuous drain, hence it is evident that the stand-by power consumption of increase intelligent terminal, the problem of being unfavorable for lifting the endurance of intelligent terminal.
In order to solve the above technical problems, the embodiments of the invention provide following technical scheme:
It is described based on mobile terminal the embodiments of the invention provide a kind of sensor processing method based on mobile terminal Sensor processing method, comprises the following steps:
Detect whether mobile terminal is currently in holding state;
When detecting mobile terminal and being currently at holding state, sensor current active connecting interface queue is traveled through;
Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;Wherein, the filtering Condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
If it is judged that the corresponding application program of the connecting interface does not meet filter condition, then the connecting interface is moved Go out the current active connecting interface queue, connected with discharging the corresponding sensor of the connecting interface.
It is preferred that, the connecting interface is being removed into the current active connecting interface queue, to discharge described connect After the step of corresponding sensor of mouth is connected, in addition to:
The connecting interface for removing the current active connecting interface queue is preserved to connection queue to be restored;
Obtain the arrange parameter information of the corresponding sensor of connecting interface removed;
The arrange parameter information of the sensor is added in parameter queue to be restored.
It is preferred that, after the step that the arrange parameter information of the sensor is added in parameter queue to be restored, Also include:
When detecting mobile terminal and being currently at non-standby state, the connection queue to be restored is traveled through;
The arrange parameter information of sensor is obtained from the parameter queue to be restored;
According to the arrange parameter information of the sensor, corresponding connecting interface is re-added to the current active and connected In connection interface queue, connected with recovering corresponding sensor.
It is preferred that, before the step of whether the detection mobile terminal is currently in holding state, in addition to:
When application program needs to use sensor, to the connecting interface of application assigned one, pass through the connection Interface, the application program can call the sensor to be operated;
The connecting interface of distribution is added in the sensor current active connecting interface queue.
It is preferred that, after the step of whether the detection mobile terminal is currently in holding state, in addition to:
When detecting mobile terminal and being currently at holding state, judge whether power managed function opens;
If it is judged that power managed function is opened, then the traversal sensor current active connecting interface queue is performed Step.
In order to solve the above technical problems, the embodiment of the present invention additionally provides following technical scheme:
The embodiment of the present invention additionally provides a kind of sensor processing unit based on mobile terminal, described to be based on mobile terminal Sensor processing unit, including:
Holding state detection module, for detecting whether mobile terminal is currently in holding state;
First spider module, for when detecting mobile terminal and being currently at holding state, traversal sensor currently to be lived Jump connecting interface queue;
Judge module is filtered, whether the corresponding application program of connecting interface for judging in the queue meets filtering rod Part;Wherein, the filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
Module is removed, for if it is judged that the corresponding application program of the connecting interface does not meet filter condition, then will The connecting interface removes the current active connecting interface queue, is connected with discharging the corresponding sensor of the connecting interface.
It is preferred that, the sensor processing unit based on mobile terminal, in addition to:
Preserving module, for the connecting interface for removing the current active connecting interface queue to be preserved to connection to be restored Queue;
First parameter acquisition module, the arrange parameter information for obtaining the corresponding sensor of connecting interface removed;
Parameter add module, for the arrange parameter information of the sensor to be added in parameter queue to be restored.
It is preferred that, the sensor processing unit based on mobile terminal, in addition to:
Second spider module, for when detecting mobile terminal and being currently at non-standby state, traveling through described to be restored Connect queue;
Second parameter acquisition module, the arrange parameter information for obtaining sensor from the parameter queue to be restored;
First interface add module, for the arrange parameter information according to the sensor, by corresponding connecting interface weight Newly it is added in the current active connecting interface queue, is connected with recovering corresponding sensor.
It is preferred that, the sensor processing unit based on mobile terminal, in addition to:
Interface assignment module, for when application program needs to use sensor, being connected to the application assigned one Interface, by the connecting interface, the application program can call the sensor to be operated;
Second interface add module, for the connecting interface of distribution to be added into the sensor current active connecting interface In queue.
It is preferred that, the sensor processing unit based on mobile terminal, in addition to:
Judge module, for when detecting mobile terminal and being currently at holding state, whether judging power managed function Open;
Trigger module, for if it is judged that the unlatching of power managed function, then trigger first spider module and perform institute State traversal sensor current active connecting interface queue.
Relative to prior art, sensor processing method and device of the invention based on mobile terminal are moved by detecting Whether dynamic terminal is currently in holding state;When detecting mobile terminal and being currently at holding state, traversal sensor is current Enliven connecting interface queue;Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;Wherein, The filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;If it is judged that institute State the corresponding application program of connecting interface and do not meet filter condition, then the connecting interface is removed into the current active connects Mouth queue, is connected with discharging the corresponding sensor of the connecting interface.I.e. the present invention discharges satisfactory when standby automatically Sensor is connected.Therefore the mobile whole system of the present invention can obtain dormancy when standby, due to it is standby when release sensor connect Connect, therefore the effectively power consumption of reduction mobile terminal, so as to increase the stand-by power consumption of mobile terminal, be conducive to lifting mobile terminal Endurance.
Brief description of the drawings
Fig. 1 is the implementation process signal for the sensor processing method based on mobile terminal that the embodiment of the present invention one is provided Figure;
Fig. 2 is the implementation process schematic diagram for the release sensor connection that the embodiment of the present invention two is provided;
Fig. 3 is the implementation process schematic diagram for recovering sensor connection that the embodiment of the present invention three is provided;
Fig. 4 is the module diagram for the sensor processing unit based on mobile terminal that the embodiment of the present invention four is provided;
Fig. 5 is the detailed module signal for the sensor processing unit based on mobile terminal that the embodiment of the present invention five is provided Figure.
Embodiment
Refer to the schema in accompanying drawing, wherein identical element numbers represent identical component, principle of the invention be with Implement to illustrate in an appropriate computing environment.The following description is based on exemplified specific implementation of the invention Example, it is not construed as the limitation present invention other specific embodiments not detailed herein.
The principle of the invention illustrates that it is not represented as a kind of limitation with above-mentioned word, and those skilled in the art can Solve plurality of step as described below and operation also may be implemented among hardware.The principle of the present invention uses many other wide usages Or specific purpose computing, communication environment or configuration are operated.
It should be noted that the executive agent of the embodiment of the present invention can be mobile terminal.Mobile terminal can include moving Mobile phone (or being " honeycomb " phone, such as smart mobile phone) and the computer with mobile terminal, for example, tablet personal computer, may be used also To be the mobile device of portable, pocket, the vehicle-mounted built-in computer of hand-held, they exchanged with wireless access network language and/ Or data.For example, PCS (Personal Communication Service, PCS) phone, wireless phone, meeting Talk about initiation protocol (Session Initiation Protocol, SIP) phone, WLL (Wireless Local Loop, WLL) stand, the equipment such as personal digital assistant (Personal Digital Assistant, PDA), be not limited thereto.
The realization of the present invention is described in detail below in conjunction with specific embodiment:
Embodiment one
Referring to Fig. 1, showing the sensor processing method provided in an embodiment of the present invention based on mobile terminal.
The sensor processing method based on mobile terminal, applied in mobile terminal, specifically includes following steps:
In step S101, whether detection mobile terminal is currently in holding state;
Wherein, currently whether the implementation in holding state can be detection mobile terminal:Detect mobile terminal Whether screen is in screen state is put out, if it is, can be determined that the mobile terminal is currently at holding state;If detection movement The screen of terminal is in bright screen state, then can be determined that the mobile terminal is currently at non-standby state.
It would however also be possible to employ following manner carries out judging whether mobile terminal is currently in holding state:Such as, detection exists Whether user is received in preset time to physical button and the operational order of touch-screen, if do not received in preset time To user to physical button and the operational order of touch-screen, then it can be determined that the mobile terminal is currently at holding state;If Have in preset time and receive user to physical button or the operational order of touch-screen, then can be determined that the mobile terminal is current In non-standby state.
It is understood, however, that being not limited to above-mentioned judgment mode, made within the spirit and principles of the invention Any modifications, equivalent substitutions and improvements etc., should be included in the scope of the protection.
In embodiments of the present invention, when application program needs to use sensor, connected to the application assigned one Interface, by the connecting interface, the application program can call the sensor to be operated;The connecting interface of distribution is added Add in the sensor current active connecting interface queue.
The function structure of management of sensor is described below in detail.
In mobile terminal android system, sensor management framework can be divided into client, service end, HAL (level of abstraction) Layer.Wherein client is that application program encapsulates the interface for using sensor, and service end is responsible for the management of all the sensors data, HAL layers encapsulate direct access of the service end to Kernel (kernel).Service end reads sensing data from HAL layers, and writes Enter into pipeline, client passes through pipeline reading service end data.
When application program needs to use sensor, the SystemSensorManager examples of client are obtained first, are led to Cross example registration and monitor interface.Registration is monitored after interface, and service end can provide one for client SensorEventConnection connecting interfaces, the connecting interface distributes to application program, by the connecting interface, using journey Sequence can obtain data by client from sensor.
When client registers monitor interface, service end can call enable (enable) interface of sensor device, enable The sensor device.When client cancel register monitors interface, service end can call the disable (disabling) of sensor device Interface, disables the sensor device.
In step s 102, when detecting mobile terminal and being currently at holding state, traversal sensor current active connects Connection interface queue;
In embodiments of the present invention, after the step of whether the detection mobile terminal is currently in holding state, also Including:When detecting mobile terminal and being currently at holding state, judge whether power managed function opens;If it is judged that work( Consume management function to open, then the step of performing the traversal sensor current active connecting interface queue.It is understood that can To provide an interface, the unlatching interface and a down interface of a power managed function are provided on the surface, when user's point When hitting the unlatching interface, just the automatic start power managed function, when user clicks on the down interface, just closes the work(automatically Consume management function.
Wherein, the sensor current active connecting interface queue mActiveConnections, currently may be used for storing Sensor is connected.When enable interfaces are called, the connecting interface of new registration is added to the sensor current active In connecting interface queue mActiveConnections;When disable interfaces are called, corresponding connecting interface is removed into institute State sensor current active connecting interface queue mActiveConnections.
In step s 103, judge whether the corresponding application program of the connecting interface in the queue meets filter condition; Wherein, the filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
Wherein, preserved in power managed application of function and a set of determine whether that application program is held in holding state The mechanism (filter condition i.e. mentioned above) of sensor, for example:The application of motion class, navigation type application can be defined, in system Put using etc. the application of several classes allow standby when hold sensor, other application in addition forbids holding sensing when standby Device.Therefore, if allowing applying for definition to hold sensor connection when standby, this definition can be filtered out in step s 103 Using.Application without filtering out in step s 103 then needs to turn to be operated accordingly in step S104.
It is understood, however, that hold the application list of sensor when allowing standby, can by mobile terminal safety Module is generated, and can also voluntarily be selected by user, or can be pushed by Cloud Server progress etc..
In embodiments of the present invention, it is allowed to hold the application list of sensor when standby, can be that file mode is stored in Mobile terminal side or can be that mobile terminal side is stored in database mode, or stored based on Cloud Server mode.
In the case of for file mode storage or database mode storage, mobile terminal is opening power managed function Afterwards, the application list for holding sensor when allowing standby for being stored in mobile terminal in advance can be recalled from mobile terminal side.
If being stored based on Cloud Server mode, then mobile terminal can trigger shifting after power managed function is opened Dynamic terminal reads the application list for holding sensor when allowing standby from Cloud Server.
In step S104, if it is judged that the corresponding application program of the connecting interface does not meet filter condition, then will The connecting interface removes the current active connecting interface queue, is connected with discharging the corresponding sensor of the connecting interface.
For example, mobile terminal system is in native layers of SensorService system services, addition release is passed with preserving Sensor connection service implementation method releaseAndSaveSensor.This method will travel through current active connecting interface queue MActiveConnections, if a connecting interface does not meet the filter condition of strobe utility, calls disable methods to release Sensor connection is put, the connecting interface is removed into current active connecting interface queue, treated while the connecting interface is saved in Recover connection queue mSavedConnections, the corresponding sensor arrange parameter of connecting interface is added to parameter to be restored In queue mSavedParams, sensor connection is recovered during holding state for exiting.
In embodiments of the present invention, in order to when mobile terminal exits holding state, the company of sensor can be recovered automatically Connect, its implementation process is as follows:
1st, the connecting interface is being removed into the current active connecting interface queue, to discharge the connecting interface correspondence Sensor the step of connect after, the connecting interface for removing the current active connecting interface queue is preserved to company to be restored Connect queue;
2nd, the arrange parameter information of the corresponding sensor of connecting interface removed is obtained;
3rd, the arrange parameter information of the sensor is added in parameter queue to be restored.
4th, when detecting mobile terminal and being currently at non-standby state, the connection queue to be restored is traveled through;
5th, the arrange parameter information of sensor is obtained from the parameter queue to be restored;
6th, according to the arrange parameter information of the sensor, corresponding connecting interface is re-added to the current active In connecting interface queue, connected with recovering corresponding sensor.
For example, mobile terminal system is in native layers of SensorService system services, addition recovers sensor and connected Meet service implementation method restoreSensor.RestoreSensor methods will travel through connection queue to be restored MSavedConnections, obtains corresponding sensor arrange parameter from parameter queue mSavedParams to be restored, calls Enable methods recover corresponding sensor connection, work as while the connecting interface is re-added into mActiveConnections Before enliven connecting interface queue.
Broadcasted from the foregoing, it will be observed that screen broadcast is put out in the power managed application of function registration of mobile terminal system with bright screen.When putting out screen, Call SystemSensorManager releaseAndSaveSensor interfaces, the current sensor connection still held of release; During bright screen, SystemSensorManager restoreSensor interfaces are called, recover to put out the sensor connection discharged during screen.
Embodiment two
Referring to Fig. 2, showing the implementation process of release sensor connection provided in an embodiment of the present invention.
The implementation process of the release sensor connection, applied in mobile terminal, specifically includes following steps:
In step s 201, whether mobile phone automatic detection, which is in, is put out screen;
In step S202, if detecting mobile phone puts out screen, determine whether whether power managed function opens;
In step S203, if it is judged that power managed function is opened, then mActiveConnections sensings are traveled through Device current active connecting interface queue;
In step S204, judge whether the corresponding application program of the connecting interface in the queue meets filter condition; Wherein, the filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
Wherein, preserved in power managed application of function and a set of determine whether that application program is held in holding state The mechanism (filter condition i.e. mentioned above) of sensor, for example:The application of motion class, navigation type application can be defined, in system Put using etc. the application of several classes allow standby when hold sensor, other application in addition forbids holding sensing when standby Device.
In this step, judge that the corresponding application program of connecting interface in the queue does not belong to motion class for example, working as Using the application of, navigation type and system built-in application, then can be determined that out that the corresponding application program of the connecting interface is not met Filter condition, is to need release sensor connection therefore.
In step S205, if it is judged that the corresponding application program of the connecting interface does not meet filter condition, then adjust The sensor is discharged with disable methods to connect, and the connecting interface is removed into current active connecting interface queue;
In step S206, the connecting interface for removing the current active connecting interface queue is added to connection to be restored Queue mSavedConnections;
In step S207, the arrange parameter information of sensor is added to parameter queue mSavedParams to be restored In;
In step S208, judge whether to have traveled through mActiveConnections sensor current active connecting interfaces team All connecting interfaces in row;
In step S209, if it is judged that having traveled through mActiveConnections sensor current active connecting interfaces All connecting interfaces in queue, then terminate this operation.If it is judged that not traveled through mActiveConnections biographies All connecting interfaces in sensor current active connecting interface queue, then perform traversal in return to step S203 Next connecting interface in mActiveConnections sensor current active connecting interface queues.
Embodiment three
Referring to Fig. 3, showing the implementation process of recovery sensor connection provided in an embodiment of the present invention.
The implementation process for recovering sensor connection, applied in mobile terminal, specifically includes following steps:
In step S301, whether mobile phone automatic detection is in bright screen;
In step s 302, if detecting mobile phone bright screen, the connection queue to be restored is traveled through mSavedConnections;
In step S303, the arrange parameter letter of sensor is obtained from the parameter queue mSavedParams to be restored Breath;
In step s 304, enable methods are called to recover corresponding sensor connection, while by the connecting interface again It is added in mActiveConnections current active connecting interface queues;
In step S305, judge whether to have traveled through the institute in the connection queue mSavedConnections to be restored There is connecting interface;
In step S306, if it is judged that having traveled through in the connection queue mSavedConnections to be restored All connecting interfaces, then terminate this operation.If it is judged that not traveled through the connection queue to be restored All connecting interfaces in mSavedConnections, then travel through the connection team to be restored in return to step S302 to perform Arrange next connecting interface in mSavedConnections.
From the foregoing, it will be observed that the sensor processing method based on mobile terminal of the present invention, by detecting that mobile terminal is currently It is no to be in holding state;When detecting mobile terminal and being currently at holding state, sensor current active connecting interface is traveled through Queue;Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;Wherein, the filter condition For:When mobile terminal is in holding state, application program does not discharge sensor connection;If it is judged that the connecting interface pair The application program answered does not meet filter condition, then the connecting interface is removed into the current active connecting interface queue, to release Put the corresponding sensor connection of the connecting interface.I.e. the present invention discharges satisfactory sensor connection when standby automatically. Therefore the mobile whole system of the present invention can obtain dormancy when standby, due to it is standby when release sensor connection, therefore effectively The power consumption of mobile terminal is reduced, so as to increase the stand-by power consumption of mobile terminal, is conducive to being lifted the endurance of mobile terminal.
Example IV
It is the sensor processing unit provided in an embodiment of the present invention based on mobile terminal also referring to Fig. 4 and Fig. 5 Module diagram;For convenience of description, it illustrate only the part related to the embodiment of the present invention.The biography based on mobile terminal Sensor processing unit includes:Holding state detection module 101, the first spider module 102, filtering judge module 103, removal module 104.The sensor processing unit based on mobile terminal can be software unit, the hardware cell being built in mobile terminal Or the unit of software and hardware combining.
Holding state detection module 101, for detecting whether mobile terminal is currently in holding state;
Wherein, currently whether the implementation in holding state can be detection mobile terminal:Detect mobile terminal Whether screen is in screen state is put out, if it is, can be determined that the mobile terminal is currently at holding state;If detection movement The screen of terminal is in bright screen state, then can be determined that the mobile terminal is currently at non-standby state.
It would however also be possible to employ following manner carries out judging whether mobile terminal is currently in holding state:Such as, detection exists Whether user is received in preset time to physical button and the operational order of touch-screen, if do not received in preset time To user to physical button and the operational order of touch-screen, then it can be determined that the mobile terminal is currently at holding state;If Have in preset time and receive user to physical button or the operational order of touch-screen, then can be determined that the mobile terminal is current In non-standby state.
It is understood, however, that being not limited to above-mentioned judgment mode, made within the spirit and principles of the invention Any modifications, equivalent substitutions and improvements etc., should be included in the scope of the protection.
First spider module 102, for when detecting mobile terminal and being currently at holding state, traversal sensor to be current Enliven connecting interface queue;
Judge module 103 is filtered, whether the corresponding application program of connecting interface for judging in the queue met Filter condition;Wherein, the filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
Wherein, preserved in power managed application of function and a set of determine whether that application program is held in holding state The mechanism (filter condition i.e. mentioned above) of sensor, for example:The application of motion class, navigation type application can be defined, in system Put using etc. the application of several classes allow standby when hold sensor, other application in addition forbids holding sensing when standby Device.
Module 104 is removed, for if it is judged that the corresponding application program of the connecting interface does not meet filter condition, then The connecting interface is removed into the current active connecting interface queue, connected with discharging the corresponding sensor of the connecting interface Connect.
Further, the sensor processing unit based on mobile terminal, in addition to:
Preserving module 105, for the connecting interface for removing the current active connecting interface queue to be preserved to be restored Connect queue;
First parameter acquisition module 106, the arrange parameter information for obtaining the corresponding sensor of connecting interface removed;
Parameter add module 107, for the arrange parameter information of the sensor to be added in parameter queue to be restored.
Further, the sensor processing unit based on mobile terminal, in addition to:
Second spider module 108, for when detecting mobile terminal and being currently at non-standby state, treating extensive described in traversal It is multiply-connected to connect queue;
Second parameter acquisition module 109, the arrange parameter letter for obtaining sensor from the parameter queue to be restored Breath;
First interface add module 110, for the arrange parameter information according to the sensor, by corresponding connecting interface It is re-added in the current active connecting interface queue, is connected with recovering corresponding sensor.
Further, the sensor processing unit based on mobile terminal described in 111, in addition to:
Interface assignment module, for when application program needs to use sensor, being connected to the application assigned one Interface, by the connecting interface, the application program can call the sensor to be operated;
Second interface add module 112, for the connecting interface of distribution to be connected added to the sensor current active In interface queue.
Further, the sensor processing unit based on mobile terminal, in addition to:
Judge module 113, for when detecting mobile terminal and being currently at holding state, judging that power managed function is It is no to open;
Trigger module 114, for if it is judged that the unlatching of power managed function, then trigger first spider module and perform The traversal sensor current active connecting interface queue.
From the foregoing, it will be observed that the sensor processing unit based on mobile terminal of the present invention, by detecting that mobile terminal is currently It is no to be in holding state;When detecting mobile terminal and being currently at holding state, sensor current active connecting interface is traveled through Queue;Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;Wherein, the filter condition For:When mobile terminal is in holding state, application program does not discharge sensor connection;If it is judged that the connecting interface pair The application program answered does not meet filter condition, then the connecting interface is removed into the current active connecting interface queue, to release Put the corresponding sensor connection of the connecting interface.I.e. the present invention discharges satisfactory sensor connection when standby automatically. Therefore the mobile whole system of the present invention can obtain dormancy when standby, due to it is standby when release sensor connection, therefore effectively The power consumption of mobile terminal is reduced, so as to increase the stand-by power consumption of mobile terminal, is conducive to being lifted the endurance of mobile terminal.
Sensor processing method and device provided in an embodiment of the present invention based on mobile terminal belong to same design, and it has Body implementation process refers to specification in full, and here is omitted.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable recording medium, storage Medium can include:Read-only storage (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
In summary, although the present invention it is disclosed above with preferred embodiment, but above preferred embodiment and be not used to limit The system present invention, one of ordinary skill in the art without departing from the spirit and scope of the present invention, can make various changes and profit Adorn, therefore protection scope of the present invention is defined by the scope that claim is defined.

Claims (9)

1. a kind of sensor processing method based on mobile terminal, it is characterised in that at the sensor based on mobile terminal Reason method, comprises the following steps:
When application program needs to use sensor, to the connecting interface of application assigned one;
The enable interface of sensor is called, the connecting interface of distribution is added in sensor current active connecting interface queue; Wherein, the sensor current active connecting interface queue, for storing currently available sensor connection;
Detect whether mobile terminal is currently in holding state;
When detecting mobile terminal and being currently at holding state, the sensor current active connecting interface queue is traveled through;
Judge whether the corresponding application program of the connecting interface in the queue meets filter condition;Wherein, the filter condition For:When mobile terminal is in holding state, application program does not discharge sensor connection;
If it is judged that the corresponding application program of the connecting interface does not meet filter condition, then the disabling of sensor is called to connect Mouthful, the connecting interface is removed into the current active connecting interface queue, to discharge the corresponding sensor of the connecting interface Connection.
2. the sensor processing method as claimed in claim 1 based on mobile terminal, it is characterised in that connect by described Mouthful the current active connecting interface queue is removed, with after discharging the step of corresponding sensor of the connecting interface is connected, Also include:
The connecting interface for removing the current active connecting interface queue is preserved to connection queue to be restored;
Obtain the arrange parameter information of the corresponding sensor of connecting interface removed;
The arrange parameter information of the sensor is added in parameter queue to be restored.
3. the sensor processing method based on mobile terminal as claimed in claim 2, it is characterised in that by the sensor Arrange parameter information be added to after the step in parameter queue to be restored, in addition to:
When detecting mobile terminal and being currently at non-standby state, the connection queue to be restored is traveled through;
The arrange parameter information of sensor is obtained from the parameter queue to be restored;
According to the arrange parameter information of the sensor, corresponding connecting interface is re-added to the current active and connect In mouth queue, connected with recovering corresponding sensor.
4. the sensor processing method as claimed in claim 1 based on mobile terminal, it is characterised in that in the detection movement After the step of whether terminal is currently in holding state, in addition to:
When detecting mobile terminal and being currently at holding state, judge whether power managed function opens;
If it is judged that power managed function is opened, then the step of the traversal sensor current active connecting interface queue is performed Suddenly.
5. a kind of sensor processing unit based on mobile terminal, it is characterised in that at the sensor based on mobile terminal Device is managed, including:
Interface assignment module, for when application program needs to use sensor, to the connecting interface of application assigned one;
Second interface add module, the enable interface for calling sensor works as the connecting interface of distribution added to sensor Before enliven in connecting interface queue;Wherein, the sensor current active connecting interface queue, for storing currently available biography Sensor is connected;
Holding state detection module, for detecting whether mobile terminal is currently in holding state;
First spider module, currently lives for when detecting mobile terminal and being currently at holding state, traveling through the sensor Jump connecting interface queue;
Judge module is filtered, whether the corresponding application program of connecting interface for judging in the queue meets filter condition; Wherein, the filter condition is:When mobile terminal is in holding state, application program does not discharge sensor connection;
Module is removed, for if it is judged that the corresponding application program of the connecting interface does not meet filter condition, then calling biography The disabling interface of sensor, removes the current active connecting interface queue, to discharge the connecting interface by the connecting interface Corresponding sensor connection.
6. the sensor processing unit as claimed in claim 5 based on mobile terminal, it is characterised in that described based on mobile whole The sensor processing unit at end, in addition to:
Preserving module, for the connecting interface for removing the current active connecting interface queue to be preserved to connection team to be restored Row;
First parameter acquisition module, the arrange parameter information for obtaining the corresponding sensor of connecting interface removed;
Parameter add module, for the arrange parameter information of the sensor to be added in parameter queue to be restored.
7. the sensor processing unit as claimed in claim 6 based on mobile terminal, it is characterised in that described based on mobile whole The sensor processing unit at end, in addition to:
Second spider module, for when detecting mobile terminal and being currently at non-standby state, traveling through the connection to be restored Queue;
Second parameter acquisition module, the arrange parameter information for obtaining sensor from the parameter queue to be restored;
First interface add module, for the arrange parameter information according to the sensor, corresponding connecting interface is added again It is added in the current active connecting interface queue, is connected with recovering corresponding sensor.
8. the sensor processing unit as claimed in claim 5 based on mobile terminal, it is characterised in that described based on mobile whole The sensor processing unit at end, in addition to:
Judge module, for when detecting mobile terminal and being currently at holding state, judging whether power managed function opens;
Trigger module, for if it is judged that the unlatching of power managed function, then trigger first spider module and perform described time Go through sensor current active connecting interface queue.
9. a kind of computer-readable recording medium, its computer program that is stored with, wherein, the computer program causes computer Perform the method as described in Claims 1-4 any one.
CN201610383735.6A 2016-05-31 2016-05-31 A kind of sensor processing method and device based on mobile terminal Expired - Fee Related CN106102144B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610383735.6A CN106102144B (en) 2016-05-31 2016-05-31 A kind of sensor processing method and device based on mobile terminal
PCT/CN2017/086527 WO2017206891A1 (en) 2016-05-31 2017-05-31 Sensor processing method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610383735.6A CN106102144B (en) 2016-05-31 2016-05-31 A kind of sensor processing method and device based on mobile terminal

Publications (2)

Publication Number Publication Date
CN106102144A CN106102144A (en) 2016-11-09
CN106102144B true CN106102144B (en) 2017-09-01

Family

ID=57447917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610383735.6A Expired - Fee Related CN106102144B (en) 2016-05-31 2016-05-31 A kind of sensor processing method and device based on mobile terminal

Country Status (2)

Country Link
CN (1) CN106102144B (en)
WO (1) WO2017206891A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106102144B (en) * 2016-05-31 2017-09-01 广东欧珀移动通信有限公司 A kind of sensor processing method and device based on mobile terminal
CN112947739A (en) * 2021-03-09 2021-06-11 北京小米移动软件有限公司 Terminal application program management method and device, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866908A (en) * 2012-07-25 2013-01-09 广东欧珀移动通信有限公司 Method for cleaning Android background applications and services
CN103500138A (en) * 2013-09-30 2014-01-08 东莞宇龙通信科技有限公司 Power management method and system and mobile terminal
CN105183137A (en) * 2015-09-09 2015-12-23 厦门美图移动科技有限公司 Mobile terminal and wake lock control method and system thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101932688B1 (en) * 2010-11-29 2018-12-28 삼성전자주식회사 Portable Device and Method for Providing User Interface Mode thereof
CN103024205B (en) * 2012-12-14 2014-07-09 华为终端有限公司 Method, device and terminal for controlling power
CN103235687B (en) * 2013-04-02 2016-01-20 广东欧珀移动通信有限公司 A kind of method, device and mobile device that sensor opening is set
KR102137097B1 (en) * 2014-08-21 2020-07-23 삼성전자주식회사 Processing Method for periodic event and Electronic device supporting the same
CN106095051B (en) * 2016-05-31 2019-02-01 Oppo广东移动通信有限公司 A kind of processing method of application program for mobile terminal, device and mobile terminal
CN106102144B (en) * 2016-05-31 2017-09-01 广东欧珀移动通信有限公司 A kind of sensor processing method and device based on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866908A (en) * 2012-07-25 2013-01-09 广东欧珀移动通信有限公司 Method for cleaning Android background applications and services
CN103500138A (en) * 2013-09-30 2014-01-08 东莞宇龙通信科技有限公司 Power management method and system and mobile terminal
CN105183137A (en) * 2015-09-09 2015-12-23 厦门美图移动科技有限公司 Mobile terminal and wake lock control method and system thereof

Also Published As

Publication number Publication date
WO2017206891A1 (en) 2017-12-07
CN106102144A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106095051B (en) A kind of processing method of application program for mobile terminal, device and mobile terminal
CN106055078B (en) A kind of sensor processing method of mobile terminal, device and mobile terminal
CN107133092A (en) Multi-thread synchronization processing method, terminal and computer-readable recording medium
CN108509299A (en) Message treatment method, equipment and computer readable storage medium
CN108900370A (en) It is long to connect multiple overtime judgment method, device and computer readable storage medium
CN109005289A (en) Screen lighting method, mobile terminal and readable storage medium storing program for executing
CN109614176A (en) A kind of application interface layout method, terminal and computer readable storage medium
CN108829328A (en) A kind of game operation method, terminal and computer readable storage medium
CN108022077A (en) One kind reminds item processing method, terminal and computer-readable recording medium
CN106020427B (en) A kind of processing method of associated application, device and mobile terminal
CN107801201A (en) Network recovery method and device
CN109901980A (en) Serial ports log grabs circuit, method, terminal and computer readable storage medium
CN106102144B (en) A kind of sensor processing method and device based on mobile terminal
CN106385485A (en) Call recording method, call recording device and mobile terminal
CN109005574A (en) Cell selecting method, mobile terminal and computer readable storage medium
CN109151216A (en) Using starting method, mobile terminal, server and computer readable storage medium
CN109766119A (en) Restore subregion upgrade method, terminal and computer readable storage medium
CN108762926A (en) A kind of system optimization method, terminal and computer readable storage medium
CN106095306B (en) A kind of sensor control method of mobile terminal, device and mobile terminal
CN109275112A (en) SMS processing method, server and computer readable storage medium
CN109165042A (en) Restoration methods, terminal and computer readable storage medium are interrupted in a kind of application
CN109309762A (en) Message treatment method, device, mobile terminal and storage medium
CN110096194A (en) Terminal unlocking control method, device, mobile terminal and readable storage medium storing program for executing
CN106708500A (en) Display method and device for unloading interface
CN110427229A (en) Using no response processing method, mobile terminal and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170901