Intelligent video editing and summary generation method and device based on semantic segmentation

Through the intelligent video editing and summary generation method based on semantic segmentation, the key content of the video is automatically extracted and an organized summary is generated, which solves the problem of insufficient video data processing efficiency and accuracy in traditional methods and achieves efficient and accurate video retrieval. and personalized recommendations.

CN118381980BActive Publication Date: 2024-08-27ANSJER ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410807809.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-08-27
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Existing technologies are difficult to quickly and accurately extract key information from massive video data and generate concise video summaries. Traditional methods rely on manual operations, which are time-consuming and labor-intensive and difficult to fully grasp the semantic content and structural context of the video.

Method used

It adopts an intelligent video editing and summary generation method based on semantic segmentation, automatically identifies key objects and scenes in the video through multi-level semantic segmentation and key frame extraction technology, and combines the information content and characteristic distortion of the video iteration signal components to generate a concise Clear video abstracts, and build a video semantic index structure to support flexible retrieval.

Benefits of technology

It improves the efficiency and accuracy of video editing and summary generation, realizes multi-dimensional video semantic representation, supports globally optimal video summary generation and online optimization, and greatly improves the accessibility and retrieval efficiency of video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381980B
    Figure CN118381980B
Patent Text Reader

Abstract

The present application discloses a method and device for intelligent video editing and summary generation based on semantic segmentation. The method obtains a video data set including multiple key frame information by preprocessing multiple video data; continuously iteratively decomposes the video data set to obtain a video iterative signal component set including multiple iterative signal groups, and calculates the information amount of each iterative signal group to determine the video feature distortion; generates semantic topic labels, and determines a video frequency control smoothness index and a video frequency control distortion index according to the video feature distortion and the semantic topic labels; completes the training of a semantic embedding model according to the semantic topic labels and the key frame information to obtain a semantic embedding vector; constructs a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector; obtains a target summary segment corresponding to a video editing request in the video semantic index structure and outputs it as a video summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and in particular to a method and device for intelligent video editing and summary generation based on semantic segmentation. Background Art

[0002] With the increasing popularity of video devices and the rapid development of network technology, video has become an important medium for people to obtain information, record life, and show themselves. However, with the explosive growth of video content, how to quickly and accurately extract key information from massive video data and generate concise video summaries has become an urgent problem to be solved. Traditional video editing and summary generation methods mainly rely on manual operations, which is not only time-consuming and labor-intensive, but also difficult to fully grasp the semantic content and structural context of the video.

[0003] In recent years, artificial intelligence technology represented by deep learning has made great progress, bringing new opportunities for intelligent analysis and processing of video content. By performing pixel-level semantic segmentation on video images, deep learning models can automatically identify key objects, characters, and scenes in the video, thereby gaining a more detailed and comprehensive understanding of the video content. Video analysis methods based on semantic segmentation can not only extract the semantic information of the video, but also characterize the spatiotemporal evolution of the video content, providing an important basis for video structuring and summary generation.

[0004] Therefore, there is an urgent need for an intelligent video editing and summary generation method that can fully mine the semantic information of the video, automatically extract key content, generate concise, clear and well-structured video summaries, and support flexible and efficient video retrieval and personalized recommendations. Summary of the invention

[0005] The embodiments of the present application provide a method and device for intelligent video editing and summary generation based on semantic segmentation, which can fully mine the semantic information of the video, automatically extract key content, generate concise and well-structured video summaries, and support flexible and efficient video retrieval and personalized recommendations.

[0006] In a first aspect, an embodiment of the present application provides an intelligent video editing and summary generation method based on semantic segmentation, the method comprising:

[0007] Acquire video data collected by multiple video acquisition devices, pre-process the multiple video data, and obtain a video data set, where the video data set includes multiple key frame information;

[0008] Continuously iteratively decompose the video data set to obtain a video iterative signal component set, where the video iterative signal component set includes multiple iterative signal groups, calculate the information amount of each iterative signal group, and determine the video feature distortion corresponding to the video data set according to the multiple information amounts;

[0009] Obtaining video influence factors and candidate topic labels corresponding to the video data set, generating semantic topic labels according to the video influence factors and the candidate topic labels, and determining a video frequency control smoothness index and a video frequency control distortion index according to the video feature distortion and the semantic topic labels;

[0010] Complete the training of the semantic embedding model to be trained according to the semantic topic label and each key frame information, and obtain the semantic embedding vector corresponding to the video data set output by the semantic embedding model;

[0011] Constructing a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector;

[0012] When a video editing request is received, a target summary segment corresponding to the video editing request is obtained in the video semantic index structure, and the target summary segment is output as a video summary corresponding to the video editing request.

[0013] In a second aspect, the present application further provides an intelligent video editing and summary generation device, comprising:

[0014] The data acquisition module is used to acquire video data acquired by multiple video acquisition devices, pre-process the multiple video data, and acquire a video data set, which includes multiple key frame information.

[0015] The distortion determination module is used to continuously iteratively decompose the video data set to obtain a set of video iterative signal components, which includes multiple iterative signal groups, calculate the information amount of each iterative signal group, and determine the video feature distortion corresponding to the video data set based on the multiple information amounts.

[0016] The label acquisition module is used to obtain the video influence factor and candidate topic labels corresponding to the video data set, generate semantic topic labels based on the video influence factor and candidate topic labels, and determine the video frequency control smoothness index and the video frequency control distortion index based on the video feature distortion and the semantic topic labels.

[0017] The vector acquisition module is used to complete the training of the semantic embedding model to be trained according to the semantic topic label and each key frame information, and obtain the semantic embedding vector corresponding to the video data set output by the semantic embedding model.

[0018] The index building module is used to build a video semantic index structure according to a video frequency control smoothness index, a video frequency control distortion index and a semantic embedding vector.

[0019] The summary output module is used to obtain a target summary segment corresponding to the video editing request in the video semantic index structure when receiving a video editing request, and output the target summary segment as the video summary corresponding to the video editing request.

[0020] In a third aspect, the present application further provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the intelligent video editing and summary generation method based on semantic segmentation as described in the first aspect is implemented.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the intelligent video editing and summary generation method based on semantic segmentation as described in the first aspect.

[0022] Compared with the prior art, this application has at least the following beneficial effects:

[0023] 1. Improve the efficiency and accuracy of video editing and summary generation. The present invention automatically identifies key objects, characters and scenes in the video through multi-level semantic segmentation and key frame extraction technology, extracts the most representative video clips, and generates concise and clear video summaries. At the same time, by calculating the information content of the video iteration signal components and the video feature distortion, the present invention can control the information redundancy and distortion of the summary while ensuring the semantic integrity of the video, further improving the quality and accuracy of summary generation.

[0024] 2. Realize multi-dimensional video semantic representation and flexible video retrieval. The present invention introduces a video semantic embedding model, and maps the video content to a low-dimensional semantic space through the learning of semantic topic tags and key frame information, forming a compact and highly discriminative vectorized representation. Based on the video semantic embedding vector, the present invention constructs a multi-level video semantic index structure, which supports users to retrieve videos in flexible ways such as text descriptions and example clips, quickly locate relevant shots and clips, and greatly improves the accessibility and retrieval efficiency of video data.

[0025] 3. Support global optimal video summary generation and online tuning. The present invention constructs a candidate summary segment relationship graph and introduces an iterative edge clipping algorithm to achieve global optimal selection and combination of candidate summary segments under the premise of satisfying the constraints of summary duration, semantic coherence and topic diversity, and generates a video summary with rich content, reasonable structure and distinct theme.

[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A flowchart of an intelligent video editing and summary generation method based on semantic segmentation shown in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of an intelligent video editing and summary generation device shown in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0036] The technical solution of the embodiment of the present application is introduced below.

[0037] With the increasing popularity of video devices and the rapid development of network technology, video has become an important medium for people to obtain information, record life, and show themselves. However, with the explosive growth of video content, how to quickly and accurately extract key information from massive video data and generate concise video summaries has become an urgent problem to be solved. Traditional video editing and summary generation methods mainly rely on manual operations, which is not only time-consuming and labor-intensive, but also difficult to fully grasp the semantic content and structural context of the video.

