CN115618023B - Video retrieval method, system and device - Google Patents

Video retrieval method, system and device Download PDF

Info

Publication number
CN115618023B
CN115618023B CN202211636108.0A CN202211636108A CN115618023B CN 115618023 B CN115618023 B CN 115618023B CN 202211636108 A CN202211636108 A CN 202211636108A CN 115618023 B CN115618023 B CN 115618023B
Authority
CN
China
Prior art keywords
video
target
retrieval
time
preset
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
CN202211636108.0A
Other languages
Chinese (zh)
Other versions
CN115618023A (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.)
OP Retail Suzhou Technology Co Ltd
Original Assignee
OP Retail Suzhou Technology 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 OP Retail Suzhou Technology Co Ltd filed Critical OP Retail Suzhou Technology Co Ltd
Priority to CN202211636108.0A priority Critical patent/CN115618023B/en
Publication of CN115618023A publication Critical patent/CN115618023A/en
Application granted granted Critical
Publication of CN115618023B publication Critical patent/CN115618023B/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/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/48Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Abstract

The invention discloses a video retrieval method, a system and a device, which relate to the technical field of audio and video data retrieval. The method comprises the steps of obtaining a retrieval mark, searching in a preset index database based on the retrieval mark, determining each target storage video corresponding to the retrieval mark and a target positioning identifier thereof, positioning the target storage video based on the target positioning identifier, splicing the target storage videos to obtain a complete video corresponding to the retrieval mark. Therefore, through the establishment of the preset index database, the rapid positioning and indexing of the stored videos are reasonably and efficiently realized, the automation degree is high, and the practical application is facilitated.

Description

