Video similarity identification method and device, computer program product and electronic equipment

By extracting frames and feature extraction of videos, combining perceived hashing algorithms and deep learning models, the similarity recognition of videos is solved, and the problem of inconsistent video sequence length and resolution is improved, the recognition accuracy and recall rate are reduced, and cost.

CN119206579APending Publication Date: 2024-12-27NETEASE MEDIA TECH BEIJING
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411281308.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing video similarity recognition method is not effective in dealing with inconsistent video sequence lengths and inconsistent resolutions, the structural similarity comparison method is low, and the deep learning model recognition accuracy is also low.

Method used

By extracting frames on the target video, obtaining the video frame features, converting them into feature text using the perceptual hash algorithm, and storing them in non-relational databases and text search engines to compare similarity; when they are not similar, search based on basic information The second video performs feature comparison and combines deep learning models to improve recognition accuracy.

Benefits of technology

It improves the recall and accuracy of video recognition, enhances the recognition ability of video similarity, and reduces feature storage and computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206579A_ABST
    Figure CN119206579A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to a video similarity recognition method and device, a computer program product and electronic equipment. The method comprises the following steps: acquiring a target video, performing frame extraction on the target video to obtain a target video frame, and acquiring features of the target video frame; obtaining a first video comprising the target video frame, obtaining features of the target video according to the features of the target video frame, and performing similarity comparison according to the features of the target video and the features of the first video; and when the target video is not similar to the first video, searching based on the basic information of the target video to obtain a second video, and comparing the features of the target video frame with the features of the second video to obtain a similarity result. According to the invention, the accuracy of video similarity identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and more specifically, relate to a video similarity recognition method and device, a computer program product, and an electronic device. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims, and no description herein is admitted to be prior art by inclusion in this section.

[0003] In the related art, the structural similarity comparison method is used to identify the similarity of videos, mainly by comparing the brightness, contrast, and structure of the video frames in the two videos to determine the similarity between the two video frames, and then determine the similarity of the videos by the similarity of the video frames. The similarity of videos can also be identified based on a deep learning model, including: scaling the video size to the same size, extracting features from the video through a deep learning model, comparing the extracted features, and obtaining the similarity of the videos. Summary of the invention

[0004] The above structural similarity comparison method is widely used in the field of image quality. However, the inconsistency of the sequence length of the video cannot be reflected, and the similarity of images with the same content but different resolutions is quite different, which leads to the fact that the structural similarity comparison method is not very effective in the field of similarity. It is more flexible to identify the similarity of videos based on deep learning models, but the recognition accuracy is low.

[0005] Therefore, there is a great need for an improved video similarity recognition method and apparatus, a computer program product and an electronic device to increase the accuracy of similarity recognition while improving recognition flexibility.

[0006] In this context, embodiments of the present disclosure are intended to provide a video similarity identification method and apparatus, a computer program product, and an electronic device.

[0007] According to one aspect of the present disclosure, a similarity recognition method is provided, comprising:

[0008] Acquire a target video, extract frames of the target video to obtain a target video frame, and acquire features of the target video frame;

[0009] Acquire a first video including the target video frame, obtain features of the target video according to features of the target video frame, and perform similarity comparison between the features of the target video and features of the first video;

[0010] When the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video, and a similarity result is obtained by comparing the features of the target video frame with the features of the second video.

[0011] In an exemplary embodiment of the present disclosure, extracting frames from the target video to obtain target video frames, and acquiring features of the target video frames includes:

[0012] Extract all frames of the target video to obtain target video frames included in the target video;

[0013] The target video frame is cropped to obtain a cropped video frame, and the cropped video frame is converted into feature text using a perceptual hash algorithm to obtain features of the target video frame.

[0014] In an exemplary embodiment of the present disclosure, after acquiring the features of the target video frame, the method further includes:

[0015] The target video frame is stored in a non-relational database, wherein the key is the target video frame and the value is the video identifier of the target video;

