CN105718784A - Gesture unlocking implementation method based on Javascript - Google Patents

Gesture unlocking implementation method based on Javascript Download PDF

Info

Publication number
CN105718784A
CN105718784A CN201410742997.8A CN201410742997A CN105718784A CN 105718784 A CN105718784 A CN 105718784A CN 201410742997 A CN201410742997 A CN 201410742997A CN 105718784 A CN105718784 A CN 105718784A
Authority
CN
China
Prior art keywords
gesture
unlocking
unlocks
javascript
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410742997.8A
Other languages
Chinese (zh)
Inventor
靳凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201410742997.8A priority Critical patent/CN105718784A/en
Publication of CN105718784A publication Critical patent/CN105718784A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a gesture unlocking implementation method based on Javascript, belonging to the field of intelligent terminals. The gesture unlocking implementation method comprises an adjustable grid unlocking page, an unlocking method and an unlocking rule and comprises the following steps of: creating a DOM node, loading a picture of the adjustable grid unlocking page, and determining the digital ID of each node; binding a touch beginning event, a swiping event, a moving event and a touch ending event; allowing user touch enabling after completing page binding; converting connection point information into digital combination information when gesture unlocking touch is ended, comparing with preset information, and judging whether unlocking is success or not; performing a callback function if unlocking is success; and if not, giving wrong information. According to the invention, the gesture unlocking method is realized based on the Javascript and a Web technology; the gesture unlocking method is applicable to use in mixed applications; furthermore, the original unlocking mode is expanded; and the safety and the applicability are improved.

Description