[0038] In recent years, artificial intelligence technology represented by deep learning has made great progress, bringing new opportunities for intelligent analysis and processing of video content. By performing pixel-level semantic segmentation on video images, deep learning models can automatically identify key objects, characters, and scenes in the video, thereby gaining a more detailed and comprehensive understanding of the video content. Video analysis methods based on semantic segmentation can not only extract the semantic information of the video, but also characterize the spatiotemporal evolution of the video content, providing an important basis for video structuring and summary generation.

[0039] At the same time, users have also put forward higher requirements for the retrieval and recommendation of video content. The traditional video retrieval method based on keywords or tags is difficult to accurately describe the semantic connotation of the video, and the relevance and diversity of the retrieval results need to be improved. Users expect to be able to quickly find the video content of interest in a more natural and flexible way, and obtain personalized recommendations and customized services. This requires video analysis and summarization technology to not only accurately understand the video content, but also be able to capture the user's search intent and preference characteristics, and realize intelligent and personalized video retrieval and recommendation.

[0040] Therefore, there is an urgent need for an intelligent video editing and summary generation method that can fully mine the semantic information of the video, automatically extract key content, generate concise, clear and well-structured video summaries, and support flexible and efficient video retrieval and personalized recommendations.

[0041] To solve the above problems, please refer to Figure 1 , Figure 1 The flowchart of a method for intelligent video editing and summary generation based on semantic segmentation provided in an embodiment of the present application is shown below. The method for intelligent video editing and summary generation based on semantic segmentation in an embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the intelligent video editing and summary generation method based on semantic segmentation of this embodiment includes steps S101 to S106, which are described in detail as follows:

[0042] Step S101, obtaining video data collected by multiple video collection devices, preprocessing the multiple video data, and obtaining a video data set, wherein the video data set includes multiple key frame information.

[0043] Specifically, the video acquisition device is the main data source of this solution, such as using a camera as a video acquisition device. This application adopts multiple cameras with different functions, such as surveillance cameras, network cameras, car cameras, etc. This application requires key frame extraction of video data to further reduce the amount of data and improve the efficiency of subsequent processing. Key frames are the frames in the video that best represent the video content. Extracting key frames can significantly reduce the amount of video data while retaining the main semantic information of the video.

[0044] In some embodiments, the preprocessing of the multiple video data to obtain a video data set includes: converting the format of each of the video data into a preset format; obtaining quality assessment information corresponding to the converted video data, and determining target video data from the multiple video data based on the quality assessment information; performing key frame extraction on each of the target video data to obtain the key frame information corresponding to each of the target video data, and multiple key frame information constitute the video data set.

[0045] Different cameras may output video data in different formats, such as AVI, MP4, WMV, MOV, etc. In order to facilitate subsequent processing and analysis, this application needs to convert these heterogeneous video data into a unified preset format. In this solution, this application chooses to convert all videos into MPEG-4 format, which is a widely used video encoding standard with advantages such as high compression rate, good compatibility and high quality. The conversion process can be implemented using open source video processing libraries such as FFmpeg, for example, using the command

[0046] "ffmpeg -i input.avi -c:v libx264 -preset medium -b:v 1000k -c:a aac-b:a 128k output.mp4"

[0047] Convert AVI format video to MPEG-4 format, where the preset parameter specifies the encoding preset as medium (a balance between medium quality and encoding speed), the b:v parameter specifies the video bitrate as 1000k (i.e. 1Mbps), and the b:a parameter specifies the audio bitrate as 128k.

[0048] After the video format conversion, this application needs to evaluate the quality of the video data to eliminate videos with poor quality, determine the target video data among the multiple video data, and ensure the reliability and accuracy of subsequent analysis and processing. Video quality evaluation can be performed from multiple dimensions, such as resolution, frame rate, brightness, contrast, sharpness, noise, etc. In this solution, this application mainly uses two indicators, peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), to evaluate video quality. PSNR measures the difference between the video frame and the reference frame, that is, the noise level, and its calculation formula is:

[0049] ;

[0050] Where MAX is the maximum value of the video frame pixel (usually 255), and MSE is the mean square error between the video frame and the reference frame. The higher the PSNR value, the better the video quality. SSIM is used to measure the structural similarity between the video frame and the reference frame, taking into account factors such as brightness, contrast and structure. Its calculation formula is:

[0051] ;

[0052] Where μx and μy are the means of the two frames, σx and σy are the standard deviations of the two frames, σxy is the covariance of the two frames, and C1 and C2 are constants used to avoid the situation where the denominator is zero. The value range of SSIM is [0, 1]. The closer to 1, the better the video quality. When evaluating quality, this application can set thresholds for PSNR and SSIM. For example, if the PSNR is less than 30dB or the SSIM is less than 0.8, this application considers the video frame to be of poor quality and needs to be eliminated or further processed.

[0053] In this scheme, the present application adopts a method based on color histogram and motion vector analysis to extract key frames. First, the video frame is converted into HSV color space, the H (hue) and S (saturation) channels are extracted, and the HS histogram of each frame is calculated. HSV color space can better reflect the human eye's perception of color. The H channel represents the type of color, and the S channel represents the purity of the color. Extracting the HS histogram can describe the color distribution characteristics of the frame. Then, the HS histogram difference between two adjacent frames is calculated as a measure of the change in content between frames. The histogram difference can be measured using Euclidean distance, χ² distance and other measurement methods. If the difference is greater than a preset threshold (such as 0.6), it is considered that there is a significant change between the two frames, and the previous frame is marked as a key frame candidate. For key frame candidates, the present application also needs to further calculate the motion vector between it and the previous and next frames to reflect the movement and changes between video frames. The motion vector can be calculated using classic algorithms such as the Lucas-Kanade optical flow method. If the motion vector amplitude is greater than a preset threshold (such as 10 pixels), the frame is determined to be a key frame. In order to avoid keyframes being too sparse or too dense, this application sets a keyframe interval range, such as extracting a keyframe every 50-100 frames. At the same time, this application also needs to further evaluate and screen the extracted keyframes, eliminate low-quality or redundant keyframes, and obtain the final keyframe set. For example, for a video with a duration of 5 minutes and a frame rate of 30 frames per second, there are 9,000 frames in total. If this application sets the keyframe interval to 75 frames, then about 120 keyframes can be extracted, significantly reducing the amount of data. Finally, after the three preprocessing steps of video format conversion, video quality assessment, and keyframe extraction, this application can convert the original video camera data into a standardized, high-quality, information-condensed video dataset.

[0054] Step S102, continuously iteratively decompose the video data set to obtain a video iterative signal component set, the video iterative signal component set includes multiple iterative signal groups, calculate the information amount of each iterative signal group, and determine the video feature distortion corresponding to the video data set based on the multiple information amounts.

[0055] Specifically, the basic idea of ​​continuous iterative decomposition is to regard the video data as a composite signal composed of signal components of different frequencies, amplitudes and phases, and to gradually decompose signal components of different scales and abstract levels by iteratively filtering, downsampling and upsampling the video data. This process can be expressed by the mathematical formula:

[0056] ;

[0057] Where X(t) represents the original video signal, and They represent the low-frequency signal component and high-frequency signal component obtained by the i-th iterative decomposition, and n is the number of iterative decompositions.

[0058] In specific implementation, the present application can use classic signal processing tools such as wavelet transform to perform continuous iterative decomposition of video data. Wavelet transform is a time-frequency analysis tool that can extract local features of signals at different scales by scaling and translating the signal. Compared with the traditional Fourier transform, wavelet transform has unique advantages in processing non-stationary signals and mutation signals. By applying wavelet transform to video data analysis, the present application can perform multi-scale decomposition of video signals in both time and space dimensions and extract signal components of different time and space granularities.

[0059] For example, the present application can use Haar wavelet to perform two-dimensional wavelet decomposition on video frames, decomposing each frame into four sub-bands: low-frequency approximation sub-band (LL), horizontal high-frequency sub-band (LH), vertical high-frequency sub-band (HL), and diagonal high-frequency sub-band (HH), wherein the LL sub-band represents the low-frequency approximation of the original frame, and the LH, HL, and HH sub-bands represent the high-frequency details of the original frame in different directions. By recursively decomposing the LL sub-band, the present application can obtain lower-frequency approximation sub-bands and higher-frequency detail sub-bands, forming a multi-scale wavelet coefficient pyramid. By analyzing and processing different sub-bands and scales in the wavelet coefficient pyramid, the present application can extract key information and features of video data at different spatiotemporal granularities.