[0016] Storing basic information of the target video in a text search engine;

[0017] The features of the target video frame are stored in an object store.

[0018] In an exemplary embodiment of the present disclosure, the acquiring of the first video including the target video frame includes:

[0019] According to the target video frame, searching in the non-relational database to obtain a list of first video frames that are identical to the target video frame;

[0020] Based on a first video frame in the first video frame list, a first video corresponding to the first video frame is obtained.

[0021] In an exemplary embodiment of the present disclosure, obtaining a first video corresponding to the first video frame based on the first video frame in the first video frame list includes:

[0022] Acquire a first video identifier corresponding to the first video frame in the non-relational database;

[0023] When the first video identifier is the same as the video identifier of the target video, deleting the first video frame;

[0024] The video corresponding to the remaining first video frames in the first video frame list is determined as the first video.

[0025] In an exemplary embodiment of the present disclosure, obtaining the features of the target video according to the features of the target video frame, and performing a similarity comparison between the features of the target video and the features of the first video include:

[0026] Acquire features corresponding to the target video frame in the object storage, and obtain features of the target video according to the features corresponding to the target video frame;

[0027] Acquire features corresponding to the first video in the object storage, and obtain features of the first video according to the features corresponding to the first video;

[0028] Calculating the similarity between the features of the target video and the features corresponding to the first video to obtain a similarity result;

[0029] When the similarity result is less than a preset similarity threshold, determining that the target video is not similar to the first video;

[0030] When the similarity result is not less than the preset similarity threshold, the similarity result is output.

[0031] In an exemplary embodiment of the present disclosure, the searching based on the basic information of the target video to obtain the second video, and the obtaining of the similarity result by comparing the features of the target video frame with the features of the second video, include:

[0032] Searching the text search engine based on the basic information of the target video to obtain a second video similar to the basic information;

[0033] Acquire features of the second video, and compare similarities between the features of the second video and features of the target video;

[0034] When the second video is not similar to the target video, performing transition frame extraction on the first video and the second video to obtain a first target frame;

[0035] A feature comparison is performed on the first target frame and the target video to obtain the similarity result.

[0036] In an exemplary embodiment of the present disclosure, the performing feature comparison between the first target frame and the target video to obtain the similarity result includes:

[0037] Acquire features of the first target frame through a deep learning model;

[0038] The features of the target video are compared with the features of the first target frame to obtain the similarity result.

[0039] According to one aspect of the present disclosure, a video similarity recognition device is provided, comprising:

[0040] A feature acquisition module is used to acquire a target video, extract frames of the target video to obtain a target video frame, and acquire features of the target video frame;

[0041] A first similarity comparison module is used to obtain a first video including the target video frame, obtain the characteristics of the target video according to the characteristics of the target video frame, and perform a similarity comparison between the characteristics of the target video and the characteristics of the first video;

[0042] The second similarity comparison module is used to search based on the basic information of the target video to obtain a second video when the target video is not similar to the first video, and compare the features of the target video frame with the features of the second video to obtain a similarity result.

[0043] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the video similarity recognition method described above is implemented.

[0044] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0045] Processor; and

[0046] A memory, configured to store executable instructions of the processor;

[0047] The processor is configured to execute any one of the above-mentioned video similarity recognition methods by executing the executable instructions.

[0048] According to the video similarity recognition method of the embodiment of the present disclosure, a target video is obtained, and the target video is extracted to obtain a target video frame, and the feature of the target video frame is obtained; a first video including the target video frame is obtained, and the feature of the target video frame is obtained according to the feature of the target video frame, and the similarity is compared with the feature of the first video according to the feature of the target video; when the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video, and the feature of the target video frame is compared with the feature of the second video to obtain a similarity result. On the one hand, according to the feature of the target video frame, a search is performed in a video set to determine the first video including the target video frame in the video frame, and the feature of the target video is compared with the feature of the first video for similarity. When the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video. The second video is compared with the target video for similarity, thereby improving the recall rate of video recognition. On the other hand, after the target video is compared with the first video for similarity, when the first video is not similar to the target video, a second video is determined, and the target video is compared with the second video, thereby improving the accuracy of target video similarity recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0050] Figure 1 A flowchart of a video similarity recognition method according to an embodiment of the present disclosure is schematically shown;

