Method and device for determining similar videos
By dividing video frames into shots and comparing shot features, the problem of low accuracy of video similarity judgment in the existing technology is solved, and more accurate similar video recognition in massive videos is achieved.
Patent Information
- Application Number
- CN202110008114.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-05
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-01-05
Smart Images

Figure CN113762014B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for determining similar videos. Background Art
[0002] With the rapid development of multimedia technology and the Internet, various types of video information have appeared widely in people's daily lives. Many video-related content and services continue to emerge and enrich people's lives, playing an important role in people's daily lives.
[0003] When searching, managing, and protecting copyrights of massive videos on the Internet, it is necessary to determine the similarity between videos. However, existing methods for determining similar videos often have the problem of low accuracy. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and apparatus for determining similar videos, which can determine similar videos more accurately.
[0005] In a first aspect, an embodiment of the present invention provides a method for determining similar videos, including:
[0006] Acquire a video to be processed, where the video to be processed includes multiple video frames;
[0007] Dividing the plurality of video frames into a plurality of video shots, each of the video shots comprising at least one video frame;
[0008] According to the shot similarity between the video shot and the candidate video shot, a candidate video similar to the video to be processed is determined, wherein the candidate video includes the candidate video shot.
[0009] Optionally, dividing the multiple video frames into multiple video shots includes:
[0010] For any two adjacent video frames among the plurality of video frames: determining a difference value between the two adjacent video frames;
[0011] Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames;
[0012] The plurality of video frames are divided into a plurality of video shots according to the shot conversion positions.
[0013] Optionally, determining the difference value between the two adjacent video frames includes:
[0014] Determining the histograms of the two adjacent video frames respectively, wherein the histograms indicate the number or probability of image information in the video frames appearing within a predefined value range;
[0015] According to the histograms of the two adjacent video frames, an inter-frame histogram difference of the two adjacent video frames is calculated, and the inter-frame histogram difference is determined as a difference value between the two adjacent video frames.
[0016] Optionally, determining the shot conversion position according to the difference value between any two adjacent video frames includes:
[0017] Determine whether the difference value between the two adjacent video frames is greater than a difference threshold;
[0018] If so, determining that there is a shot switching position between the two adjacent video frames;
[0019] If not, it is determined that there is no shot switching position between the two adjacent video frames.
[0020] Optionally, determining a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot includes:
[0021] Determining lens characteristics of the video lens;
[0022] Determining the shot similarity between the video shot and the candidate video shot according to the shot features of the video shot and the shot features of the candidate video shot;
[0023] The shot similarity is used to determine the video similarity between the video to be processed and the candidate video;
[0024] The candidate videos whose video similarity is greater than or equal to the video similarity threshold are determined as candidate videos similar to the video to be processed.
[0025] Optionally, determining the lens feature of the current video lens includes:
[0026] Determine the image features and weights of each video frame in the current video shot;
[0027] The shot features of the current video shot are determined according to the image features and the weights.
[0028] Optionally, determining the video similarity between the to-be-processed video and the candidate video according to the shot similarity includes:
[0029] Determine at least one candidate shot contained in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold;
[0030] The video similarity between the to-be-processed video and the candidate video is determined according to the statistical value of the shot similarity of the candidate shots.
[0031] Optionally, the method further comprises:
[0032] Determine the number of candidate shots in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold;
[0033] The video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0034] Optionally, the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots, to determine the video similarity between the to-be-processed video and the candidate video, comprises:
[0035] Determine whether the number is greater than a number threshold, where the number threshold is proportional to the number of video shots in the video to be processed;
[0036] If so, the video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0037] Optionally, dividing the multiple video frames into multiple video shots further includes:
[0038] For each video frame in the video shot: determining whether the video frame is a video frame to be filtered; if so, deleting the video frame from the video shot.
[0039] Optionally, the determining whether the video frame is a video frame to be filtered includes:
[0040] Calculating the brightness value of the video frame; determining whether the brightness value is less than a brightness threshold; if so, determining that the video frame is a video frame to be filtered;
[0041] and / or,
[0042] Calculating the blurriness value of the video frame; determining whether the blurriness value is less than a blurriness threshold; if so, determining that the video frame is a video frame to be filtered;
[0043] and / or,
[0044] Calculate the image equalization value of the video frame; determine whether the image equalization value is greater than an equalization threshold; if so, determine that the video frame is a video frame to be filtered.
[0045] In a second aspect, an embodiment of the present invention provides a method for determining video features, including:
[0046] Obtain multiple candidate videos;
[0047] For each candidate video: determine at least one candidate video shot included in the candidate video; respectively determine the shot features of each candidate shot; determine and save the video features of the candidate video, the video features including: the identifier of the candidate video and the shot features of the candidate shot.
[0048] Optionally, the determining at least one candidate video shot included in the candidate video includes:
[0049] For any two adjacent video frames in each of the candidate videos: determining a difference value between the two adjacent video frames;
[0050] Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames;
[0051] According to the shot conversion position, it is determined that the candidate video includes at least one candidate video shot.
[0052] In a third aspect, an embodiment of the present invention provides a device for determining similar videos, including:
[0053] A frame capture module, used to obtain a video to be processed, wherein the video to be processed includes a plurality of video frames;
[0054] A shot division module, used for dividing the plurality of video frames into a plurality of video shots, each of the video shots including at least one video frame;
[0055] The similarity determination module is used to determine a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot, wherein the candidate video includes the candidate video shot.
[0056] In a fourth aspect, an embodiment of the present invention provides a video feature determination device, including:
[0057] A video acquisition module, used to acquire multiple candidate videos;
[0058] A shot determination module is used to determine, for each candidate video: at least one candidate video shot included in the candidate video;
[0059] A feature determination module, used to respectively determine the lens feature of each candidate lens;
[0060] The record storage module is used to store the video feature record of the candidate video, and the video feature record includes: the identifier of the candidate video and the shot feature of the candidate shot.
[0061] In a fifth aspect, an embodiment of the present invention provides an electronic device, including:
[0062] one or more processors;
[0063] a storage device for storing one or more programs,
[0064] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0065] In a sixth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0066] An embodiment of the above invention has the following advantages or beneficial effects: multiple video frames in the video frame to be processed are divided into multiple different video shots, and the video shots are used as the similarity comparison unit to determine the candidate video similar to the video to be processed. Compared with the method of performing similarity comparison based on the entire video feature, the similarity between the video to be processed and other videos can be compared at a finer granularity, thereby more accurately determining the video similar to the video to be processed.
[0067] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0069] Figure 1 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0070] Figure 2 is a schematic diagram of a process of a method for determining similar videos provided by an embodiment of the present invention;
[0071] Figure 3 is a schematic diagram of a process of a shot-based video segmentation method provided by an embodiment of the present invention;
[0072] Figure 4 is a schematic diagram of a process of another method for determining similar videos provided by an embodiment of the present invention;
[0073] Figure 5 is a schematic diagram of a process of another method for determining similar videos provided by an embodiment of the present invention;
[0074] Figure 6 is a schematic diagram of a process of a method for determining video features provided by an embodiment of the present invention;
[0075] Figure 7is a structural schematic diagram of a device for determining similar videos provided by an embodiment of the present invention;
[0076] Figure 8 is a structural schematic diagram of a video feature determination device provided by an embodiment of the present invention;
[0077] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0078] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings; various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Likewise, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0079] Video similarity judgment technology usually selects appropriate visual features, measures the similarity of videos in the feature space of the videos, and searches in the video library to obtain the detection results. The following three methods can be used to measure the similarity between videos.
[0080] Method 1: Video feature-based method: Preprocess all videos in the video library offline to form a video feature library, and perform video structure analysis and feature extraction on the query clip online before searching in the video feature library. Use methods such as KD tree to search and determine the candidate video set, and search and determine the precise location of similar clips in the video object.
[0081] Method 2: Video fingerprint-based method: This method uses the local sensitive hashing algorithm to hash all video fingerprints in the video fingerprint database and the video fingerprint to be retrieved, so as to find the video fingerprint that is most similar to the video fingerprint to be detected. Based on the improved video fingerprint matching mechanism of biological sequence alignment technology BLAST, it is found whether the video fingerprint to be retrieved exists in the video fingerprint database, and the complete video to which the video clip to be retrieved belongs and the specific time position in which it appears are determined according to the characteristics of the video fingerprint.
[0082] Method 3: Using inverted index: This method first uses the inverted index method to establish an inverted index table for all videos in the video database, and calculates the corresponding candidate video set through the inverted index technology in the retrieval stage.
[0083] Video similarity judgment technology is a challenging problem. It is more complicated than text, image and audio similarity judgment, and often has problems such as limited algorithm application scope and low accuracy. The analysis of the above three methods is as follows:
[0084] For methods based on video features, when using this method, the impact of visual, temporal, and interference factors on similarity must be considered in the later stage, and similarity calculations and sorting of similar frequency bands must be performed; moreover, this method has a scope of application, and will cause problems when performing large-scale automatic retrieval, as the randomness of video features is difficult to satisfy.
[0085] For the video fingerprint-based method, this method compares the video fingerprint to a biological gene and uses a sequence analysis method for analysis. This algorithm involves backtracking during the comparison process, has a large algorithm overhead, and its time efficiency cannot meet the real-time requirements.
[0086] Regarding the method using the inverted index, this method compresses the video expression and improves the retrieval efficiency through the inverted index, but the retrieval accuracy still needs to be improved.
[0087] Based on this, an embodiment of the present invention provides a shot-based video similarity determination solution to more accurately determine the similarity between videos. Figure 1 An exemplary system architecture 100 is shown to which the method for determining similar videos or the apparatus for determining similar videos according to the embodiments of the present invention can be applied.
[0088] Figure 1 An exemplary system architecture 100 to which the indicator determination method or indicator determination device according to the embodiment of the present invention can be applied is shown.
[0089] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0090] Various tools for collecting videos, such as crawler tools, etc., can be deployed in the terminal devices 101, 102, and 103. The terminal devices 101, 102, and 103 can store videos collected in various ways. The terminal devices 101, 102, and 103 can be mobile phones, notebooks, tablet computers, laptop computers, and the like.
[0091] The terminal devices 101 , 102 , 103 interact with the server 105 via the network 104 to receive or send messages, etc. The terminal devices 101 , 102 , 103 send stored videos to the server 105 via the network 104 .
[0092] The server 105 receives the videos sent by the terminal devices 101, 102, and 103, and uses these videos as candidate videos. Multiple video frames in each candidate video are divided into multiple video shots, each of which includes at least one video frame; according to the lens features of the video shots in the video to be processed, the lens features of the multiple candidate video shots are compared to determine the candidate video similar to the video to be processed.
[0093] It should be noted that the method for determining similar videos provided in the embodiment of the present invention is generally executed by the server 105 , and accordingly, the device for determining similar videos is generally disposed in the server 105 .
[0094] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0095] Figure 2 FIG. 1 is a schematic diagram of a process of a method for determining similar videos provided by an embodiment of the present invention. An embodiment of the present invention provides a method for determining similar videos, such as Figure 2 As shown, including:
[0096] Step 201: Obtain a video to be processed, where the video to be processed includes multiple video frames.
[0097] Multiple video frames may be randomly intercepted from the video to be processed, or the video to be processed may be obtained at a predetermined interval, wherein the video to be processed includes multiple video frames. The predetermined interval may be pre-configured to limit the time interval between two adjacent video frames intercepted, and the predetermined interval may be 5 seconds, 8 seconds, or 10 seconds, etc.
[0098] Step 202: Divide a plurality of video frames into a plurality of video shots, each video shot including at least one video frame.
[0099] A video shot is a unit of the entire video. A video shot contains a group of video frames that are related in time and space. A video shot can be the sum of a group of video frames shot continuously by the same camera device.
[0100] Step 203: Determine a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot, wherein the candidate video includes the candidate video shot.
[0101] The video shots in the video to be processed can be matched frame by frame with other videos to determine whether other videos contain video clips and shot similarity values similar to the video shots, thereby determining videos similar to the video to be processed and the similarity between videos.
[0102] Alternatively, the other videos may be first divided into multiple video shots according to the above steps 201 and 202, and then the shot features of the video shots of the other videos are extracted and saved respectively, where the shot features represent the relevant information of the corresponding video shots. The shot features of the video to be processed are matched with the shot features of other videos to determine similar video shots and shot matching degrees, and then the similarity between the video to be processed and the other videos is determined.
[0103] In the embodiment of the present invention, multiple video frames in the video frame to be processed are divided into multiple video shots, and the video shots are used as the comparison unit of similarity to determine the similarity between the video to be processed and other videos. The method of the embodiment of the present invention can compare the similarity between the video to be processed and other videos at a finer granularity, which can solve the problem that the similarity between the video to be processed and other videos cannot be determined more accurately in the prior art.
[0104] In one embodiment of the present invention, before determining similar videos of the to-be-processed video according to the lens features of the plurality of video lenses, the method further includes:
[0105] For each video frame in the video shot: determining whether the video frame is a video frame to be filtered; if so, deleting the video frame from the video shot.
[0106] The video frames to be filtered are video frames that may affect the subsequent accurate determination of the lens characteristics of the video lens. The video frames to be filtered may be darker, more blurred, and unbalanced video frames. Based on the spatial information judgment of the video frames, the darker, more blurred, and unbalanced frames are removed through the algorithm to ensure that the video frames used by the subsequent algorithms are of high quality and improve the efficiency and accuracy of the algorithms.
[0107] The video frame to be filtered can be judged based on the brightness value, blur value and image balance value of the video frame. The specific method is as follows:
[0108] A method for processing a video frame to be filtered based on brightness value: calculating the brightness value of the video frame; determining whether the brightness value is less than a brightness threshold; if so, deleting the video frame from the video lens.
[0109] Filter the darker frames, that is, filter according to the brightness of the image content. A general video frame is composed of three channels, RGB (red, green, blue). Different weights are assigned to each channel according to the correlation degree. After obtaining the image quality brightness map, the pixels of each brightness map are normalized and the average value is taken. The calculation formula is as follows:
[0110]
[0111] Here i, j represent the pixels of the image; a, b represent the width and height of the image respectively; I r ,I g ,I b They represent the red, green, and blue channel images respectively; y1 is the brightness value of the image.
[0112] The larger the brightness value of the image, the brighter the image. The brightness value range of the image is [0,1]. After obtaining the brightness value of the image through the above company and filtering it through the brightness threshold T1, retain the video frames with a score greater than T1 for subsequent judgment. Here T1 is a hyperparameter and can be set according to actual needs, such as 0.08.
[0113] The processing method of the video frame to be filtered based on the blur degree value is as follows: calculating the blur degree value of the video frame; determining whether the blur degree value is less than a blur threshold; if so, deleting the video frame from the video lens.
[0114] Remove blurry video frames and filter according to the blurriness of the image content. For blurry video frames, the color information can be weakened and grayscale images can be used for judgment. From the perspective of image content, if the sharpness of the image content is higher, the contrast of the image details is higher and the image looks clearer. Conversely, the blurry image has a lower contrast, that is, the sharpness value of the image is also lower. Here, the image sharpness value calculation introduces the gradient value as the multiplicative factor calculation of the grayscale image. The calculation formula is as follows:
[0115]
[0116] In order to improve the calculation speed of the algorithm, the above formula can be simplified to the following formula:
[0117]
[0118] Here, a and b are the width and height of the image respectively; Δx and Δy are the horizontal and vertical gradients of the pixel respectively. y2 is the blur value of the image. The smaller the blur value of the image, the blurrier the image. The blur value range of the image is [0,1]. Filter by blur threshold T2, and retain video frames with scores greater than T2 for subsequent judgment. T2 is a hyperparameter and can be set according to actual needs, such as 0.1.
[0119] A method for processing a video frame to be filtered based on brightness value: calculating an image equalization value of the video frame; determining whether the image equalization value is greater than an equalization threshold; if so, determining that the video frame is a video frame to be filtered.
[0120] Filter the frames with uneven (uniform) grayscale of the picture. Here, to judge whether the picture is balanced (uniform), after selecting to calculate the image histogram equalization, select the sum of the grayscale of the first N% of the pixels in the statistical histogram to obtain the image balance value, N% can be 5%, 10%, 20%, etc. The calculation formula of the image balance value is shown as follows:
[0121] y3=top N% (norm_hist(I gray )).
[0122] top N% (norm_hist(I gray )) is the sum of the gray levels of the first N% in the histogram. The smaller the gray level balance value of the image, the more balanced (uniform) the image is, and the score range is [0,1]. For example, the score of black and white images is 1, which is very uneven in gray level. Such images need to be filtered out. Filter through the balanced reading threshold T3, and retain the video frames with a score less than T3 for the next step of judgment. T3 is a hyperparameter and can be set according to actual needs, such as 0.8.
[0123] In the prior art, the process of judging the similarity of videos is affected by visual, temporal and interference factors. Visual, temporal and interference factors are mainly caused by the rapid movement and shaking of the video lens, which leads to low-quality frames such as blurred video frames, which will affect the correct representation of visual features and interfere with similarity judgment. In view of the above problems, in an embodiment of the present invention, a method of removing low-quality frames in the spatial dimension and removing conversion frames in the temporal dimension is used to obtain high-quality video frames, thereby more accurately determining the similarity between videos.
[0124] Figure 3 FIG. 1 is a schematic diagram of a process of a lens-based video segmentation method provided by an embodiment of the present invention. The embodiment of the present invention provides a lens-based video segmentation method, such as Figure 3 As shown, including:
[0125] Step 301: Obtain a video to be processed, where the video to be processed includes multiple video frames.
[0126] Step 302: for any two adjacent video frames among the plurality of video frames: determine a difference value between the two adjacent video frames.
[0127] The difference value between two adjacent video frames is used to characterize the difference between the two adjacent videos. The difference value between two adjacent video frames can be represented by the difference in brightness between the two video frames, the difference image obtained by subtracting the corresponding pixel values of adjacent video frames, the distance value of the wavelet features of the two video frames, the contour frame difference of the two video frames, etc.
[0128] In one embodiment of the present invention, determining a difference value between two adjacent video frames includes:
[0129] Determine the histograms of two adjacent video frames respectively;
[0130] According to the histograms of two adjacent video frames, an inter-frame histogram difference of the two adjacent video frames is calculated, and the inter-frame histogram difference is determined as a difference value between the two adjacent video frames.
[0131] The histogram indicates the number or probability of the image information in the video frame appearing within a predefined range of values, where the image information can be the grayscale value of the image, the pixel value of a color channel, the comprehensive pixel information of multiple color channels, etc. Based on the spatial information of adjacent video frames in the time dimension, a simple and effective inter-frame histogram difference method can be used to obtain different video shots. The video shot is the basic unit for judging similarity features. The inter-frame histogram difference can be calculated by the following formula:
[0132]
[0133] In a preferred embodiment, the above histogram is a grayscale histogram, X 2 is the difference of the grayscale histogram between frames, m=n+1, k represents the number of predefined grayscale value ranges in the histogram - for example, there are 8 (k=8) predefined grayscale value ranges, i=1 represents the grayscale value of the pixel point is 0-31, i=2 represents the grayscale value of the pixel point is 32-63, ..., i=8 represents the grayscale value of the pixel point is 224-255. m (i) and h n (i) is the number of pixels in the mth or nth image whose grayscale values are in the i-th value range or the proportion (probability) of such pixels in the entire image. More specifically,
[0134]
[0135] Calculate the inter-frame histogram difference X of the entire video to be processed 2 , and get a one-dimensional array - the element X(n) in the one-dimensional array 2The inter-frame histogram difference between the video frame at the corresponding position and the next video frame adjacent to the video frame is indicated, and the position with the larger value in the array is determined. This position is where the image content changes the most, that is, the transition point of different shots in the video. According to this position, the video can be divided into several video shots. The difference between two adjacent video frames can be more accurately represented by the inter-frame histogram difference between two adjacent video frames.
[0136] Step 303: Determine a lens switching position according to the difference value between any two adjacent video frames, where the lens switching position is located between the two adjacent video frames.
[0137] Specifically, determining whether a difference value between two adjacent video frames is greater than a difference threshold;
[0138] If so, it is determined that there is a shot transition position between two adjacent video frames;
[0139] If not, it is determined that there is no shot switching position between two adjacent video frames.
[0140] A video shot contains a group of video frames that are related in time and space. If the difference between two adjacent video frames is large, the possibility that the two adjacent video frames belong to two different video shots is also large, that is, there is a high probability that there is a shot transition position between the two adjacent videos.
[0141] Step 304: Divide the plurality of video frames into a plurality of video shots according to the shot conversion positions.
[0142] In the embodiment of the present invention, the difference value between two adjacent video frames determines the shot conversion position, thereby segmenting the video to be processed into multiple video shots. The video segmentation method of the embodiment of the present invention can accurately segment a video into multiple video shots and is simple and easy to implement.
[0143] Figure 4 FIG. 1 is a schematic diagram of a process of a method for determining similar videos provided by an embodiment of the present invention. An embodiment of the present invention provides a method for determining similar videos, such as Figure 4 As shown, including:
[0144] Step 401: Obtain a video to be processed, where the video to be processed includes multiple video frames.
[0145] Step 402: Divide a plurality of video frames into a plurality of video shots, each video shot including at least one video frame.
[0146] Step 403: Determine the lens characteristics of the video lens.
[0147] The lens feature is used to characterize the feature information of the video lens. The lens feature can be represented by a set of lens-related feature vectors. Generally, the higher the similarity between two video lenses, the smaller the distance value between the lens features of the two video lenses.
[0148] In one embodiment of the present invention, determining the shot features of the current video shot includes:
[0149] Determine the image features and weights of each video frame in the current video shot;
[0150] According to the image features and weights, the weighted sum of the image features of the video frame is calculated, and the lens features of the current video lens are determined by the average value of the weighted sum.
[0151] Taking a shot as a unit, several video frames in the shot are subjected to a deep learning feature model to obtain the features of the video frame. This feature model replaces the traditional manual features, and the training method and method can be consistent with the feature model training in face recognition. For example, the Resnet backbone network can be used to obtain the 512-dimensional image features of each video frame. After obtaining the image features of each video frame, the feature vectors obtained are weighted according to the importance of the shot video frame, and then added and averaged. The specific formula is as follows:
[0152]
[0153] p(i) represents the weight of the i-th video frame, c can be the number of video frames in the video shot, or the sum of the weights of the video frames, and CNN(I(i)) represents the image features of the i-th video frame obtained using the convolutional neural network. Generally, in a video shot, the weight of the video frame in the middle position can be set larger, and the weight of the video frame at the edge position can be set smaller. For a 5-frame video shot, the weight of each video frame can be set to 0.5, 0.75, 1, 0.75 and 0.5 according to its position.
[0154] Optionally, if the number of video frames in the video shot exceeds a preset number, a preset number of video frames are extracted from the video frames in the video shot. The preset number can be set as needed, such as the preset number can be 5, then if the number of video frames in the video shot is more than 5 frames, the video frames are equidistantly extracted, and other video frames are deleted, and only 5 video frames are retained in the video shot.
[0155] Since the process of determining the lens features of the video lens in step 403 and the lens comparison process in step 404 both consume more system resources and require a longer execution time, therefore, only retaining video frames less than or equal to the preset number in the video lens can save system resources and reduce the execution time required for determining the similarity between videos.
[0156] Step 404: Determine the shot similarity between the video shot and the candidate video shot according to the shot features of the video shot and the shot features of the candidate video shot.
[0157] Divide other videos into multiple video shots, calculate the lens features of each video shot, and pre-store multiple lens features corresponding to other videos in the system. Calculate the similarity between the lens features of the video to be processed and the lens features of other videos in the video library, determine similar video shots and lens matching degrees, and then determine the similarity between the video to be processed and other videos. Among them, similar shots are video shots of other videos that are similar to the video shots of the video to be processed.
[0158] Compare the lens features of the video to be processed with the fine-grained spatiotemporal features obtained offline in the video library in units of lenses. The cosine distance or Hamming distance between the features of two lenses can be used to determine the similarity between the features of the two lenses. After a video to be processed obtains the similarity of several video lenses in the video library, the videos where the above similar video lenses are located and the repeated positions are uniformly returned to the system.
[0159] Step 405: Determine the video similarity between the video to be processed and the candidate video according to the shot similarity.
[0160] A similarity value can be preset in the system. If the shot similarity is greater than the similarity value, the corresponding video lens is determined to be a similar shot. According to the similarity score returned by each shot and the repeated video identification. If the similarity value (confidence) of the shot is greater than the threshold T, it is considered that there is a high similarity, and the shot and video identification are retained. Otherwise, it is filtered out. After processing, when the video identification of the high-similar shot in the final video is a single identification, the similar video of the video is considered to be a single video, and the video similarity value is the average of the shot similarity values; when the high-similar video identification is multiple identifications, the similar video of the video is considered to be a multi-source video, and the video similarity value is the value of the shot similarity value.
[0161] Step 406: Determine the candidate videos whose video similarity is greater than or equal to the video similarity threshold as candidate videos similar to the video to be processed.
[0162] In one embodiment of the present invention, determining the video similarity between the to-be-processed video and the candidate video according to the shot similarity includes:
[0163] Determine at least one candidate shot contained in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold;
[0164] The video similarity between the to-be-processed video and the candidate video is determined according to the statistical value of the shot similarity of the candidate shots.
[0165] The statistical value of the shot similarity may be the maximum shot similarity, the minimum shot similarity, the sum or average of the similarities of the candidate shots, etc.
[0166] For example, the average value of the similarity of each candidate shot is used as the statistical value of the shot similarity of the candidate shot. The candidate video includes three similar shots, and the similarity distribution of the three similar shots is 80%, 70% and 90%. Then, the similarity between the video to be processed and the candidate video is determined to be the average value of the similarity of the three similar shots (80%+70%+90%) / 3=80%.
[0167] In one embodiment of the present invention, the method further comprises:
[0168] Determining the number of similar shots contained in the source video and / or the shot similarity of the similar shots;
[0169] Determine similar videos of the video to be processed according to the number of similar shots and / or the shot similarity of the similar shots. Determine the number of candidate shots in the candidate videos whose shot similarity is greater than or equal to a shot similarity threshold;
[0170] The video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0171] There are many methods for determining similar videos to the video to be processed. For example, the source video containing the most similar shots can be determined as the similar video to the video to be processed. The source video with the greatest similarity to the video to be processed can be determined as the similar video to the video to be processed. All source videos with a number of similar shots greater than a preset number threshold and a similarity with the video to be processed greater than a video similarity threshold can also be determined as similar videos to the video to be processed.
[0172] In one embodiment of the present invention, the number of candidate shots and / or the statistical value of the shot similarity of the candidate shots, and determining the video similarity between the to-be-processed video and the candidate video, include:
[0173] Determine whether the number is greater than a number threshold, where the number threshold is proportional to the number of video shots in the video to be processed;
[0174] If so, the video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0175] The number threshold can be set according to actual needs and in proportion to the number of video shots in the video to be processed. If there are more similar videos in the source video, the source video is considered to be a similar video to the video to be processed, and the similar video to the video to be processed is a single video. The similarity value between the source video and the video to be processed is the average of the similarity values of the similar shots in the source video.
[0176] When the number of similar shots in the source videos is small, it is considered that the similar videos of the video to be processed are multi-source videos, and the similarity value between the source video and the video to be processed is the average of the similarity values of the similar shots in the source videos.
[0177] The embodiment of the present invention proposes a video similarity judgment method based on video shots under a deep learning framework. Taking video shots as units, the method uses high-quality videos filtered by an algorithm to extract the spatiotemporal features of video shots, and then compares and retrieves videos in a video library to obtain a single high-similar video or multi-source high-similar videos, and returns the identifiers of similar videos, the start and end positions of the shots, and the similarity scores, thereby achieving a fine-grained video similarity judgment effect.
[0178] Figure 5 FIG. 1 is a schematic diagram of a process of another method for determining similar videos provided by an embodiment of the present invention. The embodiment of the present invention provides a method for determining similar videos, such as Figure 5 As shown, it includes: input video, shot segmentation, low-quality frame filtering, shot spatiotemporal feature extraction, spatiotemporal feature comparison and similarity scoring.
[0179] The embodiment of the present invention proposes a fine-grained video similarity judgment method, which can extract the spatiotemporal characteristics of the shots based on the product introduction videos in the e-commerce products, and then perform shot similarity matching and retrieval with the video library to obtain the final video with repeated shots and the start and end positions of the video.
[0180] Figure 6 FIG. 1 is a schematic diagram of a process of a method for determining video features provided by an embodiment of the present invention. The embodiment of the present invention provides a method for determining video features, such as Figure 6 As shown, including:
[0181] Step 601: Obtain multiple candidate videos.
[0182] Step 602: for each candidate video: determine at least one candidate shot included in the candidate video.
[0183] Step 603: Determine the lens features of each candidate lens respectively.
[0184] Step 604: store the video feature record of the candidate video, wherein the video feature record includes: the identifier of the candidate video and the shot feature of the candidate shot.
[0185] A video shot is a unit of the entire video. A video shot contains a group of video frames that are related in time and space. A video shot can be the sum of a group of video frames shot continuously by the same camera device.
[0186] In an embodiment of the present invention, a candidate video is segmented into at least one candidate video shot, and the shot features of the candidate video shot are used as the features of the candidate video for storage. A candidate video may correspond to multiple video feature records, each of which includes the identifier of the candidate video and the shot features of the candidate shot.
[0187] In the subsequent process of determining the similarity between videos, the lens features of the video lens in the video to be processed can be directly compared with the lens features of the candidate lens in the saved video feature record to determine the similarity between the video to be processed and the candidate video. The method of the embodiment of the present invention can compare the similarity between the video to be processed and other videos at a finer granularity, solving the problem that the prior art cannot accurately determine the similarity between the video to be processed and other videos.
[0188] Optionally, the determining at least one candidate video shot included in the candidate video includes:
[0189] For any two adjacent video frames in each of the candidate videos: determining a difference value between the two adjacent video frames;
[0190] Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames;
[0191] According to the shot conversion position, it is determined that the candidate video includes at least one candidate video shot.
[0192] The difference value between two adjacent video frames is used to characterize the difference between the two adjacent videos. The difference value between two adjacent video frames can be represented by the difference in brightness between the two video frames, the difference image obtained by subtracting the corresponding pixel values of adjacent video frames, the distance value of the wavelet features of the two video frames, the contour frame difference of the two video frames, etc.
[0193] A video shot contains a group of video frames that are related in time and space. If the difference between two adjacent video frames is large, the possibility that the two adjacent video frames belong to two different video shots is also large, that is, there is a high probability that there is a shot transition position between the two adjacent videos.
[0194] Figure 7 : is a schematic diagram of a structure of a device for determining similar videos provided by an embodiment of the present invention, including:
[0195] The frame capture module 701 is used to obtain a video to be processed, where the video to be processed includes a plurality of video frames;
[0196] A shot division module 702, configured to divide a plurality of video frames into a plurality of video shots, each video shot including at least one video frame;
[0197] The similarity determination module 703 is used to determine a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot, wherein the candidate video includes the candidate video shot.
[0198] Optionally, the shot division module 702 is specifically configured to: for any two adjacent video frames among the plurality of video frames: determine a difference value between the two adjacent video frames;
[0199] According to the difference value between any two adjacent video frames, a lens switching position is determined, and the lens switching position is located between the two adjacent video frames;
[0200] According to the shot conversion position, a plurality of video frames are divided into a plurality of video shots.
[0201] Optionally, the shot division module 702 is specifically used to: respectively determine the histograms of two adjacent video frames;
[0202] According to the histograms of two adjacent video frames, an inter-frame histogram difference of the two adjacent video frames is calculated, and the inter-frame histogram difference is determined as a difference value between the two adjacent video frames.
[0203] Optionally, the shot division module 702 is specifically used to: determine whether a difference value between two adjacent video frames is greater than a difference threshold;
[0204] If so, it is determined that there is a shot transition position between two adjacent video frames;
[0205] If not, it is determined that there is no shot switching position between two adjacent video frames.
[0206] Optionally, the similarity determination module 703 is specifically used to: determine the shot features of the video shot;
[0207] Determining the shot similarity between the video shot and the candidate video shot according to the shot feature of the video shot and the shot feature of the candidate video shot;
[0208] The shot similarity is used to determine the video similarity between the video to be processed and the candidate video;
[0209] The candidate videos whose video similarity is greater than or equal to the video similarity threshold are determined as candidate videos similar to the video to be processed.
[0210] Optionally, the similarity determination module 703 is specifically used to: determine the image features and weights of each video frame in the current video shot;
[0211] The lens features of the current video lens are determined according to the image features and weights.
[0212] Optionally, the similarity determination module 703 is specifically used to: determine at least one candidate shot contained in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold;
[0213] The video similarity between the to-be-processed video and the candidate video is determined according to the statistical value of the shot similarity of the candidate shots.
[0214] Optionally, the device further comprises:
[0215] The video determination unit 703 is used to determine the number of candidate shots in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold;
[0216] The video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0217] Optionally, the video determination unit 703 is specifically configured to determine whether the number is greater than a number threshold, where the number threshold is proportional to the number of video shots in the video to be processed;
[0218] If so, the video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
[0219] Optionally, the device further comprises:
[0220] The frame deleting unit 704 determines, for each video frame in the video shot, whether the video frame is a video frame to be filtered; if so, deletes the video frame from the video shot.
[0221] The frame deletion unit 704 is specifically used to: calculate the brightness value of the video frame; determine whether the brightness value is less than the brightness threshold; if so, determine that the video frame is a video frame to be filtered;
[0222] and / or,
[0223] Calculating the blurriness value of the video frame; determining whether the blurriness value is less than a blurriness threshold; if so, determining that the video frame is a video frame to be filtered;
[0224] and / or,
[0225] Calculate the image equalization value of the video frame; determine whether the image equalization value is greater than an equalization threshold; if so, determine that the video frame is a video frame to be filtered.
[0226] Figure 8 : is a schematic diagram of a video feature determination device provided by an embodiment of the present invention, comprising:
[0227] The video acquisition module 801 is used to acquire multiple candidate videos;
[0228] The shot determination module 802 is used to determine, for each candidate video, at least one candidate video shot included in the candidate video;
[0229] A feature determination module 803, used to determine the lens feature of each candidate lens respectively;
[0230] The record storage module 804 is used to store the video feature record of the candidate video, and the video feature record includes: the identifier of the candidate video and the shot feature of the candidate shot.
[0231] Optionally, the shot determination module 802 is further configured to: determine, for any two adjacent video frames in each of the candidate videos: a difference value between the two adjacent video frames;
[0232] Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames;
[0233] According to the shot conversion position, it is determined that the candidate video includes at least one candidate video shot.
[0234] An embodiment of the present invention provides an electronic device, including:
[0235] one or more processors;
[0236] a storage device for storing one or more programs,
[0237] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0238] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0239] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0240] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0241] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0242] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0243] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0244] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a frame capture module, a shot division module, and a similarity determination module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the frame capture module may also be described as "obtaining a video to be processed, wherein the video to be processed includes multiple video frames".
[0245] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0246] Acquire a video to be processed, where the video to be processed includes multiple video frames;
[0247] Dividing the plurality of video frames into a plurality of video shots, each of the video shots comprising at least one video frame;
[0248] According to the shot similarity between the video shot and the candidate video shot, a candidate video similar to the video to be processed is determined, wherein the candidate video includes the candidate video shot.
[0249] According to the technical solution of the embodiment of the present invention, multiple video frames in the video frame to be processed are divided into multiple video shots, and the video shots are used as the similarity comparison unit to determine the video similar to the video to be processed. Compared with the method of performing similarity comparison based on the entire video feature, the similarity between the video to be processed and other videos can be compared at a finer granularity, thereby more accurately determining the video similar to the video to be processed.
[0250] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for determining similar videos, characterized in that: include: Acquire a video to be processed, where the video to be processed includes multiple video frames; Dividing the plurality of video frames into a plurality of video shots, each of the video shots comprising at least one video frame; Determine a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot, wherein the candidate video includes the candidate video shot; The dividing the plurality of video frames into a plurality of video shots comprises: For any two adjacent video frames among the plurality of video frames: determining a difference value between the two adjacent video frames; Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames; The plurality of video frames are divided into the plurality of video shots according to the shot conversion positions.
2. The method according to claim 1, characterized in that The determining the difference value between the two adjacent video frames comprises: Determining the histograms of the two adjacent video frames respectively, wherein the histograms indicate the number or probability of image information in the video frames appearing within a predefined value range; According to the histograms of the two adjacent video frames, an inter-frame histogram difference of the two adjacent video frames is calculated, and the inter-frame histogram difference is determined as a difference value between the two adjacent video frames.
3. The method according to claim 1 or 2, characterized in that: The determining of the lens switching position according to the difference value between any two adjacent video frames includes: Determine whether the difference value between the two adjacent video frames is greater than a difference threshold; If so, determining that there is a shot switching position between the two adjacent video frames; If not, it is determined that there is no shot switching position between the two adjacent video frames.
4. The method according to claim 1, characterized in that: The step of determining a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot includes: Determining lens characteristics of the video lens; Determining the shot similarity between the video shot and the candidate video shot according to the shot features of the video shot and the shot features of the candidate video shot; Determining the video similarity between the video to be processed and the candidate video according to the shot similarity; The candidate videos whose video similarity is greater than or equal to the video similarity threshold are determined as candidate videos similar to the video to be processed.
5. The method according to claim 4, characterized in that The determining of the lens feature of the video lens comprises: Determining image features and weights of each video frame in the video footage; The lens features of the video lens are determined according to the image features and the weights.
6. The method according to claim 4 or 5, characterized in that: Determining the video similarity between the to-be-processed video and the candidate video according to the shot similarity includes: Determine at least one candidate shot contained in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold; The video similarity between the to-be-processed video and the candidate video is determined according to the statistical value of the shot similarity of the candidate shots.
7. The method according to claim 4 or 5, characterized in that: The method further comprises: Determine the number of candidate shots in the candidate video whose shot similarity is greater than or equal to a shot similarity threshold; The video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
8. The method according to claim 7, characterized in that The number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots, and determining the video similarity between the to-be-processed video and the candidate video, comprises: Determine whether the number is greater than a number threshold, where the number threshold is proportional to the number of video shots in the video to be processed; If so, the video similarity between the to-be-processed video and the candidate video is determined according to the number of the candidate shots and / or the statistical value of the shot similarity of the candidate shots.
9. The method according to claim 1, characterized in that: The dividing the plurality of video frames into a plurality of video shots further comprises: For each video frame in the video shot: determining whether the video frame is a video frame to be filtered; if so, deleting the video frame from the video shot.
10. The method according to claim 9, characterized in that The determining whether the video frame is a video frame to be filtered includes: Calculating the brightness value of the video frame; determining whether the brightness value is less than a brightness threshold; if so, determining that the video frame is a video frame to be filtered; and / or, Calculating the blurriness value of the video frame; determining whether the blurriness value is less than a blurriness threshold; if so, determining that the video frame is a video frame to be filtered; and / or, Calculate the image equalization value of the video frame; determine whether the image equalization value is greater than an equalization threshold; if so, determine that the video frame is a video frame to be filtered.
11. A method for determining video features, characterized in that: include: Obtain multiple candidate videos; For each of the candidate videos: determining at least one candidate shot included in the candidate video; Determining the lens features of each of the candidate lenses respectively; Storing a video feature record of the candidate video, the video feature record including: an identifier of the candidate video and a shot feature of the candidate shot; The determining of at least one candidate shot included in the candidate video comprises: For any two adjacent video frames in each of the candidate videos: determining a difference value between the two adjacent video frames; Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames; According to the shot conversion position, it is determined that the candidate video includes at least one candidate video shot.
12. A device for determining video similarity, characterized in that: include: A frame capture module is used to obtain a video to be processed, wherein the video to be processed includes a plurality of video frames; A shot division module, used for dividing the plurality of video frames into a plurality of video shots, each of the video shots including at least one video frame; A similarity determination module, configured to determine a candidate video similar to the video to be processed according to the shot similarity between the video shot and the candidate video shot, wherein the candidate video includes the candidate video shot; The shot division module is specifically used for: For any two adjacent video frames among the plurality of video frames: determining a difference value between the two adjacent video frames; Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames; The plurality of video frames are divided into the plurality of video shots according to the shot conversion positions.
13. A video feature determination device, characterized in that: include: A video acquisition module, used to acquire multiple candidate videos; A shot determination module is used to determine, for each candidate video: at least one candidate video shot included in the candidate video; A feature determination module, used to respectively determine the lens feature of each candidate lens; A record storage module, used to store the video feature record of the candidate video, wherein the video feature record includes: the identifier of the candidate video and the shot feature of the candidate shot; The lens determination module is specifically used for: For any two adjacent video frames in each of the candidate videos: determining a difference value between the two adjacent video frames; Determining a lens switching position according to a difference value between any two adjacent video frames, wherein the lens switching position is located between the two adjacent video frames; According to the shot conversion position, it is determined that the candidate video includes at least one candidate video shot.
14. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.
15. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Method and device for obtaining candidate fragments from video and processing device
CN109977262A
Video auditing method, device and equipment
CN110913243A
Method and system for video similarity detection with a video DNA
KR1020080091411A
Video review method and apparatus, and device
WO2020052270A1
