WO2017008234A1 - 一种监控数据的处理方法及系统 - Google Patents

一种监控数据的处理方法及系统 Download PDF

Info

Publication number
WO2017008234A1
WO2017008234A1 PCT/CN2015/083936 CN2015083936W WO2017008234A1 WO 2017008234 A1 WO2017008234 A1 WO 2017008234A1 CN 2015083936 W CN2015083936 W CN 2015083936W WO 2017008234 A1 WO2017008234 A1 WO 2017008234A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference frame
sequence
frame
inter
monitoring data
Prior art date
Application number
PCT/CN2015/083936
Other languages
English (en)
French (fr)
Inventor
刘文涛
王斌
Original Assignee
深圳市锐明技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市锐明技术股份有限公司 filed Critical 深圳市锐明技术股份有限公司
Priority to PCT/CN2015/083936 priority Critical patent/WO2017008234A1/zh
Priority to CN201580000199.0A priority patent/CN105517674B/zh
Publication of WO2017008234A1 publication Critical patent/WO2017008234A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/24Systems for the transmission of television signals using pulse code modulation

Definitions

  • the present invention belongs to the field of video surveillance, and in particular, to a method and system for processing monitoring data.
  • the monitoring equipment on the market is limited by the application scenario, and it is impossible to use a storage device such as a hard disk. Only the SD card and the TF card with smaller volume and storage capacity can be used, so the amount of monitoring data saved is limited, and needs to be cleaned frequently. In the past, the saved data can only save the monitoring data in the short space.
  • the method for extending the storage period of the monitoring data is usually to save the low-rate data by reducing the code rate of the data during the recording process, or to reduce the data amount of the video data by means of frame-drawing, and reduce the code.
  • the rate mode will reduce the playback effect of the video.
  • the method of frame-drawing will make the video part partially blurred or obscured and blurred, which will reduce the clarity of the video.
  • An object of the embodiments of the present invention is to provide a method and a system for processing monitoring data, which are intended to solve the problem of saving monitoring data by reducing data rate and frame drawing in the prior art, and reducing the playback effect of the video. , making the video picture partially blurred or obscured and blurred, reducing the problem of the clarity of the video.
  • the embodiment of the present invention is implemented in this manner, a method for processing monitoring data, where the monitoring data is based on
  • H264 encoded video code stream the method comprising:
  • the reference frames in the video code stream are sequentially added to the reference frame queue, and are written into the reference frame storage block, and the non-reference frames corresponding to the reference frames are arranged according to the order of the reference frames in the reference frame queue.
  • the sequence is sequentially added to the non-reference frame queue and written to the non-reference frame storage block;
  • the reference frames in the video code stream are sequentially added to the reference frame queue, and are written into the reference frame storage block, according to the order of the reference frames in the reference frame queue, The non-reference frame sequence corresponding to each reference frame is sequentially added to the non-reference frame queue, and before the non-reference frame storage block is written, the method further includes:
  • An embodiment of the present invention further provides a processing system for monitoring data, where the system includes:
  • an obtaining module configured to acquire a video code stream
  • a frame storage module configured to sequentially add reference frames in the video code stream to a reference frame queue, and write the reference frame storage block, according to the order of the reference frames in the reference frame queue, The non-reference frame sequence corresponding to the reference frame is sequentially added to the non-reference frame queue, and is written into the non-reference frame storage block;
  • a framing release module configured to release a non-reference frame sequence whose retention period exceeds a preset inter-time threshold, and if all non-reference frame sequences whose retention period exceeds a preset inter-time threshold are released, the release period is longer than the pre-pre-frame Set the reference frame for the inter-turn threshold.
  • system further includes:
  • a first frame header setting module configured to add a frame header to each of the reference frames, where the frame header records address information of a sequence of non-reference frames corresponding to the reference frame in the storage block.
  • a second frame header setting module configured to add a timestamp of its corresponding reference frame to the first non-reference frame in each of the non-reference frame sequences, to determine the Whether the retention period of the reference frame and its corresponding non-reference frame sequence exceeds a preset inter-time threshold.
  • the embodiment of the present invention has the beneficial effects that: by storing the reference frame and the non-reference frame in the H264-based encoded video code stream, the storage space is saved, so that the storage device is Ability to save monitoring data recorded over a longer period of time, thereby extending the shelf life of monitoring data;
  • the storage space of the storage device is insufficient, and the non-reference frame data block exceeding the retention period is preferentially released, so that the user can still view the monitoring video through the reserved reference frame exceeding the retention period; when all the non-references exceeding the full frame storage period are exceeded
  • the reference frame exceeding the save period is released, so that the surveillance video can be retained as much as possible in the longer time; by adding the corresponding non-reference frame to the reference frame.
  • the address information is added to the first reference frame of the non-reference frame sequence to add the inter-frame stamp of the corresponding reference frame, thereby establishing an association between the reference frame and the non-reference frame, so that the user is acquiring the monitoring data
  • the reference frame and the non-reference frame can be sequentially outputted in sequence, and the frame can also determine whether the corresponding non-reference frame has been released through the frame association; the method and system provided by the present invention are also easy to implement and suitable for wide-spreading. .
  • FIG. 1 is a flowchart of a method for processing monitoring data according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a storage structure in which a reference frame and a non-reference frame are stored in a storage device according to an embodiment of the present invention
  • FIG. 3 is a basic structural block diagram of a processing system for monitoring data provided by an embodiment of the present invention.
  • FIG. 4 is a flow chart of a method of releasing a reference frame and a corresponding non-reference frame sequence provided by a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for processing monitoring data according to an embodiment of the present invention; for convenience of explanation, only parts related to the present embodiment are shown.
  • the monitoring data is a video code stream based on H264 encoding, where the video code stream includes multiple reference frames, and multiple reference frames.
  • Each of the reference frames is arranged with a sequence of non-reference frames composed of a plurality of non-reference frames, and the method specifically includes S101 to S103 in the following operations.
  • S101 Acquire a video code stream.
  • the operation S101 is specifically: acquiring a video code stream once every predetermined interval.
  • S102 sequentially adding the reference frames in the video code stream to the reference frame queue, and writing the reference frame storage block, according to the order of the reference frames in the reference frame queue, the non-corresponding to each reference frame
  • the reference frame sequence is sequentially added to the non-reference frame queue and written to the non-reference frame storage block.
  • the reference frame in the video code stream specifically refers to an I frame
  • the non-reference frame specifically refers to a P frame.
  • S103 releasing a non-reference frame sequence whose save period exceeds a preset time threshold, and if all the non-reference frame sequences whose save period exceeds the preset time threshold are released, releasing the save period exceeds the preset time threshold Reference frame.
  • the reference frame storage block and the non-reference frame storage block are generated by partitioning a storage device, which is a small capacity disk such as an SD card or a TF card.
  • the foregoing embodiment saves the storage space by storing the reference frame and the non-reference frame in the monitoring data in the reference frame storage block and the non-reference frame storage block, and writing the storage device, and saving the storage space; If the space is insufficient, the reference frame and the non-reference frame stored in the reference frame storage block and the non-reference frame storage block may be respectively released, and the user may selectively release the non-reference exceeding the storage period threshold set by the user.
  • the frame which still retains the reference frame of the released old video data, frees up enough storage space and allows users to view the previously saved monitoring data over a long period of time.
  • the preset interval may be 10 minutes, 20 minutes, 30 minutes, 1 hour or 2 hours, etc., and the user may adjust the time of acquiring the video stream according to actual needs. interval.
  • the method of obtaining the video code stream by the segmentation section makes the processing of the monitoring data faster, more efficient, more accurate and more accurate, and avoids the slowing down of processing speed and the increase of the probability of error caused by a large amount of data centralized processing.
  • the method before the operation S102, the method further includes:
  • a frame header is added to each of the reference frames, and the frame header records address information of a non-reference frame sequence corresponding to the reference frame in the storage block.
  • the address information refers to an address stored in a storage device by a non-reference sequence, and a frame header is added to each reference frame, so that the monitoring data needs to be retrieved, and the frame according to the reference frame can be Head in the middle
  • the recorded address information quickly finds the corresponding non-reference frame.
  • the method before the operation S102, the method further includes:
  • the inter-frame stamp refers to an ambiguity in which a reference frame is taken in a H264-based video bitstream.
  • the present invention establishes a frame header with non-reference frame address information for a reference frame, and adds a non-reference frame to the inter-frame stamp of its corresponding reference frame, thereby establishing a reference frame between the reference frame and the non-reference frame. Correlation, so that the monitoring data needs to be retrieved, the corresponding non-reference frame can be quickly found according to the address information recorded in the frame header of the reference frame, and the reference frame is sequentially output according to the inter-time sequence recorded in the inter-turn stamp And non-reference frames.
  • the method before operation 102, the method further includes:
  • the preset threshold of the storage period may be randomly set according to actual needs, and may be
  • 3 days, 7 days, 15 days, one month can be 28 days, 29 days, 30 days or 3 according to the international calendar
  • the storage period can be extended appropriately, and the amount of data is large, and the storage period can be appropriately shortened.
  • operation 103 specifically includes:
  • the case where the storage space is insufficient specifically refers to: 1.
  • the storage device still has remaining storage space, but the data volume of the video code stream to be saved at the moment is greater than the remaining storage space; There is no video stream to be saved, but the remaining storage space of the storage device is detected to be insufficient.
  • the user can manually release the monitoring data as needed, or wait until the remaining storage space of the storage device is insufficient.
  • the monitoring data exceeding the retention period is automatically released by the above method.
  • the foregoing “detecting whether the remaining storage space is sufficient” specifically includes: [0050] traversing the reference frame queue and the non-reference frame queue;
  • the traversal method adopts hierarchical traversal or breadth-first traversal, and the principle of judging whether the remaining storage space is sufficient by traversing is: if the traversal is not completed, the reference frame and the non-reference frame overflow, and the storage space is insufficient. When the traversal is completed, it indicates that both the reference frame and the non-reference frame are in the storage device, and the storage space of the storage device is sufficient.
  • a preferred embodiment of the present invention further provides a method for collecting monitoring data, which is implemented on the basis of the foregoing processing method for monitoring data, and is mainly used to retrieve monitoring data, so that the user can Viewing the video, the method specifically includes:
  • searching for a reference frame in the target segment according to the inter-frame stamp of the reference frame and searching for a corresponding non-reference according to the address information of the corresponding non-reference frame sequence recorded by the frame header of the reference frame. a sequence of frames, or by matching the inter-post stamp of the reference frame and the inter-post stamp added on the first non-reference frame in the corresponding non-reference frame sequence to find a corresponding non-reference frame sequence;
  • the searched reference frame and the non-reference frame sequence corresponding to the reference frame are sequentially output.
  • the reference frame in the monitoring data and the non-reference frame corresponding to the reference frame can be sequentially output, and the association relationship between the reference frame and the non-reference frame can also be established.
  • the frame header and the inter-frame stamp are used to determine whether the non-reference frame is released.
  • FIG. 2 is a schematic diagram of a storage structure in which reference frames and non-reference frames are stored in a storage device according to an embodiment of the present invention.
  • a reference frame in a H264-based video code stream is represented as an I frame
  • a non-reference frame is represented as a P frame.
  • n; l and n are positive integers.
  • I frames 11, 12, 13... In
  • I frame storage block correspondingly, all P frame sequences (P1 ⁇ P29, P31 ⁇ P59, P61-P89... P(30n-29) ⁇ P(30n-l)) are arranged in the order of acquisition.
  • the I frame queue is written to the I frame storage block in the storage device.
  • FIG. 3 is a basic structural block diagram of a processing system for monitoring data provided by an embodiment of the present invention.
  • a processing system for monitoring data provided by an embodiment of the present invention includes:
  • the obtaining module 101 is configured to acquire a video code stream.
  • the framing storage module 102 is configured to sequentially add the reference frames in the video code stream to the reference frame queue, and write the reference frame storage block, according to the order of the reference frames in the reference frame queue, The non-reference frame sequence corresponding to each reference frame is sequentially added to the non-reference frame queue, and is written into the non-reference frame storage block;
  • the framing release module 103 is configured to release a sequence of non-reference frames whose retention period exceeds a preset threshold, and if all the non-reference frame sequences whose retention period exceeds the preset inter-time threshold are released, the release period is exceeded.
  • the obtaining module 101 is specifically configured to acquire a video code stream once every predetermined interval.
  • system further includes:
  • a first frame header setting module configured to add a frame header to each of the reference frames, where the frame header records address information of the non-reference frame sequence corresponding to the reference frame in the storage block.
  • a second frame header setting module configured to add a timestamp of its corresponding reference frame to the first non-reference frame in each of the non-reference frame sequences, to determine the Whether the retention period of the reference frame and its corresponding non-reference frame sequence exceeds a preset inter-time threshold.
  • system further includes:
  • the save period calculation module is configured to calculate a save period of each reference frame and its corresponding non-reference frame sequence according to the inter-frame stamp of each reference frame, and determine whether the save period exceeds a preset inter-time threshold.
  • the framing storage module 103 includes: [0074] a storage space detecting unit, configured to detect whether the remaining storage space is sufficient;
  • a non-reference frame release unit configured to: if the remaining storage space is insufficient, releasing a sequence of non-reference frames whose save period exceeds a preset inter-time threshold, returning whether the detecting remaining storage space is sufficient;
  • the reference frame release unit is configured to: if all the non-reference frame sequences whose retention period exceeds the preset inter-threshold threshold is released, still detecting that the remaining storage space is insufficient, and releasing the reference frame whose storage period exceeds the preset inter-time threshold.
  • the storage space detecting unit is specifically configured to:
  • system further includes:
  • a receiving module configured to receive a command for acquiring monitoring data stored in the target segment
  • a searching module configured to search for a reference frame in the target segment according to the inter-frame stamp of the reference frame, and according to the address information of the corresponding non-reference frame sequence recorded by the frame header of the reference frame, Finding a corresponding non-reference frame sequence, or searching for a corresponding non-reference frame sequence by matching the inter-frame stamp of the reference frame and the inter-post stamp added on the first non-reference frame in the corresponding non-reference frame sequence;
  • a reference frame output module configured to determine that the non-reference frame sequence has been released if the non-reference frame sequence is not found, and output the found reference frame
  • the non-reference frame output module is configured to output the searched reference frame and the non-reference frame sequence corresponding to the reference frame in sequence if the non-reference frame sequence is found.
  • FIG. 4 is a flow chart of a method of releasing a reference frame and a corresponding non-reference frame sequence provided by a preferred embodiment of the present invention.
  • a method for releasing a reference frame and a corresponding non-reference frame sequence provided by a preferred embodiment of the present invention specifically includes the following steps:
  • the method for releasing the reference frame and the corresponding non-reference frame sequence provided by the embodiment of the present invention may preferably release the P frame sequence whose storage period exceeds the preset inter-time threshold, so that the storage period exceeds the preset inter-time threshold.
  • the I frame of the data is still stored on the disk and can be viewed by the user, but is not full frame.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

