CN111356015A - Duplicate video detection method and device, computer equipment and storage medium - Google Patents

Duplicate video detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111356015A
CN111356015A CN202010117004.3A CN202010117004A CN111356015A CN 111356015 A CN111356015 A CN 111356015A CN 202010117004 A CN202010117004 A CN 202010117004A CN 111356015 A CN111356015 A CN 111356015A
Authority
CN
China
Prior art keywords
video
frame
key frame
key
trailer
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.)
Granted
Application number
CN202010117004.3A
Other languages
Chinese (zh)
Other versions
CN111356015B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010117004.3A priority Critical patent/CN111356015B/en
Publication of CN111356015A publication Critical patent/CN111356015A/en
Application granted granted Critical
Publication of CN111356015B publication Critical patent/CN111356015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/49Segmenting video sequences, i.e. computational techniques such as parsing or cutting the sequence, low-level clustering or determining units such as shots or scenes
    • 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

Abstract

The application relates to a repeated video detection method, a repeated video detection device, computer equipment and a storage medium, wherein the method comprises the following steps: intercepting a trailer in the first video and a trailer in the second video; respectively acquiring a plurality of key frames in a leader and a trailer by utilizing the histogram; extracting characteristic information in the key frame; comparing the characteristic information of each key frame in the slice tail with the characteristic information of the key frame in the slice head according to the time sequence; the time length from the first group of matched video frame pairs to the last group of matched video frame pairs arranged according to the time sequence is rough matching time length, and an end frame is determined according to the rough matching time length and the next key frame; the time length from the starting key frame of the rough matching time length of the leader or the trailer to the corresponding ending frame is the repetition time length. According to the method, the starting point, the ending point and the duration of the repeated plot content corresponding to the head and the tail of the front and the back two sets of scenes in the video material are found at the frame level, and the detection error of the repeated duration is reduced.

Description

