Summary of the invention
The technical problem to be solved in the present invention provides a kind of memory device, to improve the reliability of data storage.
For solving the problems of the technologies described above, the invention provides a kind of memory device, comprising:
The first memory module;
Data read and write interface;
Access control module, the data of writing that described data read and write interface is received write the first memory module;
Also comprise:
The second memory module and mirror image control module, wherein,
The memory address of described the second memory module is corresponding one by one with the memory address of described the first memory module;
Described mirror image control module is controlled described access control module write data is write corresponding stored address in the second memory module.
Alternatively, described access control module is also read address reading out data from described the first memory module according to what described data read and write interface received, if read operation failure, described mirror image control module is controlled described access control module and read read data from described the second memory module, and the memory address of described read data is corresponding with the described address of reading.
Alternatively, described the first memory module and the second memory module are pluggable.
Alternatively, described memory device also comprises:
Monitoring modular is used for monitoring described access control module writing and read operation described the first memory module and the second memory module;
Indicating module is controlled by described monitoring modular, when to the writing or read operation when failure of described the first memory module and/or the second memory module, sends indication to the user.
Alternatively, described indicating module comprises:
The first pilot lamp when to the writing or read operation when failure of described the first memory module, sends indication to the user;
The second pilot lamp when to the writing or read operation when failure of described the second memory module, sends indication to the user.
Alternatively, described memory device also comprises:
Encrypting module, the data of writing that described data read and write interface is received are encrypted, wherein,
The data of writing after described access control module will be encrypted write described the first memory module and the second memory module.
Alternatively, described data read and write interface is followed universal serial bus standard.
Alternatively, described memory device also comprises:
Supply module is used for obtaining power supply signal by described data read and write interface from main frame, and it is provided to described the first memory module, the second memory module, data read and write interface, access control module and mirror image control module.
Alternatively, described access control module comprises the buffer memory parts, is used for writing data and carrying out buffer memory from the read data that described the first memory module and the second memory module read what described data read and write interface received.
Alternatively, described the first memory module and the second memory module are flash memory.
Alternatively, described the first memory module and the second memory module are SD card or MicroSD card.
Alternatively, described memory device has three anti-and/or anticollision shells.
Compared with prior art, the present invention has the following advantages:
The memory device of the embodiment of the invention comprises the first memory module and the second memory module, wherein the memory address of the memory address of the second memory module and the first memory module is corresponding one by one, when will writing data and writing the first memory module, also this is write data and write memory address corresponding in the second memory module, afterwards when from the failure of the first memory module reading out data, reading out data in can be from the second memory module corresponding memory address, thereby realized the mirror image redundant storage of data, even one of them memory module breaks down, the memory device of present embodiment still can normally be finished the read-write of data, has improved the reliability of data storages.
Further, the first memory module and the second memory module are pluggable in the present embodiment, but also can comprise and be used to indicate the failed indicating module of the first memory module and the second memory module read-write, therefore, when the user finds that by indicating module one of them memory module breaks down, it can be extracted, be worked independently by another memory module, the memory module that perhaps more renews.
Embodiment
Relatively poor such as the reliability of the portable memory apparatus such as USB flash disk in the prior art, cause easily losing of user data.
The memory device of the embodiment of the invention comprises the first memory module and the second memory module, wherein the memory address of the memory address of the second memory module and the first memory module is corresponding one by one, when will writing data and writing the first memory module, also this is write data and write memory address corresponding in the second memory module, afterwards when from the failure of the first memory module reading out data, reading out data in can be from the second memory module corresponding memory address, thereby realized the mirror image redundant storage of data, even one of them memory module breaks down, the memory device of present embodiment still can normally be finished the read-write of data, has improved the reliability of data storages.
Further, the first memory module and the second memory module are pluggable in the present embodiment, but also can comprise and be used to indicate the failed indicating module of the first memory module and the second memory module read-write, therefore, when the user finds that by indicating module one of them memory module breaks down, it can be extracted, be worked independently by another memory module, the memory module that perhaps more renews.
The invention will be further described below in conjunction with specific embodiments and the drawings, but should not limit protection scope of the present invention with this.
Fig. 1 shows the general structure synoptic diagram of the memory device of present embodiment, comprising: the first memory module 14; The second memory module 15, its memory address is corresponding one by one with the memory address of the first memory module 14; Data read and write interface 11; Access control module 12, the data of writing that data read and write interface 11 is received write the first memory module 14; Mirror image control module 13 is used for access control control module 12 with above-mentioned writing in the corresponding stored address that data write the second memory module 15 of receiving.
Wherein, the first memory module 14 and the second memory module 15 all are pluggable, the I/O control assembly that can insert in the access control module 12 of memory device of present embodiment (is included in the described access control parts 12, not shown) slot in, or from this slot, extract.
The first memory module 14 and the second memory module 15 can be flash memory (Flash), are preferably the SD card, and the memory address of the two is corresponding one by one, namely has man-to-man mapping relations between the memory address of the two.When access control module 12 will be write data and write in the first memory module 14, mirror image control module 13 is also determined memory address with corresponding the second memory module 15 in current write operation address according to above-mentioned mapping relations, and access control control module 12 is write in the corresponding stored address that data write to the second memory module 15, to realize the mirror image redundant storage of data same.
Follow-up reading in the process, access control module 12 carries out read operation according to reading the address to the first memory module 14, if read operation failure, then mirror image control module 13 is determined to read the corresponding memory address in address with this in the second memory module 15, and access control control module 12 reads read data from this memory address.
Need to prove, the first memory module 14 and the second memory module 15 can be exchanged, also can be to write in the process of the second memory module 15 will writing data, identical writing in the corresponding address that data write the first memory module 14 carried out the mirror image redundant storage.
Because the first memory module 14 and the second memory module are 15 separate, equivalent equivalence, mirror image redundancy each other, thereby as long as one of them memory module normal operation just can be carried out the read-write of data.In specific embodiment, the first memory module 14 can adopt two identical flash memories of capacity to realize that cost is low and read or write speed is fast with the second memory module 15.
Fig. 2 shows the detailed construction of the memory device of present embodiment, also comprises on the basis of Fig. 1: monitoring modular 17 is used for writing and read operation of monitoring 12 pairs of the first memory modules 14 of access control module and the second memory module 15; Indicating module 18 is subjected to monitoring modular 17 control, when writing or during the read operation failure, send indication to the user the first memory module 14 and/or the second memory module 15; Encrypting module 16, the data of writing that data read-write interface 11 is received are encrypted; Supply module 19 is used for obtaining power supply signal by data read and write interface 11 from main frame 10, and provides modules to the memory device with it.
Wherein, main frame 10 can be the external unit that is connected to data read and write interface 11, such as personal computer, mobile unit terminal etc.
Encrypting module 16 is used for the data of writing that write the first memory module 14 and the second memory module 15 are encrypted, and what access control module 12 write in the first memory module 14 and the second memory module 15 is through the data of writing after encrypting.When carrying out read operation, main frame 10 needs corresponding key ability reading out data.
Can also comprise buffer memory parts (not shown) in the access control module 12, be used for data read-write interface 11 is write data and carried out buffer memory from the read data that the first memory module 14 and the second memory module 15 read from what main frame 10 received, the buffer memory parts can be so that whole memory device support reading and writing data at a high speed guarantees the real-time access of data.
Monitoring modular 17 is used for reading with write operation of access control module 12 monitored, when finding the read or write operation failure of the first memory module 14 and/or the second memory module 15, control indicating module 18 sends indication to the user, informs that the user makes a mistake.Concrete, indicating module 18 can comprise two pilot lamp, be respectively the first pilot lamp and the second pilot lamp, wherein, when the write operation of the first memory module 14 or read operation failure, show that this memory module lost efficacy, then the first pilot lamp sends indication to the user, for example become and send ruddiness from sending green glow, perhaps never luminous become luminous; When the write operation of the second memory module 15 or read operation failure, show that this memory module lost efficacy, then the second pilot lamp sends indication to the user, for example become and send ruddiness from sending green glow, perhaps never luminous become luminous; When two memory modules all lost efficacy, the first pilot lamp and the second pilot lamp all sent indication, and prompting user is in time changed memory module, avoids loss of data.
In other specific embodiments, indicating module 18 also can comprise two audio output devices, such as loudspeaker, hummer etc., corresponds respectively to two memory modules, when the write operation of a memory module or read operation failure, corresponding audio output device sends prompt tone.The sound that two audio output devices send can be different, so that the user distinguishes and identification.
In the present embodiment, the first memory module 14 and the second memory module 15 all are pluggable, find the indicator signal of the first pilot lamp or the second pilot lamp as the user after, the memory module of corresponding damage can be removed, keep another memory module and work alone, perhaps use new memory module to change.
In the present embodiment, data read and write interface 11 meets USB (universal serial bus) (USB) standard, and USB2.0 standard for example can be inserted the read-write of carrying out data in the Universal USB interface of main frame 10.Wherein, the first memory module 14 and the second memory module 15 can adopt flash memory, such as the SD card, and MicroSD card etc., its cost is lower, and small volume, is convenient to integrated.
As a preferred embodiment, memory device in the present embodiment also comprises the supply module 19 that links to each other with data read and write interface 11, it obtains power supply signal by data read and write interface 11 from main frame 10, and provide modules to the memory device with the power supply signal that obtains, such as the first memory module 14, the second memory module 15, data read and write interface 11, access control module 12, mirror image control module 13, encrypting module 16, monitoring modular 17 and indicating module 18 etc.
In addition, the memory device of present embodiment also is packaged with three anti-and/or anticollision shells, and wherein three prevent referring to dustproof, shockproof, waterproof.In the shell of, waterproof dustproof, shockproof by the modules in the memory device is encapsulated in and/or anticollision, can further improve the reliability of data storage.
As a preferred embodiment, each functional module in the present embodiment can adopt integrated circuit (IC) chip to realize, so that the small volume of whole memory device can be encapsulated in the less shell, to satisfy the user to the requirement of portability.
Although the present invention with preferred embodiment openly as above; but it is not to limit the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can make possible change and modification, so protection scope of the present invention should be as the criterion with the scope that claim of the present invention was defined.