本发明适用于视频监控技术领域,提供了一种监控数据的处理方法及系统,所述监控数据为基于H264编码的视频码流,所述方法包括:获取视频码流;将所述视频码流中的参考帧依次加入参考帧队列,并写入参考帧存储块,按所述参考帧队列中参考帧的排列顺序,将与各参考帧对应的非参考帧序列依次加入非参考帧队列,并写入非参考帧存储块;释放保存期超过预设时间阈值的非参考帧序列,若所有保存期超过预设时间阈值的非参考帧序列都释放完毕,则释放保存期超过预设时间阈值的参考帧。本发明通过将参考帧和非参考帧分块存储,能够节省存储空间;通过在存储空间不足时,优先释非参考帧数据块,使得用户依然可通过保留的参考帧来查看过保存期的监控视频。

Description

一种监控数据的处理方法及系统
技术领域
[0001] 本发明属于视频监控领域, 尤其涉及一种监控数据的处理方法及系统。
背景技术
[0002] 目前, 市面上的监控设备由于应用场景所限, 无法使用硬盘这类存储设备, 只 能使用体积和储量均较小 SD卡和 TF卡, 因而保存的监控数据数量有限, 需要经 常清理过往保存的数据, 只能保存短吋间内的监控数据。 现有技术中延长监控 数据的保存期的方法通常是在录像过程中通过降低数据的码率来保存低码率的 数据, 或者通过抽帧录像的方式来减小视频数据的数据量, 降低码率的方式会 降低录像的回放效果, 抽帧录像的方式会使得录像画面部分模糊或者吋而清晰 吋而模糊, 降低了录像的清晰度。
技术问题
[0003] 本发明实施例的目的在于提供一种监控数据的处理方法及系统, 旨在解决现有 技术中通过降低数据码率和抽帧来的保存监控数据的方式, 会降低录像的回放 效果, 使得录像画面部分模糊或者吋而清晰吋而模糊, 降低了录像的清晰度的 问题。
问题的解决方案
技术解决方案
[0004] 本发明实施例是这样实现的, 一种监控数据的处理方法, 所述监控数据为基于
H264编码的视频码流, 所述方法包括:
[0005] 获取视频码流;
[0006] 将所述视频码流中的参考帧依次加入参考帧队列, 并写入参考帧存储块, 按所 述参考帧队列中参考帧的排列顺序, 将与各参考帧对应的非参考帧序列依次加 入非参考帧队列, 并写入非参考帧存储块;
[0007] 释放保存期超过预设吋间阈值的非参考帧序列, 若所有保存期超过预设吋间阈 值的非参考帧序列都释放完毕, 则释放保存期超过预设吋间阈值的参考帧。 [0008] 在一优选实施例中, 所述将所述视频码流中的参考帧依次加入参考帧队列, 并 写入参考帧存储块, 按所述参考帧队列中参考帧的排列顺序, 将与各参考帧对 应的非参考帧序列依次加入非参考帧队列, 并写入非参考帧存储块之前, 所述 方法还包括:
[0009] 给每个所述参考帧添加帧头, 所述帧头记录有与该参考帧对应的非参考帧序列 在存储块中的地址信息;
[0010] 给每个所述非参考帧序列中的第一个非参考帧添加其对应的参考帧的吋间戳, 以根据所述吋间戳确定所述参考帧及其对应的非参考帧序列的保存期是否超过 预设吋间阈值。
[0011] 本发明实施例还提供一种监控数据的处理系统, 所述系统包括:
[0012] 获取模块, 用于获取视频码流;
[0013] 分帧存储模块, 用于将所述视频码流中的参考帧依次加入参考帧队列, 并写入 参考帧存储块, 按所述参考帧队列中参考帧的排列顺序, 将与各参考帧对应的 非参考帧序列依次加入非参考帧队列, 并写入非参考帧存储块;
[0014] 分帧释放模块, 用于释放保存期超过预设吋间阈值的非参考帧序列, 若所有保 存期超过预设吋间阈值的非参考帧序列都释放完毕, 则释放保存期超过预设吋 间阈值的参考帧。
[0015] 在一优选实施例中, 所述系统还包括:
[0016] 第一帧头设置模块, 用于给每个所述参考帧添加帧头, 所述帧头记录有与该参 考帧对应的非参考帧序列在存储块中的地址信息。
[0017] 第二帧头设置模块, 用于给每个所述非参考帧序列中的第一个非参考帧添加其 对应的参考帧的吋间戳, 以根据所述吋间戳确定所述参考帧及其对应的非参考 帧序列的保存期是否超过预设吋间阈值。
发明的有益效果
有益效果
[0018] 本发明实施例与现有技术相比, 其有益效果在于: 通过将基于 H264的编码的视 频码流中的参考帧和非参考帧分块存储, 节省了存储空间, 使得存储设备中能 够保存更长吋间内录制的监控数据, 从而延长了监控数据的保存期; 通过在存 储设备的存储空间不足吋, 优先释放超过保存期的非参考帧数据块, 使得用户 依然能过通过保留的超过保存期的参考帧来査看监控视频; 当所有超过满帧保 存期的非参考帧释放完毕后, 若存储设备的存储空间仍不足, 才释放超过保存 期的参考帧, 使得监控视频能够尽可能的在更长吋间内被保留; 通过给参考帧 添加其对应的非参考帧的地址信息, 给非参考帧序列的第一个参考帧添加其对 应的参考帧的吋间戳, 从而建立参考帧和非参考帧之间的关联, 使用户在调取 监控数据吋, 所述参考帧和非参考帧能够按顺序依次输出, 同吋也能通过该帧 关联判断相应的非参考帧是否已被释放; 本发明所提供的方法和系统还具有易 于实现、 适于广泛推广的特点。
对附图的简要说明
附图说明
[0019] 图 1是本发明的实施例提供的监控数据的处理方法的流程图;
[0020] 图 2是本发明的实施例提供的参考帧和非参考帧存储在存储设备中的存储结构 示意图;
[0021] 图 3是本发明的实施例提供的监控数据的处理系统的基本结构框图;
[0022] 图 4是本发明的优选实施例提供的释放参考帧和对应的非参考帧序列的方法的 流程图。
本发明的实施方式
[0023] 为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用 以解释本发明, 并不用于限定本发明。
[0024] 图 1是本发明的实施例提供的监控数据的处理方法的流程图; 为了便于说明, 仅示出了与本实施例相关的部分。
[0025] 参阅图 1, 在本发明实施例所提供的监控数据的处理方法中, 所述监控数据为 基于 H264编码的视频码流, 所述视频码流包括多个参考帧, 多个参考帧中的每 个参考帧后排列有由多个非参考帧构成的非参考帧序列, 所述方法具体包括下 述操作中的 S101~S103。 [0026] S101 : 获取视频码流。
[0027] 在一优选实施例中, 所述操作 S101具体为: 每间隔预设吋间段获取一次视频码 流。
[0028] S102: 将所述视频码流中的参考帧依次加入参考帧队列, 并写入参考帧存储块 , 按所述参考帧队列中参考帧的排列顺序, 将与各参考帧对应的非参考帧序列 依次加入非参考帧队列, 并写入非参考帧存储块。
[0029] 由于本发明的方法主要针对的是基于 H264编码的监控数据, 因此所述视频码流 中的参考帧具体指 I帧, 非参考帧具体指 P帧。
[0030] S103: 释放保存期超过预设吋间阈值的非参考帧序列, 若所有保存期超过预设 吋间阈值的非参考帧序列都释放完毕, 则释放保存期超过预设吋间阈值的参考 帧。
[0031] 在具体应用中, 所述参考帧存储块和所述非参考帧存储块是通过将存储设备进 行分区产生的, 所述存储设备为 SD卡或 TF卡等小容量磁盘。
[0032] 上述实施例通过将监控数据中的参考帧和非参考帧分幵存储在参考帧存储块和 非参考帧存储块中, 并写入存储设备, 节省了存储空间; 并且在存储设备的空 间不足吋, 可以对存储在参考帧存储块和非参考帧存储块中的参考帧和非参考 帧分别进行释放, 用户可以有选择性的优先释放超过用户自主设定的存储期阈 值的非参考帧, 仍然保留被释放的老旧视频数据的参考帧, 既腾出了足够的存 储空间也使得用户依然可以随吋査看较长吋间以前保存的监控数据。
[0033] 在具体应用中, 所述预设吋间段可以为 10分钟、 20分钟、 30分钟、 1小吋或 2小 吋等等, 用户可以根据实际需要随意调整获取视频码流的吋间间隔。 这种分吋 段获取视频码流的方法, 使得对监控数据的处理更加快捷高效和准确, 避免了 大量数据集中处理所带来的处理速度减慢和出错几率的增加。
[0034] 在一优选实施例中, 所述操作 S102之前, 还包括:
[0035] 给每个所述参考帧添加帧头, 所述帧头记录有与该参考帧对应的非参考帧序列 在存储块中的地址信息。
[0036] 在具体应用中, 所述地址信息是指非参考序列存储在存储设备中的地址, 给每 个参考帧添加帧头, 使得需要调取监控数据吋, 能够根据所述参考帧的帧头中 所记录的地址信息快速的找到对应的非参考帧。
[0037] 在一优选实施例中, 所述操作 S102之前, 还包括:
[0038] 给每个所述非参考帧序列中的第一个非参考帧添加其对应的参考帧的吋间戳, 以根据所述吋间戳确定所述参考帧及其对应的非参考帧序列的保存期是否超过 预设吋间阈值。
[0039] 在具体应用中, 所述吋间戳是指在基于 H264的视频码流中参考帧被摄取吋的吋 刻。
[0040] 本发明通过给参考帧添加带有非参考帧地址信息的帧头, 给非参考帧加上其对 应的参考帧的吋间戳, 通过这种方式建立参考帧和非参考帧之间的关联, 使得 需要调取监控数据吋, 能够根据所述参考帧的帧头中所记录的地址信息快速的 找到对应的非参考帧, 并根据吋间戳所记载的吋间顺序依次输出参考帧和非参 考帧。
[0041] 在一优选实施例中, 操作 102之前还包括:
[0042] 根据每个参考帧的吋间戳, 计算每个参考帧及其对应的非参考帧序列的保存期
, 并判断该保存期是否超过预设吋间阈值。
[0043] 在具体应用中, 所述保存期的预设吋间阈值可根据实际需要随意设置, 可以为
3天、 7天、 15天、 一个月 (按国际公历吋间一个月可以为 28天、 29天、 30天或 3
1天) 、 三个月或者更长吋间。 当监控数据的数据量较小吋, 可以适当将保存期 延长, 数据量较大吋, 可以适当缩短保存期。
[0044] 在一优选实施例中, 操作 103具体包括:
[0045] 检测剩余存储空间是否足够;
[0046] 若剩余存储空间不足, 释放保存期超过预设吋间阈值的非参考帧序列, 返回所 述检测剩余存储空间是否足够的操作;
[0047] 若所有保存期超过预设吋间阈值的非参考帧序列都释放完毕, 仍检测到剩余存 储空间不足, 释放保存期超过预设吋间阈值的参考帧。
[0048] 在具体应用中, 所述存储空间不足的情况具体指: 一、 存储设备依然有剩余存 储空间, 但当前吋刻将要被保存的视频码流的数据量大于剩余存储空间; 二、 当前吋刻没有要被保存的视频码流, 但检测到存储设备的剩余存储空间不足。 用户可以根据需要, 手动释放监控数据, 也可以等到存储设备的剩余存储空间 不足吋, 通过上述方法在自动释放超过保存期的监控数据。
[0049] 在一优选实施例中, 上述"检测剩余存储空间是否足够 "的操作, 具体包括: [0050] 遍历所述参考帧队列和所述非参考帧队列;
[0051] 若遍历未完成, 则判定剩余存储空间不足。
[0052] 在具体应用中, 所述遍历方法采用层次遍历或者广度优先遍历, 通过遍历来判 断剩余存储空间是否足够的原理为: 遍历未完成, 则说明参考帧和非参考帧溢 出, 存储空间不足; 遍历完成, 则说明参考帧和非参考帧都在存储设备内, 存 储设备的存储空间足够。
[0053] 本发明的优选实施例还提供一种监控数据的调取方法, 该方法是在前述的监控 数据的处理方法的基础之上实现的, 主要用于调取监控数据, 以使用户可以査 看录像, 所述方法具体包括:
[0054] 接收调取目标吋间段内存储的监控数据的命令;
[0055] 按所述参考帧的吋间戳来査找目标吋间段内的参考帧, 并根据所述参考帧的帧 头所记录的对应的非参考帧序列的地址信息, 査找对应的非参考帧序列, 或通 过匹配所述参考帧的吋间戳和其对应的非参考帧序列中第一个非参考帧上添加 的吋间戳, 査找对应的非参考帧序列;
[0056] 若未査找到所述非参考帧序列, 则判断该非参考帧序列已被释放, 输出査找到 的参考帧;
[0057] 若査找到所述非参考帧序列, 则依序输出査找到的参考帧及该参考帧对应的非 参考帧序列。
[0058] 通过上述监控数据的调取方法, 监控数据中的参考帧及与该参考帧对应的非参 考帧能够按顺序输出, 同吋也能通过在参考帧和非参考帧之间建立关联关系的 帧头和吋间戳来判断非参考帧是否被释放。
[0059] 图 2是本发明的实施例提供的参考帧和非参考帧存储在存储设备中的存储结构 示意图。
[0060] 参阅图 2, 为了便于描述, 将基于 H264的视频码流中的参考帧表示为 I帧, 非参 考帧表示为 P帧。 设每间隔预设吋间段所获取的视频码流内共有 n个 I帧, 每个 I帧 后面跟有对应的 29个 P帧, 则预设吋间段所获取的视频码流具体表示为: I1P1P2 P29I2P31P32 P59I3P61P62 P89 InP(30n-29)P(30n-28) P(30n-1
); 所述 n≥l且 n为正整数。
[0061] 如图 3所示, 将预设吋间段内获取的视频码流中的所有 I帧 (11、 12、 13...... In) 按获取顺序排成 I帧队列写入 I帧存储块; 对应的, 将所有 P帧序列 (P1~P29、 P31 ~P59、 P61-P89...... P(30n-29)~P(30n-l)) 按获取顺序排成 I帧队列写入存储设备 中的 I帧存储块。
[0062] 图 3是本发明的实施例提供的监控数据的处理系统的基本结构框图。
[0063] 参阅图 3, 本发明的实施例提供的监控数据的处理系统, 包括:
[0064] 获取模块 101, 用于获取视频码流;
[0065] 分帧存储模块 102, 用于将所述视频码流中的参考帧依次加入参考帧队列, 并 写入参考帧存储块, 按所述参考帧队列中参考帧的排列顺序, 将与各参考帧对 应的非参考帧序列依次加入非参考帧队列, 并写入非参考帧存储块;
[0066] 分帧释放模块 103, 用于释放保存期超过预设吋间阈值的非参考帧序列, 若所 有保存期超过预设吋间阈值的非参考帧序列都释放完毕, 则释放保存期超过预 设吋间阈值的参考帧。
[0067] 在一优选实施例中, 获取模块 101, 具体用于每间隔预设吋间段获取一次视频 码流。
[0068] 在一优选实施例中, 所述系统还包括:
[0069] 第一帧头设置模块, 用于给每个所述参考帧添加帧头, 所述帧头记录有与该参 考帧对应的非参考帧序列在存储块中的地址信息。
[0070] 第二帧头设置模块, 用于给每个所述非参考帧序列中的第一个非参考帧添加其 对应的参考帧的吋间戳, 以根据所述吋间戳确定所述参考帧及其对应的非参考 帧序列的保存期是否超过预设吋间阈值。
[0071] 在一优选实施例中, 所述系统还包括:
[0072] 保存期计算模块, 用于根据每个参考帧的吋间戳, 计算每个参考帧及其对应的 非参考帧序列的保存期, 并判断该保存期是否超过预设吋间阈值。
[0073] 在一优选实施例中, 所述分帧存储模块 103包括: [0074] 存储空间检测单元, 用于检测剩余存储空间是否足够;
[0075] 非参考帧释放单元, 用于若剩余存储空间不足, 释放保存期超过预设吋间阈值 的非参考帧序列, 返回所述检测剩余存储空间是否足够的操作;
[0076] 参考帧释放单元, 用于若所有保存期超过预设吋间阈值的非参考帧序列都释放 完毕, 仍检测到剩余存储空间不足, 释放保存期超过预设吋间阈值的参考帧。
[0077] 在一优选实施例中, 所述存储空间检测单元具体用于:
[0078] 遍历所述参考帧队列和所述非参考帧队列;
[0079] 若遍历未完成, 则判定剩余存储空间不足。
[0080] 在一优选实施例中, 所述系统还包括:
[0081] 接收模块, 用于接收调取目标吋间段内存储的监控数据的命令;
[0082] 査找模块, 用于按所述参考帧的吋间戳来査找目标吋间段内的参考帧, 并根据 所述参考帧的帧头所记录的对应的非参考帧序列的地址信息, 査找对应的非参 考帧序列, 或通过匹配所述参考帧的吋间戳和其对应的非参考帧序列中第一个 非参考帧上添加的吋间戳, 査找对应的非参考帧序列;
[0083] 参考帧输出模块, 用于若未査找到所述非参考帧序列, 则判断该非参考帧序列 已被释放, 输出査找到的参考帧;
[0084] 非参考帧输出模块, 用于若査找到所述非参考帧序列, 则依序输出査找到的参 考帧及该参考帧对应的非参考帧序列。
[0085] 图 4是本发明的优选实施例提供的释放参考帧和对应的非参考帧序列的方法的 流程图。
[0086] 参阅图 4, 本发明的优选实施例提供的释放参考帧和对应的非参考帧序列的方 法, 具体包括如下步骤:
[0087] 幵始;
[0088] 检测磁盘空间是否足够;
[0089] 若是, 则结束;
[0090] 若否, 则按获取监控数据的顺序依次遍历磁盘内的监控数据;
[0091] 检测是否遍历完成;
[0092] 若是, 则结束; [0093] 若否, 则检测所述监控数据的存储期是否超过预设吋间阈值;
[0094] 若否, 则返回检测磁盘空间是否足够的步骤;
[0095] 若是, 检测磁盘内的存储期超过预设吋间阈值的 P帧序列是否释放;
[0096] 若否, 则释放存储期超过预设吋间阈值的 P帧序列, 并返回检测磁盘空间是否 足够的步骤;
[0097] 若是, 则判断是否需要释放磁盘内存储期超过预设吋间阈值的 I帧;
[0098] 若否, 则返回检测磁盘空间是否足够的步骤;
[0099] 若是, 则释放存储期超过预设吋间阈值的 I帧, 并返回检测磁盘空间是否足够 的步骤。
[0100] 本发明实施例所提供的释放参考帧和对应的非参考帧序列的方法, 可以优选释 放存储期超过预设吋间阈值的 P帧序列, 使得存储期超过预设吋间阈值的监控数 据的 I帧依然保存在磁盘中, 可以被用户査看, 只是非满帧。
[0101] 以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本发明的 精神和原则之内所作的任何修改、 等同替换和改进等, 均应包含在本发明的保 护范围之内。