Video retrieval method, system and device
Technical Field
The invention relates to the technical field of audio and video data retrieval, in particular to a video retrieval method, a system and a device.
Background
At present, with the rapid development of the ethernet technology, the ethernet technology has also been widely applied to various security devices, for example, IPC (IP Camera) is evolving towards the ethernet direction, and in contrast, the used video recorder is also evolving into a network video recorder, and the network video recorder can record data shot by a network Camera, and the recording essentially refers to the storage or forwarding of audio and video data, so as to facilitate the subsequent inquiry and use of the recorded audio and video data as required.
In the prior art, under normal conditions, a large amount of audio and video data are recorded through a network video recorder every day, so how to effectively retrieve and position the recorded audio and video data so as to acquire the audio and video data required at this time is a problem to be solved urgently at present.
Disclosure of Invention
The invention aims to provide a video retrieval method, a system and a device, which reasonably and efficiently realize the quick positioning and indexing of the stored videos through the establishment of the preset index database, have high automation degree and are beneficial to practical application.
In order to solve the above technical problem, the present invention provides a video retrieval method, including:
acquiring a retrieval mark corresponding to the target range of the retrieval;
searching in a preset index database based on the retrieval mark, and determining a target positioning identifier of each target storage video corresponding to the retrieval mark, wherein the preset index database comprises a feature identifier and a positioning identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute comprises an attribute corresponding to the retrieval mark;
positioning the target storage video based on the target positioning identifier;
and splicing the target storage videos to obtain a complete video corresponding to the retrieval mark.
Preferably, the retrieval mark comprises a start time and an end time, and the preset retrieval attribute comprises a time attribute;
the pre-determining step of the feature identifier comprises the following steps:
determining a time value when the stored video is stored to a corresponding preset storage area;
taking the time value as a timestamp identifier corresponding to the time attribute;
searching in a preset index database based on the retrieval mark, and determining the positioning identifier of each target storage video corresponding to the retrieval mark, wherein the positioning identifier comprises the following steps:
searching in a preset index database based on the retrieval mark, and determining stored videos of which the timestamp identifications are in a time range formed by the starting time to the ending time as target stored videos so as to obtain positioning identifications of the target stored videos.
Preferably, the preset index database further includes a breakpoint identifier of each stored video, where the breakpoint identifier represents whether the corresponding stored video is video data obtained by re-streaming after the video is interrupted;
splicing the target storage videos, comprising the following steps:
sequencing each target storage video based on the corresponding timestamp identification;
determining a strategy based on the breakpoint identification and a preset video interval, and judging whether an interval time interval exists in the time range;
if yes, marking the video data corresponding to the interval time period in the time range as null;
and splicing the target storage videos corresponding to the rest moments except the interval time period in the time range according to the sequencing order to obtain a complete video corresponding to the time range.
Preferably, the determining a policy based on the breakpoint identifier and a preset video gap determines that an interval time period exists within the time range, including:
judging whether a time period to be evaluated exists in the time range, wherein a corresponding target storage video does not exist in the time period to be evaluated;
if the time interval to be evaluated exists, judging whether a first condition and a second condition are both established, wherein the first condition is that only one target storage video corresponding to the breakpoint identification corresponding to the first judgment reference video and the second judgment reference video is represented as video data obtained by re-streaming; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located after the time period to be evaluated; the second condition is that a preset storage area corresponding to the first judgment reference video is continuous with a preset storage area corresponding to the second judgment reference video;
and if the first condition and the second condition are both satisfied, determining the time interval to be evaluated as an interval time interval so as to judge that the interval time interval exists in the time range.
Preferably, each stored video is stored in a corresponding preset storage area, and the preset storage area includes at least one storage data block;
the positioning identification comprises a block initial offset and a block end offset corresponding to the storage data block;
positioning the target storage video based on the target positioning identifier comprises:
and positioning the target storage video based on the initial block offset and the end block offset corresponding to the target storage video.
Preferably, the stored video is a GOP and the GOP is stored in a storage submodule of the storage data block;
the positioning identifier further comprises a GOP initial offset and a GOP end offset;
positioning the target storage video based on the target positioning identifier comprises:
based on the initial block offset and the end block offset corresponding to the target storage video, positioning a storage data block where the target storage video is located;
and positioning a storage submodule of the target storage video based on the GOP initial offset and the GOP ending offset.
Preferably, the complete video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target interval duration representing that the complete video is played in a speed doubling mode is received or not;
and if so, controlling the complete video to play in a speed doubling mode of playing one frame at intervals of the target interval duration.
Preferably, the complete video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target multiplying power corresponding to the current frame sending speed is received or not;
if so, determining the product of the current framing speed and the target multiplying power as a target framing speed;
and controlling the complete video to be played at the target frame sending speed.
In order to solve the above technical problem, the present invention further provides a video retrieval system, including:
a first acquisition unit, configured to acquire a search flag corresponding to a target range of the search;
the searching unit is used for searching in a preset index database based on the retrieval mark and determining a target positioning identifier of each target storage video corresponding to the retrieval mark, wherein the preset index database comprises a feature identifier and a positioning identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute comprises an attribute corresponding to the retrieval mark;
the positioning unit is used for positioning the target storage video based on the target positioning identifier;
and the splicing unit is used for splicing the target storage videos to obtain a complete video corresponding to the retrieval mark.
In order to solve the above technical problem, the present invention further provides a video retrieval device, including:
a memory for storing a computer program;
and a processor for implementing the steps of the video retrieval method when executing the computer program.
The application provides a video retrieval method, a system and a device, wherein a preset index database is created in advance, the database comprises a characteristic identifier and a positioning identifier of each stored video, and the characteristic identifier is predetermined according to preset retrieval attributes. The method comprises the steps of obtaining a retrieval mark, wherein the preset retrieval attribute comprises an attribute corresponding to the retrieval mark, searching in a preset index database based on the retrieval mark, determining a target positioning identifier of each target storage video corresponding to the retrieval mark, positioning the target storage video based on the target positioning identifier, splicing the target storage videos to obtain a complete video corresponding to the retrieval mark. Therefore, through the establishment of the preset index database, the rapid positioning and indexing of the stored videos are reasonably and efficiently realized, the automation degree is high, and the practical application is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a video retrieval method according to the present invention;
FIG. 2 is a schematic diagram of a video retrieval system according to the present invention;
fig. 3 is a schematic structural diagram of a video retrieval device according to the present invention.
Detailed Description
The core of the invention is to provide a video retrieval method, a system and a device, through the establishment of the preset index database, the rapid positioning and indexing of the stored videos are reasonably and efficiently realized, the automation degree is high, and the practical application is facilitated.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a video retrieval method according to the present invention.
In this embodiment, in consideration of the fact that with the rapid development of the ethernet technology, various security devices and the like are evolving towards the ethernet direction, and a large amount of audio and video data is stored or forwarded every day, an effective way is needed to realize retrieval and positioning of recorded audio and video data. In order to solve the technical problems, the application provides a video retrieval method, which reasonably and efficiently realizes the quick positioning and indexing of the stored videos through the establishment of the preset index database and is beneficial to practical application.
The video retrieval method comprises the following steps:
s11: acquiring a retrieval mark corresponding to the target range of the retrieval;
specifically, the method can be matched with a Linux operating System on an Soc (System on Chip) System-on-Chip based on an ARM architecture; the method can be applied to various security devices, including but not limited to Network Video recording devices, the Network Video recording devices can be Network Video recorders, such as Network Video Recorders (NVRs), and the NVRs can work in cooperation with Video encoders or Network cameras as a store-and-forward part of a Network Video monitoring system to complete Video recording, storing and forwarding functions.
The retrieval mark is a certificate for retrieval and positioning, and a further implementation manner in the step S11 may be to input corresponding retrieval mark information on a preset human-computer interaction display interface for a user.
S12: searching in a preset index database based on the retrieval mark, and determining a target positioning identifier of each target storage video corresponding to the retrieval mark, wherein the preset index database comprises a feature identifier and a positioning identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute comprises an attribute corresponding to the retrieval mark;
specifically, for example, the method is applied to a network video recorder, the network video recorder may be connected to one or more network cameras, one camera corresponds to a transmission channel connected to the network video recorder, so as to implement video recording of the corresponding network camera through the transmission channel, and audio and video data transmitted through the transmission channel is to be stored in a corresponding preset storage area, so that the audio and video data is referred to as a stored video, and more specifically, the stored video may be a Group of Pictures Gop (audio and video frame Group), the preset retrieval attribute may be an attribute corresponding to a retrieval basis, such as a time attribute, common to a user, determined after analysis and research, and determined, and the preset retrieval attribute includes an attribute corresponding to the retrieval flag.
For each stored video, determining a corresponding feature identifier, and storing the feature identifier and a positioning identifier representing an actual storage position of the stored video into a preset index database, that is, establishing a corresponding relationship between the stored data and the feature identifier and the positioning identifier in the database, where the number of the corresponding relationship is the same as the number of the stored videos, it can be understood that each feature identifier is different and each positioning identifier is different.
Therefore, the search based on step S12 can realize the determination of the target location identifier of each target storage video, and it should be noted that the search process may be accelerated by using a B + number algorithm.
The number of target stored videos corresponding to the search flag may be one of the stored videos, or may be a plurality of stored videos, and is not particularly limited herein and is determined according to the actual setting of the search flag.
S13: positioning a target storage video based on the target positioning identifier;
s14: and splicing the target storage videos to obtain a complete video corresponding to the retrieval mark.
Specifically, the positioning identifier represents an actual storage position of the corresponding target storage video, and based on the step S13, each target storage video can be positioned to obtain audio and video data stored in a preset storage space, and based on the step S14, a complete video corresponding to the retrieval identifier can be obtained. It should be further noted that the complete video can be understood as audio/video bare data corresponding to the retrieval mark per se, and subsequently, audio/video data output in various formats can be realized according to user requirements, and streaming in the FLV format and the RTSP format can be specifically supported; the group encapsulation can also be performed according to the actual needs of users, taking video data as an example, the group encapsulation can be to assemble the complete videos in the video coding formats of H264 and H265 into the encapsulation formats such as FLV format or MP4 format.
In summary, the present application provides a video retrieval method, which reasonably and efficiently realizes fast positioning and indexing of stored videos through establishment of the preset index database, has high automation degree, and is beneficial to practical application.
On the basis of the above-described embodiment:
as a preferred embodiment, the search mark includes a start time and an end time, and the preset search attribute includes a time attribute;
the pre-determining step of the feature identification comprises the following steps:
determining a time value when the stored video is stored to a corresponding preset storage area;
taking the time value as a timestamp identifier corresponding to the time attribute;
searching in a preset index database based on the retrieval marks, and determining the positioning marks of the target storage videos corresponding to the retrieval marks, wherein the positioning marks comprise:
searching in a preset index database based on the retrieval mark, and determining the stored videos with the timestamp identifications in the time range formed by the starting time and the ending time as target stored videos to obtain the positioning identifications of the target stored videos.
In this embodiment, a specific implementation manner of determining the feature identifier and performing search based on the search flag when the search flag is the start time and the end time is given. Specifically, each stored video corresponds to a preset storage region, and the time value at which the audio/video data (i.e., the stored video) is stored in the preset storage region is used as a timestamp identifier, and more specifically, taking the stored video as a GOP as an example, the time value may be stored in the time value corresponding to the preset storage region for the first I frame of the GOP.
Searching in the preset index database based on the retrieval mark, wherein the searching mode includes but is not limited to calling a query video record interface component for searching, and the interface component can be in an HTTP interface form, so that the stored videos with the timestamp identification in the time range formed by the starting time and the ending time are determined to be target stored videos, and if the starting time is 8: 00/10/15/2000, the ending time is 10: 00/10/00/2000, the stored videos with the timestamp identification in the time range formed by the two times (8: 00/sec-10: 00/sec) are all target stored videos.
Therefore, by the method, the target storage video positioning identifier is simply and reliably determined when the time attribute is taken as the retrieval attribute, and the method is beneficial to practical application.
As a preferred embodiment, the preset index database further includes a breakpoint identifier of each stored video, where the breakpoint identifier represents whether the corresponding stored video is video data obtained by pulling the stream again after the video is interrupted;
splicing the target storage videos, comprising the following steps:
sequencing all target storage videos based on the corresponding timestamp identifications;
determining a strategy based on the breakpoint identification and a preset video interval, and judging whether an interval time interval exists in a time range;
if yes, marking the video data corresponding to the interval time period in the time range as null;
and splicing the target storage videos corresponding to the rest moments except the interval time period in the time range according to the sequencing order to obtain the complete video corresponding to the time range.
In this embodiment, it is further considered that when the network video recorder performs pull stream video recording from the network camera, there is a possibility that a video recording gap exists due to a network failure, and the video recording gap should be deducted from the time range flag. Then, the target storage videos are sorted based on their corresponding timestamp identifications, and preferably, the sorting may be performed in the order of time from far to near.
The breakpoint identifier represents whether the corresponding stored video is video data obtained by pulling the stream again after the video is interrupted, for example, if the stored video is the video data obtained by pulling the stream again after the video is interrupted, the breakpoint identifier may be marked as 1; if the video data obtained by re-streaming after the video interruption is not the video data, marking the video data as 0 for distinguishing; then, based on the breakpoint identification and the preset video interval determination policy, it is determined whether an interval time period exists in the time range, where the interval time period corresponds to the video interval, and the interval time period may be only one time or one time period including multiple times, which is not limited herein.
If yes, marking the video data corresponding to the interval time period in the time range as empty to represent that no corresponding video information exists in the interval time period, correspondingly storing target videos at the rest moments except the interval time period in the time range, and splicing the target stored videos according to the sequence to obtain a complete image corresponding to the time range, namely a real video.
It can be understood that, if the interval period does not exist, the target storage videos are directly connected seamlessly according to the sequence to realize splicing.
As a preferred embodiment, determining that there is an interval period within a time range based on a breakpoint identifier and a preset recording gap determination policy includes:
judging whether a time period to be evaluated exists in the time range or not, wherein a corresponding target storage video does not exist in the time period to be evaluated;
if the time interval to be evaluated exists, judging whether a first condition and a second condition are both established, wherein the first condition is that only one target storage video corresponding to the breakpoint identification corresponding to the first judgment reference video and the second judgment reference video is represented as video data obtained by pulling the stream again; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification after the time period to be evaluated; the second condition is that a preset storage area corresponding to the first judgment reference video is continuous with a preset storage area corresponding to the second judgment reference video;
and if the first condition and the second condition are both satisfied, determining the time interval to be evaluated as an interval time interval so as to judge that the interval time interval exists in the time range.
In this embodiment, a specific implementation manner for determining that a recording gap (i.e., an interval period) exists within a time range is provided. Specifically, whether the time period to be evaluated exists in the time range is judged, and the step can be further refined into judging whether the time period to be evaluated exists according to a preset video stream pulling interval, wherein the preset video stream pulling interval represents that if the condition of video interruption does not exist, audio and video data are transmitted at intervals of the preset video stream pulling interval, and the audio and video data are stored into a corresponding preset storage area and are called as stored videos.
If a time interval to be evaluated exists, whether the first condition and the second condition are both established or not is judged, specifically, in order to utilize a storage space to the maximum extent, the storage of audio and video data is continuous, which means that the audio and video data received last time before the interruption of the video recording and the audio and video data received first time after the recovery of the video recording are continuously stored in the storage space, namely the next offset after the offset of the audio and video data received last time is the audio and video data received first time, and by combining the design of the breakpoint identification in the application, whether the time interval to be evaluated is the time interval or not can be simply and accurately determined. It should be further noted that the time period to be evaluated may be only one time in nature, or may be one time period including multiple times, and is not particularly limited herein; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to a timestamp identifier before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to a timestamp identifier after the time period to be evaluated; it can be understood that if both the first condition and the second condition are not satisfied, which indicates that the time period to be evaluated is not the interval time period, the interval time period does not exist in the time range, and the splicing is directly performed.
As an example of the above embodiment, assuming that the preset video streaming interval is 5 seconds, the start time is 10/15/2000/8/00/second, and the end time is 10/15/2000/10/00/10/00/second, each target stored video corresponding to the above time range is searched and obtained. Assuming that a corresponding target storage video exists at a time stamp mark of 8: 10 seconds, a corresponding target storage video exists at 8: 10: 15 seconds, a corresponding target storage video exists at 8: 10: 25 seconds, a corresponding target storage video exists at 8: 10: 30 seconds, a corresponding target storage video also exists at 8: 10: 20 seconds but the corresponding target storage video is not searched, at this time, the 8: 10: 20 seconds are used as a time period to be evaluated in a time form, the time stamp mark which is closest to the time period to be evaluated and is positioned before the time period to be evaluated is 8: 10: 15 seconds, and the target storage video corresponding to 8: 10: 15 seconds is a first judgment reference video; the timestamp identification closest to the time period to be evaluated and located after the time period to be evaluated is 8 o ' clock 10 min 25 sec, the target stored video corresponding to 8 o ' clock 10 min 25 sec is the second judgment reference video, if the breakpoint identification corresponding to the first judgment reference video is judged to be 0 and the breakpoint identification corresponding to the second judgment reference video is judged to be 1 at this time, and the preset storage area corresponding to the first judgment reference video and the second judgment reference video is continuous, the 8 o ' clock 10 min 20 sec can be judged to be the interval time period in the time form, the video data corresponding to 8 o ' clock 10 min 20 sec is marked to be empty, and the target stored video corresponding to 8 o ' clock 10 min 10 sec, the target stored video corresponding to 8 o ' clock 10 min 15 sec and the target stored video corresponding to 8 o ' clock 10 min 25 sec are spliced by combining with the sequencing of the timestamp identifications, so that the complete video corresponding to the time range can be obtained. It can be understood that when the complete video is displayed, the video corresponding to the lack interval time interval can be prompted only in a text form, so as to ensure the smooth playing of the complete video; of course, a blank space may also be displayed when the interval period is reached, so as to be used as a prompt, which is not particularly limited, and is determined according to actual requirements.
As a preferred embodiment, each stored video is stored in a corresponding preset storage area, and the preset storage area includes at least one storage data block;
the positioning identifier comprises a block initial offset and a block end offset corresponding to the storage data block;
based on the target location sign location target storage video, including:
and positioning the target storage video based on the initial block offset and the end block offset corresponding to the target storage video.
In this embodiment, for example, when the method is applied to a network video recording device, the preset storage area includes at least one storage data block, and for accurate positioning, the positioning identifier includes a block initial offset and a block end offset corresponding to the storage data block, so as to position a target storage video accordingly, thereby implementing block-crossing search even if different audio/video data is stored in multiple storage data blocks, and quickly positioning a query result desired by a user.
It should be noted that the size of the hard disk is not limited, and includes but is not limited to a TB-level hard disk, so as to implement a TB-level fast index positioning, and the TB-level fast index positioning may be set specifically according to actual requirements.
It should be further noted that each storage data block may also be numbered to obtain a block ID, the preset index database may also include the block ID of each stored video, and certainly, may also number the hard disk to which the storage data block belongs to obtain a hard disk ID, and the preset index database may also include the hard disk ID of each stored video, which is not particularly limited herein, and may be set according to actual needs.
As a preferred embodiment, the stored video is GOP and the GOP is stored in a storage sub-module storing data blocks;
the positioning identifier also comprises a GOP initial offset and a GOP end offset;
based on the target location sign location target storage video, including:
based on the initial block offset and the end block offset corresponding to the target storage video, positioning a storage data block where the target storage video is located;
and positioning a storage submodule of the target storage video based on the GOP initial offset and the GOP end offset.
In this embodiment, further considering that the stored video may be a GOP, that is, the GOP is used as a unit storage frame for storage, and a storage space corresponding to the GOP is very small, so that the GOP is specifically stored in one storage sub-module in the storage data block, the positioning identifier further includes a GOP initial offset and a GOP end offset, and then, based on the block initial offset and the block end offset, the position of the storage data block where the target stored video is located is positioned, and then, according to the GOP initial offset and the GOP end offset, the actual storage position of the GOP in the storage data block is positioned, that is, the storage sub-module is positioned out to take the audio and video data stored therein.
As a preferred embodiment, a full video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target interval duration representing that the complete video is played in a double-speed mode is received or not;
if yes, controlling the complete video to play in a speed doubling mode of playing one frame at intervals of target interval duration.
In this embodiment, it is further considered that after the video is retrieved and positioned, diversified user-defined playing can be realized according to the requirements of the user, and specifically, when it is determined that the target interval duration is received (the transmission mode of the target interval duration may be input by the user on a preset manual interaction interface), it indicates that the user has a requirement for multiple-speed playing, and the complete video is controlled to play in a multiple-speed mode of playing one frame every target interval duration. The target interval duration is determined according to actual requirements. For example, assuming that the target interval duration is 0.5 seconds, if the target interval duration is not received and one frame is played every 1 second according to the original playing plan, if 10 frames are totally recorded, 10 seconds are required to be played completely, and when an instruction for playing according to the 0.5 seconds is received, one frame is played every 0.5 seconds, and the whole complete video only needs 5 seconds to be played completely, thereby realizing double-speed playing.
As a preferred embodiment, a full video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target multiplying power corresponding to the current frame sending speed is received or not;
if so, determining the product of the current framing speed and the target multiplying power as the target framing speed;
and controlling the complete video to be played at the target frame sending speed.
In this embodiment, another implementation manner for implementing double-speed playing is provided, that is, for a situation where a current framing speed exists, a product of the current framing speed and a target magnification is determined as a target framing speed according to a received target magnification, so that a complete video is controlled to be played at the target framing speed, double-speed playing is simply and reliably implemented, and diversified user-defined playing requirements of a user are met.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a video retrieval system according to the present invention.
The video retrieval system includes:
a first acquiring unit 21, configured to acquire a retrieval flag corresponding to a target range of the retrieval;
the searching unit 22 is configured to search in a preset index database based on the retrieval flag, and determine a target location identifier of each target storage video corresponding to the retrieval flag, where the preset index database includes a feature identifier and a location identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute includes an attribute corresponding to the retrieval flag;
a positioning unit 23, configured to position the target storage video based on the target positioning identifier;
and the splicing unit 24 is used for splicing the target storage videos to obtain a complete video corresponding to the retrieval mark.
For the introduction of the video retrieval system provided in the present invention, please refer to the above-mentioned embodiment of the video retrieval method, which is not described herein again.
As a preferred embodiment, the search flag includes a start time and an end time, and the preset search attribute includes a time attribute; the video retrieval system comprises an identification determination unit for determining the characteristic identification in advance;
the identification determination unit includes:
the time determining unit is used for determining a time value when the stored video is stored to the corresponding preset storage area;
a timestamp identification determining unit, configured to use the time value as a timestamp identification corresponding to the time attribute;
the searching unit 22 is specifically configured to search in a preset index database based on the retrieval flag, and determine that the stored videos whose timestamp identifies in a time range formed from the start time to the end time are target stored videos, so as to obtain a location identifier of each target stored video.
As a preferred embodiment, the preset index database further includes a breakpoint identifier of each stored video, where the breakpoint identifier represents whether the corresponding stored video is video data obtained by pulling a stream again after the video is interrupted;
the splicing unit 24 includes:
the sequencing unit is used for sequencing all the target storage videos based on the corresponding timestamp identifications;
a first judging unit, configured to determine a policy based on the breakpoint identifier and a preset video gap, and judge whether an interval period exists in the time range; if yes, triggering a marking unit;
the marking unit is used for marking the video data corresponding to the interval time period in the time range as null;
and the planning and splicing unit is used for splicing all target storage videos corresponding to the remaining moments in the time range except the interval time period according to the sequencing order to obtain a complete video corresponding to the time range.
As a preferred embodiment, the first judging unit includes:
the second judging unit is used for judging whether a time period to be evaluated exists in the time range or not, and a corresponding target storage video does not exist in the time period to be evaluated; if the time interval to be evaluated exists, triggering a third judgment unit;
the third judging unit is configured to judge whether a first condition and a second condition are both satisfied, where the first condition is that only one breakpoint identifier corresponding to the first criterion video and the second criterion video indicates that the corresponding target storage video is video data obtained by re-streaming; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located after the time period to be evaluated; the second condition is that a preset storage area corresponding to the first judgment reference video is continuous with a preset storage area corresponding to the second judgment reference video; if the first condition and the second condition are both satisfied, triggering a first determining unit;
the first determining unit is configured to determine that the time period to be evaluated is an interval time period, so as to determine that the interval time period exists in the time range.
As a preferred embodiment, each of the stored videos is stored in a corresponding preset storage area, where the preset storage area includes at least one storage data block;
the positioning identification comprises a block initial offset and a block end offset corresponding to the storage data block;
the positioning unit 23 is specifically configured to position the target storage video based on the block initial offset and the block end offset corresponding to the target storage video.
In a preferred embodiment, the stored video is a GOP and the GOP is stored in a storage sub-module of the storage data block;
the positioning identifier further comprises a GOP initial offset and a GOP end offset;
the positioning unit 23 specifically includes:
a first positioning subunit, configured to position, based on the initial block offset and the end block offset corresponding to the target storage video, a storage data block in which the target storage video is located;
and the second positioning subunit is used for positioning the storage submodule of the target storage video based on the GOP initial offset and the GOP ending offset.
In a preferred embodiment, the complete video recording comprises a plurality of frames;
the video retrieval system further comprises:
a fourth judging unit, configured to judge whether a target interval duration representing that the complete video is played in the multiple speed mode is received after the splicing unit 24; if yes, triggering a first speed-multiplying play control unit;
the first speed-doubling playing control unit is used for controlling the complete video to play in a speed-doubling mode of playing one frame at intervals of the target interval duration.
In a preferred embodiment, the complete video recording comprises a plurality of frames;
the video retrieval system further comprises:
a fifth judging unit, configured to judge whether a target magnification corresponding to the current framing speed is received after the splicing unit 24; if yes, triggering a second double-speed playing control unit;
and the second double-speed playing control unit is used for controlling the complete video to be played at the target frame sending speed.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a video retrieval device according to the present invention.
The video retrieval device includes:
a memory 31 for storing a computer program;
a processor 32, configured to implement the steps of the video search method as described above when executing the computer program.
For the introduction of the video search device provided in the present invention, please refer to the above-mentioned embodiment of the video search method, which is not described herein again.
It should be noted that the video retrieval device includes, but is not limited to, a network video recorder.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention.

