Screen control method and device
Technical field
The invention belongs to intelligent terminal technical field, more particularly to a kind of screen control method and device.
Background technology
Existing intelligent terminal is configured with protective case.Such usual join protection set of intelligent terminal carrys out the screen of control terminal
Light or extinguish.Prior art is mainly by an intelligent terminal mainboard hall device installed above and on the protective sleeve
Face installs a magnet to realize, when protective case closes, and magnet, which causes, occurs potential change inside hall device, in triggering
It is disconnected, so that screen extinguishes, equivalent to pressing power keys;When protective case away from when, again triggering interrupt so that screen is bright
Get up, equivalent to pressing power keys again.
It still is able to slightly move up and down relative to screen in order that obtaining after protective case closes, the design of protective case is often
There is certain spatial margin.However, the region of Hall sensor induced magnet is limited, when intelligent terminal is placed on by user
Inside pocket or inside bag and when walking about, it is easy to cause intelligent terminal to rock, cause screen overdue bright, so as to add intelligence
The power consumption of terminal.In view of the above-mentioned problems, prior art also use proximity transducer detect protective case away from or closer to
State, to make up the deficiency of Hall sensor.However, the sensitivity of proximity transducer is also protected covering the influence of color, it is black
The protective case of color material can absorb infrared ray, and cause that proximity transducer detects is inaccurate, also results in that screen is overdue bright to ask
Topic.
The content of the invention
In consideration of it, the embodiment of the present invention provides a kind of screen control method and device, to improve intelligent terminal control screen
The degree of accuracy lighted and extinguished.
First aspect is described applied to the intelligent terminal comprising acceleration transducer there is provided a kind of screen control method
Method includes:
Obtain the potential value of Hall sensor output;
When the potential value is less than first threshold, the output valve of proximity transducer is obtained;
Determine that the protective case that intelligent terminal is dressed is whole relative to the intelligence according to the output valve of the proximity transducer
The state of the screen at end;
When it is away from state that the protective case is relative to the state of the screen, acceleration transducer is obtained when default
Between in the range of multiple output valves;
The changing rule of multiple output valves of the acceleration transducer is determined, and according to being set the changing rule
The screen state of intelligent terminal.
Further, the multiple output valves for obtaining acceleration transducer in preset time range include:
Obtain the Y-axis component of each output valve in multiple output valves of the acceleration transducer in preset time range
Absolute value.
Further, the changing rule of the multiple output valves for determining the acceleration transducer, and become according to described
Law sets the screen state of the intelligent terminal to include:
Determine the changing rule of the absolute value of the Y-axis component;
It is to drop to 0 from the arbitrary value in the first preset range in the changing rule of the absolute value of the Y-axis component, and from
0 when rising to the arbitrary value in first preset range, and the screen of the intelligent terminal is set into bright screen state.
Further, the changing rule of the multiple output valves for determining the acceleration transducer, and become according to described
Law sets the screen state of the intelligent terminal to include:
If the changing rule of the absolute value of the Y-axis component is in the second preset range, by the intelligent terminal
Screen is set to put out screen state.
Further, first preset range is centered on gravity acceleration value and the numerical value of the first centrifugal pump of satisfaction
Scope;
Second preset range is centered on gravity acceleration value and the number range of the second centrifugal pump of satisfaction, described
First centrifugal pump is less than second centrifugal pump.
Second aspect is described applied to the intelligent terminal comprising acceleration transducer there is provided a kind of screen control device
Device includes:
First acquisition module, the potential value for obtaining Hall sensor output;
Second acquisition module, for when the potential value is less than first threshold, obtaining the output valve of proximity transducer;
State determining module, for determining the protective case that intelligent terminal is dressed according to the output valve of the proximity transducer
Relative to the state of the screen of the intelligent terminal;
3rd acquisition module, for when it is away from state that the protective case is relative to the state of the screen, obtaining and adding
Multiple output valves of the velocity sensor in preset time range;
Setup module, the changing rule of multiple output valves for determining the acceleration transducer, and become according to described
Law sets the screen state of the intelligent terminal.
Further, the 3rd acquisition module includes:
Acquiring unit, is exported for obtaining each in multiple output valves of the acceleration transducer in preset time range
The absolute value of the Y-axis component of value.
Further, the setup module includes:
Rule determining unit, the changing rule of the absolute value for determining the Y-axis component;
Bright screen unit, the changing rule for the absolute value in the Y-axis component is from any in the first preset range
Value drops to 0, and from 0 rise to first preset range in arbitrary value when, the screen of the intelligent terminal is set to
Bright screen state.
Further, the setup module also includes:
Screen unit is put out, when the changing rule for the absolute value in the Y-axis component is in the second preset range, by institute
The screen for stating intelligent terminal is set to put out screen state.
Further, first preset range is centered on gravity acceleration value and the numerical value of the first centrifugal pump of satisfaction
Scope;
Second preset range is centered on gravity acceleration value and the number range of the second centrifugal pump of satisfaction, described
First centrifugal pump is less than second centrifugal pump.
Compared with prior art, the embodiment of the present invention adds acceleration during control screen is lighted and is extinguished and passed
Sensor detects the motion state of intelligent terminal;Intelligent terminal obtains the potential value of Hall sensor output in real time;In the electricity
When gesture value is less than first threshold, the output valve of proximity transducer is obtained;Intelligence is determined according to the output valve of the proximity transducer
State of the protective case that terminal is dressed relative to the screen of the intelligent terminal;In the protective case relative to the screen
When state is away from state, multiple output valves of the acceleration transducer in preset time range are obtained;Determine the acceleration
The changing rule of multiple output valves of sensor, wherein, the changing rule of the acceleration transducer output valve has reacted intelligence
The motion state of terminal;The screen state of the intelligent terminal is set finally according to the changing rule;So as to solve protection
Because protective case is subjected to displacement or Hall sensor is sentenced caused by some distance of screen slightly away when being linked on screen
The problem of disconnected error, improve the degree of accuracy that intelligent terminal control screen is lighted and extinguished, it is to avoid intelligent terminal is inside pocket
Or the mistake bright screen inside bag.
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
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is the implementation process figure for the screen control method that the embodiment of the present invention one is provided;
Fig. 2 is the composition structure chart for the screen control device that the embodiment of the present invention two is provided.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The embodiment of the present invention adds acceleration transducer to detect intelligence during control screen is lighted and is extinguished
The motion state of terminal;Intelligent terminal obtains the potential value of Hall sensor output in real time;It is less than the first threshold in the potential value
During value, the output valve of proximity transducer is obtained;The guarantor that intelligent terminal is dressed is determined according to the output valve of the proximity transducer
State of the sheath relative to the screen of the intelligent terminal;In state of the protective case relative to the screen for away from state
When, obtain multiple output valves of the acceleration transducer in preset time range;Determine the multiple defeated of the acceleration transducer
Go out the changing rule of value, wherein, the changing rule of the acceleration transducer output valve has reacted the motion state of intelligent terminal;
The screen state of the intelligent terminal is set finally according to the changing rule;So as to solve when protection is linked on screen by
It is subjected to displacement in protective case or screen a little caused by the problem of Hall sensor judgement error, is improved slightly away
The degree of accuracy that intelligent terminal control screen is lighted and extinguished.The embodiment of the present invention additionally provides corresponding device, individually below
It is described in detail.
Embodiment one
Fig. 1 shows the implementation process of screen control method provided in an embodiment of the present invention, for convenience of description, only shows
Part related to the present invention.
In embodiments of the present invention, methods described is applied to intelligent terminal, and the intelligent terminal includes but is not limited to intelligence
Mobile phone, tablet personal computer etc..The intelligent terminal has dressed protective case.Magnet, the corresponding intelligence are provided with the protective case
Hall sensor can be provided with terminal, for detecting the magnetic field intensity that magnet is produced.The present invention is relative previously according to protective case
State of the protective case relative to screen has been divided in the different distance of screen, including away from state and proximity state, different conditions
The potential value that the magnetic field intensity that lower Hall sensor is detected is produced is different.It is also provided with approaching sensing on the intelligent terminal
Device.Similarly, infrared energy that the protective case that proximity transducer is detected under different conditions is reflected is different, according to connecing
The size for the infrared energy value that the protective case that nearly sensor is detected is reflected also can determine that the protective case relative to
The state of screen.The embodiment of the present invention determines whether to open by obtaining the size for the potential value that Hall sensor is detected first
The dynamic flow for judging screen state;Then the infrared energy that the protective case detected again by proximity transducer is reflected
Size determines state of the protective case relative to intelligent terminal screen.Further, in embodiments of the present invention, the intelligence
Acceleration transducer can be also provided with terminal, with it is determined that determining intelligence by the acceleration transducer again after screen state
The motion state of energy terminal.
As shown in figure 1, methods described includes:
In step S101, the potential value of Hall sensor output is obtained.
In embodiments of the present invention, intelligent terminal obtains the potential value that the Hall sensor is detected in real time.Work as protection
When set is close to screen, the potential value that the Hall sensor is detected is larger;When the protective case is away from screen, the Hall
The potential value that sensor is detected is smaller.
In step s 102, when the potential value is less than first threshold, the output valve of proximity transducer is obtained.
It is of the invention to have counted user in advance and open going out for Hall sensor is detected when protective case lights screen potential value
Existing probability, first threshold is provided with according to the probability, and the first threshold is used to judge that protective case is current relative to screen
Whether distance, which is enough to trigger intelligent terminal, is lighted screen.The potential value detected in Hall sensor is less than the first threshold
When, generally show protective case away from the intelligent terminal screen, it is also possible to being detection of the Hall sensor to magnet
Detection mistake caused by region is limited.In order to solve this detection mistake, the embodiment of the present invention continues to obtain described close to sensing
The output valve of device, to further determine that the relative state with screen of protective case.
In step s 103, determine that the protective case that intelligent terminal is dressed is relative according to the output valve of the proximity transducer
In the state of the screen of the intelligent terminal.
In embodiments of the present invention, the protective case includes away from state and proximity state relative to the state of screen.Institute
State proximity transducer and launch infrared light to protective case, and reception and output protection put the infrared light reflected, it is received
The size of the infrared energy reflected to have reacted protective case relative to the screen of intelligent terminal be away from state or connecing
Nearly state.When the infrared energy reflected received is bigger, show protective case closer to screen;Otherwise, receive
The infrared energy reflected is smaller, shows protective case further away from screen.Preferably, one can be pre-set close to threshold value and remote
From threshold value;When the proximity transducer output valve be more than it is default close to threshold value when, determine the protective case relative to described
The state of screen is proximity state;Otherwise, when the output valve of the proximity transducer is less than default remote threshold value, institute is determined
It is away from state that protective case, which is stated, relative to the state of the screen.
In step S104, when it is away from state that the protective case is relative to the state of the screen, acceleration is obtained
Multiple output valves of the sensor in preset time range.
Prior art directly lights intelligent terminal after state of the protective case relative to screen is got for away from state
Screen.In contrast to this, the present invention is when it is determined that the relative state with screen of protective case is away from state, and continuation, which is obtained, to be accelerated
Multiple output valves of the sensor in preset time range are spent, intelligence is judged by multiple output valves of the acceleration transducer
Can the current motion state of terminal.Exemplarily, the preset time range can be 1 second, 2 seconds etc., and its size is according to actually making
Determined with situation.Preferably, the step S104 also includes:
Obtain the Y-axis component of each output valve in multiple output valves of the acceleration transducer in preset time range
Absolute value.
In step S105, the changing rule of multiple output valves of the acceleration transducer is determined, and become according to described
Law sets the screen state of the intelligent terminal.
When intelligent terminal is placed on inside pocket due to user or is walked about inside bag, intelligent terminal can be rocked and then, be held
Easily cause the movement of protective case relative to screen up and down.The embodiment of the present invention preferably detects intelligence by acceleration transducer
Can terminal motion state, and screen is set according to the changing rule of the absolute value of Y-axis component in acceleration transducer output valve
Curtain is bright screen or puts out screen state, and therefore, step S105 is specifically included:
Determine the changing rule of the absolute value of the Y-axis component;
It is to drop to 0 from the arbitrary value in the first preset range in the changing rule of the absolute value of the Y-axis component, and from
0 when rising to the arbitrary value in first preset range, and the screen of the intelligent terminal is set into bright screen state.
If the changing rule of the absolute value of the Y-axis component is in the second preset range, by the intelligent terminal
Screen is set to put out screen state.
The absolute value of the Y-axis component of its acceleration is main in terrestrial gravitation acceleration when the present invention is rocked using intelligent terminal
Value 9.8m/s2The rule somewhat shaken up and down, there is provided the second preset range.Second preset range is with acceleration of gravity
Centered on value and meet the second centrifugal pump number range, such as gravity acceleration value be 9.8m/s2And second centrifugal pump be 1
When, second preset range is [8.8-10.8], and unit is m/s2.And when intelligent terminal is taken out inside pocket, it adds
The order of magnitude of component of the speed in Y-axis, which can show, to be reduced to 0 from the absolute value of acceleration of gravity and then rises to again
The change procedure of the absolute value of acceleration of gravity.There is deviation in view of the gravity acceleration value of different regions, the present invention is provided with
One first preset range, first preset range is centered on gravity acceleration value and the numerical value model of the first centrifugal pump of satisfaction
Enclose, and first centrifugal pump is less than above-mentioned second centrifugal pump.Exemplarily, it is 9.8m/s in the gravity acceleration value2And
When first centrifugal pump is 0.1, first preset range is [9.7-9.9], and unit is m/s2.It should be noted that of the invention
In embodiment, first centrifugal pump illustrates discrete journey of the data in the first preset range relative to gravity acceleration value
Degree;Second centrifugal pump illustrates dispersion degree of the data in the second preset range relative to gravity acceleration value.Pass through
Detect whether the absolute value of the Y-axis component drops to 0 from the arbitrary value in the first preset range and rise to described first from 0
Arbitrary value in preset range, to determine whether intelligent terminal is drawn out inside pocket;And by detecting the Y-axis component
Whether absolute value is shaken in the second preset range, to determine whether intelligent terminal rocks because user walks.
When the absolute value of the Y-axis component drops to 0 from the arbitrary value in the first preset range and rises to described from 0
During arbitrary value in one preset range, show that intelligent terminal is drawn out inside pocket and come, if now intelligent terminal is in and puts out screen state,
Then it is set to bright screen state;Otherwise, keep intelligent terminal constant in bright screen state.When the absolute value of the Y-axis component is
When being shaken in two preset ranges, show that intelligent terminal is in inside pocket teetertotter (being usually to be rocked caused by user walks),
Now, it is error detection to determine the Hall sensor, sets or keeps intelligent terminal to be in and put out screen state;So as to compensate for protection
It is linked in when on screen because the hall sensing of slight displacement or slightly away some distance of screen and generation occurs for protective case
The problem of device judges error, efficiently solves the problem of intelligent terminal misses bright screen in trouser pocket, pocket or in bag, improves
The degree of accuracy of the intelligent terminal to screen control.
Embodiment two
Fig. 2 shows the composition structure for the screen control method that the embodiment of the present invention two is provided, and for convenience of description, only shows
Part related to the present invention is gone out.
In embodiments of the present invention, described device is used to realize the screen control method described in Fig. 1 embodiments, can be interior
Put the unit with the software unit, hardware cell or software and hardware combining of intelligent terminal.Hall is provided with the intelligent terminal
Sensor and proximity transducer, and dressed and be provided with magnet on protective case, the protective case.The embodiment of the present invention is led to first
The magnetic field intensity of the Hall sensor detection magnet generation is crossed to determine whether to start the flow for judging screen state;Then again
The size for the infrared energy that the protective case detected by proximity transducer is reflected determine the protective case relative to
The state of intelligent terminal.In embodiments of the present invention, acceleration transducer is also provided with the intelligent terminal, with it is determined that screen
Determine the motion state of intelligent terminal after tentiform state by the acceleration transducer again.
As shown in Fig. 2 described device includes:
First acquisition module 21, the potential value for obtaining Hall sensor output;
Second acquisition module 22, for when the potential value is less than first threshold, obtaining the output valve of proximity transducer;
State determining module 23, for determining the protection that intelligent terminal is dressed according to the output valve of the proximity transducer
Cover the state of the screen relative to the intelligent terminal;
3rd acquisition module 24, for when it is away from state that the protective case is relative to the state of the screen, obtaining
Multiple output valves of the acceleration transducer in preset time range;
Setup module 25, the changing rule of multiple output valves for determining the acceleration transducer, and according to described
Changing rule sets the screen state of the intelligent terminal.
Because when intelligent terminal is placed on by user is walked about inside pocket, intelligent terminal can be rocked and then, easily cause protection
Cover the movement relative to screen up and down.The absolute value of the Y-axis component of its acceleration when the present invention is rocked using intelligent terminal
Mainly in terrestrial gravitation acceleration magnitude 9.8kg/m2The rule somewhat shaken up and down, there is provided the second preset range.Described second
Preset range is centered on gravity acceleration value and the number range of the second centrifugal pump of satisfaction, such as [8.8-10.8], unit
For m/s2.By detecting whether the absolute value of the Y-axis component is shaken in the second preset range, to determine the rolling of intelligent terminal
Whether dynamic be caused by user walks.And when intelligent terminal is taken out inside the pocket, component of its acceleration in Y-axis it is exhausted
The change for being reduced to 0 from the absolute value of acceleration of gravity and then rising to the absolute value of acceleration of gravity again can be showed to value size
Change process.There is deviation in view of the gravity acceleration value of different regions, the present invention is also provided with one first preset range, described
One preset range is centered on gravity acceleration value and the number range of the first centrifugal pump of satisfaction, and first centrifugal pump is less than
Above-mentioned second centrifugal pump.Exemplarily, first preset range can be set to [9.7-9.9], and unit is m/s2.Pass through detection
Whether the absolute value of the Y-axis component drops to 0 and rise to described first from 0 from the arbitrary value in the first preset range is preset
Arbitrary value in scope, to determine whether intelligent terminal is drawn out inside pocket.Need explanation when, the first centrifugal pump table
Dispersion degree of the data in the first preset range relative to gravity acceleration value is shown;Second centrifugal pump illustrates second
Dispersion degree of the data relative to gravity acceleration value in preset range.
Therefore, the 3rd acquisition module 24 also includes:
Acquiring unit 241, for obtaining each in multiple output valves of the acceleration transducer in preset time range
The absolute value of the Y-axis component of output valve.
The setup module 25 includes:
Rule determining unit 251, the changing rule of the absolute value for determining the Y-axis component;
Bright screen unit 252, the changing rule for the absolute value in the Y-axis component is from appointing in the first preset range
Meaning value drops to 0, and from 0 rise to first preset range in arbitrary value when, the screen of the intelligent terminal is set
For bright screen state.
And
Screen unit 253 is put out, when the changing rule for the absolute value in the Y-axis component is in the second preset range,
The screen of the intelligent terminal is set to put out screen state.
In embodiments of the present invention, when the absolute value of the Y-axis component from the arbitrary value in the first preset range drops to 0
And from 0 rise to first preset range in arbitrary value when, show that intelligent terminal is drawn out inside the pocket and come, if now intelligence
The screen of terminal, which is in, puts out screen state, then is set to bright screen state;Otherwise, keep intelligent terminal constant in bright screen state.When
When the absolute value of the Y-axis component is shaken in the second preset range, show that intelligent terminal is in inside pocket or wrapped on the inside
Under rock (be usually user walk caused by rock), now, it is error detection to determine the Hall sensor, sets or keeps
The screen of intelligent terminal, which is in, puts out screen state;So as to compensate for when protection is linked on screen because slight displacement occurs for protective case
Or slightly away screen some distance and produce Hall sensor judge error the problem of, efficiently solve intelligent terminal
Inside trouser pocket, pocket the problem of bright screen, the degree of accuracy of the intelligent terminal to screen control is improved.
It should be noted that the device in the embodiment of the present invention can be used for realizing whole skills in above method embodiment
Art scheme, the function of its each functional module can be implemented according to the method in above method embodiment, and it is implemented
Process can refer to the associated description in above-described embodiment, and here is omitted.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
, can be by it in several embodiments provided herein, it should be understood that disclosed apparatus and method
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component 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 connection can be the INDIRECT COUPLINGs or logical of device or unit by some interfaces
Letter connection, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.