Duplicate video detection method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for detecting duplicate videos, a computer device, and a storage medium.
Background
When most video playing platforms play a television play, the beginning of the episode of the television play and the last episode of the episode have repetition, the average repetition time of each episode is counted to be 27.16s, and when a user continuously watches the television play, the user needs to repeatedly watch the content of the repeated episode, which seriously affects the watching experience of the user.
Disclosure of Invention
In order to solve the technical problem, the application provides a duplicate video detection method, a duplicate video detection device, a computer device and a storage medium.
In a first aspect, this embodiment provides a method for detecting duplicate videos, where the method includes:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
Optionally, the extracting feature information in the key frame includes:
and extracting feature information in the key frame by using an SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 x n, and n is the number of the feature points.
Optionally, the comparing, according to the time sequence, the feature information of each key frame in the trailer with the feature information of the key frame in the trailer, and forming a group of matched video frame pairs by the key frame in the trailer and the key frame in the trailer, where the comparison result satisfies the comparison coefficient, includes:
comparing the characteristic information of each key frame in the title with the characteristic information of the key frames in the title according to the time sequence by using a FLANN mode to obtain the number of matching points;
judging whether the ratio of the number of the feature points of each key frame in the slice tail to the number of the feature points of each key frame in the slice head is larger than a first threshold value or not, wherein the result of the ratio is a first ratio, and the first ratio is smaller than 1;
when the first ratio is larger than a first threshold value, dividing the number of the matching points by the number of the feature points of the key frame in the slice tail or slice head to obtain a second ratio, wherein the second ratio is smaller than 1;
and when the second ratio is larger than a second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
Optionally, the method further comprises:
and when the first ratio is smaller than a first threshold value, the key frames in the title and the key frames in the trailer are different video frames, and the key frames in the trailer are compared with the unmatched key frames in the title according to the time sequence.
Optionally, the performing similar comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frame in the slice trailer and the video frame in the slice header, where the comparison result satisfies the comparison coefficient, and taking the last group of similar video frame pairs as the end frame to obtain the repeated video of the slice header, where the repeated video includes the video duration from the start key frame of the rough matching duration in the slice header to the end frame, includes:
acquiring each interval frame of the fine key frame interval in the slice tail and each interval frame of the fine key frame interval in the slice head;
extracting the characteristic information of the interval frame, and storing a distance value between two adjacent interval frames in the same video;
comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, wherein the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient according to the comparison result form a group of similar video frame pairs;
and obtaining a repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is a fine matching time length, the last frame in the fine matching time length is an end frame, and the repeated video of the title comprises the time length from the starting key frame of the rough matching time length in the title to the end frame.
In a second aspect, the present embodiment provides a duplicate video detection apparatus, including:
the intercepting module is used for intercepting a film tail in the first video and a film head in the second video;
a key frame obtaining module, configured to obtain multiple key frames in the title and the trailer respectively, where the key frames are video frames converted by a lens in the title or the trailer;
the extraction module is used for extracting the characteristic information in the key frames and storing a distance value between two adjacent key frames in the first video or the second video;
the matching module is used for comparing the characteristic information of each key frame in the film end with the characteristic information of the key frame in the film head according to the time sequence, and forming a group of matching video frame pairs by the key frames in the film end and the key frames in the film head, of which the comparison results meet the comparison coefficient;
the segmentation module is used for respectively acquiring a next key frame after the last key frame in the rough matching duration from the head of the slice and the tail of the slice according to a distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matching duration;
and the fine determination module is used for performing similar comparison on the fine key frame interval in the slice header and the fine key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as the end frame to obtain the repeated video of the slice header, wherein the repeated video comprises the video duration from the initial key frame with the rough matching duration in the slice header to the end frame.
Optionally, the extraction module comprises:
the first extraction unit is used for extracting feature information in the key frame by using a SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 × n, and n is the number of the feature points.
Optionally, the matching module comprises:
the first comparison unit is used for comparing the characteristic information of each key frame in the slice tail with the characteristic information of the key frame in the slice head according to the time sequence by using a FLANN mode to obtain the number of matching points;
a feature judgment unit, configured to judge whether a ratio of the number of feature points of each key frame in the trailer to the number of feature points of each key frame in the leader is greater than a first threshold, where a result of the ratio is a first ratio, and the first ratio is smaller than 1;
a first feature comparison unit, configured to, when the first ratio is greater than a first threshold, divide the number of matching points by the number of feature points of a key frame in the slice tail or slice header to obtain a second ratio, where the second ratio is smaller than 1;
and the matching unit is used for forming a group of matched video frame pairs by the key frame of the leader and the key frame corresponding to the trailer when the second ratio is greater than a second threshold.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
The repeated video detection method, the repeated video detection device, the computer equipment and the storage medium comprise the following steps: intercepting a trailer in the first video and a trailer in the second video; respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer; extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video; comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient; the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length; and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames. According to the method, the starting point and the ending point and the duration of the repeated scenario content corresponding to the head and the tail of the two front and back film collectors in the video material are found at the frame level, the detection error of the repeated duration is reduced, the subsequent frame level reduction aiming at the repeated content is facilitated, or the automatic skip is carried out on the last frame of the repeated duration of the back film collector, and the like, so that the duration of watching the repeated scenario by a user is reduced, and good watching experience is provided for the user.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
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 for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram of an exemplary implementation of a duplicate video detection method;
FIG. 2 is a flow diagram of a method for duplicate video detection in one embodiment;
FIG. 3 is a block diagram of an apparatus for duplicate video detection in one embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. 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 application.
Fig. 1 is a diagram of an application environment of a duplicate video detection method in an embodiment. Referring to fig. 1, the duplicate video detection method is applied to a duplicate video detection system. The duplicate video detection system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, fig. 2 is a flowchart illustrating a duplicate video detection method according to an embodiment, and provides a duplicate video detection method. The embodiment is mainly illustrated by applying the method to the terminal 110 (or the server 120) in fig. 1. Referring to fig. 2, the repeated video detection method specifically includes the following steps:
and step S210, intercepting a film end in the first video and a film head in the second video.
In this embodiment, moviepy is used to intercept the last five minutes in the first video as a trailer, moviepy is used to intercept the first five minutes in the second video as a leader, the second video is the next video set of the first video, the long video cannot be read only by opencv in the conventional video processing method, the processing time is long, the efficiency is low, moviepy is used to replace the conventional opencv to read the long video, and the leader or trailer of the video is intercepted to read, so that the video processing speed is increased.
Step S220, a plurality of key frames in the title and the trailer are respectively obtained, wherein the key frames are video frames converted by the shots in the title or the trailer.
In this embodiment, the histogram is used to find the video frame converted from the shot in the slice header or the slice trailer, and this is used as a key frame, and there are multiple key frames in the slice trailer of the first video and the slice header of the second video respectively.
Step S230, extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video.
In this embodiment, surf features in the key frames are extracted as feature information, the accuracy is high, and a distance value between two adjacent key frames in the first video and a distance value between two adjacent key frames in the second video are stored.
Step S240, comparing the characteristic information of each key frame in the film end with the characteristic information of the key frame in the film head according to the time sequence, and forming a group of matched video frame pairs by the key frames in the film end and the key frames in the film head, wherein the comparison results meet the comparison coefficient.
In this embodiment, the feature information of each key frame in the trailer is compared with the feature information of the key frame in the trailer according to the time sequence, whether the key frame in the first video trailer and the key frame in the second video trailer are the same video frame is judged, and when the result of the comparison between the feature information of the key frame in the first video trailer and the feature information of the key frame in the second video trailer meets the comparison coefficient, the key frame in the first video trailer and the corresponding key frame in the second video trailer form a group of matched video frame pairs.
Step S250, a time length from a first group of matching video frame pairs to a last group of matching video frame pairs arranged according to a time sequence is a rough matching time length, a next key frame after a last key frame in the rough matching time length is respectively obtained in the slice header and the slice trailer according to a distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matching time length.
In this embodiment, the matching result of the key frames in the first video trailer and the second video trailer is obtained according to the comparison result of the feature information of the key frames in the first video trailer and the feature information of the key frames in the second video trailer, but it cannot be guaranteed whether repeated content exists between the last group of matched video frame pairs and the next key frame, and therefore, it is necessary to subdivide and judge whether video frames with the same content exist between the last group of matched video frame pairs and the next key frame. Key frames of a last group of matched video frame pairs are formed in the tail of the first video and the head of the second video, a next key frame is determined according to a distance value between two adjacent key frames which are stored before, a fine key frame interval is formed between the last key frame and the next key frame in the rough matching time, and the fine key frame interval comprises a plurality of interval frames; the fine key frame interval is obtained in the same way in the slice header of the second video.
Step S260, performing similar comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results satisfy the comparison coefficient, and taking the last group of similar video frame pairs as the end frame to obtain the repeated video of the slice header, where the repeated video includes the video duration from the start key frame of the rough matching duration in the slice header to the end frame.
In this embodiment, each interval frame in a first video fine key frame interval is compared with an interval frame corresponding to a second video fine key frame interval, whether the interval frame in the first video and the interval frame in the second video are the same video frame is judged, a group of similar video frame pairs is formed by the video frame in the trailer and the video frame in the leader, the last group of similar video frame pairs is used as an end frame, a repeated video of the leader is obtained, that is, the video duration from the start key frame of the rough matching duration to the end frame in the leader, and the duration of the repeated video of the trailer is the same as that of the leader, that is, the video duration from the start key frame of the rough matching duration to the end frame in the trailer.
Specifically, moviepy is adopted to intercept the last five minutes in the first video as a trailer, moviepy is adopted to intercept the first five minutes in the second video as a leader, the second video is the next video set of the first video, the traditional video processing method adopts opencv to read the long video, the video content of the leader or trailer cannot be read only, the processing time is long, the efficiency is low, moviepy is adopted to replace the traditional opencv to read the long video, and the leader or trailer of the video is intercepted to read, so that the video processing speed is accelerated. And finding the video frames converted by the shots in the head or the tail by utilizing the histogram, and taking the video frames as key frames, wherein a plurality of key frames are respectively arranged in the tail of the first video and the head of the second video. And extracting surf characteristics in the key frames as characteristic information, so that the accuracy is high, and storing a distance value between two adjacent key frames in the first video and a distance value between two adjacent key frames in the second video. Comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film trailer according to the time sequence, judging whether the key frame in the first video film trailer and the key frame in the second video film trailer are the same video frame, and when the result of comparing the characteristic information of the key frame in the first video film trailer with the characteristic information of the key frame in the second video film trailer meets the comparison coefficient, forming a group of matched video frame pairs by the key frame in the first video film trailer and the corresponding key frame in the second video film trailer. According to the comparison result of the feature information of the key frame in the first video trailer and the feature information of the key frame in the second video trailer, the matching result of the key frames in the first video trailer and the second video trailer is obtained, but whether repeated content exists between the last group of matched video frame pairs and the next key frame cannot be guaranteed, so that whether video frames with the same content exist between the last group of matched video frame pairs and the next key frame needs to be subdivided and judged. Key frames of a last group of matched video frame pairs are formed in the tail of the first video and the head of the second video, a next key frame is determined according to a distance value between two adjacent key frames which are stored before, a fine key frame interval is formed between the last key frame and the next key frame in the rough matching time, and the fine key frame interval comprises a plurality of interval frames; the fine key frame interval is obtained in the same way in the slice header of the second video. Comparing each interval frame of the first video fine key frame interval with the interval frame corresponding to the second video fine key frame interval, judging whether the interval frame in the first video and the interval frame in the second video are the same video frame, obtaining the last frame matched with the first video and the second video after the judgment is finished, namely the end frame, wherein the time from the rough matching time to the end frame in the first video or the second video is the repetition time.
In one embodiment, feature information in the key frame is extracted by using a SURF algorithm, the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 × n, and n is the number of the feature points.
Specifically, the session threshold of the feature matrix in the SURF algorithm is set to 300, feature points in the keyframes are extracted according to the SURF algorithm, the feature dimension of each feature information is 64 × n, all the feature points are accurately detected within the range, so that the comparison accuracy of the keyframes of the subsequent first video and the subsequent second video is improved, the accuracy of the overall repetition duration is improved, and the detection error of the overall repetition duration is within 5 s.
In one embodiment, the feature information of each key frame in the slice tail is compared with the feature information of the key frame in the slice head according to a time sequence by using a FLANN mode to obtain the number of matching points; judging whether the ratio of the number of the feature points of each key frame in the slice tail to the number of the feature points of each key frame in the slice head is larger than a first threshold value or not, wherein the result of the ratio is a first ratio, and the first ratio is smaller than 1; when the first ratio is larger than a first threshold value, dividing the number of the matching points by the number of the feature points of the key frame in the slice tail or slice head to obtain a second ratio, wherein the second ratio is smaller than 1; and when the second ratio is larger than a second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
Specifically, feature comparison is performed on feature information of a key frame in a first video and feature information of a key frame in a second video by using a FLANN mode, that is, all feature points in one key frame of the first video and all feature points in one key frame of the second video are subjected to matching judgment, points at which a plurality of feature points of the key frame of the first video and a plurality of feature points of the key frame of the second video are successfully matched are taken as matching points, and the number of the matching points is calculated. If the number of the characteristic points in the first video key frame is smaller than that of the characteristic points in the second video key frame, dividing the number of the characteristic points in the first video key frame by the number of the characteristic points in the second video key frame to obtain a first ratio; if the number of the characteristic points in the first video key frame is larger than that in the second video key frame, dividing the number of the characteristic points in the second video key frame by the number of the characteristic points in the first video key frame to obtain a first ratio, wherein the first ratio is smaller than 1. Judging whether the first ratio is greater than a first threshold value of 0.6, and when the first ratio is greater than 0.6, if the number of the feature points in the first video key frame is less than the number of the feature points in the second video key frame, dividing the number of the feature points in the first video key frame by the number of the matching points to obtain a second ratio; if the number of the feature points in the first video key frame is larger than that in the second video key frame, dividing the number of the feature points in the second video key frame by the number of the matching points to obtain a second ratio, wherein the second ratio is smaller than 1. And judging whether the second ratio is greater than a second threshold value by 0.5, when the second ratio is greater than the second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
In one embodiment, when the first ratio is smaller than a first threshold, the key frames in the slice header and the key frames in the slice trailer are different video frames, and the key frames in the slice trailer are compared with the unmatched key frames in the slice header according to a time sequence.
Specifically, when the first ratio is smaller than the first threshold 0.6, it is indicated that the key frame for matching in the first video and the key frame for matching in the second video are not the same video frame, the key frame for matching in the first video and the key frame for not matching in the second video are matched and compared again according to the time sequence, whether the key frame is the same video frame is judged, and when all the key frames in the second video are compared and no key frame which is the same as the key frame for matching in the first video is found, the next key frame in the first video and the key frame in the second video are matched and compared according to the time sequence. And until the key frame in the first video finds the key frame matched with the key frame in the second video, replacing the next key frame in the first video according to the time sequence to match and compare the key frame with the key frame which is not successfully matched in the second video.
In one embodiment, each inter frame of the fine key frame interval in the slice end and each inter frame of the fine key frame interval in the slice header are obtained; extracting the characteristic information of the interval frame, and storing a distance value between two adjacent interval frames in the same video; comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, wherein the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient according to the comparison result form a group of similar video frame pairs; and obtaining a repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is a fine matching time length, the last frame in the fine matching time length is an end frame, and the repeated video of the title comprises the time length from the starting key frame of the rough matching time length in the title to the end frame.
Specifically, the next key frame after the rough matching duration is selected according to the stored distance value between two adjacent key frames in the first video, the last key frame in the rough matching duration and the next key frame form a fine key frame interval, the fine key frame interval includes a plurality of interval frames, similarly, the fine key frame interval in the second video also includes a plurality of interval frames, and the time length error between two adjacent interval frames in the same video is within 1 s. The method comprises the steps of extracting feature information of an interval frame by using an SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 x n, n is the number of the feature points, comparing and judging whether the interval frame in a first video and the interval frame in a second video are the same video frame or not according to the comparison method of the first video key frame and the second video key frame, and reducing the comparison range, so that the repetition duration is determined at the interval frame level, the accuracy is higher, and the error of the repetition duration is reduced.
FIG. 2 is a flow diagram illustrating a method for duplicate video detection in one embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In an embodiment, fig. 3 is a block diagram of a duplicate video detection apparatus in an embodiment, and referring to fig. 3, the embodiment provides a duplicate video detection apparatus, including:
an intercepting module 310, configured to intercept a trailer in the first video and a trailer in the second video;
a key frame obtaining module 320, configured to obtain multiple key frames in the slice header and the slice trailer respectively, where the key frames are video frames converted by a lens in the slice header or the slice trailer;
the extracting module 330 is configured to extract feature information in the key frames, and store a distance value between two adjacent key frames in the first video or the second video;
the matching module 340 is configured to compare feature information of each key frame in the trailer with feature information of key frames in the trailer according to a time sequence, and form a group of matching video frame pairs by the key frames in the trailer and the key frames in the trailer, of which comparison results satisfy a comparison coefficient;
a fine-section module 350, configured to use a time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged in a time sequence as a rough matching time length, and obtain, according to a distance value between two adjacent key frames in the first video or the second video, a next key frame after a last key frame in the rough matching time length from the slice head and the slice tail, respectively, where a fine key frame section is formed between the last key frame and the next key frame in the rough matching time length;
the fine determination module 360 is configured to perform similar comparison on the fine key frame interval in the slice header and the fine key frame interval in the slice trailer, form a group of similar video frame pairs from the video frame in the slice trailer and the video frame in the slice header, where the comparison result satisfies the comparison coefficient, and obtain a repeated video of the slice header by using the last group of similar video frame pairs as an end frame, where the repeated video includes the video duration from the start key frame of the rough matching duration in the slice header to the end frame.
In one embodiment, the extraction module 330 includes:
the first extraction unit is used for extracting feature information in the key frame by using a SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 × n, and n is the number of the feature points.
In one embodiment, the matching module 340 includes:
the first comparison unit is used for comparing the characteristic information of each key frame in the slice tail with the characteristic information of the key frame in the slice head according to the time sequence by using a FLANN mode to obtain the number of matching points;
a feature judgment unit, configured to judge whether a ratio of the number of feature points of each key frame in the trailer to the number of feature points of each key frame in the leader is greater than a first threshold, where a result of the ratio is a first ratio, and the first ratio is smaller than 1;
a first feature comparison unit, configured to, when the first ratio is greater than a first threshold, divide the number of matching points by the number of feature points of a key frame in the slice tail or slice header to obtain a second ratio, where the second ratio is smaller than 1;
and the matching unit is used for forming a group of matched video frame pairs by the key frame of the leader and the key frame corresponding to the trailer when the second ratio is greater than a second threshold.
In one embodiment, the apparatus further comprises:
and the re-comparison module is used for comparing the key frames in the title with the unmatched key frames in the title according to the time sequence when the first ratio is smaller than a first threshold value and the key frames in the title and the key frames in the trailer are different video frames.
In one embodiment, the fine determination module 360 includes:
a fine determination unit, configured to obtain each interval frame of a fine key frame interval in the slice trailer and each interval frame of a fine key frame interval in the slice header;
the second extraction unit is used for extracting the characteristic information of the interval frames and storing a distance value between two adjacent interval frames in the same video;
the second comparison unit is used for comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, and the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient in the comparison result form a group of similar video frame pairs;
and the end determining unit is used for obtaining the repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is the fine matching time length, the last frame in the fine matching time length is the end frame, and the repeated video of the title comprises the time length from the initial key frame of the rough matching time length in the title to the end frame.
FIG. 4 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the server 120) in fig. 1. As shown in fig. 4, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a duplicate video detection method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a repetitive video detection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the duplicate video detection apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 4. The memory of the computer device may store various program modules constituting the duplicate video detection apparatus, such as the truncation module 310, the key frame acquisition module 320, the extraction module 330, the matching module 340, the subdivided region module 350, and the fine determination module 360 shown in fig. 3. The computer program constituted by the respective program modules causes the processor to execute the steps in the duplicate video detection method of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 4 may perform the capturing of the trailer in the first video and the trailer in the second video by the capturing module 310 in the duplicate video detection apparatus shown in fig. 3. The computer device may perform, through the key frame obtaining module 320, obtaining a plurality of key frames in the slice header and the slice trailer respectively, where the key frames are video frames converted from shots in the slice header or the slice trailer. The computer device may perform the extraction of the feature information in the key frames through the extraction module 330, and store a distance value between two adjacent key frames in the first video or the second video. The computer device may perform, through the matching module 340, comparison between the feature information of each key frame in the trailer and the feature information of the key frame in the trailer in time sequence, and form a set of matching video frame pairs from the key frames in the trailer and the key frames in the trailer whose comparison results satisfy the comparison coefficient. The computer device may execute, by the segment subdivision module 350, that a time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged in time sequence is a rough matched time length, and according to a distance value between two adjacent key frames in the first video or the second video, respectively obtain, in the slice header and the slice trailer, a next key frame after a last key frame in the rough matched time length, where a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length. The computer device may perform similarity comparison between the fine key frame interval in the slice header and the fine key frame interval in the slice trailer through the fine determination module 360, form a group of similar video frame pairs from the video frame in the slice trailer and the video frame in the slice header, where the comparison result satisfies the comparison coefficient, and obtain a repeated video of the slice header by using the last group of similar video frame pairs as an end frame, where the repeated video includes the video duration from the start key frame to the end frame of the rough matching duration in the slice header.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and extracting feature information in the key frame by using an SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 x n, and n is the number of the feature points.
In one embodiment, the processor, when executing the computer program, further performs the steps of: comparing the characteristic information of each key frame in the title with the characteristic information of the key frames in the title according to the time sequence by using a FLANN mode to obtain the number of matching points; judging whether the ratio of the number of the feature points of each key frame in the slice tail to the number of the feature points of each key frame in the slice head is larger than a first threshold value or not, wherein the result of the ratio is a first ratio, and the first ratio is smaller than 1; when the first ratio is larger than a first threshold value, dividing the number of the matching points by the number of the feature points of the key frame in the slice tail or slice head to obtain a second ratio, wherein the second ratio is smaller than 1; and when the second ratio is larger than a second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the first ratio is smaller than a first threshold value, the key frames in the title and the key frames in the trailer are different video frames, and the key frames in the trailer are compared with the unmatched key frames in the title according to the time sequence.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring each interval frame of the fine key frame interval in the slice tail and each interval frame of the fine key frame interval in the slice head; extracting the characteristic information of the interval frame, and storing a distance value between two adjacent interval frames in the same video; comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, wherein the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient according to the comparison result form a group of similar video frame pairs; and obtaining a repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is a fine matching time length, the last frame in the fine matching time length is an end frame, and the repeated video of the title comprises the time length from the starting key frame of the rough matching time length in the title to the end frame.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
In one embodiment, the computer program when executed by the processor further performs the steps of: and extracting feature information in the key frame by using an SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 x n, and n is the number of the feature points.
In one embodiment, the computer program when executed by the processor further performs the steps of: comparing the characteristic information of each key frame in the title with the characteristic information of the key frames in the title according to the time sequence by using a FLANN mode to obtain the number of matching points; judging whether the ratio of the number of the feature points of each key frame in the slice tail to the number of the feature points of each key frame in the slice head is larger than a first threshold value or not, wherein the result of the ratio is a first ratio, and the first ratio is smaller than 1; when the first ratio is larger than a first threshold value, dividing the number of the matching points by the number of the feature points of the key frame in the slice tail or slice head to obtain a second ratio, wherein the second ratio is smaller than 1; and when the second ratio is larger than a second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the first ratio is smaller than a first threshold value, the key frames in the title and the key frames in the trailer are different video frames, and the key frames in the trailer are compared with the unmatched key frames in the title according to the time sequence.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring each interval frame of the fine key frame interval in the slice tail and each interval frame of the fine key frame interval in the slice head; extracting the characteristic information of the interval frame, and storing a distance value between two adjacent interval frames in the same video; comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, wherein the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient according to the comparison result form a group of similar video frame pairs; and obtaining a repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is a fine matching time length, the last frame in the fine matching time length is an end frame, and the repeated video of the title comprises the time length from the starting key frame of the rough matching time length in the title to the end frame.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, 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.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice 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. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for duplicate video detection, the method comprising:
intercepting a trailer in the first video and a trailer in the second video;
respectively acquiring a plurality of key frames in the title and the trailer, wherein the key frames are video frames converted by a lens in the title or the trailer;
extracting feature information in the key frames, and storing a distance value between two adjacent key frames in the first video or the second video;
comparing the characteristic information of each key frame in the film trailer with the characteristic information of the key frame in the film leader according to a time sequence, and forming a group of matched video frame pairs by the key frames in the film trailer and the key frames in the film leader, of which the comparison results meet the comparison coefficient;
the time length from a first group of matched video frame pairs to a last group of matched video frame pairs arranged according to the time sequence is rough matched time length, a next key frame behind the last key frame in the rough matched time length is respectively obtained from the head and the tail of the film according to the distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matched time length;
and performing similarity comparison on the detailed key frame interval in the slice header and the detailed key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as end frames to obtain the repeated video of the slice header, wherein the repeated video comprises the video time from the starting key frame with the rough matching time length in the slice header to the end frames.
2. The method of claim 1, wherein the extracting the feature information in the key frame comprises:
and extracting feature information in the key frame by using an SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 x n, and n is the number of the feature points.
3. The method according to claim 2, wherein the comparing the feature information of each key frame in the trailer with the feature information of the key frame in the trailer in time order, and the combining the key frames in the trailer and the key frames in the trailer with the comparison result satisfying the comparison coefficient into a set of matching video frame pairs comprises:
comparing the characteristic information of each key frame in the title with the characteristic information of the key frames in the title according to the time sequence by using a FLANN mode to obtain the number of matching points;
judging whether the ratio of the number of the feature points of each key frame in the slice tail to the number of the feature points of each key frame in the slice head is larger than a first threshold value or not, wherein the result of the ratio is a first ratio, and the first ratio is smaller than 1;
when the first ratio is larger than a first threshold value, dividing the number of the matching points by the number of the feature points of the key frame in the slice tail or slice head to obtain a second ratio, wherein the second ratio is smaller than 1;
and when the second ratio is larger than a second threshold value, the key frame of the leader and the key frame corresponding to the trailer are the same video frame, and the key frame of the leader and the key frame corresponding to the trailer form a group of matched video frame pairs.
4. The method of claim 3, further comprising:
and when the first ratio is smaller than a first threshold value, the key frames in the title and the key frames in the trailer are different video frames, and the key frames in the trailer are compared with the unmatched key frames in the title according to the time sequence.
5. The method according to claim 4, wherein the performing similarity comparison between the fine key frame interval in the slice header and the fine key frame interval in the slice trailer, forming a group of similar video frame pairs from the video frame in the slice header and the video frame in the slice header whose comparison result satisfies the comparison coefficient, and using the last group of similar video frame pairs as an end frame to obtain the repeated video of the slice header, where the repeated video includes the video duration from the start key frame to the end frame of the rough matching duration in the slice header, comprises:
acquiring each interval frame of the fine key frame interval in the slice tail and each interval frame of the fine key frame interval in the slice head;
extracting the characteristic information of the interval frame, and storing a distance value between two adjacent interval frames in the same video;
comparing the characteristic information of each interval frame in the film end with the characteristic information of each interval frame in the film head one by one according to the time sequence, wherein the interval frames in the film end and the interval frames in the film head which meet the comparison coefficient according to the comparison result form a group of similar video frame pairs;
and obtaining a repeated video of the title, wherein the time length from the first group of similar video frame pairs to the last group of similar video frame pairs arranged according to the time sequence is a fine matching time length, the last frame in the fine matching time length is an end frame, and the repeated video of the title comprises the time length from the starting key frame of the rough matching time length in the title to the end frame.
6. An apparatus for duplicate video detection, the apparatus comprising:
the intercepting module is used for intercepting a film tail in the first video and a film head in the second video;
a key frame obtaining module, configured to obtain multiple key frames in the title and the trailer respectively, where the key frames are video frames converted by a lens in the title or the trailer;
the extraction module is used for extracting the characteristic information in the key frames and storing a distance value between two adjacent key frames in the first video or the second video;
the matching module is used for comparing the characteristic information of each key frame in the film end with the characteristic information of the key frame in the film head according to the time sequence, and forming a group of matching video frame pairs by the key frames in the film end and the key frames in the film head, of which the comparison results meet the comparison coefficient;
the segmentation module is used for respectively acquiring a next key frame after the last key frame in the rough matching duration from the head of the slice and the tail of the slice according to a distance value between two adjacent key frames in the first video or the second video, and a fine key frame interval is formed between the last key frame and the next key frame in the rough matching duration;
and the fine determination module is used for performing similar comparison on the fine key frame interval in the slice header and the fine key frame interval in the slice trailer, forming a group of similar video frame pairs by the video frames in the slice trailer and the video frames in the slice header, of which the comparison results meet the comparison coefficient, and taking the last group of similar video frame pairs as the end frame to obtain the repeated video of the slice header, wherein the repeated video comprises the video duration from the initial key frame with the rough matching duration in the slice header to the end frame.
7. The apparatus of claim 6, wherein the extraction module comprises:
the first extraction unit is used for extracting feature information in the key frame by using a SURF algorithm, wherein the feature information comprises a plurality of feature points, the feature dimension of the feature information is 64 × n, and n is the number of the feature points.
8. The apparatus of claim 7, wherein the matching module comprises:
the first comparison unit is used for comparing the characteristic information of each key frame in the slice tail with the characteristic information of the key frame in the slice head according to the time sequence by using a FLANN mode to obtain the number of matching points;
a feature judgment unit, configured to judge whether a ratio of the number of feature points of each key frame in the trailer to the number of feature points of each key frame in the leader is greater than a first threshold, where a result of the ratio is a first ratio, and the first ratio is smaller than 1;
a first feature comparison unit, configured to, when the first ratio is greater than a first threshold, divide the number of matching points by the number of feature points of a key frame in the slice tail or slice header to obtain a second ratio, where the second ratio is smaller than 1;
and the matching unit is used for forming a group of matched video frame pairs by the key frame of the leader and the key frame corresponding to the trailer when the second ratio is greater than a second threshold.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010117004.3A 2020-02-25 2020-02-25 Duplicate video detection method and device, computer equipment and storage medium Active CN111356015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010117004.3A CN111356015B (en) 2020-02-25 2020-02-25 Duplicate video detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117004.3A CN111356015B (en) 2020-02-25 2020-02-25 Duplicate video detection method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111356015A true CN111356015A (en) 2020-06-30
CN111356015B CN111356015B (en) 2022-05-10

