Summary of the invention
The technical problem to be solved in the present invention is that in view of the deficiencies of the prior art, providing a kind of screen of mobile terminal
Unlocking method and system, being able to solve existing unlocking method there are problems that needing to remember complicated unlocking pin or figure.
In order to solve the above-mentioned technical problem, the technical solution adopted in the present invention is as follows:
A kind of unlocking screen method of mobile terminal comprising:
A, unlocking program in the state of the lock screen, is triggered by lighting screen, into unlock interface;
B, the scribing operation of detection user on the screen obtains scribing line track;
C, according to scribing line track, determine that scribing line track divides the son screen number that screen is formed;
D, preset threshold and the difference of son screen number are compared with 0, if difference is less than or equal to 0, solve lock screen.
The unlocking screen method of the mobile terminal, further include: it presets for judging whether sub- screen number reaches solution
The threshold values of bolt part.
The unlocking screen method of the mobile terminal, wherein the step B is specifically included:
B1, detection user obtain scribing line track in screen scribing operation;
B2, judge whether scribing line track is straight line, if it is straight line, obtain the scribing line each touch point coordinate in track.
The unlocking screen method of the mobile terminal, wherein the step C is specifically included:
C1, storage unit for storing screen screen sideline coordinate is set, initial value is four sideline coordinate value of screen;
C2, the touch point coordinate of the scribing line track is compared with screen screen sideline coordinate;
C3, the touch point coordinate and the identical touch point number X of screen screen sideline coordinate for obtaining scribing line track;
C4, identical touch point number X is compared with 2, if X≤2, scribing line trajectory coordinates is stored in storage unit,
If X < 2 enable X=1;
C5, newly-increased son screen number Y, formula are as follows: Y=X-1 are calculated according to identical touch point number X;
C6, son screen number Z, formula are calculated according to newly-increased son screen number Y are as follows: Z=Z+Y, wherein the initial value of Z is 1.
The unlocking screen method of the mobile terminal, wherein the step D is specifically included:
D1, the preset duration terminated for judging unlock is preset;
D2, preset threshold and son screen number Z are made into poor remaining sub- screen number M, M is compared with 0, if M is less than or equal to
0, then success is unlocked, if M is greater than 0, shows M value on the screen, and prompt to continue to unlock;
D3, when prompt continues unlock, the time interval for touching screen next time is obtained, if time interval is greater than default
It is long, then terminate unlock operation, if time interval is less than or equal to preset duration, repeatedly step B.
A kind of unlocking screen system of mobile terminal comprising:
Wake-up module, in the state of the lock screen, unlocking program being triggered by lighting screen, into unlock interface;
Detection module obtains scribing line track for detecting user in screen scribing operation;
Computing module, for determining that scribing line track divides the son screen number that screen is formed according to scribing line track;
Unlocked state, if difference is less than or equal to 0, is unlocked for preset threshold and the difference of son screen number to be compared with 0
Screen.
The unlocking screen system of the mobile terminal, further include:
Presetting module is preset for judging whether sub- screen number reaches the threshold values of unlocking condition.
The unlocking screen system of the mobile terminal, wherein the detection module includes:
Acquiring unit obtains scribing line track for detecting user in screen scribing operation;
Judging unit, if it is straight line, obtains the scribing line each touch point in track for judging whether scribing line track is straight line
Coordinate.
The unlocking screen system of the mobile terminal, wherein the processing module specifically includes:
Storage unit, for storing the storage unit of screen screen sideline coordinate, initial value is four sideline coordinate of screen
Value;
First comparing unit, for comparing the touch point coordinate of the scribing line track with screen screen sideline coordinate
Compared with;
Counting unit, the touch point coordinate touch point identical with screen screen sideline coordinate for obtaining scribing line track
Number X, identical touch point number X is compared with 2, if X≤2, scribing line trajectory coordinates are stored in storage unit, if X < 2,
Then enable X=1;
First computing unit, for calculating newly-increased son screen number Y, formula are as follows: Y=X-1 according to identical touch point number X;
Second computing unit, for calculating son screen number Z, formula according to newly-increased sub- screen number Y are as follows: Z=Z+Y, wherein Z's is first
Initial value is 1.
The unlocking screen system of the mobile terminal, wherein the unlocked state specifically includes:
Setup unit, for the preset duration for being used for judging that unlock terminates to be arranged;
M is compared for preset threshold and son screen number Z to be made poor remaining sub- screen number M by the second comparing unit with 0,
If M is less than or equal to 0, success is unlocked, if M is greater than 0, shows M value on the screen, and prompt to continue to unlock;
Processing unit, for when prompting for continuing unlock, obtaining the time interval for touching screen next time, if between the time
Every being greater than preset duration, terminate unlock operation, if time interval is less than or equal to preset duration, obtains scribing line track.
The utility model has the advantages that compared with prior art, the unlocking screen method and system of mobile terminal provided by the present invention,
In the state of the lock screen, unlocking program is triggered by lighting screen, into unlock interface;Detection presses touch screen operation, obtains touching
Press touch screen track;According to scribing line track, the son screen number that scribing line track divide touch screen is formed is determined;Preset threshold and son are shielded
Several differences are compared with 0, if difference is less than or equal to 0, solve lock screen.User is drawn touch screen by crossing on the touchscreen
It is divided into several sub- screens, the difference of son screen number and preset threshold is judged by judgement, to determine whether reach unlocking condition, operation letter
Folk prescription just, and does not need the default password being arranged of user's memory or figure etc. to realize unlock, forgets especially suitable for being easy
The elderly for feelings of keeping record.Need to remember asking for complicated unlocking pin or figure to exist which solve existing unlocking method
Topic.
Specific embodiment
The present invention provides a kind of unlocking screen method and system of mobile terminal, according to mathematical knowledge, if straight line
A closed figure is completely passed through, just 2 intersection points is generated with the figure, the closed figure is divided into two, that is, has more one
Closed figure.When straight line continues to pass through 2 connected closed figures, 3 intersection points are just generated, each closed figure is by one
It is divided into two, has more 2 closed figures altogether.When straight line continues to pass through A connected closed figures, then A+1 friendship is generated
Point has more A closed figures altogether;Often draw a line all number of hits for the closed figure number=line and closed figure newly having more
Subtract one.The process of user's scribing line is exactly by the process of existing sub- screen cutting once again, and every height screen is all a closed figure, and
This little screen is sequentially connected.Above-mentioned law is so applied, the number of hits that scribing line generates every time need to be only recorded, then executes and subtracts
One, it can obtain and increase son screen number newly, son screen number will be increased newly every time and constantly added up, currently total son screen number can be obtained.And with default valve
Value subtracts current son screen number and obtains remaining son screen number, when remaining son screen number is less than 0, then unlocks success.To make mesh of the invention
, technical solution and effect it is clearer, clear, the present invention is described in more detail as follows in conjunction with drawings and embodiments.
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
It is illustrated firstly, providing the term in embodiment to the present invention, used in, " touch screen " refers to having
The touch-sensing input unit or touch-sensitive input devices of associated image display." sub- screen " refer to by touch screen surrounding with
Press the closed figure that the straight path of touch screen formation is formed, wherein touch screen sheet is as a son screen." sub- screen number " refers to
It is these closed figure numbers, when on touch screen without scribing line track, sub- screen number is 1." remaining son screen number " refers to it is expected
The difference of son screen number and son screen number.
With reference to the accompanying drawing, by the description of the embodiment, further explanation of the contents of the invention are made.
Referring to Figure 1, Fig. 1 provides the flow chart of the unlocking screen method preferred embodiment of mobile terminal for the present invention.Such as
Shown in figure, described method includes following steps:
S1, in the state of the lock screen triggers unlocking program by lighting screen, into unlock interface.
Specifically, screen triggering unlocking program can be lighted by clicking master control key, can also passes through and clicks power button
Screen triggering unlocking program is lighted, also screen can be lighted by the wake-up mode that mobile terminal carries and sets out and unlock journey
Sequence is existing lighting mode, does not do excessive explanation here.
S2, detection press touch screen operation, and acquisition presses touch screen track.
Specifically, detection presses touch screen operation, and acquisition presses touch screen track and can be 1, is also possible to a plurality of;?
That is user can press touch screen using a finger forms a scribing line track, more fingers can also be used simultaneously
It presses touch screen and forms a plurality of scribing line track.It is noted that a plurality of scribing line track is non-intersecting when track of crossing is a plurality of
Straight line, when subsequent judgement scribing line track divide touch screen forms sub- screen number, the case where for a plurality of scribing line track, each rail
Mark will judge one by one.
S3, according to scribing line track, determine scribing line track divide touch screen formed son screen number.
Specifically, it can also include verification process, judge to press the scribing line track to be formed into after unlock interface first
Whether have with four side of touch screen there are two intersection point, if obtaining scribing line track there are two intersection point, if not there are two intersection point,
Then terminate to unlock, screen suspend mode.It is verified by judging whether first scribing line track by touch screen is divided into multiple sub- screens
It whether is that the user that user or user authorize is unlocked operation.Further, first can also be preset to draw
The shape of line tracking, to further increase the safety of unlock.Its shape can be the straight line for being parallel to four sides, be also possible to
Diagonal line etc., here without limitation.
S4, preset threshold and the difference of son screen number are compared with 0, if difference is less than or equal to 0, solve lock screen.
Specifically, judge whether remaining son screen number is less than or equal to 0, if it is less than being equal to 0, the son screen number of account for screen is
Up to or over expectation son screen number, unlocking condition is reached, is unlocked successfully.If remaining son screen number is greater than 0, account for screen
Son screen number does not reach expectation son screen number, then shows that remaining son screen number, and prompt continue to unlock, illustrate that unlock does not succeed.
User can simply judge also to need how much to operate complete to unlock by the residue son screen number of display, improve the effect of unlock
Rate.
Further, it can also be solved by being directly compared sub- screen number with preset threshold according to comparison result
Lock operation then unlocks success when group screen number is greater than or equal to threshold values.
Further, the preset threshold N is a positive integer, and value can not too arbitrarily.If N value is excessive, user needs
Many lines are drawn to reach unlocking condition, unlock difficulty is increased, violates unlock original intention;If N value is too small, difficulty is too low, misses sometimes
Touching will also result in misunderstanding lock.It can specifically be set according to general user's use habit and in-mind anticipation, such as 7,9,11 etc..
Touch screen unlocking method provided by the invention triggers unlocking program by lighting screen in the state of the lock screen, into
Enter unlock interface;Detection presses touch screen operation, and acquisition presses touch screen track;According to scribing line track, determine that scribing line track is drawn
The son screen number for dividing touch screen to be formed;Preset threshold and the difference of son screen number are compared with 0, if difference is less than or equal to 0, unlocked
Screen.Touch screen is divided into several sub- screens by crossing on the touchscreen by user, judges son screen number and default valve by judgement
The difference of value, to determine whether reach unlocking condition, it is simple to operate, and do not need the password of the default setting of user's memory
Or figure etc. unlocks to realize, forgets the elderly of thing especially suitable for being easy.To which which solve existing unlocking methods
There are problems that needing to remember complicated unlocking pin or figure.
In one embodiment, as shown in Fig. 2, the step S2 is specifically included:
S21, detection user obtain scribing line track in screen scribing operation;
S22, judge whether scribing line track is straight line, if it is straight line, obtain the scribing line each touch point coordinate in track.
Specifically, judge whether scribing line track is straight line, can appoint in scribing line track and take two touch point coordinates, count
Remaining touch point coordinate is substituted into equation by the linear equation for calculating two touch point coordinates composition, invalid if there is equation
Point, then track of crossing is not straight line, if all equations arrange, track of crossing is straight line.
When track of crossing is straight line, then each touch point of scribing line track is obtained, if scribing line track is not straight line, this
Secondary touch operation is invalid operation, can show on the screen and repartition or continue to unlock.
In one embodiment, as shown in figure 3, the step S3 is specifically included:
S31, storage unit for storing screen screen sideline coordinate is set, initial value is four sideline coordinate of screen
Value.
Specifically, storage unit is used to store sub- screen sideline coordinate, in fact dynamic memory space.When unlock operation starts
When, storage unit is created, and be stored in four sideline coordinate value of screen;When there are scribing operations, and track of crossing meets storage item
When part, by scribing line track deposit storage single unit.At the end of unlocking operation, storing data is emptied, and discharge storage unit.
In this way, it is being unlocked successfully, scratchpad RAM memory space, does not influence the working efficiency of mobile terminal.
S32, the touch point coordinate of the scribing line track is compared with screen screen sideline coordinate;
S33, the touch point coordinate and the identical touch point number X of screen screen sideline coordinate for obtaining scribing line track;
S34, identical touch point number X is compared with 2, if X≤2, scribing line trajectory coordinates is stored in storage unit,
If X < 2 enable X=1.
Specifically, judge the size of X and 2, exactly judge whether scribing line track marks off new son for screen and shield, if X
More than or equal to 2, illustrate scribing line track and son screen sideline there are more than two intersection points, track of crossing surrounds new with son screen sideline
Closed figure, that is, form new son screen.If X less than 2, illustrates that the number of hits in scribing line track and son screen sideline is 1
Or 0, scribing line track and son screen sideline do not form new closed figure, that is, shield without forming new son, i.e., newly-increased son screen
Number is 0.X=1 is always enabled, as the newly-increased son screen number Y=X-1 of subsequent basis, obtains Y=0.
S35, newly-increased son screen number Y, formula are as follows: Y=X-1 are calculated according to identical touch point number X.
S36, son screen number Z, formula are calculated according to newly-increased son screen number Y are as follows: Z=Z+Y, wherein the initial value of Z is 1.
Specifically, the sub- screen number Z is the son screen sum that screen is formed repeatedly to be divided, by each in unlocking process
Divide that increased sub- screen number is cumulative to be formed, since screen is itself is a closed figure, from when there is no division operation, sub- screen
For screen itself, number 1, the initial value of all sub- screen number Z is 1.
Further, the sub- screen number Z is updated to its initial value after each unlock operation.
In one embodiment, as shown in figure 4, the step S4 is specifically included:
The preset duration that S41, setting terminate for judging unlock.
S42, preset threshold and son screen number Z are made into poor remaining sub- screen number M, M is compared with 0, if M is less than or equal to
0, then success is unlocked, if M is greater than 0, shows M value on the screen, and prompt to continue to unlock;
S42, when prompt continues unlock, obtain and press the time interval of touch screen next time, if time interval be greater than it is pre-
If the time, then terminate unlock operation, if time interval is less than or equal to preset time, repeatedly step S2.
For a further understanding of the touch screen unlocking method, a specific embodiment is given below and is illustrated.Its with
User crosses track as 1 straight line, and there are at least two intersection points for straight line and son screen sideline.As shown in Figure 5, which comprises
S100, user trigger unlocking program in the state of the lock screen, by lighting screen, into unlock interface;
S101, user start to cross on the screen, detect that scribing line movement obtains touch point coordinate information, transmission starts letter
Number give counter, counter O reset;
S102, according to obtain touch point coordinate information, presetting the storage unit for having four side coordinate information of screen
The middle coordinate information for searching current point;If the point is fallen in sub- screen, on non-sideline, then the information is not found, by the coordinate
Information is stored in storage unit, executes step S104;If the point is fallen on sideline, this information is found, hair trigger pulse is given
Counter executes step S103;
S103, counter receive after trigger pulse that count is incremented, execute step S104;
S104, judge whether user completes once to cross, if not completing a scribing line, persistently detect and send out a little
Coordinate information executes step S102;If completing a scribing line, step S105 is executed;
S105, it can't detect scribing line movement, then stop sending point coordinate information, and send end signal to counter;
S106, counter stop counting, and obtain current count value X.
S107, the calculating of newly-increased son screen number Y is carried out according to preset formula Y=X-1 and sends calculated result Y to accumulator.
S108, accumulator initial value are Z=1, after receiving input Y, are added up on the basis of 1, therefore accumulated value Z=Z+Y.
S109, M value is obtained according to the calculating that preset formula M=N-Z carries out remaining son screen number M.
S110, judge M value is corresponding to 0 progress, if M > 0, show that current son screen number is not up to reservation threshold, then by M
Value is displayed on the screen, and user is prompted to continue to unlock.
S111, so circulation, until M≤0, control is unlocked successfully.
Further, it is assumed that preset threshold 7 provides specific example.
User draws first line, if the line passes through large-size screen monitors, generates 2 intersection points, increases son screen number=2-1=1, current son screen newly
Sum=1+1=2, as shown in Figure 6.
Remaining son screen number M=7-2=5 > 0, not up to unlocking condition show remaining son screen number 5, and user are prompted to continue to draw
Line.
User draws Article 2 line, if the line continues to pass through current 2 pieces of sons screen, generates 3 intersection points, and newly-increased son screen number Y=3-1=
2, current son shields total Z=2+2=4, as shown in Figure 7.Remaining son screen number M=7-4=3, not up to unlocking condition show remaining son screen
Number 3, and user is prompted to continue to cross.
User draws Article 3 line, if the line continues to pass through current 3 pieces of sons screen, generates 4 intersection points, increases son screen number Y=4- newly
1=3, current total Z=4+3=7 of son screen, as shown in the figure 8.Remaining son screen number M=7-7=0, reaches unlocking condition, control unlock at
Function.
The present invention also provides a kind of unlocking screen systems of mobile terminal, as shown in figure 9, shown system includes:
Wake-up module 100, in the state of the lock screen, unlocking program being triggered by lighting screen, into unlock interface;Tool
Body is as described above.
Detection module 200 obtains scribing line track for detecting user in screen scribing operation;As detailed above.
Computing module 300, for determining that scribing line track divides the son screen number that screen is formed according to scribing line track;Specifically such as
It is upper described.
Unlocked state 400, for preset threshold and the difference of son screen number to be compared with 0, if difference is less than or equal to 0,
Solve lock screen;Specific body is as described above.
The unlocking screen system of the mobile terminal, further include:
Presetting module is preset for judging whether sub- screen number reaches the threshold values of unlocking condition.
The unlocking screen system of the mobile terminal, wherein the detection module 200 includes:
Acquiring unit obtains scribing line track for detecting user in screen scribing operation;
Judging unit, if it is straight line, obtains the scribing line each touch point in track for judging whether scribing line track is straight line
Coordinate.
The unlocking screen system of the mobile terminal, wherein the processing module 300 specifically includes:
Storage unit, for storing the storage unit of screen screen sideline coordinate, initial value is four sideline coordinate of screen
Value;
First comparing unit, for comparing the touch point coordinate of the scribing line track with screen screen sideline coordinate
Compared with;
Counting unit, the touch point coordinate touch point identical with screen screen sideline coordinate for obtaining scribing line track
Number X, identical touch point number X is compared with 2, if X≤2, scribing line trajectory coordinates are stored in storage unit, if X < 2,
Then enable X=1;
First computing unit, for calculating newly-increased son screen number Y, formula are as follows: Y=X-1 according to identical touch point number X;
Second computing unit, for calculating son screen number Z, formula according to newly-increased sub- screen number Y are as follows: Z=Z+Y, wherein Z's is first
Initial value is 1.
The unlocking screen system of the mobile terminal, wherein the unlocked state 400 specifically includes:
Setup unit, for the preset duration for being used for judging that unlock terminates to be arranged.
M is compared for preset threshold and son screen number Z to be made poor remaining sub- screen number M by the second comparing unit with 0,
If M is less than or equal to 0, success is unlocked, if M is greater than 0, shows M value on the screen, and prompt to continue to unlock;
Processing unit, for when prompting for continuing unlock, obtaining the time interval for touching screen next time, if between the time
Every being greater than preset duration, terminate unlock operation, if time interval is less than or equal to preset duration, obtains scribing line track.
The unit module of the unlocking screen system of above-mentioned mobile terminal has all been described in detail in the above-mentioned methods,
Here it just repeats no more.
It, can according to the technique and scheme of the present invention and its hair it is understood that for those of ordinary skills
Bright design is subject to equivalent substitution or change, and all these changes or replacement all should belong to the guarantor of appended claims of the invention
Protect range.