Video fingerprint generation method, device, equipment and storage medium

By extracting frames and performing similarity recognition on the video database, a unique video fingerprint is generated, which solves the problems of infringement and user experience caused by videos from the same source on the video platform, and achieves high-precision identification of videos from the same source and optimized video push.

CN116049486BActive Publication Date: 2026-04-14BAIDU (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The existence of numerous videos of the same source on video platforms leads to the risk of copyright infringement by original authors and poor user experience.

Method used

By extracting frames from videos in the video database, identifying the similarity of each frame, determining videos from the same source, and generating a unique video fingerprint for each video from the same source.

Benefits of technology

Accurately identify videos from the same source, reduce the likelihood of users repeatedly watching the same videos, improve user experience, and help determine video risks and optimize video push solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049486B_ABST
    Figure CN116049486B_ABST
Patent Text Reader

Abstract

The present disclosure provides a video fingerprint generation method and device, equipment and storage medium, relates to the technical field of artificial intelligence, specifically relates to the technical field of computer vision, video image recognition, data labeling and the like, and can be applied to the scene of homologous video identification and video recommendation. The specific implementation scheme comprises: for each video in a video database, taking the video as a first video, determining a target frame image corresponding to each frame of the first video from frame images of a second video, the second video being other videos except the first video; determining homologous videos of the first video according to a target second video where the target frame image is located; and generating the same video fingerprint for the same group of homologous videos having a homologous relationship. The present disclosure can accurately identify homologous videos in the video database, and assign the same video fingerprint to the homologous videos, and the video fingerprint of each group of homologous videos can uniquely identify the identity information of the group of homologous videos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, specifically to computer vision, video image recognition, data tagging and other technical fields, and can be applied to scenarios such as same-source video recognition and video recommendation. In particular, it relates to a video fingerprint generation method, device, equipment and storage medium. Background Technology

[0002] As a form of information flow, video can provide users with a rich viewing experience and can also be used for advertising recommendations. Video platforms often have a large number of videos with the same source. Videos with the same source generally refer to videos where some or all frames are identical, or where only minor modifications have been made. For example, if author 1 publishes an original video X, and author 2 reposts video X to their own account and publishes video Y, then video X and video Y are videos with the same source. As another example, if an advertisement is displayed as ad video 1 in traffic scenario 1 and as ad video 2 in traffic scenario 2, but the content of ad video 1 and ad video 2 is the same, then ad video 1 and ad video 2 are also videos with the same source.

[0003] For video platforms, videos from the same source in their video database not only pose a risk of infringing on the copyrights of the original authors, but also may result in a poor user experience when these videos are repeatedly pushed to users. Summary of the Invention

[0004] This disclosure provides a video fingerprint generation method, apparatus, device, and storage medium that can accurately identify videos from the same source in a video database and assign the same video fingerprint to each video from the same source. The video fingerprint of each group of videos from the same source can uniquely identify the identity information of that group of videos from the same source.

[0005] According to a first aspect of this disclosure, a video fingerprint generation method is provided, the method comprising:

[0006] Frames are extracted from each video in the video database at preset time intervals to obtain at least two extracted frames for each video. For each video in the video database, the video is taken as the first video. Based on the extracted frames of the first video, the target extracted frames corresponding to each frame of the first video are determined from the extracted frames of the second video. The similarity between the target extracted frames and the corresponding frames of the target extracted frames meets a preset similarity requirement. The second video is any video in the video database other than the first video. Based on the target second video where the target extracted frames are located, the source videos of the first video are determined, thus obtaining the source relationship between the videos in the video database. Based on the source relationship between the videos in the video database, the same video fingerprint is generated for the same group of source videos that have a source relationship. The video fingerprint is used to uniquely identify the source relationship.

[0007] According to a second aspect of this disclosure, a video fingerprint generation apparatus is provided, the apparatus comprising:

[0008] The video processing unit is used to extract frames from each video in the video database at preset time intervals to obtain at least two extracted frames for each video. The same-origin relationship identification unit is used to take each video in the video database as the first video, and based on the extracted frames of the first video, determine the target extracted frames corresponding to each frame of the first video from the extracted frames of the second video. The similarity between the target extracted frames and the extracted frames corresponding to the target extracted frames meets a preset similarity requirement. The second video is any video in the video database other than the first video. The same-origin relationship identification unit is also used to determine the same-origin video of the first video based on the target second video where the target extracted frames are located, thereby obtaining the same-origin relationship between the videos in the video database. The fingerprint generation unit is used to generate the same video fingerprint for the same group of same-origin videos that have the same origin relationship based on the same-origin relationship between the videos in the video database. The video fingerprint is used to uniquely identify the same-origin relationship.

[0009] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0010] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the method described in the first aspect.

[0011] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to the first aspect.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0014] Figure 1 This is a flowchart illustrating the video fingerprint generation method provided in an embodiment of this disclosure;

[0015] Figure 2 Provided for the embodiments of this disclosure Figure 1 A schematic diagram of one implementation of S103;

[0016] Figure 3 This is a schematic diagram of frame segmentation provided in an embodiment of the present disclosure;

[0017] Figure 4 Provided for the embodiments of this disclosure Figure 1 A schematic diagram of one implementation of S104;

[0018] Figure 5 A schematic diagram of a homology network provided in an embodiment of this disclosure;

[0019] Figure 6 Provided for the embodiments of this disclosure Figure 4 A schematic diagram of one implementation of S402 in China;

[0020] Figure 7 Provided for the embodiments of this disclosure Figure 4 A schematic diagram of another implementation of S402 in China;

[0021] Figure 8 This is a schematic diagram of the composition of the video fingerprint generation apparatus provided in the embodiments of this disclosure;

