Method and system for detecting repetition degree of video based on multi-split structure
By employing a multi-scene video detection method, utilizing keyframe extraction, grayscale image processing, and feature point analysis, the problem of low efficiency and insufficient robustness in repeatability detection on short video platforms is solved, achieving efficient and accurate video repeatability recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies are inefficient at detecting video duplication on short video platforms, failing to meet real-time processing requirements. Furthermore, traditional algorithms lack robustness to operations such as video cropping, scaling, and rotation, making it difficult to effectively identify video infringement.
A multi-shot video detection method is adopted. Keyframes are extracted at preset intervals of N frames and converted into grayscale images. After downsampling, the absolute difference of the simplified image is calculated to generate feature points. The difference coefficient is calculated by combining grayscale and time weights to determine the video repetition.
It significantly reduces data processing volume, improves computing efficiency and accuracy, and can identify hidden infringement methods such as video cropping and scaling. It is suitable for copyright review and deduplication of massive short videos.
Smart Images

Figure CN121661567A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of repeatability detection technology, specifically to a repeatability detection method and system based on multi-scene structured video. Background Technology
[0002] Video duplication detection technology relies on algorithms to quantify and compare the similarity of two or more video contents. On current short video platforms, the number of new videos added daily is enormous. Relying entirely on manual review is not only inefficient but also fails to meet real-time processing demands. Duplication detection systems can achieve automated screening around the clock, significantly improving content processing efficiency.
[0003] Because videos are multimodal data that integrates visual information, audio streams, and time series data, their volume is enormous. Directly comparing frames one by one would incur extremely high computational and time costs, especially when dealing with massive video libraries. Furthermore, infringers often manipulate videos by cropping, scaling, rotating, and color-correcting to evade detection. These modifications often result in minimal visual changes but are enough to interfere with the judgment of traditional algorithms, thus placing higher demands on the robustness of detection technologies. For platforms, condoning video infringement would severely dampen the creative enthusiasm of original creators, thereby affecting the health and quality of the platform's content ecosystem. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for repeatability detection based on multi-scene structured video, thereby solving the above-mentioned technical problems.
[0005] The objective of this invention can be achieved through the following technical solutions: A method and system for repeatability detection based on multi-scene structured video, comprising: S1: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image. Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; S2: Calculate the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; S3: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.
[0006] As a further aspect of the present invention: in step S3, the method for determining the degree of repetition between the short video and the comparison video based on the difference coefficient G includes: If the difference coefficient G=0, the short video is the same as the comparison video, and the short video plagiarizes the comparison video. If the repetition coefficient 0 < G ≤ G sta The short video and the comparison video have a high degree of repetition, prompting staff to take action. If the repetition coefficient G > G sta The short videos and the comparison videos had low overlap, among which G sta This represents the preset standard brick repetition coefficient.
[0007] As a further aspect of the present invention: in step S1, ensure that the number of keyframes is greater than or equal to 10% × N. all , where N all This represents the total number of frames in the short video.
[0008] As a further aspect of the present invention: in step S1, the method for downsampling based on image size to obtain a simplified image includes: The grayscale image is divided into several parts by a preset simplification factor L. Matrix, calculation The mean gray value of the pixels in the matrix is used to make the gray value of the pixels in the simplified image equal to the mean gray value of the corresponding matrix.
[0009] As a further aspect of the present invention: in step S2, if the number of storyboard images is equal to 1, then the subsequent steps are stopped.
[0010] As a further aspect of the present invention: in step S3, the total duration T of the short video is obtained; if the total duration T of the short video is less than the preset minimum duration, the subsequent steps are stopped.
[0011] As a further aspect of the present invention: in step S3, if the number of feature points of the short video and the comparison video are different, the difference coefficient G is set to 0, and subsequent calculations are stopped.
[0012] A repetition detection system based on multi-scene video structure includes: Simplified module: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image; Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; Calculation module: Calculates the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1 All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; Comparison module: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.
[0013] The beneficial effects of the present invention are as follows: First, a capture interval is preset. Starting from the first frame of the short video, a frame is captured every fixed number of frames as a key frame, and these key frame images are uniformly converted into grayscale images to simplify subsequent processing.
[0014] Next, downsampling is performed on the original size of the grayscale image to generate a simplified image that is smaller and more information-concentrated, aiming to significantly reduce the amount of data processing. Then, the core step is to calculate the sum of the absolute differences in grayscale values of all corresponding pixels between any two adjacent simplified images, and compare this sum with a preset stability threshold: if the difference is greater than the threshold, it is determined that there is a significant content change between the two frames, and both frames are retained as storyboard images; if the difference is less than or equal to the threshold, it is determined that the content change is not significant, and only the first frame is retained as a storyboard image to represent the stable segment, while the second frame is discarded to avoid redundancy.
[0015] After the storyboard selection is completed, the precise time nodes on the original short video timeline are extracted for each retained storyboard image. These nodes are then combined with the corresponding image features to generate a series of feature points. Finally, the same processing is applied to the comparison video to obtain its feature point set. A comprehensive calculation formula is used to evaluate the difference coefficient between the two videos. This calculation considers not only the differences in image grayscale features between corresponding feature points but also the differences in the temporal distribution of feature points, assigning adjustable weight coefficients to these two types of differences. Finally, the weighted summation of the difference coefficients scientifically and comprehensively determines the degree of repetition between the two videos.
[0016] This method significantly reduces the amount of data that needs to be processed through intelligent frame extraction and content change detection. At the same time, it combines visual content with time series for multi-dimensional comparison, thereby greatly improving the accuracy and reliability of video duplication identification while ensuring computational efficiency. It is especially suitable for copyright review and deduplication applications of massive short videos. Attached Figure Description
[0017] The invention will now be further described with reference to the accompanying drawings.
[0018] Figure 1 This is a flowchart illustrating a method and system for repeatability detection based on multi-scene video structure according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please see Figure 1 As shown, this invention is a method and system for repeatability detection based on multi-scene video structures, comprising the following steps: S1: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image. Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; S2: Calculate the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1 All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; S3: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.
[0021] It should be noted that a suitable truncation interval needs to be set in advance. This truncation interval is not determined arbitrarily, but rather requires comprehensive consideration of factors such as the overall length of the short video, the frame rate, and the expected analysis accuracy.
[0022] Once the extraction interval is determined, the keyframe extraction process officially begins from the first frame of the short video. Here, the "first frame" is the starting point of the entire video content. Extraction proceeds sequentially according to a pre-set fixed frame count. Every specified number of frames, a frame is selected as a keyframe. This systematic extraction method ensures that the acquired keyframes are evenly distributed along the timeline, thus comprehensively and objectively reflecting the state of the short video at different moments.
[0023] After capturing the keyframes, the next step is to convert these keyframe images into grayscale images. This conversion simplifies subsequent processing. Color images typically contain rich color information, but this information can increase the complexity and computational load of data processing in some cases. Grayscale images, on the other hand, retain only luminance information, compressing the complex three-dimensional color space into a one-dimensional grayscale level. This not only reduces data storage and processing time but also allows subsequent algorithms to focus more on the essential features of the image, such as edges and textures, thereby improving processing efficiency and accuracy. The grayscale keyframe images obtained through this conversion lay a solid foundation for further analysis, recognition, and understanding of short video content. When capturing keyframes, it is crucial to ensure the accuracy and integrity of each frame to avoid the loss of critical information due to data transmission errors or equipment malfunctions.
[0024] Next, downsampling is performed based on the original size of the grayscale image to generate a simplified image that is more compact and highly condensed in information. The core purpose of this step is to significantly reduce the amount of data processing, allowing subsequent processing steps to run more efficiently. After the downsampling operation is completed, the sum of the absolute differences in grayscale values of all corresponding pixels between any two adjacent simplified images is calculated. Specifically, for each pair of adjacent simplified images, the pixels at the same location are compared one by one, the absolute difference in grayscale values of these two pixels is precisely calculated, and then all these differences are summed to obtain a total value.
[0025] The calculated sum is then compared to a pre-set stability threshold. If the difference exceeds the threshold, it indicates a significant content change between the two frames. This change could manifest as the addition or removal of elements, movement of positions, or alteration of form. In this case, to fully record the change, both frames are retained as storyboard images to ensure no dynamic details of the video content are missed. Conversely, if the difference is less than or equal to the threshold, it indicates minimal content change between the two frames, indicating a relatively stable state. In this case, only the first frame is retained as a storyboard image to represent the stable segment, while the second frame, due to its high similarity to the first, is deemed redundant and discarded, effectively avoiding redundant data storage and processing.
[0026] After completing the above-mentioned segment selection process, it is necessary to accurately extract the time nodes of each retained segment image on the original short video timeline. These time nodes act like markers, accurately recording the moment each segment image appears during video playback. Simultaneously, these time nodes are combined with corresponding image features to generate a series of feature points with clear temporal and characteristic attributes. These feature points not only contain the visual information of the image itself but also relate to its temporal position in the video, providing rich dimensions for subsequent video analysis and comparison.
[0027] Finally, after applying the exact same processing procedure to the comparison videos to be tested, their feature point sets can also be obtained. At this point, a comprehensive calculation formula is introduced to evaluate the difference coefficient between the two videos. By using a weighted aggregation method, various difference factors are comprehensively considered, ultimately resulting in a difference coefficient that fully reflects the degree of difference between the two videos. Based on this difference coefficient, the degree of duplication between the two videos can be scientifically and accurately determined, providing strong support for applications such as video copyright protection and content similarity detection.
[0028] This method integrates intelligent frame extraction technology and dynamic content change detection mechanisms to construct a highly efficient and accurate video processing framework. Its core advantage lies in combining an adaptive frame rate compression strategy with stability judgment based on pixel-level difference analysis. This achieves exponential reduction in data volume while fully preserving the temporal characteristics and key visual information of the video content. This dual-optimization design enables the system to process massive amounts of video material with limited computing resources, making it particularly suitable for the current industry situation where millions of new short video content are added daily.
[0029] In another preferred embodiment of the present invention, the method for determining the degree of repetition between a short video and a comparison video based on the difference coefficient G includes: If the difference coefficient G=0, the short video is the same as the comparison video, and the short video plagiarizes the comparison video. If the repetition coefficient 0 < G ≤ G sta The short video and the comparison video have a high degree of repetition, prompting staff to take action. If the repetition coefficient G > G sta The short videos and the comparison videos had low overlap, among which G sta This represents the preset standard brick repetition coefficient.
[0030] It is worth noting that a video duplication assessment system was constructed using the difference coefficient G as the core indicator. When G=0, it indicates that the two videos are completely identical in content and sequence, and can be directly judged as plagiarism; if 0<G≤G sta If the similarity is high, the system will automatically mark it and push it to the human review team for in-depth verification; while when G > G sta When the thresholds are clearly defined, it means the differences between the two are significant, ruling out any potential infringement. This numerically quantified grading mechanism not only achieves a seamless transition from initial machine screening to thorough manual review, but also adapts to different scenario requirements by dynamically adjusting threshold parameters. It ensures the rigor of copyright protection while significantly improving review efficiency, effectively addressing the pain points of traditional manual comparison being time-consuming and costly. The solution also supports multi-dimensional feature fusion analysis, enabling accurate identification of hidden infringement methods such as editing and reassembly, and variable-speed playback, providing reliable technical support for the governance of the digital content ecosystem.
[0031] In another preferred embodiment of the present invention, the number of keyframes is ensured to be greater than or equal to 10% × N. all , where N all This represents the total number of frames in the short video.
[0032] Understandable, In another preferred embodiment of the present invention, the method for downsampling based on image size to obtain a simplified image includes: The grayscale image is divided into several parts by a preset simplification factor L. Matrix, calculation The mean gray value of the pixels in the matrix is used to make the gray value of the pixels in the simplified image equal to the mean gray value of the corresponding matrix.
[0033] It's important to note that during video processing and analysis, in order to comprehensively and accurately capture the visual information and dynamic changes in short videos, a crucial rule must be strictly followed: ensure that the number of keyframes selected is at least 10% of the total number of frames. Here, N refers to... all It clearly indicates the total number of frames contained in the short video.
[0034] In another preferred embodiment of the present invention, if the number of storyboard images is equal to 1, then the subsequent steps are stopped.
[0035] It's important to note that in the video processing workflow, when the system detects that the number of storyboard images is exactly one, it will trigger a termination mechanism to stop all subsequent processing steps. This is because a single storyboard image means that the entire video content does not present any significant visual changes or scene transitions; it is essentially a static image. Continuing to perform subsequent complex analysis at this point would not only fail to extract useful information but would also result in redundant data and a waste of computing resources due to overprocessing.
[0036] In another preferred embodiment of the present invention, the total duration T of the short video is obtained. If the total duration T of the short video is less than the preset minimum duration, the subsequent steps are stopped.
[0037] Understandably, during the initialization phase of a short video processing system, the primary task is to accurately obtain the total duration T of the target video. This parameter is obtained by decoding video metadata or by frame-by-frame analysis, ensuring the accuracy and reliability of the value. A built-in duration verification mechanism will immediately trigger a process termination command and suspend all subsequent processing steps when T is detected to be less than the preset minimum duration threshold. On the one hand, excessively short video clips often lack complete semantic expression and visual narrative logic, exhibiting a high degree of content fragmentation and making it difficult to extract discriminative features; on the other hand, such ultra-short materials are often recorded by device malfunctions, contain invalid empty shots, or are uploaded by users for testing purposes. Continuing to process these materials not only wastes computational resources but may also introduce noise that interferes with model training.
[0038] In another preferred embodiment of the present invention, if the number of feature points of the short video and the comparison video are different, the difference coefficient G is set to 0, and subsequent calculations are stopped.
[0039] It is worth noting that during the video similarity evaluation process, when the system detects a discrepancy in the number of feature points between the test video and the comparison video, it will forcibly set the difference coefficient G=0 and immediately terminate all subsequent calculation processes. Feature points, as structured identifiers carrying video content, directly indicate that the two videos are not comparable in their fundamental dimensions. This could be due to mismatched durations, differences in keyframe extraction strategies, or fundamental changes in the main content. Continuing with complex feature matching and weighted calculations at this point not only loses its algorithmic meaning but also leads to error accumulation and resource waste.
[0040] This design effectively enhances the system's fault tolerance, especially when processing user-uploaded non-standard format videos or content that has undergone non-linear editing, preventing program crashes caused by abnormal data. By employing an early failure / fail-fast principle, the system completes feasibility verification before incorporating significant computational load, significantly reducing the proportion of invalid computations. Combined with a dynamic threshold adjustment algorithm, the system can also autonomously learn a reasonable range of feature point fluctuations based on industry characteristics, maintaining strict judgment while possessing flexibility to adapt to different content styles.
[0041] A repetition detection system based on multi-scene video structure includes: Simplified module: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image; Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; Calculation module: Calculates the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1 All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; Comparison module: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.
[0042] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.
Claims
1. A method for repeatability detection based on multi-scene video, characterized in that, Includes the following steps: S1: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image. Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; S2: Calculate the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1 All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; S3: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.
2. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S3, the method for determining the degree of repetition between the short video and the comparison video based on the difference coefficient G includes: If the difference coefficient G=0, the short video is the same as the comparison video, and the short video plagiarizes the comparison video. If the repetition coefficient 0 < G ≤ G sta The short video and the comparison video have a high degree of repetition, prompting staff to take action. If the repetition coefficient G > G sta The short videos and the comparison videos had low overlap, among which G sta This represents the preset standard brick repetition coefficient.
3. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S1, ensure that the number of keyframes is greater than or equal to 10% × N. all , where N all This represents the total number of frames in the short video.
4. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S1, the method for downsampling based on image size to obtain a simplified image includes: The grayscale image is divided into several parts by a preset simplification factor L. Matrix, calculation The mean gray value of the pixels in the matrix is used to make the gray value of the pixels in the simplified image equal to the mean gray value of the corresponding matrix.
5. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S2, if the number of storyboard images is equal to 1, then the subsequent steps are stopped.
6. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S3, the total duration T of the short video is obtained. If the total duration T of the short video is less than the preset minimum duration, the subsequent steps are stopped.
7. The repetition detection method based on multi-scene structure video according to claim 1, characterized in that, In step S3, if the number of feature points in the short video and the comparison video are different, the difference coefficient G is set to 0, and subsequent calculations are stopped.
8. A repeatability detection system based on multi-scene video, characterized in that, include: Simplified module: Preset the extraction interval N, starting from the first frame of the short video, extract one frame every N frames and record it as a key frame, and convert the image corresponding to the key frame into a grayscale image; Obtain the image size n×m of the grayscale image, downsample based on the image size, and obtain a simplified image; Calculation module: Calculates the i-th simplified image G i With the (i+1)th simplified image G i+1 absolute difference Among them, G i_x,y Represents a simplified image G i The grayscale value of the pixel in the x-th row and y-th column of the simplified image, where X represents the total number of rows and Y represents the total number of columns in the simplified image; If the absolute difference D i,i+1 >D sta , will simplify image G i With simplified image G i+1 All are recorded as storyboard images. If the absolute difference D i,i+1 ≤D sta , will simplify image G i Let G be the storyboard image, and the simplified image be G. i+1 Remove; Comparison module: Obtain the j-th storyboard image F j The corresponding time point T in the short video j Generate feature points , among which, FD j,j+1 Representing storyboard image F j With storyboard image F j+1 The absolute difference, and ; Acquire comparison videos and generate feature points Calculate the coefficient of difference Where J represents the number of feature points, λ1 represents the preset grayscale value weight, and λ2 represents the preset time weight. The repetition between the short video and the comparison video is determined based on the difference coefficient G.