Method, system and device for storing and extracting video by collection box

文档序号:1559127 发布日期:2020-01-21 浏览:19次 中文

阅读说明:本技术 一种采集盒存储和提取视频的方法、系统及装置 (Method, system and device for storing and extracting video by collection box ) 是由 陈斌 于 2019-09-04 设计创作,主要内容包括:本发明公开了一种采集盒存储和提取视频方法、系统及装置,该方法包括:接收当前直播的信号并获取直播的视频接口,根据视频接口得到对应的视频;基于哈夫曼算法和FFmepg对视频进行处理,得到处理后的视频和视频信息;根据预设的权限将处理后的视频和视频信息提取到所需的设备;该系统包括:视频接收模块、视频处理模块和提取模块。该装置包括存储器以及用于执行上述采集盒存储和提取视频方法的处理器。通过使用本发明,可提高采集盒的保密性。本发明作为一种采集盒存储和提取视频的方法、系统及装置,可广泛应用于视频存储领域。(The invention discloses a method, a system and a device for storing and extracting videos by a collection box, wherein the method comprises the following steps: receiving a current live broadcast signal, acquiring a live broadcast video interface, and acquiring a corresponding video according to the video interface; processing the video based on a Huffman algorithm and FFmepg to obtain the processed video and video information; extracting the processed video and video information to required equipment according to a preset authority; the system comprises: the device comprises a video receiving module, a video processing module and an extraction module. The device comprises a memory and a processor for executing the video storing and extracting method of the collecting box. By using the invention, the security of the collecting box can be improved. The method, the system and the device for storing and extracting the video by the acquisition box can be widely applied to the field of video storage.)

1. A method for capture box storage and extraction of video, characterized by: the method comprises the following steps:

receiving a current live broadcast signal, acquiring a live broadcast video interface, and acquiring a corresponding video according to the video interface;

processing the video based on a Huffman algorithm and FFmepg to obtain the processed video and video information;

and extracting the processed video and the video information to required equipment according to the preset authority.

2. A method of capture box storage and retrieval of video, according to claim 1, wherein: the step of processing the video based on the Huffman algorithm and the FFmepg to obtain the processed video and the video information specifically comprises the following steps:

compressing the video based on a Huffman algorithm to obtain a compressed video;

analyzing the video based on FFmepg to obtain basic information of the video;

and storing the compressed video and the basic information of the video to a collection box.

3. A method of capture box storage and retrieval of video, according to claim 2, wherein: the step of compressing the video based on the huffman algorithm to obtain the compressed video further specifically comprises:

counting the character type and frequency of the video to obtain compressed data of the video;

initializing a Huffman table, and generating a Huffman tree according to compressed data of a video and the Huffman table;

and generating a Huffman code, and writing the Huffman code into the compressed video in a binary form.

4. A method of capture box storage and retrieval of video, according to claim 2, wherein: the step of extracting the processed video and video information to the required device according to the preset authority specifically comprises:

connecting the acquisition box with an account number, and setting the authority for acquiring information on the account number;

and displaying compressed video and video information which can be obtained by the account according to the authority of the account, and responding to an operation instruction to extract the compressed video and video information to equipment.

5. A capture box method of storing and retrieving video according to claim 4, wherein: the step of connecting the collection box with the account comprises the step of connecting the collection box with the account through a secret password and the step of connecting the collection box with the account through scanning a two-dimensional code.

6. A method of capture box storage and retrieval of video, according to claim 1, wherein: the basic information comprises key frames, video formats, video cover pictures and video duration.

7. A capture box method of storing and retrieving video according to claim 4, wherein: after the steps of displaying the compressed video and video information obtained by the account according to the authority of the account and responding to the operation instruction to extract the compressed video and video information to the device, the method further comprises the following steps:

and restoring the compressed video based on a Huffman algorithm to obtain the high-definition original video.

8. A system for video storage and retrieval in a capture box, comprising: the method comprises the following steps:

the video receiving module is used for receiving the current live broadcast signal, acquiring a live broadcast video interface and acquiring a corresponding video according to the video interface;

the video processing module is used for processing the video based on the Huffman algorithm and the FFmemg to obtain the processed video and video information;

and the extraction module is used for extracting the processed video and the video information to required equipment according to the preset authority.

9. A capture box video storage and retrieval system as claimed in claim 8, wherein: the video processing module specifically further comprises:

the compression submodule is used for compressing the video based on a Huffman algorithm to obtain a compressed video;

the analysis submodule is used for analyzing the video based on the FFmepg to obtain the basic information of the video;

and the storage submodule is used for storing the compressed video and the basic information of the video to the acquisition box.

10. The utility model provides a gather box storage and draw video device which characterized in that: further comprising:

at least one processor;

at least one memory for storing at least one program;