[0051] Figure 2 A flowchart of a method for extracting frames from a target video to obtain target video frames and acquiring features of the target video frames according to an embodiment of the present disclosure is schematically shown;

[0052] Figure 3 A flowchart of a method for identifying video similarity after acquiring features of a target video frame according to an embodiment of the present disclosure is schematically shown;

[0053] Figure 4 A flowchart of a method for acquiring a first video including the target video frame according to an embodiment of the present disclosure is schematically shown;

[0054] Figure 5 A flowchart of a method for obtaining a first video corresponding to a first video frame based on a first video frame in the first video frame list according to an embodiment of the present disclosure is schematically shown;

[0055] Figure 6 A flowchart of a method for obtaining the features of the target video according to the features of the target video frame and performing similarity comparison between the features of the target video and the features of the first video according to an embodiment of the present disclosure is schematically shown;

[0056] Figure 7 A flowchart of a method for performing a search based on the basic information of the target video to obtain a second video, and obtaining a similarity result by comparing the features of the target video frame with the features of the second video according to an embodiment of the present disclosure is schematically shown;

[0057] Figure 8 A flowchart of a method for performing feature comparison between the first target frame and the target video to obtain the similarity result according to an embodiment of the present disclosure is schematically shown;

[0058] Fig. 9 A flowchart of a video similarity recognition method according to an embodiment of the present disclosure is schematically shown;

[0059] Fig.10 A block diagram of a video similarity recognition device according to an embodiment of the present disclosure is schematically shown;

[0060] Fig.11 A schematic diagram of a computer storage medium according to an embodiment of the present disclosure is shown;

[0061] Fig.12 A block diagram of an electronic device according to a disclosed embodiment is schematically shown.

[0062] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0063] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0064] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0065] According to an embodiment of the present disclosure, a video similarity recognition method, a video similarity recognition device, a computer program product, and an electronic device are provided.

[0066] In this document, any number of elements in the drawings is used for illustration rather than limitation, and any naming is used only for distinction and does not have any limiting meaning.

[0067] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION

[0069] The inventors found that in the related art, the structural similarity comparison method is not very effective in the field of similarity because the degree of inconsistency in the sequence length of the video cannot be reflected and the image similarity of the same content but different resolution is quite different. It is more flexible to identify the similarity of the video based on the deep learning model, but the recognition accuracy is low.

[0070] In view of the above content, the basic idea of ​​the present disclosure is to extract frames of the target video, extract features of the target video frames obtained by frame extraction to obtain features of the target video frames, use the features of the target video frames to search in a video set to obtain a first video including the target video frames, compare the features of the target video with the features of the first video for similarity, and when the first video is not similar to the target video, search according to the basic information of the target video to obtain a second video, compare the features of the target video frame with the features of the second video to obtain a similarity result.

[0071] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.

[0072] Exemplary Methods

[0073] Combine the following Figure 1 A video similarity recognition method according to an exemplary embodiment of the present disclosure is described.

[0074] refer to Figure 1 , the video similarity recognition method may include the following steps:

[0075] S110, obtaining a target video, extracting frames of the target video to obtain a target video frame, and obtaining features of the target video frame;

[0076] S120, acquiring a first video including the target video frame, obtaining features of the target video according to features of the target video frame, and performing a similarity comparison between the features of the target video and features of the first video;

[0077] S130: When the target video is not similar to the first video, a search is performed based on basic information of the target video to obtain a second video, and a similarity result is obtained by comparing features of the target video frame with features of the second video.

