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 current unlocking method unlocking motion immobilize cause Consumer's Experience decline and touch-screen use the longevity
The problem of life reduction.
Technical scheme is as follows:
A kind of mobile terminal touch screen unlocking method, wherein, it the described method comprises the following steps:
A, reception user instruction light screen and show locking screen interface, detect user and touch touch-screen, obtain user and exist
Sliding trace on touch-screen;
B, the touch point to sliding trace process are parsed, and utilize the touch point parsed to calculate any three touch points
The triangle area of composition;
It is simultaneously compared by C, the triangle area for obtaining numerical value maximum with predetermined threshold value, when acquired gore
When product is more than threshold value, touch-screen is unlocked.
Described mobile terminal touch screen unlocking method, wherein, user is detected in the step A and touches touch-screen, is obtained
Taking the sliding trace of family on the touchscreen is specially:
Detect user to touch after touch-screen, start to obtain the sliding trace of user on the touchscreen until detecting user
Discharge touch-screen.
Described mobile terminal touch screen unlocking method, wherein, also include before the step A:
The coordinate system for being parsed to the touch point that sliding trace passes through, the coordinate system are set up to touch-screen in advance
Using touch-screen top left corner apex as origin, using screen top margin as X-axis, screen left side is set up for Y-axis
Described mobile terminal touch screen unlocking method, wherein, the touch that sliding trace passes through is clicked through in the step B
Row parsing is specially:
The touch point coordinates of sliding trace process is parsed using the coordinate system pre-established.
Described mobile terminal touch screen unlocking method, wherein, calculated and appointed using the touch point parsed in the step B
The triangle area that three touch points of meaning are constituted is specially:
Whether on the same line judge any three touch points using the touch point coordinates parsed, when judge three touch
Touch a little not on the same line when, the triangle area that three touch points are constituted is calculated and recorded according to its coordinate.
Described mobile terminal touch screen unlocking method, wherein, judge any three using the touch point coordinates parsed
Whether condition on the same line is for touch point:
If the coordinate of three touch points judged is respectively (xi, yi)、(xj, yj)、(xk, yk), as (yi-yj)×
(xj-xk)=(yj-yk)×(xi-xj) when, then judge three touch points on the same line;As (yi-yj)×(xj-xk)≠
(yj-yk)×(xi-xj) when, then judge three touch points not on the same line.
Described mobile terminal touch screen unlocking method, wherein, when coordinate is respectively (xi, yi)、(xj, yj)、(xk, yk)
When three touch points are through judging not on the same line, the gore that three touch points are constituted is calculated using equation below
Product:
Wherein, in above formula
Described mobile terminal touch screen unlocking method, wherein, the step C is specially:
C1, the triangle area calculated is compared, obtains the wherein maximum triangle area of numerical value;
C2, acquired triangle area and predetermined threshold value be compared, it is right if the triangle area is more than threshold value
Touch-screen is unlocked.
A kind of mobile terminal touch screen system for unlocking, wherein, the system includes:
Acquisition module, lights screen and shows locking screen interface for receiving user instruction, detects user and touches touch-screen
And obtain the sliding trace of user on the touchscreen;
Computing module, for being parsed to the touch point that sliding trace passes through, is calculated using the touch point parsed and appointed
The triangle area that three touch points of meaning are constituted;
Setup module, for obtaining the maximum triangle area of numerical value and being compared it with predetermined threshold value, when being obtained
When the triangle area taken is more than threshold value, touch-screen is unlocked.
Described mobile terminal touch screen system for unlocking, wherein, the system also includes:
Comparison module, for being compared to the triangle area that computing module is calculated, show that wherein numerical value is maximum
Triangle area.
Beneficial effect:The present invention provides a mobile terminal touch screen unlocking method and system, and unlocking method of the invention is adopted
Realized with the method for judging touch point size, so that unlock interface is fully utilized, it is to avoid existing unblock by
Fixed in release region and cause the problem of sensor accuracy is reduced.Meanwhile, mobile terminal slide every time releasing process can by with
Family voluntarily selects sliding trace, simple to operate, convenient, fast, extends the service life of touch-screen, improves the product of user
Experience Degree.
Embodiment
The present invention provide a mobile terminal touch screen unlocking method and system, for make the purpose of the present invention, technical scheme and
Effect is clearer, clear and definite, and the present invention is described in more detail below.It should be appreciated that specific embodiment described herein
Only to explain the present invention, it is not intended to limit the present invention.
A kind of mobile terminal touch screen unlocking method specific embodiment as shown in Figure 1, wherein, methods described includes following
Step:
S100, reception user instruction light screen and show locking screen interface, detect user and touch touch-screen, obtain user
Sliding trace on the touchscreen.
Before unblock is performed, in advance using touch-screen top left corner apex as origin, using screen top margin as X-axis, screen left side
Coordinate system is set up for Y-axis, for being parsed to the touch point that sliding trace passes through.
More specifically, obtain user on the touchscreen sliding trace step be:Detect user to touch after touch-screen, start
The sliding trace of user on the touchscreen is obtained until detecting user's release touch-screen.User discharges touch-screen, sliding trace
The determination of completion can be judged by the dwell time of user's touch action, set an effective time to enter in this technological means
Row judges, such as when detecting user and having discharged touch-screen, starts timing, user is such as not detected by within effective time again
Secondary touch operation, is considered as user and has discharged touch-screen, the sliding trace of user is obtained, if being detected again within effective time
The slide of user again on the touchscreen, then continue to record the sliding trace of user.This way it is possible to avoid user is being carried out
When unlocking screen operator, because accidentally it is of short duration leave touch-screen and caused by the false judgment of sliding trace, facilitate the operation of user.
Certainly, other modes can be also taken to realize the confirmation to user to sliding trace, such as after release touch-screen, in unlock interface
" whether completing " cue button is shown, and confirm whether sliding trace operation completes by receiving the click commands of user.
S200, the touch point to sliding trace process are parsed, and calculating any three using the touch point parsed touches
Touch a triangle area constituted.
Further, above-mentioned parsing touch point, the step of calculating the triangle area of touch point composition is as shown in Fig. 2 tool
Body is:
S210, the touch point coordinates for parsing using the coordinate system pre-established sliding trace process.
S220, using the touch point coordinates parsed whether on the same line to judge any three touch points, judge three
Whether mode on the same line is specially for individual touch point:If the coordinate of three touch points judged is respectively (xi,
yi)、(xj, yj)、(xk, yk), as (yi-yj)×(xj-xk)=(yj-yk)×(xi-xj) when, then judge three touch points same
On one straight line;As (yi-yj)×(xj-xk)≠(yj-yk)×(xi-xj) when, then judge three touch points not in same straight line
On.When judging three touch points not on the same line, step S230 is performed, is calculated according to its coordinate and records this three and touched
Touch a little constituted triangle area.When judging three touch points on the same line, choose behind any touch point, hold again
Row step S220.
S230, coordinate are respectively (xi, yi)、(xj, yj)、(xk, yk) three touch points, using equation below calculate this three
The triangle area that individual touch point is constituted:Wherein, in above formula
It is simultaneously compared by S300, the triangle area for obtaining numerical value maximum with predetermined threshold value, judges acquired three
Whether angular area is more than threshold value, if so, performing step S400, touch-screen is unlocked, if it is not, then performing step S500.
Further, step S300 is specially:
S310, the triangle area calculated is compared, obtains the wherein maximum triangle area of numerical value.It is relevant
The method a variety of ripe algorithms existing at present for obtaining maximum triangle area realize that the present invention is real using algorithm general at present
Now the comparison procedure, is not repeated this process.
S320, acquired triangle area and predetermined threshold value be compared, if the triangle area is more than threshold value,
Touch-screen is unlocked.
The threshold value is that can in the terminal be preset by user before unlocked step execution, it is preferable that moved
Dynamic terminal can also show the figure of area corresponding with threshold value in unblock screen interface, should be in touch-screen when pointing out user to unlock
The sliding trace of upper completion.Because threshold value is set as numerical value, the graphics area that user represents for the numerical value is difficult to accurately sentence
It is disconnected, needed when being likely to result in unblock repeatedly, operation repeatedly could be completed.Above-mentioned technological means is by giving threshold value corresponding figure
Shape is pointed out so that user can rapidly determine, judge the size required for unblock, be finally reached user-friendly
Effect.
In another embodiment, the threshold value can also be voluntarily adjusted according to the operating habit of user.Specifically, move
Dynamic terminal records multiple maximum triangle area numerical value that multiple touch-screen releasing process is drawn, utilizes the multiple maximums recorded
Triangle area numerical value carries out mean value calculation, and utilizes the average value and user threshold value ratio set in advance in the terminal
Compared with, and voluntarily make adjustment, make it closer to the average value of maximum triangle area.Above-mentioned technological means, which has reached, to be unlocked
The purpose that journey is set according to user operation habits, because the operating habit of different user releasing process is different, if threshold value
Unalterable, for some custom less users of sliding trace scope, numerical value sets too high its needs that will result in repeatedly to enter
Row unblock operation changes the operating habit of oneself, and this may can cause puzzlement, therefore, unblock side of the invention to user
Method can record user and unlock the maximum triangle area numerical value obtained in operating process every time, and voluntarily default value is adjusted
It is whole.
S400, touch-screen are unlocked, and perform step S600.
S500, within second scheduled time whether user operation instruction is received, if so, then return to step S100, if it is not,
Then perform step S600.
When the maximum triangle area drawn is less than threshold value, the prompt message of touch-screen display unblock failure.And
The unblock operation for receiving user again in unlock interface is waited in two scheduled times.If receiving user within second scheduled time
Operational order again, then return to step S100, reacquires sliding trace.The second described scheduled time can be by user voluntarily
Default setting when setting or mobile terminal dispatch from the factory.
S600, end.
A kind of mobile terminal touch screen system for unlocking specific embodiment as shown in Figure 3, wherein, the system includes following
Step:
Acquisition module 100, lights screen and shows locking screen interface for receiving user instruction, and detection user touches touch-screen
And obtain the sliding trace of user on the touchscreen;
Computing module 200, for being parsed to the touch point that sliding trace passes through, is calculated using the touch point parsed
The triangle area that any three touch points are constituted;
Setup module 300, for obtaining the maximum triangle area of numerical value and being compared it with predetermined threshold value, works as institute
When the triangle area of acquisition is more than threshold value, touch-screen is unlocked.
Comparison module 400, for being compared to the triangle area that computing module is calculated, show that wherein numerical value is maximum
Triangle area.
The specific embodiment for the touch screen unlocking method realized using present invention system as described above is illustrated in figure 4,
Its step is as follows:
S1, user light screen triggering unlocking program;
S2, acquisition module detection user touch touch-screen, obtain the sliding trace of user on the touchscreen;
S3, computing module are parsed according to default coordinate system to the touch point that sliding trace passes through;
S4, computing module judge whether any three touch points are located along the same line, if it is not, step S5 is performed, if so,
Again touch point is chosen, step S4 is re-executed;
S5, computing module calculate the triangle area that any three touch points are constituted, output to comparison module;
S6, comparison module compare the triangle area that computing module is calculated, and draw the wherein maximum triangle of numerical value
Area;
Whether the maximum triangle area that S7, setup module compare the touch point composition that sliding trace is passed through is more than threshold
Value, if so, step S8 is then performed, if it is not, then performing step S9;
S8, unlock successfully, touch-screen is unlocked;
S9, unblock failure, what display unblock failed is prompted to user.
In summary, the present invention provides a mobile terminal touch screen unlocking method and system, and unlocking method of the invention is adopted
Realized with the method for judging touch point size, so that unlock interface is fully utilized, it is to avoid existing unblock by
Fixed in release region and cause the problem of sensor accuracy is reduced.Meanwhile, mobile terminal slide every time releasing process can by with
Family voluntarily selects sliding trace, simple to operate, convenient, fast, extends the service life of touch-screen, improves the product of user
Experience Degree.
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.