Video detection model training method and device, video detection method and device

By training the video detection model in two rounds and utilizing labels such as artifact type, time period, coordinate information, and thought chain information, the accuracy and robustness of video detection are improved. This solves the problems of low accuracy and poor interpretability in existing technologies and enables reliable identification in high-security scenarios.

CN122265761APending Publication Date: 2026-06-23TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2026-02-06
Publication Date
2026-06-23

Smart Images

  • Figure CN122265761A_ABST
    Figure CN122265761A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a video detection model training method and device, a video detection method and equipment. The video detection model training method comprises: obtaining an original data set; based on a preset hierarchical artifact classification system, each training video in the original data set is labeled to obtain the label of each training video, wherein the label comprises artifact type, time period, coordinate information and thought chain information; according to each training video and the label corresponding to each training video, a training data set is constructed; based on the training data set and a first preset training function, a pre-trained video detection model is trained for the first time to obtain a first video detection model; based on the training data set and a second preset training function, the first video detection model is trained for the second time to obtain a target video detection model. Thus, the accuracy, robustness and interpretability are improved, laying a high-security scene reviewable, acceptable AI video authentication baseline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer vision and artificial intelligence security technology, and in particular to a training method and apparatus for a video detection model, and a method and device for video detection. Background Technology

[0002] With the rapid development of diffusion models and multimodal generation technologies, especially the rise of video generation models such as Sora, Kling, and Gen-4, synthetic videos have achieved unprecedented realism, enabling ordinary users to generate high-quality video content using only text or images. However, the misuse of this technology has led to serious social security risks, including the spread of misinformation, evidence forgery, and identity theft. Therefore, developing reliable and explainable AI (Artificial Intelligence) generated video detection technology has become a core technological challenge in the fields of multimedia forensics and AI security. An ideal detection system not only needs to accurately distinguish between genuine and fake videos but should also possess reasoning abilities similar to human experts, that is, be able to locate and interpret specific forgery traces in videos that violate physical laws or spatiotemporal consistency.

[0003] Current detection technologies primarily follow two separate paradigms: feature-based binary classification and general-purpose large-scale model direct question-answering. The feature-based binary classification paradigm lacks semantic understanding of video content, rendering it unable to provide a basis for judgment. Furthermore, its generalization ability is extremely poor; when faced with novel, unseen generators, previously effective features often become ineffective, leading to a continuous adversarial cycle between generation and detection. The general-purpose large-scale model direct question-answering paradigm lacks specialized training for forgery traces, resulting in detection accuracy approaching random guessing. It is also highly susceptible to producing illusions and cannot provide reliable evidence. These related technical approaches generally suffer from fundamental problems of lack of interpretability and poor generalization, leading to unconvincing detection results or failure when faced with high-quality generated videos, hindering the application of AI video detection technology in high-risk scenarios such as evidence collection and news verification. Summary of the Invention

[0004] This application aims to at least partially address one of the technical problems in the related art.

[0005] Therefore, the first objective of this application is to propose a training method for a video detection model that relies on labels such as artifact type, time period, coordinate information, and thought chain information to accurately capture essential forgery features, thereby reducing false positives and false negatives and improving the accuracy of video detection. By training the model in two rounds, it maintains high sensitivity and low drift to novel generation methods, improving robustness. A differentiated inference template forces the output of traceable natural language thought chains, meeting the rigid requirements of review and auditing, thus establishing a directly credible AI video authentication baseline for the highest security level scenarios.

[0006] The second objective of this application is to propose a method for video detection.

[0007] The third objective of this application is to propose a training device for a video detection model.

[0008] The fourth objective of this application is to propose an electronic device.

[0009] To achieve the above objectives, the first aspect of this application proposes a training method for a video detection model, comprising: acquiring an original dataset; labeling each training video in the original dataset based on a preset hierarchical artifact classification system to obtain a label for each training video, wherein the label includes artifact type, time period, coordinate information, and thought chain information; constructing a training dataset based on each training video and its corresponding label; performing a first round of training on the pre-trained video detection model based on the training dataset and a first preset training function to obtain a first video detection model; and performing a second round of training on the first video detection model based on the training dataset and a second preset training function to obtain a target video detection model.

[0010] In addition, the training method of the video detection model according to the above embodiments of this application may also have the following additional technical features: According to one embodiment of this application, the training dataset includes real training videos and fake training videos, wherein the thought chain information in the labels corresponding to the real training videos is labeled using a first format, and the thought chain information in the labels corresponding to the fake training videos is labeled using a second format.

[0011] According to one embodiment of this application, the artifact types include a first type of artifact, a second type of artifact, and a third type of artifact. The first type of artifact includes low-level forgery and / or types that violate laws, the second type of artifact includes texture anomalies and / or types that violate physical laws, and the third type of artifact includes shape distortion and / or rigid body clipping.

