A kind of unlocking method and tripper of terminal
Technical field
The present invention relates to terminal unlocking technical field, more particularly to a kind of unlocking method and its tripper of terminal.
Background technology
With the popularization of terminal, terminal is increasingly becoming one of most instrument of people's daily life contact frequency, its people
The safety of privacy information is self-evident.Terminal is typically necessary user and just provides to prevent unwarranted outside access
True check information, could solve lock screen.Check information can be password, the type such as fingerprint.
Existing unlocking technology has the unlocking methods such as password, figure, fingerprint, iris, vocal print.The easy quilt of biological decryption method
Capture or copy, the unlocking method such as password, figure is easily stolen peeps, all leaky in safety.
The patent of invention of Chinese Patent Application No. 201310742439.7 proposes a kind of electronic installation, including earphone interface
Module, the electronic installation also include cryptographic verification module and unlocked state, and the earphone interface module is included for exporting electricity
The power subsystem and detector unit of source signal, when the earphone jack of the earphone interface module does not have earphone to insert, the inspection
Survey unit to be connected with the power subsystem so as to export a high level signal, when the earphone jack has earphone to insert, institute
State detector unit to disconnect so as to export a low level signal with the power subsystem;The cryptographic verification module with it is described
Detector unit is connected with the output signal of detector unit described in real-time monitoring, the unlocked state and the cryptographic verification module phase
Even, and when the cryptographic verification module monitors to the detector unit export the low level signal it is the electronic installation solution
Lock.The invention further discloses a kind of unlocking method of electronic installation.
But, foregoing invention only judges earphone insertion, extracts two states, does not judge the section of earphone insertion, unblock
Method is excessively simple.
The patent of invention of Chinese Patent Application No. 201410730166.9 proposes a kind of hardware intelligence for intelligent terminal
Energy key, including Intelligent key body, the Intelligent key body include headset plug and button, and the button is arranged on earphone
At the top of plug.The present invention completes to lock the encryption of intelligent terminal's application program in the method for hardware, not only low cost, Er Qiean
Quan Xinggao, solves privacy of user and safety problem;Intelligent key is inserted when needing to unlock the earphone jack of intelligent terminal, is pressed
Lower button can start the APP applications for needing the Intelligent key matching use, without the need for frequently repeatedly inputting password, operation letter
Folk prescription is just.
The hardware Intelligent key for intelligent terminal that foregoing invention is proposed is completed in the method for key should to intelligent terminal
Locked with the encryption of program, not only low cost, and it is safe, solve privacy of user and safety problem;Will when needing to unlock
Intelligent key inserts the earphone jack of intelligent terminal, and starting pushing button by needs to change the APP that Intelligent key could use and answer
With, password need not be frequently repeatedly input, it is simple to operation.In addition, the invention further discloses a kind of hardware Intelligent key
Using method, but not for how the method is implemented further to be specifically described.
The content of the invention
It is an object of the invention to provide one kind is not easy to be hacked or copies, without the need for bright screen and it is difficult to be peeped, pacifies
The unlocking method and its tripper of the terminal of Quan Xinggao
The present invention is adopted the following technical scheme that:
A kind of unlocking method of terminal, comprises the following steps:
By in the earphone interface of the plug insertion terminal of multisection type earphone;
The depth of terminal is inserted according to the plug of the multisection type earphone, unlocking pin is exported;
Check whether the unlocking pin is matched with presetting cipher;It is, then unlock terminal.
Further, the depth of terminal is inserted according to the plug of the multisection type earphone, unlocking pin is exported, it is concrete to wrap
Include:
By detecting that the plug inserts the depth of the earphone interface of terminal, corresponding circuit is connected, and is produced corresponding
Electric signal output;
According to the sequencing of the electric signal output, the unlocking pin is formed.
Further, the depth of the plug insertion terminal of the multisection type earphone is the plug insertion of the multisection type earphone
The connection segmentation of terminal.
Further, the presetting cipher at least includes 6 signals of telecommunication.
Further, the multisection type earphone includes:Three-section earphone, four-section type headset, five-part form earphone.
A kind of unlocking method of terminal, it is characterised in that comprise the following steps:
By in the earphone interface of the plug insertion terminal of multisection type earphone;Plug is adjusted by insertion and/or pull action
The depth in earphone interface;
Insertion and/or the action extracted according to the plug of the multisection type earphone in earphone interface, output unblock are close
Code;
Check whether the unlocking pin is matched with presetting cipher;It is, then unlock terminal.
Further, the insertion and/or the action extracted according to the plug of the multisection type earphone in earphone interface, defeated
Go out unlocking pin, specifically include:
During the earphone interface of plug insertion terminal, whenever a circuit ON, then a corresponding signal of telecommunication is produced
Output;
During plug extracts the earphone interface of terminal, whenever a circuit disconnects, then a corresponding signal of telecommunication is produced
Output;
According to the signal of telecommunication of priority output, the unlocking pin is formed.
Further, the presetting cipher at least includes 6 signals of telecommunication.
Further, the multisection type earphone includes:Three-section earphone, four-section type headset or five-part form earphone.
Based on said method, present invention further propose that a kind of terminal unlocking device, including:The earphone being arranged in terminal
Interface module, secret generation module, cryptographic verification module, unlocked state, and the earphone interface with the earphone interface module
The multisection type earphone of matching;
The earphone interface module is used to export what is produced during the plug of multisection type earphone is plugged in earphone interface
The signal of telecommunication;
The secret generation module is connected with earphone interface module, is generated according to the signal of telecommunication of earphone interface module output close
Code sequence is simultaneously exported;
The cryptographic verification module is connected with secret generation module, for comparing the keying sequence of secret generation module output
And presetting cipher, and export comparing result;
The unlocked state is connected with cryptographic verification module, when cryptographic verification module exports the comparing result of affirmative, solution
Lock terminal unit.
Further, the multisection type earphone includes:Three-section earphone, four-section type headset or five-part form earphone.
Further, also including password setup module, the password setup module is connected with secret generation module, according to close
The keying sequence setting presetting cipher that code generation module is generated.
Further, it is necessary first to which presetting cipher is set to terminal unlocking device;It is when there is earphone insertion earphone interface, close
Whether code setup module detection presetting cipher is empty, is then to set presetting cipher.
The invention provides a kind of locked to terminal and the method and device for being unlocked with hardware.Using the side of the present invention
Method or device technique scheme, which is not easy to be hacked or copies, and without the need for bright screen and is difficult to be peeped, safe, can be with
Specific customization is carried out to earphone.
Description of the drawings
Fig. 1 is common headset plug segmental structure schematic diagram.
Fig. 2 is the signal of telecommunication schematic diagram produced during four-section type headset is inserted or pull out.
The FB(flow block) of Fig. 3 terminal unlock methods of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, the every other embodiment obtained by those skilled in the art, belongs to the scope of protection of the invention.
Terminal in the embodiment of the present invention can include PC, smart mobile phone, panel computer, electronic reader, pen
Remember this computer, car-mounted terminal, Worn type portable equipment etc..
It also should be noted that, for the ease of description, illustrate only in accompanying drawing part related to the present invention rather than
Full content.
With reference to Fig. 1, common headset plug mainly has two kinds of three-stage, four-part form, and wherein three-section earphone plug is more passed
System, only single earpiece function, three sections of contacts are respectively L channel (L), and R channel (R) is grounded (G).Four-section type headset plug master
Mobile phone to be used for, four sections of contacts remove L channel (L), and R channel (R) is grounded (G) outward, and also one contact is mike
(MIC).The sequence of each contact in four-section type headset plug is not quite similar.
The characteristics of present invention makes full use of the multistage contact of headset plug, proposes the terminal unlocking based on headset plugging process
Method, its FB(flow block) are as shown in Figure 3.
Specifically, when there is headset plug insertion earphone interface, system judges whether to use earphone to unlock, if so, then
Prompting input password, after user input password, verifies to password, is verified, terminal unit is unlocked, test
Card failure, then point out to input password again.
If earphone unblock was not used, program is set into unlocking pin.
Prompting arranges earphone unlocking pin for the first time;
Prompting confirms earphone unlocking pin second;
Judge that unlocking pin arranges consistent twice, if so, then password is arranged successfully, again prompting unblock;If it is not, then another
It is secondary the step of be configured unlocking pin.
Embodiment one (the present embodiment is by taking four-section type headset as an example):
By taking the plug of the most commonly used four-section type headset as an example, during its insertion earphone interface, the signal of telecommunication is produced
It is described in detail below:
The plug of four-section type headset is gradually inserted the process of the earphone interface of terminal:
When plug insertion 1/4, connection is L channel (L) circuit, produces a signal of telecommunication;
When plug insertion 2/4, connection is R channel (R) circuit, produces a signal of telecommunication;
When plug insertion 3/4, connection is ground connection (G) circuit, produces a signal of telecommunication;
When plug is entirely insertable, connection is mike (MIC) circuit, produces a signal of telecommunication.
With reference to Fig. 3, a kind of terminal unlock method is as follows:
S101:The plug of four-section type headset is inserted into the earphone interface of terminal.
S102:Judge whether to use earphone to unlock.It is no, then S103 the step of perform unlocking pin arranged below;It is, then
Perform following steps S104.
Specifically, whether password setup module detection presetting cipher is empty, is not use earphone to unlock.
S103:1) earphone unlocking pin is set for the first time.The earphone interface that wherein plug of four-section type headset is inserted every time
Length be one segmentation.
Such as:The plug of four-section type headset first inserts 1/4, produces a L signal;When being inserted into 2/4 position, a R is produced
Signal;When being inserted into 3/4 position, a G-signal is produced;When extracting 2/4 position, a R signal is produced;It is inserted into 3/4
During position, a G-signal is produced;When being entirely insertable, a M signal is produced.Earphone interface module will produce signal, export to
Secret generation module, the sequencing of the signal of telecommunication that secret generation module is exported according to earphone interface module generate unlocking pin
LRGRGM。
Whether detection signal is less than 6, if being less than 6 signals, points out user cipher to need more than 6 signals, if
It is greater than equal to 6 signals, then confirming earphone unlocking pin second.
2) judge that unlocking pin arranges consistent twice.If so, then password is arranged successfully;If it is not, then performing setting again
The step of unlocking pin S103.
Specifically, whether the unlocking pin that cryptographic verification module check is arranged twice is consistent.
Such as:The unlocking pin whether being input into twice is all LRGRGM.
In the step, user can be according to the corresponding unlocking pin of demand fancy setting of oneself.
Can also point out user that unblock information is set simultaneously, prevent user from causing inconvenience because forgetting unlocking pin.
The information can make picture and text prompting, or voice message, can also be the prompting of other forms.
S104:The depth of terminal is inserted according to the plug of the multisection type earphone, unlocking pin is exported;
Specifically, earphone interface module inserts the depth of terminal by detecting the plug of the four-section type headset, connects phase
The circuit answered, and produce corresponding electric signal output;Sequencing of the secret generation module according to the electric signal output, forms
The unlocking pin.The unlocking pin of formation is exported and gives cryptographic verification module by the secret generation module.
Wherein, the depth of the earphone interface of the plug insertion terminal of the multisection type earphone is inserting for the multisection type earphone
The connection segmentation of the earphone interface of head insertion terminal.
S105:Check whether the unlocking pin is matched with presetting cipher;It is, then unlock terminal.It is no, then point out user again
Secondary input unlocking pin.
Specifically, the cryptographic verification module compares the keying sequence and presetting cipher of secret generation module output, compares
Correctly, then control unlocked state to be unlocked for terminal.
Embodiment two:
By taking the most commonly used four-section type headset plug of current mobile phone as an example, which inserts and/or extracts the process of earphone jack
In, the produced signal of telecommunication is as shown in Fig. 2 be described in detail below:
The plug of four-section type headset is gradually inserted the process of the earphone interface of terminal:
It is L channel (L) circuit when what is connected, produces the high level of 1 position of signal, be denoted as L1;
It is R channel (R) circuit when what is connected, produces the high level of 2 position of signal, be denoted as R1;
It is ground connection (GND) circuit when what is connected, produces the high level of 3 position of signal, be denoted as G1;
It is mike (MIC) circuit when what is connected, produces the high level of 4 position of signal, be denoted as M1.
The plug of four-section type headset gradually extracts the process of the earphone interface of terminal:
It is L channel (L) circuit when what is disconnected, produces the low level of 1 position of signal, be denoted as L2;
It is R channel (R) circuit when what is disconnected, produces the low level of 2 position of signal, be denoted as R2;
It is ground connection (GND) circuit when what is disconnected, produces the low level of 3 position of signal, be denoted as G2;
It is mike (MIC) circuit when what is disconnected, produces the low level of 4 position of signal, be denoted as M2.
With reference to Fig. 3, a kind of terminal unlock method is as follows:
S201:The plug of multisection type earphone is inserted into the earphone interface of terminal.
S202:Judge whether to use earphone to unlock;
It is no, then S203 the step of perform unlocking pin arranged below;It is then to perform following steps S204.
Specifically, whether password setup module detection presetting cipher is empty, is not use earphone to unlock.
S203:1) earphone unlocking pin is set for the first time.By insertion of the plug of multisection type earphone in earphone interface
And/or the action extracted, password is set.The length of the action that the plug of wherein described multisection type earphone is inserted or pull out every time is
One segmentation.
Such as:Three-section earphone arranges password, and earphone first inserts 1/3, produces a L1 signal, and records;It is inserted into 2/3
When putting, a R1 signal is produced, and is recorded;The plug of earphone is entirely insertable, a G1 signal is produced, and is recorded;Extract 2/3
During position, a G2 signal is produced, and is recorded;When extracting 1/3 position, a R2 signal is produced, and is recorded;It is inserted into 2/3
During position, a R1 signal is produced, and is recorded;The plug of earphone is entirely insertable, a G1 signal is produced, and is recorded;Extract
During 2/3 position, a G2 signal is produced, and is recorded;When extracting 1/3 position, a R2 signal is produced, and is recorded;All pull out
When going out earphone, a L2 signal is produced, and is recorded.The signal that earphone interface module will be produced, exports to secret generation module, close
The sequencing of the signal of telecommunication that code generation module is exported according to earphone interface module generates unlocking pin
L1R1G1G2R2R1G1G2R2L2。
Four-section type headset arranges password, and earphone first inserts 1/4, produces a L1 signal, and records;It is inserted into 2/4 position
When, a R1 signal is produced, and is recorded;When being inserted into 3/4 position, a G1 signal is produced, and is recorded;Headset plug is entirely insertable
When, a M1 signal is produced, and is recorded;When extracting 3/4 position, a M2 signal is produced, and is recorded;Extract 2/4 position
When, a G2 signal is produced, and is recorded;When extracting 1/4 position, a R2 signal is produced, and is recorded;It is inserted into 2/4 position
When, a R1 signal is produced, and is recorded;When being inserted into 3/4 position, a G1 signal is produced, and is recorded;When extracting 2/4 position,
A G2 signal is produced, and is recorded;When extracting 1/4 position, a R2 signal is produced, and is recorded;When all extracting earphone, produce
A raw L2 signal, and record.The signal that earphone interface module will be produced, exports to secret generation module, secret generation module
Unlocking pin L1R1G1M1M2G2R2R1G1G2R2L2 is generated according to the sequencing of the signal of telecommunication of earphone interface module output.
Even earphone can also be made into five-part form earphone to many circuit definitions of earphone.It is in the present embodiment to arrange more
One Q circuit, i.e., what is connected when the plug of five-part form earphone is entirely insertable is Q circuits, produces the height electricity of 5 position of signal
It is flat, it is denoted as Q1;When all extracting, disconnection is M circuits, produces the low level of 5 position of signal, is denoted as Q2.
Five-part form earphone arranges password, and earphone first inserts 1/5, produces a L1 signal, and records;It is inserted into 2/5 position
When, a R1 signal is produced, and is recorded;When being inserted into 3/5 position, a G1 signal is produced, and is recorded;Extract 2/5 position
When, a G2 signal is produced, and is recorded;When being inserted into 3/5 position, a G1 signal is produced, and is recorded;It is inserted into 4/5 position
When, a M1 signal is produced, and is recorded;When extracting 3/5 position, a M2 signal is produced, and is recorded;It is inserted into 4/5 position
When, a M1 signal is produced, and is recorded;When headset plug is entirely insertable, a Q1 signal is produced, and is recorded;Extract 4/5
When putting, a Q2 signal is produced, and is recorded;When extracting 3/5 position, a M2 signal is produced, and is recorded;Extract 2/5
When putting, a G2 signal is produced, and is recorded;When being inserted into 3/5 position, a G1 signal is produced, and is recorded;Extract 2/5
When putting, a G2 signal is produced, and is recorded;When extracting 1/5 position, a R2 signal is produced, and is recorded;Earphone is extracted all
When, a L2 signal is produced, and is recorded.The signal that earphone interface module will be produced, exports to secret generation module, and password is generated
The sequencing of the signal of telecommunication that module is exported according to earphone interface module generates unlocking pin
L1R1G1G2G1M1M2M1Q1Q2M2G2G1G2R2L2。
The five-part form earphone produces a unique signal position, generates unique keying sequence, and other people cannot
Simulation, can not copy, and compared to three-section earphone and four-section type headset, its privacy degrees is higher.
Whether detection signal is less than 6, if being less than 6 signals, points out user cipher to need more than 6 signals, if
It is greater than equal to 6 signals, then confirming earphone unlocking pin second.
2) judge that unlocking pin arranges consistent twice.If so, then password is arranged successfully;If it is not, then performing setting again
The step of unlocking pin S203.
Specifically, whether the unlocking pin that cryptographic verification module check is arranged twice is consistent.
Such as:The unlocking pin whether three-section earphone is input into twice is all L1R1G1G2R2R1G1G2R2L2;Four-part form ear
The unlocking pin whether machine is input into twice is all L1R1G1M1M2G2R2R1G1G2R2L2;What whether five-part form earphone was input into twice
Unlocking pin is all L1R1G1G2G1M1M2M1Q1Q2M2G2G1G2R2L2.
In the step, user can be according to the corresponding unlocking pin of demand fancy setting of oneself.Can also point out simultaneously to use
Family arranges unblock information, prevents user from causing inconvenience because forgetting unlocking pin.
The information can make picture and text prompting, or voice message, can also be the prompting of other forms.
S204:Insertion and/or the action extracted according to the plug of the multisection type earphone in earphone interface, output solution
Lock cipher.
Specifically, during the earphone interface of plug insertion terminal, whenever a circuit ON, then produce one accordingly
Electric signal output.
During plug extracts the earphone interface of terminal, whenever a circuit disconnects, then a corresponding signal of telecommunication is produced
Output.
The signal that earphone interface module will be produced, exports to secret generation module, and secret generation module is according to earphone interface
The sequencing of the signal of telecommunication of module output generates unlocking pin.Secret generation module exports the unlocking pin of generation to password
Inspection module.
S205:Check whether the unlocking pin is matched with presetting cipher;It is, then unlock terminal.It is no, then point out user again
Secondary input unlocking pin.
Specifically, the cryptographic verification module compares the keying sequence and presetting cipher of secret generation module output, compares
Correctly, then control unlocked state to be unlocked for terminal.
The purpose of the present embodiment is just to provide a kind of extra unlocking method.Earphone is regarded as a key for opening a terminal
Spoon, the signal of telecommunication produced by circuit ON/disconnection change into password, and password meets preset unlocking pin then unlock terminal.
The similar key of whole process opens door lock, meets mankind's custom.
A kind of preferred terminal unlocking device, including the earphone interface module, secret generation module being arranged in terminal, close
Code check module, unlocked state, and the multisection type earphone matched with the earphone interface of the earphone interface module;
The earphone interface module is used to export what is produced during the plug of multisection type earphone is plugged in earphone interface
The signal of telecommunication.
The secret generation module is connected with earphone interface module, is generated according to the signal of telecommunication of earphone interface module output close
Code sequence is simultaneously exported.
The cryptographic verification module is connected with secret generation module, for comparing the keying sequence of secret generation module output
And presetting cipher, and export comparing result.
The unlocked state is connected with cryptographic verification module, when cryptographic verification module exports the comparing result of affirmative, solution
Lock terminal unit.
The multisection type earphone includes:Three-section earphone, four-section type headset or five-part form earphone.
Further, above-mentioned terminal unlocking device also includes password setup module, the password setup module and password
Generation module connects, according to the keying sequence setting presetting cipher that secret generation module is generated.
Presetting cipher is set firstly the need of to terminal unlocking device;When there is earphone insertion earphone interface, password arranges mould
Whether block detection presetting cipher is empty, is then to set presetting cipher.
Compared with prior art, the invention provides a kind of approach that obtains of new check information, in the multisection type ear
The machine transplanting of rice enters, extracts in the cycle of earphone interface, and multisection type earphone rests on the process of diverse location in earphone interface and corresponds to one
The process of individual information input.The plug that multisection type earphone is exported using earphone interface module is produced during plugging in earphone interface
The raw signal of telecommunication, sequencing of the secret generation module according to the electric signal output form unlocking pin.Secret generation module
The unlocking pin of formation is exported and gives cryptographic verification module.Cryptographic verification module compares the keying sequence of secret generation module output
And presetting cipher, compare correctly, then control unlocked state and be unlocked for terminal.Earphone is regarded as a key for opening a terminal
Spoon, the signal of telecommunication produced by circuit ON/disconnection change into password, and password meets preset unlocking pin then unlock terminal.
The similar key of whole process opens door lock.
The method locked to terminal with being unlocked with hardware by the present invention, the method are not easy to be hacked or copy, nothing
Need bright screen and be difficult to be peeped, it is safe, specific customization can also be carried out to earphone, such as many circuit definitions, make five into
Segmentation earphone, then equivalent to a Physical key, hardware encryption, it more difficult to crack, so as to solve privacy of user and safety problem.
Although having been presented for some embodiments of the present invention herein, it will be appreciated by those of skill in the art that
Without departing from the spirit of the invention, the embodiments herein can be changed.Above-described embodiment be it is exemplary, no
Should be using the embodiments herein as the restriction of interest field of the present invention.