[0060] In the process of continuous iterative decomposition, this application needs to reasonably set the number and parameters of iterative decomposition according to the complexity of the video content and the application requirements. Generally speaking, the more iterations, the more signal components are decomposed, and the more detailed the description of the video content is, but it also means an increase in computational complexity. In practical applications, this application can determine the optimal number of iterations through experiments and cross-validation. For example, for a video with a duration of 5 minutes and a resolution of 1920×1080, this application can first perform 2-3 wavelet decompositions on the key frames, and then perform more recursive decompositions on the low-frequency approximate subbands until the preset reconstruction error threshold is met or the maximum number of iterations (such as 5-6 times) is reached.

[0061] In addition, the present application can also combine the semantic structure and content characteristics of the video to adopt different iterative decomposition strategies for different video clips. For example, for clips with rich semantic information and fast-changing details, the present application can increase the number of iterations to extract more high-frequency detail information; while for clips with sparse semantic information and slow-changing content, the present application can reduce the number of iterations and only extract the main low-frequency trend information. In this way, the present application can achieve adaptive signal decomposition and feature extraction between different video clips, further improving the accuracy and efficiency of video semantic analysis and summary generation. After continuous iterative decomposition, the present application finally obtains a set of video iterative signal components, which contains multi-level representations of video data at different spatiotemporal scales and semantic levels.

[0062] In some embodiments, the iterative signal group includes a low-frequency approximation subband and a high-frequency detail subband; the calculation of the amount of information of each of the iterative signal groups includes: obtaining first edge probability distribution information of the low-frequency approximation subband of each of the iterative signal groups; obtaining second edge probability distribution information of the high-frequency approximation subband of each of the iterative signal groups; obtaining joint probability distribution information corresponding to the low-frequency approximation subband and the high-frequency approximation subband of each of the iterative signal groups; and calculating the amount of information of each of the iterative signal groups based on the first edge probability distribution information, the second edge probability distribution information and the joint probability distribution information.

[0063] Information content is an indicator to measure the complexity and information richness of signal components. It reflects the proportion of signal components in video data and the semantic information they carry. In this solution, this application uses mutual information in information theory to measure the information content of video iteration signal components. Mutual information is a non-negative symmetric measure of the correlation between two random variables. It represents the average amount of information obtained by a random variable by observing another random variable. It is defined as follows:

[0064] ;

[0065] Among them, X and Y represent two discrete random variables, P(x) and P(y) represent the marginal probability distributions of X and Y respectively, and P(x, y) represents the joint probability distribution of X and Y. The larger the value of mutual information I(X;Y), the stronger the correlation between X and Y, and the more information X obtains by observing Y.

[0066] In the video iterative signal component set, the present application can regard each signal component as a discrete random variable, whose value is the coefficient value of the component on different video frames or segments. In order to calculate the mutual information between signal components, the present application needs to first estimate their marginal probability distribution and joint probability distribution.

[0067] Specifically, for the low-frequency approximate subband LLi and the high-frequency detail subbands LHi, HLi, HHi obtained by the iterative decomposition of the i-th time, the present application can use a method similar to the calculation of information entropy to normalize and quantize their coefficient values. For example, the present application can divide the coefficient value range of the LLi subband into k intervals, count the number of coefficient values ​​in each interval, and divide it by the total number of coefficients to obtain the marginal probability distribution estimate of the LLi subband:

[0068] ;

[0069] Where nj represents the number of coefficient values ​​in the jth interval, and m represents the total number of coefficients in the LLi subband. Similarly, the present application can estimate the marginal probability distribution of the LHi, HLi, and HHi subbands:

[0070] ;

[0071] ;

[0072] ;

[0073] Next, the application needs to estimate the joint probability distribution between different subbands. Taking LLi and LHi subbands as an example, the application can count the frequency of occurrence of coefficient value pairs (j, k) of LLi and LHi subbands in different quantization intervals, and divide them by the total coefficient logarithm to obtain their joint probability distribution estimate:

[0074] ;

[0075] Where njk represents the frequency that the coefficient value of the LLi subband falls in the jth interval and the coefficient value of the LHi subband falls in the kth interval, and m represents the total coefficient logarithm of the LLi and LHi subbands. Using the above-mentioned estimated values ​​of the marginal probability distribution and the joint probability distribution, the present application can calculate the mutual information between the LLi and LHi subbands:

[0076] ;

[0077] The above formula represents the average amount of information obtained by the LLi subband by observing the LHi subband, reflecting the correlation and information redundancy between the two subbands. The larger the value of I(LLi; LHi), the stronger the correlation between the LLi and LHi subbands, and the greater the amount of information they contain.

[0078] Similarly, the present application can calculate the mutual information I(LLi; HLi) and I(LLi; HHi) between the LLi subband and the HLi and HHi subbands, as well as the mutual information I(LHi; HLi), I(LHi; HHi), and I(HLi; HHi) between the LHi, HLi, and HHi subbands. These mutual information values ​​characterize the correlation and information redundancy between subbands at different scales and directions, providing an important reference for subsequent video semantic analysis and summary generation.

[0079] By calculating the mutual information of each component in a set of video iterative signal components, the present application can quantitatively evaluate the correlation and information redundancy between different components, and deeply understand the intrinsic structure and information distribution pattern of video data.

[0080] Exemplarily, determining the video feature distortion corresponding to the video data set based on the multiple information amounts includes: calculating a first root mean square error between the low-frequency approximation subband and the video data set; calculating a second root mean square error between the high-frequency approximation subband and the video data set; and determining the video feature distortion corresponding to the video data set based on the information amount, the first root mean square error, and the second root mean square error.

[0081] Video feature distortion measures the degree of information loss introduced during the compression, transmission, and storage of video data. It reflects the degradation of video quality and the loss of key features. By evaluating video feature distortion, this application can determine the performance and effect of video processing and guide corresponding optimization and improvement measures.

[0082] In order to determine the video feature distortion, the application needs to comprehensively consider the information distribution of the video iteration signal components and the video quality evaluation index. Specifically, the application can use a weighted average method to weight the information of different components and their corresponding distortions to obtain the feature distortion of the entire video.

[0083] First, for the low-frequency approximate subband LLi and the high-frequency detail subbands LHi, HLi, and HHi obtained by the iterative decomposition of the i-th time, the present application calculates their distortion respectively. Here, the present application can use the mean square error (MSE) as a measure of the distortion, which indicates the degree of difference between the original video signal and the processed video signal. The calculation formula of MSE is as follows:

[0084] ;

[0085] Where n represents the total number of samples of the video signal. and They represent the i-th sample value of the original video signal and the processed video signal respectively. The larger the MSE value, the higher the distortion of the video signal and the more serious the quality degradation.

[0086] For the LLi subband, this application can compare it with the original video signal and calculate the MSE value:

[0087] ;

[0088] in, Represents the i-th coefficient value of the LLi subband.

[0089] Similarly, for the LHi, HLi, and HHi subbands, the present application can calculate their MSE values ​​with the original video signal respectively:

[0090] ;

[0091] ;

[0092] ;

[0093] , and Respectively represent the i-th coefficient value of LHi, HLi, and HHi subbands. After obtaining the MSE values ​​of each subband, the present application can perform weighted average on them and the corresponding amount of information to obtain the total distortion of the i-th iterative decomposition:

[0094] ;

[0095] Among them, I(LLi), I(LHi), I(HLi), and I(HHi) represent the information content of LLi, LHi, HLi, and HHi subbands respectively. Represents the total distortion of the i-th iterative decomposition. This weighted average process takes into account the information content and distortion of different sub-bands, so that the sub-bands with large information content and high distortion occupy a larger weight in the total distortion, and vice versa.

[0096] Finally, the application can accumulate the total distortion of all iterative decompositions to obtain the characteristic distortion of the entire video:

[0097] ;

[0098] Among them, m represents the total number of iterative decompositions, and D represents the feature distortion of the video. The larger the D value, the more serious the information loss introduced in the video processing, and the more obvious the quality degradation; the smaller the D value, the more key features and detail information the video retains, and the less quality loss.

[0099] In practical applications, this application can set a distortion threshold , the video feature distortion D and For example, when D is less than or equal to When D is greater than At the same time, this application believes that video processing introduces a large amount of information loss and needs to further optimize and improve the processing algorithm.