[0022] Figure 9 This is another schematic diagram of the video fingerprint generation apparatus provided in the embodiments of this disclosure;

[0023] Figure 10 This is another schematic diagram of a video fingerprint generation apparatus provided in an embodiment of the present disclosure;

[0024] Figure 11 A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0025] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0026] It should be understood that in the embodiments of this disclosure, the character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0027] As a form of information flow, video can provide users with a rich viewing experience and can also be used for advertising recommendations. For example, on some short video platforms, a large number of content creators can create a variety of short videos, which other users can watch on the platform. Furthermore, advertisements can be displayed to users in video format, providing a better recommendation experience.

[0028] Platforms that store videos in their video databases, such as advertising platforms and short video platforms, can all be called video platforms. These video databases often contain a large number of videos from the same source.

[0029] In general, videos with the same source refer to videos where some or all frames are identical, or where only minor modifications have been made. For example, if author 1 publishes an original video X, and author 2 reposts video X to their own account and publishes it as video Y, then video X and video Y are videos with the same source. As another example, if an advertisement is displayed as ad video 1 in traffic scenario 1 and as ad video 2 in traffic scenario 2, but the content of ad video 1 and ad video 2 is identical, then ad video 1 and ad video 2 are also videos with the same source.

[0030] For video platforms, videos from the same source in their video database not only pose a risk of infringing on the copyrights of the original authors, but also may result in a poor user experience when these videos are repeatedly pushed to users.

[0031] Against this background, this disclosure provides a video fingerprint generation method that can accurately identify source videos in a video database and assign the same video fingerprint to each source video. Each video fingerprint uniquely identifies the identity information of that group of source videos. Based on the video fingerprint, it is possible to accurately identify which videos are source videos, which can help determine video risks and optimize video push solutions, thereby improving user experience.

[0032] The execution entity of this method can be a computer or a server, or other devices with data processing capabilities. There are no restrictions on the execution entity. For example, the server could be a backend server of a video platform, or a data processing server connected to the video platform.

[0033] In some embodiments, the server can be a single server, or it can be a server cluster consisting of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. This disclosure does not limit the specific implementation of the server.

[0034] The following is an illustrative example of the video fingerprint generation method.

[0035] Figure 1 This is a flowchart illustrating the video fingerprint generation method provided in an embodiment of this disclosure. Figure 1 As shown, the video fingerprint generation method may include:

[0036] S101. Extract frames from each video in the video database according to a preset time interval to obtain at least two extracted frames for each video.

[0037] For example, the preset time interval can be 1 second (S), 2 seconds, 0.5 seconds, etc., and this disclosure does not limit the size of the preset time interval.

[0038] A video database can include multiple videos; for example, a video platform's video database typically contains a massive number of videos. By extracting frames from each video at preset time intervals, a frame-by-frame image of each video can be obtained. In this disclosure, the frame-by-frame image of each video can include at least two frames.

[0039] S102. For each video in the video database, the video is taken as the first video. Based on the frame-stripped images of the first video, the target frame-stripped image corresponding to each frame-stripped image of the first video is determined from the frame-stripped images of the second video. The similarity between the target frame-stripped image and the frame-stripped image corresponding to the target frame-stripped image meets the preset similarity requirement. The second video is any other video in the video database other than the first video.

[0040] For example, taking a video database containing 100 videos (not limited to 100), assuming the 100 videos are sequentially named Video 1, Video 2, ... Video 99, Video 100, we can first take Video 1 as the first video. Then, the second video includes Videos 2 through 100. Assuming the frame-by-frame images of Video 1 include Image 1, Image 2, and Image 3, we can determine the target frame-by-frame image corresponding to Image 1 from the frame-by-frame images of Videos 2 through 100 that has a similarity to Image 1 that meets a preset similarity requirement; similarly, we can determine the target frame-by-frame image corresponding to Image 2 from the frame-by-frame images of Videos 2 through 100 that has a similarity to Image 2 that meets a preset similarity requirement; and similarly, we can determine the target frame-by-frame image corresponding to Image 3 from the frame-by-frame images of Videos 2 through 100. Thus, we can obtain the target frame-by-frame image corresponding to each frame-by-frame image of Video 1.

[0041] Similarly, for videos 2 to 100, the target frame-slicing images corresponding to each frame of video 2, the target frame-slicing images corresponding to each frame of video 3, ... the target frame-slicing images corresponding to each frame of video 100 can be obtained in a similar manner to video 1.

[0042] In some implementations, the preset similarity requirement may include a similarity greater than (or equal to) a preset similarity threshold. The preset similarity threshold may be 0.6, 0.7, etc., and this disclosure does not limit the size of the preset similarity threshold. For example, suppose the frame-stripped images of video 3 include images 4, 5, and 6, where the similarity between image 4 and image 1 is greater than the preset similarity threshold, and the similarity between image 5 and image 2 is greater than the preset similarity threshold. Then, image 4 is the target frame-stripped image corresponding to image 1, and image 5 is the target frame-stripped image corresponding to image 2.

[0043] In other implementations, the preset similarity requirement may include the top K similarity rankings, where K is an integer greater than 0. For example, for image 1, the similarity between the extracted frames from video 2 to video 100 and image 1 can be sorted according to their similarity, and the extracted frame corresponding to the Kth position with the highest similarity in the sorting result can be used as the target extracted frame for image 1.

[0044] For example, in some implementations, when calculating the similarity between two frame-by-frame images, feature extraction can be performed on the frame-by-frame images first, such as through the ResNet method, to obtain the feature vectors of the frame-by-frame images, and then the cosine distance between the two feature vectors can be calculated as the similarity between the two frame-by-frame images.

[0045] S103. Based on the target second video where the target frame image is located, determine the source video of the first video and obtain the source relationship between videos in the video database.