[0078] In the video similarity recognition method of the embodiment of the present disclosure, a target video is obtained, and the target video is extracted to obtain a target video frame, and the features of the target video frame are obtained; a first video including the target video frame is obtained, and the features of the target video frame are obtained according to the features of the target video frame, and the similarity is compared with the features of the first video according to the features of the target video; when the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video, and the features of the target video frame are compared with the features of the second video to obtain a similarity result. On the one hand, according to the features of the target video frame, a search is performed in a video set to determine the first video including the target video frame in the video frame, and the features of the target video are compared with the features of the first video for similarity. When the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video. The second video is compared with the target video for similarity, thereby improving the recall rate of video recognition. On the other hand, whether the target video is compared with the first video for similarity or the second video is compared with the target video for similarity, feature comparison is used to improve the accuracy of similarity recognition.

[0079] In step S110, a target video is acquired, frames of the target video are extracted to obtain a target video frame, and features of the target video frame are acquired.

[0080] After acquiring the target video, the target video can be framed to obtain all frames in the target video. When the target video is framed, OpenCV can be used to perform frame extraction, and other methods can also be used to perform frame extraction. In this example embodiment, the frame extraction method is not specifically limited. OpenCV is a cross-platform computer vision and machine learning software library that provides a technical framework for image processing. After obtaining the target video frame, the perceptual hash algorithm can be used to calculate the target video to obtain the features of the target video frame.

[0081] refer to Figure 2 As shown, extracting frames of the target video to obtain target video frames and acquiring features of the target video frames may include:

[0082] Step S210. Extract all frames of the target video to obtain target video frames included in the target video;

[0083] Step S220. Crop the target video frame to obtain a cropped video frame, convert the cropped video frame into feature text using a perceptual hashing algorithm, and obtain features of the target video frame.

[0084] In the following, step S210 and step S220 will be further explained and illustrated. Specifically, OpenCV is used to extract all frames of the target video to obtain all target video frames included in the target video. After obtaining the target video frames, the target video frames are cropped to obtain cropped video frames, wherein when cropping the target video frames, the cropping size is not further limited. After obtaining the cropped video, the target video frames are calculated using the perceptual hash algorithm, and the target video frames are converted into feature texts, and the features of the target video frames are obtained according to the feature texts.

[0085] After the features of the target video frame are obtained, the features of the target video frame can be stored. Figure 3 As shown, after acquiring the features of the target video frame, the method further includes:

[0086] Step S310. Store the target video frame in a non-relational database, wherein the key is the target video frame and the value is the video identifier of the target video;

[0087] Step S320. storing the basic information of the target video in a text search engine;

[0088] Step S330: Store the features of the target video frame in object storage.

[0089] Below, step S310-step S330 will be further explained and illustrated. Specifically, after obtaining the target video frame, the target video frame is stored in a non-relational database, which can be pika or other, and is not specifically limited in this example embodiment. In the non-relational database, the storage structure is key-value (key-value pair). When storing the target video frame, the key can be the target video frame, and the value is the video identifier of the target video, which can be a video ID. The basic information of the target video can also be stored, and the basic information of the target video can be the video title of the target video. When storing the basic information of the target video, the basic information of the target video can be stored in a text search engine, which can be elasticsearch. In addition, the features of the target video frame can also be stored in an object storage, which is used to store file data and is stored using a hard disk. The features of the target video are stored through object storage, which reduces storage costs.

[0090] In step S120, a first video including the target video frame is obtained, features of the target video are obtained according to features of the target video frame, and similarity comparison is performed between the features of the target video and the features of the first video.