Claims (8)

1. A video retrieval method, comprising:
acquiring a retrieval mark corresponding to the target range of the retrieval;
searching in a preset index database based on the retrieval mark, and determining a target positioning identifier of each target storage video corresponding to the retrieval mark, wherein the preset index database comprises a feature identifier and a positioning identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute comprises an attribute corresponding to the retrieval mark;
positioning the target storage video based on the target positioning identifier;
splicing the target storage videos to obtain a complete video corresponding to the retrieval mark;
the retrieval mark comprises a starting time and an ending time; the preset index database also comprises breakpoint identifications of the stored videos, and the breakpoint identifications represent video data obtained by re-streaming the corresponding stored videos after the videos are interrupted;
splicing the target storage videos, comprising the following steps:
sequencing each target storage video based on the corresponding timestamp identification;
determining a strategy based on the breakpoint identification and a preset video interval, and judging whether an interval time interval exists in a time range, wherein the time range is a time range formed by the starting time and the ending time;
if yes, marking the video data corresponding to the interval time period in the time range as null;
splicing all target storage videos corresponding to the remaining moments except the interval time period in the time range according to the sequencing order to obtain a complete video corresponding to the time range;
based on the breakpoint identification and the preset video interval determination strategy, judging that interval time intervals exist in the time range, including:
judging whether a time period to be evaluated exists in the time range, wherein a corresponding target storage video does not exist in the time period to be evaluated;
if the time period to be evaluated exists, judging whether a first condition and a second condition are both established, wherein the first condition is that only one target storage video corresponding to the breakpoint identification corresponding to the first judgment reference video and the second judgment reference video is represented as video data obtained by pulling the stream again; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located after the time period to be evaluated; the second condition is that a preset storage area corresponding to the first judgment reference video is continuous with a preset storage area corresponding to the second judgment reference video;
and if the first condition and the second condition are both satisfied, determining the time interval to be evaluated as an interval time interval so as to judge that the interval time interval exists in the time range.
2. The video recording retrieval method of claim 1, wherein the preset retrieval attribute includes a time attribute;
the pre-determining step of the feature identifier comprises the following steps:
determining a time value when the stored video is stored to a corresponding preset storage area;
taking the time value as a timestamp identifier corresponding to the time attribute;
searching in a preset index database based on the retrieval mark, and determining the positioning identifier of each target storage video corresponding to the retrieval mark, wherein the positioning identifier comprises the following steps:
searching in a preset index database based on the retrieval mark, and determining stored videos of which the timestamp identifications are in a time range formed by the starting time to the ending time as target stored videos so as to obtain positioning identifications of the target stored videos.
3. The video retrieval method of claim 1, wherein each of the stored videos is stored in a corresponding preset storage area, the preset storage area including at least one storage data block;
the positioning identifier comprises a block initial offset and a block end offset corresponding to the storage data block;
positioning the target storage video based on the target positioning identifier comprises:
and positioning the target storage video based on the initial block offset and the end block offset corresponding to the target storage video.
4. The video recording retrieval method of claim 3, wherein the stored video is a GOP and the GOP is stored in a storage sub-module of the storage data block;
the positioning identifier further comprises a GOP initial offset and a GOP end offset;
positioning the target storage video based on the target positioning identifier comprises:
based on the initial block offset and the end block offset corresponding to the target storage video, positioning a storage data block where the target storage video is located;
and positioning a storage submodule of the target storage video based on the GOP initial offset and the GOP ending offset.
5. The video retrieval method of any of claims 1 to 4, wherein the complete video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target interval duration representing that the complete video is played in a speed doubling mode is received or not;
and if so, controlling the complete video to play in a speed doubling mode of playing one frame at intervals of the target interval duration.
6. The video retrieval method of any of claims 1 to 4, wherein the complete video includes a plurality of frames;
after obtaining the complete video corresponding to the search mark, the method further comprises:
judging whether a target multiplying power corresponding to the current frame sending speed is received or not;
if so, determining the product of the current framing speed and the target multiplying power as a target framing speed;
and controlling the complete video to be played at the target frame sending speed.
7. A video retrieval system, comprising:
a first acquisition unit, configured to acquire a search flag corresponding to a target range of the search;
the searching unit is used for searching in a preset index database based on the retrieval mark and determining a target positioning identifier of each target storage video corresponding to the retrieval mark, wherein the preset index database comprises a feature identifier and a positioning identifier of each stored video, the feature identifier is predetermined according to a preset retrieval attribute, and the preset retrieval attribute comprises an attribute corresponding to the retrieval mark;
the positioning unit is used for positioning the target storage video based on the target positioning identifier;
the splicing unit is used for splicing the target storage videos to obtain a complete video corresponding to the retrieval mark;
the retrieval mark comprises a starting time and an ending time; the preset index database also comprises breakpoint identifications of the stored videos, and the breakpoint identifications represent video data obtained by pulling the corresponding stored videos again after the videos are interrupted;
the splicing unit comprises:
the sequencing unit is used for sequencing all the target storage videos based on the corresponding timestamp identifications;
a first judging unit, configured to determine a policy based on the breakpoint identifier and a preset video gap, and judge whether an interval time period exists within a time range, where the time range is a time range formed from the start time to the end time; if yes, triggering a marking unit;
the marking unit is used for marking that the video data corresponding to the interval time period in the time range is empty;
the planning and splicing unit is used for splicing all target storage videos corresponding to the remaining moments in the time range except the interval time period according to the sequencing order to obtain a complete video corresponding to the time range;
the first judgment unit includes:
the second judging unit is used for judging whether a time period to be evaluated exists in the time range or not, and a corresponding target storage video does not exist in the time period to be evaluated; if the time period to be evaluated exists, triggering a third judgment unit;
the third judging unit is configured to judge whether a first condition and a second condition are both satisfied, where the first condition is that only one breakpoint identifier corresponding to the first criterion video and the second criterion video indicates that the corresponding target storage video is video data obtained by re-streaming; the first judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located before the time period to be evaluated, and the second judgment reference video is a target storage video which is closest to the time period to be evaluated and is corresponding to the timestamp identification located after the time period to be evaluated; the second condition is that a preset storage area corresponding to the first judgment reference video is continuous with a preset storage area corresponding to the second judgment reference video; if the first condition and the second condition are both satisfied, triggering a first determining unit;
the first determining unit is configured to determine that the time period to be evaluated is an interval time period, so as to determine that the interval time period exists in the time range.
8. A video retrieval apparatus, comprising:
a memory for storing a computer program;
processor for implementing the steps of the video recording retrieval method as claimed in any one of claims 1 to 6 when executing said computer program.
CN202211636108.0A 2022-12-20 2022-12-20 Video retrieval method, system and device Active CN115618023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211636108.0A CN115618023B (en) 2022-12-20 2022-12-20 Video retrieval method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211636108.0A CN115618023B (en) 2022-12-20 2022-12-20 Video retrieval method, system and device

