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 mobile terminal touch screen unlocking method
And system, it is intended to solve that the unblock operation of current unblock scheme is single, easily causes the reduction of touch-screen release region transducer sensitivity
The problem of.
Technical scheme is as follows:
A kind of mobile terminal touch screen unlocking method, wherein, it the described method comprises the following steps:
A, the two initial touch points of user on the touchscreen are detected simultaneously by unlock interface, obtain two initial touch
The coordinate of point, calculates the area using two initial touch point lines as cornerwise first rectangle;
B, detect that user discharges touch screen operation, obtain the seat that user discharges the first two termination touch point of touch-screen
Mark, calculate and terminate area of the touch point line as cornerwise second rectangle using two;
C, the ratio of the first rectangular area and the second rectangular area is calculated and by the ratio compared with preset range, if
Within a preset range, then touch-screen is unlocked the ratio.
Described mobile terminal touch screen unlocking method, wherein, also include before the step A:
It is that Y-axis is established and is used for using screen top margin as X-axis, screen left side in advance to touch the screen upper left corner as origin
The coordinate system of labeled touch point coordinates.
Described mobile terminal touch screen unlocking method, wherein, the step A is specially:
A1, in unlock interface the touch operation of user on the touchscreen is detected, judge whether the touch operation is to touch
Two touches on screen are touched, if so, then performing step A2;
A2, the coordinate for obtaining two initial touch points in the touch operation, calculate using two initial touch point lines as
The area of cornerwise first rectangle.
Described mobile terminal touch screen unlocking method, wherein, when judge in step A1 user's touch operation be not touch
Two touches on screen, then show the prompt message of unblock failure.
Described mobile terminal touch screen unlocking method, wherein, the step B is specially:
B1, continue detect user on the touchscreen while two touches operate, until detect user discharge touch-screen
Operation, then perform step B2;
B2, the coordinate that user discharges the first two termination touch point of touch-screen is obtained, calculate and terminate touch points company with two
Line is the area of cornerwise second rectangle.
Described mobile terminal touch screen unlocking method, wherein, when the step B1 continue detection process in, be not detected by
User on the touchscreen while two touches operate when, then show unblock unsuccessfully prompt message.
Described mobile terminal touch screen unlocking method, wherein, the preset range is by default minimum value and presets most
Big numerical value is determined, when the ratio of the first rectangular area and the second rectangular area is default between minimum value and greatest measure
When, then judge the ratio within a preset range.
Described mobile terminal touch screen unlocking method, wherein, when the first rectangular area and the ratio of the second rectangular area
Not within a preset range, then the prompt message of unblock failure is shown.
A kind of mobile terminal touch screen system for unlocking, wherein, the system includes:
Acquisition module, for detecting the two initial touch points of user on the touchscreen simultaneously in unlock interface, obtain two
The coordinate of individual initial touch point, and for detect user discharge touch screen operation when, obtain user discharge touch-screen it
The first two terminates the coordinate of touch point;
Computing module, for calculating the area using two initial touch point coordinates lines as cornerwise first rectangle, with
And for calculating the area using the coordinate of two termination touch points as cornerwise second rectangle;
Judge module, for calculating the ratio of the first rectangular area and the second rectangular area and by the ratio and preset range
It is compared, and touch-screen is unlocked according to comparative result.
Beneficial effect:The present invention provides a kind of mobile terminal touch screen unlocking method and system, touch-screen solution of the invention
Locking method only defines unlocking condition, without being defined to user's unlocking method so that a variety of unlocking methods can be used to hold for user
The unblock operation of the row present invention, so that the unlocking method of the present invention has variability.And unlocking method of the present invention is unlimited
Fixed specific unblock track, user need not keep specific unblock track firmly in mind, facilitate user, while avoid in existing method to solution
The problem of operation repeatedly in lock region causes touch panel sensor sensitivity decrease, accordingly extend the service life of touch-screen.
Embodiment
The present invention provides a kind of mobile terminal touch screen unlocking method and system, to make the purpose of the present invention, technical scheme
And effect is clearer, clear and definite, the present invention is described in more detail below.It should be appreciated that specific implementation described herein
Example is not intended to limit the present invention only to explain the present invention.
A kind of mobile terminal touch screen unlocking method as shown in Figure 1, wherein, it the described method comprises the following steps:
S100, in unlock interface it is detected simultaneously by the two initial touch points of user on the touchscreen, obtains two startings
The coordinate of touch point, calculate the area using two initial touch point lines as cornerwise first rectangle;
Further, also include before the step S100:In advance to touch the screen upper left corner as origin, with screen top
While be X-axis, screen left side be that Y-axis establishes coordinate system for labeled touch point coordinates.Pass through the signable touch of the coordinate system
All touch points on screen.
In preferred embodiment, the step S100 is specially:
The touch operation of user on the touchscreen is detected in unlock interface, judges whether the touch operation is in touch-screen
On two touches, if so, then performing following steps;
Obtain the coordinate of two initial touch points in the touch operation, calculate using two initial touch point coordinates lines as
The area of cornerwise first rectangle.Wherein, the side for the rectangular area being made up of two initial touch points diagonal is calculated
Method is:Area S=| xa-xb|×|ya-yb|, in formula, xaFor initial touch point a abscissa, yaFor the vertical of initial touch point a
Coordinate, xbFor initial touch point b abscissa, ybFor initial touch point b ordinate, S is initial touch point a, initial touch point
The rectangular area that b is made up of diagonal.
In above-mentioned preferred embodiment, when judging that user's touch operation is not two touches on touch-screen, then detection is exited,
The prompt message of display unblock failure.
S200, detect that user discharges touch screen operation, the first two for obtaining user's release touch-screen terminates touch point
Coordinate, calculate and terminate area of the touch point line as cornerwise second rectangle using two;
Further, above-mentioned steps S200 is specially:
Two touches operate while continuing to detect user on the touchscreen, until detecting that user discharges touch-screen behaviour
Make, then perform following steps;
The coordinate that user discharges the first two termination touch point of touch-screen is obtained, is calculated with the coordinates of two termination touch points
Line is the area of cornerwise second rectangle.The coordinate of two termination touch points is cornerwise area for forming the second rectangle
Calculating it is identical with the method that the first rectangular area is calculated in step S100.
In detection process is continued, if two touches operate while being not detected by user on the touchscreen, that is, detect
The touch of user on the touchscreen is non-two touch, then shows unblock failure prompt message.It can continue in unlock interface simultaneously
Detected, to wait the unblock again of user to operate.
Whether within a preset range S300, the ratio for calculating the first rectangular area and the second rectangular area, judge the ratio,
If so, step S400 is then performed, if it is not, then performing step S500.
Wherein, the preset range is determined by default minimum value and default greatest measure, when the first rectangular area
With the ratio of the second rectangular area it is default between minimum value and greatest measure when, then judge the ratio within a preset range.
And when the first rectangular area and the second rectangular area ratio not within a preset range, then show the prompt message for unlocking and failing.
Perform step S500.
S400, touch-screen are unlocked.And perform step S600.
S500, the prompt message of display unblock failure.
S600, end.
The present invention has only preset unlocking condition, and unblock operation is not defined, therefore user can be in unlock interface
Optional position, the unblock that the present invention is performed using any means is operated, so equivalent to having given User Defined unlocking motion
Right, so that the unlocking method of the present invention there can be different unblock operational motions under the use of different user, meet
The requirement of user individual.
The touch screen unlocking method of the present invention is further elaborated below by specific embodiment as shown in Figure 2,
It is comprised the following steps that:
S1, detect that user touches touch-screen, obtain and touch point coordinates.
S2, whether it is 2 touch points.If so, then perform step S3, if it is not, then performing step S10.Touch to acquisition
Point number is confirmed, if two touch points, then performs step S3.
S3, calculate the rectangular area S0 that the two touch point lines are diagonal composition.And result of calculation is preserved.
S4, whether touch-screen is discharged, if so, explanation user terminates unblock operation, then step S7 is performed, if it is not, then performing
Step S5.
S5, whether it is 2 touch points, if so, explanation user then performs step S6 also in unblock operating process, if
It is no, illustrate to have ceased the operation of 2 touch points in user's releasing process, then the operation has not met the unlocking condition of the present invention, then
Perform step S10.
S6, acquisition user touch the coordinate of two touch points of touch-screen and preservation.And return to step S4 is sentenced afterwards
It is disconnected.
S7, calculate the rectangular area S1 that the first two touch point line of user's release touch-screen is formed as diagonal.And
Perform step S8.
S8, according to S1/S0, judge whether to unlock successfully, using the comparison of S1/S0 and preset range, judge whether it full
The default unlocking condition of foot, if so, step S9 is then performed, if it is not, then performing step S10.
S9, issue the user with unblock successfully prompting.
S10, the prompting for issuing the user with unblock failure.
Mobile terminal touch screen system for unlocking of the present invention is illustrated in figure 3, wherein, the system includes:
Acquisition module 100, for detecting the two initial touch points of user on the touchscreen simultaneously in unlock interface, obtain
The coordinate of two initial touch points, and for when detecting that user discharges touch screen operation, obtaining user and discharging touch-screen
The first two terminate touch point coordinate;
Computing module 200, for calculating the area using two initial touch point coordinates lines as cornerwise first rectangle,
And for calculating the area using the coordinate of two termination touch points as cornerwise second rectangle;
Judge module 300, for calculating the ratio of the first rectangular area and the second rectangular area and by the ratio with presetting
Scope is compared, and touch-screen is unlocked according to comparative result.
In addition, present system includes reminding module 400 and setup module 500, shown reminding module 400 is used to unlock
Unblock failure prompt message is sent in the case of failure, also can be transmitted certainly and unlock successfully prompt message.The setup module 500
For setting the preset range of the present invention for being used to judge in advance and establishing coordinate system etc..
The present invention provides a kind of mobile terminal touch screen unlocking method and system, and touch screen unlocking method of the invention is only fixed
Adopted unlocking condition, without being defined to user's unlocking method so that a variety of unlocking methods can be used to perform the present invention's for user
Unblock operation, so that the unlocking method of the present invention has variability.And unlocking method of the present invention does not limit specific unblock
Track, user need not keep specific unblock track firmly in mind, facilitate user, while avoid in existing method to the anti-of release region
The problem of multiple operation causes touch panel sensor sensitivity decrease, accordingly extend the service life of touch-screen.
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.