[0046] For example, in some possible implementations, all of the target second videos containing the target frame images can be used as source videos of the first video, or the target second videos containing more target frame images can be selected as source videos of the first video.

[0047] For example, taking the first video as video A, assume that the frame-stripped images of video A obtained in S102 include image A1, image A2, and image A3. The target frame-stripped images corresponding to the frame-stripped images of video A are shown in Table 1 below.

[0048] Table 1

[0049] Frames extracted from video A Target frame image Image A1 E1, F2, K2 Image A2 E2, L3 Image A3 E3, F3, J1

[0050] As shown in Table 1, the target frame-dropped images corresponding to image A1 include: frame-dropped image E1 of video E, frame-dropped image F2 of video F, and frame-dropped image K2 of video K. The target frame-dropped images corresponding to image A2 include: frame-dropped image E2 of video E and frame-dropped image L3 of video L. The target frame-dropped images corresponding to image A3 include: frame-dropped image E3 of video E, frame-dropped image F3 of video F, and frame-dropped image J1 of video J.

[0051] Therefore, for video A, videos E, F, K, L, and J can all be considered as source videos of video A. Alternatively, the video with the most target extracted frames can be selected from videos E, F, K, L, and J as source videos of video A. For example, if video E has three target extracted frames (E1, E2, and E3) and video F has two target extracted frames (F2 and F3), then videos E and F have significantly more target extracted frames than videos K, L, and J, and thus videos E and F can be considered as source videos of video A.

[0052] Understandably, when video E and video F are identified as source videos of video A, it means that video A, video E, and video F have a source relationship with each other and are source videos of each other.

[0053] Following a similar approach as described above, we can obtain the source videos for each video in the video database, and thus determine which videos in the video database share a common source relationship.

[0054] S104. Based on the common origin relationship between videos in the video database, generate the same video fingerprint for the same group of videos with the same common origin relationship. The video fingerprint is used to uniquely identify the common origin relationship.

[0055] After obtaining the source relationships between videos in the video database, in step S104, the same video fingerprint can be generated for the same group of source videos that have a source relationship. For each group of source videos, the video fingerprint of that group of source videos can be used to uniquely identify the source relationship of that group of source videos. That is, different groups of source videos (different source relationships) correspond to different video fingerprints.

[0056] For example, taking video A as shown in Table 1 above, when video E and video F are determined to be source videos of video A, it indicates that video A, video E, and video F have a source relationship with each other. Video A, video E, and video F constitute a group of source videos with a source relationship. The same video fingerprint can be generated for video A, video E, and video F, which is used to uniquely identify the source relationship between video A, video E, and video F.

[0057] This embodiment of the disclosure extracts frames from each video in a video database at preset time intervals to obtain at least two extracted frames for each video. For each video in the video database, the video is designated as the first video. Based on the extracted frames of the first video, the target extracted frames corresponding to each frame of the first video are determined from the extracted frames of the second video. Based on the target second video containing the target extracted frames, the source videos of the first video are determined, thus obtaining the source relationship between videos in the video database. Based on the source relationship between videos in the video database, the same video fingerprint is generated for the same group of source videos with a source relationship. This achieves the calculation of source videos at the frame granularity, accurately identifies the source relationship between videos in the video database, and assigns the same video fingerprint to source videos with a source relationship, greatly improving the accuracy of source relationship identification. Moreover, the video fingerprint of each group of source videos can uniquely identify the identity information of the group of source videos. This can not only assist video platforms or users in determining whether a video has an infringement risk, but also assist in optimizing video push schemes and improving the quality of video pushes to users.

[0058] For example, the presence of copyright infringement risk between video Y and video X can be determined by comparing whether their video fingerprints are the same.

[0059] For example, when recommending videos to users on short video platforms or advertising platforms, the frequency of recommending videos with the same fingerprint can be reduced based on the video fingerprint, thereby reducing the likelihood of users repeatedly viewing the same video content and improving the user browsing experience. Alternatively, the video fingerprint can be used as a feature dimension in the video recommendation ranking model, allowing the model to prioritize videos with different fingerprints.

[0060] It should be noted that, regardless of whether the video URL has been completely changed (such as when the video has been moved) or the video has been partially cropped and processed, the video fingerprint generation method provided in this disclosure can achieve high-precision identification of videos from the same source.

[0061] In some embodiments, the target second video containing the target frame image obtained for the first video in S102 above can be considered as a candidate source video or a possible source video of the first video. In S103, source videos of the first video can be further filtered from the candidate source videos of the first video, thereby obtaining the source relationship between videos in the video database.

[0062] For example, Figure 2 Provided for the embodiments of this disclosure Figure 1 A schematic diagram of one implementation of S103. For example... Figure 2 As shown, in some embodiments, S103 may include:

[0063] S201. Obtain the first distance between each frame of the first video and each target second video.

[0064] Specifically, for each frame of the first video, when there is a target frame image corresponding to the frame image in the target second video, the first distance is the distance between the frame image and the target frame image corresponding to the frame image; when there is no target frame image corresponding to the frame image in the target second video, the first distance is the default distance.

[0065] Taking the example of video A shown in Table 1 above, the target second video includes: video E, video F, video K, video L, and video J. In S201, the first distances of images A1, A2, and A3 relative to video E, relative to video F, relative to video K, relative to video L, and relative to video J can be calculated respectively.

[0066] For video E, there are target frame-dropped image E1 corresponding to image A1, target frame-dropped image E2 corresponding to image A2, and target frame-dropped image E3 corresponding to image A3. Then, the first distance of image A1 relative to video E is the distance between image A1 and image E1, the first distance of image A2 relative to video E is the distance between image A2 and image E2, and the first distance of image A3 relative to video E is the distance between image A3 and image E3.

