CN101539884A - Method and device for data storage - Google Patents
Method and device for data storage Download PDFInfo
- Publication number
- CN101539884A CN101539884A CN200910136161A CN200910136161A CN101539884A CN 101539884 A CN101539884 A CN 101539884A CN 200910136161 A CN200910136161 A CN 200910136161A CN 200910136161 A CN200910136161 A CN 200910136161A CN 101539884 A CN101539884 A CN 101539884A
- Authority
- CN
- China
- Prior art keywords
- file
- grade
- folder
- file folder
- grade file
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for data storage. The method comprises the following steps of: assigning a first-level file folder for an established channel in a plurality of established first-level file folders; assigning a secondary-level file folder in a plurality of established secondary-level file folders under the first-level file folders; and establishing a file with a fixed size used for storing the data in the channel. In the invention, the form of assigning multilevel file folders for the channel realizes the data storage in the channel, which has no need to spend large amount of time for pre-establishing a file at the very start; and the form also realizes the dynamic addition and deletion, and the dynamic expansion or reduction of the capacity of the storage channel. Furthermore, by cycle overwriting of the files with fixed sizes, the invention completely avoids the generation of the file fragmentation, thus leading the storage performance of arrays or disks to have no reduction with the increasing of the service time.
Description
Technical field
The present invention relates to networking technology area, relate in particular to a kind of date storage method and device.
Background technology
Along with expanding economy is more and more higher to the demand of security protection, video monitoring is as the important component part of safety-security area, also obtain develop rapidly in recent years, developed into the video monitoring system of present digitizing, many sites, multi-field, big data quantity from early stage specific area dedicated system.
The technology of video monitoring mainly comprises audio-video collection, data readback and data storage.The basic functional principle of video monitoring system is to utilize camera/video camera to obtain video information, is encoded by scrambler, the video data digitizing again.Digitized video data can also store earlier except being used for real-time monitoring, for follow-up playback.
The topmost purpose of video monitoring be the record previous event, so data storage in a major function of video monitoring, its stability has determined the stability of whole video supervisory system.
Current in field of video monitoring, the storage mode of most of audio, video datas is to create file system on array or disk.Network encoder or DVR read, write the management of all passing through file system to audio, video data.Because file system is the management system of a logic, it has shielded discontinuous difference on the file data physical presence hard disk, and it all is continuous that file is seemed.The deletion that does not stop, the position that the establishment file that does not stop can make file data reality store on hard disk is more and more discontinuous. and discontinuous as time passes probability is just high more, has promptly produced the file system fragment.File fragmentation is many more will to make the frequent tracking of disk, and memory property can descend, and requires memory device to have stable disk read-write performance in the monitoring storage, so must solve the problem of file system fragment in the monitoring storage.
Date storage method in a kind of video monitoring system is provided in the prior art.It earlier with array or formatting hard disk, all writes all arrays or hard disk the file (for example array size is 8T, and the glue file size is 100M, then needs to write 83886 files) of full fixed size again after having created file system when system initialization; Distribute the storage space (for example equipment has 10 passages, then the glue file of 8T/10=819G size is distributed to each passage) of fixed size then for fixing memory channel.Zone of specific assigned in storage space (for example reserving the 1G space for each passage) is used for the glue file that management channels distributes, and is used for representing which passage file belongs to, whether this document is being stored, whether is storing information such as full.After a memory channel all was filled with, removing to search which file according to management area (refer to just now to reserve for each passage 1G space) can specifically cover, and then carried out write operation after finding this document.
There is following problem in implementation of the prior art: adopt a series of complex data structures and special-purpose management area that glue file is managed, realize complicated and the waste storage space.In addition, when initialized, need all arrays or hard disk are all write the file of full fixed size, and at present in the supervisory system capacity of a memory device all finish writing file and will consume the plenty of time substantially more than 8T.In addition, because memory capacity all is that fixed allocation is given memory channel, therefore do not support the dynamic interpolation and the deletion of memory channel.
Summary of the invention
The invention provides a kind of date storage method and device, be used for when reducing file fragmentation, safeguarding storage device performance, realizing efficient and easy management file data in the video monitoring system.
For achieving the above object, the invention provides a kind of date storage method, comprising:
In a plurality of first grade file folders of having set up, be first grade file folder of channel allocation of having created;
In a plurality of second grade file folders of under described first grade file folder, having set up, distribute a second grade file folder;
Under described second grade file folder, set up the file of a fixed size, be used for the storage of described passage data.
Wherein, described in a plurality of first grade file folders of having set up, before first grade file folder of channel allocation of having created, also comprise:
In the root directory of storage space, set up a plurality of first grade file folders, under each first grade file folder, create a plurality of second grade file folders; The name of described a plurality of first grade file folders is called first grade file and presss from both sides initial title and different; The name of described a plurality of second grade file folders is called second grade file and presss from both sides initial title and different;
In storage space, set up the fixed block file of a free time.
Wherein, also comprise:
For a first grade file folder of the channel allocation created back, under described second grade file folder, set up the file of a fixed size before, described first grade file folder for the channel allocation created is carried out rename;
Before distributing a second grade file folder back in a plurality of second grade files folders of under described first grade file folder, having set up, under described second grade file folder, setting up the file of a fixed size, the second grade file folder of described distribution is carried out rename.
Wherein, the described file of under described second grade file folder, setting up a fixed size, the storage that is used for described passage data comprises:
Judge in the fixed block file of described free time and whether have file;
After then setting up the new file and name of a fixed size when not existing, be linked to described second grade file folder down, be used for the storage of described passage data; Then the arbitrary file in the described already present file is carried out when existing being linked at described second grade file folder down after the rename, be used for the storage of described passage data, the file of described already present file is called the initial title of file.
Wherein, also comprise:
After data in the described passage will all take for the space of described channel allocation, be retrieved as the first grade file folder of described channel allocation;
Obtain described first grade file folder down in each second grade file folder Time Created file the earliest, with the initial title of the deletion of the content in described file back RNTO file, and be linked to the fixed block file of described free time.
Wherein, also comprise:, increase or be reduced to the space of described channel allocation by revising the passage stored configuration;
Data in the described passage surpass when being the space of described channel allocation in the described passage stored configuration, are retrieved as the first grade file folder of described channel allocation; According to the quantity of documents of difference needs deletions that in data in the described passage and the described passage stored configuration is the space of described channel allocation, according to Time Created by early obtaining the described first grade file folder file in each second grade file folder down to the order in evening, content in the described file that gets access to is deleted the initial title of back RNTO file, and be linked to the fixed block file of described free time.
Wherein, also comprise:
When needing the data in the deletion passage, be retrieved as the first grade file folder of described channel allocation;
Obtain the file in each second grade file folder under the described first grade file folder, with the initial title of the deletion of the content in described file back RNTO file, and the fixed block file of described free time is added in link to;
The filename RNTO second grade file of described each second grade file folder is pressed from both sides initial title, and the filename RNTO first grade file that described first grade file is pressed from both sides presss from both sides initial title.
The present invention also provides a kind of data storage device, comprising:
First allocation units are used at a plurality of first grade file folders of having set up, are first grade file folder of channel allocation of having created;
Second allocation units, a plurality of second grade files that are used for having set up under the first grade file folder that described first allocation units distribute press from both sides, and distribute a second grade file folder;
File storage unit is used for setting up the file of a fixed size under the second grade file folder that described second allocation units distribute, be used for the storage of described passage data.
Wherein, also comprise:
Initialization unit is used for setting up a plurality of first grade file folders at the root directory of storage space, creates a plurality of second grade file folders under each first grade file folder; The name of described a plurality of first grade file folders is called first grade file and presss from both sides initial title and different; The name of described a plurality of second grade file folders is called second grade file and presss from both sides initial title and different; In storage space, set up the fixed block file of a free time.
Wherein, described first allocation units before also being used to a first grade file folder of the channel allocation created back, setting up the file of a fixed size under described second grade file folder, carry out rename with described first grade file folder for the channel allocation created;
Described second allocation units, before also being used for distributing a second grade file folder back, under described second grade file folder, setting up the file of a fixed size, the second grade file folder of described distribution is carried out rename at a plurality of second grade files folders of having set up under the described first grade file folder.
Wherein, described file storage unit comprises:
Judgment sub-unit is used for judging whether the fixed block file of described free time exists file;
The first file storage subelement is used in the judged result of described judgment sub-unit when not existing, set up the new file and name of a fixed size after, be linked to described second grade file folder down, be used for the storage of described passage data;
The second file storage subelement, be used in the judged result of described judgment sub-unit when existing, arbitrary file in the described already present file is carried out being linked at described second grade file folder down after the rename, be used for the storage of described passage data, the file of described already present file is called the initial title of file.
Wherein, also comprise:
The file delete unit is used for after the data of described passage will all take for the space of described channel allocation, is retrieved as the first grade file folder of described channel allocation; Obtain described first grade file folder down in each second grade file folder Time Created file the earliest, with the initial title of the deletion of the content in described file back RNTO file, and be linked to the fixed block file of described free time.
Wherein, also comprise:
The space management unit is used for increasing or be reduced to the space of described channel allocation by revising the passage stored configuration; Data in the described passage surpass when being the space of described channel allocation in the described passage stored configuration, are retrieved as the first grade file folder of described channel allocation; According to the quantity of documents of difference needs deletions that in data in the described passage and the described passage stored configuration is the space of described channel allocation, according to Time Created by early obtaining the described first grade file folder file in each second grade file folder down to the order in evening, content in the described file that gets access to is deleted the initial title of back RNTO file, and be linked to the fixed block file of described free time.
Wherein, also comprise:
The passage delete cells is used for when needs are deleted the data of passage, is retrieved as the first grade file folder of described channel allocation; Obtain the file in each second grade file folder under the described first grade file folder, with the initial title of the deletion of the content in described file back RNTO file, and the fixed block file of described free time is added in link to; The filename RNTO second grade file of described each second grade file folder is pressed from both sides initial title, and the filename RNTO first grade file that described first grade file is pressed from both sides presss from both sides initial title.
Compared with prior art, the present invention has the following advantages:
By realized storage for the form of the multistage file of channel allocation to data in the passage, it need not spend the plenty of time for pre-creating file at the beginning, and has realized the dynamic interpolation of memory channel and the dynamic capacity-expanding or the reduction of deletion and memory channel capacity.Circulation by file overrides in addition, has stopped the generation of file fragmentation, makes the memory property of array or disk can not reduce with the growth of service time.
Description of drawings
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Fig. 1 is the process flow diagram of the date storage method that provides among the present invention;
Fig. 2 is the structural representation of the array after the initialization or disk structure in the application scenarios of the present invention;
Fig. 3 is the channel allocation passage file created and the synoptic diagram of date file in the application scenarios of the present invention;
Fig. 4 is the establishment synoptic diagram of video file in the application scenarios of the present invention;
Fig. 5 is the deletion synoptic diagram of video file in the application scenarios of the present invention;
Fig. 6 is the deletion synoptic diagram of the passage created in the application scenarios of the present invention;
Fig. 7 is the structural representation of the data storage device that provides among the present invention;
Fig. 8 is another structural representation of the data storage device that provides among the present invention.
Embodiment
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The invention provides a kind of date storage method, in storage space, set up a plurality of first grade file folders, under each first grade file folder, create a plurality of second grade file folders; The first grade file folder can be the passage file, and the second grade file folder can be the date file, can also use different naming methods certainly.As shown in Figure 1, this method comprises:
Step s101, in a plurality of first grade files folder of having set up, be first grade file folder of channel allocation of having created.
During step s102, a plurality of second grade files of having set up press from both sides, distribute a second grade file folder under the first grade file folder.
Step s103, under second grade file folder, set up the file of a fixed size, be used for the storage of passage data.
Below in conjunction with an application scenarios of the present invention, describe the embodiment of the date storage method that provides among the present invention in detail.Wherein, the first grade file folder is the passage file, and the second grade file folder is the date file.
After array or disk are carried out the establishment of file system, under root directory, create N (N is a fixed value, as 100) passage file.The title of passage file can be named into first grade file according to default naming rule and presss from both sides initial title (as passage catalogue 1, passage catalogue 2, ..., passage catalogue N), under each passage file, create and generate M (M is that fixed value is as 500) date file, the date Folder Name can be named into second grade file according to default naming rule and press from both sides initial title (as date catalogue 1, date catalogue 2, ..., date catalogue M), and under root directory, generate one " idle fixed block file ", be used for set up but the file chaining that is not linked to any date file to should " fixed block file of free time " safeguarding.Because just spanned file presss from both sides, so initialization speed is very fast.Owing to do not need as prior art Array Disk to be write the operation of the file of full fixed size, initialization operation just can be finished at once in addition, and array after the initialization or disk structure are as shown in Figure 2.When the present invention adopts the mode of a file of each passage to organize data, therefore realize simply, and do not need to come the file of management channels self, so saved storage space for each passage distributes a zone separately.
After creating storage space for passage, the passage file of channel allocation for having created carries out rename with " first grade file presss from both sides initial title " of this passage file according to the title of passage.For video monitoring system, the passage here can be understood as corresponding with a video acquisition device (as camera), and the audio-visual data of this image collecting device collection will store in this array or the disk.In addition, in a plurality of date files of under the passage file, having set up, distribute a date file and " second grade file presss from both sides initial title " that should the date file to carry out rename according to the current date.With situation shown in Figure 3 is example, the one passage file that has been assumed to be the pairing channel allocation of video acquisition device that is positioned at the crossing, the Changjiang river, with its title RNTO " crossing, the Changjiang river ", distribute a date file down at this " crossing, the Changjiang river ", and RNTO " 20090311 ".By this process, can realize the dynamic interpolation of passage.
After passage file and date folder allocation finish, can carry out the establishment and the storage of video file.In the method provided by the invention, when beginning to write video file, judge that at first file total volumies all under this passage is whether more than or equal to the max cap. of this default passage; Judged result can directly be carried out the establishment and the storage of new file for not the time; Judged result then needs the file of having created is deleted when being, carries out the establishment and the storage of new file afterwards again.Created the process of file about this deletion, will describe in detail later.When the establishment of carrying out new file and storage, at first search in " idle fixed block file " and whether have file, if not the file that to create a size be Z (Z is default fixed value such as 256MB, this size is the setting value of All Files size in the file system), after according to preset rules this document being named, this document is linked to (as " 20090311 ") under the corresponding date catalogue, and carries out writing of audio, video data.If there is file (the file initial title of file by name that has had file in " idle fixed block file " in " idle fixed block file ", as initial file 1, original document 2, ..., for file with the initial name nominating of file, it is from the file of once creating that is used to store audio, video data, when one be used for storing the content of file of audio, video data deleted after, its filename will be by the initial title of RNTO file, and be linked in " idle fixed block file ", use when treating to be created file by self passage or other passage, for already present file in " idle fixed block file ", the initial title of its file is different promptly), then need not to create new file, directly the file chaining in " idle fixed block file " is arrived under the corresponding date catalogue (as " 20090311 "), according to carrying out writing of audio, video data behind preset rules rename this document.With situation shown in Figure 4 is example, for channel allocation passage file " crossing, the Changjiang river " and after setting up date file " 20090311 ", judge in " idle fixed block file " and whether have file, the file that then to create a size when not existing be Z, file " B130500E132000.H3CRD " by name is linked under the date catalogue " 20090311 ", and carries out writing of audio, video data; File chaining in then will " idle fixed block file " when existing carries out writing of audio, video data with its filename after by the initial title of file (as initial file 2) RNTO " B130500E132000.H3CRD " under date catalogue " 20090311 ".When file " B130500E132000.H3CRD " write full after (in the file content arrive in Z), repeat above-mentioned steps, obtain the file of by name " B1320000E000000.H3CRD " and be linked under the date catalogue " 20090311 ", proceed writing of audio, video data.By this process, can realize the dynamic interpolation of video file.
File in a passage has surpassed the channel capacity threshold values, when the space that is about to distribute to this passage is filled with, need carry out having created in the passage deletion of video file.For the video file of needs deletion,, be linked in " idle fixed block file " with its RNTO " the initial title of file " and after deleting the content of wherein preserving.Use when treating to be created file, thereby the circulation that has realized file covers by self passage or other passage.In the system of selection of the video file that needs are deleted, can find creation-time storage file the earliest according to the date file, with its video file as the needs deletion; Can certainly adopt additive method need to select the video file of deletion, the present invention does not limit this.With situation shown in Figure 5 is example, when the space that storage in passage file " crossing, the Changjiang river " video recording will have been distributed to it is filled with, after the file RNTO " the initial title of file " of establishment is also deleted the file content of wherein preserving the earliest in the date file " 20090311 ", be linked to (different the getting final product of the initial title of file of already present alternative document in " the initial title of file " after the rename and " the fixed block file of free time ") in " idle fixed block file ".When the deleted file content, can be with all the elements Delete All in the file; Also can be only with the deletion of the file index in the file, the other guide in the file of file index deletion back promptly can't read again, and therefore a deleted file index gets final product.Compare with the operation that prior art is write the file of full fixed size in advance to Array Disk, file in the application scenarios of the present invention is dynamically to set up as required, and after the file delete operation with in file chaining to the fixing file of deletion with in follow-up recycling
Application scenarios of the present invention also relates to the method that increases or be reduced to the space of channel allocation.By revising the passage stored configuration, can increase or be reduced to the space of channel allocation.When need be the time for the storage space dilatation of certain passage, statistic chain is received the file size and the hard disk remaining space size of " idle fixed block file ", if be linked to the file size of " idle fixed block file " and hard disk remaining space size sum needs dilatation greater than this passage capacity, then satisfy the dilatation demand, can increase the channel capacity threshold values.Reduce the storage space of certain passage when needs, then at first reduce the channel capacity threshold values, when the size that has had file in the passage surpasses the channel capacity threshold values, the value that surpasses the channel capacity threshold values according to the file of passage, obtain the quantity of the file that needs deletion, and after will needing the file rename one-tenth of deleting " the initial title of file " and deleting the content of wherein preserving, be linked to (different the getting final product of the initial title of file of already present alternative document in " the initial title of file " after the rename and " the idle fixed block file ") in " idle fixed block file ".The dynamic capacity-expanding and the reduction of channel capacity have been realized by above-mentioned steps.
When needs are deleted certain passage, after at first all rename becomes " the initial title of file " and deletes the content of wherein preserving with the All Files under this passage catalogue, be linked in " idle fixed block file ".Be " date initialization title " with all the date folder rename below this passage again, at last with passage folder name RNTO " passage initialization title ".With situation shown in Figure 6 is example, behind file RNTO " the initial title of the file " file index of having created in passage file " crossing, the Changjiang river " file of following date " 20090311 " that also deletion is wherein preserved, be linked to (different the getting final product of the initial title of file of already present alternative document in " the initial title of file " after the rename and " the fixed block file of free time ") in " idle fixed block file "; Again with all the date files below this passage as " 20090311 " RNTO " second grade file presss from both sides initial title " as date directory A (pressing from both sides initial title with existing each second grade file does not repeat to get final product), at last with passage folder name " crossing, the Changjiang river " RNTO " first grade file presss from both sides initial title " as passage catalogue B (pressing from both sides initial title with existing each first grade file does not repeat to get final product).
The file system that is used to store array of data or disk in the above-mentioned application scenarios can be EXT3 (Third extended file system, a kind of Journal File System), FAT32 (File AllocationTable32, a kind of file system of Windows operating system), NTFS (New Technology FileSystem, a kind of file system of Windows operating system) file system such as, the establishment that file or folder is carried out, read-write, deletion waits operation can pass through operating system (as Windows, operating systems such as Linux) handling function realizes that the present invention does not limit this.
In the said method provided by the invention, by realized storage for the form of the multistage file of channel allocation to data in the passage, it need not spend the plenty of time for pre-creating file at the beginning, and has realized the dynamic interpolation of memory channel and the dynamic capacity-expanding or the reduction of deletion and memory channel capacity.Circulation by file overrides in addition, has stopped the generation of file fragmentation, makes the memory property of array or disk can not reduce with the growth of service time.
The present invention also provides a kind of data storage device, as shown in Figure 7, comprising:
In the data storage device provided by the invention, as shown in Figure 8, also comprise:
In addition, file storage unit 30 comprises:
Judgment sub-unit 31 is used for judging whether idle fixed block file exists file;
The first file storage subelement 32 is used in the judged result of judgment sub-unit 31 when not existing, set up the new file and name of a fixed size after, be linked to the second grade file folder down, be used for the storage of passage data;
The second file storage subelement 33, be used in the judged result of judgment sub-unit 31 when existing, arbitrary file in the described already present file is carried out being linked at the second grade file folder down after the rename, be used for the storage of passage data, the file of described already present file is called the initial title of file.
Also comprise:
File delete unit 50 is used for after the data of passage will all take for the space of channel allocation, obtains the first grade file folder of first allocation units 10 for channel allocation; Obtain first grade file folder down in each second grade file folder of distributing of second allocation units 20 Time Created file the earliest, with the initial title of the deletion of the content in file back RNTO file, and be linked to idle fixed block file.
Also comprise:
Also comprise:
Passage delete cells 70 is used for when needs are deleted the data of passage, obtains the first grade file folder of first allocation units 10 for channel allocation; Obtain the first grade file folder file in each second grade file folder of distributing of second allocation units 20 down, with the initial title of the deletion of the content in file back RNTO file, and idle fixed block file is added in link to; The filename RNTO second grade file of each second grade file folder is pressed from both sides initial title, and the filename RNTO first grade file that this first grade file is pressed from both sides presss from both sides initial title.
In the said apparatus provided by the invention, by realized storage for the form of the multistage file of channel allocation to data in the passage, it need not spend the plenty of time for pre-creating file at the beginning, and has realized the dynamic interpolation of memory channel and the dynamic capacity-expanding or the reduction of deletion and memory channel capacity.Circulation by file overrides in addition, has stopped the generation of file fragmentation, makes the memory property of array or disk can not reduce with the growth of service time.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.
Claims (14)
1, a kind of date storage method is characterized in that, comprising:
In a plurality of first grade file folders of having set up, be first grade file folder of channel allocation of having created;
In a plurality of second grade file folders of under described first grade file folder, having set up, distribute a second grade file folder;
Under described second grade file folder, set up the file of a fixed size, be used for the storage of described passage data.
2, the method for claim 1 is characterized in that, and is described in a plurality of first grade file folders of having set up, before first grade file folder of channel allocation of having created, also comprises:
In the root directory of storage space, set up a plurality of first grade file folders, under each first grade file folder, create a plurality of second grade file folders; The name of described a plurality of first grade file folders is called first grade file and presss from both sides initial title and different; The name of described a plurality of second grade file folders is called second grade file and presss from both sides initial title and different;
In storage space, set up the fixed block file of a free time.
3, method as claimed in claim 1 or 2 is characterized in that, also comprises:
For a first grade file folder of the channel allocation created back, under described second grade file folder, set up the file of a fixed size before, described first grade file folder for the channel allocation created is carried out rename;
Before distributing a second grade file folder back in a plurality of second grade files folders of under described first grade file folder, having set up, under described second grade file folder, setting up the file of a fixed size, the second grade file folder of described distribution is carried out rename.
4, method as claimed in claim 2 is characterized in that, the described file of under described second grade file folder, setting up a fixed size, and the storage that is used for described passage data comprises:
Judge in the fixed block file of described free time and whether have file;
After then setting up the new file and name of a fixed size when not existing, be linked to described second grade file folder down, be used for the storage of described passage data; Then the arbitrary file in the described already present file is carried out when existing being linked at described second grade file folder down after the rename, be used for the storage of described passage data, the file of described already present file is called the initial title of file.
5, as claim 2 or 4 described methods, it is characterized in that, also comprise:
After data in the described passage will all take for the space of described channel allocation, be retrieved as the first grade file folder of described channel allocation;
Obtain described first grade file folder down in each second grade file folder Time Created file the earliest, with the initial title of the deletion of the content in described file back RNTO file, and be linked to the fixed block file of described free time.
6, as claim 2 or 4 described methods, it is characterized in that, also comprise:, increase or be reduced to the space of described channel allocation by revising the passage stored configuration;
Data in the described passage surpass when being the space of described channel allocation in the described passage stored configuration, are retrieved as the first grade file folder of described channel allocation; According to the quantity of documents of difference needs deletions that in data in the described passage and the described passage stored configuration is the space of described channel allocation, according to Time Created by early obtaining the described first grade file folder file in each second grade file folder down to the order in evening, content in the described file that gets access to is deleted the initial title of back RNTO file, and be linked to the fixed block file of described free time.
7, as claim 2 or 4 described methods, it is characterized in that, also comprise:
When needing the data in the deletion passage, be retrieved as the first grade file folder of described channel allocation;
Obtain the file in each second grade file folder under the described first grade file folder, with the initial title of the deletion of the content in described file back RNTO file, and the fixed block file of described free time is added in link to;
The filename RNTO second grade file of described each second grade file folder is pressed from both sides initial title, and the filename RNTO first grade file that described first grade file is pressed from both sides presss from both sides initial title.
8, a kind of data storage device is characterized in that, comprising:
First allocation units are used at a plurality of first grade file folders of having set up, are first grade file folder of channel allocation of having created;
Second allocation units, a plurality of second grade files that are used for having set up under the first grade file folder that described first allocation units distribute press from both sides, and distribute a second grade file folder;
File storage unit is used for setting up the file of a fixed size under the second grade file folder that described second allocation units distribute, be used for the storage of described passage data.
9, device as claimed in claim 8 is characterized in that, also comprises:
Initialization unit is used for setting up a plurality of first grade file folders at the root directory of storage space, creates a plurality of second grade file folders under each first grade file folder; The name of described a plurality of first grade file folders is called first grade file and presss from both sides initial title and different; The name of described a plurality of second grade file folders is called second grade file and presss from both sides initial title and different; In storage space, set up the fixed block file of a free time.
10, install as claimed in claim 8 or 9, it is characterized in that:
Described first allocation units before also being used to a first grade file folder of the channel allocation created back, setting up the file of a fixed size under described second grade file folder, carry out rename with described first grade file folder for the channel allocation created;
Described second allocation units, before also being used for distributing a second grade file folder back, under described second grade file folder, setting up the file of a fixed size, the second grade file folder of described distribution is carried out rename at a plurality of second grade files folders of having set up under the described first grade file folder.
11, device as claimed in claim 9 is characterized in that, described file storage unit comprises:
Judgment sub-unit is used for judging whether the fixed block file of described free time exists file;
The first file storage subelement is used in the judged result of described judgment sub-unit when not existing, set up the new file and name of a fixed size after, be linked to described second grade file folder down, be used for the storage of described passage data;
The second file storage subelement, be used in the judged result of described judgment sub-unit when existing, arbitrary file in the described already present file is carried out being linked at described second grade file folder down after the rename, be used for the storage of described passage data, the file of described already present file is called the initial title of file.
12, as claim 9 or 11 described devices, it is characterized in that, also comprise:
The file delete unit is used for after the data of described passage will all take for the space of described channel allocation, is retrieved as the first grade file folder of described channel allocation; Obtain described first grade file folder down in each second grade file folder Time Created file the earliest, with the initial title of the deletion of the content in described file back RNTO file, and be linked to the fixed block file of described free time.
13, as claim 9 or 11 described devices, it is characterized in that, also comprise:
The space management unit is used for increasing or be reduced to the space of described channel allocation by revising the passage stored configuration; Data in the described passage surpass when being the space of described channel allocation in the described passage stored configuration, are retrieved as the first grade file folder of described channel allocation; According to the quantity of documents of difference needs deletions that in data in the described passage and the described passage stored configuration is the space of described channel allocation, according to Time Created by early obtaining the described first grade file folder file in each second grade file folder down to the order in evening, content in the described file that gets access to is deleted the initial title of back RNTO file, and be linked to the fixed block file of described free time.
14, as claim 9 or 11 described devices, it is characterized in that, also comprise:
The passage delete cells is used for when needs are deleted the data of passage, is retrieved as the first grade file folder of described channel allocation; Obtain the file in each second grade file folder under the described first grade file folder, with the initial title of the deletion of the content in described file back RNTO file, and the fixed block file of described free time is added in link to; The filename RNTO second grade file of described each second grade file folder is pressed from both sides initial title, and the filename RNTO first grade file that described first grade file is pressed from both sides presss from both sides initial title.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101361612A CN101539884B (en) | 2009-04-30 | 2009-04-30 | Method and device for data storage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101361612A CN101539884B (en) | 2009-04-30 | 2009-04-30 | Method and device for data storage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101539884A true CN101539884A (en) | 2009-09-23 |
CN101539884B CN101539884B (en) | 2012-07-11 |
Family
ID=41123083
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101361612A Active CN101539884B (en) | 2009-04-30 | 2009-04-30 | Method and device for data storage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101539884B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102364941A (en) * | 2011-10-26 | 2012-02-29 | 广东威创视讯科技股份有限公司 | Method for storing recorded signals |
CN102375694A (en) * | 2010-08-20 | 2012-03-14 | 杭州华三通信技术有限公司 | Data processing method and device |
CN104268672A (en) * | 2014-09-11 | 2015-01-07 | 郑州华源超硬材料工具有限公司 | Wood floor processing cutting tool electronic drawing management method and classification steps thereof |
CN104980680A (en) * | 2015-06-30 | 2015-10-14 | 银江股份有限公司 | Video data access method |
CN105049769A (en) * | 2015-08-26 | 2015-11-11 | 浙江宇视科技有限公司 | Method and device for an iSCSI block direct storage to support change of video space |
CN107122133A (en) * | 2017-04-24 | 2017-09-01 | 珠海全志科技股份有限公司 | Date storage method and device |
CN111090617A (en) * | 2018-10-23 | 2020-05-01 | 中国移动通信有限公司研究院 | File management method and device in monitoring system and computer readable storage medium |
WO2020228128A1 (en) * | 2019-05-16 | 2020-11-19 | 罗普特科技集团股份有限公司 | Method and device for storing streaming media data and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1996283A (en) * | 2005-12-31 | 2007-07-11 | 英保达股份有限公司 | File sorting-save management method and system therefor |
-
2009
- 2009-04-30 CN CN2009101361612A patent/CN101539884B/en active Active
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102375694A (en) * | 2010-08-20 | 2012-03-14 | 杭州华三通信技术有限公司 | Data processing method and device |
CN102364941A (en) * | 2011-10-26 | 2012-02-29 | 广东威创视讯科技股份有限公司 | Method for storing recorded signals |
CN104268672A (en) * | 2014-09-11 | 2015-01-07 | 郑州华源超硬材料工具有限公司 | Wood floor processing cutting tool electronic drawing management method and classification steps thereof |
CN104980680A (en) * | 2015-06-30 | 2015-10-14 | 银江股份有限公司 | Video data access method |
CN104980680B (en) * | 2015-06-30 | 2017-11-03 | 银江股份有限公司 | A kind of method of video data access |
CN105049769A (en) * | 2015-08-26 | 2015-11-11 | 浙江宇视科技有限公司 | Method and device for an iSCSI block direct storage to support change of video space |
CN105049769B (en) * | 2015-08-26 | 2018-06-05 | 浙江宇视科技有限公司 | A kind of iSCSI blocks directly deposit the method and apparatus for supporting the change of video recording space |
CN107122133A (en) * | 2017-04-24 | 2017-09-01 | 珠海全志科技股份有限公司 | Date storage method and device |
CN111090617A (en) * | 2018-10-23 | 2020-05-01 | 中国移动通信有限公司研究院 | File management method and device in monitoring system and computer readable storage medium |
WO2020228128A1 (en) * | 2019-05-16 | 2020-11-19 | 罗普特科技集团股份有限公司 | Method and device for storing streaming media data and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN101539884B (en) | 2012-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101539884B (en) | Method and device for data storage | |
CN101908073B (en) | Method for deleting duplicated data in file system in real time | |
CN101957836B (en) | Configurable real-time transparent compressing method in file system | |
CN1740990B (en) | Information processing apparatus and associated method of prioritizing content for playback | |
CN102332029B (en) | Hadoop-based mass classifiable small file association storage method | |
CN103064639B (en) | Date storage method and device | |
US7236992B2 (en) | Storage system | |
CN104065906B (en) | Video recording method and device of digital video recording equipment | |
CN103229173A (en) | Metadata management method and system | |
EP2169530B1 (en) | Method of managing memory storage space and a computer system | |
CN109766312A (en) | A kind of block chain storage method, system, device and computer readable storage medium | |
CN107315533A (en) | A kind of date storage method and device | |
CN102902709B (en) | The document storage system of a kind of fixed space distribution and implementation method | |
CN101739310A (en) | Method and device for cycling backup | |
CN101382948A (en) | File memory method, apparatus and system | |
CN102930060A (en) | Method and device for performing fast indexing of database | |
US11853566B2 (en) | Management method and system for address space of low delay file system and medium | |
KR101744892B1 (en) | System and method for data searching using time series tier indexing | |
CN102591986A (en) | System and method for realizing video and audio editing based on BS (browser/server) mode | |
CN104077406A (en) | Mass file parallel burning method and device | |
CN101324898A (en) | Rapid search and recovery method based on file attribute | |
CN100543748C (en) | A kind of method and system of utilizing file allocation table to carry out the file tracking | |
CN102609508B (en) | High-speed access method of files in network storage | |
KR100907477B1 (en) | Apparatus and method for managing index of data stored in flash memory | |
US6757804B2 (en) | Method and system for reducing fragmentation |
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 | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |
|
CP03 | Change of name, title or address |