CN113596582A - Video preview method and device and electronic equipment - Google Patents

Video preview method and device and electronic equipment Download PDF

Info

Publication number
CN113596582A
CN113596582A CN202110891495.1A CN202110891495A CN113596582A CN 113596582 A CN113596582 A CN 113596582A CN 202110891495 A CN202110891495 A CN 202110891495A CN 113596582 A CN113596582 A CN 113596582A
Authority
CN
China
Prior art keywords
video
target
video data
index
preview
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.)
Pending
Application number
CN202110891495.1A
Other languages
Chinese (zh)
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.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN202110891495.1A priority Critical patent/CN113596582A/en
Publication of CN113596582A publication Critical patent/CN113596582A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

The embodiment of the invention provides a video preview method, a video preview device and electronic equipment. Wherein the method comprises the following steps: receiving an on-demand request sent aiming at a target monitoring video, wherein a video index corresponding to the video data is generated aiming at each video data in the target monitoring video in advance, and the video index is used for representing the shooting time of the corresponding video data; acquiring a video index corresponding to each video data in the target monitoring video; determining a target time period in which a target event is expected to occur; determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index; acquiring video data corresponding to the target video index according to the target video index, and using the video data as target video data; and extracting a preview picture from the target video data and displaying the preview picture. The system resource consumed by video preview can be effectively reduced.

Description