A kind of gesture based on Javascript unlocks and realizes method
Technical field
The present invention relates to intelligent terminal's technical field, be specifically related to a kind of gesture unblock based on Javascript and realize method.
Background technology
Smart mobile phone is rooted in the hearts of the people as a kind of modern communication instrument, almost staff one machine.When using smart mobile phone, user is accustomed to adding the safeguard procedures of a safety to smart mobile phone.In general, common in smart mobile phone unlocking manner has: password unblock, figure unblock, gesture unblock, unlocked by fingerprint etc..Wherein unlock with gesture the most general, have the compromise of safety and high efficiency concurrently.In Android and iOS native applications, operating system both provides api interface the gesture of calling system acquiescence can unlock application, but apply for the mixing based on Web technology, then be not available for the direct method used.
Summary of the invention
In view of the above problems, propose the present invention to provide a kind of and overcome the problems referred to above or solve the gesture based on Javascript of the problems referred to above at least in part and unlock and realize method, provide a kind of general solution extend existing gesture unlocking function for mixing application..
According to one aspect of the present invention, it is provided that a kind of gesture based on Javascript unlocks and realizes method, unlock the page including adjustable grid, solve locking method and unlock rule, there are following steps:
Step (1), establishment DOM node, load described adjustable grid and unlock the picture of the page, it is determined that each node numeral ID;
Step (2), binding touch beginning event, streak event, moving event and touch End Event;
Step (3), complete described in the page binding after allow user to touch enable;
Step (4), when gesture unlock touch terminate time, connection point information is converted to numeral combined information, compare with presupposed information, it may be judged whether unlock successfully;
Step (5) if unlocking successfully, then performs call back function;
Step (6) if unlocking unsuccessfully, then provides error message.
Further, described step (2) includes following operation:
Described touch beginning event records gesture and unlocks original position;
Streak record junction point positional information in event described, currently put according to described unblock rule judgment simultaneously and whether repeat, if this point is to repeat, then skip this point;
According to the range of error set, described moving event judges that gesture touches node and grid and sets whether the distance between node meets described range of error, simultaneously according to the acceleration of described unblock regular record or deceleration time factor.
Further, it is the 3 nine point type adjustable grids unblock pages being multiplied by 3 that described adjustable grid unlocks the page, and described adjustable refers to that the range of error of the layout to mesh point, size, touch node and setting node carries out presetting as desired.
Further, described unblock rule includes set algorithm and slip factor.
Further, described set algorithm refers to that described adjustable grid unlocks the dot matrix of grid type of arranging on the page, wherein four points of minimum connection, connect at most nine points, access path can intersect, if intermediate point be before already with cross, then this point is skipped.
Further, described slip factor refer to comprise gesture unlock element, simultaneously record gesture sliding process in acceleration or deceleration time factor.
Further, described step (1) including:
Concrete node location is specified at html page;
Call init method, create described DOM node;
Pattern and node serial number are set.
The method have the advantages that the present invention proposes a kind of gesture unblock based on Javascript and realizes method, gesture solution locking method is realized based on Javascript and Web technology, compensate for the limitation not having common solution in mixing application, extend gesture solution locking method simultaneously, specification sets rule, has the compromise of safety and high efficiency concurrently.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding.Figure of description is only for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention.It should be evident that drawings discussed below is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 illustrates that the gesture based on Javascript of according to embodiments of the present invention unlocks and realizes method flow diagram;
Fig. 2 is illustrated based on unlocking described in Fig. 1 the interface schematic diagram of the method that realizes based on the gesture of Javascript.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
It should be noted that employ some vocabulary in the middle of description and claim to censure specific components.Those skilled in the art it would be appreciated that, hardware manufacturer may call same assembly with different nouns.This specification and claims are not used as distinguishing in the way of assembly by the difference of noun, but are used as the criterion distinguished with assembly difference functionally." comprising " or " including " as mentioned in the middle of description and claim in the whole text is an open language, therefore should be construed to " comprise but be not limited to ".Description subsequent descriptions is implement the better embodiment of the present invention, and right described description is for the purpose of the rule of description, is not limited to the scope of the present invention.Protection scope of the present invention is when being as the criterion depending on the defined person of claims.
For ease of the understanding to the embodiment of the present invention, it is further explained explanation below in conjunction with accompanying drawing for several specific embodiments, and each accompanying drawing is not intended that the restriction to the embodiment of the present invention.
Embodiment one, based on Javascript gesture unlock realize method.
The gesture unblock based on Javascript that Fig. 1 is the embodiment of the present invention one realizes method flow diagram, unlocks the page as it is shown in figure 1, the embodiment of the present invention includes adjustable grid, solves locking method and unlock rule, has following steps:
Step S101, establishment DOM node, load described adjustable grid and unlock the picture of the page, it is determined that each node numeral ID;
Step S102, binding touch beginning event, streak event, moving event and touch End Event;
Step S103, complete described in the page binding after allow user to touch enable;
Step S104, when gesture unlock touch terminate time, connection point information is converted to numeral combined information, compare with presupposed information;
Step S105, judge whether to unlock successfully;
If step S106 unlocks unsuccessfully, then provide error message;
If step S107 unlocks successfully, then perform call back function.
In the embodiment of the present invention preferably, described step S102 includes following operation:
Described touch beginning event records gesture and unlocks original position;
Streak record junction point positional information in event described, currently put according to described unblock rule judgment simultaneously and whether repeat, if this point is to repeat, then skip this point;
According to the range of error set, described moving event judges that gesture touches node and grid and sets whether the distance between node meets described range of error, simultaneously according to the acceleration of described unblock regular record or deceleration time factor.
In the embodiment of the present invention preferably, it is the 3 nine point type adjustable grids unblock pages being multiplied by 3 that described adjustable grid unlocks the page, and described adjustable refers to that the range of error of the layout to mesh point, size, touch node and setting node carries out presetting as desired.
In the embodiment of the present invention preferably, described unblock rule includes set algorithm and slip factor.
In the embodiment of the present invention preferably, described set algorithm refers to that described adjustable grid unlocks the dot matrix of grid type of arranging on the page, wherein four points of minimum connection, connect at most nine points, access path can intersect, if intermediate point be before already with cross, then this point is skipped.
In the embodiment of the present invention preferred, described slip factor refers to that comprising gesture unlocks element, the acceleration in record gesture sliding process simultaneously or deceleration time factor.
In the embodiment of the present invention preferably, described step S101 includes:
Concrete node location is specified at html page;
Call init method, create described DOM node;
Pattern and node serial number are set.
The embodiment of the present invention adopts Web technology to be main body, use the technology such as HTML, Javascript, CSS, exploitation Android native applications uses JAVA language and needs based on the Google SDK provided, iOS application Object-C language and Xcode, and Android and iOS native applications can not Cross-border congestion management, can only operate in this platform, and adopt the Web technology can be cross-platform, primary development, multi-platform applicable.
In embodiments of the present invention, user is when using this programme exploitation, need first to specify concrete node location at html page, call init method, the DOM node of 3 × 3 will be automatically created, and pattern and node serial number will be set, create touch-responsive event, last touch operation enables, it is allowed to user begins to use.
It is main body owing to adopting Web technology, when generating the unblock page, the spacing of grid node and own range by CSS and Javascript calculating and are determined complete according to response type Web method for designing, touch point coordinate and movement tendency can be obtained when user slides touch, judge whether coincidence loss scope according to above-mentioned information and record Acceleration and deceleration time information.
In the embodiment of the present invention preferably, can also support that many fingers are simultaneously entered pattern, wherein many fingers are simultaneously entered pattern based on each mobile platform WebKit engine, current various Mainstream Platform all supports multiple point touching technology, after collecting the multiple point touching information of user, algorithm is adopted to calculate movement tendency according to input condition and remove invalid operation.
Fig. 2 is illustrated based on unlocking described in Fig. 1 the interface schematic diagram of the method that realizes based on the gesture of Javascript.
Unlock based on the gesture of Javascript described in the embodiment of the present invention and realize method, unlock the page including nine point type adjustable grids, solve locking method, unlock regular three parts.Certainly, in actual application environment, grid unlock the page can also be ten six or other predefined count.
Described nine point type adjustable grids unlock the page, refer to the dot matrix of grid type of arranging on the page, and user can preset the figure connecting difference and can unlock, and its central idea is to draw different gesture on screen;Traditional method has been extended again by the present invention simultaneously, allows users to the layout of its mesh point is adjusted, and can change its size dimension, simultaneously according to the requirements set touch point of user and the acceptable maximum error scope of set point.
Described solution locking method refers to when user makes to use gesture unblock first, it is necessary to user pre-sets the concrete path unlocking gesture graph, and in order to avoid maloperation, it is necessary to user inputs twice on all four gesture graph, system just confirms preset success and preserve;When normally using, user is first turned on unlocking the page, and input unlocks gesture, it is judged that it is consistent whether graphing unlocks path with default gesture, if unanimously, then unlocks successfully, otherwise failure.
Described unblock rule comprises set algorithm and slip factor.
Wherein, described set algorithm is the dot matrix for grid type of arranging on the page, wherein four points of minimum connection, connect at most nine points, and access path can intersect, as long as without repeating a little, path does not allow to skip the point that midway have to be passed through simultaneously, if but already with crossing before intermediate point, then this point can be skipped.
If for common 3 × 3 dot matrix grids, nine points in dot matrix respectively by numeral 1 to 9 numbering, carry out permutation and combination calculating according to above-mentioned rule, then undesirable set of combination is removed, 30,000 multiple combination patterns will be obtained, therefore there is abundant probability, applied widely.
Wherein, described slip factor refers to that the embodiment of the present invention not only comprises gesture and unlocks element, moreover it is possible to record user sets the time factors such as the acceleration in gesture sliding process, deceleration, extends the function that original gesture unlocks, can also support that many fingers are simultaneously entered pattern, increase gesture and unlock complexity.
The step of method described in the present embodiment also necessarily needs to perform in strict accordance with the order of array, can be inverted order, it is also possible to carry out simultaneously, have no effect on the realization of the present invention between step.
The invention discloses a kind of gesture solution locking method based on Javascript, realize gesture based on Javascript and Web technology to unlock, compensate for the limitation not having common solution in mixing application, extend gesture solution locking method simultaneously, specification sets rule, has safety and high efficiency concurrently.
One of ordinary skill in the art will appreciate that: accompanying drawing is the schematic diagram of an embodiment, module or flow process in accompanying drawing are not necessarily implemented necessary to the present invention.
In description mentioned herein, describe a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details.In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Obviously, the present invention can be carried out various change and modification without deviating from the spirit and scope of the present invention by those skilled in the art.So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (7)