[0091] The first video is a video containing a target video frame. The target video frame is used to search for the first video. The number of the first video can be multiple. The method for obtaining the features of the first video is the same as the method for obtaining the features of the target video. The first video is firstly extracted to obtain a first video frame. The first video frame is cropped to obtain a first cropped video frame. The first cropped video frame is calculated using a perceptual hash algorithm to obtain features of the first cropped video frame. The features of the first video are obtained according to the features of each video frame in the first video. The features of the first video are also stored in the object storage.

[0092] refer to Figure 4 As shown, the obtaining of the first video including the target video frame includes:

[0093] Step S410. According to the target video frame, searching in the non-relational database to obtain a first video frame list that is the same as the target video frame;

[0094] Step S420: Based on the first video frame in the first video frame list, obtain a first video corresponding to the first video frame.

[0095] In the following, step S410 and step S420 are further explained and illustrated. Specifically, the target video frame of the target video is used as a key to query in a non-relational database to obtain a list of first video frames in the non-relational database that are the same as the target video frame. After obtaining the list of first video frames, the first video corresponding to each first video frame is obtained according to the value corresponding to the key of each first video frame in the list of first video frames.

[0096] There may be a situation where the video frames are repeated in the multiple first video frames obtained by querying the target video frame in the non-relational database. Therefore, Figure 5 As shown, based on the first video frame in the first video frame list, obtaining a first video corresponding to the first video frame includes:

[0097] Step S510. Obtaining a first video identifier corresponding to the first video frame in the non-relational database;

[0098] Step S520. When the first video identifier is the same as the video identifier of the target video, delete the first video frame;

[0099] Step S530: Determine the video corresponding to the remaining first video frames in the first video frame list as the first video.

[0100] Below, step S510-step S530 will be further explained and illustrated. Specifically, a value corresponding to the first video frame, that is, a first video identifier corresponding to the first video frame, is obtained in a non-relational database; when the first video identifier is the same as the target video identifier, that is, the target video and the first video are the same video, the first video that is the same as the target video can be deleted. In addition, when there are multiple identical first video frames in the first video frame list, multiple identical first video frames can also be deleted, and only one first video frame is retained. After deleting the identical first video frames in the first video frame list, the video corresponding to the remaining first video frames in the first video frame list can be determined as the first video.

[0101] After obtaining the first video, the features of the first video can be compared with the features of the target video. Figure 6 As shown, obtaining the features of the target video according to the features of the target video frame, and performing similarity comparison between the features of the target video and the features of the first video may include:

[0102] Step S610. Acquire features corresponding to the target video frame in the object storage, and obtain features of the target video according to the features corresponding to the target video frame;

[0103] Step S620. Acquire features corresponding to the first video in the object storage, and obtain features of the first video according to the features corresponding to the first video;

[0104] Step S630. Calculate the similarity between the features of the target video and the features corresponding to the first video to obtain a similarity result;

[0105] Step S640: When the similarity result is less than a preset similarity threshold, it is determined that the target video is not similar to the first video;

[0106] Step S650: When the similarity result is not less than the preset similarity threshold, output the similarity result.

[0107] In the following, step S610 to step S650 will be further explained and illustrated. Specifically, the features of the target video frame are obtained in the object storage, and the features of the target video are determined based on the features of the target video frame; the features of the first video are obtained in the object storage, and the features of the first video are determined based on the features of the first video, and the similarity between the features of the first video and the features of the target video is calculated. When the similarity is less than a preset similarity threshold, it is determined that the target video is not similar to the first video, and when the similarity is greater than the preset similarity threshold, it is determined that the target video is similar to the first video. The preset similarity threshold can be 50% or 60%, and is not specifically limited in this example embodiment.

[0108] In step S130, when the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video, and a similarity result is obtained by comparing the features of the target video frame with the features of the second video.

[0109] When the first video is not similar to the target video, query again to obtain the second video, reference Figure 7 As shown, the search is performed based on the basic information of the target video to obtain a second video, and the similarity result is obtained by comparing the features of the target video frame with the features of the second video, including:

[0110] Step S710. Searching in the text search engine based on the basic information of the target video to obtain a second video similar to the basic information;

