Summary of the invention
The embodiment of the present invention provides a kind of date storage method, method for reading data and electronic equipment, is used for solving dataThe technical problem of storage mode underaction, in order to improve the speed obtaining metadata, improves data-handling efficiency.
First aspect, it is provided that a kind of date storage method, including:
The first order sent according to electronic equipment, generates the first metadata;Wherein, described first metadata is for describing instituteState the data of the attribute of the data of storage in the flash memory device in electronic equipment;
Judge for whether the first order buffer zone storing described first metadata meets predetermined condition;
If meeting described predetermined condition, then described first metadata is stored in described first order buffer area, or, if notMeet described predetermined condition, then described first metadata is stored in the buffer area of the second level;Wherein, described first order buffer areaIt is different buffer areas from described second level buffer area.
Optionally, described first order buffer area belongs to the first storage medium in described flash memory device, and the described second level is delayedDeposit the second storage medium that district belongs in described flash memory device;Wherein, described first storage medium and described second storage mediumDifferent.
Optionally, before described first metadata is stored in the buffer area of the second level, also include:
Described first metadata is stored in buffer control module;Wherein, described buffer control module and the described second levelThe storage device that buffer area is corresponding is connected by the connection interface being mutually matched;
Described first metadata is stored in the buffer area of the second level, including:
Described first metadata is sent to, by described connection interface, the storage device that described second level buffer area is corresponding,To be stored in the buffer area of the described second level.
Optionally, it is judged that whether the first order buffer area for storing described first metadata meets predetermined condition, including:
If it is determined that the memory space of described first order buffer area is not occupied full, it is determined that described first order buffer area meets instituteState predetermined condition.
Optionally, it is judged that whether the first order buffer area for storing described first metadata meets predetermined condition, including:
If it is determined that the data volume of storage is not up to the first predetermined amount of data in described first order buffer area, it is determined that described theLevel cache district meets described predetermined condition;Wherein, described first predetermined amount of data is any one that predetermined amount of data is concentrated,Each predetermined amount of data that described predetermined amount of data is concentrated is respectively less than the memory capacity of described first order buffer area.
Second aspect, it is provided that a kind of method for reading data, including:
Determine for performing the first metadata required for the second order that electronic equipment sends;Wherein, described first yuanData are to describe the data of the attribute of the data of storage in the flash memory device in described electronic equipment;
According to the historical storage information of described first metadata, determine that the buffer area storing described first metadata is firstLevel buffer area or second level buffer area;
Described first metadata is read from the buffer area determined.
Optionally, after reading described first metadata from the buffer area determined, also include:
Described first metadata is deleted from the described buffer area determined.
The third aspect, it is provided that the first electronic equipment, including:
Flash memory device;
Processor, is connected with described flash memory device, for according to the first order sent in described electronic equipment, generating theOne metadata;Judge for whether the first order buffer area storing described first metadata meets predetermined condition;And if meetingDescribed predetermined condition, then be stored in described first metadata in described first order buffer area, or, if being unsatisfactory for described predetermined barPart, then be stored in described first metadata in the buffer area of the second level;Wherein, described first metadata sets for describing described flash memoryThe data of the attribute of the data of standby middle storage, described first order buffer area is different buffer areas from described second level buffer area.
Optionally, described first order buffer area belongs to the first storage medium in described flash memory device, and the described second level is delayedDeposit the second storage medium that district belongs in described flash memory device;Wherein, described first storage medium and described second storage mediumDifferent.
Optionally, described electronic equipment also includes: buffer control module, and the storage corresponding with described second level buffer area setsThe standby connection interface by being mutually matched connects, and is used for storing metadata;
Described processor is used for:
Control to be stored in described buffer control module described first metadata, and it is logical to control described buffer control moduleCross described connection interface and described first metadata is sent to the storage device that described second level buffer area is corresponding, to be stored inState in the buffer area of the second level.
Optionally, described processor is used for:
If it is determined that the memory space of described first order buffer area is not occupied full, it is determined that described first order buffer area meets instituteState predetermined condition.
Optionally, described processor is used for:
If it is determined that the data volume of storage is not up to the first predetermined amount of data in described first order buffer area, it is determined that described theLevel cache district meets described predetermined condition;Wherein, described first predetermined amount of data is any one that predetermined amount of data is concentrated,Each predetermined amount of data that described predetermined amount of data is concentrated is respectively less than the memory capacity of described first order buffer area.
Fourth aspect, it is provided that the second electronic equipment, including:
Data generation module, for according to the first order sent in electronic equipment, generating the first metadata;Wherein, instituteStating the first metadata is to describe the data of the attribute of the data of storage in the flash memory device in described electronic equipment;
Judge module, for judging for whether the first order buffer area storing described first metadata meets predetermined barPart;
Data memory module, if for meeting described predetermined condition, being then stored in described first by described first metadataIn level buffer area, or, if being unsatisfactory for described predetermined condition, then described first metadata is stored in the buffer area of the second level;ItsIn, described first order buffer area belongs to different storage devices from described second level buffer area.
5th aspect, it is provided that the third electronic equipment, including:
Flash memory device;
Processor, is connected with described flash memory device, for determining for performing the second order that described electronic equipment sendsThe first required metadata;According to the historical storage information of described first metadata, determine and store described first metadataBuffer area is first order buffer area or second level buffer area;And from the buffer area determined, read described first metadata;ItsIn, described first metadata is to describe the data of the attribute of the data of storage in described flash memory device.
6th aspect, it is provided that the 4th kind of electronic equipment, including:
First determines module, for determining for performing first yuan of number required for the second order that electronic equipment sendsAccording to;Wherein, described first metadata is to describe the data of the attribute of the data of storage in the flash memory device in described electronic equipment;
Second determines module, for the historical storage information according to described first metadata, determines described first yuan of storageThe buffer area of data is first order buffer area or second level buffer area;
Data read module, for reading described first metadata from the buffer area determined.
In the embodiment of the present invention, generating after the first metadata according to the first order, can first judge for storage theWhether the first buffer area of one metadata meets predetermined condition, and then determines the caching of the first metadata further according to judged resultDistrict, specifically, when the first buffer area meets predetermined condition, is then stored in the first metadata in first order buffer area, whenWhen first buffer area is unsatisfactory for predetermined condition, then the first metadata is stored in the buffer area of the second level.
It is to say, can be in embodiments of the present invention metadata provide two-level cache district, i.e. first order buffer area andSecond level buffer area, by arranging two-level cache district, electronic equipment can store metadata by least two mode, so may be usedTo promote metadata storage and the motility read, and then the memory space for storing metadata can be promoted, it is simple to electronicsEquipment store more metadata, the hardware of such electronic equipment can try one's best without go from internal memory read metadata and directFrom first order buffer area or second level buffer area, read data, be greater than from internal memory owing to reading the speed of data from buffer areaThe speed of middle reading data, so while promoting the memory space of metadata, it is also possible to improve the speed of digital independent as far as possibleRate, it is simple to obtain the data of needs rapidly, improves the operating rate of hardware.
Simultaneously as without reading metadata from the internal memory of electronic equipment again, it is also possible to reduce to a certain extent I/OThe requirement of concurrency, reduce the access burden of memory device.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with in the embodiment of the present inventionAccompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is onlyIt is a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill peopleThe every other embodiment that member is obtained under not making creative work premise, broadly falls into the scope of protection of the invention.?In the case of not conflicting, the embodiment in the present invention and the feature in embodiment can mutual combination in any.And, although at streamJourney figure shows logical order, but in some cases, can perform with the order being different from herein shown or describedStep.
It addition, the terms "and/or", a kind of incidence relation describing affiliated partner, expression can existThree kinds of relations, such as, A and/or B, can represent: individualism A, there is A and B, individualism B these three situation simultaneously.SeparatelyOutward, character "/" herein, in the case of not illustrating, typically represent the forward-backward correlation relation to liking a kind of "or".
In order to be better understood from technique scheme, below in conjunction with Figure of description and specific embodiment to upperState technical scheme to be described in detail.
Referring to Fig. 1, the embodiment of the present invention provides a kind of date storage method, and the method can apply to electronic equipment,And storage device can be arranged in electronic equipment, for storing the number that electronic equipment in use needs to carry out storingAccording to, electronic equipment such as can include mobile phone, panel computer (PAD), notebook computer or PC etc..The flow process of the method describesAs follows.
Step 101: the first order sent according to electronic equipment, generates the first metadata;Wherein, described first metadataFor describing the data of the attribute of the data of storage in the flash memory device in electronic equipment.
Wherein, the first order can be that (such as first is hard by the main frame of electronic equipment a certain hardware in electronic equipmentPart) order that sends, and corresponding with this order can generate the first metadata, the first metadata is performing for the first hardwareObtain some resources needed during the first order, such as, be easy to the first hardware and performing the first life according to the instruction of the first metadataThe data needing to use are obtained during order.
Optionally, metadata such as can include command description symbol, host memory address table and data Integrity Code etc.Information, say, that metadata could be for describing the data of the attribute of the data of storage in electronic equipment, and first yuan of numberAccording to can be regarded as any one metadata.And remain able to preserve in order to ensure data after power-off, data are generally stored in electricityIn flash memory device in subset, such as NOR flash memory equipment or NAND flash memory equipment, wherein, flash memory device is the most embeddedStorage device used in hardware system, is equivalent to the hard disk in PC, is used for depositing data.
The data volume of metadata is less, the most several bytes (Byte) to tens Byte, shared memory spaceThe least, and owing to metadata typically can be timely used after generation, so typically by metadata cache at electronic equipmentIn random access memory (Random Access Memory, RAM) in, the most now RAM can be referred to as buffer area, when certainWhen one hardware needs to read data, can first make a look up from buffer area, owing to the speed of service of caching compares electronic equipmentIn internal memory want fast, therefore hardware can be helped to search the data of needs quickly by caching, in order to improve the operation of hardwareEfficiency.
Step 102: judge whether the first order buffer area for storage the first metadata meets predetermined condition.
In embodiments of the present invention, can be that metadata provides two-level cache district, i.e. first order buffer area and hereinafter carryingThe second level buffer area arrived, by arranging two-level cache district, can promote the storage for storing metadata to a certain extentSpace, it is simple to electronic equipment stores more metadata, the hardware of such electronic equipment can be tried one's best without going to read from internal memoryTake metadata and from first order buffer area or second level buffer area, directly go to read data, owing to reading data from buffer areaSpeed is greater than the speed reading data from internal memory, so while promoting the memory space of metadata, it is also possible to as far as possibleImprove the speed of digital independent, it is simple to obtain the data of needs rapidly, promote the operating rate of hardware.
In the embodiment of the present invention, first order buffer area is different buffer areas from second level buffer area.Such as, the first order is delayedDeposit district can memory area corresponding to the first storage medium in flash memory device, second level buffer area can be flash memory deviceIn the memory area corresponding to the second storage medium, it will be understood that, first order buffer area belongs in flash memory deviceOne storage medium, second level buffer area belongs to the second storage medium in flash memory device.Wherein, the first storage medium and second is depositedStorage media is different, say, that first order buffer area and second level buffer area can belong to same flash memory device, but distinguishBelong to storage mediums different in this flash memory device, owing to different storage mediums is for storing the ginsengs such as performance and the capacity of dataThe difference of number, can utilize difference by first order buffer area and second level buffer area are set to different storage mediums simultaneouslyThe storage performance of medium, promotes effectiveness and the multiformity of data storage.
It is as a example by NAND memory device by flash memory device, memory block corresponding for the RAM in NAND memory device can be seenWork is first order buffer area.Further, since NAND memory device the most all can use Double Data Rate synchronous DRAM(Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM) cachesMapping table in NAND device and some control information, and these information typically constitute from using the segment space of DDR SDRAM, soDDR SDRAM has a remaining space, then can be by the DDR SDRAM institute in NAND memory device in the embodiment of the present inventionRemaining space, as second level buffer area, so can make full use of existing flash memory on the basis of having existing flash memory deviceIn equipment, the remaining space of surplus carrys out metadata, to meet metadata to increasing the depositing of memory space as second level cachingStorage requirement.Wherein it is possible to be all referred to as storage medium by RAM and DDR SDRAM, and RAM and the first storage medium, DDRSDRAM is the second storage medium.
Optionally, first order buffer area can include the memory area included by the SRAM of flash memory device, or can wrapInclude the memory area included by phase transition storage (Phase Change Memory, PCM) in flash memory device, etc.
Second level buffer area can include the memory area included by DDR SDRAM being arranged in NAND memory device,Or for some flash memory device, wherein may be using PCM as storage medium, then in this case, it is also possible to willThe memory area corresponding to PCM in flash memory device as buffer zone, the second level, etc..
Optionally, the memory rate of first order buffer area and reading rate are greater than second level buffer area, the such as first orderBuffer area is SRAM and second level buffer area is DDR SDRAM, then the priority of first order buffer area can be set to heightIn second level buffer area, so can be so that the quick storage of metadata and follow-up quick reading, then, by defaultCan metadata be preferentially stored in first order buffer area in order to be able to store and read data rapidly, raising processesEfficiency.
And in a step 102, i.e. before storage the first metadata, can first judge whether first order buffer area meets pre-Fixed condition, if meeting predetermined condition, performs step 103, will the first metadata be stored in first order buffer area, if discontentedFoot predetermined condition then performs step 104, will the first metadata be stored in the buffer area of the second level, it is seen then that implement in the present inventionIn example, step 103 and step 104 are to select an enforcement.
Step 103: if meeting predetermined condition, then be stored in the first metadata in first order buffer area.
Step 104: if being unsatisfactory for predetermined condition, then be stored in the first metadata in the buffer area of the second level.
Sentence it is to say, first first order buffer area can be carried out predetermined condition before metadata is storedDisconnected, to determine whether first order buffer area still meets the first priority, so can two-level cache district can be carried out as far as possibleReasonably distribute use, in order to promote the utilization rate in two-level cache district as far as possible.
In specific implementation process, can have various ways and judge whether first order buffer area meets predetermined condition, i.e.The arranging of predetermined condition can have multiple.
Such as, the first possible predetermined condition is: the memory space of first order buffer area is not occupied full.
Owing to the speed of the storage of first order buffer area and reading data is higher than second level caching, it is possible to preferential by unitData are stored in first order buffer area, and using second level buffer area as standby buffer area, only when first order buffer areaAfter memory space is taken by metadata, then the metadata of acquisition is stored in the buffer area of the second level, so can be so that countingAccording to quick storage and follow-up quick reading, improve treatment effeciency.
The memory space assuming first order buffer area is 500M, when determining the number of the metadata of storage in first order buffer areaDuring according to amount not up to 500M, then metadata being continued of can continuing is stored in first order buffer area, and only ought detect theAfter in level cache district, the data volume of the metadata of storage reaches 500M, just metadata can be stored in the buffer area of the second level.
The most such as, possible pre-conditioned of the second: in first order buffer area, to be not up to first pre-for the data volume of storageDetermined number.
Tentation data quantity set can be set, and the first predetermined amount of data can be predetermined amount of data concentrate that any one is pre-Given data amount.Such as, tentation data quantity set is { 80M, 120M, 300M}, and any one predetermined number that predetermined amount of data is concentratedThe memory capacity (for example, 500M) of first order buffer area it is respectively less than according to amount, then, such as when detecting in first order buffer areaThen can continue to store in first order buffer area by metadata when the data volume of the metadata of storage is not up to 80M, and when inspectionMeasure and then metadata can be stored in the buffer area of the second level more than during 80M.
Further, such as at certain time intervals after (such as 1 minute), again metadata can be stored the first orderBuffer area, the most then can be using 120M as Rule of judgment, when detecting that in first order buffer area, the data volume of storage reachesAgain metadata is stored in the buffer area of the second level to during 80M, by that analogy, i.e. can be with interlaced storage mode by unitData storage is respectively stored in two-level cache district, so can promote the utilization rate in two-level cache district as far as possible, reduces resourceWaste.
It addition, before the first metadata is stored in second level buffer area, it is also possible to first the first metadata is stored inIn buffer control module, then it is sent to the storage device corresponding with second level buffer area by buffer control module, is i.e. sent toThe storage medium corresponding with second level buffer area, the storage device corresponding with second level buffer area due to buffer control module is passed throughThe connection interface that is mutually matched connects, so carrying out can trying one's best if buffering forwards by buffer control module and the second level is slowThe interface depositing storage device corresponding to district mates, by the high matching between equipment interface so that data transmission speedRate can be faster.
Wherein, buffer control module such as can include FIFO module (First Input First Output,FIFO) or other cache module, etc..
For the ease of reader, the date storage method in the embodiment of the present invention is understood, enter as a example by Fig. 2 belowRow illustrates further.
Step 201: judge whether to receive the first order.
If it is determined that receive the first order, generate the first metadata, if not receiving the first order, then by performing step 202Can the most persistently detect, detect the most in real time or be periodically detected.
After generating the first metadata, may determine that whether first order buffer area is occupied full further, i.e. perform stepRapid 203, however, it is determined that then the first metadata is stored the first order buffer area when first order buffer area is not occupied full, i.e. perform step204, however, it is determined that then the first metadata is stored to the second level buffer area when first order buffer area is occupied full, i.e. perform step205。
It is to say, can be in embodiments of the present invention metadata provide two-level cache district, i.e. first order buffer area andSecond level buffer area, by arranging two-level cache district, electronic equipment can store metadata by least two mode, so may be usedTo promote metadata storage and the motility read, and then the memory space for storing metadata can be promoted, it is simple to electronicsEquipment store more metadata, the hardware of such electronic equipment can try one's best without go from internal memory read metadata and directFrom first order buffer area or second level buffer area, read data, be greater than from internal memory owing to reading the speed of data from buffer areaThe speed of middle reading data, so while promoting the memory space of metadata, it is also possible to improve the speed of digital independent as far as possibleRate, it is simple to obtain the data of needs rapidly, improves the operating rate of hardware.
Simultaneously as without reading metadata from the internal memory of electronic equipment again, it is also possible to reduce to a certain extent I/OThe requirement of concurrency, reduce the access burden of memory device.
Referring to Fig. 3, based on same inventive concept, the embodiment of the present invention provides a kind of method for reading data, and the method canTo be applied to the electronic equipment for performing Fig. 1 and Fig. 2.The method and flow process is described as follows.
Step 301: determine for performing the first metadata required for the second order that electronic equipment sends;Wherein,One metadata is to describe the data of the attribute of the data of storage in the flash memory device in electronic equipment;
Step 302: according to the historical storage information of the first metadata, determines that the buffer area of storage the first metadata is firstLevel buffer area or second level buffer area;
Step 303: read the first metadata from the buffer area determined,
Such as, when electronic equipment stores the first metadata by the date storage method shown in Fig. 1 or Fig. 2, permissibleRecording the historical storage information of the first metadata, historical storage information such as can include that when electronic equipment is by first yuanWhich buffer area is data be stored to, etc..
So, when needs obtain the first metadata, electronic equipment can be according to historical storage information and then storage firstThe buffer area of metadata is the first buffer area or the second buffer area, and electronic equipment then can be rapidly from the buffer area determinedRead the first metadata, so ensure that quick data reading performance using redundancy.
Further, after reading the first metadata from the buffer area determined, may indicate that the first metadataBeing used, in order to save spatial cache, the first metadata can be deleted from the buffer area determined by electronic equipment, the most permissibleRelease spatial cache, it is simple to store other metadata, shortens renewal time and the update cycle of metadata in buffer area.
Assuming to determine that for the buffer area storing the first metadata be the first buffer area, electronic equipment can be by firstStorage device corresponding to buffer area sends the mode of control instruction to indicate this storage device the first metadata to be cached from itDistrict deletes.
Referring to Fig. 4, based on same inventive concept, the embodiment of the present invention provides the first electronic equipment, this electronic equipmentIncluding:
First flash memory device 401;
First processor 402, is connected with the first flash memory device 401, for ordering according to first sent in electronic equipment,Generate the first metadata;Judge whether the first order buffer area for storage the first metadata meets predetermined condition;If it is and fullThe described predetermined condition of foot, then be stored in the first metadata in first order buffer area, or, if being unsatisfactory for predetermined condition, then by theOne metadata is stored in the buffer area of the second level;Wherein, the first metadata is to describe the data of storage in the first flash memory device 401The data of attribute, first order buffer area is different buffer areas from second level buffer area.
First processor 402 can be specifically general central processing unit (CPU), or can be the integrated electricity of application-specificRoad (Application Specific Integrated Circuit, ASIC), or can be one or more for controllingThe integrated circuit that program performs.
Can be attached by connecting line between first processor 402 and the first flash memory device 401, this connecting line hasThe effect of signal transmission, i.e. can keep between first processor 402 and the first flash memory device 401 being electrically connected with, be used for controllingDifferent storage mediums in first flash memory device 401 carry out data storage with different data store strategies, such as, control firstMetadata is stored by the storage medium of not depositing in flash memory device 401 with different data store strategies.
Electronic equipment can also include display device, and display device includes light emitting diode (Light in can beingEmitting Diode, LED) display screen, Organic Light Emitting Diode (Organic Light Emitting Diode, OLED) showDisplay screen, active matrix organic light-emitting diode (Active Matrix Organic Light Emitting Diode,AMOLED) display screen, plane conversion (In-Plane Switching, IPS) display screen, etc..
Optionally, first order buffer area belongs to the first storage medium in the first flash memory device 401, and second level buffer area belongs toThe second storage medium in the first flash memory device 401.
Optionally, electronic equipment also includes:
Buffer control module, the storage device corresponding with second level buffer area is connected by the connection interface being mutually matched,For storing metadata;
First processor 402 is used for:
Control to be stored in buffer control module the first metadata, and control buffer control module by connecting interface generalDescribed first metadata is sent to the storage device that second level buffer area is corresponding, to be stored in the buffer area of the second level.
Optionally, first processor 402 is used for:
If it is determined that the memory space of first order buffer area is not occupied full, it is determined that first order buffer area meets predetermined condition.
Optionally, first processor 402 is used for:
If it is determined that the data volume of storage is not up to the first predetermined amount of data in first order buffer area, it is determined that the first order cachesDistrict meets predetermined condition;Wherein, the first predetermined amount of data is any one that predetermined amount of data is concentrated, and predetermined amount of data is concentratedEach predetermined amount of data is respectively less than the memory capacity of first order buffer area.
Owing to the electronic equipment in the embodiment of the present invention is similar to the principle that the date storage method in Fig. 1 solves problem,Therefore in the embodiment of the present invention, the enforcement of electronic equipment may refer to the enforcement of date storage method in Fig. 1, does not repeats them here.
Referring to Fig. 5, based on same inventive concept, the embodiment of the present invention also provides for the second electronic equipment, and this electronics setsFor including data generation module 501, judge module 502 and data memory module 503.
Data generation module 501, for according to the first order sent in electronic equipment, generating the first metadata;Wherein,First metadata is to describe the data of the attribute of the data of storage in the flash memory device in electronic equipment;
Judge module 502, for judging whether the first order buffer area for storage the first metadata meets predetermined condition;
Data memory module 503, if for meeting predetermined condition, being then stored in first order buffer area by the first metadataIn, or, if being unsatisfactory for predetermined condition, then the first metadata is stored in the buffer area of the second level;Wherein, first order buffer area withSecond level buffer area belongs to different storage devices.
Optionally, first order buffer area belongs to the first storage medium in flash memory device, and second level buffer area belongs to flash memoryThe second storage medium in equipment.
Optionally, electronic equipment also includes buffer control module, is used for:
At data memory module 503 before the first metadata being stored in the buffer area of the second level, store first yuanData;And the first metadata is sent to the storage device that second level buffer area is corresponding, to be stored in second by connecting interfaceIn level buffer area;The storage device that buffer control module is corresponding with second level buffer area passes through the described connection interface being mutually matchedConnect.
Optionally, it is judged that module 502 is used for:
If it is determined that the memory space of first order buffer area is not occupied full, it is determined that first order buffer area meets described predetermined barPart.
Optionally, it is judged that module 502 is used for:
If it is determined that the data volume of storage is not up to the first predetermined amount of data in first order buffer area, it is determined that the first order cachesDistrict meets predetermined condition;Wherein, the first predetermined amount of data is any one that predetermined amount of data is concentrated, and predetermined amount of data is concentratedEach predetermined amount of data is respectively less than the memory capacity of first order buffer area.
Owing to the electronic equipment in the embodiment of the present invention and the date storage method in Fig. 1-2 solve the principle phase of problemSeemingly, therefore in the embodiment of the present invention, the enforcement of electronic equipment may refer to the enforcement of date storage method in Fig. 1-2, at this no longerRepeat.
Referring to Fig. 6, based on same inventive concept, the embodiment of the present invention provides the third electronic equipment, this electronic equipmentIncluding:
Second flash memory device 601;
Second processor 602, is connected with the second flash memory device 601, for determine for perform that electronic equipment sends theThe first metadata required for two orders;Historical storage information according to the first metadata, determines the slow of storage the first metadataDepositing district is first order buffer area or second level buffer area;And from the buffer area determined, read the first metadata;Wherein, firstMetadata is to describe the data of the attribute of the data of storage in described flash memory device.
Wherein, the flash memory that the second flash memory device 601 in Fig. 6 and the first flash memory device 401 in Fig. 4 can be identical setsStandby, it is also possible to for different flash memory devices.
Optionally, the second processor 602 is additionally operable to:
After reading described first metadata from the buffer area determined, from the buffer area determined, delete first yuan of numberAccording to.
Owing to the electronic equipment in the embodiment of the present invention is similar to the principle that the method for reading data in Fig. 3 solves problem,Therefore in the embodiment of the present invention, the enforcement of electronic equipment may refer to the enforcement of method for reading data in Fig. 3, does not repeats them here.
Referring to Fig. 7, based on same inventive concept, the embodiment of the present invention provides the 4th kind of electronic equipment, this electronic equipmentIncluding first determining module 701, second determining module 702 and data read module 703.
First determines module 701, for determining for performing first yuan required for the second order that electronic equipment sendsData;Wherein, the first metadata is to describe the data of the attribute of the data of storage in the flash memory device in electronic equipment;
Second determines module 702, for the historical storage information according to the first metadata, determines storage the first metadataBuffer area is first order buffer area or second level buffer area;
Data read module 703, for reading the first metadata from the buffer area determined.
Optionally, electronic equipment also includes removing module, is used for:
At data read module 703 after reading the first metadata from the buffer area determined, from the caching determinedDistrict deletes the first metadata.
Owing to the electronic equipment in the embodiment of the present invention is similar to the principle that the method for reading data in Fig. 3 solves problem,Therefore in the embodiment of the present invention, the enforcement of electronic equipment may refer to the enforcement of method for reading data in Fig. 3, does not repeats them here.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, only with above-mentioned each functionThe division of module is illustrated, and in actual application, can distribute above-mentioned functions by different function lists as desiredUnit completes, and the internal structure of device will be divided into different functional units, to complete all or part of merit described aboveEnergy.The specific works process of the system of foregoing description, device and unit, the corresponding mistake being referred in preceding method embodimentJourney, does not repeats them here.
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method are permissibleRealize by another way.Such as, device embodiment described above is only schematically, such as, described module orThe division of unit, is only a kind of logic function and divides, and actual can have other dividing mode, the most multiple unit when realizingOr assembly can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not performs.Another point, instituteThe coupling each other shown or discuss or direct-coupling or communication connection can be by some interfaces, device or unitINDIRECT COUPLING or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, shows as unitThe parts shown can be or may not be physical location, i.e. may be located at a place, or can also be distributed to multipleOn NE.Some or all of unit therein can be selected according to the actual needs to realize the mesh of the present embodiment scheme's.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible toIt is that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.Above-mentioned integrated listUnit both can realize to use the form of hardware, it would however also be possible to employ the form of SFU software functional unit realizes.
If described integrated unit realizes and as independent production marketing or use using the form of SFU software functional unitTime, can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantiallyThe part that in other words prior art contributed or this technical scheme completely or partially can be with the form of software productEmbodying, this computer software product is stored in a storage medium, including some instructions with so that a computerEquipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the present invention eachAll or part of step of method described in embodiment.And aforesaid storage medium includes: USB flash disk, portable hard drive, ROM (Read-Only Memory, read only memory), RAM (Random Access Memory, random access memory), magnetic disc or CDEtc. the various media that can store program code.
Specifically, the computer program instructions that a kind of date storage method in the embodiment of the present invention is corresponding can be depositedStore up at CD, hard disk, on the storage medium such as USB flash disk, when the computer journey corresponding with a kind of date storage method in storage mediumWhen sequence instruction is read by an electronic equipment or is performed, comprise the steps:
The first order sent according to electronic equipment, generates the first metadata;Wherein, the first metadata sets for describing electronicsThe data of the attribute of the data of storage in flash memory device in Bei;
Judge whether the first order buffer area for storage the first metadata meets predetermined condition;
If meeting predetermined condition, then the first metadata is stored in first order buffer area, or, if being unsatisfactory for predetermined barPart, then be stored in the first metadata in the buffer area of the second level;Wherein, first order buffer area is different from second level buffer areaBuffer area.
Optionally, first order buffer area belongs to the first storage medium in flash memory device, and second level buffer area belongs to flash memoryThe second storage medium in equipment.
Optionally, store in storage medium and step: described first metadata be stored in the buffer area of the second level is rightThe computer instruction answered, before quilt, also includes:
First metadata is stored in buffer control module;Wherein, buffer control module is corresponding with second level buffer areaStorage device is connected by the connection interface being mutually matched;
In storage medium storage and step: the first metadata is stored in the buffer area of the second level, corresponding computerInstruct among the process being performed, including:
First metadata is sent to the storage device that second level buffer area is corresponding, to be stored in second by connecting interfaceIn level buffer area.
Optionally, in storage medium storage and step: judge for storage the first metadata first order buffer area beNo meet predetermined condition, corresponding computer instruction among the process being performed, including:
If it is determined that the memory space of first order buffer area is not occupied full, it is determined that first order buffer area meets predetermined condition.
Optionally, in storage medium storage and step: judge for storage the first metadata first order buffer area beNo meet predetermined condition, corresponding computer instruction among the process being performed, including:
If it is determined that the data volume of storage is not up to the first predetermined amount of data in first order buffer area, it is determined that the first order cachesDistrict meets predetermined condition;Wherein, the first predetermined amount of data is any one that predetermined amount of data is concentrated, and predetermined amount of data is concentratedEach predetermined amount of data is respectively less than the memory capacity of first order buffer area.
Specifically, the computer program instructions that a kind of method for reading data in the embodiment of the present invention is corresponding can be depositedStore up at CD, hard disk, on the storage medium such as USB flash disk, when the computer journey corresponding with a kind of method for reading data in storage mediumWhen sequence instruction is read by an electronic equipment or is performed, comprise the steps:
Determine for performing the first metadata required for the second order that electronic equipment sends;Wherein, the first metadataFor describing the data of the attribute of the data of storage in the flash memory device in electronic equipment;
Historical storage information according to the first metadata, determines that the buffer area of storage the first metadata is first order buffer areaOr second level buffer area;
The first metadata is read from the buffer area determined.
Optionally, store in storage medium and step: read described first metadata from the buffer area determined, correspondingComputer instruction after being performed, also include:
The first metadata is deleted from the buffer area determined.
Above, above example is only in order to be described in detail technical scheme, but above exampleMethod and the core concept thereof being only intended to help to understand the present invention is described, should not be construed as limitation of the present invention.This technologyThe technical staff in field in the technical scope that the invention discloses, the change that can readily occur in or replacement, all should contain at thisWithin bright protection domain.