Family

ID=71197292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117004.3A Active CN111356015B (en) 2020-02-25 2020-02-25 Duplicate video detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111356015B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935506A (en) * 2020-08-19 2020-11-13 百度时代网络技术(北京)有限公司 Method and apparatus for determining repeating video frames
CN112770176A (en) * 2020-12-23 2021-05-07 北京爱奇艺科技有限公司 Video frame determination method and device, electronic equipment and computer readable medium
CN114650435A (en) * 2022-02-23 2022-06-21 京东科技信息技术有限公司 Method, device and related equipment for searching repeated segments in video

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159834A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 Method and system for detecting repeatable video and audio program fragment
CN102323948A (en) * 2011-09-07 2012-01-18 上海大学 Automatic detection method for title sequence and tail leader of TV play video
CN104575550A (en) * 2013-10-22 2015-04-29 瑞轩科技股份有限公司 Multimedia file title skipping method and electronic device
EP3301596A1 (en) * 2016-09-29 2018-04-04 British Broadcasting Corporation Video search system & method
CN108769731A (en) * 2018-05-25 2018-11-06 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of target video segment in a kind of detection video
CN108924586A (en) * 2018-06-20 2018-11-30 北京奇艺世纪科技有限公司 A kind of detection method of video frame, device and electronic equipment
CN109189991A (en) * 2018-08-17 2019-01-11 百度在线网络技术(北京)有限公司 Repeat video frequency identifying method, device, terminal and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159834A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 Method and system for detecting repeatable video and audio program fragment
CN102323948A (en) * 2011-09-07 2012-01-18 上海大学 Automatic detection method for title sequence and tail leader of TV play video
CN104575550A (en) * 2013-10-22 2015-04-29 瑞轩科技股份有限公司 Multimedia file title skipping method and electronic device
EP3301596A1 (en) * 2016-09-29 2018-04-04 British Broadcasting Corporation Video search system & method
CN108769731A (en) * 2018-05-25 2018-11-06 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of target video segment in a kind of detection video
CN108924586A (en) * 2018-06-20 2018-11-30 北京奇艺世纪科技有限公司 A kind of detection method of video frame, device and electronic equipment
CN109189991A (en) * 2018-08-17 2019-01-11 百度在线网络技术(北京)有限公司 Repeat video frequency identifying method, device, terminal and computer readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935506A (en) * 2020-08-19 2020-11-13 百度时代网络技术(北京)有限公司 Method and apparatus for determining repeating video frames
CN112770176A (en) * 2020-12-23 2021-05-07 北京爱奇艺科技有限公司 Video frame determination method and device, electronic equipment and computer readable medium
CN112770176B (en) * 2020-12-23 2022-10-25 北京爱奇艺科技有限公司 Video frame determination method and device, electronic equipment and computer readable medium
CN114650435A (en) * 2022-02-23 2022-06-21 京东科技信息技术有限公司 Method, device and related equipment for searching repeated segments in video
CN114650435B (en) * 2022-02-23 2023-09-05 京东科技信息技术有限公司 Method and device for searching repeated segments in video and related equipment