when executed by the at least one processor, cause the at least one processor to implement a method of capture box storage and retrieval of video as claimed in any one of claims 1 to 7.

Technical Field

The invention relates to the field of video storage, in particular to a method, a system and a device for storing and extracting videos by a collection box.

Background

The video acquisition box is used for storing videos into equipment, or automatically recording live videos and storing the live videos, and helps users to store important videos so as to be checked later, but most of the video acquisition boxes on the market open all permissions to all users using the acquisition boxes at present, and any user can extract information in the acquisition boxes, so that the confidentiality is insufficient, and the important information of the user is easy to reveal.

Disclosure of Invention

In order to solve the above technical problems, an object of the present invention is to provide a method, a system and a device for storing and extracting a video in a capture box, which can improve the security of the capture box.

The first technical scheme adopted by the invention is as follows: a method of capture box storage and retrieval of video, comprising the steps of:

receiving a current live broadcast signal, acquiring a live broadcast video interface, and acquiring a corresponding video according to the video interface;

processing the video based on a Huffman algorithm and FFmepg to obtain the processed video and video information;

and extracting the processed video and the video information to required equipment according to the preset authority.

Further, the step of processing the video based on the huffman algorithm and the FFmepg to obtain the processed video and the video information specifically further includes:

compressing the video based on a Huffman algorithm to obtain a compressed video;

analyzing the video based on FFmepg to obtain basic information of the video;

and storing the compressed video and the basic information of the video to a collection box.

Further, the step of compressing the video based on the huffman algorithm to obtain the compressed video specifically further includes:

counting the character type and frequency of the video to obtain compressed data of the video;

initializing a Huffman table, and generating a Huffman tree according to compressed data of a video and the Huffman table;

and generating a Huffman code, and writing the Huffman code into the compressed video in a binary form.

Further, the step of extracting the processed video and video information to the required device according to the preset authority further includes:

connecting the acquisition box with an account number, and setting the authority for acquiring information on the account number;

and displaying the video and video information which can be obtained by the account according to the authority of the account, and responding to the operation instruction to extract the video and video information to the equipment.

Further, the step of connecting the collection box with the account number comprises the step of connecting the collection box with the same account number through a password or connecting the collection box with the account number through scanning a two-dimensional code.

Further, the basic information comprises key frames, video formats, video cover pictures and video duration.

Further, the step of extracting the compressed video and video information to the device according to the set authority further comprises:

and restoring the compressed video based on a Huffman algorithm to obtain the high-definition original video.

The second technical scheme adopted by the invention is as follows: a system for capture box storage and retrieval of video:

the data module is used for receiving the current live broadcast signal, acquiring a live broadcast video interface and acquiring a corresponding video according to the video interface;

the video processing module is used for processing the video based on the Huffman algorithm and the FFmemg to obtain the processed video and video information;

and the extraction module is used for extracting the processed video and the video information to required equipment according to the preset authority.

Preferably, the video processing module further comprises:

the compression submodule is used for compressing the video based on a Huffman algorithm to obtain a compressed video;

the analysis submodule is used for analyzing the video based on the FFmepg to obtain the basic information of the video;

and the storage submodule is used for storing the compressed video and the basic information of the video to the acquisition box.

The third technical scheme adopted by the invention is as follows: an apparatus for a capture box to store and retrieve video:

at least one processor;

at least one memory for storing at least one program;

when executed by the at least one processor, cause the at least one processor to implement the method for the capture box to store and retrieve video.

The method, the system and the device have the advantages that: the invention processes the video based on the Huffman algorithm and the FFmepg, saves the storage space of the acquisition box, facilitates users to know the video information in the acquisition box, and improves the video confidentiality of the acquisition box through the authority distribution.

Drawings

FIG. 1 is a flow chart of the steps of a method of the present invention for a capture box to store and retrieve video;

FIG. 2 is a block diagram of a video capture box storage and retrieval system according to the present invention;

Detailed Description

The invention is described in further detail below with reference to the figures and the specific embodiments. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

As shown in fig. 1, the present invention provides a method for storing and retrieving videos by a capture box, comprising the steps of:

s101, receiving a current live broadcast signal, acquiring a live broadcast video interface, and acquiring a corresponding video according to the video interface;

specifically, for a plurality of live videos, a corresponding video interface is obtained according to different live stream signals, a corresponding video is obtained from the video interface, a video at a certain time point can be set to be obtained, recording is started from the time point, a live video is recorded, and the video is prestored.

S102, processing the video based on a Huffman algorithm and FFmepg to obtain the processed video and video information;

specifically, the huffman algorithm is an algorithm for encoding through a huffman tree, and can be used for compressing files, and the FFmepg can be used for recording and converting digital audio and video.

And S103, extracting the processed video and the video information to required equipment according to the preset authority.