[0067] For video F, if there is a target frame image F2 corresponding to image A1 and a target frame image F3 corresponding to image A3 in video F, but no target frame image corresponding to image A2, then the first distance of image A1 relative to video F is the distance between image A1 and image F2, the first distance of image A2 relative to video F is the default distance, and the first distance of image A3 relative to video F is the distance between image A3 and image F3.

[0068] For video K, if there is a target frame image K2 corresponding to image A1 in video K, but no target frame images corresponding to images A2 and A3, then the first distance of image A1 relative to video K is the distance between image A1 and image K2. The first distances of image A2 and image A3 relative to video K are both default distances.

[0069] For video L, if there is a target frame image L3 corresponding to image A2 in video L, but no target frame images corresponding to images A1 and A3, then the first distance of image A2 relative to video L is the distance between image A2 and image L3. The first distances of image A1 and image A3 relative to video L are both default distances.

[0070] For video J, if there is a target frame image J1 corresponding to image A3 in video J, but no target frame images corresponding to images A1 and A2, then the first distance of image A3 relative to video J is the distance between image A3 and image J1. The first distances of image A1 and image A2 relative to video J are both default distances.

[0071] Optionally, the distance between any two images can be cosine distance, Euclidean distance (which can map to the interval between 0 and 1), etc., with the default distance being 1, 0.9, etc. The size of the default distance is not limited.

[0072] S202. Based on the first distance between each frame of the first video and each target second video, determine the second distance between the first video and each target second video. The second distance is the average distance or the cumulative minimum distance of the first distance.

[0073] For example, continuing with the example of video A shown in Table 1 above, suppose the first distance of image A1 relative to video E is denoted as S. A1E1 The first distance between image A2 and video E is denoted as S. A2E2 The first distance between image A3 and video E is denoted as S. A3E3 In some implementations, the second distance between video A and video E can be the average distance, which can be obtained by the following formula (1).

[0074] LAE =(S A1E1 +S A2E2 +S A3E3 ) / 3 formula (1)

[0075] In formula (1), L AE This represents the second distance between video A and video E.

[0076] In some other implementations, the second distance between video A and video E can be the cumulative minimum distance, which can be obtained by the following formula (2).

[0077] L AE =S A1E1 +S A2E2 +S A3E3 Formula (2)

[0078] In formula (2), L AE This represents the second distance between video A and video E.

[0079] Similarly, the calculation method for the second distance between video A and videos F, K, L, J, etc. is similar and will not be repeated here.

[0080] S203. Based on the second distance between the first video and each target second video, select the target second video that meets the preset distance requirement of the second distance as the same source video of the first video.

[0081] As described above, in S202, a second distance can be obtained between the first video and each target second video. After obtaining the second distance between the first video and each target second video, in S203, the target second videos can be filtered according to the second distance, and the target second videos that meet the preset distance requirement of the second distance can be selected as the source videos of the first video. That is, the source videos can be determined from the candidate source videos of the first video according to the second distance.

[0082] In some implementations, the preset distance requirement may include: a second distance less than (or equal to) a preset distance threshold. That is, based on the second distance between the first video and the target second video, a target second video with a second distance greater than (or equal to) the preset distance threshold can be selected as a source video of the first video. The preset distance threshold can be 0.8, 0.9, etc. The magnitude of the preset distance threshold is not limited here.

[0083] In other implementations, the aforementioned preset distance threshold can also be the value of the second distance at the Mth position after sorting the second distances between the first video and the target second video in ascending order. That is, the preset distance requirement can also include: after sorting the second distances between the first video and the target second video, the corresponding second distance should be among the M smallest values. M is an integer greater than 0.

[0084] In some implementations, the preset distance requirement may also include: after sorting the second distance between the first video and the target second video by size, the corresponding second distance is among the M smallest, and the second distance is less than (or equal to) the preset distance threshold.

[0085] In this embodiment, by obtaining the first distance corresponding to each frame of the first video relative to each target second video, and determining the second distance between the first video and each target second video based on the first distance, and selecting target second videos that meet the preset distance requirement of the second distance from the target second videos as source videos of the first video, the accuracy of identifying source videos of the first video can be improved, and the overall accuracy of identifying source relationships in the video database can be further improved.

[0086] In some embodiments, before determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the frame images of the first video, the method further includes: using a preset visual feature extraction model to extract features from the frame images of each video in the video database to obtain the feature vector of each frame image.

[0087] The visual feature extraction model is used to divide the input frame-by-frame image into at least two regions and output the feature vector of the frame-by-frame image based on the pixel features and position information of each region.

[0088] The step of determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the frame images of the first video includes: determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video.

[0089] For example, the aforementioned visual feature extraction model can be a vision transformer model. After inputting the frame-by-frame image into the vision transformer model, the vision transformer model can divide the frame-by-frame image into multiple (e.g., at least two) regions, and output the feature vector of the frame-by-frame image based on the pixel features and position information of each region. In this embodiment of the present disclosure, when determining the target frame-by-frame image corresponding to each frame-by-frame image of the first video from the frame-by-frame images of the second video, the target frame-by-frame image corresponding to each frame-by-frame image of the first video can be determined based on the similarity between the feature vector of the frame-by-frame image of the first video and the feature vector of the frame-by-frame image of the second video.

[0090] For example, Figure 3 This is a schematic diagram illustrating the segmentation of a frame-by-frame image according to an embodiment of this disclosure. Figure 3 As shown, after inputting the extracted frame image into the vision transformer model, the vision transformer model can segment the extracted frame image into nine regions (patches), from region 1 to region 9, that is, divide the extracted frame image into a nine-square grid. The vision transformer model can input the pixel features and positional information (such as pixel position) of each region into the transformer structure, and through the self-attention mechanism, output a 512-dimensional vector as the feature vector of the extracted frame image.