1. the gesture based on Javascript unlocks and realizes method, it is characterised in that includes adjustable grid and unlocks the page, solves locking method and unlock rule, has following steps:
Step (1), establishment DOM node, load described adjustable grid and unlock the picture of the page, it is determined that each node numeral ID;
Step (2), binding touch beginning event, streak event, moving event and touch End Event;
Step (3), complete described in the page binding after allow user to touch enable;
Step (4), when gesture unlock touch terminate time, connection point information is converted to numeral combined information, compare with presupposed information, it may be judged whether unlock successfully;
Step (5) if unlocking successfully, then performs call back function;
Step (6) if unlocking unsuccessfully, then provides error message.
2. the gesture based on Javascript according to claim 1 unlocks and realizes method, it is characterised in that: described step (2) includes following operation:
Described touch beginning event records gesture and unlocks original position;
Streak record junction point positional information in event described, currently put according to described unblock rule judgment simultaneously and whether repeat, if this point is to repeat, then skip this point;
According to the range of error set, described moving event judges that gesture touches node and grid and sets whether the distance between node meets described range of error, simultaneously according to the acceleration of described unblock regular record or deceleration time factor.
3. the gesture based on Javascript according to claim 1 and 2 unlocks and realizes method, it is characterized in that: it is the 3 nine point type adjustable grids unblock pages being multiplied by 3 that described adjustable grid unlocks the page, and described adjustable refers to that the range of error of the layout to mesh point, size, touch node and setting node carries out presetting as desired.
4. unlock according to the arbitrary described gesture based on Javascript of claims 1 to 3 and realize method, it is characterised in that: described unblock rule includes set algorithm and slip factor.
5. the gesture based on Javascript according to claim 4 unlocks and realizes method, it is characterized in that: described set algorithm refers to that described adjustable grid unlocks the dot matrix of grid type of arranging on the page, wherein four points of minimum connection, connect at most nine points, access path can intersect, if intermediate point be before already with cross, then this point is skipped.
6. the gesture based on Javascript according to claim 4 unlocks and realizes method, it is characterised in that: described slip factor refers to that comprising gesture unlocks element, the acceleration in record gesture sliding process simultaneously or deceleration time factor.
7. unlock according to the arbitrary described gesture based on Javascript of claim 1 to 6 and realize method, it is characterised in that: described step (1) including:
Concrete node location is specified at html page;
Call init method, create described DOM node;
Pattern and node serial number are set.
CN201410742997.8A 2014-12-05 2014-12-05 Gesture unlocking implementation method based on Javascript Pending CN105718784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410742997.8A CN105718784A (en) 2014-12-05 2014-12-05 Gesture unlocking implementation method based on Javascript

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410742997.8A CN105718784A (en) 2014-12-05 2014-12-05 Gesture unlocking implementation method based on Javascript