Also Published As

Publication number Publication date
CN111356015B (en) 2022-05-10

Similar Documents

Publication Publication Date Title
CN111356015B (en) Duplicate video detection method and device, computer equipment and storage medium
US9665775B2 (en) Identifying scene boundaries using group sparsity analysis
CN110162665B (en) Video searching method, computer device and storage medium
US9076043B2 (en) Video summarization using group sparsity analysis
US11265598B2 (en) Method and device for determining duplicate video
CN108337551B (en) Screen recording method, storage medium and terminal equipment
CN110147469B (en) Data processing method, device and storage medium
CN111460961A (en) CDVS-based similarity graph clustering static video summarization method
CN110688524A (en) Video retrieval method and device, electronic equipment and storage medium
CN111488847B (en) Sports game video ball-feeding segment acquisition system, method and terminal
CN109167934B (en) Video processing method and device and computer readable storage medium
CN111401238A (en) Method and device for detecting character close-up segments in video
CN113496208A (en) Video scene classification method and device, storage medium and terminal
CN116543334A (en) Key frame extraction method, device, electronic equipment and storage medium
CN110769259A (en) Image data compression method for tracking track content of video target
US8165387B2 (en) Information processing apparatus and method, program, and recording medium for selecting data for learning
CN113569687A (en) Scene classification method, system, equipment and medium based on double-flow network
CN111091146A (en) Image similarity obtaining method and device, computer equipment and storage medium
CN116977774A (en) Image generation method, device, equipment and medium
CN108495150B (en) Method and device for determining video click satisfaction
CN112836600B (en) Video similarity calculation method and system
CN111444823A (en) Method, apparatus, computer device and storage medium for processing video data
Bhaumik et al. Real-time storyboard generation in videos using a probability distribution based threshold
CN111444386A (en) Video information retrieval method and device, computer equipment and storage medium
CN112929729B (en) Barrage data adjustment method, device, equipment and storage medium

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