Summary of the invention
The technical problem that the present invention will solve is; Above-mentioned defective to prior art; A kind of screen unlock method and mobile phone based on mobile phone is provided, and it makes mobile phone increase three-dimensional unlocking function: after can being implemented in the mobile phone screen locking, through calculating mobile phone location with acceleration transducer and according to the predefined mobile phone location release of user mobile phone screen; Improved screen release efficient, provided users with the convenient.
The technical scheme that technical solution problem of the present invention is adopted is following:
A kind of screen unlock method based on mobile phone wherein, comprising:
S1, through being arranged on the acceleration transducer on the mobile phone, the acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information;
S2, judge that said current location is whether consistent with the unlocked position that the user is provided with in advance, if consistently be then the release success, if inconsistent, then release failure.
Said screen unlock method based on mobile phone, wherein, the unlocked position that is provided with in advance among the said step S2 comprises first precalculated position and second precalculated position.
Said screen unlock method based on mobile phone wherein, also comprised before said step S1:
M1, according in six faces of mobile phone wherein the one side along gravity direction down, come to define in advance the accekeration of mobile phone with respect to the gravity direction present position, specifically comprise:
When being A bottom surface, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g ,-1.3g y 0.7g, | z| < 0.3g;
When being position B right flank down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: 0.7g x 1.3g, | y| 0.3g, | z| < 0.3g;
When being position C end face down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, 0.7g y 1.3g, | z| < 0.3g;
When being position D left surface down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively :-1.3g x 0.7g, | y| 0.3g, | z| < 0.3g;
When being the E back side, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g ,-1.3g < z < 0.7g;
When being position F face down, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g, 0.7g < z < 1.3g;
Wherein, | X| representes the absolute value of X, g=9.8m/s
2
Said screen unlock method based on mobile phone, wherein,
When mobile phone is in A bottom surface, position down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: 0 ,-1g, 0;
When mobile phone is in position B right flank down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: 1g, 0,0;
When mobile phone is in position C end face down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: 0,1g, 0;
When mobile phone is in position D left surface down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively :-1g, 0,0;
When mobile phone is in the E back side, position down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: 0,0 ,-1g;
When mobile phone is in position F face down, acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: 0,0,1g.
Said screen unlock method based on mobile phone wherein, also comprised before said step S1:
A, receive user's said first precalculated position of operation setting and second precalculated position, said first precalculated position, second precalculated position are respectively a kind of to the F of position of above-mentioned said position A.
Said screen unlock method based on mobile phone, wherein, said step S1 specifically comprises:
S11, on mobile phone, be provided with one be used to respond to the mobile phone direction acceleration transducer, and this acceleration transducer is connected with the CPU of mobile phone;
S12, when the need release, through said acceleration transducer, induction mobile phone primary acceleration information, and should primary acceleration information resolution of vectors be three-dimensional coordinate x, y, three coordinate directions of z;
S13, three-dimensional coordinate x that will this primary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position, y, the z value compares, and calculates mobile phone with respect to the for the first time residing position of gravity direction.
Said screen unlock method based on mobile phone, wherein, said step S2 specifically comprises:
S21, judge the said first time, whether residing position was said first precalculated position, when residing position for the first time is said first precalculated position, in a preset time, carry out detection second time;
S22, when in a scheduled time, to detect for the second time described position be said second precalculated position, then control the release success.
Said screen unlock method based on mobile phone, wherein, in a preset time, carrying out among the said step S21 detects and specifically comprise the second time:
S14, in a preset time, through said acceleration transducer, induction mobile phone secondary acceleration information, and be three-dimensional coordinate x, y, three coordinate directions of z with this acceleration information resolution of vectors of second;
S15, three-dimensional coordinate x that will this secondary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position, y, the z value compares, and calculates mobile phone with respect to the for the second time residing position of gravity direction.
A kind of mobile phone, wherein, on mobile phone, be provided with one be used to respond to the mobile phone direction acceleration transducer, and this acceleration transducer is connected with the CPU of mobile phone, said mobile phone also comprises:
Position computation module is used for through being arranged on the acceleration transducer on the mobile phone, and the acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information;
The release control module is used to judge that said current location is whether consistent with the unlocked position that the user is provided with in advance, if consistently be then the release success, if inconsistent, then release failure.
Described mobile phone, wherein, it also comprises:
Module is set, and the said unlocked position that is provided with in advance of operation setting that is used to receive the user is first precalculated position and second precalculated position.
Described mobile phone, wherein, it also comprises:
Definition module is used for to define in advance mobile phone and comprising with respect to the accekeration of gravity direction present position according to the wherein one side of six faces of mobile phone along gravity direction down:
When being A bottom surface, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g ,-1.3g y 0.7g, | z| < 0.3g;
When being position B right flank down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: 0.7g x 1.3g, | y| 0.3g, | z| < 0.3g;
When being position C end face down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, 0.7g y 1.3g, | z| < 0.3g;
When being position D left surface down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively :-1.3g x 0.7g, | y| 0.3g, | z| < 0.3g;
When being the E back side, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g ,-1.3g < z < 0.7g;
When being position F face down, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g, 0.7g < z < 1.3g;
Wherein, | X| representes the absolute value of X, g=9.8m/s
2
Said first precalculated position, second precalculated position are respectively a kind of to the F of position of above-mentioned said position A.
Described mobile phone, wherein, said position computation module comprises:
Computing unit is used for when needing release for the first time, through acceleration transducer, and the primary acceleration information of induction mobile phone; And should primary acceleration information resolution of vectors be three-dimensional coordinate x, y, three coordinate directions of z; With the three-dimensional coordinate x of this primary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position; Y, the z value compares, and calculates mobile phone with respect to the for the first time residing position of gravity direction;
Computing unit is used in a preset time for the second time, through said acceleration transducer, and the secondary acceleration information of induction mobile phone; And be three-dimensional coordinate x with this acceleration information resolution of vectors of second, y, three coordinate directions of z; With the three-dimensional coordinate x of this secondary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position; Y, the z value compares, and calculates mobile phone with respect to the for the second time residing position of gravity direction.
Described mobile phone, wherein, said release control module comprises:
First control unit is used to judge the said first time, whether residing position was said first precalculated position, when residing position for the first time is said first precalculated position, in a preset time, carries out detection second time;
Second control unit is used for when in a scheduled time, to detect for the second time described position be said second precalculated position, then controlling the release success.
A kind of screen unlock method and mobile phone provided by the present invention based on mobile phone; Owing to adopted through being arranged on the acceleration transducer on the mobile phone; The acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information; Judge that said current location is whether consistent with the unlocked position that the user is provided with in advance; If consistent is then the release success if that inconsistent, then release is failed; It makes mobile phone increase three-dimensional unlocking function: after can being implemented in the mobile phone screen locking; Through calculating mobile phone location with acceleration transducer and, having improved screen release efficient, provide users with the convenient according to the predefined mobile phone location release of user mobile phone screen.
Embodiment
A kind of screen unlock method and mobile phone provided by the present invention based on mobile phone, clearer, clear and definite for making the object of the invention, technical scheme and advantage, below develop simultaneously embodiment to further explain of the present invention with reference to accompanying drawing.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
A kind of screen unlock method and mobile phone provided by the present invention based on mobile phone, can be implemented in the mobile phone screen locking after, carry out release according to the predefined mobile phone location of user.
The screen unlock method based on mobile phone of the embodiment of the invention, as shown in Figure 1, mainly comprise step:
S100, through being arranged on the acceleration transducer on the mobile phone, the acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information;
S200, judge that said current location is whether consistent with the unlocked position that the user is provided with in advance, if consistently be then the release success, if inconsistent, then release failure.Wherein, the said unlocked position that is provided with in advance comprises first precalculated position and second precalculated position
In the embodiment of the invention, need on mobile phone, to be provided with one be used to respond to the mobile phone direction acceleration transducer, and this acceleration transducer is connected with the CPU of mobile phone, as shown in Figure 2, wherein connected mode is the I2C bus.The coordinate system structure that acceleration decomposes in the embodiment of the invention is as shown in Figure 3.
In the embodiment of the invention,, come to define in advance the accekeration of mobile phone down according to which face in six faces of mobile phone, specifically comprise with respect to the gravity direction present position along gravity direction:
When being A bottom surface, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g ,-1.3g y 0.7g, | < 0.3g corresponds to the position shown in Fig. 4 a to z|.
When being position B right flank down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: 0.7g x 1.3g, | y| 0.3g, | < 0.3g corresponds to the position shown in Fig. 4 b to z|.
When being position C end face down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, 0.7g y 1.3g, | < 0.3g corresponds to the position shown in Fig. 4 c to z|.
When being position D left surface down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively :-1.3g x 0.7g, | y| 0.3g, | < 0.3g corresponds to the position shown in Fig. 4 d to z|.
When being the E back side, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | < 0.3g, < < 0.7g corresponds to the position shown in Fig. 4 e to z to-1.3g to y|.
When being position F face down, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | < 0.3g, < < 1.3g corresponds to the position shown in Fig. 4 f to z to 0.7g to y|.
Wherein, | X| representes the absolute value of X, g=9.8m/s
2, the definition of six kinds of positions here according in six faces of mobile phone which face down (downward) along gravity direction define, gravity direction is downward direction.When acceleration transducer output (x, y when z) satisfying in the above-mentioned condition a certain, explain that mobile phone is in the pairing position of condition.
Utilize the acceleration transducer detection of handset position with respect to gravity of living in the embodiment of the invention, the acceleration transducer that uses in the mobile phone is static when lying against on the horizontal table top, and is as shown in Figure 4, in theory the output of acceleration transducer be (0,0 ,-1g).And 6 when facing down in theory acceleration transducer at x, y, will export respectively on the z coordinate system is (0 ,-1g, 0), (1g; 0,0), (0,1g, 0), (1g; 0,0), (0,0 ,-1g), (0; 0,1g), shown in Fig. 5 a~Fig. 5 f, utilize these characteristics to know the mobile phone present position.
Fig. 5 a~Fig. 5 f be in the embodiment of the invention mobile phone be in A bottom surface, position down~during the F face down of position, acceleration transducer is at x, y, the output valve on the z coordinate system.
Mobile phone is in A bottom surface, position down among Fig. 5 a, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (0 ,-1g, 0).
Mobile phone is in position B right flank down among Fig. 5 b, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (1g, 0,0).
Mobile phone is in position C end face down among Fig. 5 c, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (0,1g, 0).
Mobile phone is in position D left surface down among Fig. 5 d, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (1g, 0,0).
Mobile phone is in the E back side, position down among Fig. 5 e, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (0,0 ,-1g).
Mobile phone is in position F face down among Fig. 5 f, and acceleration transducer is at x, y, and the output valve on the z coordinate system is respectively: (0,0,1g).
In the embodiment of the invention; Before release, need; The said unlocked position that is provided with in advance of operation setting that receives the user through mobile phone is first precalculated position and second precalculated position, and said first precalculated position, second precalculated position are respectively above-mentioned said position A to a kind of in down of position F.
Be that the user at first need get into setup menu and selects first precalculated position and second precalculated position of corresponding position as the said unlocked position that is provided with in advance at position A to position F (shown in Fig. 4 a~Fig. 4 f), and first precalculated position and second precalculated position selected have nothing in common with each other.
For example, for the explanation practical implementation of the present invention of image more in addition, Fig. 6 a~Fig. 6 g has provided concrete an application.First precalculated position and second precalculated position when Fig. 6 a~Fig. 6 e user gets in the setup menu release of the present invention are provided with; Wherein Fig. 6 a carries out the interface that release is provided with for getting into setup menu; Fig. 6 b is the interface when getting into the option of selecting position one corresponding with said primary importance and second place difference and position two; Operation interface figure when Fig. 6 c is present embodiment said primary importance is selected, the position of selecting among the figure one be said primary importance be position C end face down.Operation interface figure when Fig. 6 d is present embodiment the said second place is selected, the position of selecting among the figure two be the said second place be position D left surface down.Fig. 6 e for select earlier with the corresponding respectively position one of said primary importance and the second place and the surface chart of position two.
After the user lights screen the user need make earlier mobile phone be in position C end face down state shown in Fig. 6 f, then the user need first scheduled time as make in the 2s mobile phone be in position D left surface down state shown in Fig. 6 g, the release success.The concrete course of work is following:
S12, when the need release, through said acceleration transducer, induction mobile phone primary acceleration information, and should primary acceleration information resolution of vectors be three-dimensional coordinate x, y, three coordinate directions of z.
S13, three-dimensional coordinate x that will this primary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position, y, the z value compares, and calculates mobile phone with respect to the for the first time residing position of gravity direction.
S21, judge the said first time, whether residing position was said first precalculated position, when residing position for the first time is said first precalculated position, in a preset time, carry out detection second time.
S22, when in a scheduled time, to detect for the second time described position be said second precalculated position, then control the release success.
Wherein, in a preset time, carrying out among the said step S21 detects and specifically comprise the second time:
S14, in a preset time, through said acceleration transducer, induction mobile phone secondary acceleration information, and be three-dimensional coordinate x, y, three coordinate directions of z with this acceleration information resolution of vectors of second;
S15, three-dimensional coordinate x that will this secondary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position, y, the z value compares, and calculates mobile phone with respect to the for the second time residing position of gravity direction.
Below will do further detailed explanation to the screen unlock method based on mobile phone of the present invention through a concrete application implementation example.
The user pushes button and lights mobile phone screen and trigger and to separate lock module and open, and when the user holds mobile phone and makes mobile phone satisfy said first precalculated position, during the condition of (position one), then opens first timer T1, and wherein the time-out time of T1 is 2s; If in 2s, the user holds mobile phone makes mobile phone satisfy the then release success of condition in second precalculated position (position two), otherwise release is unsuccessful.
The flow chart of this application implementation example is as shown in Figure 7, specifically comprises:
Step 601, after the mobile phone screen locking, the user pushes button and lights mobile phone screen and trigger unlocking program and open.
Step 602, screen display statement prompt user release.
The detection of step 603, beginning mobile phone location one (first precalculated position); CPU reads the acceleration (x of the communication terminal that acceleration transducer senses; Y z), and combines above-mentioned method to calculate one of them whether current phone is in position A F to the position according to accekeration.
Step 604, judge whether mobile phone location satisfies the requirement in position one (first precalculated position), if then get into step 605, if otherwise get into step 603.
Step 605, opening timing device T1, the time-out time of T1 is 2s.
Step 606, beginning mobile phone location two detect, and CPU reads the acceleration at the mobile news terminal that acceleration transducer senses, and (x, y z), and combine above-mentioned method to calculate one of them whether current phone is in position A F to the position according to accekeration.
Step 607, judge whether mobile phone location satisfies the requirement of position two, if then get into step 608, if otherwise get into step 606.
Step 608, judge whether timer T1 is overtime, if then get into step 603, if otherwise get into step 609.
Step 609, release success.
Therefore; A kind of screen unlock method that the embodiment of the invention provides based on mobile phone; It makes mobile phone increase three-dimensional unlocking function: after can being implemented in the mobile phone screen locking; Through calculating mobile phone location with acceleration transducer and, having improved screen release efficient, provide users with the convenient according to the predefined mobile phone location release of user mobile phone screen
Based on the foregoing description, the embodiment of the invention also provides a kind of mobile phone, on mobile phone, be provided with one be used to respond to the mobile phone direction acceleration transducer, and this acceleration transducer is connected with the CPU of mobile phone, as shown in Figure 8, said mobile phone also comprises:
Position computation module 810 is used for through being arranged on the acceleration transducer on the mobile phone, and the acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information; Specifically as stated.
Release control module 820 is used to judge that said current location is whether consistent with the unlocked position that the user is provided with in advance, if consistently be then the release success, if inconsistent, then release failure; Specifically as stated.
Definition module 801 is used for to define in advance the accekeration of mobile phone with respect to the gravity direction present position according to which face of six faces of mobile phone along gravity direction down, specifically comprises:
When being A bottom surface, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g ,-1.3g y 0.7g, | < 0.3g corresponds to position shown in Figure 4 to z|.
When being position B right flank down the time, the three-dimensional coordinate x of its acceleration information, y, the value defined of z is: 0.7g x 1.3g, | y| 0.3g, | < 0.3g corresponds to position shown in Figure 6 to z|;
When being position C end face down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, 0.7g y 1.3g, | z| < 0.3g;
When being position D left surface down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively :-1.3g x 0.7g, | y| 0.3g, | z| < 0.3g;
When being the E back side, position down the time, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g ,-1.3g < z < 0.7g;
When being position F face down, the three-dimensional coordinate x of its acceleration information, y, the value of z is respectively: | x| 0.3g, | y| < 0.3g, 0.7g < z < 1.3g;
Wherein, | X| representes the absolute value of X, g=9.8m/s
2 Specifically as stated.
Module 802 is set, and the said unlocked position that is provided with in advance of operation setting that is used to receive the user is first precalculated position and second precalculated position, and said first precalculated position, second precalculated position are respectively a kind of to the F of position of above-mentioned said position A; Specifically as stated.
Wherein, as shown in Figure 9, said position computation module 810 comprises:
Computing unit 811 is used for when needing release for the first time, through said acceleration transducer, and the primary acceleration information of induction mobile phone; And should primary acceleration information resolution of vectors be three-dimensional coordinate x, y, three coordinate directions of z; With the three-dimensional coordinate x of this primary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position; Y, the z value compares, and calculates mobile phone with respect to the for the first time residing position of gravity direction; Specifically as stated.
Computing unit 812 is used in a preset time for the second time, through said acceleration transducer, and the secondary acceleration information of induction mobile phone; And be three-dimensional coordinate x with this acceleration information resolution of vectors of second, y, three coordinate directions of z; With the three-dimensional coordinate x of this secondary acceleration information, y, the three-dimensional coordinate x of said position A F of z value and above-mentioned definition to the position; Y, the z value compares, and calculates mobile phone with respect to the for the second time residing position of gravity direction; Specifically as stated.
Shown in figure 10, said release control module 820 comprises:
First control unit 821 is used to judge the said first time, whether residing position was said first precalculated position, when residing position for the first time is said first precalculated position, in a preset time, carries out detection second time; Specifically as stated.
Second control unit 822 is used for when in a scheduled time, to detect for the second time described position be said second precalculated position, then controlling the release success; Specifically as stated.
In sum; A kind of screen unlock method and mobile phone provided by the present invention based on mobile phone; Because adopted through being arranged on the acceleration transducer on the mobile phone, the acceleration information of induction mobile phone calculates mobile phone with respect to the residing current location of gravity direction according to this acceleration information; Judge that said current location is whether consistent with the unlocked position that the user is provided with in advance; If consistent is then the release success if that inconsistent, then release is failed; It makes mobile phone increase three-dimensional unlocking function: after can being implemented in the mobile phone screen locking; Through calculating mobile phone location with acceleration transducer and, having improved screen release efficient, provide users with the convenient according to the predefined mobile phone location release of user mobile phone screen.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, concerning those of ordinary skills, can improve or conversion that all these improvement and conversion all should belong to the protection range of accompanying claims of the present invention according to above-mentioned explanation.