Publications (1)

Publication Number Publication Date
CN105718784A true CN105718784A (en) 2016-06-29

Family

ID=56144430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410742997.8A Pending CN105718784A (en) 2014-12-05 2014-12-05 Gesture unlocking implementation method based on Javascript

Country Status (1)

Country Link
CN (1) CN105718784A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912923A (en) * 2016-06-30 2016-08-31 北京奇虎科技有限公司 Mobile terminal verification method and device
CN108574764A (en) * 2017-03-07 2018-09-25 上海传英信息技术有限公司 A kind of method and device that communication terminal receives calls
CN109918157A (en) * 2019-01-08 2019-06-21 北京航天飞行控制中心 Operation processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634925A (en) * 2008-07-22 2010-01-27 联想移动通信科技有限公司 Method for unlocking keypad through gestures
CN102880398A (en) * 2012-09-24 2013-01-16 惠州Tcl移动通信有限公司 Mobile phone unlocking method based on random digital arrays and mobile phone
CN102968275A (en) * 2012-11-23 2013-03-13 广东欧珀移动通信有限公司 Unlocking method and system of mobile terminal
CN103873591A (en) * 2014-03-31 2014-06-18 广东欧珀移动通信有限公司 Cross-platform cloud unlocking method
CN104134028A (en) * 2014-07-29 2014-11-05 广州视源电子科技股份有限公司 Identity authentication method and system based on gesture characteristics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634925A (en) * 2008-07-22 2010-01-27 联想移动通信科技有限公司 Method for unlocking keypad through gestures
CN102880398A (en) * 2012-09-24 2013-01-16 惠州Tcl移动通信有限公司 Mobile phone unlocking method based on random digital arrays and mobile phone
CN102968275A (en) * 2012-11-23 2013-03-13 广东欧珀移动通信有限公司 Unlocking method and system of mobile terminal
CN103873591A (en) * 2014-03-31 2014-06-18 广东欧珀移动通信有限公司 Cross-platform cloud unlocking method
CN104134028A (en) * 2014-07-29 2014-11-05 广州视源电子科技股份有限公司 Identity authentication method and system based on gesture characteristics

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JS代码网: "九宫格屏幕解锁JQuery特效插件 pattern lock", 《HTTPS://WWW.JS-CSS.CN/A/OPENFRAME/JQUERYAPI/OTHER/2014/0522/1209.HTML》 *
懒人之家: "jquery九宫格模拟Android屏幕解锁插件patternlock", 《HTTPS://WWW.LANRENZHIJIA.COM/JQUERY/2826.HTML》 *
深度开源OPEN经验: "利用jQuery实现类似于Android的图案锁机制:Pattern Lock", 《HTTP://WWW.OPEN-OPEN.COM/LIB/VIEW/OPEN1403234435418.HTML》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912923A (en) * 2016-06-30 2016-08-31 北京奇虎科技有限公司 Mobile terminal verification method and device
CN108574764A (en) * 2017-03-07 2018-09-25 上海传英信息技术有限公司 A kind of method and device that communication terminal receives calls
CN109918157A (en) * 2019-01-08 2019-06-21 北京航天飞行控制中心 Operation processing method and device
CN109918157B (en) * 2019-01-08 2022-05-10 北京航天飞行控制中心 Operation processing method and device