[0111] Step S720. Acquire features of the second video, and compare the features of the second video with features of the target video for similarity;

[0112] Step S730. When the second video is not similar to the target video, performing frame extraction on the first video and the second video to obtain a first target frame;

[0113] Step S740: Perform feature comparison between the first target frame and the target video to obtain the similarity result.

[0114] In the following, step S710 to step S740 will be further explained and illustrated. Specifically, first, a search is performed in a text search engine based on the basic information of the target video to obtain a second video list similar to the basic information of the target video, and the second video list may include one or more second videos; wherein the basic information of the target video is the video title of the target video. After the second video is obtained, the features of the second video can be obtained, and the features of the second video and the features of the target video are compared for similarity. When the second video is not similar to the target video, the transition video of the first video and the second video is obtained, and the transition video of the first video and the second video is extracted to obtain the first target frame. Among them, when performing a similarity comparison, when the similarity between the features of the second video and the features of the target video is less than a preset similarity threshold, it can be determined that the second video is not similar to the target video. The preset similarity threshold can be 50% or 60%, which is not specifically limited in the present example embodiment; the transition video is when the scenes displayed by two unconnected video frames A and video frames B in the video change greatly or are completely different, the video composed of video frame A to the previous frame of video frame B becomes the transition video corresponding to video frame A, and correspondingly, video frame B also has a corresponding transition video. After the transition video is obtained, the transition video can be subjected to frame extraction. The frame extraction can be performed on the transition video through ffmpeg (a technical framework for processing audio and video), or through other technical frameworks, which is not specifically limited in the present example embodiment. For each transition video, one frame can be extracted, or a preset frame can be extracted, which is not specifically limited in the present example embodiment. The video frame obtained by frame extraction is the first target frame. After the first target frame is obtained, the features of the first target frame can be obtained, and the features of the first target frame can be compared with the features of the target video to obtain a similarity result.

[0115] For further reference, Figure 8 As shown, the feature comparison between the first target frame and the target video to obtain the similarity result includes:

[0116] Step S810. Acquire features of the first target frame through a deep learning model;

[0117] Step S820: Compare the features of the target video with the features of the first target frame to obtain the similarity result.

[0118] Below, step S810 and step S820 will be further explained and illustrated. Specifically, the features of the first target frame can be extracted through the MobileNetV3 model. After obtaining the features of the first target frame, the features of the first target frame can be compared with the features of the target video, that is, the features of the transition video frame can be compared with the features of the target video to obtain a similarity result. Among them, MobileNetV3 is a lightweight network model that can be used in tasks such as mobile image classification, target detection, and semantic segmentation. It adopts lightweight deep separable convolution and residual block structures, and consists of multiple modules, including bottleneck structures, SE modules, and NL modules.

[0119] In the present disclosure, the accuracy of video recognition is improved by combining perceptual hashing with a deep model for feature extraction.

[0120] Below, reference Fig. 9 , further explain and illustrate the video similarity recognition method disclosed in the present invention. The video similarity recognition method may include:

[0121] Step S910. Extract and crop the target video frame to obtain the target video frame, and store the target video frame in pika;

[0122] Step S920. Obtain the features of the target video frame using the perceptual hash algorithm, store the features of the target video frame in the object storage, and store the title of the target video in elasticsearch;

[0123] Step S930. Recall the first video in pika using the target video frame, and compare the features of the first video with the features of the target video;

[0124] Step S940. When they are similar, end the comparison;

[0125] Step S950. When they are not similar, the second video is recalled in elasticsearch using the title of the target video, and the features of the second video are compared with the features of the target video. When they are similar, the process proceeds to step S940; when they are not similar, the process proceeds to step S960;

[0126] Step S960: Perform transition frame extraction on the first video and the second video to obtain a first target frame;