[0012] According to one embodiment of this application, the first preset training function is a cross-entropy loss function. The first training round of training of the pre-trained video detection model is performed based on the training dataset and the first preset training function to obtain the first video detection model. The method includes: inputting the target training video in the training dataset into the video detection model to generate a first detection result; generating a loss value based on the cross-entropy loss function, the first detection result and the label corresponding to the target training video, and training the video detection model based on the loss value to obtain the first video detection model.

[0013] According to one embodiment of this application, the second preset training function is a reward function. The first video detection model is trained in a second round based on the training dataset and the second preset training function to obtain the target video detection model. The training model includes: inputting the target training video in the training dataset into the first video detection model to generate a second detection result; generating a reward value based on the reward function, the second detection result and the label corresponding to the target training video, and training the first video detection model based on the reward value to obtain the target video detection model.

[0014] According to one embodiment of this application, the reward function includes an asymmetric accuracy reward criterion and a format check reward criterion. A reward value is generated based on the reward function, a second detection result, and the label corresponding to the target training video. This includes: generating a first reward value based on the asymmetric accuracy reward criterion, the second detection result, and the label corresponding to the target training video; generating a second reward value based on the format check reward criterion, the second detection result, and the label corresponding to the target training video; and generating a reward value based on the first reward value and the second reward value.

[0015] According to one embodiment of this application, training a first video detection model based on a reward value to obtain a target video detection model includes: training the first video detection model based on a first reward value and / or a second reward value to obtain the target video detection model.

[0016] To achieve the above objectives, a second aspect of this application proposes a video detection method, comprising: acquiring a target video detection model, wherein the target video detection model is trained based on the aforementioned video detection model training method; inputting the video to be detected into the target video detection model to generate a detection result of the video to be detected, wherein the detection result includes the thought chain data of the video to be detected.

[0017] To achieve the above objectives, a third aspect of this application proposes a training apparatus for a video detection model, comprising: an acquisition module for acquiring an original dataset; an annotation module for annotating each training video in the original dataset based on a preset hierarchical artifact classification system to obtain a label for each training video, wherein the label includes artifact type, time period, coordinate information, and thought chain information; a construction module for constructing a training dataset based on each training video and its corresponding label; a first-round training module for performing a first-round training on the pre-trained video detection model based on the training dataset and a first preset training function to obtain a first video detection model; and a second-round training module for performing a second-round training on the first video detection model based on the training dataset and a second preset training function to obtain a target video detection model.

[0018] The training apparatus for the video detection model according to the embodiments of this application can realize the aforementioned training method for the video detection model. Relying on tags such as artifact type, time period, coordinate information, and thought chain information, it accurately captures essential forgery features, reducing false positives and false negatives, and improving the accuracy of video detection. By performing two rounds of training on the model, it maintains high sensitivity and low drift to novel generation methods, improving robustness. The differentiated inference template forces the output of traceable natural language thought chains, meeting the rigid requirements of review and auditing, thereby establishing a directly credible AI video authenticity verification baseline for the highest security level scenarios.

[0019] To achieve the above objectives, a fourth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the aforementioned training method for the video detection model, or to implement the aforementioned video detection method.

[0020] According to the embodiments of this application, the electronic device can implement the above-mentioned video detection model training method or video detection method when the processor executes a computer program. Based on the above-mentioned video detection model training method, relying on tags such as artifact type, time period, coordinate information, and thought chain information, it accurately captures essential forgery features, reducing false positives and false negatives, and improving the accuracy of video detection. By training the model twice, it maintains high sensitivity and low drift to novel generation methods, improving robustness. The differentiated inference template forces the output of traceable natural language thought chains, meeting the rigid requirements of review and auditing, thereby establishing a directly credible AI video authenticity identification baseline for the highest security level scenarios. Based on the above-mentioned video detection method, the detection results of the video to be detected are generated through the target detection model. Without additional manual intervention or post-processing, it can provide users with a judgment interpretation with spatiotemporal coordinates and semantic basis, providing intuitive visual evidence while ensuring high detection accuracy, and providing strong technical support for multimedia forensics, false information governance, and other fields. Attached Figure Description

[0021] Figure 1 This is a flowchart of a training method for a video detection model according to some embodiments of this application; Figure 2 This is a flowchart illustrating the construction of a training dataset according to some embodiments of this application; Figure 3 This is a flowchart illustrating the training process of a video detection model according to some embodiments of this application; Figure 4 Here is a flowchart of a video detection method according to some embodiments of this application; Figure 5 This is a block diagram of a training apparatus for a video detection model according to some embodiments of this application; Figure 6 This is a block diagram of an electronic device according to some embodiments of this application. Detailed Implementation

