CN107169004B - Feature database updating method and device - Google Patents

Feature database updating method and device Download PDF

Info

Publication number
CN107169004B
CN107169004B CN201710207430.4A CN201710207430A CN107169004B CN 107169004 B CN107169004 B CN 107169004B CN 201710207430 A CN201710207430 A CN 201710207430A CN 107169004 B CN107169004 B CN 107169004B
Authority
CN
China
Prior art keywords
video
database
clip
video clip
shot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710207430.4A
Other languages
Chinese (zh)
Other versions
CN107169004A (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 CN201710207430.4A priority Critical patent/CN107169004B/en
Publication of CN107169004A publication Critical patent/CN107169004A/en
Application granted granted Critical
Publication of CN107169004B publication Critical patent/CN107169004B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a method and a device for updating a feature database, wherein the method comprises the following steps: acquiring a plurality of video files; acquiring video characteristic information of each video file, and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to all the shots; extracting key frames of all the video clips and video characteristics of all the key frames; for each video clip, determining the repetition times of the video clip according to the video characteristics of the video clip; and determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repeated times of the video clip. By the method and the device for updating the feature database, the workload of manpower can be reduced, and the working efficiency can be improved.

Description

Feature database updating method and device
Technical Field
The invention relates to the technical field of video processing, in particular to a feature database updating method and device.
Background
The video website is born in the internet era of high-speed development, is different from the traditional television media, and has more interactivity with the network media. The user is not limited by time and region any more, and can watch the program content on the video website at any time. As more and more users tend to watch programs on the video website, the quality requirements of the users for the program contents of the video website are higher and higher, for example, the users want to reduce the time of advertisement playing, skip the beginning and end of a title, etc. during watching the video.
The video website needs to receive live broadcast signals of a large number of television stations at the same time every day, and the live broadcast signals are processed and converted into video-on-demand with programs as units for users to watch on-demand. Wherein the processing generally comprises: removing commercials from a television program, locating titles and trailers, splitting a news video into sub-news, and so forth. These processes require real-time and if the operations are all performed manually, the workload is extremely high, requiring multiple people to work continuously for 24 hours per day. In order to quickly locate effective contents of various programs, information of a video image needs to be detected to remove contents such as a leader, a trailer, advertisements and the like in the video.
Since the styles of various videos are very different, taking the detection of the head and the tail of a video as an example, in the prior art, a method based on feature matching is usually used to search the head and the tail of a video. The method based on the feature matching specifically comprises the following steps: the method comprises the steps of obtaining video files of a leader and a trailer after manual segmentation in advance, carrying out shot detection, key frame extraction and feature extraction on the video files to obtain visual features describing the visual uniqueness of each shot, and establishing a feature database for the features in advance; when live video is input, shot detection, key frame extraction and feature extraction are carried out in the same way, according to the extracted features, searching is carried out in the feature database, and if matched features exist in the feature database, a shot corresponding to the features is considered to be a leader shot or a trailer shot.
The video image detection method is simple to operate and relatively universal, but has obvious defects. For the detection that the feature matching cannot be realized for the video features which do not exist in the feature database, the video features in the feature database need to be updated manually, and the feature database needs to be maintained continuously.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for updating a feature database, so as to achieve the purposes of reducing the workload of manpower and improving the working efficiency. The specific technical scheme is as follows:
the invention provides a feature database updating method, which comprises the following steps:
acquiring a plurality of video files;
acquiring video characteristic information of each video file, and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to all the shots;
extracting key frames of all the video clips and video characteristics of all the key frames;
for each video clip, determining the repetition times of the video clip according to the video characteristics of the video clip;
and determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repeated times of the video clip.
Optionally, for each video file, acquiring the video feature information of the video file includes:
and acquiring the video characteristic information of the video file through the electronic program guide information.
Optionally, the determining, for each video segment, the number of repetitions of the video segment according to the video feature of the video segment includes:
constructing a hollow database;
counting the total number of video features of each video clip and the first number of video features of the video clip existing in the database respectively for each video clip;
judging whether the video clip exists in the database or not according to the statistical result;
if not, storing the video characteristics of the video clip in the database, and setting the repetition times of the video clip as an initial value;
if so, the number of repetitions of the video segment is updated.
Optionally, the determining whether the video segment exists in the database according to the statistical result includes:
and when the total number is larger than the preset multiple of the first number, determining that the video clip exists in the database.
Optionally, the updating the number of repetitions of the video segment includes:
and adding 1 to the repetition times to obtain updated repetition times.
Optionally, the determining whether to store the video features of the video segment in a pre-established feature database according to the number of times of repetition of the video segment includes:
and if the repetition times of the video clip are greater than a preset threshold value, storing the video characteristics of the video clip in a pre-established characteristic database.
Optionally, if the number of times of repetition of the video segment is greater than a preset threshold, storing the video features of the video segment in a pre-established feature database, including:
if the repetition times of the video clip is greater than a preset threshold value, searching whether the video characteristics of the video clip exist in the pre-established characteristic database;
and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
The invention also provides a feature database updating device, which comprises:
the acquisition module is used for acquiring a plurality of video files;
the shot segmentation module is used for acquiring video characteristic information of each video file and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to all the shots;
the extraction module is used for extracting key frames of all the video clips and video characteristics of all the key frames;
the video processing module is used for determining the repetition times of each video clip according to the video characteristics of the video clip;
and the storage module is used for determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repetition times of the video clip.
Optionally, the shot segmentation module is specifically configured to obtain video feature information of the video file through electronic program guide information.
Optionally, the video processing module includes:
newly building a submodule for building an empty database;
the counting submodule is used for respectively counting the total number of the video characteristics of each video clip and the first number of the video characteristics of the video clip existing in the database;
the judging submodule is used for judging whether the video clip exists in the database or not according to the statistical result;
the storage submodule is used for storing the video characteristics of the video clip in the database and setting the repetition times of the video clip as an initial value when the judgment result of the judgment submodule is negative;
and the updating submodule is used for updating the repetition times of the video clip when the judgment result of the judging submodule is yes.
Optionally, the determining sub-module is specifically configured to determine that the video segment exists in the database when the total number is greater than a preset multiple of the first number.
Optionally, the update submodule is specifically configured to add 1 to the repetition number to obtain an updated repetition number.
Optionally, the storage module is specifically configured to store the video features of the video segment in a pre-established feature database if the number of times of repetition of the video segment is greater than a preset threshold.
Optionally, the storage module is specifically configured to search whether the video feature of the video segment exists in the pre-established feature database; and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
According to the feature database updating method and device provided by the embodiment of the invention, shot segmentation can be performed on each video file to obtain the video segments corresponding to each shot, the video features of each video segment are extracted, the repetition times of each video segment are determined according to the video features of each video segment, and whether the video segment is stored in the pre-established feature database or not is judged according to the repetition times of each video segment, so that the pre-established feature database can be continuously updated according to the video features and the repetition times of each video segment, the updated feature database does not need a large amount of manual intervention and manual maintenance, and the working efficiency is improved. 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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a feature database updating method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for shot segmentation according to an embodiment of the present invention;
FIG. 3 is a flow chart of determining the number of repetitions of a video segment according to an embodiment of the present invention;
FIG. 4 is a block diagram of a feature database update apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video processing module 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 by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to reduce the workload of manpower and improve the work efficiency, embodiments of the present invention provide a method and an apparatus for updating a feature database, which are described in detail below.
Fig. 1 is a flowchart of a feature database updating method according to an embodiment of the present invention, including the following steps:
step 101, acquiring a plurality of video files;
the method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a desktop computer, an intelligent mobile terminal, a portable computer, or the like.
In the embodiment of the invention, the electronic equipment has various modes of acquiring the video file, for example, the video file can be directly acquired on an interactive network platform in a cooperation mode; the contents on the interactive network platform can be traversed by using a crawler tool to obtain a video file; video files and the like in the digital television set top box can be exported by utilizing a hardware analysis tool.
In this step, the electronic device may obtain video files of a plurality of television stations and a plurality of channels. Different television stations include high definition, normal quality video signals, for example, high definition video frames having an aspect ratio of 16:9 and normal video frames having an aspect ratio of 4: 3. The aspect ratios of different video frames interfere with each other when the characteristic frames are extracted, so that the video frames with different aspect ratios can be separated and extracted, and when a plurality of video files are acquired, the video files can be processed separately according to signals with different image qualities.
102, acquiring video characteristic information of each video file, and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to the shots;
and (4) respectively processing the plurality of video files acquired in the step (101). And acquiring the video characteristic information of each video file. The video feature information of any video file may include: the name of the television station to which the video file belongs, the program name and type of the video file, the start time of the video, and the like.
There are various methods for acquiring video characteristic information of a video file by an electronic device, and the methods correspond to corresponding methods for acquiring the video file respectively. For example, video feature information of a video file provided by an interactive network platform is directly acquired through a cooperation mode; traversing the content on the interactive network platform by using a crawler tool to acquire video characteristic information of the video file; and exporting video characteristic information of the video file in the set top box by using a hardware analysis tool.
In the embodiment of the invention, the video characteristic information of the video file provided by the interactive network platform can be directly acquired through the cooperation mode aiming at each video file. Specifically, the video feature information of the video file may be acquired by a method of acquiring electronic program guide information. The electronic program guide information is television program information guide provided for users in an interactive network platform, wherein the information comprises starting time of programs, program names and the like, and the rough positioning of video characteristic information can be realized based on prompts in the electronic program guide information.
Specifically, the linked list with fields can be established through information guidance in the electronic program guide information. For video files from the same television station, a field can be established for each television program, each field comprises the television station, the program name, the type, the starting time and the like, and the field of the channel in one day forms a television station linked list; any program in each television station linked list can be counted, and all fields with program names and types not belonging to the advertisement can be formed into a program repeated linked list. And selecting the starting time corresponding to the program of each field aiming at each field in the program repeated linked list, for example, selecting the areas of the first 5 minutes before the starting time and the 5 minutes before the ending time as target areas, using the target areas as the areas to be researched, and updating the target areas in the program repeated linked list.
And traversing the television station linked lists of the same television station, counting the television station linked lists in different time ranges, and counting all fields of which the types do not belong to the advertisement according to the program name for any one of the programs to form a time repeated linked list. For each field in the time repetition linked list, selecting the starting time corresponding to the program of each field, for example, selecting the areas 5 minutes before the starting time and 5 minutes before the ending time as the target areas, and updating the target areas in the time repetition linked list.
The above-mentioned building of the program repeated linked list and the time repeated linked list is an implementation method for obtaining the video characteristic information of each video file, and in practical application, the method is not limited to this method. After the video feature information of each video file is acquired, the electronic device can also perform shot segmentation on each video file according to the acquired video feature information.
The shot segmentation aims to perform shot detection on a video file, and the shot detection aims to cluster and combine similar video frames in the video file into a shot and segment the video file into segments with the shot as a unit. For example, the field for updating the program repeat linked list or the time repeat linked list is the shot number, etc.
103, extracting key frames of all the video clips and video characteristics of all the key frames;
in this step, for each video clip obtained by the shot segmentation, a key frame of each video clip is extracted. For each obtained video clip, a shot representing the clip is selected, and key frames of each shot are extracted, so that the aim of reducing the overall calculation amount is fulfilled.
For example, m frames are extracted from a shot as a representative frame based on a preset number m of frames, an interval gap of the extracted video frames is calculated as (e-s)/(m +1), e represents a start position of the current frame, s represents an end position of the current frame, and the video frames are extracted from the current frame at the gap interval as a key frame.
When extracting the video features of the key frame, in order to avoid the interference of information such as different television station logos and additional subtitles, the pixels in the image area (x, y, w, z) of the key frame can be preset to participate in the calculation of the visual features, wherein x represents the horizontal axis starting point coordinate of the image area, y represents the horizontal axis end point coordinate of the image area, w represents the vertical axis starting point coordinate of the image area, and z represents the vertical axis end point coordinate of the image area. Pixels outside the image area are not involved in the feature calculation and pixels within the area are referred to as sub-images.
There are several ways to extract features from sub-images, and a simple embodiment is: converting RGB values of the sub-images into gray values, performing Gaussian fuzzy filtering on the gray images to remove noise interference, equally dividing the processed sub-images into 4 blocks, calculating hash codes corresponding to coefficients of each block after discrete cosine transform, and concatenating the hash codes of the 4 blocks to form visual features, wherein a plurality of visual features can be extracted for one lens.
104, aiming at each video clip, determining the repetition times of the video clip according to the video characteristics of the video clip;
in this step, the repetition times of each video clip are determined by taking the shot as a unit according to the video characteristics of the video clip. The method for determining the number of repetitions may be that for each video feature of a shot, there is a corresponding hash code, and whether the video features are the same video feature is determined according to the hash codes. And matching the video characteristics, and counting the repetition times of the shot, namely the video clip when the video characteristics in the same shot are repeated.
By determining the number of repetitions of each video segment, matching of all video segments can be accomplished for subsequent further processing of the video segment. For each video segment, its number of repetitions needs to be determined.
And step 105, determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repetition times of the video clip.
Based on the number of repetitions of the video segment obtained in step 104, it can be determined whether to store the video features of the video segment in a pre-established feature database. Whether the video clip is in the target area, such as the clip and the shot which we are interested in, can be determined by the repetition times of the video clip. In practical applications, a leader, a trailer, or a piece of advertisement inserted into a video file may be used as the target area.
When the repetition times meet a certain condition, for example, if the repetition times of the video segment are greater than a preset threshold, the video features of the video segment are stored in a pre-established feature database. For example, in the statistical time repetition list and the program repetition list of the electronic device, a determination threshold value Ths is set to a × M,0< a <1, and a is a constant, taking the program as the granularity and the sum M of the numbers of fields with different start times in the video segment. When the number of repetitions is greater than Ths, the video segment is a target area, which may be a leader, trailer, or a commercial inserted into the video file.
The embodiment of the invention provides a feature database updating method, which comprises the steps of carrying out shot segmentation on each video file to obtain video segments corresponding to each shot, extracting video features of each video segment, determining the repetition times of each video segment according to the video features of each video segment, judging whether the video segment is stored in a pre-established feature database or not according to the repetition times of each video segment, and if the repetition times are greater than a preset threshold value and the pre-established feature database does not have the video features of the video segment, storing the video segment in the pre-established feature database so as to continuously update the pre-established feature database according to the video features and the repetition times of each video segment, so that the updated feature database does not need a large amount of manual intervention and manual maintenance, and the working efficiency is improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, it shows a flowchart of a method for lens segmentation in the embodiment of the present invention, where the method includes the following steps:
step 201, drawing a color histogram of a three primary color light mode (RGB) value of an input video frame;
the RGB values of the images in the input video frames can be converted by existing computer program software, such as Java. For example, a Raster may be used to obtain RGB values for each pixel of a video frame, thereby calculating the RGB values for each incoming video frame. And, using these RGB values, a color histogram of each video frame can be drawn using OpenCV or Matlab.
Step 202, calculating Euclidean distance of color histograms of adjacent frames in a time domain;
and calculating Euclidean distance between color histograms of adjacent frames in the time domain, namely the straight-line distance between a point on the histogram and a point.
And step 203, carrying out lens segmentation according to the Euclidean distance value.
If the Euclidean distance value is larger than a preset threshold Th1, the shot is considered to be sheared, and all video frames between the starting position e and the ending position s of the current frame are recorded as a shot; calculating Euclidean distance of a histogram between a current frame and n frames before the current frame, if the Euclidean distance is larger than a preset threshold Th2, considering that the shot gradual change occurs at the position, and recording all video frames between a starting position e1 and an ending position s1 of the current frame as a shot. If none of the above conditions is met, determining that the current frame is inside a shot, continuing to detect shot segmentation points, and repeating step 201 and step 202.
As an implementation manner of the embodiment of the present invention, a flowchart for determining the number of repetitions of each video segment according to the video characteristics of the video segment is shown in fig. 3, and includes the following steps:
step 301, constructing a hollow database;
step 302, respectively counting the total number of video features of each video clip and a first number of video features of the video clip existing in a database;
and counting the total number of the video features of each video clip, counting the number of the video features of the video clip in the established empty database, and recording the number value as a first number. The total number and the first number of the video features of the video clip are counted to determine whether the video clip exists in the database.
Step 303, judging whether the video clip exists in the database according to the statistical result; if yes, go to step 304 a; if not, go to step 304 b;
and judging that the video clip exists in the database when the total number and the first number meet a certain relation according to the statistics. A specific method may be that, when the total number is greater than a preset multiple of the first number, it is determined that the video clip exists in the database.
And when the total number obtained by statistics is larger than a preset multiple of the first number, the video clip is considered to be in the database. For example, when the video segment contains n video features, the video segment is considered not to exist in the database if the first number of video features of the video segment in the database is less than n/2; the video segment is considered to be present in the database if the first number of video features of the video segment in the database is greater than n/2. When the total number is greater than the preset multiple of the first number, most of the features of the video clip are considered to be stored in the database, so that the video clip can be determined to be present in the database. The preset multiple can be set arbitrarily according to the needs of users.
Step 304a, storing the video characteristics of the video clip in a database, and setting the repetition times of the video clip as an initial value;
if the video segment does not exist in the database, storing the video characteristics of the video segment in the database, and setting the number of repetitions of the video segment to an initial value. For example, the number of repetitions of a video clip that is initially stored in the database is set to 1.
Step 304b, updating the number of repetitions of the video segment.
If the video segment is judged to be in the database, the repetition times of the video segment are updated to obtain a new repetition time, and specifically, the new repetition time can be updated to be the original repetition time plus 1, which indicates that the video segment is repeated for 1 time.
As an implementation manner of the embodiment of the present invention, when the electronic device stores the video segment in the pre-established feature database, it may further determine whether the video segment exists in the pre-established feature data according to the determined target area. If the repetition times of the video clip is greater than a preset threshold value, searching whether the video characteristics of the video clip exist in a pre-established characteristic database; and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
When the repetition number of the video segment is greater than the preset threshold, before storing the video features of the video segment in the pre-established feature database, the electronic device may first search whether the video features of the video segment exist in the pre-established feature database, and if the video features of the video segment exist, the video features of the video segment do not need to be stored. If the video features of the video segment do not exist, the video features of the video segment need to be stored.
The embodiment of the invention searches whether the video characteristics of the video clip exist in the pre-established characteristic database or not, so as to avoid the video characteristics of the video clip from being stored repeatedly and waste the space of the pre-established characteristic database, and only under the condition that the video characteristics of the video clip are not stored, the video characteristics of the video clip can be stored in the pre-established characteristic database.
The present invention also provides a feature database updating apparatus, the structure diagram of which is shown in fig. 4, including:
an obtaining module 401, configured to obtain a plurality of video files;
a shot segmentation module 402, configured to obtain video feature information of each video file, and perform shot segmentation on the video file according to the obtained video feature information to obtain video segments corresponding to each shot;
an extracting module 403, configured to extract key frames of each video segment and video features of each key frame;
a video processing module 404, configured to determine, for each video segment, a number of repetitions of the video segment according to a video feature of the video segment;
a storage module 405, configured to determine whether to store the video features of the video segment in a pre-established feature database according to the number of times of repetition of the video segment.
According to the feature database updating device provided by the embodiment of the invention, each video file is shot-cut to obtain the video segments corresponding to each shot, the video features of each video segment are extracted, the repetition times of each video segment are determined according to the video features of each video segment, and whether the video segment is stored in the pre-established feature database or not is judged according to the repetition times of each video segment, so that the pre-established feature database can be continuously updated according to the video features and the repetition times of each video segment, the updated feature database does not need a large amount of manual intervention and manual maintenance, and the working efficiency is improved.
Optionally, the shot segmentation module 402 is specifically configured to obtain video feature information of the video file through the electronic program guide information.
Specifically, the schematic structural diagram of the video processing module 404, as shown in fig. 5, includes:
a new submodule 501 is created for constructing an empty database;
a statistics submodule 502, configured to separately count, for each video segment, the total number of video features of the video segment and a first number of video features of the video segment existing in the database;
a judging submodule 503, configured to judge whether the video segment exists in the database according to the statistical result;
a storage sub-module 504, configured to, if the determination result of the determining sub-module is negative, store the video characteristics of the video segment in the database, and set the number of times of repetition of the video segment as an initial value;
and the updating sub-module 505 is configured to update the repetition number of the video segment when the determination result of the determining sub-module is yes.
Optionally, the determining sub-module 503 is specifically configured to determine that the video segment exists in the database when the total number is greater than a preset multiple of the first number.
Optionally, the update sub-module 505 is specifically configured to add 1 to the repetition number to obtain an updated repetition number.
Optionally, the storage module 405 is specifically configured to store the video features of the video segment in a pre-established feature database if the number of times of repetition of the video segment is greater than a preset threshold.
Optionally, the storage module 405 is specifically configured to search whether a video feature of the video segment exists in a pre-established feature database; and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
It should be noted that, the apparatus according to the embodiment of the present invention is an apparatus applying the above feature database updating method, and all embodiments of the above feature database updating method are applicable to the apparatus and can achieve the same or similar beneficial effects.
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 system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
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 (14)

1. A method for feature database update, the method comprising:
acquiring a plurality of video files;
acquiring video characteristic information of each video file, and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to all the shots; the shot segmentation aims at carrying out shot detection on the video file, and the shot detection aims at clustering and combining similar video frames in the video file into a shot;
extracting key frames of all the video clips and video characteristics of all the key frames;
for each video clip, determining the number of times of repetition of the video clip in each video clip of the plurality of video files by taking a shot corresponding to the video clip as a unit according to the video characteristics of the video clip;
and determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repeated times of the video clip.
2. The method of claim 1, wherein for each video file, obtaining video feature information of the video file comprises:
and acquiring the video characteristic information of the video file through the electronic program guide information.
3. The method according to claim 2, wherein the determining, for each video clip, the number of times that the video clip is repeated in each video clip of the plurality of video files in units of shots corresponding to the video clip according to the video features of the video clip comprises:
constructing a hollow database;
counting the total number of video features of each video clip and the first number of video features of the video clip existing in the database respectively for each video clip;
judging whether the video clip exists in the database or not according to the statistical result;
if not, storing the video characteristics of the video clip in the database, and setting the repetition times of the video clip as an initial value;
if so, the number of repetitions of the video segment is updated.
4. The method of claim 3, wherein said determining whether the video segment exists in the database according to the statistical result comprises:
and when the total number is larger than the preset multiple of the first number, determining that the video clip exists in the database.
5. The method of claim 3, wherein the updating the number of repetitions of the video segment comprises:
and adding 1 to the repetition times to obtain updated repetition times.
6. The method according to any one of claims 1 to 5, wherein determining whether to store the video features of the video segment in a pre-established feature database according to the number of repetitions of the video segment comprises:
and if the repetition times of the video clip are greater than a preset threshold value, storing the video characteristics of the video clip in a pre-established characteristic database.
7. The method of claim 6, wherein if the number of repetitions of the video segment is greater than a predetermined threshold, the step of storing the video features of the video segment in a pre-established feature database comprises:
if the repetition times of the video clip is greater than a preset threshold value, searching whether the video characteristics of the video clip exist in the pre-established characteristic database;
and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
8. An apparatus for updating a feature database, the apparatus comprising:
the acquisition module is used for acquiring a plurality of video files;
the shot segmentation module is used for acquiring video characteristic information of each video file and performing shot segmentation on the video files according to the acquired video characteristic information to obtain video clips corresponding to all the shots; the shot segmentation aims at carrying out shot detection on the video file, and the shot detection aims at clustering and combining similar video frames in the video file into a shot;
the extraction module is used for extracting key frames of all the video clips and video characteristics of all the key frames;
the video processing module is used for determining the number of times of repetition of each video clip in each video clip of the plurality of video files by taking the shot corresponding to the video clip as a unit according to the video characteristics of the video clip;
and the storage module is used for determining whether to store the video characteristics of the video clip in a pre-established characteristic database according to the repetition times of the video clip.
9. The apparatus of claim 8, wherein the shot segmentation module is specifically configured to obtain video feature information of the video file through electronic program guide information.
10. The apparatus of claim 8, wherein the video processing module comprises:
newly building a submodule for building an empty database;
the counting submodule is used for respectively counting the total number of the video characteristics of each video clip and the first number of the video characteristics of the video clip existing in the database;
the judging submodule is used for judging whether the video clip exists in the database or not according to the statistical result;
the storage submodule is used for storing the video characteristics of the video clip in the database and setting the repetition times of the video clip as an initial value when the judgment result of the judgment submodule is negative;
and the updating submodule is used for updating the repetition times of the video clip when the judgment result of the judging submodule is yes.
11. The apparatus according to claim 10, wherein the determining sub-module is specifically configured to determine that the video segment exists in the database when the total number is greater than a preset multiple of the first number.
12. The apparatus according to claim 10, wherein the update submodule is configured to add 1 to the repetition number to obtain an updated repetition number.
13. The apparatus according to any one of claims 8 to 12, wherein the storage module is specifically configured to store the video features of the video segment in a pre-established feature database if the number of repetitions of the video segment is greater than a preset threshold.
14. The apparatus according to claim 13, wherein the storage module is specifically configured to search whether the video feature of the video segment exists in the pre-established feature database; and if not, storing the video characteristics of the video clip in a pre-established characteristic database.
CN201710207430.4A 2017-03-31 2017-03-31 Feature database updating method and device Active CN107169004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710207430.4A CN107169004B (en) 2017-03-31 2017-03-31 Feature database updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710207430.4A CN107169004B (en) 2017-03-31 2017-03-31 Feature database updating method and device

Publications (2)

Publication Number Publication Date
CN107169004A CN107169004A (en) 2017-09-15
CN107169004B true CN107169004B (en) 2021-07-30

Family

ID=59849687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710207430.4A Active CN107169004B (en) 2017-03-31 2017-03-31 Feature database updating method and device

Country Status (1)

Country Link
CN (1) CN107169004B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769731B (en) * 2018-05-25 2021-09-24 北京奇艺世纪科技有限公司 Method and device for detecting target video clip in video and electronic equipment
CN110324729B (en) * 2019-07-18 2021-08-27 北京奇艺世纪科技有限公司 Method, device, electronic equipment and medium for identifying infringement video link
CN112422240B (en) * 2020-10-26 2023-01-24 鹏城实验室 Data transmission method, system, hardware system and computer storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650740A (en) * 2009-08-27 2010-02-17 中国科学技术大学 Method and device for detecting television advertisements
CN103235956A (en) * 2013-03-28 2013-08-07 天脉聚源(北京)传媒科技有限公司 Method and device for detecting advertisements

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI312129B (en) * 2006-03-10 2009-07-11 Nat Cheng Kung Universit A video summarization system and the method thereof
CN101201822B (en) * 2006-12-11 2010-06-23 南京理工大学 Method for searching visual lens based on contents
CN103226571A (en) * 2013-03-26 2013-07-31 天脉聚源(北京)传媒科技有限公司 Method and device for detecting repeatability of advertisement library
CN103475935A (en) * 2013-09-06 2013-12-25 北京锐安科技有限公司 Method and device for retrieving video segments

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650740A (en) * 2009-08-27 2010-02-17 中国科学技术大学 Method and device for detecting television advertisements
CN103235956A (en) * 2013-03-28 2013-08-07 天脉聚源(北京)传媒科技有限公司 Method and device for detecting advertisements

Also Published As

Publication number Publication date
CN107169004A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN108769731B (en) Method and device for detecting target video clip in video and electronic equipment
CN1279752C (en) Family histogram based techniques for detection of commercials and other video content
DE60029746T2 (en) AUTOMATIC SIGNATURE-BASED RECOGNITION, LEARNING AND EXTRACTION OF ADVERTISING AND OTHER VIDEO CONTENT
US6366699B1 (en) Scheme for extractions and recognitions of telop characters from video data
CN107169004B (en) Feature database updating method and device
CN107135401B (en) Key frame selection method and system
US20030061612A1 (en) Key frame-based video summary system
US9596520B2 (en) Method and system for pushing information to a client
JP2002521977A (en) Apparatus and method for locating commercials located within a video data stream
US20100246944A1 (en) Using a video processing and text extraction method to identify video segments of interest
CN111753673A (en) Video data detection method and device
CN112752151B (en) Method and device for detecting dynamic advertisement implantation position
CN107820095B (en) Long-term reference image selection method and device
US10965965B2 (en) Detecting of graphical objects to identify video demarcations
CN102523482A (en) Advertisement monitoring technology based on video content and regression method
US20210319230A1 (en) Keyframe Extractor
CN108446603B (en) News title detection method and device
CN112565820B (en) Video news splitting method and device
CN112437344B (en) Video matching method and terminal
CN101241552B (en) Image characteristic recognition method and device
CN112287800A (en) Advertisement video identification method and system under no-sample condition
CN108388872B (en) Method and device for identifying news headlines based on font colors
KR20030030304A (en) Video-on-demand service compression system and method
CN114567798B (en) Tracing method for short video variety of Internet
CN105678298A (en) Station logo recognition method

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