[0091] In this embodiment, the input frame-by-frame image is divided into at least two regions by a visual feature extraction model, and a feature vector of the frame-by-frame image is output based on the pixel features and position information of each region. This allows each region of the frame-by-frame image to have a global visual perception, and the representation result of the feature vector is more accurate, which can further improve the accuracy of homology recognition.

[0092] In some embodiments, before determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video, the method further includes: using the HNSW method to construct an index library of feature vectors of frame images of all videos in the video database.

[0093] The step of determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video includes: determining the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video according to an index library, and determining the target frame image corresponding to each frame of the first video from the frame images of the second video.

[0094] For example, a hierarchical navigable small world (HNSW) is a graph-based data structure that divides nodes into different levels, traverses elements from the upper level until a local minimum is reached, then switches to the next level, uses the local minimum in the upper level as the new element to start traversing again, until the lowest level has been traversed.

[0095] When constructing an index of feature vectors from frame-by-frame images of all videos in a video database using the HNSW method, the videos and feature vectors can be added to the index first. Each vector is then divided into multiple segments (e.g., 4 segments), and clustering is performed on each segment (e.g., clustering based on spatial partitioning). For the feature vector of a frame-by-frame image from the first video, the distance between the feature vector and the cluster center can be calculated to determine the similarity between the feature vector of the first video and the feature vector of the second video. Finally, the target frame-by-frame image corresponding to each frame-by-frame image of the first video can be determined from the frame-by-frame images of the second video.

[0096] In other words, in this embodiment, for the frame-stripped images of the first video, the frame-stripped images of the first video can be used as a query term to recall target frame-stripped images similar to the frame-stripped images of the first video from the index.

[0097] In this embodiment, based on the index library constructed using the HNSW method and the similarity between the feature vectors of the first video's frame-by-frame images and the feature vectors of the second video's frame-by-frame images, the target frame-by-frame image corresponding to each frame-by-frame image of the first video is determined from the frame-by-frame images of the second video. This can effectively improve the search speed for videos from the same source and more quickly determine videos from the same source based on similarity, thus better meeting the performance requirements in industrial scenarios.

[0098] In some embodiments, the preset similarity requirement includes: being among the top K positions with the highest similarity in the ranking of similarity between the frame-dropped images of the first video and the frame-dropped images of the second video, and having a similarity greater than a preset similarity threshold, where K is an integer greater than 0.

[0099] For example, the preset similarity threshold can be referred to in the foregoing embodiments.

[0100] Taking the first video as Video 1, the second video as Video 3, and K as 2 as an example, assume that the frame-stripped images of Video 1 include Image 1, and the frame-stripped images of Video 3 include Image 4, Image 5, and Image 6. Among them, the similarity between Image 4 and Image 1 is greater than that between Image 5 and Image 1, the similarity between Image 5 and Image 1 is greater than that between Image 6 and Image 1, and the similarity between Image 4 and Image 1 is greater than a preset similarity threshold. The similarity between Image 5 and Image 6 and Image 1 is less than the preset similarity threshold. Therefore, the images with the highest similarity among Image 1 and Image 4, Image 5, and Image 6 include Image 4 and Image 5. Since the similarity between Image 4 and Image 1 is greater than the preset similarity threshold, it can be determined that Image 4 is the target frame-stripped image corresponding to Image 1.

[0101] In this embodiment, the preset similarity requirement takes into account both the similarity ranking results and the preset similarity threshold, which can further improve the recognition accuracy of videos from the same source.

[0102] In some embodiments, when generating the same video fingerprint for the same group of videos with the same source relationship based on the source relationship between videos in the video database, a source relationship network of the video database can be constructed first based on the source relationship between videos in the video database, and then the same video fingerprint can be generated for the same group of videos with the same source relationship based on the source relationship network.

[0103] For example, Figure 4 Provided for the embodiments of this disclosure Figure 1 A schematic diagram of one implementation of S104. For example... Figure 4 As shown, S104 may include:

[0104] S401. Based on the source relationships between videos in the video database, generate a source relationship network corresponding to the video database. The source relationship network includes at least one sub-network, each sub-network includes at least one video, and all videos in each sub-network are source videos. Different sub-networks are isolated from each other.

[0105] For example, Figure 5 This is a schematic diagram of a homology network provided in an embodiment of this disclosure. For example... Figure 5 As shown, assuming the video database contains videos A, B, C, D, E, and G, where videos A, C, and E are all from the same source, and videos B, D, and G are also from the same source. Therefore, based on these shared-source relationships, a [video database] can be generated. Figure 5The diagram illustrates a network of shared origins. This network can include two subnetworks: Subnetwork 1 and Subnetwork 2. Subnetwork 1 can include video A, video C, and video E (or include video identifiers such as video URLs, video names, etc.), while Subnetwork 2 can include video B, video D, and video G. All videos in Subnetwork 1 and Subnetwork 2 are considered to be from the same origin. Subnetwork 1 and Subnetwork 2 are isolated from each other.

[0106] In other words, the homologous relationship network is not a completely connected graph, but forms isolated islands. For example, subnetwork 1 is an isolated island, subnetwork 2 is an isolated island, and all videos on each isolated island belong to the same source.

[0107] S402. Based on the common origin relationship network, generate the same video fingerprint for the video in each sub-network.

[0108] For example, based on the network of shared origins, a recursive algorithm can be used to exhaustively enumerate all videos in each sub-network (island), and generate the same video fingerprint for all videos in each sub-network, such as a fingerprint ID.

[0109] In this embodiment, based on the common origin relationship network, the same video fingerprint is generated for each video in the sub-network. This can improve the speed and accuracy of finding common origin relationships when generating video fingerprints. It can also intuitively present the common origin relationships between videos in the video database through the common origin relationship network, so that users can view it or make other strategy adjustments.

