Summary of the invention
The technical problem to be solved in the present invention is that in view of the above drawbacks of the prior art, a kind of mobile terminal is provided
WIFI transmission power adjusting method and system.The method provided by this case, when mobile terminal receives WIFI access point signals
Transmission power will be increased by way of relatively mitigating when variation, increasing bring to avoid moment transmission power influences.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of WIFI transmission power adjusting method of mobile terminal, wherein include:
A, the WIFI transmission power of mobile terminal is classified in advance;
B, mobile terminal detects the WIFI signal intensity of WIFI access point every the first predetermined time, strong according to WIFI signal
Degree obtains corresponding mobile terminal WIFI transmission power;And the value of obtained WIFI transmission power and corresponding detection time are stabbed
It is sequentially placed into caching;
C, mobile terminal obtains detection time in caching every the second predetermined time and stabs newest WIFI transmission power value, if
For newest WIFI transmission power value;
D, the WIFI transmission power value for obtaining last setting, judges last WIFI transmission power value and newest WIFI
The size of transmission power level, when last WIFI transmission power value is greater than newest WIFI transmission power value, then by current WIFI
Transmission power level reduces level-one;It, then will be current when last WIFI transmission power value is less than newest WIFI transmission power value
WIFI transmission power value elevated by one step;When last WIFI transmission power value is equal to newest WIFI transmission power value, then will work as
Preceding WIFI transmission power value does not adjust.
The WIFI transmission power adjusting method of the mobile terminal, wherein in the step A further include:
A, WIFI signal intensity SPA and mobile terminal the WIFI hair for the WIFI access point that mobile terminal detects are preset
Penetrate the one-to-one relationship of power EPA.
The WIFI transmission power adjusting method of the mobile terminal, wherein the step B is specifically included:
B1, mobile terminal detect the WIFI signal intensity SPA of WIFI access point every the first predetermined time;
B2, corresponding mobile terminal WIFI transmission power EPA is obtained according to WIFI signal intensity SPA;
B3, the value of obtained WIFI transmission power EPA and corresponding detection time stamp are sequentially placed into caching.
The WIFI transmission power adjusting method of the mobile terminal, wherein the step C is specifically included:
C1, mobile terminal obtain detection time in caching every the second predetermined time and stab nearest WIFI transmission power EPA
Value is newest WIFI transmission power value, is set as newest WIFI transmission power value EPC.
The WIFI transmission power adjusting method of the mobile terminal, wherein the step D is specifically included:
D1, the WIFI transmission power value EPD for obtaining last setting, judge last WIFI transmission power value EPD with
The size of newest WIFI transmission power value EPC;
D2, it is greater than newest WIFI transmission power value EPC as last WIFI transmission power value EPD, then by current WIFI
Transmission power level reduces level-one EPD-1;Then EPD=EPD-1 is reset;
D3, it is less than newest WIFI transmission power value EPC as last WIFI transmission power value EPD, then by current WIFI
Then transmission power level elevated by one step EPD+1 resets EPD=EPD+1;
D4, it is equal to newest WIFI transmission power value EPC as last WIFI transmission power value EPD, then by current WIFI
Transmission power level does not adjust.
The WIFI transmission power adjusting method of the mobile terminal, wherein first predetermined time is 100 milliseconds,
Second predetermined time is 20 milliseconds.
A kind of WIFI transmission power regulating system of mobile terminal, wherein include:
WIFI transmission power grading control module, for being in advance classified the WIFI transmission power of mobile terminal;
Detection and memory module, for controlling mobile terminal every the WIFI letter of the first predetermined time detection WIFI access point
Number intensity, obtains corresponding mobile terminal WIFI transmission power according to WIFI signal intensity;And the WIFI transmission power that will be obtained
Value and corresponding detection time stamp be sequentially placed into caching;
Acquisition and setup module are stabbed most for controlling mobile terminal every detection time in the second predetermined time acquisition caching
New WIFI transmission power value is set as newest WIFI transmission power value;
WIFI transmission power adjustment module, for controlling the WIFI transmission power value for obtaining last setting, judgement upper one
The size of secondary WIFI transmission power value and newest WIFI transmission power value, when last WIFI transmission power value is greater than newest
Current WIFI transmission power value is then reduced level-one by WIFI transmission power value;When last WIFI transmission power value is less than most
New WIFI transmission power value, then by current WIFI transmission power value elevated by one step;When last WIFI transmission power value is equal to
Newest WIFI transmission power value does not then adjust current WIFI transmission power value.
The WIFI transmission power regulating system of the mobile terminal, wherein further include:
Corresponding control module, for presetting the WIFI signal intensity SPA for the WIFI access point that mobile terminal detects
With the one-to-one relationship of mobile terminal WIFI transmission power EPA.
The WIFI transmission power regulating system of the mobile terminal, wherein detection with memory module includes:
Detection unit, for control mobile terminal every the first predetermined time detection WIFI access point WIFI signal intensity
SPA;
Corresponding unit, for obtaining corresponding mobile terminal WIFI transmission power EPA according to WIFI signal intensity SPA;
Storage unit, the value of the WIFI transmission power EPA for will obtain and corresponding detection time stamp are sequentially placed into slow
In depositing.
The WIFI transmission power regulating system of the mobile terminal, wherein WIFI transmission power adjustment module includes:
Acquisition and judging unit judge last WIFI for obtaining the WIFI transmission power value EPD of last setting
The size of transmission power level EPD and newest WIFI transmission power value EPC;
WIFI transmission power first adjusts unit, for being greater than newest WIFI as last WIFI transmission power value EPD
Current WIFI transmission power value is then reduced level-one EPD-1 by transmission power level EPC;Then EPD=EPD-1 is reset;
WIFI transmission power second adjusts unit, for being less than newest WIFI as last WIFI transmission power value EPD
Then transmission power level EPC resets EPD=EPD+1 then by current WIFI transmission power value elevated by one step EPD+1;
Control unit, for being equal to newest WIFI transmission power value EPC as last WIFI transmission power value EPD, then
Current WIFI transmission power value is not adjusted;
First predetermined time is 100 milliseconds, and second predetermined time is 20 milliseconds.
The WIFI transmission power adjusting method and system of mobile terminal provided by the present invention pass through timing due to using
(100 milliseconds) obtain the corresponding WIFI transmission power EPA and timestamp TAA of current WIFI access point signals intensity store into
In caching;On the other hand, the newest WIFI transmission power EPA(, that is, EPC of timestamp in (20 milliseconds) acquisition cachings of timing), then
Whether more newest WIFI transmission power EPC is identical as the size of WIFI transmission power EPD set by the last time, if not phase
It is same then adjust WIFI transmission power.Provided WIFI transmission power adjusting method through the invention believes WIFI access point
The case where number instantaneous variation, the WIFI transmission power of mobile terminal will be adjusted in a manner of mitigation, so as to avoid the prior art
It is middle because moment increase power caused by mobile terminal power down, to the interference of other modules the problems such as.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to
It is of the invention in limiting.
Referring to Figure 1, Fig. 1 is the process of the preferred embodiment of the WIFI transmission power adjusting method of mobile terminal of the present invention
Figure.A kind of WIFI transmission power adjusting method of mobile terminal shown in FIG. 1, comprising:
Step S110, the WIFI transmission power of mobile terminal is classified in advance.
It in the embodiment of the present invention, needs first to be classified the WIFI transmission power EPA of mobile terminal, such as setting WIFI
The value of transmission power EPA is by 1~10 digital representation, and number is bigger, and the transmission power for illustrating WIFI is higher.
In the present embodiment, need to preset the WIFI signal intensity SPA of the WIFI access point that mobile terminal detects with
The one-to-one relationship of mobile terminal WIFI transmission power EPA.
Preferably, the signal strength SPA for the WIFI access point that mobile terminal detects and mobile terminal WIFI transmission power
The corresponding relationship of EPA is described in table 1 below:
Table 1
In table 1, the value of the corresponding WIFI transmission power EPA of the range of the signal strength SPA of a WIFI access point,
SPA > -10dbm, corresponding EPA=1, the present embodiment have suffered that description is convenient, and by 1~10 digital representation, number got over for the value of EPA
Illustrate that the transmission power of WIFI is higher greatly.
Step S120, mobile terminal detects the WIFI signal intensity of WIFI access point every the first predetermined time, according to
WIFI signal intensity obtains corresponding mobile terminal WIFI transmission power;And by the value of obtained WIFI transmission power and corresponding
Detection time stamp is sequentially placed into caching;
Wherein: described in connecting, setting mobile terminal detects WIFI access point every the first predetermined time (such as 100 milliseconds)
WIFI signal intensity SPA.Then corresponding mobile terminal WIFI transmission power EPA is obtained according to WIFI signal intensity SPA;Again
The value of obtained WIFI transmission power EPA and corresponding detection time stamp are sequentially placed into caching.It is transferred to step S130
Step S130, mobile terminal obtains detection time in caching every the second predetermined time and stabs newest WIFI transmitting function
Rate value is set as newest WIFI transmission power value.
This step obtains in caching every the second predetermined time (such as 20 milliseconds) in the specific implementation, using mobile terminal
Detection time stabs nearest WIFI transmission power EPA value, is newest WIFI transmission power value, is set as newest WIFI transmission power value
EPC.Then it is transferred to step S140.
Step S140, the WIFI transmission power value for obtaining last setting, judge last WIFI transmission power value with
The size of newest WIFI transmission power value then will when last WIFI transmission power value is greater than newest WIFI transmission power value
Current WIFI transmission power value reduces level-one;When last WIFI transmission power value is less than newest WIFI transmission power value, then
By current WIFI transmission power value elevated by one step;When last WIFI transmission power value is equal to newest WIFI transmission power value,
Then current WIFI transmission power value is not adjusted.
In the embodiment of the present invention, by the value (EPC) of the newest WIFI transmission power EPA of timestamp, with last time setting
WIFI transmission power EPD be compared judge whether it is identical, by adjusting the transmission power of setting WIFI if different.Preferably
Ground, the corresponding relationship of the signal strength SPA and mobile terminal WIFI transmission power EPA of the WIFI access point that mobile terminal detects
It please refers to shown in table 1.
For example, judging last WIFI transmission power value using the WIFI transmission power value EPD for obtaining last setting
The size of EPD and newest WIFI transmission power value EPC;And when last WIFI transmission power value EPD is sent out greater than newest WIFI
Performance number EPC is penetrated, then current WIFI transmission power value is reduced into level-one EPD-1;Then EPD=EPD-1 is reset;
And work as last WIFI transmission power value EPD and be less than newest WIFI transmission power value EPC, then current WIFI is sent out
Performance number elevated by one step EPD+1 is penetrated, EPD=EPD+1 is then reset;
When last WIFI transmission power value EPD is equal to newest WIFI transmission power value EPC, then current WIFI is emitted
Performance number does not adjust.
Based on the above embodiment, it does below by way of specific Application Example method of the invention and further retouches in detail
It states, as shown in Fig. 2, a kind of WIFI transmission power adjusting method concrete application embodiment of mobile terminal of the present invention, including it is following
Step:
Step S1, start second timer;
There are two timer, first timer and second timers for setting in the terminal in the embodiment of the present invention.
First timer, preferably, the timer expiry time is 100 milliseconds, which accesses for clocked flip
Point signal strength obtains the signal strength of WIFI access point.
Second timer, preferably, the timer expiry time is 20 milliseconds, which stabs newest for timing
WIFI transmission power EPA value (EPC), whether the WIFI transmission power EPD of setting identical with the last time, sets if different
Set the transmission power of WIFI).
Step S2, judge whether second timer is overtime, if time-out thens follow the steps S3, otherwise continue waiting for time-out.
Step S3, the value of the acquisition time stamp newest WIFI transmission power EPA of TAA, is described below, for convenience by this
The value of EPA is set as EPC.
Step S4, the value (EPC) of the newest WIFI transmission power EPA of timestamp and last setting in judgement caching
The size of WIFI transmission power EPD;EPD-1 then EPD=EPD- is set by WIFI transmission power if EPD is greater than EPC
1;WIFI transmission power is set EPD+1 then EPD=EPD+1 by transmission power adjustment module 500 if EPD is less than EPC;
WIFI transmission power does not make adjustments if EPD is equal to EPC.
Wherein, the value of the newest WIFI transmission power EPA of time stamp T AA comes in the caching mentioned in the step S3
It goes through, it is specific as shown in Figure 3, comprising the following steps:
Step S301, judge whether first timer is overtime, if time-out thens follow the steps S302, otherwise continue waiting for surpassing
When.
Step S302, the signal strength indication SPA of WIFI access point is obtained.
Step S303, the SPA obtained according to step S302 obtains corresponding WIFI transmitting function according to the corresponding relationship in table 1
Rate EPA.
Step S304, claim current time TAA(to timestamp above) and step S303 obtained in WIFI transmission power
EPA is stored into caching.
As it can be seen that the present invention obtains the corresponding WIFI transmitting of current WIFI access point signals intensity by (100 milliseconds) of timing
Power EPA and timestamp TAA are stored in caching;On the other hand, timestamp is newest in (20 milliseconds) acquisition cachings of timing
WIFI transmission power EPA(, that is, EPC), then compare EPC and last time set by WIFI transmission power EPD size whether phase
Together, WIFI transmission power is adjusted if not identical.Provided WIFI transmission power adjusting method through the invention, for WIFI
The case where access point signals instantaneous variation, will adjust the WIFI transmission power of mobile terminal in a manner of mitigation, so as to avoid
In the prior art because moment increase power caused by mobile terminal power down, to the interference of other modules the problems such as
Based on above method embodiment people, the present invention also provides a kind of WIFI transmission powers of mobile terminal to adjust system
System, as shown in figure 4, the system comprises:
WIFI transmission power grading control module 410, for being in advance classified the WIFI transmission power of mobile terminal;
As detailed above.
Detection and memory module 420, for controlling mobile terminal every the first predetermined time detection WIFI access point
WIFI signal intensity obtains corresponding mobile terminal WIFI transmission power according to WIFI signal intensity;And obtained WIFI is sent out
The value and corresponding detection time stamp for penetrating power are sequentially placed into caching;As detailed above.
Acquisition and setup module 430 obtain detection time in caching every the second predetermined time for controlling mobile terminal
Newest WIFI transmission power value is stabbed, newest WIFI transmission power value is set as;As detailed above.
WIFI transmission power adjustment module 440 obtains the last WIFI transmission power value being arranged for controlling, in judgement
The size of primary WIFI transmission power value and newest WIFI transmission power value, when last WIFI transmission power value is greater than most
New WIFI transmission power value, then reduce level-one for current WIFI transmission power value;When last WIFI transmission power value is less than
Newest WIFI transmission power value, then by current WIFI transmission power value elevated by one step;When last WIFI transmission power value etc.
In newest WIFI transmission power value, then current WIFI transmission power value is not adjusted;As detailed above.
Further, the WIFI transmission power regulating system of the mobile terminal, as shown in Figure 4, further includes:
Corresponding control module 450, for presetting the WIFI signal intensity for the WIFI access point that mobile terminal detects
The one-to-one relationship of SPA and mobile terminal WIFI transmission power EPA;As detailed above.
Further, the WIFI transmission power regulating system of the mobile terminal, wherein detection with memory module includes:
Detection unit, for control mobile terminal every the first predetermined time detection WIFI access point WIFI signal intensity
SPA;As detailed above.
Corresponding unit, for obtaining corresponding mobile terminal WIFI transmission power EPA according to WIFI signal intensity SPA;Tool
Body is as described above.
Storage unit, the value of the WIFI transmission power EPA for will obtain and corresponding detection time stamp are sequentially placed into slow
In depositing;As detailed above.
Further, the WIFI transmission power regulating system of the mobile terminal, wherein WIFI transmission power adjustment module
Include:
Acquisition and judging unit judge last WIFI for obtaining the WIFI transmission power value EPD of last setting
The size of transmission power level EPD and newest WIFI transmission power value EPC;As detailed above.
WIFI transmission power first adjusts unit, for being greater than newest WIFI as last WIFI transmission power value EPD
Current WIFI transmission power value is then reduced level-one EPD-1 by transmission power level EPC;Then EPD=EPD-1 is reset;Specifically such as
It is upper described.
WIFI transmission power second adjusts unit, for being less than newest WIFI as last WIFI transmission power value EPD
Then transmission power level EPC resets EPD=EPD+1 then by current WIFI transmission power value elevated by one step EPD+1;Specifically such as
It is upper described.
Control unit, for being equal to newest WIFI transmission power value EPC as last WIFI transmission power value EPD, then
Current WIFI transmission power value is not adjusted;As detailed above.
Wherein, first predetermined time is 100 milliseconds, and second predetermined time is 20 milliseconds.
In conclusion the WIFI transmission power adjusting method and system of mobile terminal provided by the present invention, due to using
The corresponding WIFI transmission power EPA of current WIFI access point signals intensity and timestamp are obtained by timing (100 milliseconds)
TAA is stored in caching;On the other hand, the newest WIFI transmission power EPA of timestamp in (20 milliseconds) acquisition cachings of timing
(i.e. EPC), then the size of WIFI transmission power EPD set by more newest WIFI transmission power EPC and last time be
It is no identical, WIFI transmission power is adjusted if not identical.Provided WIFI transmission power adjusting method through the invention, for
The case where WIFI access point signals instantaneous variation, will adjust the WIFI transmission power of mobile terminal, to keep away in a manner of mitigation
Exempted from the prior art because moment increase power caused by mobile terminal power down, to the interference of other modules the problems such as.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.