[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102508784B - Data storage method of flash memory card in video monitoring equipment, and system thereof - Google Patents

Data storage method of flash memory card in video monitoring equipment, and system thereof Download PDF

Info

Publication number
CN102508784B
CN102508784B CN201110341083.7A CN201110341083A CN102508784B CN 102508784 B CN102508784 B CN 102508784B CN 201110341083 A CN201110341083 A CN 201110341083A CN 102508784 B CN102508784 B CN 102508784B
Authority
CN
China
Prior art keywords
data
storage
storage block
file
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110341083.7A
Other languages
Chinese (zh)
Other versions
CN102508784A (en
Inventor
鲍敦桥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201110341083.7A priority Critical patent/CN102508784B/en
Publication of CN102508784A publication Critical patent/CN102508784A/en
Application granted granted Critical
Publication of CN102508784B publication Critical patent/CN102508784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to video monitoring, and discloses a data storage method of a flash memory card in video monitoring equipment, and a system thereof. With the method, the space utilization rate of the flash memory card is high, video data access efficiency is high, and the stability when files are frequently read and written is high. According to the invention, a storage file comprising an integral number of storage blocks and an index file comprising an index head and index entries are configured in the flash memory card, wherein the size of the file is invariable; the storage blocks are corresponded to the index entries on to one; the index head comprises a read indicator and a write indicator. The method comprises the steps that: according to the index entries, data is circularly written into a current storage block, or a current storage block is covered by the data; according to the information of the current storage block, the index head and the corresponding index entry information are updated.

Description

The date storage method of flash memory card in video monitoring equipment and system thereof
Technical field
The present invention relates to field of video monitoring, particularly data storage technology.
Background technology
Flash card is the storer utilizing flash memory technology to reach storage of electronic information, general as storage medium application in the small size digital products such as digital camera, palm PC, MP3, according to different production firms and different application, flash card comprises SM card, CF card, mmc card, SD card, memory stick, XD card and micro harddisk etc.
Current, when video monitoring equipment carries out data storage, video monitoring equipment is had each time to the data of storage resource request, a flash card all separately newly-built data file and an index file is preserved, Chinese Patent Application No. is a kind of method that CN200810184014.8 discloses data storage device long-time pre-recording, comprise: according to the speed of pre-record duration and prerecorded data, calculate the space storing prerecorded data; The space calculated described in non-volatile memory apparatus obtains, sets up each data block in described space, and sets up the index chained list of the described data block of management at memory headroom; According to the instruction of index chained list, described prerecorded data is written in corresponding data block, after receiving trigger message, described prerecorded data is converted to video file and is stored on described memory device.
The present inventor finds, above-mentioned date storage method needs constantly to revise system file data owing to frequently creating file, as file allocation table (File Allocation Table, be called for short " FAT ") table, or frequent updating data directory chained list in internal memory, because the damage of system-critical data district can cause whole flash card to store paralysis, so that whole loss of data after format, greatly reduce its stability, storage space utilization factor is low and manages loaded down with trivial details.
So, urgently propose that a kind of stability is high, storage space utilization factor is high, manage simple flash card date storage method and system thereof.
Summary of the invention
The object of the present invention is to provide a kind of date storage method and system thereof of flash memory card in video monitoring equipment; make the memory headroom utilization factor of flash card higher; simultaneously due to storage file static division; video data is searched with storage efficiency high; protection flash card is not easily damaged when frequent storage file read-write, and its stability is stronger.
For solving the problems of the technologies described above, embodiments of the present invention disclose a kind of date storage method of flash memory card in video monitoring equipment, in flash card, arrange multiple storage file and an index file that file size remains unchanged in advance, index file comprises an indexing head and multiple index entry; Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in index file; Indexing head comprises write pointer, points to the index entry of the next storage block that can write;
Method comprises the following steps:
From the position of write pointers point, according to the order of index entry each in index file, successively to the storage block write data corresponding to each index entry; If write the storage block corresponding to last index entry of index file, then write pointer gets back to first index entry of index file;
The information of respective index item is upgraded according to the attribute information of the data of write.
Embodiments of the present invention also disclose a kind of data-storage system of flash memory card in video monitoring equipment, in flash card, arrange multiple storage file and an index file that file size remains unchanged in advance, index file comprises an indexing head and multiple index entry; Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in index file; Indexing head comprises write pointer, points to the index entry of the next storage block that can write;
System comprises with lower module:
Recurrent wrIting module, for from the position of write pointers point, according to the order of index entry each in index file, successively to the storage block write data corresponding to each index entry; If write the storage block corresponding to last index entry of index file, then write pointer gets back to first index entry of index file;
Index upgrade module, the attribute information for the data write according to recurrent wrIting module upgrades the information of respective index item.
Compared with prior art, the key distinction and effect thereof are embodiment of the present invention:
Be pre-created an index file and multiple storage file that file size remains unchanged; storage file storage block is unified to be managed in the index; subsequent video data is according to storage block recurrent wrIting or covering; data division only in amendment storage file; make the memory headroom utilization factor of flash card higher, simultaneously due to storage file static division, video data is searched with storage efficiency high; protection flash card is not easily damaged when frequent storage file read-write, and its stability is stronger.
Further, if the storage file of a written data takies multiple index entry continuously, then only have first index entry to contain the index content of this file data, each index entry is all blank afterwards, like this can the write operation of reduced index item, reduce data redundancy.
Further, flash card has living space and is stored file and index file takes, and facilitates the management of flash card storage space.
Further, storage block corresponding to adjacent index entry is physically adjacent, makes the storage of flash card have greater flexibility, does not need once to write completely whole storage file during recurrent wrIting, it is high that space covers utilization factor, is conducive to the storage to critical data in field of video monitoring.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the date storage method of a kind of flash memory card in video monitoring equipment in first embodiment of the invention;
Fig. 2 is the data store organisation schematic diagram of a kind of flash memory card in video monitoring equipment in first embodiment of the invention;
Fig. 3 is the schematic flow sheet of the date storage method of a kind of flash memory card in video monitoring equipment in second embodiment of the invention;
Fig. 4 is the datacycle write schematic diagram of the date storage method of a kind of flash memory card in video monitoring equipment in second embodiment of the invention;
Fig. 5 is the data cover write schematic diagram of the date storage method of a kind of flash memory card in video monitoring equipment in second embodiment of the invention;
Fig. 6 is the structural representation of the data-storage system of a kind of flash memory card in video monitoring equipment in third embodiment of the invention;
Fig. 7 is the structural representation of the data-storage system of a kind of flash memory card in video monitoring equipment in four embodiment of the invention.
Embodiment
In the following description, many ins and outs are proposed in order to make reader understand the application better.But, persons of ordinary skill in the art may appreciate that even without these ins and outs with based on the many variations of following embodiment and amendment, also can realize each claim of the application technical scheme required for protection.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiments of the present invention are described in further detail.
First embodiment of the invention relates to a kind of date storage method of flash memory card in video monitoring equipment.Fig. 1 is the schematic flow sheet of the date storage method of this flash memory card in video monitoring equipment.As shown in Figure 1, specifically, the date storage method of this flash memory card in video monitoring equipment comprises the following steps:
In a step 101, in flash card, arrange multiple storage file and an index file that file size remains unchanged in advance, index file comprises an indexing head and multiple index entry.Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in index file.Indexing head comprises write pointer, points to the index entry of the next storage block that can write.
In the present embodiment, index file is the file of a kind of linked list data structure for indicating one-to-one relationship between logical record and physical record set up outside storage file.
Storage block is one group of continuous arrangement several groups of record together in order, is the data unit carrying out between primary memory and Input/Output Device or external storage transmitting.Also the least unit stored in master file can be expressed as.
The one-to-one relationship of storage block and index entry, namely when searching a certain storage file, this index entry contains the information of this storage block, the initial physical addresses of this storage block such as storing these data on flash card and offset address, data file size, data type etc.
Be pre-created an index file and multiple storage file that file size remains unchanged; storage file storage block is unified to be managed in the index; subsequent video data is according to storage block recurrent wrIting or covering; data division only in amendment storage file; make the memory headroom utilization factor of flash card higher, simultaneously due to storage file static division, video data is searched with storage efficiency high; protection flash card is not easily damaged when frequent storage file read-write, and its stability is stronger.
In some other embodiments of the present invention, stored in data can be various types of, such as video data, view data of candid photograph etc.Flash card refers to the storage card using flash memory (Flash) as storage medium, such as SD card, mmc card, CF card etc.
After this step 102 is entered, from the position of write pointers point, according to the order of index entry each in index file, successively to the storage block write data corresponding to each index entry.If write the storage block corresponding to last index entry of index file, then write pointer gets back to first index entry of index file.The index file formed for each index entry in the present invention have employed the method for recurrent wrIting.
After this enter step 103, upgrade the information of respective index item according to the attribute information of the data of write, after this process ends.
As a preferred embodiment of the present invention, Fig. 2 is the data store organisation schematic diagram of a kind of flash memory card in video monitoring equipment in first embodiment of the invention;
As shown in Figure 2, this flash card storage space is made up of index file and some storage files.Index file houses global index's header and index entry information two parts content.Indexing head preserves whole flash card global information, comprise flash card storage file total volume, with data field size, predistribution storage file number, currently read or write the overall key messages such as pointer; Each index entry preserves data search information such as storing size of data, data type and the position in storage file.As shown in Figure 2, index file contains an indexing head node and n index entry node.
Each storage file is divided into some storage blocks, can define storage be storage cell minimum in flash card, and the main control equipment namely in video monitoring applies for that the data space stored all takies an integer storage block at every turn.If a flash card has the individual onesize storage file of m, in each storage file, all there is x data block.Suppose each size of data be α kB. then the storable total volume of this storage card be x* α * m/1024 megabyte.And index entry nodal point number is n=m*x in index file.
Second embodiment of the invention relates to a kind of date storage method of flash memory card in video monitoring equipment.Fig. 3 is the schematic flow sheet of the date storage method of this flash memory card in video monitoring equipment.
Second embodiment improves on the basis of the first embodiment, and main improvements are: also comprise read pointer in indexing head, points to the index entry of the readable storage block of next data.If the storage file of a written data takies multiple index entry continuously, then only have first index entry to contain the index content of this file data, each index entry is all blank afterwards, like this can the write operation of reduced index item, reduces data redundancy.Storage block simultaneously corresponding to adjacent index entry is physically adjacent, makes the storage of flash card have greater flexibility.The all storage spaces of flash card are stored file and index file takes.Storage block corresponding to adjacent index entry is also physically adjacent.Read pointer in indexing head always points to the reference position of first (writing the earliest in other words) data in whole flash card.And write pointer always points to the current position that can write.In other words, after all valid data are all stored in read pointer and before write pointer, be white space before read pointer or after write pointer.Each index entry defines a circular list, and relative to circular list before or after mentioned here, write pointer is generally after read pointer, and only when not having data in flash card, write pointer is just in same position with read pointer.
As shown in Figure 3, the date storage method of this flash memory card in video monitoring equipment comprises the following steps:
In the step of aforementioned 102 write data, also comprise the sub-step of following 301 to 307:
Calculate storage block number N shared by data to be written.
Judge that current flash card remains empty storage block number L and whether is less than N.
If L is not less than N, then from the storage block pointed by write pointer, data sequence to be written is write N number of storage block.
If L is less than N, then the first preset storage block sum M for cover data is L, secondly the data pointed to read pointer are for initial address, storage block number shared by its follow-up integer number of data is added to M, until M is greater than or equal to N, upgrade read pointer to point to for the address after cover data and manipulative indexing skew simultaneously, then from the storage block pointed by write pointer, data sequence to be written is write N number of storage block.
Upgrade in the step of index entry information aforementioned 103, also comprise the sub-step of following 309:
Upgrade the address after the N number of storage block of write pointers point in indexing head and manipulative indexing skew.
Specifically:
In step 301, storage block number N shared by data to be written is calculated.
After this enter step 302, judge that current flash card remains empty storage block number L and whether is less than N.
If L is not less than N, then enter step 307; Otherwise, enter step 303.
In step 303, if judge, current flash card remains empty storage block number L and is less than N, then the preset storage block sum M for cover data is L.
After this enter step 304, point to data with read pointer and read storage block size shared by next data for start address and be added to M.
After this enter step 305, judge whether the storage block sum M for cover data is more than or equal to N.
If M is more than or equal to N, then enter step 306; Otherwise, return step 304, point to data with read pointer and read storage block size shared by next data for start address and be added to M.
Within step 306, upgrade read pointer to point to for the address after cover data and manipulative indexing skew.
After this enter step 307, from the storage block pointed by write pointer, data sequence to be written is write N number of storage block.
If the data of write take multiple storage block continuously, then the only information of these data of record search in the index entry corresponding to first occupied storage block.
If the storage file of a written data takies multiple index entry continuously, then only have first index entry to contain the index content of this file data, each index entry is all blank afterwards, like this can the write operation of reduced index item, reduces data redundancy.Flash card has living space and is stored file and index file takes, and facilitates the management of flash card storage space.Storage block corresponding to adjacent index entry is physically adjacent, the storage of flash card is made to have greater flexibility, do not need during recurrent wrIting once to write completely whole storage file, it is high that space covers utilization factor, is conducive to the storage to critical data frame in field of video monitoring.
In some other embodiments of the present invention, if the data of write take multiple storage block continuously, then can the only information of these data of record search in the index entry corresponding to first occupied storage block, also can in the index entry that all or part of occupied storage block is corresponding the information of these data of record search.
After this enter step 308, upgrade this N number of storage block manipulative indexing item information.
Index entry can comprise the information such as size, type, offset address of video data file, for the storage block of index search storage file, indexing head can comprise all storage size of data be stored on flash card, take the information such as storage size, predistribution video data number, current read pointer, current write pointer, facilitate flash card to access, and spatial coverage is higher.
After this enter step 309, upgrade the address after the N number of storage block of write pointers point in indexing head and manipulative indexing skew, after this process ends.
As a preferred embodiment of the present invention, Fig. 4 is the datacycle write schematic diagram of the date storage method of a kind of flash memory card in video monitoring equipment in second embodiment of the invention; In order to avoid the risk that the system-critical data frequently created or deleted file brings is destroyed, flash card takes the mode having allocated index file and all data files in advance when file system format.Only need the data revised in file like this when follow-up write and cover data and do not need to re-create and the size of file do not changed by deleted file simultaneously yet, re-writing renewal thus not to system-critical data.The data address that flash card stores reads from the read-write pointer indexing head information.First from the write pointer of indexing head information, find the offset address of index entry in the initial MBA memory block address that will write of data to be stored and manipulative indexing file, the schematic diagram that double data as shown in Figure 4 store, suppose that data X to be stored needs use 2 storage blocks by calculating its space size, then from the initial storage block of storage file, data are stored in continuous print 2 storage blocks, simultaneously, corresponding index entry node stored in space size shared by these data, the key messages such as Data Position.Final updating indexing head information, moves to the start address that data next time store, and upgrades other global data information by write pointer, as remaining space size, and residue Block quantity etc.Each storage takies several storage blocks and corresponding index entry node.
As a preferred embodiment of the present invention, Fig. 5 is the data cover write schematic diagram of the date storage method of a kind of flash memory card in video monitoring equipment in second embodiment of the invention;
When learning that flash card is fully written in indexing head information, such as, when reading and writing hands coincide, or when remaining space size is not enough to deposit new data, needing to carry out covering and storing.When judging to need to cover storage, current write pointer indication index entry nodal information can be searched in order, the cumulative storage block for covering, when preparing capped storage block number and being more than or equal to storage block number needed for data to be written, just stop search, and upgrade read pointer and point to node after the data manipulative indexing item node that last storage block is capped, to upgrade in indexing head information the key messages such as remaining space simultaneously.At this moment flash card remaining space just can meet the storage of new data, and new data such as aforementioned manner is stored into flash card.As shown in Figure 5, data to be written store needs 4 storage blocks, and flash card has not had remaining space, at this moment will carry out searching for and cover two index entry nodes and corresponding data thereof, idle 5 storage blocks of flash card.Data to be written employ 4 storage blocks, also a surplus free memory blocks.After covering, write pointers point index entry 27, read pointer points to index entry 28.In indexing head information, free memory blocks number becomes 1 from 0.
In some other embodiments of the present invention, flash card has living space and can all be stored file and index file takes, and also can not be occupied full, thus reserved certain storage space, for being stored in the file attribute information etc. on flash card.
In some other embodiments of the present invention, the storage block corresponding to adjacent index entry physically can adjacent also can be non-conterminous, when non-conterminous, multiple index can be carried out and carry out search and search or store data.
Each method embodiment of the present invention all can realize in modes such as software, hardware, firmwares.No matter the present invention realizes with software, hardware or firmware mode, instruction code can be stored in the addressable storer of computing machine of any type (such as permanent or revisable, volatibility or non-volatile, solid-state or non-solid, fixing or removable medium etc.).Equally, storer can be such as programmable logic array (Programmable Array Logic, be called for short " PAL "), random access memory (Random Access Memory, be called for short " RAM "), programmable read only memory (Programmable Read Only Memory, be called for short " PROM "), ROM (read-only memory) (Read-Only Memory, be called for short " ROM "), Electrically Erasable Read Only Memory (Electrically Erasable Programmable ROM, be called for short " EEPROM "), disk, CD, digital versatile disc (Digital Versatile Disc, be called for short " DVD ") etc.
Third embodiment of the invention relates to a kind of data-storage system of flash memory card in video monitoring equipment.Fig. 6 is the structural representation of the data-storage system of this flash memory card in video monitoring equipment.The data-storage system of this flash memory card in video monitoring equipment arranges the multiple storage file and an index file that file size remains unchanged in advance in flash card, and index file comprises an indexing head and multiple index entry.Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in index file.Indexing head comprises write pointer, points to the index entry of the next storage block that can write.
System comprises with lower module:
Recurrent wrIting module, for from the position of write pointers point, according to the order of index entry each in index file, successively to the storage block write data corresponding to each index entry.If write the storage block corresponding to last index entry of index file, then write pointer gets back to first index entry of index file.
Index upgrade module, the attribute information for the data write according to recurrent wrIting module upgrades the information of respective index item.
First embodiment is the method embodiment corresponding with present embodiment, and present embodiment can be worked in coordination with the first embodiment and be implemented.The relevant technical details mentioned in first embodiment is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment also can be applicable in the first embodiment.
Four embodiment of the invention relates to a kind of data-storage system of flash memory card in video monitoring equipment.Fig. 7 is the structural representation of the data-storage system of this flash memory card in video monitoring equipment.
4th embodiment improves on the basis of the 3rd embodiment, and main improvements are: specifically:
If the data of write take multiple storage block continuously, then the only information of these data of record search in the index entry corresponding to first occupied storage block.
Also comprise read pointer in indexing head, point to the index entry of the readable storage block of next data.
Recurrent wrIting module also comprises following submodule:
Calculating sub module, for calculating storage block number N shared by data to be written.
Judge submodule, for judging that current flash card remains empty storage block number L and whether is less than the storage block number N that calculating sub module calculates.
First write submodule, if for judging that submodule judges that L is not less than N, then, from the storage block pointed by write pointer, write N number of storage block by data sequence to be written.
Second write submodule, if for judging that submodule judges that L is less than N, then the first preset storage block sum M for cover data is L, secondly the data pointed to read pointer are for initial address, storage block number shared by its follow-up integer number of data is added to M, until M is greater than or equal to N, upgrades read pointer simultaneously and point to for the address after cover data and manipulative indexing skew, again from the storage block pointed by write pointer, data sequence to be written is write N number of storage block.
Index upgrade module also comprises following submodule:
Upgrade submodule, after at the first write submodule or the second write submodule data sequence to be written being write N number of storage block, upgrade the address after the N number of storage block of write pointers point in indexing head and manipulative indexing skew.
The all storage spaces of flash card are stored file and index file takes.
Storage block corresponding to adjacent index entry is also physically adjacent.
Second embodiment is the method embodiment corresponding with present embodiment, and present embodiment can be worked in coordination with the second embodiment and be implemented.The relevant technical details mentioned in second embodiment is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment also can be applicable in the second embodiment.
It should be noted that, the each module mentioned in the present invention's each equipment embodiment is all logic module, physically, a logic module can be a physical module, also can be a part for a physical module, can also realize with the combination of multiple physical module, the Physical realization of these logic modules itself is not most important, and the combination of the function that these logic modules realize is the key just solving technical matters proposed by the invention.In addition, in order to outstanding innovative part of the present invention, the module not too close with solving technical matters relation proposed by the invention is not introduced by the above-mentioned each equipment embodiment of the present invention, and this does not show that the said equipment embodiment does not exist other module.
Although by referring to some of the preferred embodiment of the invention, to invention has been diagram and describing, but those of ordinary skill in the art should be understood that and can do various change to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (10)

1. a date storage method for flash memory card in video monitoring equipment, is characterized in that, in flash card, arrange multiple storage file and an index file that file size remains unchanged in advance, index file comprises an indexing head and multiple index entry; Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in described index file; Indexing head comprises write pointer, points to the index entry of the next storage block that can write; Described index file is the file of a kind of linked list data structure for indicating one-to-one relationship between logical record and physical record set up outside storage file;
Said method comprising the steps of:
From the position of described write pointers point, according to the order of index entry each in described index file, successively to the storage block write data corresponding to each index entry; If write the storage block corresponding to last index entry of described index file, then described write pointer gets back to first index entry of described index file;
Upgrade the information of respective index item according to the attribute information of the data of each storage block of write, the information of described index entry comprises storage size of data, data type, and the position of data in storage file.
2. the date storage method of flash memory card in video monitoring equipment according to claim 1, it is characterized in that, if the data of said write take multiple storage block continuously, then in the index entry corresponding to first occupied storage block, only record the information of these data.
3. the date storage method of flash memory card in video monitoring equipment according to claim 1, is characterized in that, also comprises read pointer in indexing head, points to the index entry of the readable storage block of next data;
In the step of said write data, also comprise following sub-step:
Calculate storage block number N shared by data to be written;
Judge that current flash card remains empty storage block number L and whether is less than described N;
If L is not less than N, then from the storage block pointed by described write pointer, described data sequence to be written is write N number of storage block;
If L is less than N, then the first preset storage block sum M for cover data is L, secondly the data pointed to described read pointer are for initial address, storage block number shared by its follow-up integer number of data is added to M, until M is greater than or equal to described N, upgrade described read pointer points to described for the address after cover data and manipulative indexing skew simultaneously, then from the storage block pointed by described write pointer, described data sequence to be written is write N number of storage block;
In the step of described renewal index entry information, also comprise following sub-step:
Upgrade the address after N number of storage block described in the write pointers point in described indexing head and manipulative indexing skew.
4. the date storage method of flash memory card in video monitoring equipment according to claim 3, is characterized in that, all storage spaces of described flash card are taken by described storage file and index file.
5. the date storage method of flash memory card in video monitoring equipment according to any one of claim 1 to 4, is characterized in that, the storage block corresponding to adjacent index entry is also physically adjacent.
6. a data-storage system for flash memory card in video monitoring equipment, is characterized in that, in flash card, arrange multiple storage file and an index file that file size remains unchanged in advance, index file comprises an indexing head and multiple index entry; Comprise an integer storage block in each storage file, each storage block respectively with each index entry one_to_one corresponding in described index file; Indexing head comprises write pointer, points to the index entry of the next storage block that can write; Described index file is the file of a kind of linked list data structure for indicating one-to-one relationship between logical record and physical record set up outside storage file;
Described system comprises with lower module:
Recurrent wrIting module, for the position from described write pointers point, according to the order of index entry each in described index file, successively to the storage block write data corresponding to each index entry; If write the storage block corresponding to last index entry of described index file, then described write pointer gets back to first index entry of described index file;
Index upgrade module, the attribute information for writing the data of each storage block according to described recurrent wrIting module upgrades the information of respective index item, and the information of described index entry comprises storage size of data, data type, and the position of data in storage file.
7. the data-storage system of flash memory card in video monitoring equipment according to claim 6, it is characterized in that, if the data of said write take multiple storage block continuously, then in the index entry corresponding to first occupied storage block, only record the information of these data.
8. the data-storage system of flash memory card in video monitoring equipment according to claim 6, is characterized in that, also comprises read pointer in indexing head, points to the index entry of the readable storage block of next data;
Described recurrent wrIting module also comprises following submodule:
Calculating sub module, for calculating storage block number N shared by data to be written;
Judge submodule, for judging that current flash card remains empty storage block number L and whether is less than the storage block number N that described calculating sub module calculates;
First write submodule, if judge that L is not less than N for described judgement submodule, then, from the storage block pointed by described write pointer, writes N number of storage block by described data sequence to be written;
Second write submodule, if judge that L is less than N for described judgement submodule, then the first preset storage block sum M for cover data is L, secondly the data pointed to described read pointer are for initial address, storage block number shared by its follow-up integer number of data is added to M, until M is greater than or equal to described N, upgrade described read pointer points to described for the address after cover data and manipulative indexing skew simultaneously, again from the storage block pointed by described write pointer, described data sequence to be written is write N number of storage block;
Described index upgrade module also comprises following submodule:
Upgrade submodule, after at described first write submodule or the second write submodule described data sequence to be written being write N number of storage block, upgrade the address after N number of storage block described in the write pointers point in described indexing head and manipulative indexing skew.
9. the data-storage system of flash memory card in video monitoring equipment according to claim 8, is characterized in that, all storage spaces of described flash card are taken by described storage file and index file.
10. the data-storage system of the flash memory card in video monitoring equipment according to any one of claim 6 to 9, is characterized in that, the storage block corresponding to adjacent index entry is also physically adjacent.
CN201110341083.7A 2011-11-02 2011-11-02 Data storage method of flash memory card in video monitoring equipment, and system thereof Active CN102508784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110341083.7A CN102508784B (en) 2011-11-02 2011-11-02 Data storage method of flash memory card in video monitoring equipment, and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110341083.7A CN102508784B (en) 2011-11-02 2011-11-02 Data storage method of flash memory card in video monitoring equipment, and system thereof

Publications (2)

Publication Number Publication Date
CN102508784A CN102508784A (en) 2012-06-20
CN102508784B true CN102508784B (en) 2015-01-07

Family

ID=46220875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110341083.7A Active CN102508784B (en) 2011-11-02 2011-11-02 Data storage method of flash memory card in video monitoring equipment, and system thereof

Country Status (1)

Country Link
CN (1) CN102508784B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544124B (en) * 2012-07-16 2018-01-19 上海塞尚通信技术有限公司 The access method of Nand flash storages
CN103268266A (en) * 2013-01-04 2013-08-28 苏州懿源宏达知识产权代理有限公司 Method for verifying and storing flash memory
CN103051977A (en) * 2013-01-11 2013-04-17 乐视网信息技术(北京)股份有限公司 Method for processing p2p (peer-to-peer) cache data
CN104699727B (en) * 2014-01-15 2017-12-22 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN105208596A (en) * 2014-06-17 2015-12-30 中兴通讯股份有限公司 Header compression method, decompression method and device
CN105468642A (en) * 2014-09-09 2016-04-06 杭州海康威视数字技术股份有限公司 Data storage method and apparatus
CN104461917A (en) * 2014-12-05 2015-03-25 宁波新尚智能电气有限公司 Nor Flash-based regional cycle storage method
CN105389376B (en) * 2015-11-18 2020-01-03 武汉微创光电股份有限公司 Fragmentation-free multimedia data storage method and system based on continuous blocks
CN107391388B (en) * 2016-05-17 2021-06-11 阿里巴巴集团控股有限公司 Method and equipment for storing data based on instant messaging
CN107562766B (en) * 2016-07-01 2020-11-27 杭州海康威视数字技术股份有限公司 Data file writing method, device and system
CN106294213B (en) * 2016-08-02 2019-07-16 芯启源电子科技有限公司 Storage device, electronic equipment and buffer management method
CN106293532A (en) * 2016-08-10 2017-01-04 广东佳禾声学科技有限公司 A kind of Flash data storage method
CN107506308A (en) * 2017-06-30 2017-12-22 杭州旗捷科技有限公司 A kind of chip rewrites date storage method, electronic equipment and the storage medium of equipment
CN107861891A (en) * 2017-11-14 2018-03-30 郑州天迈科技股份有限公司 Audio/video data access method for public transport vehicle-mounted hard disk
CN108228095B (en) * 2017-12-15 2021-02-09 中国航空工业集团公司西安飞行自动控制研究所 Method for recording real-time information based on Flash
CN109002399B (en) * 2018-07-09 2021-05-18 北京智芯微电子科技有限公司 Method for recording embedded equipment event
CN109634919A (en) * 2018-10-16 2019-04-16 西北铁道电子股份有限公司 A kind of file management system
WO2020102955A1 (en) * 2018-11-20 2020-05-28 浙江宇视科技有限公司 Monitoring video storage method and apparatus, and video storage device
CN109783321B (en) * 2019-01-24 2022-09-23 深圳市景阳信息技术有限公司 Monitoring data management method and device and terminal equipment
CN110008179B (en) * 2019-04-02 2023-06-16 深圳创维汽车智能有限公司 File storage method, automobile data recorder and readable storage medium
CN110767304A (en) * 2019-09-25 2020-02-07 广东宝莱特医用科技股份有限公司 Method and device for circularly storing data for hemodialysis device
CN111125427A (en) * 2019-12-26 2020-05-08 浪潮电子信息产业股份有限公司 Video file reading method and device, electronic equipment and medium
CN113127415B (en) * 2019-12-31 2024-02-27 浙江宇视科技有限公司 Real-time stream file processing method, device, medium and electronic equipment
CN111382122B (en) * 2020-03-11 2024-01-30 杭州涂鸦信息技术有限公司 File management system and method for multi-path network camera sub-equipment
CN114153399B (en) * 2021-12-07 2023-10-20 四川云从天府人工智能科技有限公司 Data storage method, device, control device and medium of storage system
CN117453632B (en) * 2023-12-25 2024-04-12 杭州计算机外部设备研究所(中国电子科技集团公司第五十二研究所) Data storage method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034346A (en) * 2006-03-10 2007-09-12 北京佳讯飞鸿电气有限责任公司 Date storage method for circulating queue
CN101266573A (en) * 2008-04-29 2008-09-17 中国船舶重工集团公司第七〇九研究所 Covering allowable flash memory even wearing circulating queue technology
CN101727398A (en) * 2008-10-31 2010-06-09 西安奇维测控科技有限公司 Methods for realizing storage and reduction of management data of flash controller by information serialization
CN102063379A (en) * 2010-12-28 2011-05-18 天津市亚安科技电子有限公司 Data storage method of FLASH memory
CN102117297A (en) * 2009-12-31 2011-07-06 华为技术有限公司 Streaming media file processing method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409489B2 (en) * 2005-08-03 2008-08-05 Sandisk Corporation Scheduling of reclaim operations in non-volatile memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034346A (en) * 2006-03-10 2007-09-12 北京佳讯飞鸿电气有限责任公司 Date storage method for circulating queue
CN101266573A (en) * 2008-04-29 2008-09-17 中国船舶重工集团公司第七〇九研究所 Covering allowable flash memory even wearing circulating queue technology
CN101727398A (en) * 2008-10-31 2010-06-09 西安奇维测控科技有限公司 Methods for realizing storage and reduction of management data of flash controller by information serialization
CN102117297A (en) * 2009-12-31 2011-07-06 华为技术有限公司 Streaming media file processing method, device and system
CN102063379A (en) * 2010-12-28 2011-05-18 天津市亚安科技电子有限公司 Data storage method of FLASH memory

Also Published As

Publication number Publication date
CN102508784A (en) 2012-06-20

Similar Documents

Publication Publication Date Title
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN102158349B (en) A kind of log management apparatus and method
CN101916290B (en) Managing method of internal memory database and device
CN103164490B (en) A kind of efficient storage implementation method of not fixed-length data and device
CN101645043B (en) Methods for reading and writing data and memory device
CN104461391A (en) Method and system for managing and processing metadata of storage equipment
CN104750565A (en) NAND bad block processing method and NAND flash memory device
CN103577574A (en) High-reliability linear file system based on nand flash
CN105446664B (en) A kind of pair of memory carries out file memory method and storage device
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN113568582B (en) Data management method, device and storage equipment
CN102169460A (en) Method and device for managing variable length data
CN103049224A (en) Method, device and system for importing data into physical tape
CN104021089A (en) Flash memory control chip, storage device and flash memory control method
US8239427B2 (en) Disk layout method for object-based storage devices
CN108664577B (en) File management method and system based on FLASH idle area
CN104951482A (en) Method and device for operating Sparse-format mirror image document
CN112463055A (en) Method, system, equipment and medium for optimizing and using L2P table of solid state disk
US20120137107A1 (en) Method of decaying hot data
CN101303667B (en) Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster
CN103309619A (en) NAND Flash memory data storage method
CN102306128A (en) Disk management method and device and network equipment
CN108647278B (en) File management method and system
CN110286859B (en) Data storage method and device based on FAT file system
CN115079957B (en) Request processing method, device, controller, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant