CN106851802A - Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm - Google Patents
Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm Download PDFInfo
- Publication number
- CN106851802A CN106851802A CN201710063282.3A CN201710063282A CN106851802A CN 106851802 A CN106851802 A CN 106851802A CN 201710063282 A CN201710063282 A CN 201710063282A CN 106851802 A CN106851802 A CN 106851802A
- Authority
- CN
- China
- Prior art keywords
- integration period
- ambient light
- light sensor
- proximity transducer
- poll rate
- 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
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000010354 integration Effects 0.000 claims abstract description 261
- 238000001514 detection method Methods 0.000 claims description 5
- 230000005055 memory storage Effects 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000003287 optical effect Effects 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 238000003860 storage Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 206010048669 Terminal state Diseases 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 210000004209 hair Anatomy 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000035807 sensation Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
- H04W52/0287—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level changing the clock frequency of a controller in the equipment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Abstract
The embodiment of the invention discloses a kind of method of the poll rate for adjusting dynamic thresholding algorithm, device and mobile terminal, field of terminal technology is applied to, the method includes:Proximity transducer is opened, the integration period of the proximity transducer is obtained;The integration period of ambient light sensor is obtained, and compares the integration period of the proximity transducer and the size of the integration period of the ambient light sensor;By the poll rate of dynamic thresholding algorithm, the maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor is adjusted to.The embodiment of the present invention can improve the flexibility of poll rate setting, it is ensured that promptness and validity that sensing data is obtained, so as to improve the overall fluency of machine operation.
Description
Technical field
The invention belongs to field of terminal technology, more particularly to a kind of poll rate for adjusting dynamic thresholding algorithm method and
Mobile terminal.
Background technology
The development of Internet technology and electronic technology, promotes the intelligent mobile terminals such as smart mobile phone, panel computer in people
Live in popularization.It is essential in mobile terminal to be mounted with various kinds of sensors in order to realize various functions, such as:Gravity
Sensor, proximity transducer, ambient light sensor etc..Each sensor would generally determine threshold values using dynamic thresholding algorithm.With
As a example by proximity transducer, dynamic thresholding algorithm is exactly to read current proximity values, is then superimposed on the basis of this value again
Constant, as upper limit threshold value.Now, the poll time for reading proximity values is just very crucial, if the ratio for reading is very fast, then connect
Close values are not updated also, and threshold values is set just without what meaning, if that reads is slow again, then can not quickly respond.
In the prior art, above-mentioned poll time is typically set according to default poll rate.So when proximity transducer needs and it
When his sensor is used cooperatively, above-mentioned poll time method to set up, it is impossible to compatible with multiple sensors, neatly according to application ring
Dynamic adjustment is done in the change in border, and this results in the application that some need the parameter sensing that multiple sensors are gathered effectively to run
Program cannot obtain timely responding to for multiple sensors, so as to the problem of run-time error occur, and then influence the whole of machine operation
Body fluency.
The content of the invention
The present invention provides the method and mobile terminal of a kind of poll rate for adjusting dynamic thresholding algorithm, it is intended to solve existing
Poll time method to set up lack flexibility, influence machine operation overall fluency problem.
Embodiment of the present invention first aspect provides a kind of method of the poll rate for adjusting dynamic thresholding algorithm, including:
Proximity transducer is opened, the integration period of the proximity transducer is obtained;Obtain the integration week of ambient light sensor
Phase, and compare the integration period of the proximity transducer and the size of the integration period of the ambient light sensor;By dynamic valve
The poll rate of value-based algorithm, is adjusted in the integration period of the proximity transducer and the integration period of the ambient light sensor
The maximum.
Embodiment of the present invention second aspect provides a kind of mobile terminal, including:
Control module, for opening proximity transducer;Acquisition module, the integration week for obtaining the proximity transducer
Phase, and obtain the integration period of ambient light sensor;Comparison module, for compare the integration period of the proximity transducer with
The size of the integration period of the ambient light sensor;Adjusting module, for by the poll rate of dynamic thresholding algorithm, being adjusted to
The maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor.
The embodiment of the present invention third aspect provides a kind of mobile terminal, including:
Memory and processor;The memory storage has executable program code;Described in being coupled with the memory
Processor, calls the executable program code stored in the memory, performs as embodiment of the present invention first aspect is carried
The method of the poll rate of the adjustment dynamic thresholding algorithm of confession.
Knowable to the embodiments of the present invention, the poll rate and movement of the adjustment dynamic thresholding algorithm that the present invention is provided
Terminal, by when proximity transducer is opened, obtaining the integration period of proximity transducer and the integration week of ambient light sensor
Phase, then by the poll rate of dynamic thresholding algorithm, it is adjusted to the integration period of proximity transducer and the product of ambient light sensor
The maximum divided in the cycle, while having taken into account the poll time demand of proximity transducer and ambient light sensor, therefore has more
Flexibility, timely responds to so as to can ensure that each sensor can be made to upper level applications, and is returned to upper level applications
Effective sensing data, and then the overall fluency of machine operation can be improved.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention.
Fig. 1 is that the method for the poll rate of the adjustment dynamic thresholding algorithm that first embodiment of the invention is provided realizes flow
Schematic diagram;
Fig. 2 is that the method for the poll rate of the adjustment dynamic thresholding algorithm that second embodiment of the invention is provided realizes flow
Schematic diagram;
Fig. 3 is the structural representation of the mobile terminal that third embodiment of the invention is provided;
Fig. 4 is the structural representation of the mobile terminal that fourth embodiment of the invention is provided;
Fig. 5 shows a kind of mobile terminal hardware structure diagram.
Specific embodiment
To enable that goal of the invention of the invention, feature, advantage are more obvious and understandable, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described reality
It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the art
The every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Refer to Fig. 1, the method for the poll rate of the adjustment dynamic thresholding algorithm that Fig. 1 is provided for first embodiment of the invention
Realize schematic flow sheet, the method can be applied in mobile terminal, mobile terminal include smart mobile phone, panel computer, notes
The electronic data-processing equipment that this computer etc. can be used in movement.The method is mainly included the following steps that:
S101, unlatching proximity transducer, obtain the integration period of proximity transducer;
In response to the open command for opening proximity transducer, proximity transducer is opened.Wherein, the open command can be by
Certain needs to be sent using the application program of proximity transducer.The integration period of the proximity transducer, refers to that proximity transducer is adopted
The update cycle close to data of collection, for example:If the integration period of proximity transducer is 100ms (millisecond), every 100ms,
Can just be updated once close to data.
S102, the integration period for obtaining ambient light sensor, and relatively the integration period of sensor is passed with ambient light
The size of the integration period of sensor;
The integration period of ambient light sensor, refers to that the ambient light data of collection is reported upper strata by ambient light sensor
Each application program reports speed.
S103, the poll rate by dynamic thresholding algorithm, are adjusted to the integration period and ambient light sensing of proximity transducer
The maximum in the integration period of device.
Specifically, the integration period of the current proximity transducer for obtaining is entered with the integration period of current environment optical sensor
Row compares, if the integration period of the integration period more than current environment optical sensor of current proximity transducer, by dynamic thresholding
The poll rate of algorithm is adjusted to the integration period of current proximity transducer;If the integration period of current proximity transducer is less than working as
The integration period of preceding ambient light sensor, then the poll rate of dynamic thresholding algorithm is adjusted to the product of current environment optical sensor
Divide the cycle.
For example, the integration period of current proximity transducer is obtained, it is assumed that be 100ms.Then, current environment light is obtained
The integration period of sensor.If the integration period of current application enabled context optical sensor is more than the integration week of proximity transducer
Phase, for example 200ms, then the poll rate of dynamic thresholding algorithm is just adjusted to the integration period of ambient light sensor
200ms, so it is also ensured that proximity transducer data have renewal certainly.If the ambient light sensor that current application is enabled
Integration period is less than the integration period of proximity transducer, for example 50ms, then just by the poll rate of dynamic thresholding algorithm
It is adjusted to the integration period 100ms of proximity transducer.
In the embodiment of the present invention, by when proximity transducer is opened, obtaining the integration period and ring of proximity transducer
The integration period of border optical sensor, then by the poll rate of dynamic thresholding algorithm, is adjusted to the integration period of proximity transducer
With the maximum in the integration period of ambient light sensor, while when having taken into account the poll of proximity transducer and ambient light sensor
Between demand, therefore with more flexibility, timely responded to so as to can ensure that each sensor can be made to upper level applications, and to
Upper level applications return to effective sensing data, and then can improve the overall fluency of machine operation.
Refer to Fig. 2, the method for the poll rate of the adjustment dynamic thresholding algorithm that Fig. 2 is provided for second embodiment of the invention
Realize schematic flow sheet, the method is comprised the following steps:
S201, unlatching proximity transducer, obtain the integration period of proximity transducer;
In response to the open command for opening proximity transducer, proximity transducer is opened.Wherein, the open command can be by
Certain needs to be sent using the application program of proximity transducer.The integration period of the proximity transducer, refers to that proximity transducer is adopted
The update cycle close to data of collection, for example:If the integration period of proximity transducer is 100ms, every 100ms, close to number
According to can just update once.
S202, the integration period to ambient light sensor current application are obtained;
The integration period of ambient light sensor, refers to that the ambient light data of collection is reported upper strata by ambient light sensor
Each application program reports speed.It should be understood that in actual applications, as needed, corresponding to different application programs, ring
Border optical sensor may simultaneously using multiple different integration periods, such as automatic backlight application program is often set to
It is 200ms that 200ms reads a secondary data, i.e. its corresponding integration period, and camera application program is often set to 50ms readings
One secondary data, i.e. its corresponding integration period are 50ms.
If the integration period of S203, ambient light sensor current application is multiple, by multiple integration weeks of current application
Interim reckling as ambient light sensor integration period, if the integration period of ambient light sensor current application be one
It is individual, then using the integration period of current application as ambient light sensor integration period;
It should be understood that when the integration period of ambient light sensor current application is for multiple, i.e., currently having multiple applications
When program needs ambient light sensor to report ambient light data, then take reckling therein, i.e., faster that, as ambient light
The integration period of sensor.
The size of the integration period of S204, relatively sensor and the integration period of ambient light sensor;
Specifically, the relatively size of the integration period of the integration period of sensor and ambient light sensor, determines it
In the maximum.
Whether the maximum in the integration period of S205, the integration period for judging proximity transducer and ambient light sensor is big
In or equal to default poll rate size;
If the integration period of proximity transducer is more than or equal in advance with the maximum in the integration period of ambient light sensor
If poll rate, then step S206 is performed;Otherwise, step S207 is performed.
S206, the poll rate of dynamic thresholding algorithm is adjusted to default poll rate;
If the integration period of proximity transducer is more than or equal in advance with the maximum in the integration period of ambient light sensor
If poll rate, then the poll rate of dynamic thresholding algorithm is adjusted to default poll rate.
S207, the poll rate by dynamic thresholding algorithm, are adjusted to the integration period and ambient light sensing of proximity transducer
The maximum in the integration period of device;
If the integration period of proximity transducer is less than default poll with the maximum in the integration period of ambient light sensor
Speed, then by the poll rate of dynamic thresholding algorithm, be adjusted to the integration period of proximity transducer and the product of ambient light sensor
The maximum divided in the cycle.
Further, after the poll rate of dynamic thresholding algorithm to be adjusted to default poll rate, will be greater than presetting
The integration period of the ambient light sensor of poll rate, is adjusted to default poll rate.That is, if ambient light sensor current application
Multiple integration periods in there is the partial integration cycle to be more than default poll rate, then the partial integration cycle is also reduced to default
Poll rate.
Like this, by setting higher limit of the default poll rate as the poll rate of dynamic thresholding algorithm, Ke Yibao
Card proximity transducer is timely responded to, it is preferred that to read 4 secondary datas in maximum no more than 250ms, i.e. 1s at least (second).
Meanwhile, in order to ensure close to sensing data and light sensation data be it is effective it is updated after data, then by ambient light sensor
Integration period be also reduced to default poll rate, such as:The condition of 4 times can be met.
S208, when detect it is in need be applied to ambient light sensor application program launching when, by ambient light sensor
Reckling in multiple integration periods of current application as ambient light sensor integration period.
It should be understood that mobile terminal is during operation, some applications can every now and then be started according to the operation of user
Program.When having detected application program and being activated, detect whether the application program needs to be applied to ambient light sensor, if should
Application program needs to be applied to ambient light sensor, then in redefining multiple integration periods of ambient light sensor current application
Reckling, and as the integration period of ambient light sensor, then perform step S204.Wherein, current application is more
Individual integration period includes the corresponding ambient light sensor integration period of application program for starting.
Optionally, in other embodiments of the invention, when detecting the application for being applied to ambient light sensor in need
During stop, using the reckling in multiple integration periods of ambient light sensor current residual application as ambient light sensor
Integration period.
It should be understood that mobile terminal is during operation, some application programs can every now and then or be periodically closed.Work as inspection
When having measured application program and being closed, detect whether the application program needs to be applied to ambient light sensor, if the application program
Need to be applied to ambient light sensor, then redefine in multiple integration periods of ambient light sensor current residual application most
Small person, and as the integration period of ambient light sensor, then perform step S204.Wherein, current residual application is more
Do not include the corresponding ambient light sensor integration period of application program closed in individual integration period.
Like this, detect it is in need be applied to ambient light sensor application program launching when, or, detecting
It is in need be applied to ambient light sensor closing application program when, in time according to ambient light sensor current application integration week
The change of phase, the poll rate of adjust automatically dynamic thresholding algorithm can further improve the flexibility of poll rate setting, go forward side by side
One step ensure each sensor can in time, effectively pass sensing data back.
Optionally, in other embodiments of the invention, by the integration period of proximity transducer and the product of ambient light sensor
After dividing the cycle to be compared, also include:If the integration period of proximity transducer is equal with the integration period of ambient light sensor
And less than default poll rate, then by the poll rate of dynamic thresholding algorithm, it is adjusted to the integration period and ring of proximity transducer
Any one of integration period of border optical sensor.
Further, by the poll rate of dynamic thresholding algorithm, the integration period and environment of proximity transducer are adjusted to
Before any one of integration period of optical sensor, the relatively integration of the integration period of sensor or ambient light sensor
The size of cycle and default poll rate;If the integration period of the integration period of proximity transducer or ambient light sensor is less than pre-
If poll rate, then perform the poll rate of dynamic thresholding algorithm, be adjusted to the integration period and ambient light of proximity transducer
The step of any one of integration period of sensor;If the integration week of the integration period of proximity transducer or ambient light sensor
Phase is more than or equal to default poll rate, then by the poll rate of dynamic thresholding algorithm, be adjusted to default poll rate.
In the embodiment of the present invention, by when proximity transducer is opened, obtaining the integration period and ring of proximity transducer
The integration period of border optical sensor, then by the poll rate of dynamic thresholding algorithm, is adjusted to the integration period of proximity transducer
With the maximum in the integration period of ambient light sensor, while when having taken into account the poll of proximity transducer and ambient light sensor
Between demand, therefore with more flexibility, timely responded to so as to can ensure that each sensor can be made to upper level applications, and to
Upper level applications return to effective sensing data, and then can improve the overall fluency of machine operation.
Fig. 3 is referred to, Fig. 3 is the structural representation of the mobile terminal that fourth embodiment of the invention is provided, for the ease of saying
It is bright, illustrate only the part related to the embodiment of the present invention.The mobile terminal of Fig. 3 examples can be real shown in earlier figures 1 and Fig. 2
The executive agent of the method for the poll rate of the adjustment dynamic thresholding algorithm of example offer is provided.The mobile terminal of Fig. 3 examples, main bag
Include:Control module 301, acquisition module 302, comparison module 303 and adjusting module 304.Each functional module is described in detail above
It is as follows:
Wherein, control module 301, for opening proximity transducer;
Acquisition module 302, the integration period for obtaining the proximity transducer, and obtain the integration of ambient light sensor
Cycle;
Comparison module 303, for comparing the integration period of the proximity transducer and the integration period of the ambient light sensor
Size;
Adjusting module 304, for by the poll rate of dynamic thresholding algorithm, being adjusted to the integration period of the proximity transducer
With the maximum in the integration period of the ambient light sensor.
Specifically, acquisition module 302, in response to the open command for opening proximity transducer, opens proximity transducer,
And obtain the integration period of the proximity transducer, and the integration period for obtaining ambient light sensor.Then, comparison module is triggered
303 sizes for comparing the integration period of the proximity transducer and the integration period of the ambient light sensor.Then, triggering adjustment mould
The poll rate of dynamic thresholding algorithm is adjusted to the integration period and the ambient light sensor of the proximity transducer by block 304
The maximum in integration period.
The present embodiment details not to the greatest extent, refers to the description of foregoing embodiment illustrated in fig. 1, and here is omitted.
It should be noted that in the implementation method of the mobile terminal of figure 3 above example, the division of each functional module is only to lift
Example explanation, can as needed in practical application, such as the convenient consideration of the realization of the configuration requirement or software of corresponding hardware,
And above-mentioned functions distribution is completed by different functional module, will the internal structure of mobile terminal be divided into different function moulds
Block, to complete all or part of function described above.And, in practical application, the corresponding function mould in the present embodiment
Block can be realized by corresponding hardware, it is also possible to perform corresponding software by corresponding hardware and complete.What this specification was provided
Each embodiment can all apply foregoing description principle, below repeat no more.
In the embodiment of the present invention, by when proximity transducer is opened, obtaining the integration period and ring of proximity transducer
The integration period of border optical sensor, then by the poll rate of dynamic thresholding algorithm, is adjusted to the integration period of proximity transducer
With the maximum in the integration period of ambient light sensor, while when having taken into account the poll of proximity transducer and ambient light sensor
Between demand, therefore with more flexibility, timely responded to so as to can ensure that each sensor can be made to upper level applications, and to
Upper level applications return to effective sensing data, and then can improve the overall fluency of machine operation.
Refer to Fig. 4, the structural representation of the mobile terminal that fifth embodiment of the invention is provided, for convenience of description, only
Show the part related to the embodiment of the present invention.The mobile terminal of Fig. 4 examples can be earlier figures 1 and embodiment illustrated in fig. 2
The executive agent of the method for the poll rate of the adjustment dynamic thresholding algorithm of offer.The mobile terminal of Fig. 4 examples, and shown in Fig. 3
The difference of the mobile terminal in embodiment is essentially consisted in:
Further, acquisition module 302, obtain specifically for the integration period to the ambient light sensor current application
Take, if the integration period of the ambient light sensor current application for multiple, by multiple integration periods of current application most
Small person as the ambient light sensor integration period, and if the ambient light sensor current application integration period be one
It is individual, then using the integration period of current application as the ambient light sensor integration period.
Further, the mobile terminal, also includes:
Judge module 401, for judging the integration period of the proximity transducer and the integration period of the ambient light sensor
In the maximum whether more than or equal to default poll rate size;
Adjusting module 304, if being additionally operable to the maximum more than or equal to the default poll rate, the poll rate is adjusted
Whole is the default poll rate, and if the maximum value be less than the default poll rate, by the dynamic thresholding algorithm
Poll rate, is adjusted to the maximum in the integration period of the integration period of the proximity transducer and the ambient light sensor;
Adjusting module 304, is additionally operable to after the poll rate is adjusted into the default poll rate, will be greater than this and presets
The integration period of the ambient light sensor of poll rate, is adjusted to the default poll rate.
Further, the mobile terminal, also includes:
Detection module 402, for detecting whether the application program launching for being applied to the ambient light sensor in need, and work as
Detect it is in need be applied to the ambient light sensor application program launching when, by many of the ambient light sensor current application
Reckling in individual integration period as the ambient light sensor integration period, and triggering comparison module 303 compares this and connects
The integration period of nearly sensor and the size of the integration period of the ambient light sensor;
Detection module 403, is additionally operable to detect whether the closing application program for being applied to the ambient light sensor in need, and
When detect it is in need be applied to the ambient light sensor closing application program when, by the ambient light sensor current residual should
Reckling in multiple integration periods as the ambient light sensor integration period, and triggering comparison module 303 compares
Compared with the size of the integration period of the integration period and the ambient light sensor of the proximity transducer.
Optionally, comparison module 303 enters by the integration period of proximity transducer with the integration period of ambient light sensor
After row compares, if the integration period of proximity transducer is equal with the integration period of ambient light sensor and less than default poll speed
Rate, then by the poll rate of dynamic thresholding algorithm, be adjusted to the integration period of proximity transducer and the integration of ambient light sensor
Any one of cycle.
Specifically, comparison module 303 is adjusted to the integration week of proximity transducer by the poll rate of dynamic thresholding algorithm
Before any one of integration period of phase and ambient light sensor, triggering judge module 401 judges the integration of proximity transducer
Whether the integration period of cycle or ambient light sensor is more than or equal to the size for presetting poll rate;If the product of proximity transducer
Divide the integration period of cycle or ambient light sensor to be less than default poll rate, then trigger adjusting module 304 and calculate dynamic thresholding
The poll rate of method, is adjusted to any one of the integration period of proximity transducer and the integration period of ambient light sensor;If
The integration period of proximity transducer or the integration period of ambient light sensor are more than or equal to default poll rate, then triggering adjustment
The poll rate of dynamic thresholding algorithm is adjusted to default poll rate by module 304.
The present embodiment details not to the greatest extent, refers to the description of earlier figures 1 and embodiment illustrated in fig. 2, and here is omitted.
In the embodiment of the present invention, by when proximity transducer is opened, obtaining the integration period and ring of proximity transducer
The integration period of border optical sensor, then by the poll rate of dynamic thresholding algorithm, is adjusted to the integration period of proximity transducer
With the maximum in the integration period of ambient light sensor, while when having taken into account the poll of proximity transducer and ambient light sensor
Between demand, therefore with more flexibility, timely responded to so as to can ensure that each sensor can be made to upper level applications, and to
Upper level applications return to effective sensing data, and then can improve the overall fluency of machine operation.
Fig. 5 is referred to, Fig. 5 is the method for the poll rate for performing adjustment dynamic thresholding algorithm provided in an embodiment of the present invention
Mobile terminal structure schematic diagram.
Mobile terminal described in the present embodiment, including:
At least one input equipment 51;At least one output equipment 52;At least one processor 53, such as center treatment
Device;And, memory 54.
Above-mentioned input equipment 51, output equipment 52, processor 53 and memory 54 are connected by bus 55.
Wherein, input equipment 51 concretely camera, contact panel, physical button or mouse etc..Output equipment
52 concretely display screens.
Memory 54 can be high random access memory body (RAM, Random Access Memory) memory, also may be used
It is non-labile memory (non-volatile memory), such as magnetic disk storage.Memory 54 is used for one group of storage can
Configuration processor code, processor 53 is coupled with memory 54, and above-mentioned input equipment 51, output equipment 52 and processor 53 are used to adjust
With the executable program code stored in memory 54, following operation is performed:
The code is performed by processor 53, the adjustment dynamic valve as described in earlier figures 2 and embodiment illustrated in fig. 3 is performed
The method of the poll rate of value-based algorithm.
Specifically, that is, perform and open proximity transducer, obtain the integration period of the proximity transducer;Obtain ambient light sensing
The integration period of device, and compare the size of the integration period of the proximity transducer and the integration period of the ambient light sensor;Will
The poll rate of dynamic thresholding algorithm, is adjusted to the integration period of the proximity transducer and the integration period of the ambient light sensor
In the maximum.
Further, processor 53 performs the integration period for obtaining ambient light sensor, including:To the ambient light sensor
The integration period of current application is obtained;If the integration period of the ambient light sensor current application is multiple, will be current
Application multiple integration periods in reckling as the ambient light sensor integration period;If the ambient light sensor is current
The integration period of application be one, then using the integration period of current application as the ambient light sensor integration period.
Further, processor 53 is performed the poll rate of dynamic thresholding algorithm, is adjusted to the product of the proximity transducer
Before the maximum divided in the integration period of cycle and the ambient light sensor, also include:Judge the integration of the proximity transducer
Whether the maximum in the integration period of cycle and the ambient light sensor is more than or equal to the size for presetting poll rate;If should
The maximum is more than or equal to the default poll rate, then the poll rate is adjusted into the default poll rate;If the maximum
Value be less than the default poll rate, then perform this by the poll rate of dynamic thresholding algorithm, be adjusted to the proximity transducer
The step of the maximum in the integration period of integration period and the ambient light sensor.
Further, processor 53 performs and the poll rate is adjusted to after the default poll rate, also includes:Will be big
In the integration period of the ambient light sensor of the default poll rate, the default poll rate is adjusted to.
Further, processor 53 is performed the poll rate of dynamic thresholding algorithm, is adjusted to the product of the proximity transducer
After the maximum divided in the integration period of cycle and the ambient light sensor, also include:In need this is applied to when detecting
During the application program launching of ambient light sensor, by the reckling in multiple integration periods of the ambient light sensor current application
As the integration period of the ambient light sensor;Perform the integration period and the ambient light sensor that compare the proximity transducer
Integration period size the step of.
Further, processor 53 is performed the poll rate of dynamic thresholding algorithm, is adjusted to the product of the proximity transducer
After the maximum divided in the integration period of cycle and the ambient light sensor, also include:In need this is applied to when detecting
During the closing application program of ambient light sensor, by multiple integration periods of the ambient light sensor current residual application most
Small person as the ambient light sensor integration period;The integration period for comparing the proximity transducer is performed to be passed with the ambient light
The step of size of the integration period of sensor.
In multiple embodiments provided herein, it should be understood that disclosed mobile terminal and method, Ke Yitong
Other modes are crossed to realize.For example, embodiments described above is only schematical, for example, the division of the module, only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple module or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed
Coupling each other or direct-coupling or communication linkage can be by some interfaces, the INDIRECT COUPLING or communication chain of module
Connect, can be electrical, mechanical or other forms.
The module that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as module
The part for showing can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple
On mixed-media network modules mixed-media.Some or all of module therein can be according to the actual needs selected to realize the mesh of this embodiment scheme
's.
In addition, during each functional module in each embodiment of the invention can be integrated in a processing module, it is also possible to
It is that modules are individually physically present, it is also possible to which two or more modules are integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated module is to realize in the form of software function module and as independent production marketing or use
When, can store in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part for being contributed to prior art in other words or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are used to so that a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
It should be noted that for foregoing each method embodiment, in order to simplicity is described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention not by described by sequence of movement limited because
According to the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs
Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion described in detail in certain embodiment
Point, may refer to the associated description of other embodiments.
It is more than the method for poll rate to adjustment dynamic thresholding algorithm provided by the present invention and retouching for mobile terminal
State, for those of ordinary skill in the art, according to the thought of the embodiment of the present invention, in specific embodiments and applications
Will change, to sum up, this specification content should not be construed as limiting the invention.
Claims (11)
1. it is a kind of adjust dynamic thresholding algorithm poll rate method, it is characterised in that methods described includes:
Proximity transducer is opened, the integration period of the proximity transducer is obtained;
The integration period of ambient light sensor is obtained, and compares the integration period and the ambient light sensing of the proximity transducer
The size of the integration period of device;
By the poll rate of dynamic thresholding algorithm, the integration period and the ambient light sensor of the proximity transducer are adjusted to
Integration period in the maximum.
2. method according to claim 1, it is characterised in that the integration period of the acquisition ambient light sensor, including:
Integration period to the ambient light sensor current application is obtained;
If the integration period of the ambient light sensor current application is multiple, by multiple integration periods of current application
Reckling as the ambient light sensor integration period;
If the integration period of the ambient light sensor current application is one, using the integration period of current application as described
The integration period of ambient light sensor.
3. method according to claim 1, it is characterised in that the poll rate by dynamic thresholding algorithm, is adjusted to
Before the maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor, also include:
Judge whether the maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor is big
In or equal to default poll rate size;
If described the maximum is more than or equal to the default poll rate, the poll rate is adjusted to the default poll
Speed;
If the value of described the maximum is less than the default poll rate, the poll rate by dynamic thresholding algorithm is performed,
The step of the maximum being adjusted in the integration period of the proximity transducer and the integration period of the ambient light sensor.
4. method according to claim 3, it is characterised in that described that the poll rate is adjusted to the default poll
After speed, also include:
The integration period of the ambient light sensor of the default poll rate is will be greater than, the default poll speed is adjusted to
Rate.
5. method according to any one of claim 1 to 4, it is characterised in that the poll by dynamic thresholding algorithm
Speed, be adjusted to the maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor it
Afterwards, also include:
When detect it is in need be applied to the ambient light sensor application program launching when, by the ambient light sensor work as
Reckling in multiple integration periods of preceding application as the ambient light sensor integration period;
Perform the integration period and the size of the integration period of the ambient light sensor of the comparing proximity transducer
Step.
6. method according to any one of claim 1 to 4, it is characterised in that the poll by dynamic thresholding algorithm
Speed, be adjusted to the maximum in the integration period of the proximity transducer and the integration period of the ambient light sensor it
Afterwards, also include:
When detect it is in need be applied to the ambient light sensor closing application program when, by the ambient light sensor work as
Reckling in multiple integration periods of preceding remaining application as the ambient light sensor integration period;
Perform the integration period and the size of the integration period of the ambient light sensor of the comparing proximity transducer
Step.
7. a kind of mobile terminal, it is characterised in that the mobile terminal includes:
Control module, for opening proximity transducer;
Acquisition module, the integration period for obtaining the proximity transducer, and obtain the integration period of ambient light sensor;
Comparison module, the integration period for comparing the proximity transducer is big with the integration period of the ambient light sensor
It is small;
Adjusting module, for by the poll rate of dynamic thresholding algorithm, being adjusted to integration period and the institute of the proximity transducer
State the maximum in the integration period of ambient light sensor.
8. mobile terminal according to claim 7, it is characterised in that
The acquisition module, obtains, if described specifically for the integration period to the ambient light sensor current application
The integration period of ambient light sensor current application for multiple, then using the reckling in multiple integration periods of current application as
The integration period of the ambient light sensor, and if the ambient light sensor current application integration period be one,
Using the integration period of current application as the ambient light sensor integration period.
9. mobile terminal according to claim 7, it is characterised in that the mobile terminal, also includes:
Judge module, for judging the integration period of the proximity transducer and the integration period of the ambient light sensor in
Whether the maximum is more than or equal to the size for presetting poll rate;
The adjusting module, if being additionally operable to described the maximum more than or equal to the default poll rate, by poll speed
Rate is adjusted to the default poll rate, and if described the maximum value be less than the default poll rate, will it is described move
The poll rate of state threshold calculation, is adjusted to the integration period of the proximity transducer and the integration week of the ambient light sensor
Interim the maximum;
The adjusting module, is additionally operable to after the poll rate is adjusted into the default poll rate, will be greater than described
The integration period of the ambient light sensor of default poll rate, is adjusted to the default poll rate.
10. the mobile terminal according to any one of claim 7 to 9, it is characterised in that the mobile terminal, also includes:
Detection module, for detecting whether the application program launching for being applied to the ambient light sensor in need, and when detection
During the application program launching for being applied to the ambient light sensor in need, by many of the ambient light sensor current application
Reckling in individual integration period and triggers the comparison module and compares institute as the integration period of the ambient light sensor
State the integration period of proximity transducer and the size of the integration period of the ambient light sensor;
The detection module, is additionally operable to detect whether the closing application program for being applied to the ambient light sensor in need, and
When detect it is in need be applied to the ambient light sensor closing application program when, the ambient light sensor is currently remained
Reckling in multiple integration periods of remaining application and triggers the comparing as the integration period of the ambient light sensor
The integration period of the module proximity transducer and the size of the integration period of the ambient light sensor.
11. a kind of mobile terminals, it is characterised in that the mobile terminal includes:
Memory and processor;
The memory storage has executable program code;
The processor coupled with the memory, calls the executable program code stored in the memory, holds
The method of the poll rate of adjustment dynamic thresholding algorithm of the row as described in claim 1 to any one of claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710063282.3A CN106851802B (en) | 2017-02-03 | 2017-02-03 | Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710063282.3A CN106851802B (en) | 2017-02-03 | 2017-02-03 | Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106851802A true CN106851802A (en) | 2017-06-13 |
CN106851802B CN106851802B (en) | 2019-09-17 |
Family
ID=59121513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710063282.3A Expired - Fee Related CN106851802B (en) | 2017-02-03 | 2017-02-03 | Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106851802B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020215337A1 (en) * | 2019-04-26 | 2020-10-29 | 西门子股份公司 | Data acquisition system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105679252A (en) * | 2016-03-01 | 2016-06-15 | 广东欧珀移动通信有限公司 | Method and system for setting backlight brightness rapidly |
CN105702230A (en) * | 2016-04-14 | 2016-06-22 | 广东欧珀移动通信有限公司 | Method and device for adjusting backlight brightness of display screen of terminal and terminal |
CN106020447A (en) * | 2016-05-05 | 2016-10-12 | 广东欧珀移动通信有限公司 | A touch-type electronic apparatus proximity sensor parameter adjusting method and system |
CN106131345A (en) * | 2016-08-29 | 2016-11-16 | 广东欧珀移动通信有限公司 | The control method of a kind of proximity transducer, device and mobile terminal |
CN106249872A (en) * | 2016-07-12 | 2016-12-21 | 广东欧珀移动通信有限公司 | The control method of a kind of proximity transducer, device and mobile terminal |
-
2017
- 2017-02-03 CN CN201710063282.3A patent/CN106851802B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105679252A (en) * | 2016-03-01 | 2016-06-15 | 广东欧珀移动通信有限公司 | Method and system for setting backlight brightness rapidly |
CN105702230A (en) * | 2016-04-14 | 2016-06-22 | 广东欧珀移动通信有限公司 | Method and device for adjusting backlight brightness of display screen of terminal and terminal |
CN106020447A (en) * | 2016-05-05 | 2016-10-12 | 广东欧珀移动通信有限公司 | A touch-type electronic apparatus proximity sensor parameter adjusting method and system |
CN106249872A (en) * | 2016-07-12 | 2016-12-21 | 广东欧珀移动通信有限公司 | The control method of a kind of proximity transducer, device and mobile terminal |
CN106131345A (en) * | 2016-08-29 | 2016-11-16 | 广东欧珀移动通信有限公司 | The control method of a kind of proximity transducer, device and mobile terminal |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020215337A1 (en) * | 2019-04-26 | 2020-10-29 | 西门子股份公司 | Data acquisition system and method |
CN113383325A (en) * | 2019-04-26 | 2021-09-10 | 西门子股份公司 | Data acquisition system and method |
US11711427B2 (en) * | 2019-04-26 | 2023-07-25 | Siemens Aktiengesellschaft | Data acquisition system and method |
Also Published As
Publication number | Publication date |
---|---|
CN106851802B (en) | 2019-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3567516B1 (en) | Method and device for detecting feature point in image, and computer-readable storage medium | |
CN109313519A (en) | Electronic equipment including force snesor | |
CN104615337B (en) | A kind of main interface icon management method and device applied to intelligent terminal | |
CN107003929A (en) | The application of machine learning on isomery nuclear equipment is characterized | |
CN106775301A (en) | The screenshot method and terminal device of a kind of terminal | |
CN106802708A (en) | The control method and device of wearable device | |
CN108510986A (en) | Voice interactive method, device, electronic equipment and computer readable storage medium | |
CN104133615B (en) | A kind of processing method of terminal screen lock interface | |
CN106682702A (en) | Deep learning method and system | |
CN108845727B (en) | Mutual capacitance type touch screen based awakening method and device | |
CN106951057A (en) | The control method and mobile terminal of application | |
EP4060551B1 (en) | Fingerprint anti-counterfeiting method and electronic device | |
CN106775193A (en) | A kind of Application Program Interface display methods and device | |
CN107577349A (en) | Man-machine interaction method and device, mobile terminal, computer-readable recording medium | |
CN110753154A (en) | Control method and device of mobile terminal, electronic equipment and storage medium | |
CN107402713A (en) | Accelerate method, apparatus, storage medium and the mobile terminal of blank screen gesture processing | |
CN107256122B (en) | Screen luminance adjustment method, device, terminal and computer readable storage medium | |
CN106453907A (en) | Control method and device for terminal application | |
CN108491142A (en) | A kind of control method of mobile terminal, mobile terminal and storage medium | |
CN106851802A (en) | Adjust the method and mobile terminal of the poll rate of dynamic thresholding algorithm | |
US20180357198A1 (en) | Method and apparatus for controlling serial peripheral interface of fingerprint sensor, and mobile terminal | |
CN110096329A (en) | A kind of display contents controlling method, electronic device and computer readable storage medium | |
CN109298809A (en) | A kind of touch action recognition methods, device and terminal device | |
CN107682909A (en) | A kind of control method and device for connecting access point | |
CN106373121A (en) | Fuzzy image identification method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong 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: 20190917 |