The content of the invention
In view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide a kind of solution that area is touched based on touch-screen
Locking method and system, it is intended to solve that existing mobile terminal touch screen unlocking manner security is high and unhandy problem.
Technical scheme is as follows:
A kind of unlocking method that area is touched based on touch-screen, wherein, including step:
A, unblock when, obtain user touch touch-screen area, the input code of matching is drawn according to the size of the area;
B, according to input sequence by each input code composition unblock sequence;
C, by the unblock sequence and mobile terminal it is default unblock sequence be compared, if identical, unlock successfully, otherwise
Unblock failure.
The described unlocking method that area is touched based on touch-screen, wherein, the step A is specifically included:
A1, one timer of startup;
The coordinate of all touch points of A2, acquisition in the timer timing range, and according to the coordinate of these touch points
Calculate touch area;
A3, the input code according to the affiliated scope acquisition matching of the size for touching area.
The described unlocking method that area is touched based on touch-screen, wherein, also include before the step A1:
Pre-set with touching the one-to-one input code of the affiliated scope of size.
The described unlocking method that area is touched based on touch-screen, wherein, the calculating process of the step A2 is specifically included:
The difference XM of the abscissa value of two minimum and maximum touch points of abscissa is calculated in the touch point of acquisition;
The difference YM of the ordinate value of two minimum and maximum touch points of ordinate is calculated in the touch point of acquisition;
Calculating obtains touch surface product S:S=XM*YM.
A kind of system for unlocking that area is touched based on touch-screen, wherein, including:
Input code matching module, in unblock, the area that user touches touch-screen being obtained, according to the size of the area
Draw the input code of matching;
Sequence comprising modules are unlocked, for each input code composition to be unlocked into sequence according to input sequence;
Unlocked state, for the default unblock sequence of the unblock sequence and mobile terminal to be compared, if identical, is solved
Lock successfully, otherwise unblock failure.
The described system for unlocking that area is touched based on touch-screen, wherein, the input code matching module is specifically included:
Timer start unit, for starting a timer;
Touch area computing unit, the coordinate for obtaining all touch points in the timer timing range, and root
Touch area is calculated according to the coordinate of these touch points;
Input code matching unit, the input code for obtaining matching according to the affiliated scope of the size for touching area.
The described system for unlocking that area is touched based on touch-screen, wherein, the input code matching module also includes:
Input code presets unit, for pre-setting and touching the one-to-one input code of the affiliated scope of size.
The described system for unlocking that area is touched based on touch-screen, wherein, the touch area computing unit is specifically included:
Abscissa difference computation subunit, two minimum and maximum for calculating abscissa in the touch point of acquisition
The difference XM of the abscissa value of touch point;
Ordinate difference computation subunit, two minimum and maximum for calculating ordinate in the touch point of acquisition
The difference YM of the ordinate value of touch point;
Area computation subunit is touched, touch surface product S is obtained for calculating:S=XM*YM.
Beneficial effect:The input code that area of the invention by touching touch-screen according to user is matched, and according to many
Secondary touch touch-screen obtains multiple input codes, and constitutes unblock sequence, it is compared with default unblock sequence, if phase
Together, then it is unlocked, on the contrary unblock failure, and of the invention that the password of user will not be revealed in releasing process, user only needs basis
The difference for touching area inputs different input codes, it is ensured that the security of input, also operates and also more to facilitate, nothing
Operation need to be unlocked on a large scale, provide the user more preferable unlocking manner.
Embodiment
The present invention provides a kind of unlocking method and system that area is touched based on touch-screen, to make the purpose of the present invention, skill
Art scheme and effect are clearer, clear and definite, and the present invention is described in more detail below.It should be appreciated that tool described herein
Body embodiment only to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is a kind of flow for the unlocking method preferred embodiment that area is touched based on touch-screen of the present invention
Figure, as illustrated, it includes step:
S101, unblock when, obtain user touch touch-screen area, the input of matching is drawn according to the size of the area
Code;
S102, according to input sequence by each input code composition unblock sequence;
S103, by the unblock sequence and mobile terminal it is default unblock sequence be compared, if identical, unlock successfully,
Otherwise unblock failure.
In the present embodiment, the area that user touches touch-screen is obtained first, is matched according to the size of the area
Input code.
User perceptually can increase or reduce touch area, the touch area correspondence of different range when being touched
One input code.
So after multiple touch, multiple input codes are obtained, and a unblock sequence is constituted according to input sequence.
The unblock sequence and the unblock sequence that has set in advance are compared again, if identical, unlocked successfully, if it is different,
Then unblock failure.
The present invention unlocking manner, due in releasing process user without input numeral, only need to according to touch area come
Input code is determined, so other users are digital all without unblock is seen in whole process, and other users can not be examined easily
Feel unblock area during unblock user's unblock, so the unlocking manner of the present invention is very concealed, it is very safe.And input behaviour
Only need to user and change touch area, without mobile touch location, so it is very convenient to operate.
As preferred embodiment of the invention, the step S101 is specifically included:
S201, one timer of startup;
The coordinate of all touch points of S202, acquisition in the timer timing range, and according to the seat of these touch points
Mark calculates touch area;
S203, the input code according to the affiliated scope acquisition matching of the size for touching area.
The present embodiment be by starting a timer, to set the touch time, in the timer timing range it is all touch
Coordinate a little is touched, touch area is calculated by the coordinate of these touch points, is come further according to the affiliated scope of size is touched
To each input code of matching.For example set 400ms timer, timer startup after, begin to obtain 400ms when
Between in the range of all touch points coordinate, touch area is calculated according to the coordinate of these touch points.The embodiment of the present invention
In specific implementation process, input code can be obtained by way of repeatedly being touched in timing range, it is multiple not by input
Same touch area, so as to obtain multiple input codes with certain order.The timing range of the timer can be by system default
Set, can also be set by user is self-defined in menu option, such as user can be adjusted to 500ms, or 300ms etc.
Deng.
As preferred embodiment of the invention, also include before the step S201:
Pre-set with touching the one-to-one input code of the affiliated scope of size.
For example, touching the big input code of the correspondence of area greatly, input code can be divided into 0 to 9 and have 10 grades altogether, and
Different touch areas are corresponded to respectively.It is apparent that this mode needs user to remember cumbersome touch size, it is careless slightly,
Touch area will be inputed by mistake.So the preferred mode of the present invention is only to set two input codes, such as 1 and 0,1 represents big
Area is touched, 0 represents small touch area, and user, which can only rely on, feels that big touch area or small touch surface can be inputted
Product, and without worrying to input password by mistake.And user need remember be exactly 1 and 0 constitute unblock sequence, such as 101100, solve
The number for locking input code in sequence can be 4 or 6, when selection is arranged to 6, can further ensure the present invention's
The security of unlocking manner, when being arranged to 4, can facilitate user to remember input code.
As preferred embodiment of the invention, the calculating process of the step S202 is specifically included:
The difference XM of the abscissa value of two minimum and maximum touch points of abscissa is calculated in the touch point of acquisition;
The difference YM of the ordinate value of two minimum and maximum touch points of ordinate is calculated in the touch point of acquisition;
The touch scope that can touch finger according to user for touching area is obtained, according to each touch point on touch finger
The difference XM of the abscissa value of two minimum and maximum touch points of abscissa, and two minimum and maximum touch points of ordinate
Ordinate value difference YM come calculate obtain touch surface product S;
The calculation formula for touching area S is:S=XM*YM.
It is more accurate according to the touch area that aforesaid way is obtained, and be more easy to calculate.
The present invention provides an Application Example, as shown in figure 3, it includes step:
S100, startup timer;
S200, setting variable i are 1;
S300, judge whether timer is overtime, when being, into step S400, otherwise return and continue to judge that timer is
No time-out;
S400, calculating touch area S;
S500, according to touch area S obtain input code C;
S600, judge whether input code C is equal with P [i], when being, into step S700, otherwise return to step S200;
P [i] therein is i-th of input code in default unblock sequence.
S700, judge i whether be equal to N;When being, into step S800, step S900 is otherwise transferred to;
S800, unlock successfully;
S900, i=i+1, and return to step S300.
Based on the above method, the present invention also provides a kind of system for unlocking preferred embodiment that area is touched based on touch-screen,
As shown in figure 4, it includes:
Input code matching module 100, in unblock, the area that user touches touch-screen being obtained, according to the area
Size draws the input code of matching;
Sequence comprising modules 200 are unlocked, for each input code composition to be unlocked into sequence according to input sequence;
Unlocked state 300, for the default unblock sequence of the unblock sequence and mobile terminal to be compared, if identical,
Then unlock successfully, otherwise unblock failure.
Further, as shown in figure 5, the input code matching module 100 is specifically included:
Timer start unit 110, for starting a timer;
Touch area computing unit 120, the coordinate for obtaining all touch points in the timer timing range, and
Touch area is calculated according to the coordinate of these touch points;
Input code matching unit 130, the input code for obtaining matching according to the affiliated scope of the size for touching area.
Further, the input code matching module 100 also includes:
Input code presets unit, for pre-setting and touching the one-to-one input code of the affiliated scope of size.
Further, the touch area computing unit 120 is specifically included:
Abscissa difference computation subunit, two minimum and maximum for calculating abscissa in the touch point of acquisition
The difference XM of the abscissa value of touch point;
Ordinate difference computation subunit, two minimum and maximum for calculating ordinate in the touch point of acquisition
The difference YM of the ordinate value of touch point;
Area computation subunit is touched, touch surface product S is obtained for calculating:S=XM*YM.
Ins and outs on above-mentioned modular unit have been described in detail in method above, therefore are repeated no more.
In summary, the input code that the area of the invention by touching touch-screen according to user is matched, and according to many
Secondary touch touch-screen obtains multiple input codes, and constitutes unblock sequence, it is compared with default unblock sequence, if phase
Together, then it is unlocked, on the contrary unblock failure, and of the invention that the password of user will not be revealed in releasing process, user only needs basis
The difference for touching area inputs different input codes, it is ensured that the security of input, also operates and also more to facilitate, nothing
Operation need to be unlocked on a large scale, provide the user more preferable unlocking manner.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect scope.