Video storage method, encoding device and memory device
Technical field
The invention belongs to the digital video monitoring technical field, relate in particular to a kind of video storage method, encoding device and memory device.
Background technology
Along with the development of video/audio encoding and decoding technology and Network storage technology,, and, formed the digital video monitoring technology in Internet transmission over networks, storage with the view data digitlization of camera head.
Referring to Fig. 1, be the digital video monitor system schematic diagram of prior art.This video monitoring system mainly comprises: camera head 101, encoding device 102, decoding device 103, memory device 104, and IP network 105; Encoding device 102, decoding device 103, memory device 104 are by IP network 105 interconnection.For simplicity, be example only among the figure with an encoding device and a decoding device, in the actual supervisory control system, often there are a plurality of encoding devices and decoding device.
The analog audio-video conversion of signals that encoding device 102 is gathered camera head 101 is a digital signal, and uses the real-time audio and video compression algorithm to handle, and the data after handling are sent to IP network 105, is used for real time inspection or storage; Memory device 104 receives the also video data of memory encoding equipment 102 transmissions by IP network 105; Decoding device 103 can obtain the video data that encoding device 102 sends in real time by IP network 105, realize on-line monitoring, also can read operations such as memory device 104 video data stored are browsed, F.F., slow-motion, realize video playback by IP network 105.
In video monitoring system, the storage of video data is the problem of a key.Existing video storage scheme is: storage initiator (initiator) is set in encoding device 102, storage target side (target) is set in memory device 104, encoding device 102 is set up Internet Small Computer Systems Interface by described storage initiator with the storage target side with memory device 104, and (Internet Small Computer SystemInterface iSCSI) connects.Encoding device 102 is given in memory device 104 memory allocated spaces, and encoding device 102 sends to memory device 102 by described iSCSI connection with video data, by memory device 102 video data is write in this memory space.
In the existing video storage scheme, each encoding device all needs to set up iSCSI with memory device and is connected, if encoding device is a lot, so just needs a lot of iSCSI to connect.But for memory device, the iSCSI number of connection is limited, will occur memory capacity like this and still allow to store, but the iSCSI linking number arrives the upper limit, thereby cause the situation that can't continue to store.The way that solves is to increase new memory device at present, but this has caused the waste of storage resources to a certain extent.
Summary of the invention
The purpose of this invention is to provide a kind of video storage method, encoding device and memory device, can't store more video data to solve in the existing video storage scheme because of the restriction of iSCSI linking number, and the technical problem of the storage resources that causes thus waste.
For solving the problems of the technologies described above, the embodiment of the invention provides technical scheme as follows:
A kind of video storage method comprises:
The shared client of network file is being set from encoding device;
Described network file is shared client will send to chief editor's decoding apparatus according to the shared agreement of network file from the video data of encoding device.
Above-mentioned method, wherein, it is NFS (NFS) or general internet file system (CIFS) that described network file is shared agreement.
A kind of video storage method comprises:
On chief editor's decoding apparatus, network file share service device is set;
Described network file share service device receives from encoding device shares the video data that agreement sends according to network file;
Chief editor's decoding apparatus sends to memory device with self encode video data that produces and the video data that receives by Internet Small Computer Systems Interface (iSCSI) connection.
Above-mentioned method, wherein, chief editor's decoding apparatus also adds mark and distinguishes self coding video data that produces and the video data that receives in video data to be sent.
A kind of video storage method comprises:
Memory device is chief editor's decoding apparatus memory allocated space;
Memory device receives chief editor's decoding apparatus and connects the video data that sends by iSCSI, and described video data is write in the described memory space, and described video data comprises the video data of editing decoding apparatus and from the video data of encoding device.
Above-mentioned method, wherein, memory device also is divided into a plurality of zones with described memory space, is respectively applied for the video data of storage different coding equipment, and the mark that comprises according to the video data that receives writes respective regions in the memory space with this video data.
A kind of encoding device comprises that network file shares client modules;
Described network file is shared client modules, is used for sharing agreement according to network file and sends video data to chief editor's decoding apparatus.
Above-mentioned encoding device, wherein, it is NFS or CIFS that described network file is shared agreement.
A kind of encoding device comprises network file share service device module and storage initiator module;
Described network file share service device module is used to receive from encoding device and shares the video data that agreement sends according to network file;
Described storage initiator module is used for the video data that this encoding device self coding is produced and the video data that receives sends to memory device by the iSCSI connection.
Above-mentioned encoding device, wherein, described storage initiator module is further used for adding mark and distinguishes this encoding device self coding video data that produces and the video data that receives in video data to be sent.
A kind of memory device comprises storage target module and memory space;
Described storage target module, be used to receive chief editor's decoding apparatus and connect the video data that sends by iSCSI, and described video data write in the described memory space, described video data comprises the video data of editing decoding apparatus and from the video data of encoding device.
Above-mentioned memory device, wherein, described memory space is divided into a plurality of zones, is respectively applied for the video data of storage different coding equipment; Described storage target module is further used for the mark that comprises according to the video data that receives this video data is write respective regions in the memory space.
The embodiment of the invention is by binding the encoding device group with a plurality of encoding devices, only having an encoding device to set up iSCSI with memory device in the described encoding device group is connected, realized the shared iSCSI connection carrying out of a plurality of encoding devices storage of video data, so, reduce the quantity that the iSCSI on the memory device connects, improved the utilance of storage resources on the memory device.
Description of drawings
Fig. 1 is the digital video monitor system schematic diagram of prior art;
Fig. 2 is the digital video monitor system schematic diagram of the embodiment of the invention;
Fig. 3 is the video storage method flow chart of the embodiment of the invention.
Embodiment
The embodiment of the invention provides a kind of a plurality of encoding device video storage scheme that a shared iSCSI connects.Be specially: a plurality of encoding devices are bound the encoding device group, only set up iSCSI between the some encoding devices in group (be called and edit decoding apparatus) and the memory device and be connected; Network file share service device is installed on the chief editor's decoding apparatus in group, at other encoding devices (being called) network file is installed and is shared client from encoding device; Earlier video data is shared agreement according to network file from encoding device and send to chief editor's decoding apparatus, by chief editor's decoding apparatus video data is sent to memory device by the iSCSI connection again; Memory device writes the video data that receives in the memory space that distributes into chief editor's decoding apparatus.
For making the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the accompanying drawings and the specific embodiments.
Referring to Fig. 2, be the digital video monitor system schematic diagram of the embodiment of the invention.This video monitoring system mainly comprises: camera head 201,202, chief editor's decoding apparatus 203, from encoding device 204, decoding device 205, memory device 206, and IP network 207; Edit decoding apparatus 203, interconnect by IP network 207 from encoding device 204, decoding device 205, memory device 206.Here be to be one group with two encoding devices to introduce video storage scheme of the present invention, in the actual supervisory control system, often have a plurality of encoding devices and decoding device, it realizes that principle is similar.
Wherein, comprise coding module 2031, network file share service device module 2032 and storage initiator module 2033 in chief editor's decoding apparatus 203; Comprise that from encoding device 204 coding module 2041 and network file share client modules 2042; Comprise storage target module 2061 and memory space 2062 in the memory device 206.
Receive the analog audio-video signal that camera head 202 is gathered from encoding device 204, undertaken obtaining video data after the encoding process by coding module 2041, network file is shared client modules 2042 this video data is sent to chief editor's decoding apparatus 203 according to the shared agreement of network file.Wherein, described network file share agreement can for NFS (Network File System, NFS) or general internet file system (Common Internet File System, CIFS).
Chief editor's decoding apparatus 203 is set up iSCSI by storage initiator module 2033 with storage target module 2061 with memory device 206 and is connected.Chief editor's decoding apparatus 203 receives the analog audio-video signal that camera head 201 is gathered, undertaken obtaining video data after the encoding process by coding module 2031, network file share service device module 2032 receives from encoding device 204 shares the video data that agreement sends according to network file, and storage initiator module 2033 will edit the video data that decoding apparatus 203 self coding produces and the video data that receives sends to memory device 206 by described iSCSI connection.
Storage target module 2061 in the memory device 206 receives chief editor's decoding apparatus and connects the video data that sends by described iSCSI, and described video data is write in the memory space 2062.
Decoding device 205 can obtain chief editor's decoding apparatus 203 in real time by IP network 207 and reach the video data that produces from encoding device 204 codings, realize on-line monitoring, also can read operations such as memory device 206 video data stored are browsed, F.F., slow-motion, realize video playback by IP network 207.
In the present embodiment, memory space 2062 is resources that memory device 206 distributes for chief editor's decoding apparatus 203, its size be chief editor's decoding apparatus 203 with from encoding device 204 resource requirements size sum.How memory space 2062, to deposit as for chief editor's decoding apparatus 203 with from the video data of encoding device 204, memory space 2062 can be divided into two, a video data that is used for depositing chief editor's decoding apparatus 203, a video data that is used for depositing from encoding device 204 does not disturb mutually to get final product.For example, can add mark in video data to be sent by storage initiator module 2033 and distinguish video data that chief editor's decoding apparatus 203 self coding produces and the video data (i.e. the video datas that produce from encoding device coding 204) that receives, the mark that storage target module 2061 comprises according to video data writes respective regions in the memory space 2062 with this video data.
Corresponding with above-mentioned video monitoring system, the present invention also provides a kind of video storage method.Fig. 3 is the video storage method flow chart of the embodiment of the invention, mainly comprises the steps:
Step 301: a plurality of encoding devices are bound the encoding device group;
On chief editor's decoding apparatus, network file share service device is set, the shared client of network file is being set from encoding device, the memory space that chief editor's decoding apparatus distributes memory device is shared and is given from encoding device, makes can video data be write the described memory space by chief editor's decoding apparatus from encoding device.According to the disposal ability of chief editor's decoding apparatus, can bind 1 to a plurality of from encoding device.
Step 302: chief editor's decoding apparatus is set up iSCSI with memory device and is connected;
Storage initiator (initiator) is set in chief editor's decoding apparatus, storage target side (target) is set in memory device, chief editor's decoding apparatus is set up iSCSI by described storage initiator with the storage target side with memory device and is connected.
Step 303: share agreement from encoding device according to network file and send video data to chief editor's decoding apparatus;
Wherein, the shared agreement of described network file can be NFS or CIFS.
Step 304: chief editor's decoding apparatus sends to memory device with self encode video data that produces and the video data that receives by described iSCSI connection;
Step 305: memory device writes the video data that receives in the memory space that distributes into chief editor's decoding apparatus.
The size of described memory space be chief editor's decoding apparatus with from encoding device resource requirement size sum, how memory space, to deposit as for chief editor's decoding apparatus with from the video data of encoding device, memory space can be divided into two, a video data that is used for depositing chief editor's decoding apparatus, a video data that is used for depositing from encoding device does not disturb mutually to get final product.For example, can add mark in video data to be sent by chief editor's decoding apparatus and distinguish video data that chief editor's decoding apparatus self coding produces and the video data that receives, the mark that memory device comprises according to video data writes respective regions in the memory space with this video data.The division of memory space described herein is at including only chief editor's decoding apparatus and the situation from encoding device in the encoding device group, for comprising chief editor's decoding apparatus and a plurality of situation in the encoding device group from encoding device, then memory space is divided into polylith, a video data that is used for depositing chief editor's decoding apparatus, other pieces are used for depositing described a plurality of video data from encoding device respectively.
Should be noted that at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not breaking away from the spiritual scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.