Video preview method and device and electronic equipment
Technical Field
The present invention relates to the field of streaming video technologies, and in particular, to a video preview method, an apparatus, and an electronic device.
Background
In some application scenarios, a user may only wish to view a particular segment of a video, for example, a user may only wish to view a certain episode related while viewing a movie work. In order to view the clip, the user needs to quickly view the video content in a fast forward and/or fast backward manner, so as to locate the clip to be viewed in the video, which is cumbersome to operate.
In the related art, in order to help a user to quickly locate a desired clip, a video preview may be provided for the user when the user searches for the desired clip. When the user fast forwards and/or fast backwards, according to the time stamp of the currently played video frame, the preview images of a plurality of key video frames near the time stamp are displayed for the user to preview, so that the user can conveniently and quickly find the segment which the user wants to watch.
However, in the security neighborhood, the shot surveillance video is often a video in a long period of time, for example, a video in a day or even a plurality of days, and the user often has a definite purpose when viewing the surveillance video, so the user often only has an interest in a video clip in a short period of time, if a thumbnail is generated by selecting a key video frame at preset intervals, a large number of preview images need to be generated for the surveillance video, and most of the preview images cannot help the user to locate the interested clip. And certain system resources are consumed for generating and storing the preview image, so that the scheme can cause serious system resource waste.
Disclosure of Invention
The embodiment of the invention aims to provide a video preview method so as to reduce system resources consumed by video preview. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a video preview method is provided, where the method includes:
receiving an on-demand request sent aiming at a target monitoring video, wherein a video index corresponding to the video data is generated aiming at each video data in the target monitoring video in advance, and the video index is used for representing the shooting time of the corresponding video data;
acquiring a video index corresponding to each video data in the target monitoring video;
determining a target time period in which a target event is expected to occur;
determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index;
acquiring video data corresponding to the target video index according to the target video index, and using the video data as target video data;
and extracting a preview picture from the target video data and displaying the preview picture.
In one possible embodiment, after the extracting and presenting the preview picture from the target video data, the method further comprises:
determining whether the preview picture contains a target picture with the target event;
if not, returning to the step of determining the target time period in which the target event is expected to occur.
In a possible embodiment, the method further comprises:
if so, determining a timestamp corresponding to the target picture;
and starting to play the target monitoring video from the progress represented by the time stamp.
In a possible embodiment, each video data in the target surveillance video is a group of pictures, GOP, in the target surveillance video;
acquiring video data corresponding to the target video index according to the target video index, wherein the acquiring of the video data as the target video data comprises the following steps:
acquiring a GOP corresponding to the target video index according to the target video index, and taking the GOP as a target GOP;
the extracting of the preview picture from the target video data includes:
all the images in each target GOP are extracted as preview pictures.
In a possible embodiment, the method further comprises:
receiving configuration information for indicating a target decoding mode;
the extracting a preview picture from the target video data and displaying the preview picture includes:
decoding the target video data according to the target decoding mode to obtain a preview picture;
and displaying the preview picture.
In a possible embodiment, the video index of the target surveillance video is generated in advance by the device for storing the target surveillance video when the target surveillance video is stored.
The obtaining of the video index corresponding to each video data in the surveillance video includes:
and acquiring a video index corresponding to each video data in the monitoring video from the equipment for storing the target monitoring video.
In a second aspect of the embodiments of the present invention, there is provided a video preview apparatus, including:
the video-on-demand request acquisition module is used for receiving a video-on-demand request sent by aiming at a target monitoring video, wherein a video index corresponding to the video data is generated in advance aiming at each video data in the target monitoring video, and the video index is used for indicating the shooting time of the corresponding video data;
the video index acquisition module is used for acquiring a video index corresponding to each video data in the target monitoring video;
the target time period estimation module is used for determining a target time period in which a target event is expected to occur;
the video index screening module is used for determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index;
the video data screening module is used for acquiring video data corresponding to the target video index according to the target video index and taking the video data as target video data;
and the picture display module is used for extracting a preview picture from the target video data and displaying the preview picture.
In a possible embodiment, the apparatus further includes an event detection module, configured to determine whether a target picture in which the target event occurs is included in the preview picture;
if not, driving the target time period estimation module to execute the step of determining the target time period in which the target event is expected to occur.
In a possible embodiment, the apparatus further includes a video playing module, configured to determine, if yes, a timestamp corresponding to the target picture;
and starting to play the target monitoring video from the progress represented by the time stamp.
In a possible embodiment, each video data in the target surveillance video is a group of pictures, GOP, in the target surveillance video;
the video data screening module acquires video data corresponding to the target video index according to the target video index, and the video data screening module is used as target video data and comprises the following steps:
acquiring a GOP corresponding to the target video index according to the target video index, and taking the GOP as a target GOP;
the extracting of the preview picture from the target video data includes:
all the images in each target GOP are extracted as preview pictures.
In a possible embodiment, the apparatus further comprises:
the device comprises a configuration information acquisition module, a decoding module and a decoding module, wherein the configuration information acquisition module is used for receiving configuration information used for representing a target decoding mode;
the picture display module displays preview pictures for representing the target video data, and comprises:
decoding the target video data according to the target decoding mode to obtain a preview picture;
and displaying the preview picture.
In a possible embodiment, the video index of the target surveillance video is generated in advance by the device for storing the target surveillance video when storing the target surveillance video;
the video index obtaining module obtains a video index corresponding to each video data in the surveillance video, and the method comprises the following steps:
and acquiring a video index corresponding to each video data in the monitoring video from the equipment for storing the target monitoring video.
In a third aspect of embodiments of the present invention, there is provided an electronic device, including:
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out any of the above-mentioned method steps.
The embodiment of the invention has the following beneficial effects:
the video previewing method, the video previewing device and the electronic equipment provided by the embodiment of the invention can screen target video data from each video data in a target monitoring video according to the pre-stored video index and the determined target time period, since the target time period is a time period in which the target event is expected to occur, it can be considered that the expected target video data is recorded with the related information of the target event, that is, the preview picture extracted from the target video data can theoretically help the user locate the video clip in which the target event occurs from the surveillance video, in addition, the scheme does not need to pre-extract and store the thumbnail aiming at the whole target monitoring video, only needs to pre-generate and store the video index of each video data, the system resources consumed by extracting and storing the video index are often much smaller than the system resources consumed by extracting and storing the preview picture. Therefore, the consumed system resources can be reduced while the user is helped to quickly locate the video segment in the monitoring video which is interesting to the user.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art 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 that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a video preview method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a video preview method according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a video preview method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video previewing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
In order to more clearly describe the video preview method provided by the embodiment of the present invention, an exemplary description will be given below of one possible application scenario of the video preview method provided by the embodiment of the present invention, it should be understood that the following example is only one possible application scenario of the video preview method provided by the embodiment of the present invention, and in other possible embodiments, the video preview method provided by the embodiment of the present invention may also be applied to other possible application scenarios, and the following example does not limit this.
In order to manage vehicles on the road, a user may monitor a specific road segment by using a camera, so as to capture a monitoring Video of the road segment, and store the captured monitoring Video in a storage device, where the storage device may be any electronic device with a storage capability, including but not limited to a server, a Network Video Recorder (NVR), a Digital Video Recorder (DVR), and the like.
The user can browse the monitoring videos stored in the storage device in a remote access or local access mode to know various events occurring on the road section, so that the vehicle can be effectively managed. For example, in order to determine the movement track of a specific vehicle, the user needs to determine the time when the specific vehicle passes through the road segment, and then the user may browse the surveillance video stored in the storage device, find the video segment that appears in the specific vehicle, and determine the time when the specific vehicle passes through the road segment according to the recording time of the video segment.
However, on one hand, the duration of the surveillance video is often long, for example, the duration of one surveillance video may reach several hours, one day or even several days, and on the other hand, the duration of the video clip appearing in the specific vehicle is often short, for example, the video clip may only be minutes or even seconds, so that it is difficult for the user to find the video clip appearing in the specific vehicle from the surveillance video.
In the related art, a key video frame can be selected from a surveillance video at preset intervals, a thumbnail of the key video frame is extracted to serve as a preview, and a user can quickly determine the position of a video clip of a specific vehicle in the surveillance video by browsing the preview.
However, if the preset duration is set to be short, a large number of preview images need to be extracted and stored due to the long duration of the monitoring video, and certain system resources are consumed for extracting and storing the preview images, and most of the extracted preview images cannot help the user locate the video clips appearing in a specific vehicle, so that when the preset duration is set to be short, serious waste of system resources is caused.
If the preset time length is set to be longer, the video clip appearing in the specific vehicle is possibly positioned between the two extracted adjacent key video frames due to the fact that the video clip appearing in the specific vehicle is shorter, and therefore the user cannot position the video clip appearing in the specific vehicle in the monitoring video according to the extracted preview image.
Based on this, an embodiment of the present invention provides a video preview method, which can be applied to any electronic device with a video preview function, and the method may refer to fig. 1, where fig. 1 shows the video preview method provided in the embodiment of the present invention, and the video preview method provided in the embodiment of the present invention is applied to a client, and the method may include:
s101, receiving an on-demand request sent by aiming at a target monitoring video, wherein a video index corresponding to the video data is generated in advance aiming at each video data in the target monitoring video, and the video index is used for indicating the shooting time of the corresponding video data.
S102, video indexes corresponding to each video data in the target monitoring video are obtained.
S103, determining a target time period in which a target event is expected to occur.
And S104, determining the video index of which the represented shooting time belongs to the target time period from all the acquired video indexes as a target video index.
And S105, acquiring video data corresponding to the target video index as target video data according to the target video index.
And S106, extracting the preview picture from the target video data and displaying the preview picture.
By selecting the embodiment, the target video data can be screened from each video data in the target surveillance video according to the pre-stored video index and the determined target time period, and the target time period is a time period in which the target event is expected to occur, so that the target video data in the expectation can be considered to record the relevant information of the target event, that is, a preview picture extracted from the target video data can theoretically help a user to locate a video clip in which the target event occurs from the surveillance video. Therefore, the consumed system resources can be reduced while the user is helped to quickly locate the video segment in the monitoring video which is interesting to the user.
In S101, the target monitoring video is a video requested by the on-demand request, and the on-demand request may be generated by different services according to different actual requirements.
And according to different application scenes, the target monitoring video can be a complete video or a video clip. For example, assuming that a complete surveillance video is a video of a day, the target surveillance video may be the video of the day, or may be the video during a certain time period of the day, such as the video from 8 am to 1 pm of the day.
Each video data is a part of the target surveillance video, and the data amount of each video data may be different according to the actual demand, for example, in one possible embodiment, each video data may be formed by data of video frames in the target surveillance video within a certain time duration, which may be 1 second, 2 seconds, 10 seconds, 1 minute, and the like. In another possible embodiment, each video data is a Group Of Pictures (GOP) in the surveillance video.
The shooting time indicated by the video index is the time for shooting the video data corresponding to the video index, and for example, if a video data is shot in 13:00:00-13:00:01 of 1/2000, that is, a picture of a monitoring scene in 13:00:00-13:00:01 of 1/2000 recorded by a video frame included in the video data, the shooting time indicated by the time index corresponding to the video data is 13:00:00-13:00:01 of 1/2000.
The execution subject and time for generating the video index may be different according to different application scenarios, and may be generated by a storage device for storing the target surveillance video from any time after the target surveillance video is stored, or may be generated by other electronic devices besides the storage device, which have the capability of generating the video index.
The correspondence between the video index and the video data may be a one-to-one correspondence, in one possible embodiment, the video index may be represented in the form of a timestamp, in other possible embodiments, the video index may also be represented in other forms besides a timestamp, which is not limited in this embodiment.
It can be understood that compared with the preview image, the system resource occupied by storing the video index is less, so even if the video index is generated in advance when the target surveillance video is stored, the system resource occupied by storing the video index is still less, and because the video index is established in advance, the video index does not need to be established in the video previewing process, and the efficiency of video previewing can be effectively improved.
In S102, the obtained video index is a video index corresponding to each of all video data in the target surveillance video, and for example, assuming that each video data of the target surveillance video is an image group in the target surveillance video, the obtained video index may be a video index corresponding to each image group in the target surveillance video.
And the mode of acquiring the video index can be different according to different devices for storing the video index and different execution bodies of the video preview method provided by the embodiment of the invention. For example, assuming that the video index is stored in the server device and the execution subject is the client device, the client device may receive the video index sent by the server device. Assuming that the target surveillance video is stored in the server device and the execution subject is the server device, the server device may read the video index from the local.
In S103, the target event may be any event, and the target event should be an event that is of interest to the user when browsing the target surveillance video. For example, assuming that the user browses the target monitoring video in order to investigate the cause of the collision of the vehicle a and the vehicle B, the user is interested in the event "the vehicle a collides with the vehicle B", and thus in this example, the target event may be the event "the vehicle a collides with the vehicle B". For another example, assuming that the user browses the target surveillance video in order to determine the motion trajectory of the vehicle a, the user is interested in the event "vehicle a present", and thus in this example, the target event may be the event "vehicle a present".
The determination manner of the target time period may be different according to different application scenarios, for example, in one possible embodiment, the target time period may be determined according to a control instruction input by a user, and in another possible embodiment, the target time period may also be determined by the execution subject according to a preset target time period estimation method.
For example, in a possible embodiment, the user estimates that the target event occurs at 8:00:00-9:00:00 of 1/2000 according to actual experience, and the user may input the control command to enable the execution subject to determine that the target time period is 8:00:00-9:00:00 of 1/2000.
In another possible embodiment, the executing entity may determine the target time period with the target time according to the occurrence time of other events which are historically the same as the target event category, for example, assuming that the target event is an event "the vehicle a collides with the vehicle B", the executing entity may determine that the collision event generally occurs in the morning rush hour of work at 8:00:00-9:00:00 according to the historical occurrence time of other collision events, and may determine that the target time period is 8:00:00-9:00:00 of 1 month and 1 day of 2000 because the target monitoring video is a video of 1 month and 1 day of 2000.
In yet another possible embodiment, the target time period may also be determined according to the shooting time of the video frame in which the target event occurs by analyzing each video frame in the target monitoring video to determine whether the target event occurs in each video frame. For example, assuming that the target event is an event "vehicle a appears", vehicle identification may be performed on each video frame in the target surveillance video to determine whether there is a vehicle a in each video frame in the target surveillance video, and assuming that the shooting time of all video frames in which a vehicle a exists is 8:00:00 at the earliest time of 1 month and 1 day of 2000 and 8:05:00 at the latest time of 1 month and 1 day of 2000, it may be determined that the target time period is 8:00:00-8:05:00 at 1 month and 1 day of 2000.
In S104, the target video index may be one or multiple, and the shooting time indicated by the video index belongs to the target time period, which may mean that all the shooting times indicated by the video index belong to the target time period, or that the shooting time indicated by the video index intersects with the target time period.
Illustratively, assuming that the target time period is 8:00:00-9:00:00 of 1/2000, and assuming that the shooting time indicated by the video index a is 8:00:30-8:01:00 of 1/2000, a part of the time indicated by the video index B belongs to the target time period, and assuming that the shooting time indicated by the video index B is 7:59:30-8:00:30 of 1/2000, a part of the time indicated by the video index B belongs to the target time period, and another part of the time does not belong to the target time period, i.e., the shooting time indicated by the video index B intersects with the target time period.
In S105, the manner of acquiring the target video data may be different depending on the device for storing the target surveillance video and the execution subject. For example, assuming that the device for storing the target surveillance video is a server device and the execution subject is a client device, the client device may obtain the target video data from the server device. Assuming that the device for storing the target monitoring video is a server device and the execution subject is the server device, the server device may be a device for reading target video data stored locally by the server. Assuming that the device for storing the target surveillance video is a storage device other than the server device, and the execution subject is a client device, the server device may obtain the target surveillance video data from the storage device, and forward the target surveillance video data to the client device, so that the client device obtains the target surveillance video data.
In S106, the execution subject may display the preview picture, or another device that controls the communication connection with the execution subject may display the preview picture. For example, if the execution subject is a server device, the server device may send a preview picture representing the target video data to the client device, so that the client device displays the preview picture. If the execution subject is the client device, the client device can display the preview picture through a display module on the client device.
The number of preview pictures extracted from the target video data may be different according to different application scenes, for example, in a possible embodiment, the number of preview pictures may be the number of preview pictures of each video frame extracted from the target video data, and by selecting this embodiment, information lost by the preview pictures with respect to the target video data may be reduced as much as possible, so as to avoid that the user cannot position the video clip desired to be viewed according to the preview pictures due to the lost information as much as possible. For example, assuming that there are 60 video frames in the target video data, respectively denoted as video frames 1-60, if the user wants to view video frames 21-29, the user may not be able to locate the desired video clip from the preview pictures if the obtained preview pictures are preview pictures of video frames 10, 20, 30, 40, 50, 60.
For example, taking each video data in the target surveillance video as one GOP in the target surveillance video as an example, all images in each target GOP may be extracted as a preview picture, where the target GOP is a GOP corresponding to the target video index.
In another possible embodiment, it may also be to extract a preview picture of a partial video frame in the target video data. By adopting the embodiment, the system resource consumed by the preview can be further reduced.
In addition to the on-demand request, other information may be received, for example, in one possible embodiment, configuration information indicating a target decoding manner may be received, and the configuration information may be acquired synchronously or asynchronously with the on-demand request. For example, taking the execution subject as the server device as an example, the request and the configuration information synchronously sent by the client device may be acquired. For another example, taking the execution subject as the client device, the request and configuration may be obtained by the user.
In this embodiment, when the preview picture is displayed, the target video data may be decoded according to a target decoding manner to obtain the preview picture, and the preview picture may be displayed. The decoding of the target video data may be performed by the execution main body, or may be performed by another device that controls the communication connection with the execution main body. For example, taking the execution subject as the client device as an example, the server device may be controlled to decode the target video data according to the target decoding manner to obtain the preview picture, and the preview picture is obtained from the server device for displaying. For another example, taking the execution subject as the server device as an example, the server device may decode the target video data according to a target decoding manner to obtain a preview picture, and send the preview picture to the client device, so that the client device displays the preview picture.
It is understood that in different application scenarios, different requirements may be placed on the quality, size, and accuracy of the preview picture. For example, in some application scenarios, the parameters of the display device used for displaying the preview picture are limited, and the size of the preview picture is required to be not larger than 800 pixels by 600 pixels, and for example, in some application scenarios, the quality of the preview picture is required to be high due to the limitation of the actual requirements of customers.
Therefore, if preview pictures are generated according to the scheme in the foregoing example, it is difficult for the generated preview pictures to satisfy various application scenarios. In the embodiment, the configuration information can be sent to the server by the client, so that the server decodes the image according to the decoding mode represented by the configuration information and generates the preview image, and thus, a user can control the attribute of the generated preview image by reasonably selecting the configuration information, so that the generated preview image can meet different application scenes, namely, the embodiment can improve the applicability.
Referring to fig. 2, fig. 2 is another schematic flow chart of a video preview method according to an embodiment of the present invention, which may include:
s201, receiving an on-demand request sent by aiming at the target monitoring video.
The step is the same as the foregoing step S101, and reference may be made to the related description of the foregoing step S101, which is not described herein again.
S202, video indexes corresponding to each video data in the target monitoring video are obtained.
The step is the same as the step S102, and reference may be made to the related description of the step S102, which is not described herein again.
S203, determining a target time period in which a target event is expected to occur.
This step is the same as S103, and reference may be made to the related description of S103, which is not described herein again.
And S204, determining the video index of which the represented shooting time belongs to the target time period from all the acquired video indexes as a target video index.
The step is the same as the step S104, and reference may be made to the related description of the step S104, which is not described herein again.
And S205, acquiring video data corresponding to the target video index as target video data according to the target video index.
The step is the same as the step S105, and reference may be made to the related description of the step S105, which is not described herein again.
And S206, extracting the preview picture from the target video data and displaying the preview picture.
The step is the same as the step S106, and reference may be made to the related description of the step S106, which is not described herein again.
S207, determining whether the preview picture contains a target picture with a target event, if not, returning to execute S203, and if so, executing S208.
The preview pictures may be analyzed to determine whether a target event occurs in the preview pictures, and the preview pictures with the target event may be used as the target pictures. Or determining whether a target event occurs in the preview picture according to an operation instruction input by the user.
It can be understood that if the target picture is not included in the preview picture, it may be considered that the video segment in the target time period of the target surveillance video is not the video segment that the user wants to watch, and therefore, at this time, it is necessary to continue to search for the video segment that the user wants to watch in the target surveillance video.
And S208, determining the corresponding time stamp of the target picture.
The target picture is a preview picture generated based on the video frame, and the timestamp corresponding to the target picture is the timestamp of the video frame based on which the target picture is generated. If the preview picture contains the target picture, the video frame on which the target picture is generated can be considered to belong to the video clip that the user wants to watch. Therefore, determining the timestamp corresponding to the target picture can locate the video segment that the user wants to watch in the target surveillance video.
S209, the target monitoring video is played from the progress indicated by the time stamp.
As analyzed above, the timestamp corresponding to the target picture can locate the video segment that the user wants to watch in the target surveillance video, so that the target surveillance video is played from the progress indicated by the timestamp, and the user can directly watch the video segment that the user wants to watch.
For example, assuming that the progress indicated by the obtained timestamp is determined to be 10 minutes and 01 seconds of the target surveillance video, the target surveillance video may be played from 10 minutes and 01 seconds of the target surveillance video.
For more clearly explaining the video preview method provided by the embodiment of the present invention, the video preview method provided by the embodiment of the present invention is described below with reference to a client and a server, and referring to fig. 3, fig. 3 is another schematic flow diagram of the video preview method provided by the embodiment of the present invention, and the method may include:
s301, the client establishes connection with the server.
S302, the client receives an on-demand request input by a user aiming at the target monitoring video.
S303, the client sends the request to the server.
S304, the server side obtains the video index corresponding to each video data in the target monitoring video.
The server may obtain, from a storage device storing the target surveillance video, a video index corresponding to each video data in the target surveillance video, and the storage device may generate, in advance, the video index corresponding to each video data in the target surveillance video when the target surveillance video is stored.
If the target surveillance video is a complete video, each video data in the target surveillance video may refer to all video data in the complete video, and if the target surveillance video is a video segment in the complete video, each video data in the target surveillance video may refer to all video indexes in the video segment in the complete video.
S305, the client receives time information indicating a target time period input by the user.
Wherein the target time period is a time period in which a target event is expected to occur. The time information input by the user may be input according to actual experience and/or requirements of the user, for example, refer to the foregoing description in S103, and will not be described herein again.
S306, the client sends the time information to the server.
S307, the server determines a target time period in which a target event is expected to occur according to the time information.
In other possible embodiments, the target time period may also be determined by other manners, for example, refer to the related description in the foregoing S103, and details are not repeated here.
S308, the server determines the video index of which the represented shooting time belongs to the target time period from all the acquired video indexes as a target video index.
S309, the server side obtains video data corresponding to the target video index according to the target video index and uses the video data as target video data.
S310, the server extracts the preview picture from the target video data and sends the preview picture to the client.
S311, the client displays the received preview picture.
In S312, the client determines whether the preview picture includes a target picture in which a target event occurs, if so, executes S313, and if not, returns to execute S305.
And S313, the client acquires the time stamp corresponding to the target picture and starts to play the target monitoring video from the progress represented by the time stamp.
An embodiment of the present invention further provides a video preview apparatus, which may be as shown in fig. 4, and includes:
an on-demand request obtaining module 401, configured to receive an on-demand request sent for a target surveillance video, where a video index corresponding to each video data in the target surveillance video is generated in advance for each video data in the target surveillance video, and the video index is used to indicate shooting time of the corresponding video data;
a video index obtaining module 402, configured to obtain a video index corresponding to each video data in the target surveillance video;
a target time period estimation module 403, configured to determine a target time period in which a target event is expected to occur;
a video index screening module 404, configured to determine, from all the obtained video indexes, a video index whose shooting time indicated by the time belongs to the target time period, as a target video index;
a video data screening module 405, configured to obtain, according to the target video index, video data corresponding to the target video index as target video data;
and a picture display module 406, configured to extract a preview picture from the target video data and display the preview picture.
In a possible embodiment, the apparatus further includes an event detection module, configured to determine whether a target picture in which the target event occurs is included in the preview picture;
if not, the target time period estimation module 403 is driven to execute the step of determining the target time period in which the target event is expected to occur.
In a possible embodiment, the apparatus further includes a video playing module, configured to determine, if yes, a timestamp corresponding to the target picture;
and starting to play the target monitoring video from the progress represented by the time stamp.
In a possible embodiment, each video data in the target surveillance video is a group of pictures, GOP, in the target surveillance video;
the video data screening module 404 obtains video data corresponding to the target video index according to the target video index, and the obtaining of the video data corresponding to the target video index as target video data includes:
acquiring a GOP corresponding to the target video index according to the target video index, and taking the GOP as a target GOP;
the extracting of the preview picture from the target video data includes:
all the images in each target GOP are extracted as preview pictures.
In a possible embodiment, the apparatus further comprises:
the device comprises a configuration information acquisition module, a decoding module and a decoding module, wherein the configuration information acquisition module is used for receiving configuration information used for representing a target decoding mode;
the picture displaying module 406 displays a preview picture representing the target video data, including:
decoding the target video data according to the target decoding mode to obtain a preview picture;
and displaying the preview picture.
In a possible embodiment, the video index of the target surveillance video is generated in advance by the device for storing the target surveillance video when storing the target surveillance video;
the video index obtaining module 402 obtains a video index corresponding to each piece of video data in the surveillance video, including:
and acquiring a video index corresponding to each video data in the monitoring video from the equipment for storing the target monitoring video.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including:
a memory 501 for storing a computer program;
the processor 502 is configured to implement the following steps when executing the program stored in the memory:
receiving an on-demand request sent aiming at a target monitoring video, wherein a video index corresponding to the video data is generated aiming at each video data in the target monitoring video in advance, and the video index is used for representing the shooting time of the corresponding video data;
acquiring a video index corresponding to each video data in the target monitoring video;
determining a target time period in which a target event is expected to occur;
determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index;
acquiring video data corresponding to the target video index according to the target video index, and using the video data as target video data;
and extracting a preview picture from the target video data and displaying the preview picture.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above video previewing methods.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the video preview methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method for video preview, the method comprising:
receiving an on-demand request sent aiming at a target monitoring video, wherein a video index corresponding to the video data is generated aiming at each video data in the target monitoring video in advance, and the video index is used for representing the shooting time of the corresponding video data;
acquiring a video index corresponding to each video data in the target monitoring video;
determining a target time period in which a target event is expected to occur;
determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index;
acquiring video data corresponding to the target video index according to the target video index, and using the video data as target video data;
and extracting a preview picture from the target video data and displaying the preview picture.
2. The method of claim 1, wherein after said extracting and presenting the preview picture from the target video data, the method further comprises:
determining whether the preview picture contains a target picture with the target event;
if not, returning to the step of determining the target time period in which the target event is expected to occur.
3. The method of claim 2, further comprising:
if so, determining a timestamp corresponding to the target picture;
and starting to play the target monitoring video from the progress represented by the time stamp.
4. The method according to claim 1, wherein each video data in the target surveillance video is a group of pictures, GOP, in the target surveillance video;
acquiring video data corresponding to the target video index according to the target video index, wherein the acquiring of the video data as the target video data comprises the following steps:
acquiring a GOP corresponding to the target video index according to the target video index, and taking the GOP as a target GOP;
the extracting of the preview picture from the target video data includes:
all the images in each target GOP are extracted as preview pictures.
5. The method of claim 1, further comprising:
receiving configuration information for indicating a target decoding mode;
the extracting a preview picture from the target video data and displaying the preview picture includes:
decoding the target video data according to the target decoding mode to obtain a preview picture;
and displaying the preview picture.
6. The method according to claim 1, wherein the video index of the target surveillance video is generated in advance by a device for storing the target surveillance video when the target surveillance video is stored;
the obtaining of the video index corresponding to each video data in the surveillance video includes:
and acquiring a video index corresponding to each video data in the monitoring video from the equipment for storing the target monitoring video.
7. A video preview device, the device comprising:
the video-on-demand request acquisition module is used for receiving a video-on-demand request sent by aiming at a target monitoring video, wherein a video index corresponding to the video data is generated in advance aiming at each video data in the target monitoring video, and the video index is used for indicating the shooting time of the corresponding video data;
the video index acquisition module is used for acquiring a video index corresponding to each video data in the target monitoring video;
the target time period estimation module is used for determining a target time period in which a target event is expected to occur;
the video index screening module is used for determining a video index of which the represented shooting time belongs to the target time period from all the obtained video indexes as a target video index;
the video data screening module is used for acquiring video data corresponding to the target video index according to the target video index and taking the video data as target video data;
and the picture display module is used for extracting a preview picture from the target video data and displaying the preview picture.
8. The apparatus according to claim 7, further comprising an event detection module configured to determine whether a target picture in which the target event occurs is included in the preview picture;
if not, driving the target time period estimation module to execute the step of determining the target time period in which the target event is expected to occur.
9. The apparatus according to claim 7, wherein each video data in the target surveillance video is a group of pictures, GOP, in the target surveillance video;
the video data screening module acquires video data corresponding to the target video index according to the target video index, and the video data screening module is used as target video data and comprises the following steps:
acquiring a GOP corresponding to the target video index according to the target video index, and taking the GOP as a target GOP;
the extracting of the preview picture from the target video data includes:
all the images in each target GOP are extracted as preview pictures.
10. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202110891495.1A 2021-08-04 2021-08-04 Video preview method and device and electronic equipment Pending CN113596582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110891495.1A CN113596582A (en) 2021-08-04 2021-08-04 Video preview method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110891495.1A CN113596582A (en) 2021-08-04 2021-08-04 Video preview method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113596582A true CN113596582A (en) 2021-11-02