[0110] Figure 6 Provided for the embodiments of this disclosure Figure 4 A schematic diagram of one implementation of S402. (Example) Figure 6 As shown, in some embodiments, S402 may include:

[0111] S601. Generate unique identification information for different sub-networks according to the preset fingerprint encoding rules.

[0112] For example, fingerprint encoding rules may include sequentially numbering sub-networks or randomly numbering them. Through fingerprint encoding rules, unique identification information can be generated for different sub-networks. That is, different sub-networks have different identification information.

[0113] S602. Generate the same video fingerprint for the videos in the sub-network based on the sub-network's identity information.

[0114] For example, the identity information of the subnetwork can be used as the video fingerprint of the video in the subnetwork. Alternatively, the identity information of the subnetwork can be processed by fields or further calculated by an algorithm, and the processing result or calculation result can be used as the video fingerprint of the video in the subnetwork.

[0115] As mentioned above, since different sub-networks have different identity information, when generating the same video fingerprint for videos in a sub-network based on the identity information of the sub-network, the uniqueness of the video fingerprint can be guaranteed, and it can be realized that the same group of videos with the same source relationship have a unique video fingerprint.

[0116] Figure 7 Provided for the embodiments of this disclosure Figure 4 A schematic diagram of another implementation of S402.

[0117] like Figure 7 As shown, in some other embodiments, S402 may include:

[0118] S701. For each subnetwork, perform a hash operation based on the attribute information of one or more videos in the subnetwork to obtain the hash value corresponding to the subnetwork.

[0119] For example, attribute information may include the video's URL, video name, video author information, etc. No restrictions are placed on the attribute information used.

[0120] S702. Generate the same video fingerprint for the videos in the sub-network based on the hash value corresponding to the sub-network.

[0121] This embodiment performs hash operations based on the attribute information of one or more videos in a sub-network to obtain the hash value corresponding to the sub-network. Based on the hash value corresponding to the sub-network, the same video fingerprint is generated for the videos in the sub-network. This can generate video fingerprints for the videos in the sub-network by combining the videos included in the sub-network. The algorithm is more flexible and can also guarantee the uniqueness of the video fingerprint. It can ensure that the same group of videos with the same source relationship have a unique video fingerprint.

[0122] In some embodiments, the size of the preset time interval described in the foregoing embodiments is positively correlated with the length of the video to be framed.

[0123] For example, for a given video, the longer the video, the larger the preset time interval can be, and vice versa. Video length refers to the duration of the video.

[0124] In this embodiment, the size of the preset time interval is positively correlated with the length of the video to be extracted, which can realize adaptive frame extraction based on the video length, further improving the recognition accuracy of videos from the same source.

[0125] For example, if video 2 is obtained by compressing video 1, then this embodiment can also accurately identify that video 2 and video 1 are from the same source.

[0126] In an exemplary embodiment, this disclosure also provides a video fingerprint generation apparatus, which can be used to implement the video fingerprint generation method as described in the foregoing embodiments. Figure 8 This is a schematic diagram illustrating the composition of a video fingerprint generation apparatus provided in an embodiment of this disclosure. Figure 8 As shown, the device may include: a video processing unit 801, a homology recognition unit 802, and a fingerprint generation unit 803.

[0127] The video processing unit 801 is used to extract frames from each video in the video database according to a preset time interval, so as to obtain at least two extracted frames for each video.

[0128] The homology recognition unit 802 is used to take each video in the video database as the first video, and determine the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the frame images of the first video. The similarity between the target frame image and the frame image corresponding to the target frame image meets the preset similarity requirement. The second video is any other video in the video database other than the first video.

[0129] The same-origin relationship identification unit 802 is also used to determine the same-origin videos of the first video based on the target second video where the target frame image is located, and to obtain the same-origin relationship between videos in the video database.

[0130] The fingerprint generation unit 803 is used to generate the same video fingerprint for the same group of videos with the same source relationship based on the source relationship between videos in the video database. The video fingerprint is used to uniquely identify the source relationship.

[0131] Optionally, the source relationship identification unit 802 is specifically used for: obtaining a first distance between each frame of the first video and each target second video; wherein, for each frame of the first video, when there is a target frame image corresponding to the frame image in the target second video, the first distance is the distance between the frame image and the target frame image corresponding to the frame image; when there is no target frame image corresponding to the frame image in the target second video, the first distance is a default distance; determining a second distance between the first video and each target second video based on the first distance between each frame of the first video and each target second video, wherein the second distance is the average distance or the cumulative minimum distance of the first distance; and selecting a target second video that meets the preset distance requirement of the second distance from the target second videos as a source video of the first video based on the second distance between the first video and each target second video.

[0132] Figure 9 This is another schematic diagram of a video fingerprint generation apparatus provided in an embodiment of this disclosure. Optionally, as... Figure 9 As shown, the device may further include a feature extraction unit 804.

[0133] The feature extraction unit 804 is used to extract features from the frame images of each video in the video database using a preset visual feature extraction model before the homology recognition unit 802 determines the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the frame images of the first video, so as to obtain the feature vector of each frame image.

[0134] The visual feature extraction model is used to divide the input frame-by-frame image into at least two regions and output the feature vector of the frame-by-frame image based on the pixel features and position information of each region.

[0135] The homology recognition unit 802 is specifically used to: determine the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video.

[0136] Figure 10 This is another schematic diagram of a video fingerprint generation apparatus provided in an embodiment of this disclosure. Optionally, as shown... Figure 10 As shown, the device may further include an index building unit 805.

[0137] The index building unit 805 is used to build an index library for the feature vectors of all videos in the video database using the HNSW method before the homology relationship identification unit 802 determines the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video.

