CN104793903A - Video data writing method, device and system based on IO sequencing - Google Patents
Video data writing method, device and system based on IO sequencing Download PDFInfo
- Publication number
- CN104793903A CN104793903A CN201510188007.5A CN201510188007A CN104793903A CN 104793903 A CN104793903 A CN 104793903A CN 201510188007 A CN201510188007 A CN 201510188007A CN 104793903 A CN104793903 A CN 104793903A
- Authority
- CN
- China
- Prior art keywords
- data
- disk
- magnetic track
- write
- buffering district
- 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.)
- Pending
Links
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention provides a video data writing method, device and system based on IO sequencing. The method comprises the steps that a data register is arranged between a main system memory and disks, IO data which are from the main system memory and correspond to the disks are received, the IO data are stored in the data register, IO sequencing is performed on the IO data according to the order of tracks, and the IO data are sequentially written in all the tracks of the disks according to an IO sequencing result. The device comprises a receiving unit, a storing unit, a sequencing unit and a writing unit. The system comprises one or more disks, the main system memory, the data register and the video data writing device based on IO sequencing. The video data writing method, device and system based on IO sequencing can shorten the track seeking time of the disk.
Description
Technical field
The present invention relates to technical field of data processing, particularly a kind of video data write method, Apparatus and system based on IO sequence.
Background technology
Video monitoring is the important component part of security system, and its increasing extent used is wide, little of a room, greatly to a city, almost can see various video monitoring equipment everywhere.Along with screen monitoring use amount continuous increase, create a large amount of video datas thereupon, need timely must by these data write disk.
At present, the method for video data write disk comprises: write direct the I/O data in main system memory disk, and when writing, the time sequencing received according to each I/O data, writes magnetic track corresponding in disk successively by each I/O data.
Visible, be, according to the time sequencing receiving I/O data, each I/O data is write magnetic track successively in the prior art, so then result in the increase of disk seek time.Such as, receive I/O data 1 successively, I/O data 2 and I/O data 3, it will write the 25th magnetic track of corresponding disk, 50th magnetic track, 30th magnetic track, then can according to the time sequencing receiving I/O data in prior art, first I/O data 1 is write the 25th magnetic track, then I/O data 2 is write the 50th magnetic track, finally I/O data 3 is write the 30th magnetic track, in this ablation process, magnetic head motion is not moved to the 50th track order to the 30th magnetic track according to the 25th magnetic track, but irregularly move relative to track order, such magnetic head then can reciprocal addressing on magnetic track, cause the increase of disk seek time.
Summary of the invention
The invention provides a kind of video data write method, Apparatus and system based on IO sequence, disk seek time can be reduced.
The invention provides a kind of video data write method based on IO sequence, setting data buffer between main system memory and disk, comprising:
Receive from described main system memory and the I/O data of corresponding described disk;
Described I/O data is stored in described data buffer, and I/O data is carried out IO sequence according to the order of magnetic track;
According to described IO ranking results, described I/O data is write successively each magnetic track of described disk.
Preferably, the number of described disk is multiple;
Before the I/O data of corresponding described disk, comprise further from described main system memory in described reception: according to described multiple disk, described data buffer is divided into multiple disk buffering district, the corresponding described disk in each described disk buffering district;
Described described I/O data is stored in described data buffer, and I/O data is carried out IO sequence according to the order of magnetic track comprise: by described I/O data according to its respectively corresponding disk, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
Described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises: the corresponding the magnetic track successively I/O data in each disk buffering district described being write corresponding disk according to IO ranking results in described each disk buffering district.
Preferably, described I/O data comprises multiple band;
Described by the disk of described I/O data according to its difference correspondence, the disk buffering district be stored into respectively corresponding to described disk comprises: by the I/O data of band integral multiple capacity in described I/O data, according to the disk that it is corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively;
The method comprises further: reserved integrated dispatch space in described data buffer, the I/O data exceeding band integral multiple capacity in described I/O data is deposited in described integrated dispatch space, when the I/O data amount deposited in described integrated dispatch space is more than or equal to a band, by the I/O data of band integral multiple according to its disk corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track.
Further, setting time-out time, if the I/O data in described integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in described time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track.
Preferably, described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises:
When described I/O data being write successively each magnetic track of described disk, the I/O data of the new storage of corresponding described disk in described data buffer detected, if the first magnetic track corresponding to the I/O data of described new storage is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then completing after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store.
Preferably, described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises: during conducting disk write, and the track location of write is carried out from high magnetic track to the sequential loop of low magnetic track according to from the paramount magnetic track of low magnetic track again.
The invention provides a kind of video data write device based on IO sequence, comprising:
Receiving element, for receiving from main system memory and the I/O data of corresponding disk;
Storage unit, for being stored into the data buffer between described main system memory and disk by described I/O data;
Sequencing unit, for carrying out IO sequence by the I/O data in described data buffer according to the order of magnetic track;
Writing unit, for according to described IO ranking results, writes each magnetic track of described disk successively by described I/O data.
Preferably, this device comprises zoning unit further, wherein, described zoning unit, for described data buffer being divided into multiple disk buffering district according to multiple disk, the corresponding described disk in each described disk buffering district;
Described storage unit, for by the disk of described I/O data according to its difference correspondence, is stored into the disk buffering district corresponding to described disk respectively;
Described sequencing unit, for carrying out IO sequence by the I/O data in each disk buffering district described according to the order of magnetic track;
Said write unit: for successively described I/O data being write the corresponding magnetic track of corresponding disk according to IO ranking results in described each disk buffering district.
Preferably, described I/O data comprises multiple band;
Described storage unit is used for the I/O data of band integral multiple capacity in described I/O data, according to the disk that it is corresponding respectively, is stored into the disk buffering district corresponding to described disk respectively; And, described zoning unit is used for reserved integrated dispatch space in described data buffer, the I/O data exceeding band integral multiple capacity in described I/O data is temporarily deposited in described integrated dispatch space, when the I/O data amount deposited in described integrated dispatch space is more than or equal to a band, by the I/O data of band integral multiple according to its disk corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
And/or,
This device comprises further: setup unit, for setting time-out time, if the I/O data in described integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in described time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
And/or,
Said write unit is used for when described I/O data being write successively each magnetic track of described disk, the I/O data of the new storage of corresponding described disk in described data buffer detected, if the first magnetic track corresponding to the I/O data of described new storage is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then completing after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store;
And/or,
When said write unit is used for conducting disk write, the track location of write is carried out from the sequential loop of the paramount magnetic track of low magnetic track according to from the paramount magnetic track of low magnetic track again.
Present invention also offers a kind of video data write system based on IO sequence, comprising: more than one disk, main system memory, the video data write device based on IO sequence that data buffer and above-mentioned arbitrary the present invention propose.
The invention provides a kind of video data write method, Apparatus and system based on IO sequence, setting data buffer between main system memory and disk, I/O data is handed down to data buffer by main system memory, in data buffer, these I/O data are sorted according to the magnetic track stored, according to ranking results, by the corresponding magnetic track of the I/O data write disk after sequence, carry out successively according to the sequence of magnetic track owing to I/O data to be write disk, avoid magnetic head random tracking repeatedly on disk, will the seek time of disk be reduced like this.
Accompanying drawing explanation
Fig. 1 is a kind of video data write method flow diagram based on IO sequence that the embodiment of the present invention provides;
Fig. 2 is a kind of video data write method flow diagram based on IO sequence that another embodiment of the present invention provides;
Fig. 3 is a kind of video data write device schematic diagram based on IO sequence that the embodiment of the present invention provides;
Fig. 4 is a kind of video data write system architecture schematic diagram based on IO sequence that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described.Obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of video data write method based on IO sequence, setting data buffer between main system memory and disk, the method can comprise the following steps:
Step 101: receive from main system memory and the I/O data of corresponding disk;
Step 102: I/O data is stored in the data buffer between main system memory and disk, and I/O data is carried out IO sequence according to the order of magnetic track;
Step 103: according to IO ranking results, writes each magnetic track of disk successively by I/O data.
By a kind of video data write method based on IO sequence that the embodiment of the present invention provides, setting data buffer between main system memory and disk, I/O data is handed down to data buffer by main system memory, in data buffer, these I/O data are sorted according to the magnetic track stored, according to ranking results, by the corresponding magnetic track of the I/O data write disk after sequence, carry out successively according to the sequence of magnetic track owing to I/O data to be write disk, avoid magnetic head random tracking repeatedly on disk, will the seek time of disk be reduced like this.
In an embodiment of the present invention, the video data write method based on IO sequence had both gone for the situation only having a disk, also went for the situation that there is multiple disk.Such as, in one embodiment of the invention, if there is multiple disk, so, before above-mentioned steps 101, comprise further: according to described multiple disk, described data buffer is divided into multiple disk buffering district, the corresponding described disk in each described disk buffering district;
Correspondingly, above-mentioned steps 102 comprises: by described I/O data according to its disk corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
Correspondingly, above-mentioned steps 103 comprises: the corresponding the magnetic track successively I/O data in each disk buffering district described being write corresponding disk according to IO ranking results in described each disk buffering district.
In one embodiment of the invention, when I/O data being write disk according to IO ranking results, writing position is according to from the paramount magnetic track of low magnetic track, write from high magnetic track to the order of low magnetic track again, this avoid magnetic head countless according to write situation under move to low track location from high track location or move to high track location from low track location, thus accelerate the writing speed of I/O data, avoid occurring that the phenomenon of frame losing appears in monitor video.
In one embodiment of the invention, I/O data can write according to the form of band, and only have the I/O data of band integral multiple capacity just can be placed into disk buffering district, when the I/O data quantity not sufficient band that main system is sent, this part I/O data will deposit in integrated dispatch reserved in data buffer spatially, when the I/O data amount deposited in integrated dispatch space is more than or equal to a band, the I/O data of band integral multiple is being distinguished corresponding disk according to it, be stored into the disk buffering district corresponding to disk respectively, a half of the I/O data number deficiency number of disks that will write disk on band will be avoided like this, occur reading rewrite method, if there is this mode reading to rewrite, disk write performance will be caused to decline, write efficiency reduces.
In an embodiment of the invention, when reserve integrated dispatch space in data buffer, time-out time can be set further, if the I/O data in described integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in described time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track, thus I/O data is avoided to be trapped in integrated dispatch space.
In an embodiment of this discovery, when writing disk, for the I/O data newly entered in disk buffer, if the first magnetic track corresponding to this I/O data is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then complete after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store, otherwise add write next time, magnetic head single will be increased further from low magnetic track to high magnetic track or from high magnetic track to the data writing of low magnetic track like this, improve the writing speed of I/O data, avoid occurring that the phenomenon of frame losing appears in monitor video.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
As shown in Figure 2, one embodiment of the invention provides a kind of video data write method based on IO sequence, the method for setting data buffer between main system memory and disk in advance, and is applicable to the situation comprising multiple disk, and the method can comprise the following steps:
Step 201: data buffer is divided into multiple disk buffering district according to multiple disk, the corresponding disk in each disk buffering district, and a reserved integrated dispatch space in data buffer.
In the present embodiment, with the support that RAID 5 storage scheme stores for data, data buffer CPU carries out subregion according to multiple disks of rear end to data buffer, data buffer is divided into multiple disk buffering district and an integrated dispatch space, wherein the corresponding disk in each disk buffering district.Such as, have 10 disks, be respectively disk 1, disk 2, disk 3 ... disk 10, be so just that 60GB data buffer is divided into 10 disk buffering districts and an integrated dispatch space by capacity, wherein disk buffering district 1, disk buffering district 2, disk buffering district 3 ... disk buffering district 10 respectively with disk 1, disk 2, disk 3 ... disk 10 is corresponding, the capacity in each disk buffering district is 5GB, and integrated dispatch spatial content is 10GB.
Step 202: receive the I/O data that main system memory issues, and I/O data is classified.
In the present embodiment, main system memory receives the data that camera sends over, main system CPU carries out piecemeal according to disk to I/O data, I/O data after piecemeal is sent to data buffer, first data buffer classifies to I/O data after receiving I/O data, is divided into band capacity integral multiple part I/O data and exceeds band capacity integral multiple part I/O data according to data capacity.Such as, according to 10 disks of rear end, each band is divided into the I/O data block of 10 formed objects, be respectively I/O data 1, I/O data 2, I/O data 3 ... I/O data 10, the I/O data that main system is sent comprises strips A and band B, wherein strips A comprises I/O data A1, I/O data A2, I/O data A3 ... I/O data A10, band B only includes I/O data B1 and I/O data B2, so strips A is band capacity integral multiple part I/O data, and band B is for exceeding band capacity integral multiple part I/O data.
Step 203: band capacity integral multiple part I/O data is put into corresponding disk buffering district, and band capacity integral multiple part I/O data will be exceeded put into integrated dispatch space.
In the business realizing of reality, in step 202, sorted data likely do not exist and exceed band capacity integral multiple part I/O data, namely be just in time band capacity integral multiple part I/O data, in such cases, in this step 203, then do not exist and will exceed band capacity integral multiple part I/O data and put into the process in integrated dispatch space.
In the present embodiment, according to the classification results in step 202, band capacity integral multiple part I/O data is put into corresponding disk buffering district, then perform step 207, then putting into integrated dispatch space for exceeding band capacity integral multiple part I/O data, then performing step 204.Such as, the I/O data that main system is sent comprises a complete strips A and band B, strips A comprises I/O data A1, I/O data A2, I/O data A3 ... I/O data A10, band B only includes I/O data B1 and I/O data B2, so then each I/O data of strips A is put into corresponding disk buffering district 1, disk buffering district 2, disk buffering district 3 ... disk buffering district 10, then perform step 207, the I/O data B1 of band B and I/O data B2 then puts into integrated dispatch space, then performs step 204.
Step 204: judge whether the I/O data putting into integrated dispatch space reaches the capacity of band integral multiple before arriving the time-out time preset, if so, then performs step 205, otherwise, perform step 206.
Step 205: the I/O data in current composite metric space is put into respectively corresponding disk buffering district, then performs step 207.
Step 206: after waiting for the time-out time arriving setting, puts into corresponding disk buffering district respectively by the I/O data in current composite metric space, then perform step 207.
Such as setting time-out time is 10 minutes, the I/O data C1 of band C and I/O data C2 put into integrated dispatch space after 10 minutes, still do not obtain supplementing of new I/O data, so corresponding disk buffering district 1 and disk buffering district 2 are also put into for the I/O data C1 of band C and I/O data C2, then perform step 207.
Step 207: the I/O data in each disk buffering district is sorted according to magnetic track.
In the present embodiment, the I/O data that will write corresponding disk is deposited in same disk buffering district, before write disk, the magnetic track that first will will store according to these I/O data sorts to these I/O data, and sequence can according to magnetic track order from low to high.Such as, in disk buffer 1, deposit the I/O data A1 of strips A, the I/O data B1 of band B, the I/O data C1 of band C, wherein, the I/O data A1 of strips A is stored in the 10th magnetic track of disk 1, and the I/O data B1 of band B is stored in the 100th magnetic track of disk 1, and the I/O data C1 of band C is stored in the 50th magnetic track of disk 1, so according to magnetic track order from low to high, ranking results is then the I/O data B1 of the I/O data C1-band B of the I/O data A1-band C of strips A.
Step 208: according to IO ranking results, writes corresponding disk by I/O data successively.
In the present embodiment, according to IO ranking results, the I/O data in each disk buffering device can be write corresponding disk.Such as, data buffer 1 comprises the I/O data A1 of strips A, the I/O data B1 of band B, the I/O data C1 of band C, be wherein the I/O data B1 of the I/O data C1-band B of the I/O data A1-band C of strips A according to magnetic track order ranking results from low to high, so when writing disk 1, according to IO ranking results, if magnetic head moves to high track location from low track location, then successively by the I/O data A1 of strips A, the I/O data C1 of band C, the I/O data B1 of band B writes disk 1, if magnetic head moves to low track location from high track location, then successively by the I/O data B1 of band B, the I/O data C1 of band C, the I/O data A1 of strips A writes disk 1.
In one embodiment of the invention, during conducting disk write, the track location of write can be carried out from high magnetic track to the sequential loop of low magnetic track according to from the paramount magnetic track of low magnetic track again, such as, magnetic head moves to high magnetic track process from low magnetic track, and I/O data A1, the I/O data C1 of band C of the strips A sorted from low to high by magnetic track in data buffer 1, the I/O data B1 of band B are write disk 1 respectively; After magnetic head arrives high magnetic track, the I/O data D1 of band D is newly entered again in data buffer 1, the I/O data E1 of band E and the I/O data F1 of band F, be the I/O data F1 of the I/O data E1-band F of the I/O data D1-band E of band D according to magnetic track ranking results from low to high, so move to low magnetic track at magnetic head from high magnetic track, successively the I/O data D1 of the I/O data E1-band D of the I/O data F1-band E of band F is write disk 1 respectively.
In one embodiment of the invention, when writing physical disk, for the I/O data newly entered in disk buffer, if the magnetic track that this I/O data will write is in the front of current magnetic head direction of motion, and be greater than default surplus with the distance of magnetic head, then this IO operation adds this write, otherwise add write next time, such as, preset and need the surplus kept with head position to be 10 magnetic tracks, so in the process that disk 1 is write, the I/O data D1 of band D is newly entered in disk buffer 1, its storage track is the 25th magnetic track, if current magnetic head is positioned at the 12nd magnetic track, the I/O data D1 of band D is just added this write by that, if after current magnetic head is positioned at the 15th magnetic track, then the I/O data 1 of band D does not add this write, when magnetic head is back to low magnetic track process by high magnetic track, again the I/O data D1 of band D is write.
It should be noted that, each step shown in above-mentioned Fig. 2 just each step split for convenience of description, in the business realizing of reality, may not have the sequencing in strict execution between each step, such as, step 204 can perform with step 203 to step 206 simultaneously.
As shown in Figure 3, embodiments provide a kind of video data write device based on IO sequence, this device can comprise:
Receiving element 301, for receiving from main system memory and the I/O data of corresponding disk;
Storage unit 302, for being stored into the data buffer between main system memory and disk by I/O data;
Sequencing unit 303, for carrying out IO sequence by the I/O data in data buffer according to the order of magnetic track;
Writing unit 304, for according to IO ranking results, writes each magnetic track of disk successively by I/O data.
In one embodiment of the invention,
This device can also comprise zoning unit 305, for data buffer being divided into multiple disk buffering district according to multiple disk, and the corresponding disk in each disk buffering district;
Described storage unit 302, for by the disk of I/O data according to its difference correspondence, is stored into the disk buffering district corresponding to disk respectively;
Described sequencing unit 303, for carrying out IO sequence by the I/O data in each disk buffering district according to the order of magnetic track;
Said write unit 304: for successively I/O data to be write the corresponding magnetic track of corresponding disk according to IO ranking results in each disk buffering district.
In one embodiment of the invention,
Described storage unit 302, for the I/O data by band integral multiple capacity in I/O data, according to the disk that it is corresponding respectively, is stored into the disk buffering district corresponding to disk respectively; And, described zoning unit 305 is for integrated dispatch space reserved in data buffer, the I/O data exceeding band integral multiple capacity in I/O data is temporarily deposited in integrated dispatch space, when the I/O data amount deposited in integrated dispatch space is more than or equal to a band, by the I/O data of band integral multiple according to its disk corresponding respectively, be stored into the disk buffering district corresponding to disk respectively, and the I/O data in each disk buffering district is carried out IO sequence according to the order of magnetic track;
In one embodiment of the invention,
This device comprises further: setup unit 306, for setting time-out time, if the I/O data in integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to disk respectively, and the I/O data in each disk buffering district is carried out IO sequence according to the order of magnetic track;
In one embodiment of the invention,
Said write unit 304 is for when writing each magnetic track of disk successively by I/O data, the I/O data of the new storage of corresponding disk in data buffer detected, if the first magnetic track that newly I/O data of storage is corresponding is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then completing after to the second magnetic track write I/O data, performing and the I/O data newly stored is write the first magnetic track;
In one embodiment of the invention,
When said write unit 304 writes for conducting disk, the track location of write is carried out from the sequential loop of the paramount magnetic track of low magnetic track according to from the paramount magnetic track of low magnetic track again.
As shown in Figure 4, embodiments provide a kind of video data write system based on IO sequence, this system can comprise more than one disk 401, main system memory 402, data buffer 403, and the video data write device 404 based on IO sequence that above-mentioned arbitrary embodiment of the present invention proposes.
According to such scheme, a kind of video data write method, Apparatus and system based on IO sequence that embodiments of the invention provide, at least have following beneficial effect:
1, in the embodiment of the present invention, setting data buffer between main system memory and disk, I/O data is handed down to data buffer by main system memory, in data buffer, these I/O data are sorted according to the magnetic track stored, according to ranking results, by the corresponding magnetic track of the I/O data write disk after sequence, be carry out successively according to the sequence of magnetic track owing to I/O data to be write disk, avoid magnetic head random tracking repeatedly on disk, will the seek time of disk be reduced like this.
2, in the embodiment of the present invention, when I/O data being write disk according to IO ranking results, writing position is according to from the paramount magnetic track of low magnetic track, write from high magnetic track to the order of low magnetic track again, this avoid magnetic head countless according to write situation under move to low track location from high track location or move to high track location from low track location, thus accelerate the writing speed of I/O data, deposit nowhere after avoiding I/O data to be filled up by Installed System Memory and abandon, thus occurring that the phenomenon of frame losing appears in monitor video.
3, in the embodiment of the present invention, I/O data can write according to the form of band, and only have the I/O data of band integral multiple capacity just can be placed into disk buffering district, when the I/O data quantity not sufficient band that main system is sent, this part I/O data will deposit in integrated dispatch reserved in data buffer spatially, when the I/O data amount deposited in integrated dispatch space is more than or equal to a band, the I/O data of band integral multiple is being distinguished corresponding disk according to it, be stored into the disk buffering district corresponding to disk respectively, a half of the I/O data number deficiency number of disks that will write disk on band will be avoided like this, occur reading rewrite method, if there is this mode reading to rewrite, disk write performance will be caused to decline, thus cause monitor video to occur the phenomenon of frame losing.
4, in the embodiment of the present invention, time-out time can be set, the resting period of integrated dispatch space less than the I/O data of a band capacity is put into for controlling, within time-out time, if reach band capacity integral multiple capacity after the I/O data deposited in integrated dispatch space combines with the I/O data newly entering data buffer, then the I/O data after combination is put into corresponding disk buffering district and carried out IO sequence, if do not have new I/O data to enter data buffer or do not reach band integral multiple capacity after combining with the I/O data newly entering buffer, also this part I/O data put into corresponding disk buffering district and carry out IO sequence, like this, situation about reducing I/O data writes disk in the mode reading to rewrite on the one hand occurs, and cause the decline of disk write performance, I/O data is avoided to deposit in integrated dispatch space for a long time on the other hand, cause I/O data can not write disk in time, go out the phenomenon of active.
5, in this discovery embodiment, when writing disk, for the I/O data newly entered in disk buffer, if the first magnetic track corresponding to this I/O data is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then complete after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store, otherwise add write next time, magnetic head single will be increased further from low magnetic track to high magnetic track or from high magnetic track to the data writing of low magnetic track like this, improve the writing speed of I/O data, avoid occurring that the phenomenon of frame losing appears in monitor video.
The content such as information interaction, implementation between each unit in the said equipment, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in the storage medium of embodied on computer readable, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium in.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.
Claims (10)
1. the video data write method based on IO sequence, it is characterized in that, setting data buffer between main system memory and disk, comprising:
Receive from described main system memory and the I/O data of corresponding described disk;
Described I/O data is stored in described data buffer, and I/O data is carried out IO sequence according to the order of magnetic track;
According to described IO ranking results, described I/O data is write successively each magnetic track of described disk.
2. method according to claim 1, is characterized in that, the number of described disk is multiple;
Before the I/O data of corresponding described disk, comprise further from described main system memory in described reception: according to described multiple disk, described data buffer is divided into multiple disk buffering district, the corresponding described disk in each described disk buffering district;
Described described I/O data is stored in described data buffer, and I/O data is carried out IO sequence according to the order of magnetic track comprise: by described I/O data according to its respectively corresponding disk, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
Described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises: the corresponding the magnetic track successively I/O data in each disk buffering district described being write corresponding disk according to IO ranking results in described each disk buffering district.
3. method according to claim 2, is characterized in that, described I/O data comprises multiple band;
Described by the disk of described I/O data according to its difference correspondence, the disk buffering district be stored into respectively corresponding to described disk comprises: by the I/O data of band integral multiple capacity in described I/O data, according to the disk that it is corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively;
The method comprises further: reserved integrated dispatch space in described data buffer, the I/O data exceeding band integral multiple capacity in described I/O data is deposited in described integrated dispatch space, when the I/O data amount deposited in described integrated dispatch space is more than or equal to a band, by the I/O data of band integral multiple according to its disk corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track.
4. method according to claim 3, is characterized in that, comprises further:
Setting time-out time, if the I/O data in described integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in described time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track.
5., according to described method arbitrary in Claims 1-4, it is characterized in that, described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises:
When described I/O data being write successively each magnetic track of described disk, the I/O data of the new storage of corresponding described disk in described data buffer detected, if the first magnetic track corresponding to the I/O data of described new storage is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then completing after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store.
6. according to described method arbitrary in claim 1 to 5, it is characterized in that, described according to described IO ranking results, each magnetic track described I/O data being write successively described disk comprises: during conducting disk write, and the track location of write is carried out from high magnetic track to the sequential loop of low magnetic track according to from the paramount magnetic track of low magnetic track again.
7., based on a video data write device for IO sequence, it is characterized in that, comprising:
Receiving element, for receiving from main system memory and the I/O data of corresponding disk;
Storage unit, for being stored into the data buffer between described main system memory and disk by described I/O data;
Sequencing unit, for carrying out IO sequence by the I/O data in described data buffer according to the order of magnetic track;
Writing unit, for according to described IO ranking results, writes each magnetic track of described disk successively by described I/O data.
8. device according to claim 7, is characterized in that, comprises zoning unit further, wherein, described zoning unit, for described data buffer being divided into multiple disk buffering district according to multiple disk, the corresponding described disk in each described disk buffering district;
Described storage unit, for by the disk of described I/O data according to its difference correspondence, is stored into the disk buffering district corresponding to described disk respectively;
Described sequencing unit, for carrying out IO sequence by the I/O data in each disk buffering district described according to the order of magnetic track;
Said write unit: for successively described I/O data being write the corresponding magnetic track of corresponding disk according to IO ranking results in described each disk buffering district.
9. device according to claim 8, is characterized in that, described I/O data comprises multiple band;
Described storage unit is used for the I/O data of band integral multiple capacity in described I/O data, according to the disk that it is corresponding respectively, is stored into the disk buffering district corresponding to described disk respectively; And, described zoning unit is used for reserved integrated dispatch space in described data buffer, the I/O data exceeding band integral multiple capacity in described I/O data is temporarily deposited in described integrated dispatch space, when the I/O data amount deposited in described integrated dispatch space is more than or equal to a band, by the I/O data of band integral multiple according to its disk corresponding respectively, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
And/or,
This device comprises further: setup unit, for setting time-out time, if the I/O data in described integrated dispatch space does not obtain supplementary or does not still reach a band after supplementing in described time-out time, then by the disk of this I/O data according to its difference correspondence, be stored into the disk buffering district corresponding to described disk respectively, and the I/O data in each disk buffering district described is carried out IO sequence according to the order of magnetic track;
And/or,
Said write unit is used for when described I/O data being write successively each magnetic track of described disk, the I/O data of the new storage of corresponding described disk in described data buffer detected, if the first magnetic track corresponding to the I/O data of described new storage is in the front of second magnetic track at current magnetic head place, and the distance between the first magnetic track and the second magnetic track is greater than default surplus, then completing after to described second magnetic track write I/O data, perform described first magnetic track of I/O data write that will newly store;
And/or,
When said write unit is used for conducting disk write, the track location of write is carried out from the sequential loop of the paramount magnetic track of low magnetic track according to from the paramount magnetic track of low magnetic track again.
10. based on a video data write system for IO sequence, it is characterized in that, comprising: more than one disk, main system memory, data buffer and as the device as described in arbitrary in claim 7 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510188007.5A CN104793903A (en) | 2015-04-20 | 2015-04-20 | Video data writing method, device and system based on IO sequencing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510188007.5A CN104793903A (en) | 2015-04-20 | 2015-04-20 | Video data writing method, device and system based on IO sequencing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104793903A true CN104793903A (en) | 2015-07-22 |
Family
ID=53558726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510188007.5A Pending CN104793903A (en) | 2015-04-20 | 2015-04-20 | Video data writing method, device and system based on IO sequencing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104793903A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131473A (en) * | 2016-06-23 | 2016-11-16 | 深圳英飞拓科技股份有限公司 | The date storage method of video monitoring system and device |
CN107450861A (en) * | 2017-08-17 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of storage system random storage reading/writing method and device |
CN109800181A (en) * | 2018-12-12 | 2019-05-24 | 深圳市景阳科技股份有限公司 | A kind of method for writing data based on disk, data transfer apparatus and terminal device |
CN110633154A (en) * | 2019-09-06 | 2019-12-31 | 中国科学院近代物理研究所 | Data full-sorting method and system |
CN111352589A (en) * | 2020-02-24 | 2020-06-30 | 苏州浪潮智能科技有限公司 | Distributed storage method, device, equipment and readable medium |
CN111966294A (en) * | 2020-08-18 | 2020-11-20 | 杭州海康存储科技有限公司 | Method, device and equipment for storing data and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727299A (en) * | 2010-02-08 | 2010-06-09 | 北京同有飞骥科技有限公司 | RAID5-orientated optimal design method for writing operation in continuous data storage |
CN201936292U (en) * | 2010-12-17 | 2011-08-17 | 曙光信息产业(北京)有限公司 | Single-carrier multi-objective cache system |
US20120026939A1 (en) * | 2001-05-22 | 2012-02-02 | Qualcomm Incorporated | Enhanced channel interleaving for optimized data throughput |
CN102662459A (en) * | 2012-04-22 | 2012-09-12 | 复旦大学 | Method for reducing energy consumption of server by using mixed storage of solid-state drive and mechanical hard disk |
CN103023805A (en) * | 2012-11-22 | 2013-04-03 | 北京航空航天大学 | MapReduce system |
-
2015
- 2015-04-20 CN CN201510188007.5A patent/CN104793903A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120026939A1 (en) * | 2001-05-22 | 2012-02-02 | Qualcomm Incorporated | Enhanced channel interleaving for optimized data throughput |
CN101727299A (en) * | 2010-02-08 | 2010-06-09 | 北京同有飞骥科技有限公司 | RAID5-orientated optimal design method for writing operation in continuous data storage |
CN201936292U (en) * | 2010-12-17 | 2011-08-17 | 曙光信息产业(北京)有限公司 | Single-carrier multi-objective cache system |
CN102662459A (en) * | 2012-04-22 | 2012-09-12 | 复旦大学 | Method for reducing energy consumption of server by using mixed storage of solid-state drive and mechanical hard disk |
CN103023805A (en) * | 2012-11-22 | 2013-04-03 | 北京航空航天大学 | MapReduce system |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131473A (en) * | 2016-06-23 | 2016-11-16 | 深圳英飞拓科技股份有限公司 | The date storage method of video monitoring system and device |
CN106131473B (en) * | 2016-06-23 | 2019-03-12 | 深圳英飞拓科技股份有限公司 | The date storage method and device of video monitoring system |
CN107450861A (en) * | 2017-08-17 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of storage system random storage reading/writing method and device |
CN109800181A (en) * | 2018-12-12 | 2019-05-24 | 深圳市景阳科技股份有限公司 | A kind of method for writing data based on disk, data transfer apparatus and terminal device |
CN110633154A (en) * | 2019-09-06 | 2019-12-31 | 中国科学院近代物理研究所 | Data full-sorting method and system |
CN111352589A (en) * | 2020-02-24 | 2020-06-30 | 苏州浪潮智能科技有限公司 | Distributed storage method, device, equipment and readable medium |
CN111352589B (en) * | 2020-02-24 | 2021-12-10 | 苏州浪潮智能科技有限公司 | Distributed storage method, device, equipment and readable medium |
CN111966294A (en) * | 2020-08-18 | 2020-11-20 | 杭州海康存储科技有限公司 | Method, device and equipment for storing data and storage medium |
CN111966294B (en) * | 2020-08-18 | 2023-02-17 | 杭州海康存储科技有限公司 | Method, device and equipment for storing data and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104793903A (en) | Video data writing method, device and system based on IO sequencing | |
CN104731717B (en) | Storage arrangement and storage management method | |
US8782324B1 (en) | Techniques for managing placement of extents based on a history of active extents | |
CN102156738B (en) | Method for processing data blocks, and data block storage equipment and system | |
CN101446924B (en) | Method and system for storing and obtaining data | |
CN109598156B (en) | Method for redirecting engine snapshot stream during writing | |
CN103761190B (en) | Data processing method and apparatus | |
CN104461936A (en) | Cached data disk brushing method and device | |
CN100524237C (en) | Computer hard disk data continuous time point storage and recovery method | |
CN102722340A (en) | Data processing method, apparatus and system | |
CN103049393B (en) | Memory headroom management method and device | |
CN106528443B (en) | FLASH management system and method suitable for spaceborne data management | |
CN104408126B (en) | A kind of persistence wiring method of database, device and system | |
CN103019956B (en) | A kind of to data cached method of operating and device | |
CN107402819A (en) | The management method and system of a kind of client-cache | |
CN107870739A (en) | Disk file storage method and system | |
CN101794246B (en) | Backup storage system, backup system, data backup method and recovery method | |
CN107229580A (en) | Sequential stream detection method and apparatus | |
CN104572374A (en) | Storage processing method, storage processing device and storage equipment | |
CN105739911B (en) | Store distribution method, device and the storage system of data | |
CN108334457B (en) | IO processing method and device | |
CN106843765A (en) | A kind of disk management method and device | |
CN103902232A (en) | Data write-in method and device | |
CN110032474A (en) | A kind of snapshot, which occupies, holds method for determination of amount, system and associated component | |
CN104811647B (en) | The double subregion wiring methods of distributed memory system disk towards video stream data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150722 |