[0100] By adjusting parameters such as the number of iterative decompositions, quantization intervals, and information volume calculation methods, this application can flexibly control the calculation and evaluation process of video feature distortion in different video processing tasks and application scenarios. For example, in video compression and transmission, this application can appropriately increase The value of can reduce the data rate and transmission overhead as much as possible while ensuring the video quality; in video semantic analysis and summary generation, this application can appropriately reduce To ensure the integrity of key features and semantic information and improve the accuracy of analysis and generation.

[0101] Step S103, obtaining the video impact factor and candidate topic tags corresponding to the video data set, generating semantic topic tags according to the video impact factor and the candidate topic tags, and determining the video frequency control smoothness index and the video frequency control distortion index according to the video feature distortion and the semantic topic tags.

[0102] Specifically, the video impact factor corresponding to the preprocessed video data set obtained in the above steps is obtained, and candidate topic tags are generated by performing target detection and scene recognition on the video key frames, and the semantic topic tags of the video are generated by combining the video impact factor and the candidate topic tags. The video frequency control sequence is determined by the video feature distortion determined in the above steps and the video semantic topic tags generated in the above steps, and then the video frequency control smoothness index and the video frequency control distortion index are determined according to the video frequency control sequence.

[0103] In some embodiments, the video influence factor includes multiple influence factor parameters; the obtaining of the video influence factor and candidate topic tags corresponding to the video data set, and generating semantic topic tags based on the video influence factor and the candidate topic tags, includes: obtaining multiple influence factor parameters of the video data set, normalizing the multiple influence factor parameters, and constructing the video influence factor based on the normalized influence factor parameters; performing target detection and scene recognition on each key frame information of the video data set, and obtaining semantic information corresponding to the key frame information; the semantic information includes object information and scene category; generating candidate topic tags corresponding to the object information and the scene category respectively; generating the semantic topic tag based on multiple candidate topic tags and the video influence factor.

[0104] By establishing connections between low-level video impact factors and high-level semantic information, support is provided for subsequent video summary generation and semantic retrieval.

[0105] First, this application needs to obtain the video impact factor corresponding to the preprocessed video data set obtained in the above steps. Video impact factor is a set of attributes that reflect the importance and influence of video content, which can include multiple impact factor parameters such as video playback volume, number of likes, number of comments, number of shares and other user interaction data, as well as intrinsic attributes such as video length, clarity, and shooting equipment. These impact factors characterize the popularity and quality level of the video from different angles, and play an important role in understanding the semantic theme of the video and generating accurate tags.

[0106] This application can extract these impact factors from the metadata of the video dataset, and normalize and weight them. For example, for the i-th video, this application can define its impact factor vector IF_i as:

[0107] IF_i = [v_i, l_i, c_i, s_i, d_i, r_i, ...];

[0108] Among them, v_i represents the number of video views, l_i represents the number of likes, c_i represents the number of comments, s_i represents the number of shares, d_i represents the duration, and r_i represents the clarity, etc. In order to eliminate the dimensional differences of different impact factors, this application can perform maximum-minimum normalization on each impact factor:

[0109] IF_i_norm = (IF_i - min(IF)) / (max(IF) - min(IF));

[0110] Among them, min(IF) and max(IF) represent the minimum and maximum values ​​of all video impact factors, respectively. After normalization, the value range of each impact factor is between [0, 1], which is convenient for comparison and weighting.

[0111] Next, the application performs semantic analysis on the preprocessed video dataset, and extracts semantic information from the key frames of the video through technologies such as object detection and scene recognition. Object detection aims to identify important objects and people that appear in the video, such as faces, vehicles, animals, etc. Scene recognition aims to determine the scene category to which the video belongs, such as indoors, outdoors, cities, rural areas, etc. These semantic information can help the application understand the content theme and context of the video.

[0112] For object detection, this application can use deep learning-based methods, such as convolutional neural networks (CNNs), region proposal networks (RPNs), etc., to input video key frames into pre-trained detection models to identify the target regions and categories. For example, using the YOLO (You Only Look Once) algorithm, this application can obtain the bounding box coordinates and category labels of the target in the key frame:

[0113] [x1, y1, x2, y2, class_id, confidence];

[0114] Among them, (x1, y1) and (x2, y2) represent the coordinates of the upper left corner and lower right corner of the target bounding box, class_id represents the category number of the target, and confidence represents the confidence of the detection result. This application can set the confidence threshold, filter out the detection results with low probability, and count the frequency and duration of different categories of targets to generate candidate topic labels.

[0115] For scene recognition, this application can use image classification-based methods, such as CNN, ResNet, etc., to input the video keyframe into the pre-trained classification model to determine the scene category to which it belongs. For example, using the ResNet50 model trained with the Places365 dataset, this application can obtain the scene category and confidence of the keyframe:

[0116] [scene_id, confidence];

[0117] Among them, scene_id represents the category number of the scene, and confidence represents the confidence of the classification result. This application can count the frequency and duration of different scene categories in the video and generate candidate topic tags.

[0118] After obtaining the results of object detection and scene recognition, this application needs to combine the video impact factor and candidate topic labels to generate the final video semantic topic labels. This process can be regarded as a multimodal information fusion, which needs to comprehensively consider factors such as visual content, user interaction data and video attributes.

[0119] A simple fusion method is weighted averaging, that is, assigning different weights to candidate topic labels from different sources and then performing linear combinations. For example, this application can define the weights of target detection, scene recognition, and influence factors as w_o, w_s, and w_i, respectively. Then the semantic topic label of the i-th video can be expressed as:

[0120] L_i = w_o * L_oi + w_s * L_si + w_i * L_ii;

[0121] Among them, L_oi, L_si and L_ii represent the candidate topic label vectors obtained by object detection, scene recognition and influence factor respectively. These label vectors can be one-hot encoded or word embedded, reflecting the relevance of different topics or semantic concepts. The weights w_o, w_s and w_i can be determined by cross-validation or expert knowledge to balance the contribution of different information sources.

[0122] The following is a specific example of how to generate semantic topic tags for a video. Assume that this application has a video about "football game", and its impact factor vector is normalized as:

[0123] IF_norm = [0.8, 0.6, 0.7, 0.5, 0.9, 0.8, ...];

[0124] Through target detection, this application identified objects such as "football", "athlete", and "field" in the video key frames, and the generated candidate topic label vectors are:

[0125] L_o = [0.9, 0.8, 0.7, 0.2, 0.1, ...];

[0126] Through scene recognition, this application determines that the video mainly takes place in scenes such as "stadium" and "grassland", and the generated candidate topic label vector is:

[0127] L_s = [0.8, 0.6, 0.3, 0.1, 0.2, ...];

[0128] According to the impact factor, this application found that the video has a high number of views, likes, and shares, indicating that its content is popular and concerned by users. The generated candidate topic label vector is:

[0129] L_i = [0.7, 0.5, 0.4, 0.2, 0.1, ...];

[0130] Assuming that the weights of target detection, scene recognition and impact factor are set to 0.4, 0.3 and 0.3 respectively, the final generated video semantic topic label is:

[0131] L = 0.4 * L_o + 0.3 * L_s + 0.3 * L_i= 0.4 * [0.9, 0.8, 0.7, 0.2,0.1, ...] + 0.3 * [0.8, 0.6, 0.3, 0.1, 0.2, ...] + 0.3 * [0.7, 0.5, 0.4, 0.2,0.1, ...] = [0.82, 0.68, 0.54, 0.18, 0.13, ...];

[0132] From the results, we can see that among the semantic topic tags of the video, concepts such as "football", "athlete", "field", and "stadium" have high relevance scores, which are consistent with the actual content of the video. These semantic topic tags provide important guidance information for subsequent video summary generation and semantic retrieval.

[0133] In some embodiments, determining the video frequency control smoothness index and the video frequency control distortion index according to the video feature distortion and the semantic topic tag includes: calculating the video frequency control factor of the video clip corresponding to each of the key frame information according to the video feature distortion and the semantic topic tag; generating a video frequency control sequence according to a plurality of the video frequency control factors; calculating the mean and variance corresponding to the first-order difference of the video frequency control sequence, and generating the video frequency control smoothness index according to the mean and variance; obtaining the peak value and dynamic range of the video frequency control sequence, and generating the video frequency control distortion index according to the peak value and dynamic range.