Claims

权利要求书
[权利要求 1] 一种监控数据的处理方法, 所述监控数据为基于 H264编码的视频码 流, 其特征在于, 所述方法包括:
获取视频码流;
将所述视频码流中的参考帧依次加入参考帧队列, 并写入参考帧存储 块, 按所述参考帧队列中参考帧的排列顺序, 将与各参考帧对应的非 参考帧序列依次加入非参考帧队列, 并写入非参考帧存储块; 释放保存期超过预设吋间阈值的非参考帧序列, 若所有保存期超过预 设吋间阈值的非参考帧序列都释放完毕, 则释放保存期超过预设吋间 阈值的参考帧。
[权利要求 2] 如权利要求 1所述的监控数据的处理方法, 其特征在于, 所述将所述 视频码流中的参考帧依次加入参考帧队列, 并写入参考帧存储块, 按 所述参考帧队列中参考帧的排列顺序, 将与各参考帧对应的非参考帧 序列依次加入非参考帧队列, 并写入非参考帧存储块之前, 所述方法 还包括:
给每个所述参考帧添加帧头, 所述帧头记录有与该参考帧对应的非参 考帧序列在存储块中的地址信息; 给每个所述非参考帧序列中的第一个非参考帧添加其对应的参考帧的 吋间戳, 以根据所述吋间戳确定所述参考帧及其对应的非参考帧序列 的保存期是否超过预设吋间阈值。
[权利要求 3] 如权利要求 1或 2任一项所述的监控数据的处理方法, 其特征在于, 所 述释放保存期超过预设吋间阈值的非参考帧序列, 若所有保存期超过 预设吋间阈值的非参考帧序列都释放完毕, 则释放保存期超过预设吋 间阈值的参考帧的操作, 具体包括:
检测剩余存储空间是否足够;
若剩余存储空间不足, 释放保存期超过预设吋间阈值的非参考帧序 列, 返回所述检测剩余存储空间是否足够的操作; 若所有保存期超过预设吋间阈值的非参考帧序列都释放完毕, 仍检测 到剩余存储空间不足, 释放保存期超过预设吋间阈值的参考帧。
[权利要求 4] 如权利要求 3所述的监控数据的处理方法, 其特征在于, 所述检测剩 余存储空间是否足够的操作, 具体包括:
遍历所述参考帧队列和所述非参考帧队列;
若遍历未完成, 则判定剩余存储空间不足。
[权利要求 5] 如权利要求 1、 2或 4任一项所述的监控数据的处理方法, 其特征在于
, 所述方法还包括:
接收调取目标吋间段内存储的监控数据的命令; 按所述参考帧的吋间戳来査找目标吋间段内的参考帧, 并根据所述参 考帧的帧头所记录的对应的非参考帧序列的地址信息, 査找对应的非 参考帧序列, 或通过匹配所述参考帧的吋间戳和其对应的非参考帧序 列中第一个非参考帧上添加的吋间戳, 査找对应的非参考帧序列; 若未査找到所述非参考帧序列, 则判断该非参考帧序列已被释放, 输 出査找到的参考帧;
若査找到所述非参考帧序列, 则依序输出査找到的参考帧及该参考帧 对应的非参考帧序列。
[权利要求 6] —种监控数据的处理系统, 其特征在于, 所述系统包括:
获取模块, 用于获取视频码流;
分帧存储模块, 用于将所述视频码流中的参考帧依次加入参考帧队列 , 并写入参考帧存储块, 按所述参考帧队列中参考帧的排列顺序, 将 与各参考帧对应的非参考帧序列依次加入非参考帧队列, 并写入非参 考帧存储块;
分帧释放模块, 用于释放保存期超过预设吋间阈值的非参考帧序列, 若所有保存期超过预设吋间阈值的非参考帧序列都释放完毕, 则释放 保存期超过预设吋间阈值的参考帧。
[权利要求 7] 如权利要求 6所述的监控数据的处理系统, 其特征在于, 所述系统还 包括:
第一帧头设置模块, 用于给每个所述参考帧添加帧头, 所述帧头记录 有与该参考帧对应的非参考帧序列在存储块中的地址信息。
第二帧头设置模块, 用于给每个所述非参考帧序列中的第一个非参考 帧添加其对应的参考帧的吋间戳, 以根据所述吋间戳确定所述参考帧 及其对应的非参考帧序列的保存期是否超过预设吋间阈值。
[权利要求 8] 如权利要求 6或 7任一项所述的监控数据的处理系统, 其特征在于, 所 述分帧释放模块包括:
存储空间检测单元, 用于检测剩余存储空间是否足够;
非参考帧释放单元, 用于若剩余存储空间不足, 释放保存期超过预设 吋间阈值的非参考帧序列, 返回所述检测剩余存储空间是否足够的操 作;
参考帧释放单元, 用于若所有保存期超过预设吋间阈值的非参考帧序 列都释放完毕, 仍检测到剩余存储空间不足, 释放保存期超过预设吋 间阈值的参考帧。
[权利要求 9] 如权利要求 8所述的监控数据的处理系统, 其特征在于, 所述存储空 间检测单元具体用于:
遍历所述参考帧队列和所述非参考帧队列;
若遍历未完成, 则判定剩余存储空间不足。
[权利要求 10] 如权利要求 6、 7或 9任一项所述的监控数据的处理系统, 其特征在于
, 所述系统还包括:
接收模块, 用于接收调取目标吋间段内存储的监控数据的命令; 査找模块, 用于按所述参考帧的吋间戳来査找目标吋间段内的参考帧 , 并根据所述参考帧的帧头所记录的对应的非参考帧序列的地址信息 , 査找对应的非参考帧序列, 或通过匹配所述参考帧的吋间戳和其对 应的非参考帧序列中第一个非参考帧上添加的吋间戳, 査找对应的非 参考帧序列;
参考帧输出模块, 用于若未査找到所述非参考帧序列, 则判断该非参 考帧序列已被释放, 输出査找到的参考帧;
非参考帧输出模块, 用于若査找到所述非参考帧序列, 则依序输出査 找到的参考帧及该参考帧对应的非参考帧序列。
PCT/CN2015/083936 2015-07-14 2015-07-14 一种监控数据的处理方法及系统 WO2017008234A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/083936 WO2017008234A1 (zh) 2015-07-14 2015-07-14 一种监控数据的处理方法及系统
CN201580000199.0A CN105517674B (zh) 2015-07-14 2015-07-14 一种监控数据的处理方法及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/083936 WO2017008234A1 (zh) 2015-07-14 2015-07-14 一种监控数据的处理方法及系统

