A kind of date storage method of intelligent memory card
Technical field
The present invention relates to data storage, technical field of data processing, especially a kind of date storage method of intelligent memory card.
Background technology
In recent years, along with the development of digital product, need the data volume stored sharply to increase, the application of storage card is able to universal fast, and its performance is also in continuous lifting.But because the ability of high speed storing card of the prior art to redundant data process is more weak, when making to write useful data when occurring being taken by redundant data, the external world cannot judge whether at write useful data, only have when needs call useful data, just discovery never write useful data for the previous period, now again storage card is manually formatd, so just cause a large amount of useful datas not write; Therefore, in order to ensure effective write of useful data as far as possible, an attended operation is just added in use, namely regular storage card to be formatd, add a large amount of human costs, especially in the extensive field using this electronic product, this human cost is more huge.
Simultaneously because existing storage card is all adopt single deck tape-recorder, without any storage of history data P after format, like this for requiring that the problem that cannot coordinate just appears in the field of preserving nearest historical data.
In addition, in the prior art, deviser for high speed storing card performance also mainly interdependent how to increase single deck tape-recorder memory capacity, promote in data processing speed etc., and the problems such as the preservation of data, cleaning do not cause enough attention, cause many troubles to holder thus yet.
Summary of the invention
For above-mentioned the deficiencies in the prior art, the object of the present invention is to provide one to carry out data storage by multiple storage unit, discharge storage space in batches and the date storage method of the intelligent memory card of automatically formatting.
To achieve these goals, the present invention adopts following technical scheme:
A date storage method for intelligent memory card, it comprises the following steps:
First step: arrange storage card, makes the main control chip of storage card connect and controls the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip;
Second step: write data, data are write each storage chip to main control chip until the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are write full;
Third step: data cover automatically, each storage chip is write completely, when main control chip carries out write data, main control chip is data cover first storage chip, the second storage chip that sequence makes write by the time that data write ... write time data the earliest in (n-1)th storage chip, the n-th storage chip;
4th step: the automatic unloading of data, when main control chip carry out data automatically cover time, first storage chip, the second storage chip ... after in (n-1)th storage chip, the n-th storage chip there is the situation that cannot write in arbitrary storage chip, the storage chip that cannot write is to the instruction of main control chip feedback states, and main control chip makes write time data relatively the earliest in other each storage chips of data cover of write;
5th step: automatically formatting, when being circulated again into the storage chip that cannot write in the 4th step, main control chip is formatd;
6th step: circulation performs write data, and data are written in storage chip formatted in the 5th step by main control chip, when formatted storage chip is write completely in the 5th step, continues circulation from third step and carries out data write.
Preferably, described first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are controlled by main control chip all separately, independent each other.
Preferably, in described second step, data write by main control chip from the first storage chip, successively by the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are write full.
Preferably, in described third step, write time data the earliest in data cover first storage chip that main control chip makes write from the first storage chip, until all cover; The rest may be inferred, covers the second storage chip successively ... write time data the earliest in (n-1)th storage chip, the n-th storage chip.
Preferably, in described 4th step, when the first storage chip, the second storage chip ... after in (n-1)th storage chip, the n-th storage chip there is the situation that cannot write in arbitrary storage chip, write time data the earliest in next storage chip during main control chip makes the data cover of write order arrange.
Preferably, in described 6th step, when main control chip cannot perform write data in storage chip formatted in the 5th step, main control chip carries out alarm.
Owing to have employed such scheme, the present invention changes conventional data storage and only adopts the pattern of single storage chip or expand the pattern of memory capacity by increasing storage chip, this method utilizes main control chip to expand multiple storage chip, on the basis increasing memory capacity, whether taken appointment size space by redundant data by main control chip automatic decision storage chip; After this storage chip of judgement (being set to M chip) is taken designated space by redundant data, jump to next storage chip, after being filled with, skip to next storage chip, store successively, when re-circulating to M chip, then carry out automatically formatting to this storage chip, format carries out typing operation again; I.e. automatically formatting, saving the complex process of artificial judgment and format, and save effective data recently, is that distance current time data are farthest formatted when the format moment, and other data are all preserved, for the important informations such as video provide guarantee.
Simultaneously, if find that the storage chip after format still cannot write data, then judge this storage chip physical damage, utilization state pilot lamp is outwardly reported to the police, the replacing of storage chip is carried out in prompting, and it has intellectuality, very strong practicality and market popularization value.
Accompanying drawing explanation
Fig. 1 is the method step relation schematic diagram of the embodiment of the present invention;
Fig. 2 is main control chip and storage chip relation schematic diagram in the method for the embodiment of the present invention;
Fig. 3 is the logical relation schematic diagram of the method for the embodiment of the present invention;
Fig. 4 is the internal part relation schematic diagram of the intelligent memory card of the embodiment of the present invention;
Fig. 5 is the intelligent memory card STRUCTURE DECOMPOSITION schematic diagram of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the invention are described in detail, but the multitude of different ways that the present invention can be defined by the claims and cover is implemented.
As depicted in figs. 1 and 2, a kind of date storage method of intelligent memory card, it comprises the following steps:
First step S101: arrange storage card, makes the main control chip 3 of storage card connect and controls the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip;
Second step S102: write data, data are write each storage chip to main control chip 3 until the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are write full;
Third step S103: data cover automatically, each storage chip is write completely, when main control chip 3 carries out write data, main control chip 3 is data cover first storage chip, the second storage chip that sequence makes write by the time that data write ... write time data the earliest in (n-1)th storage chip, the n-th storage chip;
4th step S104: the automatic unloading of data, when main control chip 3 carry out data automatically cover time, first storage chip, the second storage chip ... after in (n-1)th storage chip, the n-th storage chip there is the situation that cannot write in arbitrary storage chip, the storage chip that cannot write is to the instruction of main control chip 3 feedback states, and main control chip 3 makes write time data relatively the earliest in other each storage chips of data cover of write;
5th step S105: automatically formatting, when being circulated again into the storage chip that cannot write in the 4th step S104, main control chip 3 is formatd;
6th step S106: circulation performs write data, data are written in storage chip formatted in the 5th step S105 by main control chip 3, when formatted storage chip is write completely in the 5th step S105, continue circulation from third step S103 and carry out data write.
For the disorder avoiding the interference between each storage chip and formed on command logic, first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are controlled by all separately main control chip 3, carry out communicating and exchanges data with main control chip 3 separately, independent each other.
More reasonable and regular for making data storage have, data write and covering are all with the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip sort successively and carry out; In second step S102, data write by main control chip 3 from the first storage chip, successively by the first storage chip, the second storage chip ... (n-1)th storage chip, the n-th storage chip are write full.In third step S103, each storage chip write full after, write time data the earliest in data cover first storage chip that main control chip 3 makes write from the first storage chip, until all cover; The rest may be inferred, covers the second storage chip successively ... write time data the earliest in (n-1)th storage chip, the n-th storage chip; Thus, namely after a storage chip is write completely or data cover completes, main control chip 3 automatically jumps to next storage chip in order and stores, in order one by one to storage chip write data.
If there is the situation in the 4th step S104, namely when main control chip 3 cover data to the first storage chip, the second storage chip in order ... after there is the situation that cannot write in (n-1)th storage chip, the n-th storage chip during arbitrary storage chip, write time data the earliest in next storage chip during main control chip 3 can make the data cover of write order arrange; In time re-circulating to the storage chip that this cannot write, main control chip 3 formats it and then carries out write data manipulation to this storage chip, if find that it still cannot write data, then main control chip 3 determines that it is physical damage, main control chip 3 carries out alarm by the state indicating device of outer company, changes this storage chip to point out; The mode of the alarm adopted can adopt pilot lamp mode; As: when main control chip 3 cover data is to the 3rd storage chip, the situation that appearance cannot write, then the 3rd storage chip is to the instruction of main control chip 3 feedback states, main control chip 3 records its status command and skips the 3rd storage chip, by data cover to the 4th storage chip, until when next round is circulated to the 3rd storage chip, main control chip 3 is formatd; After 3rd storage chip is formatted, main control chip 3 performs write operation to it, and data are write completely and continued to jump to the 4th storage chip; If still cannot write data after the 3rd storage chip is formatted, then main control chip 3 determines that it is physical damage, and outwardly alarm is to change the 3rd storage chip; Automatically jump to the 4th storage chip to carry out writing data or data cover simultaneously.
For further illustrating the storage means that the present embodiment provides, as shown in Figure 3, connect for main control chip 3 and control two storage chips and be described (be differentiation two storage chips, be numbered with A and B):
In normal operation, after storage chip A writes completely, storage chip A feeds back the status command of " data space takes " to main control chip 3: TA=1, proceed to storage chip B and carry out write data manipulation, when storage chip B writes completely, storage chip B feeds back the status command of " data space takes " to main control chip 3: TB=1, then proceeds to storage chip A, and so forth, the data cover of the circulation of storage chip is one by one formed.
In certain once circulates, as main control chip 3 cannot by data cover to storage chip A time, storage chip A feeds back the status command of " redundant data takes space " to main control chip 3: TA=0, and simultaneously main control chip 3 records TA=0; Now, main control chip 3 by data cover in storage chip B, when storage chip B cover after, proceed to storage chip A again, now, the status command due to storage chip A is TA=0, data cannot successfully cover, and main control chip 3 formats by storage chip A then, re-writes data; If now storage chip A still cannot write data, then the external alarm of main control chip 3 is to change storage chip A; Automatically jumping to storage chip B carries out write data or cover data simultaneously.If occur, storage chip B cannot write, then disposal route is the same.
Thus, when redundant data not yet takes the storage space of certain storage chip, the data that main control chip 3 can make the data cover of up-to-date write the most original automatically, ensure that the data of write only replace the raw data of itself size, farthest ensure the safety of write data; Meanwhile, after redundant data takes the storage space of certain storage chip, main control chip 3 can be formatd, and in whole method, is equivalent to redundant data to concentrate in together, and carries out unifying process; Save the artificial judgment of conventional high rate storage card and the complex process of format, and save effective data information recently, formatted data are that distance current time data are farthest formatted, and other data are all preserved, for the important informations such as video provide guarantee.The method can extend to data and store and format technical field.
In addition, as shown in Figure 4 and Figure 5, based on the method, the present embodiment additionally provides a kind of intelligent memory card, it comprises upper cover 1 and lower cover 2, between upper cover 1 and lower cover 2, be provided with main control chip 3, wherein main control chip 3 be connected with at least two storage chips, storage chip is arranged on the body of main control chip 3, according to the type selecting of main control chip 3 and the design of real data, storage chip can expand to multiple, and meanwhile, main control chip 3 is also powered with the interface module 5 for carrying out external data connection; Main control chip 3 plays to the effect sent instructions under each storage chip as the data processing centre (DPC) of whole storage card, and is connected with main control chip 3 all separately between each storage chip, each other independent, separation; For preventing writing data because of the physical damage of storage chip, prompting user changes storage chip, and main control chip 3 is also connected with status indicator lamp 4, and status indicator lamp 4 can be LED lamp bead; Based on the date storage method that the present embodiment provides, this intelligent memory card can be the related data memory storage such as SD card, TF card.
The foregoing is only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.