Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " one " used herein, " one
It is individual ", " described " and "the" may also comprise plural form.It is to be further understood that what is used in the specification of the present invention arranges
Diction " comprising " refer to the feature, integer, step, operation, element and/or component be present, but it is not excluded that in the presence of or addition
One or more other features, integer, step, operation, element, component and/or their groups.It should be understood that when we claim member
Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " can include wireless connection or wireless coupling.It is used herein to arrange
Taking leave "and/or" includes whole or any cell and all combinations of one or more associated list items.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific terminology), there is the general understanding identical meaning with the those of ordinary skill in art of the present invention.Should also
Understand, those terms defined in such as general dictionary, it should be understood that have with the context of prior art
The consistent meaning of meaning, and unless by specific definitions as here, idealization or the implication of overly formal otherwise will not be used
To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " intelligent terminal " both include wireless communication
The equipment of number receiver, it only possesses the equipment of the wireless signal receiver of non-emissive ability, includes receiving again and transmitting hardware
Equipment, its have on bidirectional communication link, can carry out two-way communication reception and launch hardware equipment.This equipment
It can include:Honeycomb or other communication equipments, it has single line display or multi-line display or shown without multi-line
The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), it can
With combine voice, data processing, fax and/or its communication ability;PDA (Personal Digital Assistant, it is personal
Digital assistants), it can include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day
Go through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm
Type computer or other equipment, its have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or its
His equipment." terminal " used herein above, " intelligent terminal " they can be portable, can transport, installed in the vehicles (aviation,
Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth
And/or any other position operation in space." terminal " used herein above, " intelligent terminal " can also be communication terminal, on
Network termination, music/video playback terminal, such as can be PDA, MID (Mobile Internet Device, mobile Internet
Equipment) and/or mobile phone or the equipment such as intelligent television, set top box with music/video playing function.
The technical scheme of the embodiment of the present invention is specifically introduced below in conjunction with the accompanying drawings.
The intelligent terminal of the embodiment of the present invention is configured with the program including operating system and a variety of applications, can support network
The function such as communication and data processing.For example, intelligent terminal can be including at least one of following:Smart mobile phone, tablet personal computer, two
Unify computer, notebook computer, electronic reader, Intelligent worn device, intelligent video camera head, drive recorder etc..
Processor, internal memory and at least one external memorizer are provided with the intelligent terminal of the embodiment of the present invention.
At least one program, including external memorizer service routine are stored with internal memory, it is outer to be mainly used in realization
The operating method of memory is connect, this method will subsequently elaborated, and do not repeated herein.
External memorizer is specially one of following items:MMC (Multi-Media Card, multimedia card), SD (Secure
Digital, secure digital) block, TF (TransFLash, quick flashing) cards, safe SDIO (Secure Digital Input and
Output, digital IO) card, Combo SD (Combo Secure Digital, multifunctional safe numeral) cards etc..
Internal memory and at least one external memorizer are all electrically connected with processor.
External memorizer in the embodiment of the present invention can be contacted by welding, grafting, Kato maintenance etc. mode with it is corresponding
The electrical connection of external memorizer interface, external memorizer interface electrically connects with processor.
For example, TF card (pin of pin or internal circuit) is welded on the circuit board of intelligent terminal, and deposited with external
Memory interface electrically connects.TF card is plugged on MMC/SD/SDIO interfaces.TF card is arranged in Kato and specified in screens, and Kato is inserted
When entering the designated depth into intelligent terminal, TF and MMC/SD/SDIO interface contacts are simultaneously electrically connected.
External memorizer in the embodiment of the present invention can be located at the inside of intelligent terminal body.Such as it is welded on intelligent end
The TF card on circuit board inside end, or, TF card being plugged in the MMC/SD/SDIO interfaces inside intelligent terminal etc..
External memorizer can also be located at the outside of intelligent terminal body.For example, outside card reader is plugged on intelligent end
In the interface of the specified bus at end, TF card is plugged in the card reader, and now TF card passes through card reader and specified bus and intelligence
Processor electrical connection in terminal.
Fig. 1 is the block schematic illustration of an example of the intelligent terminal of the embodiment of the present invention.The intelligence of the embodiment of the present invention
The processor of equipment includes MMC/SD/SDIO master controllers;MMC/SD/SDIO master controllers in Fig. 1, are electrically connected with TF card,
And the operation to TF card is controlled.At least one program bag in the internal memory of the smart machine of the embodiment of the present invention
Include:The application program of kernel program and application layer (is referred to as applied);Kernel program includes the MMC/SD/ of kernel spacing in Fig. 1
SDIO drives;Using the external memorizer service routine including user's space, external memorizer service routine includes TF card certification
Instrument, TF card authentication means have plus (content of TF card) is wiped in unblock (TF card), pressure, set password and remove the work(such as password
Energy.
Interacted using the driver by inner nuclear layer and hardware interface with external memorizers such as TF cards.For just
In understanding, subsequently for the information passing steps between the external memorizers such as application and TF card, omit in these steps and drive journey
The part that sequence and hardware interface are related to, it is reduced to apply the direct information between external memorizer to pass on character express
Pass.
A kind of operating method of external memorizer provided in an embodiment of the present invention is described below, including:Receive for the
During the operation requests of one external memorizer, the current password for the first external memorizer is obtained, starts at least one external deposit
The initialization of reservoir is until selecting the first external memorizer and interrupting the initialization of the first external memorizer;According to current password,
First external memorizer is unlocked;When receiving the unblock success message of the first external memorizer return, recover outside first
The initialization of memory is connect, and make it that the first external memorizer is operated according to operation requests.
At least one external memorizer in the embodiment of the present invention includes the first external memorizer.Some is directed to when receiving
During the operation requests of external memorizer, it is the first external memorizer to determine that the external memorizer.First external memorizer, it is actual
On be any one external memorizer at least one external memorizer.
In the embodiment of the present invention, by external memorizer is carried out in itself plus unblock, substitute it is traditional to data carry out plus solve
It is close;External memorizer is carried out in itself plus unlocked, carries out encryption and decryption compared to traditional data in memory, more quickly
Efficiently;External memorizer is carried out in itself plus unblock is not take up the space that external memorizer is used for data storage, improving storage
Space utilizes level.Moreover, it is necessary to start the first external storage when receiving the operation requests for the first external memorizer
The initialization and interruption of device, expression carry out operation to external memorizer every time and are required for initializing external memorizer;Root
The current password obtained when factually is unlocked to the first external memorizer, shows to identify unlocking function applied to initialization
Cheng Zhong;Just recover the initialization of the first external memorizer when unlocking successfully and perform respective operations, it is meant that what is do not unlocked is outer
Connect memory to will be unable to complete initialization, now all programs such as the operating system in intelligent terminal or rogue program all can not
External memorizer (i.e. the external memorizer is not present for the rogue program in intelligent terminal) is identified, can be prevented illegal
Operation and rogue program intrusion, greatly promote the security of data in external memorizer.
The method to set up of the initial password of the external memorizer of the embodiment of the present invention, the flow signal of this method is described below
Figure is as shown in Fig. 2 comprise the steps:
S201:Initialize the first external memorizer.
After intelligent terminal detects the first external memorizer for the first time, it is initialized.
S202:Obtain the password for the first external memorizer.
External memorizer service routine in internal memory, obtain the password for the first external memorizer.
It is preferred that obtain subscriber identity information;Intelligent terminal system information belonging to acquisition;According to subscriber identity information and it is
System information, determines the password for the first external memorizer.
System information includes at least one of following:It is the version number of operating system, the completeness check code of operating system, external
Firmware (firmware) version number of memory, integrity check value, the hardware of external memorizer of the firmware of external memorizer
The hardware information of information, affiliated intelligent terminal.The hardware information of external memorizer includes at least one of following:External memorizer
Research and develop unit, manufacturer, manufacturing process, unique mark.The hardware information of intelligent terminal includes at least one of following:Intelligence is eventually
Research and development unit, manufacturer, manufacturing process, processor model, base band model, the unique mark at end.
Further, subscriber identity information inputting interface is shown, and display reminding is used in subscriber identity information inputting interface
Family inputs the information of subscriber identity information;The subscriber identity information of user's input is received by subscriber identity information inputting interface.
For example, when determining to detect the first external memorizer for the first time, the TF card authentication means of application layer are used
" setting password " function, show subscriber identity information inputting interface, and the display reminding in subscriber identity information inputting interface
User inputs the information of subscriber identity information;The user identity that user's input is received by subscriber identity information inputting interface is believed
Breath.
Further, according to subscriber identity information and system information, the Hash Value of initial length is generated;By the miscellaneous of initial length
Gather value, be divided at least two Hash Value subsequences of designated length;Carry out specifying computing, generation based on each Hash Value subsequence
For the password of the first external memorizer.
For example, using hash algorithm, hash operation is carried out to subscriber identity information and system information, generates the miscellaneous of 32 bytes
Gather value (being actually sequence);The Hash Value of 32 bytes is divided into the first Hash Value subsequence of preceding 16 bytes and latter 16
Second Hash Value subsequence of byte;First and second Hash Value subsequence is subjected to XOR, obtains being directed to the first external storage
The password of 16 bytes of device.Further, password is specially LOCK_UNLOCK (adding unblock) password.
S203:According to the password for the first external memorizer of acquisition, initial password is carried out to the first external memorizer
Setting.
External memorizer service routine in internal memory, by the password for the first external memorizer of acquisition to
One external memorizer is sent so that the first external memorizer enters the password of reception as the initial password of the first external memorizer
Row storage.
It is preferred that generation carries the locking command packet of the password for the first external memorizer.Specifically, will lock
Command packet is arranged to lock (LOCK) pattern, and sets to lock and to be carried in command packet be directed to the first external storage
The length (such as 16 bytes) of the password of device, locking command packet is carried on by the password for the first external memorizer
In, so as to obtain carrying the locking command packet of the password for the first external memorizer.
According to the Password Length for locking command packet, generate block length setting command and sent out to the first external memorizer
Send.For external memorizer using memory block as memory cell, block length setting command carries the storage block length in external memorizer
(BLOCK_LENGTH).It is preferred that block length setting command is specifically as follows CMD (CoMmanD) 16, i.e., No. 16 order.
The storage block length that first external memorizer carries according to the block length setting command of reception, to this external memorizer
In the length of specified memory block set, return to the message that runs succeeded after setting successfully.Block length is stored to grow more than password
Degree.
Receive the first external memorizer for block length setting command return run succeeded message when, according to lock order
The password for the first external memorizer in packet is made, the Lock mode of generation carrying password adds unlocking command to first
External memorizer is sent.First external memorizer regard the password for the first external memorizer of reception as this external memorizer
Initial password be stored in designated area;For example, it is stored in PWD (PassWorD) register.
It is preferred that receive the first external memorizer for block length setting command return run succeeded message when, will
Lock command packet in the password for the first external memorizer be carried on Lock mode add unlocking command in, to first
External memorizer is sent.It is preferred that plus unlocking command be specifically as follows CMD42, i.e., No. 42 order.First external memorizer will
The password for the first external memorizer added in unlocking command of the Lock mode of reception, as the initial of this external memorizer
Password storage is in designated area.
A kind of operating method of the expansion of external memorizer of the embodiment of the present invention, the flow of this method is described in detail below
Schematic diagram is as shown in figure 3, comprise the following steps:
S301:Receive the operation requests for the first external memorizer.
External memorizer service routine in internal memory, detect that user external is deposited by applications trigger for first
During the operation of reservoir, confirm to receive the operation requests for the first external memorizer.For the operation of the first external memorizer
Request can include at least one of following:Formatted requests for the first external memorizer, for the first external memorizer
Read-write requests.
S302:Obtain the current password for the first external memorizer.
External memorizer service routine in internal memory, is received for the first external memorizer in above-mentioned steps
After operation requests, in this step, the current password for the first external memorizer is obtained.
It is preferred that obtain current subscriber identity information;The current system information of intelligent terminal belonging to acquisition;According to current
Subscriber identity information and system information, determine the current password for the first external memorizer.
System information includes at least one of following:It is the version number of operating system, the completeness check code of operating system, external
The firmware version number of memory, the integrity check value of the firmware of external memorizer, the hardware information of external memorizer, affiliated intelligence
The hardware information of energy terminal.The hardware information of external memorizer includes at least one of following:Research and development unit, the system of external memorizer
Make unit, manufacturing process, unique mark.The hardware information of intelligent terminal includes at least one of following:The research and development list of intelligent terminal
Position, manufacturer, manufacturing process, processor model, base band model, unique mark.
Further, subscriber identity information inputting interface is shown, and display reminding is used in subscriber identity information inputting interface
Family inputs the information of subscriber identity information;The current user identity of user's input is received by subscriber identity information inputting interface
Information.
Further, according to current subscriber identity information and system information, the Hash Value of initial length is generated;To initially it grow
The Hash Value of degree, it is divided at least two Hash Value subsequences of designated length;Carry out specifying fortune based on each Hash Value subsequence
Calculate, current password of the generation for the first external memorizer.
For example, using hash algorithm, hash operation is carried out to current subscriber identity information and system information, generates 32 words
The Hash Value (being actually sequence) of section;By the Hash Value of 32 bytes be divided into preceding 16 bytes the first Hash Value subsequence and
Second Hash Value subsequence of 16 bytes afterwards;First and second Hash Value subsequence is subjected to XOR, obtains being directed to outside first
Connect the current password of 16 bytes of memory.Further, current password is specially LOCK_UNLOCK (adding unblock) password.
S303:Start the initialization of at least one external memorizer until selected first external memorizer and interrupt outside first
Connect the initialization of memory.
In fact, for step S302 and S303, the two steps can perform simultaneously, can also first carry out a step
After perform another step.
External memorizer service routine in internal memory, is received in above-mentioned steps for the first external memorizer
Operation requests after, start in this step the initialization of at least one external memorizer until selected first external memorizer and in
The initialization of disconnected first external memorizer.
It is preferred that Fig. 4 is the flow of an example of the operating method of the expansion of external memorizer in the embodiment of the present invention
Schematic diagram.In Fig. 4, when at least one external memorizer is all external connection of storage card (such as TF card), start at least one external
The initialization of memory until select the first external memorizer specifically include to the embodiment of the present invention in intelligent terminal at least one
Individual external memorizer performs following step:CMD0 is sent to be resetted;Send CMD8 detection card operating conditions;ACMD41 is sent to set
Operating condition is put, CMD11 is sent and carries out voltage switching;Send CMD2 and obtain CID;Send CMD3 and card address is set;Send CMD7
Selection card.Now, the card based on CMD7 selections is the first external memorizer;Also, now interrupt the first external memorizer
Initialization, that is, rest on and send CMD7 selection cards this steps, and pause performs subsequent step.
S304:According to current password, the first external memorizer is unlocked.
External memorizer service routine in internal memory, current password is sent to the first external memorizer so that
The initial password and the comparative result of current password that first external memorizer prestores according to it are unlocked.
It is preferred that generation carries the unlocking command packet of current password.Specifically, unlocking command packet is arranged to
(UNLOCK) pattern of unblock, and the length (such as 16 bytes) of current password to be carried in unlocking command packet is set,
Current password is carried in unlocking command packet, so as to generate to obtain the unlocking command packet for carrying current password.
According to the Password Length of unlocking command packet, generate block length setting command and sent out to the first external memorizer
Send.For external memorizer using memory block as memory cell, block length setting command carries the storage block length in external memorizer.
It is preferred that block length setting command is specifically as follows CMD (CoMmanD) 16, i.e., No. 16 order.
The storage block length that first external memorizer carries according to the block length setting command of reception, to this external memorizer
In the length of specified memory block set, return to the message that runs succeeded after setting successfully.Block length is stored to grow more than password
Degree.
Receive the first external memorizer for block length setting command return run succeeded message when, according to unblock order
The current password in packet is made, the latching mode plus unlocking command of generation carrying current password is sent out to the first external memorizer
Send.It is preferred that receive the first external memorizer for block length setting command return run succeeded message when, will unblock life
It is making that the current password in packet is carried on latching mode plus in unlocking command, sent to the first external memorizer.Further,
Unlocking command is added to be specifically as follows CMD42, i.e., No. 42 order.
For example, as shown in figure 4, after the step of immediately sending CMD7 selection cards, first sent to the first external memorizer
CMD16 sets data length, then sends CMD42 unlocking commands to the first external memorizer.
The initial password that first external memorizer is prestored, it is current in unlocking command with adding for the latching mode of reception
Password is compared.It is preferred that the initial password that the first external memorizer will be pre-stored in PWD registers, the unblock with reception
Current password in the CMD7 of pattern is compared.
When password comparative result shows that initial password is consistent with current password, the first external memorizer is unlocked,
Allow to operate the data in the first external memorizer, unblock success message is returned to external memory services program;When
When password comparative result shows that initial password and current password are inconsistent, the first external memorizer is not unlocked, keeps the
One external memorizer is in locking state, forbids operating the data in the first external memorizer, to transmission operation requests
Application return unblock failed message.
S305:When receiving the unblock success message of the first external memorizer return, recover the first of the first external memorizer
Beginningization, and make it that the first external memorizer is operated according to operation requests.
It is preferred that sending the application of operation requests, when receiving the unblock success message of the first external memorizer return, enter
Row system is called, and recovers the initialization of the first external memorizer.
It is preferred that as shown in figure 4, when the first external memorizer is the first external connection of storage card (such as TF card), recover the
The initialization of one external memorizer specifically includes performs following step to the first external memorizer:Sending ACMD6 sets data wide
Degree;Judge whether the first external memorizer is UHS-I (Ultra High Speed class1, ultrahigh speed 1) cards;If so, then send out
Send CMD6 that card electrical characteristic is set;Send CMD19 and sampling clock is set;When judging that the first external memorizer is not UHS-I cards
When, above-mentioned several steps of this section are skipped, directly determine that the first external memorizer completes initialization.
For example, when the first external memorizer is TF card, sends ACMD6 and set data width to specifically include:According to the TF
The supported data bits of card, ACMD6 contents are organized, and sent to the TF card, data width is set.Send CMD6 and card electricity is set
Gas characteristic specifically includes:Perform CMD6 orders and set gradually Driver strength (driving force), UHS-I mode (operations
Pattern) and the electrical characteristic parameter such as Current limit (current limit).Sending CMD19 sets sampling clock to specifically include:Hold
Row CMD19 orders set TF card sampling clock.
After first external connection of storage card unlocks successfully, unblock success message is sent to external memory services program.It is external to deposit
After reservoir service routine solution is locked into the unblock success message of the first external connection of storage card return, forwards and apply to the first external connection of storage card
Operation requests.The first external memorizer after unblock is operated according to operation requests;After end of operation, to external memorizer
Service routine returns to the end of operation message for operation requests.Such as in Fig. 4, card identification is completed, carries out data transmission pattern
The step of.
For example, the data stored in the first external memorizer are read according to read request;Or according to write request to outside first
Connect (or being related to) data of memory write write request carrying;Or the first external memorizer is arranged to according to write request
Data-transmission mode, the data to be written of subsequent source self-application are write into the first external memorizer.
S306:Receive the first external memorizer be directed to operation requests end of operation message when, to the first external storage
Device is locked.
External memorizer service routine receive the first external memorizer be directed to operation requests end of operation message when, it is right
First external memorizer is locked.
It is preferred that generation carries the locking command packet of current password.Specifically, command packet will be locked to be arranged to
(LOCK) pattern of locking, and the length (such as 16 bytes) for locking current password to be carried in command packet is set, will
Current password, which is carried on, to lock in command packet, so as to obtain carrying the locking command packet of current password.
According to the Password Length for locking command packet, generate block length setting command and sent out to the first external memorizer
Send.For external memorizer using memory block as memory cell, block length setting command carries the storage block length in external memorizer
(BLOCK_LENGTH).It is preferred that block length setting command is specifically as follows CMD (CoMmanD) 16, i.e., No. 16 order.
The storage block length that first external memorizer carries according to the block length setting command of reception, to this external memorizer
In the length of specified memory block set, return to the message that runs succeeded after setting successfully.Block length is stored to grow more than password
Degree.
Receive the first external memorizer for block length setting command return run succeeded message when, according to lock order
The current password in packet is made, the Lock mode plus unlocking command of generation carrying current password is sent out to the first external memorizer
Send.It is preferred that receive the first external memorizer for block length setting command return run succeeded message when, by lock order
It is making that the current password in packet is carried on Lock mode plus in unlocking command, sent to the first external memorizer.Further,
Unlocking command is added to be specifically as follows CMD42, i.e., No. 42 order.
For example, as shown in figure 4, immediately complete card identification, it is first external to first after the step of carrying out data transmission pattern
Memory sends CMD16 and sets data length, then sends CMD42 to the first external memorizer and lock order.
The initial password that first external memorizer is prestored, it is current in unlocking command with adding for the Lock mode of reception
Password is compared.It is preferred that the initial password that the first external memorizer will be pre-stored in PWD registers, the locking with reception
Current password in the CMD7 of pattern is compared.
When password comparative result shows that initial password is consistent with current password, the first external memorizer is locked,
Returned to external memory services program and lock success message;When password comparative result shows that initial password differs with current password
During cause, the first external memorizer is not locked, returned to the application for sending operation requests and lock failed message.
In fact, the first external memorizer is unlocked according to current password in above-mentioned steps S304, it is also possible to lose
Lose;When external memorizer service routine in internal memory receives the unblock failed message of the first external memorizer return,
Judge whether current unblock failure cumulative frequency reaches unblock failure cumulative frequency threshold value.Those skilled in the art can basis
Experimental data, historical data, and/or actual conditions etc. are predetermined to be gone out to unlock failure cumulative frequency threshold value;For example, unblock failure
Cumulative frequency threshold value is 3 (secondary).
When judged result for it is no when, re-execute from the current password for the first external memorizer is obtained to outside first
The step of memory is unlocked is connect, that is, retries row above-mentioned steps S302 to S304.
Message when judged result when being, to be not present to application the first external memorizer of return for sending operation requests.
Specifically, when judged result is to be, application of the external memorizer service routine to transmission operation requests in internal memory
Return to the message that the first external memorizer is not present.
Based on the operating method of above-mentioned external memorizer, the embodiment of the present invention additionally provides a kind of operation of external memorizer
Device, the device are arranged in the intelligent terminal of the embodiment of the present invention, block schematic illustration such as Fig. 5 institutes of the internal structure of the device
Show, including:Password obtains and initialization interrupt module 501, memory add unlocked state 502 and initialization recovers and operation module
503。
Wherein, password obtains and initialization interrupt module 501 please for the operation received for the first external memorizer
When asking, the current password for the first external memorizer is obtained, starts the initialization of at least one external memorizer until selected
First external memorizer and the initialization for interrupting the first external memorizer.
Memory adds unlocked state 502 to be used for according to current password, and the first external memorizer is unlocked.
When initialization recovers and operation module 503 is used to receive the unblock success message of the first external memorizer return,
Recover the initialization of the first external memorizer, and make it that the first external memorizer is operated according to operation requests.
It is preferred that password obtains and initialization interrupt module 501 is specifically used for obtaining current subscriber identity information;Obtain
The current system information of affiliated intelligent terminal;According to current subscriber identity information and system information, determine to be directed to outside first
Connect the current password of memory.
It is preferred that password obtains and initialization interrupt module 501 is specifically used for display subscriber identity information inputting interface, and
Display reminding user inputs the information of subscriber identity information in subscriber identity information inputting interface;It is defeated by subscriber identity information
Enter the current subscriber identity information that interface receives user's input;And according to current subscriber identity information and system information,
Generate the Hash Value of initial length;By the Hash Value of initial length, at least two Hash Value subsequences of designated length are divided into;
Carry out specifying computing, current password of the generation for the first external memorizer based on each Hash Value subsequence.
It is preferred that memory adds unlocked state 502 to be specifically used for sending current password to the first external memorizer so that
The initial password and the comparative result of current password that first external memorizer prestores according to it are unlocked.
It is preferred that memory adds unlocked state 502 to be specifically used for the unlocking command packet that generation carries current password;Root
According to the Password Length of unlocking command packet, generate block length setting command and sent to the first external memorizer;Receive
One external memorizer for block length setting command return run succeeded message when, it is current in unlocking command packet
Password, the latching mode plus unlocking command of generation carrying current password are sent to the first external memorizer.
More excellent, memory adds unlocked state 502 to be additionally operable to receive the behaviour that the first external memorizer is directed to operation requests
When finishing message, the first external memorizer is locked.
Further, memory adds unlocked state 502 to be specifically used for the locking command packet that generation carries current password;Root
According to the Password Length for locking command packet, generate block length setting command and sent to the first external memorizer;Receive
One external memorizer for block length setting command return run succeeded message when, according to lock command packet in it is current
Password, the Lock mode plus unlocking command of generation carrying current password are sent to the first external memorizer.
More excellent, initialization recovers and operation module 503 is additionally operable to receive the unblock mistake that the first external memorizer returns
When losing message, judge whether current unblock failure cumulative frequency reaches unblock failure cumulative frequency threshold value;When judged result is
When no, interrupt module transmission is obtained and initialized to password and re-executes notice;When judged result for when being, being operated to transmission please
The application asked returns to the message that the first external memorizer is not present.
And password obtains and initialization interrupt module 501, memory add unlocked state 502 and initialization recovers and behaviour
Make module 503 to be additionally operable to according to re-executing notice, re-execute from obtain the current password that is directed to the first external memorizer to
The step of being unlocked to the first external memorizer.
Above-mentioned password obtains and initialization interrupt module 501, memory add unlocked state 502 and initialization recovers and operation
The implementation method of the function of module 503, may be referred to the step flow as shown in above-mentioned Fig. 2-4 and its method before it is specific in
Hold, here is omitted.
The embodiment of the present invention additionally provides a kind of intelligent terminal, the framework of an example of the internal structure of the intelligent terminal
Schematic diagram is as shown in fig. 6, for convenience of description, illustrate only the part related to the embodiment of the present invention, particular technique details is not
Disclose, refer to present invention method part.
With reference to figure 6, the intelligent terminal of the embodiment of the present invention includes:Internal memory 610, at least one external memorizer
620th, the part such as input block 630, display unit 640, processor 650.Internal memory circuit 610, external memorizer 620,
Input block 630 and the grade part of display unit 640 are all electrically connected with processor 650.It will be understood by those skilled in the art that figure
The intelligent terminal structure shown in 6 does not form the restriction to intelligent terminal, can include than illustrating more or less parts,
Either combine some parts or different parts arrangement.
Each component parts of intelligent terminal is specifically introduced with reference to Fig. 6:
Internal memory 610 can be used for storage software program and module, including needed for operating system, at least one function
Application program (such as sound-playing function, image player function etc.) and external memorizer service routine etc..Internal memory
610 can be used for storing the data after a variety of pending and/or processing.Internal memory 610 can be deposited including high random access
Reservoir (also known as internal memory) and nonvolatile memory.
Each external memorizer 620 mode such as can be contacted by welding, grafting or Kato maintenance and external be deposited with corresponding
Memory interface electrically connects, and external memorizer interface electrically connects with processor 650.External memorizer 620 can be located at intelligent terminal
Body it is internal or external.
Input block 630 can be used for receiving input information.Input block 630 may include contact panel, physical button, Mike
Wind, camera and physical interface etc..Contact panel, also known as touch-screen, can receive user input touch information, such as numeral or
Character information;Physical button can receive the key signals of user's input;Microphone, camera and physical interface can receive input respectively
Acoustic information (such as voice messaging), image information and external signal.
Display unit 640 can be used for showing a variety of human-computer interaction interfaces.For example, display is by user in human-computer interaction interface
The various menus of the information of input, the information for being supplied to user, and/or intelligent terminal.Display unit 640 may include display surface
Plate.Further, physically contact panel and display panel can be integrated (such as fitting together), so as to realize
The input of intelligent terminal and output function.
Processor 650 is the control centre of intelligent terminal, utilizes each of various interfaces and the whole intelligent terminal of connection
Individual part, by running or performing the software program and/or module that are stored in internal memory 610, and call and be stored in
Data in internal memory 610 and/or external memorizer 620, perform the various functions and processing data of intelligent terminal.Example
Such as, the external memorizer service routine in internal memory 610 is run, is mainly used in realizing the operation side of external memorizer 620
Method.
Although being not shown, intelligent terminal can also include mobile communication module, mixed-media network modules mixed-media and power supply etc., no longer superfluous herein
State.
In embodiments of the present invention, at least one program is stored with the internal memory 610 of the intelligent terminal, including it is interior
Program and the data such as core, multiple applications and external memorizer service routine;At least one program, it is real when being performed by processor 650
Existing following steps:
When receiving the operation requests for the first external memorizer, obtain for the current close of the first external memorizer
Code, start the initialization of at least one external memorizer until selecting the first external memorizer and interrupting the first external memorizer
Initialization;
According to current password, the first external memorizer is unlocked;
When receiving the unblock success message of the first external memorizer return, recover the initialization of the first external memorizer,
And make it that the first external memorizer is operated according to operation requests.
It is preferred that at least one program is realizing step process of the acquisition for the current password of the first external memorizer
In, specifically include and realize following steps:
Obtain current subscriber identity information;
The current system information of intelligent terminal belonging to acquisition;
According to current subscriber identity information and system information, the current password for the first external memorizer is determined.
It is preferred that at least one program specifically includes during the step of obtaining current subscriber identity information is realized
Realize following steps:Show subscriber identity information inputting interface, and the display reminding user in subscriber identity information inputting interface
Input the information of subscriber identity information;The current user identity that user's input is received by subscriber identity information inputting interface is believed
Breath;And
At least one program is determined for first external according to current subscriber identity information and system information realizing
During the step of current password of memory, specifically include and realize following steps:According to current subscriber identity information with being
System information, generate the Hash Value of initial length;By the Hash Value of initial length, at least two Hash Values of designated length are divided into
Subsequence;Carry out specifying computing, current password of the generation for the first external memorizer based on each Hash Value subsequence.
It is preferred that at least one program is realizing the step of being unlocked according to current password to the first external memorizer mistake
Cheng Zhong, specifically include and realize following steps:
Current password is sent to the first external memorizer so that the initial password that the first external memorizer prestores according to it
It is unlocked with the comparative result of current password.
It is preferred that at least one program realize current password is sent to the first external memorizer the step of during,
Specifically include and realize following steps:
Generation carries the unlocking command packet of current password;
According to the Password Length of unlocking command packet, generate block length setting command and sent out to the first external memorizer
Send;
Receive the first external memorizer for block length setting command return run succeeded message when, according to unblock order
The current password in packet is made, the latching mode plus unlocking command of generation carrying current password is sent out to the first external memorizer
Send.
More excellent, at least one program also realizes following steps:
Receive the first external memorizer be directed to operation requests end of operation message when, to the first external memorizer carry out
Lock.
Further, at least one program is during the step of being locked to the first external memorizer is realized, specific bag
Include and realize following steps:
Generation carries the locking command packet of current password;
According to the Password Length for locking command packet, generate block length setting command and sent out to the first external memorizer
Send;
Receive the first external memorizer for block length setting command return run succeeded message when, according to lock order
The current password in packet is made, the Lock mode plus unlocking command of generation carrying current password is sent out to the first external memorizer
Send.
More excellent, at least one program also realizes following steps:
When receiving the unblock failed message of the first external memorizer return, judge that current unblock failure cumulative frequency is
It is no to reach unblock failure cumulative frequency threshold value;
When judged result for it is no when, re-execute from the current password for the first external memorizer is obtained to outside first
Connect the step of memory is unlocked;
Message when judged result when being, to be not present to application the first external memorizer of return for sending operation requests.
In the embodiment of the present invention, by external memorizer is carried out in itself plus unblock, substitute it is traditional to data carry out plus solve
It is close;External memorizer is carried out in itself plus unlocked, carries out encryption and decryption compared to traditional data in memory, more quickly
Efficiently;It can save and Special safety algorithm is additionally set in external memory inside, reduce cost, to external memorizer in itself
Carry out plus unblock is not take up the space that external memorizer is used for data storage, improve memory space utilizes level.Moreover, connect
, it is necessary to start the initialization of the first external memorizer and interruption when receiving the operation requests for the first external memorizer, represent
Operation is carried out to external memorizer every time to be required for initializing external memorizer;According to the current password pair obtained in real time
First external memorizer is unlocked, and shows unlocking function being applied in initialization identification process;It is just extensive when unlocking successfully
The initialization of multiple first external memorizer simultaneously performs respective operations, it is meant that the external memorizer not unlocked will be unable to complete initially
Change, now all (i.e. this is outer for None- identified external memorizer for all programs such as the operating system in intelligent terminal or rogue program
Memory is connect to be not present for the rogue program in intelligent terminal), illegal operation and rogue program intrusion can be prevented, greatly
The security of data in big lifting external memorizer.
Moreover, in the embodiment of the present invention, the subscriber identity information and system information that are inputted in real time based on user, generation is in real time
Current password.On the one hand, the composition of system information is complex and forms and has that uncertain (technical staff can be neatly true
Determine the composition of system information) so that rogue program, which is difficult to obtain, forms complex and flexible system information;On the other hand,
Subscriber identity information is not held in intelligent terminal, but what user inputted in real time so that rogue program is difficult to obtain user's body
Part information.So as to complex according to the subscriber identity information and composition that obtain in real time and flexible system information, generation is worked as
Preceding password, it is also difficult to obtained by rogue program, greatly reduce the probability of current password leakage, lift the safety of current password
Property, the security for carrying out plus unlocking to external memorizer according to current password can be lifted, so as to be lifted on the whole based on outer
Connect the security that memory adds the operating method of unblock.
Further, in the embodiment of the present invention, to the subscriber identity information obtained in real time and form complex and flexible
System information carries out hash computing, obtains the Hash Value of initial length;Further the Hash Value of initial length is divided into specified
Carry out specifying computing, current password of the generation for external memorizer after the two or more Hash Value subsequence of length.Due to disliking
Meaning program is difficult to obtain at least one of following:Hash algorithm, the initial length of Hash Value, Hash Value subsequence number and specify
Length, the algorithm for specifying computing, therefore rogue program is difficult to crack the current password that the embodiment of the present invention generates, and greatly improves
The security of current password, the security for carrying out plus unlocking to external memorizer according to current password can be lifted, so as to from whole
Lifting adds the security of the operating method of unblock based on external memorizer on body.
Those skilled in the art of the present technique are appreciated that the present invention includes being related to for performing in operation described herein
One or more equipment.These equipment can specially be designed and manufactured for required purpose, or can also be included general
Known device in computer.These equipment have the computer program being stored in it, and these computer programs are optionally
Activation or reconstruct.Such computer program can be stored in equipment (for example, computer) computer-readable recording medium or be stored in
E-command and it is coupled to respectively in any kind of medium of bus suitable for storage, the computer-readable medium is included but not
Be limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only
Read memory), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable
Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable
Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light card
Piece.It is, computer-readable recording medium includes storing or transmitting any Jie of information in the form of it can read by equipment (for example, computer)
Matter.
Those skilled in the art of the present technique be appreciated that can with computer program instructions come realize these structure charts and/or
The combination of each frame and these structure charts and/or the frame in block diagram and/or flow graph in block diagram and/or flow graph.This technology is led
Field technique personnel be appreciated that these computer program instructions can be supplied to all-purpose computer, special purpose computer or other
The processor of programmable data processing method is realized, so as to pass through the processing of computer or other programmable data processing methods
Device performs the scheme specified in the frame of structure chart and/or block diagram and/or flow graph disclosed by the invention or multiple frames.
Those skilled in the art of the present technique are appreciated that in the various operations discussed in the present invention, method, flow
Step, measure, scheme can be replaced, changed, combined or deleted.Further, it is each with having been discussed in the present invention
Kind operation, method, other steps in flow, measure, scheme can also be replaced, changed, reset, decomposed, combined or deleted.
Further, it is of the prior art to have and the step in the various operations disclosed in the present invention, method, flow, measure, scheme
It can also be replaced, changed, reset, decomposed, combined or deleted.
Described above is only some embodiments of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.