Family

ID=78255002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110891495.1A Pending CN113596582A (en) 2021-08-04 2021-08-04 Video preview method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113596582A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071226A (en) * 2022-01-14 2022-02-18 飞狐信息技术(天津)有限公司 Video preview graph generation method and device, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170206761A1 (en) * 2016-01-15 2017-07-20 Xiaoyi Technology Co., Ltd. System and method for video preview
WO2018014711A1 (en) * 2016-07-19 2018-01-25 杭州海康威视数字技术股份有限公司 Method and device for playing video
CN108900918A (en) * 2018-08-17 2018-11-27 深圳市茁壮网络股份有限公司 A kind of VOD method, client and electronic equipment
CN109120885A (en) * 2017-06-26 2019-01-01 杭州海康威视数字技术股份有限公司 Video data acquisition methods and device
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视系统技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN110198432A (en) * 2018-10-30 2019-09-03 腾讯科技(深圳)有限公司 Processing method, device, computer-readable medium and the electronic equipment of video data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170206761A1 (en) * 2016-01-15 2017-07-20 Xiaoyi Technology Co., Ltd. System and method for video preview
WO2018014711A1 (en) * 2016-07-19 2018-01-25 杭州海康威视数字技术股份有限公司 Method and device for playing video
CN109120885A (en) * 2017-06-26 2019-01-01 杭州海康威视数字技术股份有限公司 Video data acquisition methods and device
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视系统技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN108900918A (en) * 2018-08-17 2018-11-27 深圳市茁壮网络股份有限公司 A kind of VOD method, client and electronic equipment
CN110198432A (en) * 2018-10-30 2019-09-03 腾讯科技(深圳)有限公司 Processing method, device, computer-readable medium and the electronic equipment of video data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071226A (en) * 2022-01-14 2022-02-18 飞狐信息技术(天津)有限公司 Video preview graph generation method and device, storage medium and electronic equipment
CN114071226B (en) * 2022-01-14 2022-04-26 飞狐信息技术(天津)有限公司 Video preview graph generation method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
JP5038607B2 (en) Smart media content thumbnail extraction system and method
CN101267523B (en) Device for processing motion image, imaging apparatus, image display control method
CN101267522B (en) Information processing apparatus, imaging apparatus, image display control method
WO2017107649A1 (en) Video transmission method and device
CN108062507B (en) Video processing method and device
US7873259B2 (en) Synching a recording time of a program to the actual program broadcast time for the program
CN110290419B (en) Video playing method and device and electronic equipment
JP2016506167A (en) Video playback method, terminal, and system
TWI664855B (en) Method and apparatus for playing back recorded video
US11893796B2 (en) Methods and systems for detection of anomalous motion in a video stream and for creating a video summary
US9824722B2 (en) Method to mark and exploit at least one sequence record of a video presentation
US10021433B1 (en) Video-production system with social-media features
JP2008527940A (en) Apparatus and method for analyzing a content stream containing content items
CN111866457B (en) Monitoring image processing method, electronic device, storage medium and system
US20180098119A1 (en) Audience measurement and feedback system
CN110740290A (en) Monitoring video previewing method and device
JP2019110545A (en) Video playback method, terminal and system
CN111541927A (en) Video playing method and device
US20100095329A1 (en) System and method for keyframe analysis and distribution from broadcast television
CN113596582A (en) Video preview method and device and electronic equipment
JP7126539B2 (en) Video playback method, terminal and system
JP2009200757A (en) Video data processing apparatus, program, and method
CN100508594C (en) Commercial information searching method and apparatus, and provid method and apparatus accompanying information
US20050283793A1 (en) Advertising detection method and related system for detecting advertising according to specific beginning/ending images of advertising sections
CN113886273A (en) Performance test method, device, test equipment and medium of application 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211102

RJ01 Rejection of invention patent application after publication