Summary of the invention
Unlock method that the embodiment of the invention provides and terminal have solved and have realized in the prior art that the lock net need utilize the problem of specific software, complex management.
A kind of unlock method that the embodiment of the invention provides comprises:
Whether judge has lock online article spare, if do not have, judge whether described lock online article spare is arranged in the special folder in the temporary folder;
If described lock online article spare is arranged in the described special folder, judge the whether set of lock net flag bit in the described lock online article spare, if set, then according to the lock of the lock net information and executing in described lock online article spare net.
Correspondingly, the embodiment of the invention also provides a kind of terminal that realizes this unlock method, comprising:
First judge module, whether have lock online article spare, and when judgement does not have, notify second judge module if being used for temporary folder;
Described second judge module is used for the notice according to described first judge module, judges whether described lock online article spare is arranged in the special folder, if having, and notice lock net module;
Described lock net module is used for the notice according to described second judge module, judges the whether set of lock net flag bit in the described lock online article spare, if set, then according to the lock of the lock net information and executing in described lock online article spare net.
By such scheme as can be seen, unlock method that the embodiment of the invention provides and terminal by whether lock online article spare is arranged in the temporary folder, if do not have, judge whether described lock online article spare is arranged in the special folder; If in the described special folder described lock online article spare is arranged, judge the whether set of lock net flag bit in the described lock online article spare, if set, then according to the lock of the lock net information and executing in described lock online article spare net, realized easy lock net management, made things convenient for clothes or tester.
Embodiment
Net locking method that the embodiment of the invention provides and terminal have solved and have realized in the prior art that the lock net need utilize the problem of specific software, complex management, be easy to realize and the user with clothes or tester.Specified below in conjunction with accompanying drawing.
Fig. 1 is the schematic flow sheet of the embodiment of the invention one net locking method, and this method comprises:
101, judge whether lock online article spare is arranged,, judge whether described lock online article spare is arranged in the special folder in the temporary folder if do not have;
102, if in the described special folder described lock online article spare is arranged, judge the whether set of lock net flag bit in the described lock online article spare,
103, if set is then locked net according to the lock net information and executing in the described lock online article spare.
In the above-mentioned steps; temporary folder is a visible mutation folder in the terminal system file, and special folder is the sightless zone in the terminal system, for the fail safe that guarantees that this method is used; this zone is protected, can only be by special code interface visit.Lock net information comprises lock network No. information at least.
The net locking method that present embodiment is realized by temporary folder and special folder are set in terminal, have been finished according to lock online article spare and has been carried out the lock net, be easy to realize and the user with clothes or tester.Fig. 2 is the schematic flow sheet of the embodiment of the invention two net locking methods, and is being embodied as example explanation in mobile phone, identical among the temporary folder among the embodiment and special folder and the embodiment one.This method specifically comprises the steps:
201, starting hand-set;
202, judge whether lock online article spare is arranged in the temporary folder, if do not have, execution in step 203, if having, execution in step 209;
Lock online article spare herein can pass through a binary file, comprising lock net flag bit, lock network No. information, end of file can be added digital signature, and in this binary file, add the term of validity that two zones are used for depositing file, realize that form can be as follows:
The term of validity |
Lock net flag bit |
Lock network No. information |
Digital signature |
Digital signature herein can generate by asymmetric, irreversible algorithm.RSA Algorithm for example, pair of secret keys, one is that PKI, one are private key.Lock online article spare is produced and generated by special tool(s), be filled into the file except locking the netting index certificate in the process of making, also need will to lock netting index with private key by RSA Algorithm and it is calculated that out a digital signature, digital signature can add Miru once more and utilize the MD5 scheduling algorithm.This algorithm is bank's a kind of mode of wanting data to use at processor normally, as long as the length of key is enough, complexity is enough, and fail safe is fine.Utilize instrument to generate lock online article spare flow process and can be the input term of validity, lock net flag bit and lock network No. information, the binary file of structure calculated digital signature before these information were filled into, and at last digital signature was filled in this binary file.The instrument that generates lock online article spare has only the specific senior maintenance center of mobile-phone manufacturers or particular safety department to hold, and the demand of all lock nets, release is submitted to mobile-phone manufacturers by Virtual network operator, is generated the file of lock net by mobile-phone manufacturers.
203, judge whether lock online article spare is arranged in the special folder, if do not have, then shutdown if having, is then judged the whether set of lock net flag bit in the described lock online article spare, if set, execution in step 204 if there is not set, is carried out release;
204, according to the lock net information and executing lock net in the lock online article spare;
Lock net flag bit is used for indicating whether lock net, if this flag bit set lock net, then next mobile phone carries out the lock net operation, otherwise, then carry out unlocking operation.Lock net information comprises lock network No. information, digital signature and the term of validity.At the term of validity, be described as follows: this field, only when judging file validation, uses temporary folder.This field lost efficacy after the special folder.Because the operation of lock net generally all is the comparison secret, unfinishedly prevent that the loss of locking online article spare from causing immeasurable loss, the term of validity has been crossed this lock online article spare of this term of validity and just can not have been detected by legitimacy by being put under the temporary folder generally at 1~3 day.In case after legal detection, just be put into special area, in this time, the operation of lock net, release just comes into force, and wants to change operation, just needs to put in temporary folder the legal lock online article spare of new operation information again.
The implementation of the lock net here and the concrete operations of release and prior art is similar, repeats no more herein.
209, judge whether this lock online article spare is legal, if legal, then execution in step 210, if illegal, then delete this lock online article spare;
In order to strengthen fail safe, need also to judge whether lock online article spare is legal, be used to verify the safety zone that whether legal private key and checking algorithm are kept at mobile phone flash, this zone can only be read and can not be write.Increase this step, can prevent that the disabled user from revising lock netting index certificate without authorization.
210, whether before the deadline to judge this lock online article spare, if before the deadline, then execution in step 211, if not before the deadline, then delete this release file;
In order to guarantee to lock the timeliness of online article spare, can also increase by one and judge lock online article spare whether in effective life, concrete, can judge by the term of validity data in the lock online article spare, and can delete the lock online article spare that exceeds the term of validity.
211, with the release document copying in special folder;
After the checking by two steps before, will lock online article spare and copy to the special folder from temporary folder.
212, mobile phone restarts.
Need to prove,, will lock online article spare and copy temporary file to, then can in temporary folder, find lock online article spare, the then situation of execution in step 201-202-209-210-211-212 if before the starting hand-set of above-mentioned steps 201.When starting shooting once more, because the release file copies special folder to from temporary folder, the lock net operation of execution in step 201-202-203-204 then.After mobile phone starts once more, carry out the operation of finishing the lock net from the step of 201-202-203-204.In the lock network process of this method, except starting for the first time, other are restarted and shut down is that mobile phone is finished automatically, do not need the user to participate in, simultaneously, the operation of deletion lock online article spare is not need to point out the user, only need finish in mobile phone consistency operation system, to prevent disabled user's cracking and revising this process.
The net locking method that present embodiment is realized by temporary folder and special folder are set in terminal, have been finished according to lock online article spare and has been carried out the lock net, has increased fail safe and ageing judgement simultaneously, be easy to realize and the user with clothes or tester.
Accordingly, the embodiment of the invention also provides a kind of terminal of using above-mentioned unlock method, and this terminal comprises:
First judge module 301 is used for judging whether temporary folder has lock online article spare, and when judgement does not have, notifies second judge module;
Described second judge module 302 is used for the notice according to described first judge module 301, judges whether described lock online article spare is arranged in the special folder, if having, and notice lock net module;
Described lock net module 303 is used for the notice according to described second judge module 302, judges the whether set of lock net flag bit in the described lock online article spare, if set, then according to the lock of the lock net information and executing in described lock online article spare net.
Optionally, this terminal also comprises: separate lock module 304, be used for carrying out release when described lock net module 303 judges that described lock net flag bit does not have set.
Optionally, this terminal also comprises: authentication module 305 is used for when described first judge module 301 judges that described temporary folder has lock online article spare, judge whether described lock online article spare is legal, if legal, then copy described lock online article spare to described special folder, and restart terminal.
Optionally, the authentication module 305 of this terminal also is used for, judge that described lock online article spare is legal after, and when judging that described lock online article spare is before the deadline, copy described lock online article spare to described special folder, and restart terminal.
Optionally, this terminal also comprises: removing module 306, and be used for described authentication module 305 and judge when described lock online article spare is illegal, delete described lock online article spare.
Optionally, this terminal also comprises: download module 307, be used for described lock online article spare is downloaded to the temporary folder of terminal, and restart described terminal, notify first judge module to judge.
At the term of validity, be described as follows: this field, only when judging file validation, uses temporary folder.This field lost efficacy after the special folder.Because the operation of lock net generally all is the comparison secret, unfinishedly prevent that the loss of locking online article spare from causing immeasurable loss, the term of validity has been crossed this lock online article spare of this term of validity and just can not have been detected by legitimacy by being put under the temporary folder generally at 1~3 day.In case after legal detection, just be put into special area, in this time, the operation of lock net, release just comes into force, and wants to change operation, just needs to put in temporary folder the legal lock online article spare of new operation information again.
The network locking terminal that present embodiment is realized by temporary folder and special folder are set in terminal, have been finished according to lock online article spare and has been carried out the lock net, has increased fail safe and ageing judgement simultaneously, be easy to realize and the user with clothes or tester.
More than be explanation, in concrete implementation process, can carry out suitable improvement, to adapt to the concrete needs of concrete condition method of the present invention to the specific embodiment of the invention.Therefore be appreciated that according to the specific embodiment of the present invention just to play an exemplary role, not in order to restriction protection scope of the present invention.