[0138] The homology recognition unit 802 is specifically used to: determine the similarity between the feature vectors of the frame-dropped images of the first video and the feature vectors of the frame-dropped images of the second video according to the index library, and determine the target frame-dropped image corresponding to each frame-dropped image of the first video from the frame-dropped images of the second video.

[0139] Optionally, the preset similarity requirements include: being among the top K positions with the highest similarity in the ranking of similarity between the frame-picked images of the first video and the frame-picked images of the second video, and having a similarity greater than a preset similarity threshold, where K is an integer greater than 0.

[0140] Optionally, the fingerprint generation unit 803 is specifically used to: generate a common origin relationship network corresponding to the video database based on the common origin relationship between videos in the video database. The common origin relationship network includes at least one sub-network, each sub-network includes at least one video, and all videos in each sub-network are common origin videos, and different sub-networks are isolated from each other; and generate the same video fingerprint for each video in each sub-network based on the common origin relationship network.

[0141] Optionally, the fingerprint generation unit 803 is specifically used to: generate unique identification information for different sub-networks according to preset fingerprint encoding rules; and generate the same video fingerprint for videos in the sub-networks based on the identification information of the sub-networks.

[0142] Optionally, the fingerprint generation unit 803 is specifically used to: perform a hash operation on each sub-network based on the attribute information of one or more videos in the sub-network to obtain the hash value corresponding to the sub-network; and generate the same video fingerprint for the videos in the sub-network based on the hash value corresponding to the sub-network.

[0143] Optionally, the size of the preset time interval is positively correlated with the length of the video to be framed.

[0144] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0145] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0146] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in the above embodiments. The electronic device may be the computer or server described above.

[0147] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the above embodiments.

[0148] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the method described in the above embodiments.

[0149] Figure 11 A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0150] like Figure 11 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. The RAM 1103 may also store various programs and data required for the operation of the device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0151] Multiple components in electronic device 1100 are connected to I / O interface 1105, including: input unit 1106, such as keyboard, mouse, etc.; output unit 1107, such as various types of displays, speakers, etc.; storage unit 1108, such as disk, optical disk, etc.; and communication unit 1109, such as network card, modem, wireless transceiver, etc. Communication unit 1109 allows electronic device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0152] The computing unit 1101 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the video fingerprint generation method. For example, in some embodiments, the video fingerprint generation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the video fingerprint generation method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the video fingerprint generation method by any other suitable means (e.g., by means of firmware).

[0153] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0154] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0155] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0156] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0157] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0158] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0159] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for generating video fingerprints, the method comprising: Each video in the video database is frame-stripped at a preset time interval to obtain at least two frame-stripped images for each video. For each video in the video database, the video is taken as the first video. Based on the frame-stripped images of the first video, a target frame-stripped image corresponding to each frame-stripped image of the first video is determined from the frame-stripped images of the second video. The similarity between the target frame-stripped image and the frame-stripped image corresponding to the target frame-stripped image meets a preset similarity requirement. The second video is any other video in the video database besides the first video. Based on the target second video where the target frame image is located, determine the source videos of the first video, and obtain the source relationship between videos in the video database; Based on the source relationships between videos in the video database, the same video fingerprint is generated for the same group of source videos that have a source relationship, and the video fingerprint is used to uniquely identify the source relationship; Based on the video fingerprint, the frequency of recommending videos with the same video fingerprint to users can be reduced, or the video fingerprint can be used as a feature of one dimension when the video recommendation ranking model performs video recommendation ranking, so that the video recommendation ranking model prioritizes recommending videos with different video fingerprints. Specifically, generating identical video fingerprints for the same group of videos with the same source relationship based on the source relationship between videos in the video database includes: Based on the source relationships between videos in the video database, a source relationship network corresponding to the video database is generated. The source relationship network includes at least one sub-network, each sub-network includes at least one video, and all videos in each sub-network are source videos. Different sub-networks are isolated from each other. Based on the homology network, the same video fingerprint is generated for each video in the sub-network.

2. The method according to claim 1, wherein determining the source videos of the first video based on the target second video where the target frame image is located, and obtaining the source relationship between videos in the video database, includes: Obtain the first distance between each frame of the first video and each of the target second videos; Wherein, for each frame of the first video, when the target second video contains a target frame image corresponding to the frame image, the first distance is the distance between the frame image and the target frame image corresponding to the frame image; when the target second video does not contain a target frame image corresponding to the frame image, the first distance is the default distance. Based on the first distance between each frame of the first video and each of the target second videos, a second distance is determined between the first video and each of the target second videos, wherein the second distance is the average distance or the cumulative minimum distance of the first distance; Based on the second distance between the first video and each of the target second videos, a target second video that meets the preset distance requirement of the second distance is selected as a source video of the first video.

3. The method according to claim 1, before determining the target frame-drop image corresponding to each frame-drop image of the first video from the frame-drop images of the second video based on the frame-drop images of the first video, the method further includes: Using a preset visual feature extraction model, feature extraction is performed on frame-by-frame images of each video in the video database to obtain the feature vector of each frame-by-frame image. The visual feature extraction model is used to: divide the input frame-by-frame image into at least two regions, and output the feature vector of the frame-by-frame image based on the pixel features and position information of each region; The step of determining the target frame-drop image corresponding to each frame-drop image of the first video from the frame-drop images of the second video based on the frame-drop images of the first video includes: Based on the similarity between the feature vectors of the frame-dropped images of the first video and the feature vectors of the frame-dropped images of the second video, the target frame-dropped image corresponding to each frame-dropped image of the first video is determined from the frame-dropped images of the second video.