Similar Documents

Publication Publication Date Title
CN104049897B (en) Touch panel device unlock method and device
CN105005439B (en) Icon management method, device and mobile terminal
CN105718784A (en) Gesture unlocking implementation method based on Javascript
CN102830918B (en) Mobile terminal and this mobile terminal regulate the method for display font size
CN103761078A (en) Unlocking method and system for intelligent terminal
CN105825121B (en) Password Input control method and device
CN103076970B (en) Mobile terminal and screen unlock method thereof
CN104063177A (en) Touch screen-based mobile terminal unlocking method, touch screen-based mobile terminal unlocking system and mobile terminal
CN106203275A (en) Method, device and electronic equipment for unlocked by fingerprint
CN103777870A (en) Screen unlocking device for electronic equipment with touch control screen
CN105528333B (en) A kind of method and apparatus of document optimization display
CN104333645A (en) Method and system for realizing rapid operation in touch screen mobile phone
CN103034442B (en) Electronic equipment and the unblock of screen thereof, unlocking information device and method is set
CN104809378A (en) User authentication design method of KVM (Kernel-based Virtual Machine) local management system
CN109101160A (en) Control method, terminal and the computer readable storage medium of terminal
CN106502489A (en) A kind of quick release simultaneously enters the method and device of application
CN105989296B (en) The method and apparatus for controlling application access
CN105677207A (en) Intelligent mobile phone input information editing method and device
CN109426429B (en) Unlocking device, unlocking method and electronic equipment
CN106572236A (en) Method for transferring usage habit setting between terminals and system thereof
CN104598453B (en) Data migration method based on data buffering
CN104951693A (en) Method and system for password input detection based on mobile terminal
CN103442002A (en) Device and method for resetting password
CN104834843A (en) Method and system for multi-terminal password joint unlocking based on common owner
CN101378564B (en) Method and apparatus for implementing multimedia message picture based on touch screen

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160629

RJ01 Rejection of invention patent application after publication