[0127] Step S970. Use the MobileNetV3 model to extract features of the first target frame, compare the features of the first target frame with the features of the target video, and obtain a similarity result.

[0128] In summary, the method provided by the present invention, on the one hand, combines the deep learning model with the perceptual hashing algorithm for feature extraction, thereby improving the accuracy of video recognition; on the other hand, when the features of the target video are not similar to the features of the first video and the second video, the first video and the second video are transitioned and frame extracted to obtain a first target frame, and the features of the first target frame are compared with the features of the target video, thereby reducing the storage cost of the features and also reducing the computing cost; on still another hand, through video frame recall and video title recall, the number of compared videos is increased and the recall rate is improved.

[0129] Exemplary Devices

[0130] After introducing the video similarity recognition method according to the exemplary embodiment of the present disclosure, Fig.10 A video similarity recognition device according to an exemplary embodiment of the present disclosure is described.

[0131] refer to Fig.10 As shown, the video similarity recognition device according to the exemplary embodiment of the present disclosure may include: a feature acquisition module 1010, a first similarity comparison module 1020 and a second similarity comparison module 1030; wherein:

[0132] The feature acquisition module 1010 is used to acquire a target video, extract frames of the target video to obtain a target video frame, and acquire features of the target video frame;

[0133] A first similarity comparison module 1020 is used to obtain a first video including the target video frame, obtain the characteristics of the target video according to the characteristics of the target video frame, and perform a similarity comparison between the characteristics of the target video and the characteristics of the first video;

[0134] The second similarity comparison module 1030 is used to search based on the basic information of the target video to obtain a second video when the target video is not similar to the first video, and compare the features of the target video frame with the features of the second video to obtain a similarity result.

[0135] Since the functional modules of the resource transfer device in the disclosed embodiment are the same as those in the disclosed embodiment of the resource transfer method, they will not be described in detail here.

[0136] Exemplary Storage Media

[0137] After introducing the data synchronization method and device according to the exemplary embodiment of the present disclosure, Fig.11 A computer-readable storage medium according to an exemplary embodiment of the present disclosure is described.

[0138] refer to Fig.11 As shown, a program product 1100 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0139] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The 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 (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.

[0140] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0141] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0142] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0143] Exemplary Electronic Devices

[0144] After introducing the storage medium of the exemplary embodiment of the present disclosure, next, reference is made to Fig.12 An electronic device according to an exemplary embodiment of the present disclosure is described.

[0145] Fig.12 The electronic device 1200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0146] like Fig.12 As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include, but are not limited to: the at least one processing unit 1210, the at least one storage unit 1220, a bus 1230 connecting different system components (including the storage unit 1220 and the processing unit 1210), and a display unit 1240.

[0147] The storage unit stores a program code, which can be executed by the processing unit 1210, so that the processing unit 1210 performs the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 1210 can perform the following steps: Figure 1 Steps S110 to S140 shown in FIG.

[0148] The storage unit 1220 may include a volatile storage unit, such as a random access storage unit (RAM) 12201 and / or a cache storage unit 12202 , and may further include a read-only storage unit (ROM) 12203 .

[0149] The storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0150] The bus 1230 may include a data bus, an address bus, and a control bus.

[0151] The electronic device 1200 may also communicate with one or more external devices 1300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed through an input / output (I / O) interface 1250. The electronic device 1200 also includes a display unit 1240, which is connected to the input / output (I / O) interface 1250 for display. In addition, the electronic device 1200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 through a bus 1230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0152] It should be noted that although several modules or sub-modules of the audio playback device and the audio sharing device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided to be embodied by multiple units / modules.

[0153] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0154] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A video similarity recognition method, characterized in that: include: Acquire a target video, extract frames of the target video to obtain a target video frame, and acquire features of the target video frame; Acquire a first video including the target video frame, obtain features of the target video according to features of the target video frame, and perform similarity comparison between the features of the target video and features of the first video; When the target video is not similar to the first video, a search is performed based on the basic information of the target video to obtain a second video, and a similarity result is obtained by comparing the features of the target video frame with the features of the second video.