Publications (2)

Publication Number Publication Date
CN115618023A CN115618023A (en) 2023-01-17
CN115618023B true CN115618023B (en) 2023-03-10

Family

ID=84880206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211636108.0A Active CN115618023B (en) 2022-12-20 2022-12-20 Video retrieval method, system and device

Country Status (1)

Country Link
CN (1) CN115618023B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428481B (en) * 2013-08-29 2016-08-31 天津市天安怡和信息技术有限公司 A kind of method retrieving the complete video record of video camera
CN109189992A (en) * 2018-09-27 2019-01-11 北京邮电大学 A kind of video time search method in cloud monitoring system
CN113596372A (en) * 2021-08-02 2021-11-02 海信电子科技(深圳)有限公司 Video file generation method and display device

Also Published As

Publication number Publication date
CN115618023A (en) 2023-01-17

Similar Documents

Publication Publication Date Title
CN110024412B (en) Video live broadcast method, device and system
US20210134329A1 (en) System and method for event data collection and video alignment
US8515241B2 (en) Real-time video editing
US20170358321A1 (en) Methods and systems for altering video clip objects
CN102938854A (en) Method and apparatus for use in tracking playback of media streams while in stand-by mode
KR20060132595A (en) Storage system for retaining identification data to allow retrieval of media content
CN113315996B (en) Method and device for controlling video playing and electronic equipment
TW201511539A (en) Method and apparatus for processing motion video
CN112565717B (en) Video structuring method, related device, system and storage medium
JP4576133B2 (en) Network conference system, conference terminal and conference server
CN115618023B (en) Video retrieval method, system and device
CN103780916B (en) Advertisement in digital television intelligent identifying system
JP4698597B2 (en) Playback apparatus and method for providing function based on event information retrieved from playlist
CN116132630A (en) Video processing method, device, equipment and storage medium
CN112437270B (en) Monitoring video playing method and device and readable storage medium
CN112511904B (en) Video playing progress control method, device, equipment and storage medium
CN112769645B (en) Terminal testing method and device, terminal equipment and storage medium
EP1777959A1 (en) System and method for capturing audio/video material
CN112633087A (en) Automatic journaling method and device based on picture analysis for IBC system
CN112040294A (en) Video playing system based on cloud computing and working method thereof
US7952638B2 (en) Information processing apparatus, information processing method, and computer readable storage medium for acquiring state information from a photographing apparatus
JP2008048113A (en) Dynamic image data distribution system, dynamic image data distribution method, dynamic image data providing method, dynamic image data distribution program, dynamic image data providing program, and computer-readable recording medium recorded with these programs
CN107124646B (en) Mobile intelligent terminal video recording system and method thereof
US11922977B2 (en) Method of real time marking of a media recording and system therefor
KR101716109B1 (en) Method for time synchronization of a plurality of images and system displaying multi-images

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