4. The method according to claim 3, before determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame-dropped images of the first video and the feature vectors of the frame-dropped images of the second video, the method further includes: The HNSW method is used to construct an index library from the feature vectors of the extracted frames of all videos in the video database. The step of determining the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video includes: Based on the index library, the similarity between the feature vectors of the frame-dropped images of the first video and the feature vectors of the frame-dropped images of the second video is determined, and the target frame-dropped image corresponding to each frame-dropped image of the first video is determined from the frame-dropped images of the second video.

5. The method according to any one of claims 1-4, wherein the preset similarity requirement includes: The image that ranks in the top K positions with the highest similarity between the frame-dropped images of the first video and the frame-dropped images of the second video, and whose similarity is greater than a preset similarity threshold, where K is an integer greater than 0.

6. The method according to any one of claims 1-4, wherein generating the same video fingerprint for each video in the sub-network based on the homology network comprises: According to the preset fingerprint encoding rules, unique identification information is generated for different sub-networks; Based on the identity information of the sub-network, the same video fingerprint is generated for the videos in the sub-network.

7. The method according to any one of claims 1-4, wherein generating the same video fingerprint for each video in the sub-network based on the homology network comprises: For each sub-network, a hash operation is performed based on the attribute information of one or more videos in the sub-network to obtain the hash value corresponding to the sub-network; Based on the hash value corresponding to the sub-network, the same video fingerprint is generated for the videos in the sub-network.

8. The method according to any one of claims 1-4, wherein the size of the preset time interval is positively correlated with the length of the video to be framed.

9. A video fingerprint generation device, the device comprising: The video processing unit is used to extract frames from each video in the video database at a preset time interval to obtain at least two extracted frames for each video. The homology recognition unit is used to take each video in the video database as the first video, and determine the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the frame images of the first video. The similarity between the target frame image and the frame image corresponding to the target frame image meets a preset similarity requirement. The second video is other videos in the video database besides the first video. The same-origin relationship identification unit is further configured to determine the same-origin video of the first video based on the target second video where the target frame image is located, and obtain the same-origin relationship between videos in the video database; A fingerprint generation unit is configured to generate identical video fingerprints for the same group of videos with a common source relationship, based on the common source relationship between videos in the video database. The video fingerprints are used to uniquely identify the common source relationship. Specifically, the fingerprint generation unit is configured to generate a common source relationship network corresponding to the video database based on the common source relationship between videos in the video database. The common source relationship network includes at least one sub-network, each sub-network includes at least one video, and all videos in each sub-network are common source videos. Different sub-networks are isolated from each other. Based on the common source relationship network, the unit generates identical video fingerprints for the videos in each sub-network. The fingerprint generation unit is further configured to reduce the frequency of recommending videos with the same video fingerprint to the user based on the video fingerprint, or to use the video fingerprint as a feature of one dimension when the video recommendation ranking model performs video recommendation ranking, so that the video recommendation ranking model prioritizes recommending videos with different video fingerprints.

10. The apparatus according to claim 9, wherein the homology identification unit is specifically used for: Obtain the first distance between each frame of the first video and each of the target second videos; in, For each frame of the first video, when a target frame image corresponding to the frame image exists in the target second video, the first distance is the distance between the frame image and the target frame image corresponding to the frame image. When the target second video does not contain the target frame image corresponding to the frame image, the first distance is the default distance; Based on the first distance between each frame of the first video and each of the target second videos, a second distance is determined between the first video and each of the target second videos, wherein the second distance is the average distance or the cumulative minimum distance of the first distance; Based on the second distance between the first video and each of the target second videos, a target second video that meets the preset distance requirement of the second distance is selected as a source video of the first video.

11. The apparatus according to claim 9, further comprising: The feature extraction unit is used to extract features from the frame images of each video in the video database using a preset visual feature extraction model before the homology relationship identification unit determines the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the frame images of the first video, so as to obtain the feature vector of each frame image of the frame image. The visual feature extraction model is used to: divide the input frame-by-frame image into at least two regions, and output the feature vector of the frame-by-frame image based on the pixel features and position information of each region; The homology recognition unit is specifically used to: determine the target frame image corresponding to each frame of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video.

12. The apparatus of claim 11, further comprising: The index building unit is used to construct an index library for the feature vectors of all videos in the video database using the HNSW method before the source relationship identification unit determines the target frame image corresponding to each frame image of the first video from the frame images of the second video based on the similarity between the feature vectors of the frame images of the first video and the feature vectors of the frame images of the second video. The homology recognition unit is specifically used to: determine the similarity between the feature vectors of the first video's frame-by-frame images and the feature vectors of the second video's frame-by-frame images according to the index library, and determine the target frame-by-frame image corresponding to each frame-by-frame image of the first video from the frame-by-frame images of the second video.

13. The apparatus according to any one of claims 9-12, wherein the preset similarity requirement includes: The image that ranks in the top K positions with the highest similarity between the frame-dropped images of the first video and the frame-dropped images of the second video, and whose similarity is greater than a preset similarity threshold, where K is an integer greater than 0.

14. The apparatus according to any one of claims 9-12, wherein the fingerprint generation unit is specifically used for: According to the preset fingerprint encoding rules, unique identification information is generated for different sub-networks; Based on the identity information of the sub-network, the same video fingerprint is generated for the videos in the sub-network.

15. The apparatus according to any one of claims 9-12, wherein the fingerprint generation unit is specifically used for: For each sub-network, a hash operation is performed based on the attribute information of one or more videos in the sub-network to obtain the hash value corresponding to the sub-network; Based on the hash value corresponding to the sub-network, the same video fingerprint is generated for the videos in the sub-network.

16. The apparatus according to any one of claims 9-12, wherein the size of the preset time interval is positively correlated with the length of the video to be framed.

17. An electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1-8.

18. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method according to any one of claims 1-8.

19. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Similar video determination method and device, terminal and storage medium

    CN114363672A