[0022] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0023] The training method, apparatus, video detection method, and device of the video detection model according to embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 This is a flowchart illustrating a training method for a video detection model according to some embodiments of this application. (Refer to...) Figure 1 Training methods for video detection models may include: S1, Obtain the original dataset.

[0025] The original dataset refers to the set of video samples whose authenticity has been confirmed, providing a basic data source for subsequent hierarchical artifact classification and interpretable inference annotation.

[0026] Specifically, video samples whose authenticity has been verified through legal procedures or authoritative technical parties can be collected through multi-source compliant channels. After preprocessing such as unified formatting, lossless slicing, quality filtering, and encrypted archiving, a raw dataset with clear sources, sufficient scale, and secure controllability is formed, providing a data source for subsequent hierarchical artifact classification and interpretable inference annotation.

[0027] S2, based on a pre-defined hierarchical artifact classification system, annotates each training video in the original dataset to obtain a label for each training video. The label includes artifact type, time period, coordinate information, and thought chain information.

[0028] The pre-defined hierarchical artifact classification system refers to a three-layered granular knowledge framework of forgery traces, predefined during the training data construction phase. This pre-defined hierarchical artifact classification system serves as a unified classification benchmark, permeating the entire process of annotation, training, inference, and interpretable output. The pre-defined hierarchical artifact classification system can be set by technical personnel according to actual circumstances, without specific limitations. A label refers to a structured supervisory information unit assigned to any locatable forgery trace in the training video.

[0029] Furthermore, the tags include artifact type, time period, coordinate information, and thought chain information. The artifact type refers to the category name recorded in the tag, conforming to a pre-defined hierarchical artifact classification system. It indicates the specific violation attribute of the forgery at the semantic-physical level, such as "rigid body clipping - vehicle tire suspension," and can be marked with the "type" field. The time period refers to the continuous closed interval of time given in the tag, expressed in the form of "start frame - end frame" or "start second - end second," used to uniquely define the temporal range of the corresponding artifact in the entire video sequence, and can be marked with the "t" field. The coordinate information refers to the spatial occupancy of the artifact in the corresponding frame, recorded in the tag. For example, an axis-aligned rectangle expressed with four values—"top left x, top left y, width, height"—has its coordinate system origin located at the top left corner of the video frame, using pixel-level integer units, and can be marked with the "bbox" field. The thought chain information refers to the natural language text sequence carried in the label, which is used to explicitly state the logical reasoning steps that the model should perform when detecting the artifact, and simultaneously embeds the artifact type, time period and coordinate information to achieve interpretability supervision.

[0030] Specifically, based on the pre-defined hierarchical artifact classification system, each training video in the original dataset is labeled to obtain the label for each training video. The label includes artifact type, time period, coordinate information, and thought chain information.

[0031] S3: Construct a training dataset based on each training video and its corresponding label.

[0032] The training dataset refers to a collection formed by aggregating data based on "video-label" pairs as the basic unit and after passing quality sampling. Each sample consists of the original video and at least one set of corresponding labels, and is used for subsequent cold start supervised fine-tuning and reinforcement learning stage model parameter updates.

[0033] Specifically, such as Figure 2 As shown, the "video-label" pair is used as the basic sample unit. Each sample contains a complete training video sequence and corresponding "artifact type-time period-coordinate information-thought chain information" labels. After unified encapsulation, a training dataset is formed for direct use in subsequent training stages.

[0034] S4. The pre-trained video detection model is trained in the first round based on the training dataset and the first preset training function to obtain the first video detection model.

[0035] The first pre-set training function maximizes the model's probability of generating labels, enabling the pre-trained model to acquire initial forgery localization and interpretable reasoning capabilities. The pre-trained video detection model refers to a multimodal large language model, such as Qwen2.5-VL (Tongyi Qianwen 2.5-Visual Language Model), which has completed weight initialization on large-scale general visual-language data and possesses basic visual understanding and text generation capabilities. The first video detection model refers to the intermediate model obtained after the first round of training. Its parameters are adapted to forgery trace classification and spatiotemporal localization tasks, and it can output preliminary detection results containing reasoning processes and truth / false conclusions according to a predetermined template, providing a foundation for subsequent training.

[0036] Specifically, using the training dataset as the source of supervision, the pre-trained video detection model is trained in the first round using the first preset training function. The resulting first video detection model has initial forgery trace classification, spatiotemporal localization, and interpretable reasoning capabilities, serving as the cold-start strategy network for the subsequent reinforcement learning training phase.

[0037] S5. The first video detection model is trained in a second round based on the training dataset and the second preset training function to obtain the target video detection model.

[0038] The second preset training function can refer to a reward function. For example, the second preset training function can quantify and score the output of the first video detection model through a group relative policy optimization algorithm, driving it to engage in self-play, actively discover subtle artifacts, and suppress illusions. The target video detection model refers to the final video detection model obtained after the second round of training. It has high accuracy, low false positives, and strong generalization ability, and can be directly deployed in real-world scenarios for video authenticity detection.

[0039] For example, using the first video detection model as the initial strategy, the second preset training function can use a group relative strategy optimization algorithm to sample and output groups of the same video in parallel, use the reward function to estimate the relative advantage, reduce the variance by using the group mean baseline and iteratively update along the strategy gradient until the reward converges, thereby obtaining a target video detection model that is significantly better than the cold start model in terms of accuracy, false alarm rate and cross-domain generalization performance. It can be directly deployed in real-world scenarios to perform highly reliable and interpretable video authenticity discrimination tasks.

[0040] First, video samples with verified authenticity were collected and preprocessed through multiple compliant channels to construct a clear, secure, and controllable original dataset. Then, based on a pre-defined hierarchical artifact classification system, each training video was frame-by-frame labeled with a four-element tag: "artifact type-time period-coordinate-thought chain," forming structured supervisory information. Subsequently, the dataset was aggregated into training datasets using "video-label" pairs as units. When training the video detection model, a first pre-defined training function was used to perform cold-start supervised fine-tuning of the multimodal large language model, obtaining a first video detection model with initial localization and reasoning capabilities. Then, a second pre-defined training function based on group relative policy optimization was used to implement reinforcement learning, driving self-game through rewards, suppressing illusions, and uncovering subtle artifacts. After convergence, a target video detection model with high accuracy, low false positives, strong generalization, and complete interpretability was obtained.

[0041] Therefore, by relying on tags such as artifact type, time period, coordinate information, and thought chain information, the essential forgery characteristics can be accurately captured, reducing false positives and false negatives and improving the accuracy of video detection. Through two rounds of model training, high sensitivity and low drift are maintained against novel generation methods, improving robustness. Differentiated inference templates force the output of traceable natural language thought chains, meeting the rigid requirements of review and auditing, thus establishing a directly credible AI video authenticity verification baseline for the highest security level scenarios.

[0042] In some embodiments of this application, the training dataset includes real training videos and fake training videos, wherein the thought chain information in the labels corresponding to real training videos is labeled using a first format, and the thought chain information in the labels corresponding to fake training videos is labeled using a second format.

[0043] The training dataset includes real training videos and fake training videos. Real training videos refer to original video clips directly captured by real acquisition devices, without any generative algorithm modification, and that have passed integrity verification. The thought chain information in their corresponding labels is annotated using the first format. The first format is an exclusionary thought chain annotation format used to guide the model to perform a prudent reasoning process on real videos: first, describe; then, verify; then, exclude anomalies; and finally, provide a "Real" conclusion. This reduces the risk of false positives and ensures the interpretability of the results.

[0044] A fake training video refers to a video clip synthesized / modified using a diffusion model or other generative techniques, containing at least one forgery trace that can be described by a hierarchical artifact classification system. The thought chain information in its corresponding tag is annotated using a second format. The second format is a confirmatory thought chain annotation format, used to guide the model to perform an active discovery process on the fake video: first, observe the overall structure; then, detect anomalies; then, precisely locate the artifacts; and finally, conclude that it is fake. This enhances the accuracy and interpretability of the location. For example, the second format can be represented as: <type> Artifact type< / type> in<t> Time period< / t> at <bbox> coordinate frame< / bbox> .

[0045] The real and fake training videos in the training dataset are labeled separately. The differential labeling of the first and second formats enables the video detection model to establish two independent inference channels for real and fake training videos during the training phase. The inference path is bound to the true and false attributes of the sample, which forces the video detection model to complete the corresponding complete logical process before outputting the conclusion. This effectively reduces illusions and false alarms, and ensures that the true and false judgments have verifiable and reproducible thought chain evidence.

[0046] In some embodiments of this application, the artifact types include a first type of artifact, a second type of artifact, and a third type of artifact. The first type of artifact includes low-level forgery and / or types that violate laws, the second type of artifact includes texture anomalies and / or types that violate physical laws, and the third type of artifact includes shape distortion and / or rigid body clipping.

[0047] Specifically, artifact types include three categories: Category 1, Category 2, and Category 3. Category 1 refers to the L1 superclass in the pre-defined hierarchical artifact classification system, encompassing two major categories of violations: low-level forgery (such as compressed noise and jagged edges) and violations of laws (such as violating physical conservation laws and common-sense logic). Category 2 refers to the L2 mid-level semantic class in the pre-defined hierarchical artifact classification system, used to further refine texture anomalies under low-level forgery (such as surface repetition and spectral abrupt changes) and violations of physical laws under violations of laws (such as gravity reversal and momentum non-conservation). Category 3 refers to the L3 microscopic subclass in the pre-defined hierarchical artifact classification system, used to characterize two types of local defects that can be directly located using bounding boxes: shape distortion (such as limb proportion imbalance) and rigid body clipping (such as vehicle tires floating on the ground) at the pixel-to-part granularity.

[0048] This application achieves macroscopic delimitation of the violation scope through three types of artifacts. The first type of artifact achieves mid-level abstraction of physical-texture attributes, the second type of artifact achieves fine-grained implementation of pixel-level component defects, and the third type of artifact forms a complete semantic-coordinate mapping link from surface to core and from domain to point. This enhances the model's ability to decouple the hierarchical semantics of forgery and the controllability of the localization granularity, thereby simultaneously improving detection accuracy, interpretability, and cross-generator generalization robustness.

[0049] In some embodiments of this application, the first preset training function is a cross-entropy loss function. The first training round of training of the pre-trained video detection model based on the training dataset and the first preset training function is used to obtain the first video detection model. This includes: inputting the target training video in the training dataset into the video detection model to generate a first detection result; generating a loss value based on the cross-entropy loss function, the first detection result and the label corresponding to the target training video, and training the video detection model based on the loss value to obtain the first video detection model.

[0050] The first preset training function is the cross-entropy loss function, which is one of the most commonly used supervised learning objective functions in classification tasks, used to measure the difference between the probability distribution of the model output and the true labels. For example, the first preset training function can be set as follows:

[0051] in, The cross-entropy loss function represents the Supervised Fine-Tuning stage and is used to measure the difference between the model output and the true label. This represents the probability given by the model parameter θ; The index of the true smallest semantic unit at position t (t≥1); This represents the sequence of all true minimum semantic units preceding the t-th position; It represents the complete sequence of video features input, providing visual context.

[0052] The target training video refers to a single video sample in the training dataset that is to be input, containing the original frame sequence of the video. The first detection result refers to the complete output sequence generated by the video detection model for the target training video, i.e., the inference segment, the true / false conclusion, and its label. The loss value is a scalar calculated by the first preset training function (cross-entropy loss function), used to quantify the difference between the model output distribution and the true label sequence.

[0053] Specifically, refer to Figure 3 The target training videos and their four-tuple labels are fed into a pre-trained video detection model in batches. This video detection model generates a first detection result sequence through autoregression. The loss value is calculated for each of the first detection results using a first preset training function (cross-entropy loss function). All trainable parameters are updated through backpropagation, and the iteration continues until the verification loss converges, thus obtaining a first video detection model with initial forgery localization and interpretable reasoning capabilities.

[0054] By relying on the supervision mechanism of cross-entropy loss, the first round of training achieves fine alignment between video features and quadruple labels, and completes joint parameter optimization of spatiotemporal localization, artifact classification and thought chain generation in one go. It can suppress initial illusions and build a high-fidelity, interpretable policy baseline, laying a robust starting point for subsequent reinforcement learning self-evolution.

[0055] In some embodiments of this application, the second preset training function is a reward function. The first video detection model is trained in a second round based on the training dataset and the second preset training function to obtain the target video detection model. This includes: inputting the target training video in the training dataset into the first video detection model to generate a second detection result; generating a reward value based on the reward function, the second detection result and the label corresponding to the target training video, and training the first video detection model based on the reward value to obtain the target video detection model.

[0056] The second preset training function is a reward function used to quantify and score the second detection result generated by the first video detection model. For example, a group relative strategy optimization algorithm can be used to design the reward function.

[0057] The second detection result refers to the complete output sequence generated by the first video detection model in the second round of reinforcement learning for the input video, including inference segments, true / false conclusions, artifact types, time periods, and coordinate information. The reward value is a scalar score calculated by the reward function for the second detection result, which combines asymmetric accuracy rewards and format checking rewards. It is used to quantify the quality of this output and drive the update of the policy network parameters.

[0058] Specifically, continue to refer to Figure 3 The target training videos are input into the first video detection model in batches, and a second detection result sequence is obtained by sampling. The reward value is calculated for the second detection result using a second preset training function (reward function). The relative advantage is calculated using the reward value through a group relative policy optimization algorithm, and the policy network parameters are updated in reverse. The iteration continues until the reward converges, thus obtaining a target video detection model with high accuracy, low false positives, and interpretability.

[0059] Based on the optimization of the second preset training function, the second round of training achieves self-play and fine search in the policy space without additional annotation. This reduces variance and amplifies the advantageous signal, driving the model to simultaneously improve in microscopic artifact perception, macroscopic semantic reasoning, and cross-domain generalization capabilities. Ultimately, a target video detection model with high accuracy, low false alarms, and strong interpretability is solidified, which can directly serve high-confidence video authentication scenarios.

[0060] In some embodiments of this application, the reward function includes an asymmetric accuracy reward criterion and a format check reward criterion. A reward value is generated based on the reward function, the second detection result, and the label corresponding to the target training video. This includes: generating a first reward value based on the asymmetric accuracy reward criterion, the second detection result, and the label corresponding to the target training video; generating a second reward value based on the format check reward criterion, the second detection result, and the label corresponding to the target training video; and generating a reward value based on the first and second reward values.

[0061] The reward function includes an asymmetric accuracy reward criterion and a format check reward criterion. The asymmetric accuracy reward criterion applies differentiated scoring to detection results to strengthen the model's ability to suppress false positives. The format check reward criterion awards a positive score only when the model output strictly follows the predetermined inference template and fully contains valid artifact type labels (Fake case) or completes the exclusion process (Real case); otherwise, no reward is given. This ensures the standardization and verifiability of the inference chain and localization information.

[0062] The first reward value refers to the scalar score obtained after the reward function performs an initial quantitative evaluation of the second detection result generated by the first video detection model. It is used to calculate the relative advantage in the group relative strategy optimization and to initiate the first round of parameter updates, thereby driving the model to evolve towards higher accuracy and compliant formats.

[0063] The second reward value refers to the scalar score obtained by recalculating the output sequence after resampling within the same training batch and after policy update using the reward function. It is used to compare the first reward value with the reward values ​​of other samples in a group, continuously estimate the advantage and iteratively optimize the policy until the model converges to the target video detection model.

[0064] Further, a first reward value is generated based on the asymmetric accuracy reward criterion, the second detection result, and the label corresponding to the target training video; a second reward value is generated based on the format check reward criterion, the second detection result, and the label corresponding to the target training video; and a reward value is generated based on the first and second reward values. For example, the reward function can be set as follows:

[0065] in, This represents a sample from the input training dataset; This represents the complete output sequence generated by the first video detection model, containing reasoning and conclusions. This represents the weighting coefficient for asymmetric accuracy rewards; This represents the asymmetric accuracy reward component, i.e., the first reward value; This indicates the weighting coefficient for the format check reward; The format check includes the reward component, i.e., the second reward value. and It can be configured according to business needs, and there are no specific restrictions.

[0066] Specifically, for Considering that the harm of misclassifying a real video as fake outweighs the harm of missing a detection, a positive score can be awarded for a correct prediction. For example, 1.0 point is awarded for missed detections. A score of 0 is acceptable, while a false alarm is penalized with a negative score. For example, Take -0.2 points. For A reward is given only when the first video detection model follows the prescribed inference format and outputs a valid artifact type label or completes the inspection process.

[0067] The reward value is calculated by weighting the first and second reward values. The first video detection model simultaneously receives quantitative signals of "correct or incorrect judgment" and "format compliance" within the same gradient step. The asymmetric accuracy reward strengthens false positive suppression by severely penalizing false positives and lightly penalizing false negatives; the format check reward uses template integrity as a hard threshold to ensure the verifiability of the localization label and inference chain. The linear combination of these two rewards forms a stable, high signal-to-noise ratio reward scalar, driving group relative strategy optimization to continuously amplify the advantages without additional annotation. This reduces the false positive rate, improves the accuracy of microscopic artifact localization, and ensures that all prediction results have standardized, traceable evidence of the thought process, achieving a simultaneous leap in accuracy and interpretability.

[0068] In some embodiments of this application, training a first video detection model based on a reward value to obtain a target video detection model includes: training the first video detection model based on a first reward value and / or a second reward value to obtain the target video detection model.

[0069] Specifically, using the first video detection model as the initial strategy, a first reward value and a second reward value are calculated for the same video sample according to the asymmetric accuracy reward standard and the format inspection reward standard, respectively. Further, based on the first reward value and / or the second reward value, a strategy gradient iteration is performed, continuously reinforcing high-reward outputs and suppressing low-reward outputs until the model reward converges and the false alarm rate decreases, thereby obtaining a target video detection model with high accuracy, low false alarm rate, and strong interpretability.

[0070] Thus, the target video detection model completes self-evolution under the joint constraints of the first and second reward values, simultaneously achieving precise localization of microscopic artifacts, macroscopic semantic compliance reasoning, and a leap in cross-domain generalization capabilities, which can directly serve high-reliability video authentication scenarios.

[0071] This application also provides a video detection method, referring to... Figure 4Video detection methods may include: S410, Obtain the target video detection model, wherein the target video detection model is trained based on the aforementioned video detection model training method.

[0072] Specifically, the target video detection model is obtained by training the aforementioned video detection model using the training method.

[0073] S420, the video to be detected is input into the target video detection model to generate the detection result of the video to be detected, wherein the detection result includes the thought chain data of the video to be detected.

[0074] Among them, the video to be detected refers to a video segment submitted by a user or system, whose source and authenticity are unknown, and which needs to be analyzed for authenticity by a target video detection model.

[0075] Specifically, the video to be detected is encoded frame by frame and then fed into the target video detection model. The target video detection model outputs thought chain segments and true / false conclusions through autoregression according to a predetermined template. The thought chain data includes a description of the video content, the anomaly detection process, the artifact type-time period-coordinate location, and the basis for the conclusion, forming a complete reasoning chain that can be directly traced.

[0076] For example, the target video detection model receives the video input to be detected and first outputs a video containing... <think>The labeling process involves a thought process where the target video detection model, much like a human expert, first describes the video content, then scans for potential artifacts chronologically. Upon detecting anomalies, such as objects disappearing into thin air, it outputs the corresponding third-type artifact and its precise spatiotemporal coordinates. Finally, the target video detection model outputs based on accumulated evidence. <answer> Fake< / answer> .

[0077] The video detection method of this application first obtains a target detection model pre-trained using a video detection model training method. Then, the video to be detected, whose source is unknown and requires authentication, is encoded frame by frame and input into the target detection model. The target detection model outputs traceable thought chain data and the final detection result based on a predetermined template through autoregression.

[0078] Therefore, by generating detection results for the video to be detected through the target detection model, users can be provided with judgment interpretations based on spatiotemporal coordinates and semantic evidence without additional manual intervention or post-processing. While ensuring high detection accuracy, it provides intuitive visual evidence and provides strong technical support for fields such as multimedia forensics and the governance of false information.

[0079] This application also provides a training device for a video detection model, referring to... Figure 3 The device 300 includes: an acquisition module 301, an annotation module 302, a construction module 303, a first-round training module 304, and a second-round training module 305.

[0080] The system comprises the following modules: an acquisition module 301 for acquiring the original dataset; an annotation module 302 for annotating each training video in the original dataset based on a pre-defined hierarchical artifact classification system to obtain a label for each training video, wherein the label includes artifact type, time period, coordinate information, and thought chain information; a construction module 303 for constructing a training dataset based on each training video and its corresponding label; a first-round training module for performing a first-round training on the pre-trained video detection model based on the training dataset and a first pre-defined training function to obtain a first video detection model; and a second-round training module for performing a second-round training on the first video detection model based on the training dataset and a second pre-defined training function to obtain a target video detection model.

[0081] In some embodiments of this application, the construction module 303 is used to determine that the training dataset includes real training videos and fake training videos, wherein the thought chain information in the labels corresponding to real training videos is labeled in a first format, and the thought chain information in the labels corresponding to fake training videos is labeled in a second format.

[0082] In some embodiments of this application, the annotation module 302 is used to determine that the artifact type includes a first type of artifact, a second type of artifact, and a third type of artifact. The first type of artifact includes low-level forgery and / or types that violate laws, the second type of artifact includes texture anomalies and / or types that violate physical laws, and the third type of artifact includes shape distortion and / or rigid body clipping.

[0083] In some embodiments of this application, the first preset training function is a cross-entropy loss function. The first training module 304 performs a first round of training on the pre-trained video detection model based on the training dataset and the first preset training function to obtain a first video detection model. Specifically, it is used to: input the target training video in the training dataset into the video detection model to generate a first detection result; generate a loss value based on the cross-entropy loss function, the first detection result and the label corresponding to the target training video, and train the video detection model based on the loss value to obtain the first video detection model.

[0084] In some embodiments of this application, the second preset training function is a reward function. The second training module 305 performs a second round of training on the first video detection model based on the training dataset and the second preset training function to obtain the target video detection model. Specifically, it is used to: input the target training video in the training dataset into the first video detection model to generate a second detection result; generate a reward value according to the reward function, the second detection result and the label corresponding to the target training video, and train the first video detection model according to the reward value to obtain the target video detection model.

[0085] In some embodiments of this application, the reward function includes an asymmetric accuracy reward criterion and a format check reward criterion. The second-round training module 305 generates a reward value based on the reward function, the second detection result, and the label corresponding to the target training video. Specifically, it is used to: generate a first reward value based on the asymmetric accuracy reward criterion, the second detection result, and the label corresponding to the target training video; generate a second reward value based on the format check reward criterion, the second detection result, and the label corresponding to the target training video; and generate a reward value based on the first reward value and the second reward value.