[0134] In the above steps, this application generates labels that reflect the semantic themes of the video by analyzing the video content and influencing factors. These semantic labels provide a high-level conceptual description for understanding the content and theme of the video. However, semantic labels alone are not enough to fully characterize the dynamic characteristics and time change patterns of the video. In the above steps, this application will combine the video feature distortion and semantic theme labels to further analyze the change rules of the video in the time dimension and generate the corresponding video frequency control sequence.

[0135] First, this application needs to determine the video frequency control sequence based on the video feature distortion and semantic topic labels. The video feature distortion reflects the degree of information loss of the video in different time periods, while the semantic topic labels describe the semantic changes of the video content. This application can combine these two indicators to generate a comprehensive video frequency control factor.

[0136] Specifically, for the i-th video clip, the present application may define its frequency control factor as:

[0137] FC_i = α * D_i + β * ΔL_i;

[0138] Among them, D_i represents the feature distortion of the segment, ΔL_i represents the difference in semantic topic labels between the segment and the previous segment, and α and β are balance factors used to adjust the influence of distortion and semantic change on frequency control. ΔL_i can be measured by calculating the Euclidean distance or cosine similarity of the semantic topic label vectors of two segments.

[0139] After obtaining the frequency control factor of each video clip, this application can generate a video frequency control sequence:

[0140] FC = [FC_1, FC_2, ..., FC_n];

[0141] Where n is the total number of video clips. The frequency control sequence FC reflects the change pattern of the video content in the time dimension. The larger the value of FC_i, the more drastic the content change of the i-th clip is, and a higher frequency control is required to ensure video quality and semantic coherence.

[0142] Next, the present application calculates the smoothness index and distortion index of the video frequency control according to the frequency control sequence FC. The smoothness index measures the degree of smoothness of the video content change, while the distortion index measures the degree of drastic change of the video content. These two indexes characterize the effect and quality of the video frequency control from different angles.

[0143] For the stability index, this application can use the mean and variance of the first-order difference of the frequency control sequence to measure. The first-order difference reflects the change amplitude of the frequency control factor between adjacent segments, and its mean and variance respectively represent the average level and fluctuation degree of the change.

[0144] Specifically, the first-order difference of the frequency control sequence FC is:

[0145] ΔFC = [ΔFC_1, ΔFC_2, ..., ΔFC_n-1];

[0146] Among them, ΔFC_i = FC_i+1 - FC_i, represents the difference in frequency control factor between the i-th segment and the i+1-th segment.

[0147] The mean of the first-order difference ΔFC is μ_ΔFC, and the variance of the first-order difference ΔFC is σ_ΔFC^2. The mean μ_ΔFC reflects the average level of the frequency control factor change, and the variance σ_ΔFC^2 reflects the degree of fluctuation of the frequency control factor change. The smaller the mean and the smaller the variance, the higher the stability of the video frequency control and the smoother the video content changes.

[0148] For the distortion index, this application can use the peak value and dynamic range of the frequency control factor to measure. The peak value represents the maximum value of the frequency control factor, reflecting the most drastic change in the video content. The dynamic range represents the difference between the maximum and minimum values ​​of the frequency control factor, reflecting the amplitude range of the video content change.

[0149] Specifically, the peak value of the frequency control sequence FC is: FC_max = max(FC); the dynamic range of the frequency control sequence FC is: FC_range = max(FC) - min(FC); the larger the peak value FC_max, the larger the dynamic range FC_range, which means that the distortion of the video frequency control is higher and the video content changes more drastically.

[0150] Combining the smoothness index and distortion index, this application can comprehensively evaluate the effect and quality of video frequency control. Ideally, this application hopes that the smoothness index of video frequency control is high and the distortion index is low, which means that the video content changes smoothly and the distortion introduced by frequency control is small.

[0151] Step S104, completing the training of the semantic embedding model to be trained according to the semantic topic label and each key frame information, and obtaining the semantic embedding vector corresponding to the video data set output by the semantic embedding model.

[0152] Specifically, the semantic topic labels generated by the above steps and the key frame information extracted by the above steps are used to train the video semantic embedding model to obtain the semantic embedding vector of the video content, thereby achieving a low-dimensional, high-discrimination vectorized representation of the video content.

[0153] In some embodiments, the training of the semantic embedding model to be trained is completed based on the semantic topic label and each of the key frame information, including: inputting the key frame information into the semantic embedding model to be trained, and obtaining the predicted semantic embedding vector output by the semantic embedding model; encoding the semantic topic label to obtain a semantic encoding vector; calculating the cross entropy loss function of the predicted semantic embedding vector and the semantic encoding vector; and completing the training of the semantic embedding model according to the cross entropy loss function.

[0154] Specifically, this application first needs to construct a training dataset for the video semantic embedding model. The training dataset consists of two parts: video keyframes and corresponding semantic topic labels. Among them, the video keyframes are obtained through the keyframe extraction algorithm in the above steps, and they can represent the main content and scene changes of the video. The semantic topic labels are generated by analyzing the video content and influencing factors in the above steps, and they describe the semantic themes and attributes of the video in a high-level conceptual form.

[0155] For each video, this application can express its key frame sequence as:

[0156] F = [f_1, f_2, ..., f_m]; where f_i represents the i-th key frame, and m is the total number of key frames. At the same time, the application can represent the semantic topic label of the video as: L = [l_1, l_2, ..., l_n]; where l_j represents the j-th semantic topic label, and n is the total number of semantic topic labels.

[0157] Using the key frame sequence F and the semantic topic label L, this application can construct a training sample (F, L) of the video semantic embedding model. The goal of the model is to learn a mapping function f:F->E, mapping the key frame sequence F to the low-dimensional semantic embedding space E, so that in the E space, videos with similar semantics have similar embedding vectors, while videos with different semantics have embedding vectors that are far apart.

[0158] In practice, this application can use a variety of video semantic embedding models and training algorithms, such as deep learning-based convolutional neural networks (CNNs), recurrent neural networks (RNNs), attention mechanisms, etc. These models can effectively learn the spatiotemporal features and semantic information of videos and generate compact and robust embedding vector representations.

[0159] Taking the CNN-based video semantic embedding model as an example, this application can design the following network structure:

[0160] 1. Input layer: Receive the video key frame sequence F, each key frame is an image of fixed size.

[0161] 2. Convolution layer: Through multi-layer convolution and pooling operations, local features and semantic information of key frames are extracted. The size and number of convolution kernels can be adjusted according to specific tasks.

[0162] 3. Fully connected layer: Flatten the features extracted by the convolutional layer, and perform feature transformation and semantic mapping through a multi-layer fully connected network. The number of neurons in the fully connected layer can control the dimension of the embedding vector.

[0163] 4. Output layer: Generates a fixed-dimensional video semantic embedding vector as a vectorized representation of the video content.

[0164] During the training process, this application optimizes the model parameters by minimizing the loss function between the embedding vector and the semantic topic label. Commonly used loss functions include cross entropy loss, contrast loss, triple loss, etc., which can measure the similarity and difference between the embedding vector and the semantic label.

[0165] For example, using the cross entropy loss function, the application can convert the semantic topic label L into a one-hot encoding form and compare it with the embedding vector output by the model:

[0166] L_onehot = [0, 0, ..., 1, ..., 0];

[0167] Among them, the value is 1 at the position corresponding to the semantic topic label L, and 0 at the other positions. Then, this application converts the embedding vector into a probability distribution form through the Softmax function: P = Softmax(E); where E is the video semantic embedding vector and P is the probability distribution output by the Softmax function. The cross entropy loss function calculation formula is:

[0168] ;

[0169] Where n is the total number of semantic topic tags, L_onehot_i and P_i represent the one-hot encoding value and probability value of the i-th semantic topic tag, respectively. By minimizing the cross entropy loss, the present application can make the embedding vector generated by the model have a higher probability value at the position corresponding to the semantic topic tag, thereby realizing the alignment and mapping of the embedding vector and the semantic tag.

[0170] After the model training is completed, the application can input the video key frame sequence into the trained semantic embedding model to obtain the corresponding semantic embedding vector. These embedding vectors represent the semantic content and subject attributes of the video in a low-dimensional and highly discriminative form, and can be used for subsequent video analysis, retrieval, recommendation and other tasks.

[0171] Step S105, constructing a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector.

[0172] Specifically, according to the video frequency control smoothness index and the video frequency control distortion index determined in the above steps, combined with the video content semantic embedding vector obtained in the above steps, a multi-level video semantic index structure is constructed to support fast and accurate video clip retrieval and positioning based on semantic similarity.

[0173] Step S106: when a video editing request is received, a target summary segment corresponding to the video editing request is obtained from the video semantic index structure, and the target summary segment is output as a video summary corresponding to the video editing request.

[0174] Specifically, according to the user's video editing request, the video clips related to the request are retrieved in the video semantic index structure constructed in the above steps, and through semantic similarity calculation and timing optimization, a target summary clip with the theme as the core is generated for output.

[0175] The training of the semantic embedding model to be trained is completed according to the semantic topic label and each of the key frame information, including:

[0176] Inputting the key frame information into the semantic embedding model to be trained, and obtaining a predicted semantic embedding vector output by the semantic embedding model;

[0177] Encoding the semantic topic label to obtain a semantic encoding vector;

[0178] Calculating a cross entropy loss function of the predicted semantic embedding vector and the semantic encoding vector;

[0179] The training of the semantic embedding model is completed according to the cross entropy loss function.

[0180] In some embodiments, constructing a video semantic index structure based on the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector includes: hierarchically clustering the semantic embedding vectors of the video clips corresponding to each of the key frame information to obtain a semantic cluster hierarchy, wherein the semantic cluster hierarchy includes multiple semantic clusters; obtaining a cluster center vector corresponding to each of the semantic clusters and the video clips located in the semantic cluster; constructing a mapping relationship between the cluster center vectors and the video clips; and constructing the video semantic index structure based on the mapping relationship and the semantic cluster hierarchy.

[0181] Specifically, the present application adopts a method based on hierarchical clustering and inverted indexing to construct a video semantic index. The method first hierarchically clusters the semantic embedding vectors of the video clips to obtain a tree-like semantic cluster hierarchy, and then constructs a local inverted index within each semantic cluster to achieve top-down hierarchical retrieval and positioning.

[0182] The algorithm flow is as follows:

[0183] Input: video clip set V={v_1, v_2, ..., v_n}, where each video clip v_i contains a semantic embedding vector E_i, a frequency control smoothness index μ_i and a distortion index max_i; Output: a multi-level video semantic index structure I.

[0184] 1. Perform hierarchical clustering on all semantic embedding vectors {E_1, E_2, ..., E_n} in the video clip set V to obtain a tree-like semantic cluster hierarchy T. The clustering process can use a bottom-up agglomerative clustering algorithm, such as the AGNES (Agglomerative Nesting) algorithm, to gradually merge semantically similar video clips to form a hierarchical nested structure. When clustering, distance metrics such as cosine similarity can be used to evaluate the similarity between semantic embedding vectors.

[0185] 2. Starting from the root node of the tree structure T, recursively process each semantic cluster. For the current semantic cluster C_j, perform the following steps: 2.1 If C_j is a leaf node, that is, the cluster contains only one video segment v_i, then directly add v_i to the inverted index I_j of the current layer, and record its frequency control smoothness index μ_i and distortion index max_i. 2.2 If C_j is a non-leaf node, recursively perform the above steps on its child nodes (child semantic clusters). 2.3 For all video segments {v_1, v_2, ..., v_m} in C_j, construct a local inverted index I_j. Specifically, for each video segment v_i, extract its semantic embedding vector E_i and quantize it into a set of discrete semantic words {w_1, w_2,..., w_k}. Then, establish an inverse mapping relationship from semantic words to video clips, that is, I_j(w_l) = {(v_i, μ_i,max_i) | w_l ∈ v_i}. 2.4 Sort and filter the video clips within C_j to generate a representative cluster center vector E_j. The arithmetic mean or geometric center of the semantic embedding vector of the video clips in the cluster can be selected as the cluster center vector. 2.5 Use the cluster center vector E_j as the index item of the current semantic cluster C_j and establish a mapping relationship from the cluster center to the video clips in the cluster, that is:

[0186] I(E_j) = {(v_i, μ_i, max_i) | v_i ∈ C_j}.

[0187] 3. Return the multi-level video semantic index structure I, which contains the tree-like semantic cluster hierarchy T and the local inverted index I_j within each semantic cluster.

[0188] When retrieving and locating video clips, the present application can utilize a multi-level video semantic index structure I and adopt a top-down hierarchical search strategy:

[0189] 1. Given a query semantic vector Q, first search at the top level (root node) of the index structure I. Calculate the similarity between Q and the top index item (cluster center vector), and select several semantic clusters most similar to Q as candidate sets.

[0190] 2. For each candidate semantic cluster C_j, recursively search in its subtree. If C_j is a leaf node, directly compare the similarity between Q and the video clips in the cluster, and select the most similar clip as the candidate result. If C_j is a non-leaf node, continue searching in its child nodes until a leaf node is reached.

[0191] 3. During the search process, the frequency of the video clips can be used to control the smoothness index μ_i and the distortion index max_i for sorting and screening. For example, video clips with higher smoothness index and lower distortion index can be given priority to ensure the stability and quality of the retrieval results.

[0192] 4. Sort all candidate video clips according to their similarity with the query semantic vector Q, and select the most similar Top-N clips as the final retrieval results.

[0193] 5. Returns metadata information of the Top-N video clips, including their start and end timestamps in the original video, the semantic clusters they belong to, etc., to achieve precise positioning and semantic association of video clips.

[0194] The following is a simple example of how to use the multi-level video semantic index structure to retrieve video clips:

[0195] Assume that this application has a video dataset V, which contains 100 video clips {v_1, v_2, ..., v_100}. After semantic embedding and clustering, this application obtains a three-layer semantic cluster hierarchy T:

[0196] First layer (root node): C_0 = {v_1, v_2, ..., v_100};

[0197] Second layer: C_1 = {v_1, v_2, ..., v_50}, C_2 = {v_51, v_52, ..., v_100};

[0198] Third floor:

[0199] C_3 = {v_1, v_2, ..., v_20}, C_4 = {v_21, v_22, ..., v_50}, C_5 = {v_51, v_52, ..., v_80}, C_6 = {v_81, v_82, ..., v_100}.

[0200] In each semantic cluster, this application constructs a local inverted index. For example, for the semantic cluster C_3, its inverted index I_3 may be as follows:

[0201] I_3(w_1) = {(v_2, 0.8, 0.1), (v_5, 0.7, 0.2), (v_10, 0.9, 0.05)}; I_3(w_2) = {(v_1, 0.6, 0.3), (v_8, 0.75, 0.15)}... Among them, w_1, w_2, etc. represent semantic words, and each semantic word corresponds to a set of video clips and their smoothness index and distortion index.

[0202] Now, given a query semantic vector Q, this application hopes to find the top-3 video clips most similar to Q in the video dataset V.

[0203] First, search at the top level (root node C_0) of index structure I and calculate the similarity between Q and the cluster center vector E_0 of C_0. Assuming that the similarity between Q and E_0 is high, the two child nodes C_1 and C_2 of C_0 are selected as candidate semantic clusters.

[0204] Next, recursively search in the subtrees of C_1 and C_2. Assume that video clips v_2 and v_5 that are highly similar to Q are found in C_1's child node C_3, and video clip v_55 that is highly similar to Q is found in C_2's child node C_5.

[0205] Based on the similarity scores and frequency control indicators of the video clips, this application can obtain a sorted list of candidate results:

[0206] 1. v_2 (similarity: 0.95, smoothness: 0.8, distortion: 0.1);

[0207] 2. v_55 (similarity: 0.90, smoothness: 0.85, distortion: 0.08);

[0208] 3. v_5 (similarity: 0.88, smoothness: 0.7, distortion: 0.2);

[0209] Finally, the top-3 video clips v_2, v_55 and v_5 are selected as the final retrieval results, and their metadata information, such as the start and end timestamps in the original video, is returned.

[0210] Exemplarily, obtaining the target summary segment corresponding to the video editing request in the video semantic index structure includes: encoding the video editing request to obtain a request text vector corresponding to the video editing request; obtaining the similarity between the request text vector and a plurality of cluster center vectors in the video semantic index structure; determining at least one target cluster center vector from the plurality of cluster center vectors based on the plurality of similarities; extracting a target video segment corresponding to the target cluster center vector in the semantic index structure based on the mapping relationship corresponding to the target cluster center vector, and using the target video segment as the target summary segment.

[0211] First, the user's video editing request is represented as a request text vector. Given the user's request text Q, it is encoded using the pre-trained BERT model. Specifically, the request text vector corresponding to the request text Q is input into the BERT model, and after calculation by a multi-layer Transformer encoder, the context vector representation of the request text is obtained. Then, the vector corresponding to the [CLS] tag of the last layer of the BERT model is taken as the semantic embedding vector E_Q of the entire request text.

[0212] The request text vector can be represented as a word sequence {w_1, w_2, ..., w_M}, where M is the length of the request text. The word sequence is input into the BERT model to obtain the context vector {h_1, h_2, ..., h_M} of each word, where h_i is a D-dimensional vector representing the contextual semantic representation of the i-th word in the request text. Next, take the vector h_cls corresponding to the [CLS] tag of the last layer of the BERT model as the semantic embedding vector E_Q of the entire request text, that is:

[0213] E_Q = h_{cls}; where E_Q is a D-dimensional vector representing the semantic embedding representation of the user request text Q.

[0214] Then, the video semantic index structure is searched. Using the semantic embedding vector E_Q requested by the user, the video clips related to the requested semantics are searched in the video semantic index structure I. The index structure I adopts a tree structure, each node represents a semantic cluster, and the leaf node corresponds to the original video clip.

[0215] The retrieval process adopts the strategy of breadth-first search (BFS), starting from the root node, and traversing each layer of the index tree layer by layer. For each layer of nodes, the cosine similarity between the request vector E_Q and the cluster center vector E_n of the node is calculated:

[0216] ;

[0217] The numerator represents the inner product of two vectors, and the denominator represents the product of the L2 norms of two vectors. The value range of cosine similarity is [-1, 1]. The larger the value, the closer the directions of the two vectors are, and the higher the semantic similarity.

[0218] When calculating semantic similarity, a similarity threshold ξ is set. For each layer of nodes, nodes whose similarity with the request vector E_Q is greater than or equal to the threshold ξ are selected and added to the node queue to be searched in the next layer. This process is repeated until the leaf node layer is reached. For each node in the leaf node layer, if its similarity with the request vector E_Q is greater than or equal to the threshold ξ, the video segment corresponding to the node is added to the candidate segment set S as the target summary segment. Finally, a candidate segment set S related to the user's request semantics is obtained, in which the target summary segments come from different videos and time periods.

[0219] Then, perform semantic similarity calculation and sorting. For each target summary segment s_i in the candidate segment set S, extract its semantic embedding vector E_i. Calculate the cosine similarity Sim(E_Q, E_i) between E_i and the request vector E_Q. Sort the candidate segments in descending order according to the semantic similarity score. After sorting, the candidate set S becomes {s_1, s_2, ..., s_N}, where Sim(E_Q, E_1) ≥ Sim(E_Q, E_2) ≥ ... ≥ Sim(E_Q, E_N). Set the upper limit K of the number of candidate segments, select the first K segments from the sorted candidate set S, and form a preliminary target summary segment set S'.

[0220] Furthermore, timing optimization and topic division are performed. The segments in the target summary segment set S' are sorted in ascending order according to their timestamps in the original video to obtain a time sequence segment list {s'_1, s'_2, ..., s'_K}. The semantic similarity Sim(E'i, E'{i+1}) between each pair of adjacent segments (s'i, s'{i+1}) is calculated, where E'i and E'{i+1} represent the semantic embedding vectors of segments s'i and s'{i+1}, respectively. A semantic similarity threshold δ is set. Traverse the time sequence segment list, for each pair of adjacent segments (s'i, s'{i+1}), if their semantic similarity Sim(E'i, E'{i+1}) is less than the threshold δ, then insert a topic boundary between segments s'i and s'{i+1} to divide them into different sub-topics. For each topic segment, calculate its paragraph center vector C_j, that is, perform average pooling on the semantic embedding vectors of all segments in the topic segment:

[0221] ;

[0222] Where, T_j represents the jth topic segment, |T_j| represents the number of segments in the topic segment, and E_i represents the semantic embedding vector of the i-th segment in the topic segment. For each topic segment T_j, the segment with the largest cosine similarity to the paragraph center vector C_j is selected as the representative segment s_j of the topic segment. Finally, the candidate summary segment set is generated. The representative target summary segments {s_1, s_2, ..., s_L} of all topic segments are spliced ​​in the order of their timestamps in the original video to form the final candidate summary segment set S'', where L represents the number of topic segments. So far, a structured and topic-specific candidate summary segment set S'' is obtained, in which the segments are not only highly relevant to the user request, but also continuous in time and consistent in topic. The generation process is mainly divided into two stages: the construction of the candidate summary segment relationship graph and the global optimal summary generation based on iterative edge clipping.

[0223] In the stage of constructing the candidate summary segment relationship graph, this application represents the candidate summary segment set S'' as a directed weighted graph G = (V, E), where the node set V represents the target summary segment and the edge set E represents the correlation between the segments. In order to calculate the edge weight w(i, j) between any two candidate summary segments s_i and s_j, the following four factors need to be considered:

[0224] 1. Semantic similarity sim(s_i, s_j): Use the semantic embedding vectors E_i and E_j of the target summary fragments s_i and s_j to calculate the cosine similarity between them. The cosine similarity formula is:

[0225] sim(s_i, s_j) = \frac{E_i \cdot E_j}{||E_i|| \cdot ||E_j||}

[0226] Where E_i and E_j represent the semantic embedding vectors of segments s_i and s_j respectively, and ||·|| represents the bi-norm (Euclidean norm) of the vector. The value range of semantic similarity is [-1, 1]. The larger the value, the more semantically similar the two segments are.

[0227] 2. Temporal adjacency temp(s_i, s_j): The inverse of the difference in timestamps between target summary segments s_i and s_j in the original video is used to measure their temporal adjacency. The temporal adjacency formula is: temp(s_i, s_j) = \frac{1}{|t_i - t_j|} where t_i and t_j represent the start timestamps of segments s_i and s_j in the original video, respectively. The value range of temporal adjacency is (0, +∞), and the larger the value, the closer the two segments are in time.

[0228] 3. Theme relevance theme(s_i, s_j): Use the center vectors C_i and C_j of the theme paragraphs to which the segments s_i and s_j belong to calculate the cosine similarity between them. The theme relevance formula is:

[0229] theme(s_i, s_j) = \frac{C_i \cdot C_j}{||C_i|| \cdot ||C_j||}

[0230] Among them, C_i and C_j represent the center vectors of the topic paragraphs to which the segments s_i and s_j belong respectively. The value range of topic relevance is [-1, 1]. The larger the value, the more relevant the two target summary segments are in terms of topic.

[0231] 4. User preference matching degree pref(s_i, s_j): Use the segments s_i and s_j to calculate the weighted cosine similarity with the user preference vector P. Where P represents the user preference vector learned based on the user's historical behavior data. The value range of the user preference matching degree is [-1, 1]. The larger the value, the more the two segments match the user's preferences. After completing the construction of the candidate summary segment relationship graph G, this application enters the global optimal summary generation stage based on iterative edge clipping. The goal of this stage is to select a node subset V' from the graph G so that the candidate summary segments corresponding to the nodes in V' can form a globally optimal video summary while satisfying the following three constraints:

[0232] 1. Summary duration constraint: The total duration of all segments in V' does not exceed the preset summary duration upper limit L.

[0233] 2. Semantic coherence constraint: The semantic similarity between adjacent segments in V' is greater than the preset similarity threshold \beta.

[0234] 3. Topic diversity constraint: The ratio of the number of topics contained in V' to the total number of topics in the original video is greater than the preset topic coverage threshold \theta.

[0235] In order to efficiently solve this global optimal problem, this application designs an approximate algorithm based on iterative edge clipping. The core idea of ​​the algorithm is to iteratively clip the edges in the candidate summary segment relationship graph G under the premise of satisfying the constraints until no more clipping is possible. At this point, the largest connected subgraph of G is the globally optimal video summary.

[0236] The specific process of the algorithm is as follows:

[0237] 1. Initialization: Let G' = G, V' = V, E' = E, where G' represents the dynamic relationship graph during the iteration process, V' represents the dynamic node set during the iteration process, and E' represents the dynamic edge set during the iteration process.

[0238] 2. Edge pruning: For each edge e(i, j) ∈ E' in G', calculate the total duration L(V') of all segments in V' after pruning the edge, the minimum semantic similarity \beta(V') between adjacent segments, and the topic coverage \theta(V'). If L(V') ≤ L, \beta(V') ≥ \beta, \theta(V') ≥ \theta after pruning the edge e(i, j), remove the edge e(i, j) from E'; otherwise, keep the edge e(i, j). Repeat the above process until no more edges can be pruned.

[0239] 3. Connected subgraph extraction: In the cropped graph G', extract the connected subgraph with the largest number of nodes, denoted as G'' = (V'', E''), where V'' is the set of candidate summary segments corresponding to the global optimal video summary.

[0240] 4. Summary generation: Arrange the target summary segments in V'' according to the timestamp order in the original video to generate the final video summary.

[0241] Through iterative edge clipping, the algorithm can efficiently generate the global optimal video summary under the premise of ensuring that the constraints are met. The time complexity of the algorithm is O(|E|log|E|), where |E| is the number of edges in the candidate summary segment relationship graph G. This graph optimization-based method fully considers the various correlations between candidate summary segments and achieves efficient approximation of the global optimal solution through iterative edge clipping. The generated video summary is rich in content, reasonable in structure, and semantically coherent.

[0242] In order to implement the semantic segmentation-based intelligent video editing and summary generation method corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of an intelligent video editing and summary generation device 200 provided in an embodiment of the present application is shown. For the convenience of description, only the parts related to the present embodiment are shown. The intelligent video editing and summary generation device 200 provided in an embodiment of the present application includes:

[0243] The data acquisition module 201 is used to acquire video data acquired by multiple video acquisition devices, pre-process the multiple video data, and acquire a video data set, where the video data set includes multiple key frame information.

[0244] The distortion determination module 202 is used to continuously iteratively decompose the video data set to obtain a video iterative signal component set, which includes multiple iterative signal groups, calculate the information amount of each iterative signal group, and determine the video feature distortion corresponding to the video data set based on the multiple information amounts.

[0245] The label acquisition module 203 is used to obtain the video impact factor and candidate topic labels corresponding to the video data set, generate semantic topic labels according to the video impact factor and the candidate topic labels, and determine the video frequency control smoothness index and the video frequency control distortion index according to the video feature distortion and the semantic topic labels.

[0246] The vector acquisition module 204 is used to complete the training of the semantic embedding model to be trained according to the semantic topic label and each key frame information, and obtain the semantic embedding vector corresponding to the video data set output by the semantic embedding model.

[0247] The index building module 205 is used to build a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector.

[0248] The summary output module 206 is used to obtain a target summary segment corresponding to the video editing request in the video semantic index structure when receiving the video editing request, and output the target summary segment as the video summary corresponding to the video editing request.

[0249] The above-mentioned intelligent video editing and summary generation device 200 can implement the intelligent video editing and summary generation method based on semantic segmentation of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of the present application can refer to the contents of the above-mentioned method embodiment, and will not be repeated in this embodiment.

[0250] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.

[0251] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0252] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0253] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0254] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0255] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.

[0256] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

[0257] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0258] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. An intelligent video editing and summary generation method based on semantic segmentation, characterized in that: The method comprises: Acquire video data collected by multiple video acquisition devices, pre-process the multiple video data, and acquire a video data set, wherein the video data set includes multiple key frame information; Continuously iteratively decomposing the video data set to obtain a video iterative signal component set, wherein the video iterative signal component set includes multiple iterative signal groups, calculating the information amount of each of the iterative signal groups, and determining the video feature distortion corresponding to the video data set according to the multiple information amounts; Obtaining a video impact factor and a candidate topic label corresponding to the video data set, generating a semantic topic label according to the video impact factor and the candidate topic label, and determining a video frequency control smoothness index and a video frequency control distortion index according to the video feature distortion and the semantic topic label; Complete the training of the semantic embedding model to be trained according to the semantic topic label and each of the key frame information, and obtain the semantic embedding vector corresponding to the video data set output by the semantic embedding model; Constructing a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector; When receiving a video editing request, obtaining a target summary segment corresponding to the video editing request in the video semantic index structure, and outputting the target summary segment as a video summary corresponding to the video editing request; The iterative signal group includes a low-frequency approximation subband and a high-frequency detail subband; the calculating the amount of information of each of the iterative signal groups includes: Acquire first edge probability distribution information of a low-frequency approximate subband of each of the iterative signal groups; Acquire second edge probability distribution information of the high frequency detail subband of each iterative signal group; Acquire joint probability distribution information corresponding to the low-frequency approximation subband and the high-frequency detail subband of each iterative signal group; Calculate the information amount of each of the iterative signal groups according to the first edge probability distribution information, the second edge probability distribution information and the joint probability distribution information; The determining the video feature distortion corresponding to the video data set according to the plurality of information amounts includes: Calculating a first root mean square error between the low frequency approximation subband and the video data set; Calculating a second root mean square error between the high frequency detail subband and the video data set; Determine a video feature distortion degree corresponding to the video data set according to the information amount, the first root mean square error, and the second root mean square error; The step of determining a video frequency control smoothness index and a video frequency control distortion index according to the video feature distortion and the semantic topic tag comprises: Calculate a video frequency control factor of the video clip corresponding to each key frame information according to the video feature distortion and the semantic topic label; generating a video frequency control sequence according to a plurality of the video frequency control factors; Calculating the mean and variance corresponding to the first-order difference of the video frequency control sequence, and generating the video frequency control stability index according to the mean and variance; Acquire the peak value and dynamic range of the video frequency control sequence, and generate the video frequency control distortion index according to the peak value and dynamic range; The step of constructing a video semantic index structure according to the video frequency control smoothness index, the video frequency control distortion index and the semantic embedding vector includes: Performing hierarchical clustering on the semantic embedding vector of each video segment corresponding to the key frame information to obtain a semantic cluster hierarchy structure, wherein the semantic cluster hierarchy structure includes a plurality of semantic clusters; Obtaining a cluster center vector corresponding to each of the semantic clusters and the video segment located in the semantic cluster; Constructing a mapping relationship between the cluster center vector and the video clip; The video semantic index structure is constructed according to the mapping relationship and the semantic cluster hierarchy.

2. The method according to claim 1, characterized in that The preprocessing of the plurality of video data to obtain a video data set includes: Converting the format of each video data into a preset format; Acquire quality assessment information corresponding to the converted video data, and determine target video data from the plurality of video data according to the quality assessment information; Key frame extraction is performed on each of the target video data to obtain the key frame information corresponding to each of the target video data, and a plurality of the key frame information constitute the video data set.

3. The method according to claim 1, characterized in that The video impact factor includes a plurality of impact factor parameters; the acquiring the video impact factor and the candidate topic tags corresponding to the video data set, and generating a semantic topic tag according to the video impact factor and the candidate topic tags, includes: Acquire a plurality of the influencing factor parameters of the video data set, normalize the plurality of influencing factor parameters, and construct the video influencing factor according to the normalized influencing factor parameters; Performing target detection and scene recognition on each key frame information of the video data set to obtain semantic information corresponding to the key frame information; the semantic information includes object information and scene category; Generating candidate topic tags corresponding to the object information and the scene category respectively; The semantic topic tag is generated according to the plurality of candidate topic tags and the video impact factor.

4. The method according to claim 1, characterized in that The training of the semantic embedding model to be trained is completed according to the semantic topic label and each of the key frame information, including: Inputting the key frame information into the semantic embedding model to be trained, and obtaining a predicted semantic embedding vector output by the semantic embedding model; Encoding the semantic topic label to obtain a semantic encoding vector; Calculating a cross entropy loss function of the predicted semantic embedding vector and the semantic encoding vector; The training of the semantic embedding model is completed according to the cross entropy loss function.

5. The method according to claim 1, characterized in that The step of obtaining a target summary segment corresponding to the video editing request in the video semantic index structure includes: Encode the video editing request to obtain a request text vector corresponding to the video editing request; Obtaining the similarity between the requested text vector and a plurality of cluster center vectors in the video semantic index structure; Determine at least one target cluster center vector from the plurality of cluster center vectors according to the plurality of similarities; According to the mapping relationship corresponding to the target cluster center vector, the target video segment corresponding to the target cluster center vector is extracted in the semantic index structure, and the target video segment is used as the target summary segment.

6. A computer device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the steps of the intelligent video editing and summary generation method based on semantic segmentation are implemented as described in any one of claims 1 to 5.