Specifically, different permissions are allocated to each account, when the account is connected with a collection box, a video acquisition request is sent out, the permission corresponding to the account is judged, a video acquired by the account and video information corresponding to the video are displayed according to the permission, and a user judges whether to extract the video.

As a preferred embodiment of the method, the step of processing the video based on the huffman algorithm and FFmepg to obtain the processed video and video information further includes:

compressing the video based on a Huffman algorithm to obtain a compressed video;

analyzing the video based on FFmepg to obtain basic information of the video;

and storing the compressed video and the basic information of the video to a collection box.

Specifically, when the Huffman algorithm is used for video compression, lossless compression of videos can be achieved, after the FFempg analyzes the videos, basic information of the videos can be obtained according to the set attributes, the basic information can include information such as video duration and video formats, after the compressed videos and the basic information of the videos are stored in the acquisition box, the original uncompressed videos are deleted, the storage space occupied by the videos can be saved, and the acquisition box can store more videos.

Further, as a preferred embodiment of the method, the step of compressing the video based on the huffman algorithm to obtain the compressed video further includes:

counting the character type and frequency of the video to obtain compressed data of the video;

initializing a Huffman table, and generating a Huffman tree according to compressed data of a video and the Huffman table;

and generating a Huffman code, and writing the Huffman code into the video in a binary form to obtain the compressed video.

Specifically, the types and frequencies of all characters in a video are counted, each symbol is replaced by binary description in advance, the length is determined by the frequency of occurrence of a special symbol, a Huffman tree is generated, the frequency sizes of the characters are compared, a node with high frequency is placed at a position close to a root, a node with low frequency is placed at a position far away from the root, codes are stored to corresponding characters in the Huffman tree based on a recursion idea, and finally the codes are written into a target file in a binary mode.

Further, as a preferred embodiment of the method, the step of extracting the processed video and video information to the required device according to the preset authority specifically includes:

connecting the acquisition box with an account number, and setting the authority for acquiring information on the account number;

and extracting the compressed video and video information to the equipment according to the authority of the account.

Further as a preferred embodiment of the method, the connecting the collection box with the account includes connecting the collection box with the same account through a password and connecting the collection box with the account through scanning a two-dimensional code.

Further as a preferred embodiment of the method, the basic information includes a key frame, a video format, a video cover picture and a video duration.

As a further preferred embodiment of the method, after the step of extracting the compressed video and video information to the device according to the set authority, the method further includes:

and restoring the compressed video based on a Huffman algorithm to obtain the high-definition original video.

Specifically, video is decompressed based on a huffman algorithm, a huffman tree is constructed according to the statistical character types and spelling of the compressed video, and finally binary information of huffman codes is read from the compressed video, and video files are restored according to the huffman codes.

As shown in fig. 2, a system for a capture box to store and retrieve video, comprising:

the data module is used for receiving the current live broadcast signal, acquiring a live broadcast video interface and acquiring a corresponding video according to the video interface;

the video processing module is used for processing the video based on the Huffman algorithm and the FFmemg to obtain the processed video and video information;

and the extraction module is used for extracting the processed video and the video information to required equipment according to the preset authority.

Preferably, the video processing module further comprises:

the compression submodule is used for compressing the video based on a Huffman algorithm to obtain a compressed video;

the analysis submodule is used for analyzing the video based on the FFmepg to obtain the basic information of the video;

and the storage submodule is used for storing the compressed video and the basic information of the video to the acquisition box.

An apparatus for a capture box to store and retrieve video:

at least one processor;

at least one memory for storing at least one program;

when executed by the at least one processor, cause the at least one processor to implement the method for the capture box to store and retrieve video.

The specific embodiment of the invention is as follows:

the method comprises the steps of obtaining a corresponding live video interface according to a live signal, setting a certain time point to start recording live video to obtain live video, compressing and storing the video based on a Huffman algorithm to save storage space of a collection box, analyzing the video to obtain basic information of the video, allocating authority to each account in advance, scanning a two-dimensional code on the collection box by a user to obtain the authority, obtaining the basic information of the video and the video in the collection box according to the allocated authority, and extracting the information to required equipment by the user to check.

The contents in the above method embodiments are all applicable to the present apparatus embodiment, the functions specifically implemented by the present apparatus embodiment are the same as those in the above method embodiments, and the advantageous effects achieved by the present apparatus embodiment are also the same as those achieved by the above method embodiments.

From the above, the present invention has the advantages of:

1. the video is compressed based on the Huffman algorithm and then stored, so that the space occupied by video storage is greatly saved, and the acquisition box can store more videos.

2. The video is analyzed in the acquisition box based on the FFmepg to obtain the basic information of the video, and a user can firstly judge that the video is not required to be extracted according to the basic information of the video, so that the time of the user can be saved.

3. The security of the acquisition box can be improved by distributing the authority to different account numbers.

While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于受控访问数字媒体内容的系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类