Publications (1)

Publication Number Publication Date
WO2017008234A1 true WO2017008234A1 (zh) 2017-01-19

Family

ID=55724957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083936 WO2017008234A1 (zh) 2015-07-14 2015-07-14 一种监控数据的处理方法及系统

Country Status (2)

Country Link
CN (1) CN105517674B (zh)
WO (1) WO2017008234A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108377363A (zh) * 2018-02-07 2018-08-07 特斯联(北京)科技有限公司 一种基于事件触发的监控视频获取方法
CN108366218A (zh) * 2018-04-16 2018-08-03 上海小蚁科技有限公司 录像文件形成方法及装置、计算机可读存储介质、摄像设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050257239A1 (en) * 2004-05-17 2005-11-17 Microsoft Corporation Reverse presentation of digital media streams
CN101077001A (zh) * 2004-11-12 2007-11-21 派尔高公司 存储视频数据的装置和方法
CN101133640A (zh) * 2004-11-12 2008-02-27 派尔高公司 用于控制视频监视显示的方法和装置
CN101466034A (zh) * 2008-12-25 2009-06-24 华为技术有限公司 发送、播放流媒体数据的方法和装置及流媒体点播系统
CN101674444A (zh) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 视频数据的存储方法、系统和编码器

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360058A (zh) * 2008-09-08 2009-02-04 华为技术有限公司 一种控制缓存溢出的方法及装置
CN103929654B (zh) * 2013-01-11 2017-09-12 浙江大华技术股份有限公司 一种图像数据处理方法及装置
CN103780877A (zh) * 2013-12-26 2014-05-07 深圳市华仁达技术有限公司 基于h264编码的海量视频数据的存储及检索方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050257239A1 (en) * 2004-05-17 2005-11-17 Microsoft Corporation Reverse presentation of digital media streams
CN101077001A (zh) * 2004-11-12 2007-11-21 派尔高公司 存储视频数据的装置和方法
CN101133640A (zh) * 2004-11-12 2008-02-27 派尔高公司 用于控制视频监视显示的方法和装置
CN101466034A (zh) * 2008-12-25 2009-06-24 华为技术有限公司 发送、播放流媒体数据的方法和装置及流媒体点播系统
CN101674444A (zh) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 视频数据的存储方法、系统和编码器