[0086] In some embodiments of this application, the second-round training module 305 trains the first video detection model according to the reward value to obtain the target video detection model. Specifically, it is used to train the first video detection model according to the first reward value and / or the second reward value to obtain the target video detection model.

[0087] This application also provides an electronic device, with reference to... Figure 4 The electronic device 400 includes: a memory 410, a processor 420, and a computer program stored in the memory 410 and executable on the processor 420. The processor 420 executes the program to implement the aforementioned training method for the video detection model, or to implement the aforementioned video detection method.

[0088] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0089] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0090] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixation," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0091] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

[0092] Any process or method described in the flowchart or otherwise herein is to be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0093] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0094] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0095] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0097] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

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

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

Claims

1. A training method for a video detection model, characterized in that, include: Obtain the original dataset; Based on a pre-defined hierarchical artifact classification system, each training video in the original dataset is labeled to obtain a label for each training video. The label includes artifact type, time period, coordinate information, and thought chain information. A training dataset is constructed based on each training video and the corresponding label for each training video. The pre-trained video detection model is trained in the first round based on the training dataset and the first preset training function to obtain the first video detection model. The first video detection model is trained a second time based on the training dataset and the second preset training function to obtain the target video detection model.

2. The training method for the video detection model according to claim 1, characterized in that, The training dataset includes real training videos and fake training videos. The thought chain information in the labels corresponding to the real training videos is labeled using a first format, while the thought chain information in the labels corresponding to the fake training videos is labeled using a second format.

3. The training method for the video detection model according to claim 1, characterized in that, The artifact types include a first type of artifact, a second type of artifact, and a third type of artifact. The first type of artifact includes low-level forgery and / or types that violate laws. The second type of artifact includes texture anomalies and / or types that violate physical laws. The third type of artifact includes shape distortion and / or rigid body clipping.

4. The training method for the video detection model according to claim 1, characterized in that, The first preset training function is a cross-entropy loss function. The step of performing a first round of training on the pre-trained video detection model based on the training dataset and the first preset training function to obtain the first video detection model includes: The target training videos in the training dataset are input into the video detection model to generate a first detection result; A loss value is generated based on the cross-entropy loss function, the first detection result, and the label corresponding to the target training video. The video detection model is then trained based on the loss value to obtain the first video detection model.

5. The training method for the video detection model according to claim 1, characterized in that, The second preset training function is a reward function. The step of performing a second round of training on the first video detection model based on the training dataset and the second preset training function to obtain the target video detection model includes: The target training video in the training dataset is input into the first video detection model to generate a second detection result; A reward value is generated based on the reward function, the second detection result, and the label corresponding to the target training video. The first video detection model is then trained based on the reward value to obtain the target video detection model.

6. The training method for the video detection model according to claim 5, characterized in that, The reward function includes an asymmetric accuracy reward criterion and a format check reward criterion. Generating a reward value based on the reward function, the second detection result, and the label corresponding to the target training video includes: A first reward value is generated based on the asymmetric accuracy reward criterion, the second detection result, and the label corresponding to the target training video. A second reward value is generated based on the reward criteria, the second detection result, and the label corresponding to the target training video, according to the specified format. The reward value is generated based on the first reward value and the second reward value.

7. The training method for the video detection model according to claim 6, characterized in that, The step of training the first video detection model based on the reward value to obtain the target video detection model includes: The first video detection model is trained based on the first reward value and / or the second reward value to obtain the target video detection model.

8. A video detection method, characterized in that, include: A target video detection model is obtained, wherein the target video detection model is trained based on the training method of the video detection model as described in any one of claims 1-7; The video to be detected is input into the target video detection model to generate the detection result of the video to be detected, wherein the detection result includes the thought chain data of the video to be detected.

9. A training device for a video detection model, characterized in that, include: The acquisition module is used to acquire the raw dataset; The annotation module is used to annotate each training video in the original dataset based on a preset hierarchical artifact classification system to obtain a label for each training video. The label includes artifact type, time period, coordinate information and thought chain information. A construction module is used to construct a training dataset based on each training video and the corresponding label for each training video; The first training module is used to perform a first round of training on the pre-trained video detection model based on the training dataset and the first preset training function to obtain the first video detection model. The second training module is used to perform a second round of training on the first video detection model based on the training dataset and the second preset training function to obtain the target video detection model.

10. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the training method of the video detection model as described in any one of claims 1-7, or to implement the video detection method as described in claim 8.