CN106021042A - A sensor using condition detection method and device and a mobile apparatus - Google Patents
A sensor using condition detection method and device and a mobile apparatus Download PDFInfo
- Publication number
- CN106021042A CN106021042A CN201610300762.2A CN201610300762A CN106021042A CN 106021042 A CN106021042 A CN 106021042A CN 201610300762 A CN201610300762 A CN 201610300762A CN 106021042 A CN106021042 A CN 106021042A
- Authority
- CN
- China
- Prior art keywords
- numerical value
- sensor
- information
- application program
- data cell
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2221—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
-
- 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
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention provides a sensor using condition detection method and device and a mobile apparatus. The sensor using condition detection method comprises the steps of reading a data chain table which includes a data unit including the information of a sensor, the information of an application program using the sensor, and the number of times; acquiring the number of times from the data chain table; according to the number of times, determining the using condition of the sensor corresponding to the number of times. The method can determine the using condition of sensors to determine whether the sensors are used in a standard way.
Description
Technical field
The present invention relates to mobile communication technology field, particularly relate to the detection side of a kind of sensor service condition
Method, device and mobile device.
Background technology
Currently, in mobile device particularly mobile phone, a lot of different types of sensors can be used.It addition,
A lot of application programs (APP) also can be installed to realize corresponding function on mobile phone.Application program is operationally
Sensor can be used, but, in some cases, application program may not be observed when using sensor
Operating specification, such as, application program monitoring real-time to sensing data does not discharges.Now, after giving
Afterflow journey brings harmful effect in various degree, such as, it is impossible to judge that what application program does not discharge sensing
Device;If it is adjust the distance, sensor is monitored in real time, changes such as distance state when cell phone standby,
Now system can be waken up, and causes the increase of power consumption;If just sensor being monitored before start completes
And do not discharge, then before dispatching from the factory, the calibration operation to sensor will be unable to.
To this end, judge sensor whether by Normalization rule, and lack of standardization use time be accurately positioned use sensing
The application program of device becomes problem demanding prompt solution.
Summary of the invention
It is contemplated that one of technical problem solved the most to a certain extent in correlation technique.
To this end, it is an object of the present invention to propose the detection method of a kind of sensor service condition, the party
Method may determine that the service condition of sensor, to determine that whether sensor is by Normalization rule.
Further object is that the detection device proposing a kind of sensor service condition.
Further object is that a kind of mobile device of proposition.
For reaching above-mentioned purpose, the detection side of the sensor service condition that first aspect present invention embodiment proposes
Method, including: reading data link table, described data link table includes that data cell, described data cell include:
The information of sensor, use the information of the application program of described sensor, secondary numerical value;At described data link table
Middle acquisition time numerical value;According to described numerical value, determine the service condition of the sensor that described numerical value is corresponding.
The detection method of the sensor service condition that first aspect present invention embodiment proposes, by reading data
Chained list, acquisition time numerical value from data link table, and the service condition of sensor is determined according to secondary numerical value, permissible
Determine the service condition of sensor, may thereby determine that whether sensor is by Normalization rule.
For reaching above-mentioned purpose, the detection dress of the sensor service condition that second aspect present invention embodiment proposes
Put, including: read module, it is used for reading data link table, described data link table includes data cell, institute
State data cell to include: the information of sensor, use the information of the application program of described sensor, secondary numerical value;
Acquisition module, for obtaining time numerical value in described data link table;Determine module, for according to described number of times
Value, determines the service condition of the sensor that described numerical value is corresponding.
The detection device of the sensor service condition that second aspect present invention embodiment proposes, by reading data
Chained list, acquisition time numerical value from data link table, and the service condition of sensor is determined according to secondary numerical value, permissible
Determine the service condition of sensor, may thereby determine that whether sensor is by Normalization rule.
For reaching above-mentioned purpose, the mobile device that third aspect present invention embodiment proposes, including: housing,
Processor, memorizer, circuit board and power circuit, wherein, circuit board is placed in the space that housing surrounds
Portion, processor and memorizer are arranged on circuit boards;Power circuit, for each circuit for mobile device
Or device powers;Memorizer is used for storing executable program code;Processor stores by reading in memorizer
Executable program code run the program corresponding with executable program code, for performing following step
Rapid: reading data link table, described data link table includes that data cell, described data cell include: sensing
The information of device, use the information of the application program of described sensor, secondary numerical value;Described data link table obtains
Take time numerical value;According to described numerical value, determine the service condition of the sensor that described numerical value is corresponding.
The mobile device that third aspect present invention embodiment proposes, by reading data link table, from data link table
Middle acquisition time numerical value, and the service condition of sensor is determined according to secondary numerical value, it may be determined that go out making of sensor
By situation, may thereby determine that whether sensor is by Normalization rule.
Aspect and advantage that the present invention adds will part be given in the following description, and part will be retouched from following
Become obvious in stating, or recognized by the practice of the present invention.
Accompanying drawing explanation
Present invention aspect that is above-mentioned and/or that add and advantage are from the following description of the accompanying drawings of embodiments
Will be apparent from easy to understand, wherein:
Fig. 1 is that the flow process of the detection method of the sensor service condition that one embodiment of the invention proposes is shown
It is intended to;
Fig. 2 is the flow process of the detection method of the sensor service condition that another embodiment of the present invention proposes
Schematic diagram;
Fig. 3 is the structural representation of the detection device of the sensor service condition that one embodiment of the invention proposes
Figure;
Fig. 4 is that the structure of the detection device of the sensor service condition that another embodiment of the present invention proposes is shown
It is intended to;
Fig. 5 is the structural representation of the mobile device that one embodiment of the invention proposes.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the drawings, wherein certainly
Begin to same or similar label eventually represent same or similar module or there is the mould of same or like function
Block.The embodiment described below with reference to accompanying drawing is exemplary, is only used for explaining the present invention, and can not
It is interpreted as limitation of the present invention.On the contrary, embodiments of the invention include falling into attached claims
All changes, amendment and equivalent in the range of spirit and intension.
Fig. 1 is that the flow process of the detection method of the sensor service condition that one embodiment of the invention proposes is shown
It is intended to.
Seeing Fig. 1, the method includes:
S11: reading data link table, described data link table includes that data cell, described data cell include:
The information of sensor, use the information of the application program of described sensor, secondary numerical value.
Wherein it is possible to when whether needs judge sensor by Normalization rule, read data link table and go forward side by side
Row subsequent treatment.
The information of sensor can specifically sensor type (sensor_type), such as, distance passes
Sensor, light intensity sensor, geomagnetic sensor or acceleration transducer etc..
The information of application program can the process title (app_name) of specifically application program.
Secondary numerical value can specifically represent with flag.
Further, data link table can be to generate the service condition of sensor according to application program.
Data link table can include one or more data cell, corresponding record in each data cell:
The information of sensor, the information of application program and secondary numerical value.
S12: obtain time numerical value in described data link table.
After reading data link table, correspondence can be got from each data cell of data link table respectively
Secondary numerical value.
S13: according to described numerical value, determines the service condition of the sensor that described numerical value is corresponding.
Wherein, the sensor that secondary numerical value is corresponding refers to the sensor of record in the data cell at time numerical value place
Information instruction sensor, such as, record in the first data cell: the information of first sensor, first should
With the information of program and first time numerical value, then can determine the use feelings of first sensor according to first time numerical value
Condition.Such as, determine whether first sensor is used by the first application specifications.
Being similar to, the application program that secondary numerical value is corresponding refers to the application recorded in the data cell at time numerical value place
The application program of the information instruction of program, such as, the application program that numerical value is corresponding for the first time refers to the first application
Program.
In the present embodiment, by reading data link table, from data link table, obtain time numerical value, and according to number of times
Value determines the service condition of sensor, it may be determined that goes out the service condition of sensor, may thereby determine that sensing
Whether device is by Normalization rule.
Fig. 2 is the flow process of the detection method of the sensor service condition that another embodiment of the present invention proposes
Schematic diagram.
Seeing Fig. 2, the method for the present embodiment includes:
S201: during initialization, creates empty data link table.
S202: detection application program is to the monitoring situation of sensor or release conditions.
Wherein, sensor is a kind of passive input equipment, is used for being that app actively goes to carry out it
Data decryptor, when app initiates to monitor, can enable (enable) sensor
(app-> framework-> driver), is finally through enabling depositor write 1 to sensor, passes
Sense device working reported data, app makees corresponding operating (as close to putting out screen, far according to sensor states change
From bright screen);When app discharges sensor, can disable (disabling) sensor
(app-> framework-> driver), is finally through enabling depositor write 0 to sensor, closes
Close sensor.
Therefore, if enable_sensor (enable function) being detected at framework layer, then may be used
Monitoring situation is detected, if detecting that disable_sensor (closes at framework layer to determine
Close function), then may determine that and release conditions detected.
Afterwards, described data link table can be updated according to the situation of monitoring or release conditions.
Specifically may include that after monitoring situation being detected, perform S203-S208, be release when detecting
During situation, perform S209-S212.
S203: the information obtaining the application program monitored and the letter of the sensor monitored by described application program
Breath.
Wherein, enable_sensor (enable function) can record above-mentioned application program information and
The information of sensor, therefore, it can obtain above-mentioned answering from enable_sensor (enable function)
By information and the information of sensor of program.
S204: make a look up in described data link table, it may be judged whether exist in same data cell and wrap
Include information and the information of described sensor of described application program, if so, perform S205, otherwise perform S208.
Assume that the information of above-mentioned application program and the information of sensor are the information of the first application program respectively
With the information of first sensor, then search whether to exist in same data cell in data link table to wrap simultaneously
Include the information of the first application program and the information of first sensor.
S205: obtain the secondary numerical value in described data cell, and judge whether described numerical value is less than 0, if
It is to perform S206, otherwise perform S207.
Assume the first data cell exists the information of the first application program and the information of first sensor simultaneously,
From the first data cell, then obtain time numerical value, it is assumed that be first time numerical value, then whether judge first time numerical value
Less than 0.
S206: keep described numerical value constant or described numerical value is subtracted 1.
Such as, when numerical value is-1 for the first time, then can keep for the first time numerical value equal to-1, or, by the
One time numerical value is updated to-2.
S207: described numerical value is increased by 1.
Such as, when numerical value is 1 for the first time, then first time numerical value can be updated to 2.
S208: generate a data cell, and described data cell is added in described data link table, wherein,
Described data cell includes: the information of described application program, the information of described sensor and secondary numerical value, and,
Described time numerical value is set to 1.
Assume data link table exists in neither one data cell the information of the first application program and simultaneously
The information of one sensor, then can generate a data cell, it is assumed that this data cell is referred to as the first data sheet
Unit, and record in the first data cell: the information of the first application program, the information of first sensor,
Numerical value, and first time numerical value is set equal to 1.
S209: the information obtaining the application program of release and the letter of the sensor discharged by described application program
Breath.
Wherein, disable_sensor (closedown function) can record the information of above-mentioned application program
With the information of sensor, therefore, it can acquisition from disable_sensor (closedown function) above-mentioned
The information of application program and the information of sensor.
S210: make a look up in described data link table, it may be judged whether there is same data cell and include
The information of described application program and the information of described sensor, if so, perform S211, otherwise perform S212.
Assume that the information of above-mentioned application program and the information of sensor are the information of the first application program respectively
With the information of first sensor, then search whether to exist in same data cell in data link table to wrap simultaneously
Include the information of the first application program and the information of first sensor.
S211: the secondary numerical value in described data cell is subtracted 1, and, if the secondary numerical value after subtracting 1 is equal to
0, then in described data link table, delete described data cell.
Assume the first data cell exists the information of the first application program and the information of first sensor simultaneously,
From the first data cell, then obtain time numerical value, it is assumed that be first time numerical value, then first time numerical value subtracted 1.
If it addition, the first time numerical value after subtracting 1 is more than 0, then retains the first data cell, now, protect
Secondary numerical value in the first data cell stayed is the first time numerical value after subtracting 1.If first number after subtracting 1
Value equal to 0, then deletes the first data cell.
S212: generate a data cell, and described data cell is added in described data link table, wherein,
Described data cell includes: the information of described application program, the information of described sensor and secondary numerical value, and,
Described time numerical value is set to-1.
Assume data link table exists in neither one data cell the information of the first application program and simultaneously
The information of one sensor, then can generate a data cell, it is assumed that this data cell is referred to as the first data sheet
Unit, and record in the first data cell: the information of the first application program, the information of first sensor,
Numerical value, and first time numerical value is set equal to-1.
S213: read data link table, and obtain time numerical value from data link table.
Wherein it is possible to when needing the service condition judging sensor, read existing data link table, and from
The data cell of data link table obtains corresponding secondary numerical value.
Afterwards, can be according to the service condition of sensor corresponding to secondary numerical value determined number value.
Specifically may include that
S214: when secondary numerical value is more than 1, determines that application program that described numerical value is corresponding is to described sensor
Carry out repeating to monitor, do not meet specification.
Such as, secondary numerical value is the first time numerical value in the first data cell, and, the first data cell is also remembered
Record the information of the first application program and the information of first sensor, if then numerical value is more than 1 for the first time, the most really
First sensor has been carried out repeating to monitor by fixed first application program, does not meets specification.
S215: when secondary numerical value is less than 0, determines and passes described in the application program unlisten that described numerical value is corresponding
Sensor just release, does not meets specification.
Such as, if numerical value is less than 0 for the first time, it is determined that first sensor is not carried out by the first application program
Monitor and but it is discharged, do not meet specification.
S216: when secondary numerical value is equal to 1, determines that application program that described numerical value is corresponding is to described biography
Sensor is monitored, if described application program has dropped out, determines that described application program does not discharges described sensing
Device, does not meets specification.
Such as, if numerical value is equal to 1 for the first time, it is determined that first sensor is entered by the first application program
Row is monitored, if now the first application program has dropped out, then shows the first application program to exit but not discharge the
One sensor, does not meets specification.
It addition, after determining the situation not meeting specification, may further determine that out the biography of non-Normalization rule
The information of sensor and the information of application program, such as, above-mentioned do not meet specification in the case of, it may be determined that
The information of the sensor of non-Normalization rule and the information of application program are the information and of first sensor respectively
The information of one application program.Afterwards, the code of the first application program can be modified, with compliant.
It is understood that secondary numerical value may determine that compliant in other cases, it is not necessary to special handling.
In the present embodiment, by reading data link table, from data link table, obtain time numerical value, and according to number of times
Value determines the service condition of sensor, it may be determined that goes out the service condition of sensor, may thereby determine that sensing
Whether device is by Normalization rule.It is determined by the information of the application program of non-Normalization rule and the information of sensor,
The application program of non-Normalization rule sensor can be accurately positioned, and then corresponding application program can be carried out
Process, do not meet Normalization rule sensor to the harmful effect that causes of follow-up flow process solving application program.
Fig. 3 is the structural representation of the detection device of the sensor service condition that one embodiment of the invention proposes
Figure.
Seeing Fig. 3, this device 30 includes: read module 31, acquisition module 32 and determine module 33.
Read module 31, is used for reading data link table, and described data link table includes data cell, described
Data cell includes: the information of sensor, use the information of the application program of described sensor, secondary numerical value;
Acquisition module 32, for obtaining time numerical value in described data link table;
Determine module 33, for according to described numerical value, determine making of the sensor that described numerical value is corresponding
Use situation.
In some embodiments, seeing Fig. 4, this device 30 also includes:
Creation module 34, for when initializing, creates empty described data link table;
Detection module 35, for detecting application program to the monitoring situation of sensor or release conditions;
More new module 36, for according to described monitoring situation or release conditions, updates described data link table.
In some embodiments, seeing Fig. 4, described more new module 36 includes:
First acquiring unit 3601, for when described monitoring situation being detected, obtains the application journey monitored
The information of sequence and the information of sensor monitored by described application program;
First judging unit 3602, for making a look up in described data link table, it may be judged whether exists same
One data cell includes information and the information of described sensor of described application program;
First signal generating unit 3603, is used for if it does not, generate a data cell, and by described number
Adding in described data link table according to unit, wherein, described data cell includes: the letter of described application program
Breath, the information of described sensor and secondary numerical value, and, described time numerical value is set to 1.
In some embodiments, seeing Fig. 4, described more new module 36 also includes:
Second acquisition unit 3604, for including described application program if there is same data cell
Information and the information of described sensor, obtain the secondary numerical value in described data cell;
Increasing unit 3605, if not being negative for described numerical value, described numerical value being increased by 1.
In some embodiments, seeing Fig. 4, described more new module 36 also includes:
Holding unit 3606, if for described numerical value less than 0, keeps described numerical value constant or will
Described time numerical value subtracts 1.
In some embodiments, seeing Fig. 4, described more new module 36 includes:
3rd acquiring unit 3607, for when described release conditions being detected, obtains the application journey of release
The information of sequence and the information of sensor discharged by described application program;
Second judging unit 3608, for making a look up in described data link table, it may be judged whether exists same
One data cell includes information and the information of described sensor of described application program;
Second signal generating unit 3609, is used for if it does not, generate a data cell, and by described number
Adding in described data link table according to unit, wherein, described data cell includes: the letter of described application program
Breath, the information of described sensor and secondary numerical value, and, described time numerical value is set to-1.
In some embodiments, seeing Fig. 4, described more new module 36 also includes:
Reduce unit 3610, for including the letter of described application program if there is same data cell
Breath and the information of described sensor, subtract 1 by the secondary numerical value in described data cell;
Delete unit 3611, if the secondary numerical value after subtracting 1 is equal to 0, then delete in described data link table
Except described data cell.
In some embodiments, described determine module 33 specifically for:
When detect in following item one or more time, determine that described sensor is not by Normalization rule:
Described numerical value is more than 1;
Described numerical value is less than 0;
Described numerical value is equal to 1, and application program corresponding to described numerical value has dropped out.
In some embodiments, described determine that module 33 is additionally operable to:
After determining that described sensor is not by Normalization rule, by the biography in the data cell at described numerical value place
The information of sensor and the information of application program, be defined as information and the application program of the sensor of non-Normalization rule
Information.
It is understood that the device of the present embodiment is corresponding with above-mentioned embodiment of the method, particular content is permissible
See the description in embodiment of the method, no longer describe in detail at this.
In the present embodiment, by reading data link table, from data link table, obtain time numerical value, and according to number of times
Value determines the service condition of sensor, it may be determined that goes out the service condition of sensor, may thereby determine that sensing
Whether device is by Normalization rule.
Fig. 5 is the structural representation of the mobile device that one embodiment of the invention proposes.
This mobile device can the mobile device of specifically Android system, such as android mobile phone.
Seeing Fig. 5, this mobile device 50 includes: housing 51, processor 52, memorizer 53, circuit board
54, power circuit 55 and sensor 56, wherein, circuit board 54 is placed in the space that housing 51 surrounds
Portion, processor 52 and memorizer 53 are arranged on circuit board 54;Power circuit 55, for setting for mobile
Each standby circuit or device are powered;Memorizer 53 is used for storing executable program code;Processor 52
The journey corresponding with executable program code is run by reading the executable program code of storage in memorizer
Sequence.Sensor 56 is used for performing following steps:
Reading data link table, described data link table includes that data cell, described data cell include: sensing
The information of device, use the information of the application program of described sensor, secondary numerical value;
Time numerical value is obtained in described data link table;
According to described numerical value, determine the service condition of the sensor that described numerical value is corresponding.
Optionally, also include:
During initialization, create empty described data link table;
Detection application program is to the monitoring situation of sensor or release conditions;
According to described monitoring situation or release conditions, update described data link table.
Optionally, described update described data link table according to described monitoring situation or release conditions, including:
When described monitoring situation being detected, obtain the information of the application program monitored and by described application journey
The information of the sensor that sequence is monitored;
Described data link table makes a look up, it may be judged whether there is same data cell and include described answering
By information and the information of described sensor of program;
If it does not, generate a data cell, and described data cell is added in described data link table,
Wherein, described data cell includes: the information of described application program, the information of described sensor and number of times
Value, and, described time numerical value is set to 1.
Optionally, also include:
Information and the letter of described sensor of described application program is included if there is same data cell
Breath, obtains the secondary numerical value in described data cell;
If described numerical value is not negative, described numerical value is increased by 1.
Optionally, also include:
If described numerical value is less than 0, keeps described numerical value constant or described numerical value is subtracted 1.
Optionally, described update described data link table according to described monitoring situation or release conditions, including:
When described release conditions being detected, obtain the information of the application program of release and by described application journey
The information of the sensor of sequence release;
Described data link table makes a look up, it may be judged whether there is same data cell and include described answering
By information and the information of described sensor of program;
If it does not, generate a data cell, and described data cell is added in described data link table,
Wherein, described data cell includes: the information of described application program, the information of described sensor and number of times
Value, and, described time numerical value is set to-1.
Optionally, also include:
Information and the letter of described sensor of described application program is included if there is same data cell
Breath, subtracts 1 by the secondary numerical value in described data cell;
If the secondary numerical value after subtracting 1 is equal to 0, then in described data link table, delete described data cell.
Optionally, described according to described numerical value, determine the service condition of the sensor that described numerical value is corresponding,
Including:
When detect in following item one or more time, determine that described sensor is not by Normalization rule:
Described numerical value is more than 1;
Described numerical value is less than 0;
Described numerical value is equal to 1, and application program corresponding to described numerical value has dropped out.
Optionally, described determine that module is additionally operable to:
After determining that described sensor is not by Normalization rule, by the biography in the data cell at described numerical value place
The information of sensor and the information of application program, be defined as information and the application program of the sensor of non-Normalization rule
Information.
It is understood that the mobile device of the present embodiment is corresponding with above-mentioned embodiment of the method, particular content
May refer to the description in embodiment of the method, no longer describe in detail at this.
In the present embodiment, by reading data link table, from data link table, obtain time numerical value, and according to secondary
Numerical value determines the service condition of sensor, it may be determined that goes out the service condition of sensor, may thereby determine that biography
Whether sensor is by Normalization rule..
It should be noted that in describing the invention, term " first ", " second " etc. are only used for retouching
State purpose, and it is not intended that indicate or hint relative importance.Additionally, in describing the invention, remove
Non-being otherwise noted, the implication of " multiple " refers at least two.
In flow chart or at this, any process described otherwise above or method description are construed as, table
Show and include one or more generation for the executable instruction of the step that realizes specific logical function or process
Module, fragment or the part of code, and the scope of the preferred embodiment of the present invention includes other realization,
Wherein can not by order that is shown or that discuss, including according to involved function by basic mode simultaneously
Or in the opposite order, performing function, these should be by embodiments of the invention those of skill in the art
Member is understood.
Should be appreciated that each several part of the present invention can realize by hardware, software, firmware or combinations thereof.
In the above-described embodiment, multiple steps or method in memory and can be held by suitably instruction with storage
Software or firmware that row system performs realize.Such as, if realized with hardware, with another embodiment party
As in formula, can realize by any one in following technology well known in the art or their combination: have
For data signal being realized the discrete logic of the logic gates of logic function, there is suitably combination
The special IC of logic gates, programmable gate array (PGA), field programmable gate array (FPGA)
Deng.
Those skilled in the art be appreciated that realize that above-described embodiment method carries whole or
Part steps can be by program and completes to instruct relevant hardware, and described program can be stored in one
In computer-readable recording medium, this program upon execution, including one of step or its group of embodiment of the method
Close.
Additionally, each functional unit in each embodiment of the present invention can be integrated in a processing module,
Can also be that unit is individually physically present, it is also possible to two or more unit are integrated in a module
In.Above-mentioned integrated module both can realize to use the form of hardware, it would however also be possible to employ software function module
Form realizes.If described integrated module realizes and as independent product using the form of software function module
When selling or use, it is also possible to be stored in a computer read/write memory medium.
Storage medium mentioned above can be read only memory, disk or CD etc..
In the description of this specification, reference term " embodiment ", " some embodiments ", " example ",
It is concrete that the description of " concrete example " or " some examples " etc. means to combine this embodiment or example describes
Feature, structure, material or feature are contained at least one embodiment or the example of the present invention.In this theory
In bright book, the schematic representation of above-mentioned term is not necessarily referring to identical embodiment or example.And,
The specific features, structure, material or the feature that describe can be in any one or more embodiments or examples
In combine in an appropriate manner.
Although above it has been shown and described that embodiments of the invention, it is to be understood that above-described embodiment
It is exemplary, it is impossible to being interpreted as limitation of the present invention, those of ordinary skill in the art is the present invention's
In the range of above-described embodiment can be changed, revise, replace and modification.
Claims (19)
1. the detection method of a sensor service condition, it is characterised in that including:
Reading data link table, described data link table includes that data cell, described data cell include: sensing
The information of device, use the information of the application program of described sensor, secondary numerical value;
Time numerical value is obtained in described data link table;
According to described numerical value, determine the service condition of the sensor that described numerical value is corresponding.
Method the most according to claim 1, it is characterised in that also include:
During initialization, create empty described data link table;
Detection application program is to the monitoring situation of sensor or release conditions;
According to described monitoring situation or release conditions, update described data link table.
Method the most according to claim 2, it is characterised in that described according to described monitoring situation or
Release conditions, updates described data link table, including:
When described monitoring situation being detected, obtain the information of the application program monitored and by described application journey
The information of the sensor that sequence is monitored;
Described data link table makes a look up, it may be judged whether there is same data cell and include described answering
By information and the information of described sensor of program;
If it does not, generate a data cell, and described data cell is added in described data link table,
Wherein, described data cell includes: the information of described application program, the information of described sensor and number of times
Value, and, described time numerical value is set to 1.
Method the most according to claim 3, it is characterised in that also include:
Information and the letter of described sensor of described application program is included if there is same data cell
Breath, obtains the secondary numerical value in described data cell;
If described numerical value is not negative, described numerical value is increased by 1.
Method the most according to claim 4, it is characterised in that also include:
If described numerical value is less than 0, keeps described numerical value constant or described numerical value is subtracted 1.
Method the most according to claim 2, it is characterised in that described according to described monitoring situation or
Release conditions, updates described data link table, including:
When described release conditions being detected, obtain the information of the application program of release and by described application journey
The information of the sensor of sequence release;
Described data link table makes a look up, it may be judged whether there is same data cell and include described answering
By information and the information of described sensor of program;
If it does not, generate a data cell, and described data cell is added in described data link table,
Wherein, described data cell includes: the information of described application program, the information of described sensor and number of times
Value, and, described time numerical value is set to-1.
Method the most according to claim 6, it is characterised in that also include:
Information and the letter of described sensor of described application program is included if there is same data cell
Breath, subtracts 1 by the secondary numerical value in described data cell;
If the secondary numerical value after subtracting 1 is equal to 0, then in described data link table, delete described data cell.
8. according to the method described in any one of claim 1-7, it is characterised in that described according to described time
Numerical value, determines the service condition of the sensor that described numerical value is corresponding, including:
When detect in following item one or more time, determine that described sensor is not by Normalization rule:
Described numerical value is more than 1;
Described numerical value is less than 0;
Described numerical value is equal to 1, and application program corresponding to described numerical value has dropped out.
Method the most according to claim 8, it is characterised in that described determine that module is additionally operable to:
After determining that described sensor is not by Normalization rule, by the biography in the data cell at described numerical value place
The information of sensor and the information of application program, be defined as information and the application program of the sensor of non-Normalization rule
Information.
10. the detection device of a sensor service condition, it is characterised in that including:
Read module, is used for reading data link table, and described data link table includes data cell, described data
Unit includes: the information of sensor, use the information of the application program of described sensor, secondary numerical value;
Acquisition module, for obtaining time numerical value in described data link table;
Determine module, for according to described numerical value, determine the use feelings of the sensor that described numerical value is corresponding
Condition.
11. devices according to claim 10, it is characterised in that also include:
Creation module, for when initializing, creates empty described data link table;
Detection module, for detecting application program to the monitoring situation of sensor or release conditions;
More new module, for according to described monitoring situation or release conditions, updates described data link table.
12. devices according to claim 11, it is characterised in that described more new module includes:
First acquiring unit, for when described monitoring situation being detected, obtains the letter of the application program monitored
The information of the sensor ceased and monitored by described application program;
First judging unit, for making a look up, it may be judged whether there is same number in described data link table
Information and the information of described sensor of described application program is included according to unit;
First signal generating unit, is used for if it does not, generate a data cell, and by described data cell
Adding in described data link table, wherein, described data cell includes: the information of described application program, institute
State information and time numerical value of sensor, and, described time numerical value is set to 1.
13. devices according to claim 12, it is characterised in that described more new module also includes:
Second acquisition unit, for including the information of described application program if there is same data cell
With the information of described sensor, obtain the secondary numerical value in described data cell;
Increasing unit, if not being negative for described numerical value, described numerical value being increased by 1.
14. devices according to claim 13, it is characterised in that described more new module also includes:
Holding unit, if for described numerical value less than 0, keeps described numerical value constant or by described
Secondary numerical value subtracts 1.
15. devices according to claim 11, it is characterised in that described more new module includes:
3rd acquiring unit, for when described release conditions being detected, obtains the letter of the application program of release
The information of the sensor ceased and discharged by described application program;
Second judging unit, for making a look up, it may be judged whether there is same number in described data link table
Information and the information of described sensor of described application program is included according to unit;
Second signal generating unit, is used for if it does not, generate a data cell, and by described data cell
Adding in described data link table, wherein, described data cell includes: the information of described application program, institute
State information and time numerical value of sensor, and, described time numerical value is set to-1.
16. devices according to claim 15, it is characterised in that described more new module also includes:
Reduce unit, for including information and the institute of described application program if there is same data cell
State the information of sensor, the secondary numerical value in described data cell is subtracted 1;
Delete unit, if the secondary numerical value after subtracting 1 is equal to 0, then in described data link table, delete institute
State data cell.
17. according to the device described in any one of claim 10-16, it is characterised in that described determine module
Specifically for:
When detect in following item one or more time, determine that described sensor is not by Normalization rule:
Described numerical value is more than 1;
Described numerical value is less than 0;
Described numerical value is equal to 1, and application program corresponding to described numerical value has dropped out.
18. devices according to claim 17, it is characterised in that described determine that module is additionally operable to:
After determining that described sensor is not by Normalization rule, by the biography in the data cell at described numerical value place
The information of sensor and the information of application program, be defined as information and the application program of the sensor of non-Normalization rule
Information.
19. 1 kinds of mobile devices, it is characterised in that including: housing, processor, memorizer, circuit board
And power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, processor and memorizer and arranges
On circuit boards;Power circuit, powers for each circuit or the device for mobile device;Memorizer is used for
Storage executable program code;Processor runs by reading the executable program code of storage in memorizer
The program corresponding with executable program code, for performing following steps:
Reading data link table, described data link table includes that data cell, described data cell include: sensing
The information of device, use the information of the application program of described sensor, secondary numerical value;
Time numerical value is obtained in described data link table;
According to described numerical value, determine the service condition of the sensor that described numerical value is corresponding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610300762.2A CN106021042B (en) | 2016-05-09 | 2016-05-09 | Method and device for detecting use condition of sensor and mobile equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610300762.2A CN106021042B (en) | 2016-05-09 | 2016-05-09 | Method and device for detecting use condition of sensor and mobile equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106021042A true CN106021042A (en) | 2016-10-12 |
CN106021042B CN106021042B (en) | 2020-01-10 |
Family
ID=57098844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610300762.2A Expired - Fee Related CN106021042B (en) | 2016-05-09 | 2016-05-09 | Method and device for detecting use condition of sensor and mobile equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106021042B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100302028A1 (en) * | 2009-05-26 | 2010-12-02 | Qualcomm Incorporated | Power management of sensors within a mobile device |
CN103324530A (en) * | 2013-06-08 | 2013-09-25 | 广东欧珀移动通信有限公司 | Calling method and device for orientation sensors of handheld mobile equipment |
CN103582093A (en) * | 2012-08-09 | 2014-02-12 | 株式会社Ntt都科摩 | Apparatus and method for energy efficient location sensing |
CN104679552A (en) * | 2013-11-26 | 2015-06-03 | 联想(新加坡)私人有限公司 | Selectively disabling sensors and associated functions |
CN104778092A (en) * | 2015-04-30 | 2015-07-15 | 南京大学 | Analyzing and detecting system aiming at Android application for energy consumption loophole of sensor |
CN105302274A (en) * | 2015-09-22 | 2016-02-03 | 广东欧珀移动通信有限公司 | Sensor control method and apparatus |
-
2016
- 2016-05-09 CN CN201610300762.2A patent/CN106021042B/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100302028A1 (en) * | 2009-05-26 | 2010-12-02 | Qualcomm Incorporated | Power management of sensors within a mobile device |
CN103582093A (en) * | 2012-08-09 | 2014-02-12 | 株式会社Ntt都科摩 | Apparatus and method for energy efficient location sensing |
CN103324530A (en) * | 2013-06-08 | 2013-09-25 | 广东欧珀移动通信有限公司 | Calling method and device for orientation sensors of handheld mobile equipment |
CN104679552A (en) * | 2013-11-26 | 2015-06-03 | 联想(新加坡)私人有限公司 | Selectively disabling sensors and associated functions |
CN104778092A (en) * | 2015-04-30 | 2015-07-15 | 南京大学 | Analyzing and detecting system aiming at Android application for energy consumption loophole of sensor |
CN105302274A (en) * | 2015-09-22 | 2016-02-03 | 广东欧珀移动通信有限公司 | Sensor control method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN106021042B (en) | 2020-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10692242B1 (en) | Vehicle analysis platform | |
KR100951423B1 (en) | Tag reader | |
US10536867B2 (en) | On-device behavioral analysis to detect malfunction due to RF interference | |
CN103971056B (en) | A kind ofly prevent the unloaded method and apparatus of application program in operating system | |
CN110837457B (en) | Task management method and device, electronic equipment and storage medium | |
CN105138529A (en) | Connected vehicle predictive quality | |
CN108197476B (en) | Vulnerability detection method and device for intelligent terminal equipment | |
CN106502880A (en) | A kind of memory overflow adjustment method and device | |
CN109766697A (en) | Vulnerability scanning method, storage medium, equipment and system applied to linux system | |
CN109688030A (en) | Message detecting method, device, equipment and storage medium | |
CN104008341A (en) | Safety protection reminding method and device | |
CN104268472A (en) | Method and device for restoring address of function modified by third party dynamic link library | |
CN104657661A (en) | Method and device for detecting malicious code in mobile terminal | |
Moon et al. | Drowsy driving warning system based on gs1 standards with machine learning | |
CN107085532B (en) | task monitoring method and device | |
CN106021042A (en) | A sensor using condition detection method and device and a mobile apparatus | |
KR101509753B1 (en) | Apparatus and method for inspecting vehicle | |
CN106709330B (en) | Method and device for recording file execution behaviors | |
CN108108258B (en) | Memory leak repairing method and device | |
CN110570149A (en) | material management and control method, material management and control device and terminal equipment | |
KR101633490B1 (en) | Apparatus and Method for User Interface to Check Details of Sensitive Data Usage on Mobile Device | |
CN104008336A (en) | ShellCode detecting method and device | |
CN104392167A (en) | Method and device for privacy information detection warning and terminal | |
CN113269106A (en) | Method and device for detecting state of conveyor belt of conveying tool | |
CN104462966B (en) | The detection method and device that leak threatens are triggered in PDF |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523859 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200110 |