CN112579820B - Time hopping video data processing method, device, medium and electronic equipment - Google Patents

Time hopping video data processing method, device, medium and electronic equipment Download PDF

Info

Publication number
CN112579820B
CN112579820B CN201910925873.6A CN201910925873A CN112579820B CN 112579820 B CN112579820 B CN 112579820B CN 201910925873 A CN201910925873 A CN 201910925873A CN 112579820 B CN112579820 B CN 112579820B
Authority
CN
China
Prior art keywords
time
index
frame
frame data
index information
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.)
Active
Application number
CN201910925873.6A
Other languages
Chinese (zh)
Other versions
CN112579820A (en
Inventor
王云祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201910925873.6A priority Critical patent/CN112579820B/en
Publication of CN112579820A publication Critical patent/CN112579820A/en
Application granted granted Critical
Publication of CN112579820B publication Critical patent/CN112579820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/36Monitoring, i.e. supervising the progress of recording or reproducing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application discloses a time hopping video data processing method, a time hopping video data processing device, a time hopping video data processing medium and electronic equipment. The method comprises the following steps: judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number. By implementing the technical scheme, the effect of still storing the frame data index information to support data retrieval in time hopping can be realized.

Description

Time hopping video data processing method, device, medium and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of data transmission, in particular to a time hopping video data processing method, device, medium and electronic equipment.
Background
With the rapid development of economic society, the demand for monitoring and other video recording through a camera is increasing. No matter what frame rate the camera uses to acquire data, a large amount of data storage requirements are generated. In the prior art, when data needs to be retrieved, the data is often retrieved according to the time of stored data after a camera of a scene actually needing to be retrieved is determined. However, in some cases, a time jump occurs due to an abnormality in the system time of the camera or the server. For example, data normally stored in time is determined in chronological order. For example, data of one frame group is stored every 2 seconds, and if time hopping occurs, data that would otherwise need to be stored in the next frame group conflicts with the time of already stored data. Therefore, after the time jump occurs, the storage system is required to be quitted or continuously stored, but the video recording result is searched and is disordered. And the exit of the storage system can cause the loss of the video data after the time jump.
Disclosure of Invention
The embodiment of the application provides a time-hopping video data processing method, device, medium and electronic equipment, which can achieve the effect that frame data index information can still be stored to support data index when time hopping is performed.
In a first aspect, an embodiment of the present application provides a time-hopping video data processing method, where the method includes:
judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; the frame data index information comprises a frame group number and index time;
if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
Optionally, in the process of writing the frame data index information into the target index area, determining whether a time jump event occurs includes:
in the process of writing the frame data index information into the target index area, if the index time of the current frame group is detected to be smaller than the index time of the previous frame group, determining that a time jump event occurs; and if the index time of the current frame group is detected to be larger than the index time of the previous frame group, determining that the time jump event does not occur.
Optionally, determining the calculation index time of the frame data index information after the time jump according to a preset calculation rule includes:
acquiring frame rate parameters of frame data transmitted by a camera and acquiring the number of the frame data of each frame group;
determining the time interval between the frame groups according to the frame rate parameters and the frame data quantity of the frame groups;
a calculation index time of the frame data index information is determined based on a time interval between frame groups.
Optionally, the time interval between the frame groups is determined by the following formula:
Gt=GOP/L;
wherein Gt is the time interval between frame groups, L is the frame rate parameter, and GOP is the frame data quantity of the frame groups.
Optionally, determining the calculation index time of the frame data index information based on the time interval between the frame groups includes:
determining the number of interval groups of a frame group in which frame data are positioned and a frame group before a time jump event occurs;
and determining the calculation index time of the frame data index information according to the time interval between the frame groups and the number of the interval groups.
Optionally, the method further includes:
and stopping writing the frame data index information into the supplementary index area if the index time for writing the frame data index information into the target index area is detected to be longer than the calculation index time of the frame data index information which is written newly in the supplementary index area.
Optionally, after writing the frame group number and the calculation index time into the preset supplementary index area, the method further includes:
in response to a frame data retrieval request, if target frame data of the retrieval request is stored in the supplementary index area, retrieval is performed with the calculated index time of the frame group stored in the supplementary index area.
In a second aspect, an embodiment of the present application provides a time-hopped video data processing apparatus, where the apparatus includes:
the time hopping event judging module is used for judging whether a time hopping event occurs or not in the process of writing the frame data index information into the target index area; the written information comprises a frame group number and index time when the frame data index information is written;
the frame data index information writing management module is used for writing the frame data index information subjected to time hopping into a target index area if the time hopping event judgment module judges that the frame data index information is positive; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
Optionally, the time jump event determining module is specifically configured to:
in the process of writing the frame data index information into the target index area, if the index time of the current frame group is detected to be smaller than the index time of the previous frame group, determining that a time jump event occurs; and if the index time of the current frame group is detected to be larger than the index time of the previous frame group, determining that the time jump event does not occur.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a time hopping video data processing method according to the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable by the processor, where the processor executes the computer program to implement the time hopping video data processing method according to the embodiment of the present application.
According to the technical scheme provided by the embodiment of the application, whether a time jump event occurs is judged in the process of writing the index information of the frame data into the target index area; the written information comprises a frame group number and index time when the frame data index information is written; if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number. By adopting the technical scheme provided by the application, the effect that the frame data index information can still be stored to support data index when the time jumps can be realized.
Drawings
Fig. 1 is a flowchart of a time-hopping video data processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a storage format of a recorded data block according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a storage networking provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of another storage networking provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a mapping relationship between old and new index areas according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a time-hopped video data processing apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently, or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a time-hopped video data processing method according to an embodiment of the present application, where this embodiment is applicable to a case where index information of video frame data with a time hop is written, and the method can be executed by a time-hopped video data processing apparatus according to an embodiment of the present application, where the apparatus can be implemented by software and/or hardware, and can be integrated in an electronic device such as a camera head, a server, or a storage device.
As shown in fig. 1, the time hopping video data processing method includes:
s110, judging whether a time jump event occurs or not in the process of writing the frame data index information into a target index area; the written information includes frame group number and index time when the index information of frame data is written.
The frame data may be data of each frame of picture in the video data, and may be streaming data collected by a camera or other devices, and the frame data index information is directly written into the storage device. Besides, it may be a server for collecting streams centrally, for example, if the camera is a third-party device, the camera may proxy write data to the storage device through the centralized stream collecting server if only the streaming function exists and there is no function of how to write data to the storage device.
The frame group may be a group of a preset number of frame data, and written into a target index area of the storage device. For example, every 50 frame data may be treated as 1 frame group. The target index area may be an area where data storage is performed for each camera number. For example, in the storage device, the data acquired by 0001-0004 four cameras can be stored in four physical addresses. If the current frame data is acquired by the 0001 camera, the current frame data needs to be written into a preset position for storing data for the 0001 camera, namely a target index area.
The written information includes frame group number and index time when the index information of frame data is written. A different frame group number may be set for each frame group written. For example, different frame groups may be distinguished according to frame group number, in such a manner that the numbers may be sequentially numbered, as in I10298, I10299, I10300. All the time may be the time when the frame data index information is written. Since more frame data may exist in one frame group, the time of the first frame data of each frame group may be used as the index time of the frame group. Wherein the index time can be used as a basis for feeding back information of the retrieval request. For example, if the search request is data of 08% on day 08 on month of year.
In this embodiment, optionally, in the process of writing the frame data index information into the target index area, determining whether a time jump event occurs includes: in the process of writing the frame data index information into the target index area, if the index time of the current frame group is detected to be smaller than the index time of the previous frame group, determining that a time jump event occurs; and if the index time of the current frame group is detected to be larger than the index time of the previous frame group, determining that the time jump event does not occur. Wherein, since the time of each frame group is sequentially increased, if the time of the previous frame group is greater than the time of the frame group to be written, it can be determined that the time jump event has occurred in the current frame group. That is, when the frame data index information is written or when the frame data index information is acquired, the system time jump occurs at the camera head end or the streaming server end. According to the scheme, in the process of writing the frame group, the index time of the current frame group is compared with the index time of the previous frame group, so that a time jump event can be found in real time, a corresponding processing mechanism is generated in time, and the problem of the time jump event can be processed in real time.
S120, if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
After the occurrence of the time jump event is determined, the calculation index time of the frame data index information after the time jump can be determined according to the preset calculation rule, and after the occurrence of the time jump event, the frame group is written into the supplementary index area in the same or similar manner. Wherein, when writing the frame group into the supplementary index area, the frame group can be associated with the target index area according to the frame group number. For example, the same frame group number may be written in both areas, and the index time written in the supplementary index area may be the previously obtained calculated index time.
After the above technical solution is completed, in response to a frame data retrieval request, if target frame data of the retrieval request is stored in the supplementary index area, the retrieval may be performed with the calculated index time of the frame group stored in the supplementary index area.
When a frame data retrieval request is received, whether a time point with the same calculation index time exists in the supplementary index area can be determined according to a target time point or a target time period in the retrieval request, and if so, information in the target index area can be replaced by information in the supplementary index area in the retrieval process, wherein the information can be the content of the frame data index information and the like.
The data in the target index region and the supplementary index region may have a mapping relationship according to the frame group number, and when the content of the data segment in the target index region, which is subjected to the time jump, needs to be accessed, the data content of the corresponding frame group in the supplementary index region may be directly accessed according to the mapping relationship between the two.
In this embodiment, optionally, the method further includes: and stopping writing the frame data index information into the supplementary index area if the index time for writing the frame data index information into the target index area is detected to be longer than the calculation index time of the frame data index information which is written newly in the supplementary index area. The index time of the previous frame group in which the time jump event is found to occur may be marked, and after the time jump event, the index time of the frame group may be monitored after the frame group is written into the target detection area. If the index time of the next frame group is found to exceed the calculated index time of the frame data index information written latest in the supplementary index area, the time of the system can be considered to be recovered to the normal state, the writing of the frame data index information in the supplementary index area is stopped, and only the data is written in the target area. The advantage of this arrangement is that it can automatically monitor whether the system time is restored to a normal state, and if the system time is restored, it is not necessary to continue writing the frame data index information into the supplementary index area. Thereby reducing the read-write burden and improving the utilization rate of the data storage space.
According to the technical scheme provided by the embodiment of the application, whether a time jump event occurs is judged in the process of writing the index information of the frame data into the target index area; the written information comprises a frame group number and index time when the frame data index information is written; if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number. By adopting the technical scheme provided by the application, the effect of still storing the frame data index information to support data retrieval during time jump can be realized.
On the basis of the above technical solutions, optionally, determining the calculation index time of the frame data index information after the time jump according to a preset calculation rule includes: acquiring frame rate parameters of frame data transmitted by a camera and acquiring the number of the frame data of each frame group; determining the time interval between the frame groups according to the frame rate parameters and the frame data quantity of the frame groups; a calculation index time of the frame data index information is determined based on a time interval between frame groups. After the occurrence of the time jump event, the frame data index information, referred to herein as the frame data index information after the time jump, needs to be written into the supplemental index area. Before that, it is necessary to determine the time information written into each frame group of the supplementary index area, since the video data acquired by the camera is composed of each frame image, and the number of frames per second is the frame rate. According to the scheme, the frame rate parameter can be acquired, the number of the frame data written in each frame group is determined, the time interval between the frame groups can be determined according to the frame rate parameter and the number of the frame data of the frame groups, and the calculation index time of the frame data index information is determined based on the time interval between the frame groups. The technical scheme has the advantages that the time information of the frame group stored in the supplementary index area can be determined by acquiring the direct parameters, and the calculated time information is written in, so that when data is retrieved, the retrieved data is ensured to be continuous in time and real and effective based on the calculated time information.
On the basis of the foregoing technical solutions, optionally, determining the calculation index time of the frame data index information based on the time interval between the frame groups includes: determining the frame data index information and the interval group number of the frame group before the time jump event; and determining the calculation index time of the frame data index information according to the time interval between the frame groups and the number of the interval groups. Wherein, since the index time of each frame group is determined by the time of the first frame data index information of the frame group, after the time jump event occurs, the time of the frame group where the current frame data is located must be wrong, and the time of the previous frame group is accurate. Therefore, after the time jump event occurs, the calculated index time of each frame group is the time interval of one frame group added to the time of the previous frame group based on the time of the previous frame group. According to the technical scheme, the time of each frame group can be accurately obtained through the setting, and a foundation is provided for the subsequent retrieval work of the frame groups and the frame data index information.
The examples of this application also provide a preferred embodiment in order to enable one skilled in the art to understand the technical solutions of this application.
When images of a monitoring point need to be stored in a centralized manner, a front-end IP encoder is connected with an Internet Protocol Storage Area Network (IPSAN) device through an iSCSI (Internet Small Computer System Interface) based on an Internet, storage resources of the IPSAN device are mounted to the local through the iSCSI Protocol, then the stored video stream is packaged through the iSCSI Protocol, and media and time index data are written into the IPSAN Storage device through a proprietary block Storage format.
Fig. 2 is a schematic diagram of a storage format of a video data block according to an embodiment of the present application. As shown in fig. 2, the main components of the block format are as follows:
super block: typically, several tens of K (e.g., 16K) bytes are used to record the version number of the block format, the camera code;
primary time index zone: the super block is followed by a primary time index area, each time index in the index area corresponds to one data unit one by one and is used for recording the time of the earliest I frame group of the data unit, so that a certain data unit can be quickly positioned based on time;
data unit and secondary time index zone: the primary time index region is followed by a series of data units for storing recorded I-frame group data. To ensure continuous writing of I-frame group data, the data unit typically amounts to several hundred mbytes (e.g., 256 mbytes). Each data unit is started with a secondary time index area, wherein each time index entry corresponds to an I frame group in a one-to-one mode and is used for recording the starting time of the I frame group, so that a certain I frame group can be quickly positioned on the basis of time. All the I frame group data in the data unit are obtained after the secondary index area;
group of I frames: one I frame group is 1 second of the surveillance video data. In the I-frame group, all video and audio packets of the I-frame group are stored.
Fig. 3 is a schematic diagram of a storage networking according to an embodiment of the present application. Fig. 4 is a schematic diagram of another storage networking provided in an embodiment of the present application. As shown in fig. 3 and 4, there are two types of block storage networking: one is that the front end IPC writes the video data to the IPSAN directly through the ISCSI protocol, which causes the video index written to the storage device to be out of order if the front end generates a time jump. Another front-end network video Camera (IP Camera, IPC) aggregates the storage stream to a Data Management server (DM) in the monitoring system, and writes the storage stream to the IPSAN through the DM. In this way, the DM unified writing mode is greatly affected by the DM time, and once the DM time changes, all videos written through the DM will send a time jump.
The data is directly stored on the bare block in a certain format, the data is recorded in an index mode, and the indexes are cyclically overwritten according to the time sequence. In order to improve the retrieval efficiency, the algorithm adopted by the retrieval is dichotomy, so that the retrieval and playback are strongly dependent on time sequentiality, once time jump occurs, the dichotomy positioning is directly inaccurate, and the retrieval result is inaccurate, and the method is provided for solving the influence of the time jump on block storage.
For example, 4mbps, gop 50, frame rate 25, then calculate that 256MB will be full in the next 10 minutes, record the first-level index, correspond one-to-one with the 256MB data, and switch to a new first-level index after 10 minutes.
The primary index is generated for each full 256MB of video data as follows.
1.2019.08.10 01:10:10;
2.2019.08.10 01:20:30;
3.2019.08.10 01:30:25;
4.2019.08.10 01:40:01;
When the data is stored to a certain time point, for example, the 5 th data block (the data block corresponding to the primary index, referred to as the primary block for short), a time jump (jump to history) occurs.
5.2019.08.09 06:00:00;
…;
M.2019.08.10 18:00:00;
N.2019.08.10 18:10:30;
Since the primary block points to a 256MB block that begins with a secondary index (pointing to the I frame group) that records the start time of the first I frame of the block, it appears that the trip point is the primary block with frame group number 5, and in fact a trip may occur within the primary block with the previous frame group number 4.
The detailed description is as follows:
first-level block with frame group number 4:
2019.08.10 01:40:01
10000.2019.08.10 01:40:01;
10001.2019.08.10 01:40:43;
10002.2019.08.10 01:40:45;
10003.2019.08.10 01:40:47;
…;
10298.2019.08.09 05:59:56;
10299.2019.08.09 05:59:58;
first-level block with frame group number 5:
2019.08.09 06:00:00;
after the time jumps, the video is inquired according to the original dichotomy, and the video is disordered and uncontrollable, or the video cannot be searched during the jumping, or the returned video is not required by the user.
Wherein, the dichotomy: the binary search method is a binary search method which completely depends on the correctness of time sequence, and once jumping occurs, the binary method fails.
Inputting a user check time period, converting the semi-video index area through a dichotomy, wherein the time period can fall on one side of the index area, converting the semi-video index area for query again by taking the middle number as a target, and positioning the index area required by video after the query is carried out, so that video data can be found through the index area.
Aiming at the problem, the method adds a new area in the data block, and records the corresponding relation between the written index and the video recording time during the time jump after the time jump (forward jump and backward jump do not affect the sequential writing and reading) is generated for the subsequent correction of the index.
The detailed implementation process is as follows:
(1) storing frame group information of a camera obtained before, wherein the frame group information comprises a frame rate and a frame interval (GOP), and calculating the time Gt of each complete frame group;
gt = GOP 1/frame rate
(2) When writing an index, finding that the time of the current time is smaller than the time corresponding to the previous index, and showing that time jump occurs:
in order to improve the index refreshing efficiency and reduce the pressure caused by repeatedly reading and writing the disk, a certain amount of data is usually written and then submitted, for example, the index area is written once in 16S video.
(3) According to the time one-way and irreversible principle, establishing a mapping relation between a frame group number and real video recording time during time hopping;
for example, if the video recording time Ti corresponding to the previous frame group number Ii is taken, the frame group number after the jump is I [ I +1], the corresponding time is Ti + Gt, and the corresponding relation I [ I +1] between the frame group number and the timestamp is established, and the corresponding time is Ti + Gt
Then, establishing a corresponding relationship between the frame group number and the secondary index time (I frame group start time), and recording an initial time point at which time jump occurs, where the following table is a secondary index and time mapping relationship table, and the specific is as follows:
secondary index and time mapping relation table
Frame group numbering Corresponding to secondary index time of video Index time of last write
I[i+1] Ti+Gt Ti+Gt
I[i+2] Ti+2*Gt Ti+2*Gt
I[i+n] Ti+n*Gt Ti+n*Gt
(4) When the index time is recovered, namely the index time of newly writing and recording is greater than the newly written index time, the new index area is not written any more;
(5) throughout this process, the original index area is still written, and the frame group numbers written in the new and old index areas are kept the same. Fig. 5 is a schematic diagram of a mapping relationship between old and new index areas according to an embodiment of the present application. As shown in fig. 5, the number of the frame group written in the new index area and the number of the frame group written in the old index area are identical, and the time of writing in the new index area is the calculated time information of each frame group.
Video retrieval:
(1) inputting the starting time and the ending time of retrieval by a user;
(2) firstly, searching a new index area, and judging whether jumping occurs according to records;
(3) taking out the frame group number and the video index time mapping relation table in the new index area;
(4) correcting the time corresponding to the old index area by using the time corresponding to the new index area according to the principle that the new and old frame group numbers are kept unchanged during time jump;
(5) and returning the video retrieval result in the time period input by the user in the old index area according to the dichotomy.
According to the technical scheme, the video index structure is updated, a block of area record is added, and the corresponding relation between the written video index and time during the time jump is recorded. And during retrieval and playback, sequentially acquiring index information of new and old index areas, sensing jump, and correcting jump time according to the unique frame group number principle, so that the video in the jump period can be correctly displayed to a user by adopting the scheme. By adopting the scheme, the problem that the video is lost or the storage is abnormal and the playback cannot be carried out due to time hopping can be fundamentally solved.
Fig. 6 is a schematic structural diagram of a time-hopped video data processing apparatus according to an embodiment of the present application. As shown in fig. 6, the time-hopping recorded data processing apparatus includes:
a time jump event determining module 610, configured to determine whether a time jump event occurs during a process of writing the frame data index information into the target index area; the written information comprises a frame group number and index time when the frame data index information is written;
a frame data index information writing management module 620, configured to write the frame data index information after time hopping into a target index area if the time hopping event determination module determines that the frame data index information is positive; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
According to the technical scheme provided by the embodiment of the application, whether a time jump event occurs is judged in the process of writing the index information of the frame data into the target index area; the written information comprises a frame group number and index time when the frame data index information is written; if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number. By adopting the technical scheme provided by the application, the effect that the frame data index information can still be stored to support data index when the time jumps can be realized.
Optionally, the time hopping event determining module is specifically configured to:
in the process of writing the frame data index information into the target index area, if the index time of the current frame group is detected to be smaller than the index time of the previous frame group, determining that a time jump event occurs; and if the index time of the current frame group is detected to be larger than the index time of the previous frame group, determining that the time jump event does not occur.
The product can execute the method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a time-hopping video data processing method, the method comprising:
judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; the written information comprises a frame group number and index time when the frame data index information is written;
if so, determining the calculation index time of the frame data index information subjected to time hopping according to a preset calculation rule, and writing the frame data index information subjected to time hopping into a preset supplementary index area when writing the frame data index information subjected to time hopping into a target index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide the program instructions to the computer for execution. The term "storage media" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the above-mentioned time-hopped video data processing operation, and may also perform related operations in the time-hopped video data processing method provided in any embodiment of the present application.
The embodiment of the application provides electronic equipment, and the time hopping video data processing device provided by the embodiment of the application can be integrated in the electronic equipment. Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 7, the present embodiment provides an electronic device 700, which includes: one or more processors 720; the storage device 710 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 720, the one or more processors 720 implement the time-hopping video recording data processing method provided in the embodiment of the present application, the method includes:
judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; the written information comprises a frame group number and index time when the frame data index information is written;
if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; and the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number.
Of course, those skilled in the art can understand that the processor 720 also implements the technical solution of the video data processing method with time hopping provided in any embodiment of the present application.
The electronic device 700 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the electronic device 700 includes a processor 720, a storage 710, an input 730, and an output 740; the number of the processors 720 in the electronic device may be one or more, and one processor 720 is taken as an example in fig. 7; the processor 720, the storage device 710, the input device 730, and the output device 740 in the electronic apparatus may be connected by a bus or other means, and are exemplified by a bus 750 in fig. 7.
The storage device 710 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and module units, such as program instructions corresponding to the time-hopping video data processing method in the embodiments of the present application.
The storage device 710 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 710 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 710 may further include memory located remotely from the processor 720, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 730 may be used to receive input numbers, character information, or voice information, and to generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 740 may include a display screen, speakers, etc.
The electronic equipment provided by the embodiment of the application can still store the frame data index information to support the data index when the time jumps.
The time-hopping video data processing device, the time-hopping video data processing medium, and the electronic device provided in the above embodiments may execute the time-hopping video data processing method provided in any of the embodiments of the present application, and have functional modules and advantageous effects corresponding to the execution of the method. For details of the video data processing method based on time hopping provided in any embodiment of the present application, reference may be made to the technical details not described in detail in the above embodiments.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. A time hopping video data processing method is characterized by comprising the following steps:
judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; the frame data index information comprises a frame group number and index time;
if so, writing the frame data index information subjected to time hopping into a target index area; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number;
the determining the calculation index time of the frame data index information after the time jump according to the preset calculation rule comprises the following steps:
acquiring frame rate parameters of frame data transmitted by a camera and acquiring the number of the frame data of each frame group;
determining the time interval between the frame groups according to the frame rate parameters and the frame data quantity of the frame groups;
a calculation index time of the frame data index information is determined based on a time interval between frame groups.
2. The method of claim 1, wherein determining whether a time jump event occurs during writing of frame data index information into the target index area comprises:
in the process of writing the frame data index information into the target index area, if the index time of the current frame group is detected to be smaller than the index time of the previous frame group, determining that a time jump event occurs; and if the index time of the current frame group is detected to be greater than the index time of the previous frame group, determining that the time hopping event does not occur.
3. The method of claim 1, wherein the time interval between groups of frames is determined using the following equation:
Gt=GOP/L;
wherein Gt is the time interval between frame groups, L is the frame rate parameter, and GOP is the frame data quantity of the frame groups.
4. The method of claim 1, wherein determining the calculated index time for the frame data index information based on the time interval between the groups of frames comprises:
determining the number of interval groups of a frame group in which frame data are positioned and a frame group before a time jump event occurs;
and determining the calculation index time of the frame data index information according to the time interval between the frame groups and the number of the interval groups.
5. The method of claim 1, further comprising:
and stopping writing the frame data index information into the supplementary index area if the index time for writing the frame data index information into the target index area is detected to be greater than the calculation index time of the frame data index information which is written into the supplementary index area most recently.
6. The method according to any one of claims 1 to 5, wherein after writing the frame group number and the calculation index time into the preset supplementary index area, the method further comprises:
in response to a frame data retrieval request, if target frame data of the retrieval request is stored in the supplementary index area, retrieval is performed with the calculated index time of the frame group stored in the supplementary index area.
7. A time-hopping video data processing apparatus, comprising:
the time jump event judging module is used for judging whether a time jump event occurs or not in the process of writing the frame data index information into the target index area; the written information comprises a frame group number and index time when the frame data index information is written;
the frame data index information writing management module is used for writing the frame data index information subjected to time hopping into a target index area if the time hopping event judgment module judges that the frame data index information is positive; determining the calculation index time of the frame data index information after time hopping according to a preset calculation rule, and writing the frame group number and the calculation index time into a preset supplementary index area; the frame data index information written in the supplementary index area is associated with the frame data index information written in the target index area according to the frame group number;
the determining the calculation index time of the frame data index information after the time jump according to the preset calculation rule comprises the following steps:
acquiring frame rate parameters of frame data transmitted by a camera and acquiring the number of the frame data of each frame group;
determining the time interval between the frame groups according to the frame rate parameters and the frame data quantity of the frame groups;
a calculation index time of the frame data index information is determined based on a time interval between frame groups.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the time-hopping video data processing method according to any one of claims 1 to 6.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the time hopping video data processing method according to any one of claims 1 to 6 when executing the computer program.
CN201910925873.6A 2019-09-27 2019-09-27 Time hopping video data processing method, device, medium and electronic equipment Active CN112579820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910925873.6A CN112579820B (en) 2019-09-27 2019-09-27 Time hopping video data processing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910925873.6A CN112579820B (en) 2019-09-27 2019-09-27 Time hopping video data processing method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112579820A CN112579820A (en) 2021-03-30
CN112579820B true CN112579820B (en) 2023-03-24

Family

ID=75110082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910925873.6A Active CN112579820B (en) 2019-09-27 2019-09-27 Time hopping video data processing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112579820B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409831B (en) * 2021-05-31 2022-12-02 广州敏视数码科技有限公司 Video covering method of vehicle-mounted video recorder based on virtual timestamp chain
CN114416407B (en) * 2022-03-29 2022-06-28 树根互联股份有限公司 Real-time data out-of-order repair system and method and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325244A (en) * 2011-08-26 2012-01-18 杭州海康威视数字技术股份有限公司 Method for rapidly positioning videos by time, video storage control device and positioning device
CN103037203A (en) * 2012-12-11 2013-04-10 浙江宇视科技有限公司 Method and device for index recovery based on block storage
JP2016225922A (en) * 2015-06-02 2016-12-28 株式会社リコー Radio communication system and method
CN106507217A (en) * 2016-10-27 2017-03-15 腾讯科技(北京)有限公司 The treating method and apparatus of the timestamp of video flowing
CN110099236A (en) * 2018-01-30 2019-08-06 杭州海康威视系统技术有限公司 Video data storage method, requesting method and storage device, request unit
CN110121071A (en) * 2018-02-05 2019-08-13 广东欧珀移动通信有限公司 Method for video coding and Related product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325244A (en) * 2011-08-26 2012-01-18 杭州海康威视数字技术股份有限公司 Method for rapidly positioning videos by time, video storage control device and positioning device
CN103037203A (en) * 2012-12-11 2013-04-10 浙江宇视科技有限公司 Method and device for index recovery based on block storage
JP2016225922A (en) * 2015-06-02 2016-12-28 株式会社リコー Radio communication system and method
CN106507217A (en) * 2016-10-27 2017-03-15 腾讯科技(北京)有限公司 The treating method and apparatus of the timestamp of video flowing
CN110099236A (en) * 2018-01-30 2019-08-06 杭州海康威视系统技术有限公司 Video data storage method, requesting method and storage device, request unit
CN110121071A (en) * 2018-02-05 2019-08-13 广东欧珀移动通信有限公司 Method for video coding and Related product

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种网络视频监控系统的专用存储方案;汤家兴等;《计算机工程》;20131215(第12期);第37-40页 *
基于时间信息的快速检索方法探究;朱耀麟等;《电子设计工程》;20131120(第22期);第190-192页 *

Also Published As

Publication number Publication date
CN112579820A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US11665378B2 (en) Establishment and use of time mapping based on interpolation using low-rate fingerprinting, to help facilitate frame-accurate content revision
US8135979B2 (en) Collecting network-level packets into a data structure in response to an abnormal condition
US9374403B2 (en) Media stream fragment request
CN112579820B (en) Time hopping video data processing method, device, medium and electronic equipment
CN111177165B (en) Method, device and equipment for detecting data consistency
CN102291256B (en) A kind of querying method of monitor data and equipment
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
CN102244758A (en) Video-recording-file-based data acquisition method and equipment
EP3800894A1 (en) Method and apparatus for detecting video playing quality
CN111787256B (en) Management method, device, medium and electronic equipment for pre-alarm video
CN107087232B (en) User real-time state detection method and system
CN112148920B (en) Data management method
US11930292B2 (en) Device state monitoring method and apparatus
US9747167B2 (en) Persistency free architecture
CN110248156B (en) Video analysis method, platform equipment, intelligent camera and intelligent monitoring system
US9870385B2 (en) Computer system, data management method, and computer
CN112201047B (en) Suspected vehicle foothold analysis method and device based on Flink framework
WO2021218626A1 (en) Data storage method and apparatus, device, and storage medium
CN113254313A (en) Monitoring index abnormality detection method and device, electronic equipment and storage medium
CN110928945B (en) Data processing method and device for database and data processing system
CN110896545A (en) Online charging roaming fault positioning method, related device and storage medium
US11860678B2 (en) Optimized sampling of resource content data for session recording under communication constraints by independently capturing agents
KR101272087B1 (en) Method and apparatus for recording location based multimedia data
CN117194111A (en) Data synchronization method and device, electronic equipment and storage medium
JP2018098667A (en) Communication equipment, statistical information collection method, and statistical information collection program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant