An ai-generated video detection method, system and device based on multi-quantization parameter encoding statistical features
By constructing a multi-quantization parameter encoded statistical feature matrix and self-supervised occlusion reconstruction training, combined with a Transformer encoder, the problem of insufficient generalization ability of AI-generated video detection methods in unknown generation models and complex scenarios is solved, achieving efficient and robust video detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JIAOTONG UNIV
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-09
AI Technical Summary
Existing AI-generated video detection methods lack generalization ability and robustness when faced with unknown generation models and complex generation scenarios. Furthermore, their computational resource allocation is unreasonable, making it difficult to adapt to scenarios with different detection accuracy requirements.
By constructing a multi-quantization parameter encoding statistical feature matrix, a coding domain feature extraction model is obtained through self-supervised occlusion reconstruction training. By combining the Transformer encoder to model the dependency relationship between quantization parameters, a video real/fake binary classification discrimination model is constructed to achieve the discrimination of AI-generated videos.
It improves the robustness and generalization ability of the detection method, reduces the dependence on visual content features, is suitable for high-precision detection scenarios, and optimizes the allocation of computing resources.
Smart Images

Figure CN122176407A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video content security technology, and in particular to an AI-generated video detection method, system, and device based on multi-quantization parameter encoding statistical features. Background Technology
[0002] With the rapid development of AIGC (Artificial Intelligence Generated Content) technology, technologies based on diffusion models, generative adversarial networks, and large-scale video generation models are becoming increasingly mature, enabling the generation of highly realistic video content and allowing AI-generated videos to be widely used in entertainment, film and television production, and virtual reality.
[0003] Traditional AI-generated video detection methods primarily rely on visual spatial feature modeling, extracting and identifying visual features such as texture, edges, and high-frequency residual information in video frames using convolutional neural networks or Transformer structures. Some existing technologies further incorporate multimodal information to improve detection performance. For example, they combine video frame features with audio features, utilizing inter-frame difference analysis and self-attention mechanisms to mine local anomalies in the video, while also introducing audio-video feature interaction and fusion mechanisms to jointly model the consistency between audio and video modalities. However, these detection methods based on visual spatial features and multimodal collaboration still mainly rely on the decoded video pixel space and content representation layer. Their detection criteria are highly dependent on the structure of the generative model, visual style, and post-processing methods. As generative models continue to evolve, their generalization ability is significantly limited when facing unknown generative models or complex generative scenarios.
[0004] Another type of detection method is based on video temporal consistency analysis, which achieves detection by modeling the motion continuity, spatiotemporal consistency, or anomalous change features between video frames. For example, existing technologies propose a Transformer-based video detection scheme, which jointly models spatial texture features and temporal features of decoded video frames to mine spatiotemporal anomalous information in the video, thereby determining whether the video is generated by artificial intelligence. However, the above-mentioned methods based on temporal consistency and spatiotemporal anomaly analysis also rely on the visual content and temporal performance characteristics of the video. As new-generation video generation models continue to improve their spatial texture fitting and temporal modeling capabilities, these high-level features are gradually showing a trend of being continuously optimized and countered by the generation models, which limits the stability and robustness of detection methods in complex generation environments.
[0005] Furthermore, most existing methods directly model based on the video pixel space, neglecting the encoding and compression process that videos inevitably undergo during actual transmission and storage. Real videos are typically captured by physical camera equipment and, after compression by a standard encoder, exhibit stable statistical patterns in their macroblock type distribution, prediction mode ratio, and compression response behavior. AI-generated videos, due to their different generation mechanisms, often display different macroblock type distribution characteristics after encoding and compression compared to real videos. Particularly when repeated compression is performed under different quantization parameters, there are significant differences in the trends of macroblock statistical ratio changes between real and AI-generated videos. Current technologies have not systematically utilized the encoding statistical features of multiple quantization parameters to construct structured discriminative models, thus remaining insufficient in terms of robustness and cross-model generalization ability.
[0006] In practical applications, videos from different sources and under different compression conditions have significantly different requirements for the reliability and generalization ability of detection methods. While critical detection scenarios (such as judicial evidence collection and major public opinion control) are fewer in number, they demand extremely high detection accuracy; whereas most ordinary content review scenarios have relatively lower accuracy requirements. However, traditional AI-generated video detection methods are difficult to change once their detection architecture is determined. All videos are processed using uniform pixel-level features, forcing the detection method to be designed with the highest accuracy requirements, resulting in over-allocation of computing resources and significant shortcomings in detection efficiency and practicality. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of existing technologies by providing an AI-generated video detection method based on multi-quantization parameter encoded statistical features, comprising the following steps: S1: Compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix; S2: Input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model; S3: Construct a video real / fake binary classification discrimination model based on the coding domain feature extraction model, and obtain an AI-generated video discrimination model through supervised training; S4: Input the video to be detected into the AI-generated video discrimination model, and output the judgment result of whether the video is a real video or an AI-generated video.
[0008] Preferably, in step S1, the macroblock types include eight categories: intra-frame prediction macroblock I, sub-frame prediction macroblock i, inter-frame prediction macroblock p, bidirectional prediction macroblock B, skip macroblock Skip, forward reference prediction macroblock, backward reference prediction macroblock, and dual reference enhancement prediction macroblock.
[0009] Preferably, in step S1, constructing a multi-quantization parameter encoded statistical feature matrix includes: Constructing a set of quantization parameters , where N is the number of quantization parameters; The i-th quantization parameter Below, the number of macroblocks of type j under this quantization parameter is counted as follows. ,in , ; Based on the number of macroblocks The proportional characteristics are calculated as follows: ; Construct the proportional vector corresponding to the i-th quantization parameter based on the proportional characteristics. ; The proportional vectors corresponding to each quantization parameter set are stacked in the order of the quantization parameter sets to form the encoded statistical feature matrix X, as shown below:
[0010] Preferably, in step S2, obtaining the coding domain feature extraction model includes: The embedded coding features are obtained by performing feature embedding mapping on the coding statistical feature matrix X. The mapping formula is as follows: in For learnable weight matrix, Here, d represents the bias, and d represents the feature dimension. The encoding structure representing the quantization parameter dimension is used, and the sequence modeling network is a Transformer encoder. The embedded encoding features The input is a Transformer encoder, and the dependencies between different quantization parameters are modeled using the Transformer encoder's multi-head self-attention mechanism. The calculation formula for the multi-head self-attention mechanism is as follows: in , , , This is the learnable weight matrix of the Transformer encoder; The output feature matrix is obtained after processing by the multi-head self-attention mechanism. Each line The encoding structure representation that incorporates global information under the i-th QP condition.
[0011] Preferably, in step S2, the self-supervised occlusion reconstruction training includes: Randomly generate occlusion mask matrix As shown below: A value of 0 indicates that the element is obscured, while a value of 1 indicates that the element is preserved. According to the occlusion mask matrix Constructing occlusion input The formula is constructed as follows: ; Obscuring input Input the feature extraction network to be trained Through the feature extraction network Reconstruction yields output The reconstruction formula is shown below: ; According to the output The reconstruction loss function is defined by the original encoded statistical feature matrix X, and the formula for calculating the reconstruction loss function is as follows: in The set of elements that are obscured.
[0012] Preferably, in step S3, a binary classification model for determining whether a video is real or fake is constructed, including: Global average pooling is performed on the feature matrix H output by the Transformer encoder to obtain the video-level representation vector. The pooling formula is shown below: ; The video-level representation vector The input is a classifier, which calculates the probability of predicting whether a video is real or fake. As shown below: in =1 indicates that the video was generated by AI. =0 indicates a real video. It is the Sigmoid activation function. and For learnable weight matrix and bias; Based on the probability of the video being real or fake. Define a classification loss function, and the formula for calculating the classification loss function is as follows: Where y is the true label of the training sample.
[0013] Preferably, the classification loss and reconstruction loss are jointly optimized during the training phase, and the total loss function is: in, For the network parameters of the coding domain feature extraction model, For the network parameters of the classifier, To balance the weights of classification loss and reconstruction loss, the feature extraction network and classifier are trained simultaneously through multi-task joint optimization.
[0014] Preferably, in step S4, the video to be detected is input into the AI-generated video discrimination model, including: The video to be detected is subjected to operations including compression encoding, macroblock number statistics, proportional feature calculation, and vector stacking to construct the encoding statistical feature matrix X. The encoded statistical feature matrix X of the video to be detected is input into the pre-trained AI-generated video discrimination model. After processing including feature embedding, Transformer encoding and global average pooling, the video-level representation vector z of the video to be detected is obtained. The video-level representation vector z of the video to be detected is input into the classifier, and the classifier calculates the probability value that the video to be detected is an AI-generated video. , the probability value The video to be detected is compared with a preset threshold, and the comparison result determines whether the video is a real video or an AI-generated video.
[0015] Based on the same concept, the present invention also provides an AI-generated video detection system based on multi-quantization parameter encoded statistical features, comprising: The multi-QP macroblock statistical feature construction module is used to compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix. The occlusion reconstruction self-supervised representation learning module is used to input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model. The binary classification discriminant network fine-tuning module is used to construct a video real / fake binary classification discriminant model based on the coding domain feature extraction model, and obtain an AI-generated video discriminant model through supervised training. The coding domain feature reasoning and judgment module is used to input the video to be detected into the AI-generated video discrimination model and output the judgment result of whether the video is a real video or an AI-generated video.
[0016] Based on the same concept, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of an AI-generated video detection method based on multi-quantization parameter encoded statistical features as described in any one of the embodiments.
[0017] Compared with the prior art, the beneficial effects of the present invention are: (1) This invention compresses and encodes the input video under multiple quantization parameters, counts the number of macroblock types under different quantization parameters, and constructs a multi-quantization parameter encoding statistical feature matrix. This enables modeling from the video encoding behavior level rather than the pixel semantic level, effectively mining the statistical anomalies in the compression encoding process of AI-generated videos, enhancing the model's generalization ability to unknown generation models, while avoiding dependence on visual content features and improving the robustness of the detection method.
[0018] (2) This invention obtains a coding domain feature extraction model by inputting the coding statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training. It realizes the modeling of the intrinsic relationship between different quantization parameters using the self-supervised reconstruction mechanism, so that the model can learn the deep representation of the coding structure without a large amount of labeled data, improve the coding structure representation ability, and provide a high-quality feature foundation for subsequent discrimination tasks.
[0019] (3) This invention constructs a video true and false binary classification discrimination model based on the coding domain feature extraction model, obtains an AI-generated video discrimination model through supervised training, and inputs the video to be detected into the discrimination model to output the judgment result, realizing the joint optimization of self-supervised pre-training and supervised fine-tuning. While retaining the knowledge of coding structure, it enhances the discrimination ability and ensures the unity of detection accuracy and stability. It has the significant advantages of not relying on video semantic content and being suitable for large-scale content security supervision and automated review scenarios. Attached Figure Description
[0020] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.
[0021] Figure 1 This is a flowchart of an AI-generated video detection method based on multi-quantization parameter encoded statistical features according to the present invention; Figure 2 This is another flowchart of an AI-generated video detection method based on multi-quantization parameter encoded statistical features according to the present invention; Figure 3 This is a schematic diagram illustrating the construction of the encoding statistical feature matrix of this invention; Figure 4 This is a schematic diagram of the self-supervised coding structure modeling framework of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. Obviously, the described embodiments are only some, not all, of the embodiments described in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.
[0023] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a” and “an” used herein, and “the”, may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0024] First embodiment: Please see Figure 1 and Figure 2 As shown, to address the shortcomings of existing technologies that primarily rely on pixel space or semantic features for detection and lack generalization ability for unknown AI-generated models, this embodiment provides an AI-generated video detection method based on multi-quantization parameter encoding statistical features. By analyzing the differences in macroblock type statistical distribution under different quantization parameter compression conditions, it mines abnormal features of AI-generated videos at the encoding behavior level, achieving high-precision detection of AI-generated videos. The method includes the following steps: S1: Compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix. Specifically, in this embodiment, the input video is... ,in, For frame number, , These represent the height and width of the video frame, respectively. 3 indicates the number of RGB channels. The input video can be sourced from web capture, social media platforms, or local storage devices, and can be any length, resolution, and format of raw or compressed video.
[0025] Preferably, in step S1, the macroblock types include eight categories: intra-frame prediction macroblock I, sub-frame prediction macroblock i, inter-frame prediction macroblock p, bidirectional prediction macroblock B, skip macroblock Skip, forward reference prediction macroblock, backward reference prediction macroblock, and dual reference enhancement prediction macroblock. These macroblock types reflect the different video conditions. The distribution characteristics of the coding structure under the given conditions.
[0026] Preferably, in step S1, constructing a multi-quantization parameter encoded statistical feature matrix includes: Constructing a set of quantization parameters Where N is the number of quantization parameters, specifically, in this embodiment, different For different compressive strengths, Covering the entire range from low compression (high bitrate, high quality) to high compression (low bitrate, low quality), in each Under these conditions, for video Encoding processing is performed to obtain the corresponding encoded results, different It will significantly affect the macroblock partitioning method, prediction mode selection, motion compensation ratio, and Skip mode usage rate; The i-th quantization parameter Below, the number of macroblocks of type j under this quantization parameter is counted as follows. ,in , ; To eliminate the impact of differences in video length and resolution, based on the number of macroblocks The proportional characteristics are calculated as follows: Specifically, in this embodiment, the proportional feature is represented in a fixed... Under these conditions, the structural proportions of different macroblock modes can be normalized to ensure that the statistical features of different videos are comparable. Construct the proportional vector corresponding to the i-th quantization parameter based on the proportional characteristics. Specifically, in this embodiment, the scaling vector characterizes the coding structure distribution of the video under a specific compression strength. Indicates the first indivual The proportion of Class 1 macroblocks Indicates the first indivual The proportion of Class 2 macroblocks, ... Indicates the first indivual The proportion of Class 8 macroblocks; Stack the scale vectors corresponding to each quantization parameter set in the order of the quantization parameter sets. The resulting coded statistical feature matrix X is shown below: Specifically, in this embodiment, the matrix The rows represent different quantization parameters, and the columns represent the proportions of different macroblock types. Overall, it reflects the structural response trajectory of the video under multiple compression intensities. This trajectory contains the statistical characteristics of the video source itself: the encoding response curve of real-shot video often presents a smooth and physically consistent shape, while AI-generated video may exhibit abnormal jumps or deviate from the natural distribution.
[0027] S2: Input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model. Specifically, in this embodiment, the model is used to mine the encoded statistical matrix. China and other countries Based on the overall structural distribution pattern under certain conditions, a sequence modeling network based on Transformer is constructed.
[0028] Please see Figure 3 and Figure 4 As shown, in step S2, the coding domain feature extraction model is obtained, including: The embedded coding features are obtained by performing feature embedding mapping on the coding statistical feature matrix X. The mapping formula is as follows: in For learnable weight matrix, Here, d represents the bias, and d represents the feature dimension. The encoding structure representing the quantization parameter dimension, with the sequence modeling network being a Transformer encoder, allows this mapping to represent each... The eight-dimensional macroblock scaling vector under the given conditions is mapped to a high-dimensional feature space, providing a basic representation for subsequent sequence modeling; Embedded encoding features The input is a Transformer encoder, and the multi-head self-attention mechanism of the Transformer encoder is used to model the dependencies between different quantization parameters. The calculation formula for the multi-head self-attention mechanism is as follows: in , , , This is the learnable weight matrix of the Transformer encoder; The output feature matrix is obtained after processing by the multi-head self-attention mechanism. Each line The encoding structure representation that incorporates global information under the i-th QP condition.
[0029] Preferably, in step S2, the self-supervised occlusion reconstruction training includes: Randomly generate occlusion mask matrix As shown below: The position with a value of 0 indicates that the element is occluded, and the position with a value of 1 indicates that the element is preserved. Through this mechanism, the model is forced to learn to predict the original value of the occluded position based on the context information of the unoccluded position. According to the occlusion mask matrix Constructing occlusion input The formula is constructed as follows: ; Obscuring input Input the feature extraction network to be trained Through feature extraction network Reconstruction yields output The reconstruction formula is shown below: ; According to the output The reconstruction loss function is defined by the original encoded statistical feature matrix X. The formula for calculating the reconstruction loss function is as follows: in Given the set of occluded elements, this loss function forces the model to learn statistical associations between different QPs and different macroblock types, thereby obtaining a more robust and interpretable representation of the encoded structure.
[0030] S3: Construct a video real / fake binary classification model based on the coding domain feature extraction model, and obtain an AI-generated video discrimination model through supervised training.
[0031] Preferably, in step S3, a binary classification model for determining whether a video is real or fake is constructed, including: Global average pooling is performed on the feature matrix H output by the Transformer encoder to obtain the video-level representation vector. This vector integrates coding structure information under all QP conditions and is a compact representation of the overall video coding behavior. The pooling formula is shown below: ; Video-level representation vectors The input is a classifier, which calculates the probability of predicting whether a video is real or fake. As shown below: in =1 indicates that the video was generated by AI. =0 indicates a real video. It is the Sigmoid activation function. and For learnable weight matrix and bias; Predicting the probability of video authenticity The classification loss function is defined, and the formula for calculating the classification loss function is as follows: Where y is the true label of the training sample.
[0032] Preferably, the classification loss and reconstruction loss are jointly optimized during the training phase, and the total loss function is: in, For the network parameters of the coding domain feature extraction model, For the network parameters of the classifier, To balance the weight coefficients of classification loss and reconstruction loss, the feature extraction network and classifier are trained simultaneously through multi-task joint optimization. Specifically, in this embodiment, through multi-task joint optimization, on the one hand, the classification task guides the model to extract the coding structure features most relevant to the true and false discrimination, and on the other hand, the reconstruction task maintains the ability to represent the inherent laws of the coding structure, thereby obtaining an AI-generated video discrimination model with high detection accuracy and strong generalization ability.
[0033] S4: Input the video to be detected into the AI-generated video discrimination model, and output the judgment result of whether the video is a real video or an AI-generated video.
[0034] Preferably, in step S4, the video to be detected is input into the AI-generated video discrimination model, including: The video to be detected is subjected to operations including compression encoding, macroblock number statistics, proportional feature calculation, and vector stacking to construct the encoding statistical feature matrix X. The encoded statistical feature matrix X of the video to be detected is input into the trained AI-generated video discrimination model. After processing including feature embedding, Transformer encoding and global average pooling, the video-level representation vector z of the video to be detected is obtained. The video-level representation vector z of the video to be detected is input into the classifier, and the classifier calculates the probability value that the video to be detected is an AI-generated video. , the probability value The video to be detected is compared with a preset threshold, and the comparison result determines whether the video is a real video or an AI-generated video.
[0035] Second Embodiment Based on the same concept, the present invention also provides an AI-generated video detection system based on multi-quantization parameter encoded statistical features, comprising: The multi-QP macroblock statistical feature construction module is used to compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix. The occlusion reconstruction self-supervised representation learning module is used to input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model. The binary classification discriminant network fine-tuning module is used to construct a video real / fake binary classification discriminant model based on the coding domain feature extraction model, and obtain an AI-generated video discriminant model through supervised training. The coding domain feature reasoning and judgment module is used to input the video to be detected into the AI-generated video discrimination model and output the judgment result of whether the video is a real video or an AI-generated video.
[0036] Third Embodiment Based on the same concept, this embodiment also provides a computer device, including a memory and a processor. The memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of an AI-generated video detection method based on multi-quantization parameter encoded statistical features as described in the embodiment.
[0037] Based on the same concept, the present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of an AI-generated video detection method based on multi-quantization parameter encoded statistical features as described in any of the embodiments.
[0038] It is understood that, for the aforementioned AI-generated video detection method based on multi-quantization parameter encoding statistical features, if all of these methods are implemented as software functional 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 this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer server or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0039] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. An AI-generated video detection method based on multi-quantization parameter encoded statistical features, characterized in that, Includes the following steps: S1: Compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix; S2: Input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model; S3: Construct a video real / fake binary classification discrimination model based on the coding domain feature extraction model, and obtain an AI-generated video discrimination model through supervised training; S4: Input the video to be detected into the AI-generated video discrimination model, and output the judgment result of whether the video is a real video or an AI-generated video.
2. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 1, characterized in that, In step S1, the macroblock types include eight categories: intra-frame prediction macroblock I, sub-frame prediction macroblock i, inter-frame prediction macroblock p, bidirectional prediction macroblock B, skip macroblock Skip, forward reference prediction macroblock, backward reference prediction macroblock, and dual reference enhancement prediction macroblock.
3. The AI-generated video detection method based on multi-quantization parameter encoding statistical features according to claim 2, characterized in that, In step S1, a multi-quantization parameter encoded statistical feature matrix is constructed, including: Constructing a set of quantization parameters , where N is the number of quantization parameters; The i-th quantization parameter Below, the number of macroblocks of type j under this quantization parameter is counted as follows. ,in , ; Based on the number of macroblocks The proportional characteristics are calculated as follows: ; Construct the proportional vector corresponding to the i-th quantization parameter based on the proportional characteristics. ; The proportional vectors corresponding to each quantization parameter set are stacked in the order of the quantization parameter sets to form the encoded statistical feature matrix X, as shown below: 。 4. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 1, characterized in that, In step S2, the coding domain feature extraction model is obtained, including: The embedded coding features are obtained by performing feature embedding mapping on the coding statistical feature matrix X. The mapping formula is as follows: in For learnable weight matrix, Here, d represents the bias, and d represents the feature dimension. The encoding structure representing the quantization parameter dimension is used, and the sequence modeling network is a Transformer encoder. The embedded encoding features The input is a Transformer encoder, and the dependencies between different quantization parameters are modeled using the Transformer encoder's multi-head self-attention mechanism. The calculation formula for the multi-head self-attention mechanism is as follows: in , , , This is the learnable weight matrix of the Transformer encoder; The output feature matrix is obtained after processing by the multi-head self-attention mechanism. Each line The encoding structure representation that incorporates global information under the i-th QP condition.
5. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 1, characterized in that, In step S2, the self-supervised occlusion reconstruction training includes: Randomly generate occlusion mask matrix As shown below: A value of 0 indicates that the element is obscured, while a value of 1 indicates that the element is preserved. According to the occlusion mask matrix Constructing occlusion input The formula is constructed as follows: ; Obscuring input Input the feature extraction network to be trained Through the feature extraction network Reconstruction yields output The reconstruction formula is shown below: ; According to the output The reconstruction loss function is defined by the original encoded statistical feature matrix X, and the formula for calculating the reconstruction loss function is as follows: in The set of elements that are obscured.
6. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 1, characterized in that, In step S3, a binary classification model for determining whether a video is real or fake is constructed, including: Global average pooling is performed on the feature matrix H output by the Transformer encoder to obtain the video-level representation vector. The pooling formula is shown below: ; The video-level representation vector The input is a classifier, which calculates the probability of predicting whether a video is real or fake. As shown below: in =1 indicates that the video was generated by AI. =0 indicates a real video. It is the Sigmoid activation function. and For learnable weight matrix and bias; Based on the probability of the video being real or fake. Define a classification loss function, and the formula for calculating the classification loss function is as follows: Where y is the true label of the training sample.
7. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 5 or 6, characterized in that, During the training phase, the classification loss and reconstruction loss are jointly optimized, and the total loss function is: in, For the network parameters of the coding domain feature extraction model, For the network parameters of the classifier, To balance the weights of classification loss and reconstruction loss, the feature extraction network and classifier are trained simultaneously through multi-task joint optimization.
8. The AI-generated video detection method based on multi-quantization parameter encoded statistical features according to claim 1, characterized in that, In step S4, the video to be detected is input into the AI-generated video discrimination model, including: The video to be detected is subjected to operations including compression encoding, macroblock number statistics, proportional feature calculation, and vector stacking to construct the encoding statistical feature matrix X. The encoded statistical feature matrix X of the video to be detected is input into the pre-trained AI-generated video discrimination model. After processing including feature embedding, Transformer encoding and global average pooling, the video-level representation vector z of the video to be detected is obtained. The video-level representation vector z of the video to be detected is input into the classifier, and the classifier calculates the probability value that the video to be detected is an AI-generated video. , the probability value The video to be detected is compared with a preset threshold, and the comparison result determines whether the video is a real video or an AI-generated video.
9. An AI-generated video detection system based on multi-quantization parameter encoded statistical features, characterized in that, include: The multi-QP macroblock statistical feature construction module is used to compress and encode the input video under several quantization parameters, count the number of macroblock types under different quantization parameters, and construct a multi-quantization parameter encoding statistical feature matrix. The occlusion reconstruction self-supervised representation learning module is used to input the encoded statistical feature matrix into the sequence modeling network for self-supervised occlusion reconstruction training to obtain the coding domain feature extraction model. The binary classification discriminant network fine-tuning module is used to construct a video real / fake binary classification discriminant model based on the coding domain feature extraction model, and obtain an AI-generated video discriminant model through supervised training. The coding domain feature reasoning and judgment module is used to input the video to be detected into the AI-generated video discrimination model and output the judgment result of whether the video is a real video or an AI-generated video.
10. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of an AI-generated video detection method based on multi-quantization parameter encoded statistical features as described in any one of claims 1 to 8.