Also Published As

Publication number Publication date
CN105517674B (zh) 2019-03-08
CN105517674A (zh) 2016-04-20

Similar Documents

Publication Publication Date Title
CN102750962B (zh) 一种录像文件的回放方法及装置
US8676027B2 (en) Method for event initiated video capturing and a video camera for capture event initiated video
CN104410807B (zh) 一种多路视频同步回放方法及装置
CN102456376B (zh) 一种用于监控设备的即录即放方法
CN101843099B (zh) 存储视频数据的装置和方法
JP2007235570A5 (zh)
CN103369284A (zh) 一种音视频数据预录方法及装置
CN108833817B (zh) 一种视频数据存储方法及装置
JP2010021813A (ja) 情報記録再生装置及び情報記録再生方法
WO2012028021A1 (zh) 一种录像方法及装置
WO2017008234A1 (zh) 一种监控数据的处理方法及系统
CN104702874B (zh) 一种面向视频监控的文件存储方法
CN104104895A (zh) 对视频数据进行录像回放的方法及硬盘录像机
WO2011063737A1 (zh) 一种实时流文件播放方法及其装置
CN114501002A (zh) 一种基于gop缓存的警前录像方法和装置
CN106101596B (zh) 一种视频存储方法和装置
US8582951B2 (en) Information processing device, information processing method, and computer program
CN102938829A (zh) 一种实时音视频流的预录实现方法
JP2005339262A5 (zh)
CN103514645A (zh) 车用影像记录系统及方法
JP2007306258A5 (zh)
CN102279779A (zh) 数字硬盘录像机上实现录像数据冗余备份的方法及其装置
JP2010183248A (ja) 動画像記録装置
WO2019185048A1 (zh) 一种计算视频码率的方法、装置及存储介质
JP4250477B2 (ja) メディアデータ記録方法、メディアデータ記録装置、コンピュータプログラム及びコンピュータ読み取り可能な記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15897962

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15897962

Country of ref document: EP

Kind code of ref document: A1