2. The video similarity recognition method according to claim 1, characterized in that: The step of extracting frames from the target video to obtain a target video frame and acquiring features of the target video frame includes: Extract all frames of the target video to obtain target video frames included in the target video; The target video frame is cropped to obtain a cropped video frame, and the cropped video frame is converted into feature text using a perceptual hash algorithm to obtain features of the target video frame.

3. The video similarity recognition method according to claim 1, characterized in that: After acquiring the features of the target video frame, the method further includes: The target video frame is stored in a non-relational database, wherein the key is the target video frame and the value is the video identifier of the target video; Storing basic information of the target video in a text search engine; The features of the target video frame are stored in an object store.

4. The video similarity recognition method according to claim 3, characterized in that: The acquiring of the first video including the target video frame comprises: According to the target video frame, searching in the non-relational database to obtain a list of first video frames that are identical to the target video frame; Based on a first video frame in the first video frame list, a first video corresponding to the first video frame is obtained.

5. The video similarity recognition method according to claim 4, characterized in that: The obtaining, based on the first video frame in the first video frame list, a first video corresponding to the first video frame includes: Acquire a first video identifier corresponding to the first video frame in the non-relational database; When the first video identifier is the same as the video identifier of the target video, deleting the first video frame; The video corresponding to the remaining first video frames in the first video frame list is determined as the first video.

6. The video similarity recognition method according to claim 3, characterized in that: The obtaining the feature of the target video according to the feature of the target video frame, and performing similarity comparison between the feature of the target video and the feature of the first video, comprises: Acquire features corresponding to the target video frame in the object storage, and obtain features of the target video according to the features corresponding to the target video frame; Acquire a feature corresponding to the first video in the object storage, and obtain a feature of the first video according to the feature corresponding to the first video; Calculating the similarity between the features of the target video and the features corresponding to the first video to obtain a similarity result; When the similarity result is less than a preset similarity threshold, determining that the target video is not similar to the first video; When the similarity result is not less than the preset similarity threshold, the similarity result is output.

7. The video similarity recognition method according to claim 3, characterized in that: The searching based on the basic information of the target video to obtain the second video, and comparing the features of the target video frame with the features of the second video to obtain a similarity result, includes: Searching the text search engine based on the basic information of the target video to obtain a second video similar to the basic information; Acquire features of the second video, and compare similarities between the features of the second video and features of the target video; When the second video is not similar to the target video, performing transition frame extraction on the first video and the second video to obtain a first target frame; A feature comparison is performed on the first target frame and the target video to obtain the similarity result.

8. The video similarity recognition method according to claim 7, characterized in that: The performing feature comparison between the first target frame and the target video to obtain the similarity result includes: Acquire features of the first target frame through a deep learning model; The features of the target video are compared with the features of the first target frame to obtain the similarity result.

9. A video similarity recognition device, characterized in that: include: A feature acquisition module is used to acquire a target video, extract frames of the target video to obtain a target video frame, and acquire features of the target video frame; A first similarity comparison module is used to obtain a first video including the target video frame, obtain the characteristics of the target video according to the characteristics of the target video frame, and perform a similarity comparison between the characteristics of the target video and the characteristics of the first video; The second similarity comparison module is used to search based on the basic information of the target video to obtain a second video when the target video is not similar to the first video, and compare the features of the target video frame with the features of the second video to obtain a similarity result.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.

Citation Information

Patent Citations

  • A video acquisition management method and a server

    CN109005382A

  • Video similarity detection method and device, terminal equipment and storage medium

    CN112861717A

  • Video detection method and device and computer readable storage medium

    CN113407779A

  • Data processing method and device and computer readable storage medium

    CN113590854A

  • Automatic short video editing method based on prototype video

    CN114205677A