A method and system for video abnormal content identification and interception
By combining visual semantic models and MLP models with whitelist and blacklist vector libraries for video content recognition, this method solves the problems of false positives and false negatives in the recognition of protest, riot, bloody, and terrorist video content in existing technologies, and achieves effective recognition and interception in offline environments.
Patent Information
- Application Number
- CN202611156158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies are prone to false positives and false negatives when identifying video content such as protests, riots, bloodshed, and terror, and are difficult to effectively identify and block in offline or intranet environments.
The system employs a visual semantic model to extract feature vectors from video frames, combines them with an MLP model to calculate risk scores, and uses whitelist and blacklist vector libraries to classify video content. It also performs real-time error correction for false positives and false negatives through cosine similarity calculation and fusion judgment, and supports local self-correction.
It improves the ability to recognize complex semantic video content, enables timely correction of false alarms and missed alarms, and supports local self-correction deployment in offline and intranet environments, avoiding problems caused by changes in global thresholds.
Smart Images

Figure CN123161124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video content recognition and interception technology, specifically a method and system for identifying and intercepting abnormal video content. Background Technology
[0002] Videos played on public displays aimed at the general public often need to be identified, and measures should be taken to block video content that is identified as abnormal.
[0003] In existing technologies, video content recognition often focuses on identifying anomalous content in videos with clearly defined specific application scenarios. For example, videos containing clearly identifiable content such as fires, smoke, vehicle accidents, military or police uniforms, military facilities, terrorist flags, and pornographic images can be identified using appropriate recognition models. This type of video content recognition can employ object detection models. For identifying specific individuals (such as political figures), facial recognition models can be used. For recognizing text content containing sensitive keywords, slogans, or letters, OCR text recognition models can be employed.
[0004] The three types of video content—protests and riots, bloodshed, and terror—are characterized by semantic complexity and strong subjectivity. This makes existing recognition models prone to false positives and false negatives when dealing with such video content, and they may even fail to recognize these categories effectively.
[0005] For example, lightweight image classification models such as MobileNet and EfficientNet are used to directly classify input video frames into categories such as normal, protests / riots, bloodshed, and horror. While this approach is lightweight, it is unstable in recognizing content with complex overall semantics and blurred boundaries, and it easily learns surface features such as color, texture, and local background. Scenes containing red advertisements, red paint, film special effects, game scenes, crowds at performances, or normal gatherings are easily misclassified as bloodshed, leading to false positives or false negatives.
[0006] Existing technologies employ a combination of object detection and rule-based methods, requiring the initial detection of targets such as crowds, flags, smoke, fire, bloodstains, weapons, and symbols in the image, followed by rule-based judgment to determine anomalies. This approach is suitable for categories with clearly defined target boundaries, but struggles to cover overall semantic content such as protests, riots, bloodshed, and terror. Such content is often determined by the scene, symbols, character postures, overall atmosphere, and context, making it difficult to reliably represent using fixed bounding boxes and rules, thus hindering effective recognition.
[0007] Furthermore, existing technologies collect on-site feedback data via the cloud, then have R&D personnel retrain the model before redeploying it for video anomaly detection. This approach has a long repair cycle and relies on network, cloud services, and dedicated backend R&D support, making it unsuitable for offline or intranet environments. Moreover, unified model updates may impact other customers or other scenarios.
[0008] Existing technologies also include approaches that correct false positives or false negatives solely by adjusting category thresholds; the threshold is increased when there are many false positives and decreased when there are many false negatives. This method only alters the overall sensitivity of the category and cannot correct the classification boundary for local clusters of similar samples in the feature space. Increasing the threshold may reduce false positives but increase false negatives, while decreasing the threshold may reduce false negatives but increase false positives.
[0009] Existing technologies using simple image blacklists and whitelists can handle fixed images or highly similar images, but they struggle to handle changes in angle, lighting, cropping, scaling, and image variations within the same semantic context. Furthermore, the long-term growth of blacklists and whitelists increases retrieval pressure and is difficult to translate into the model's own classification capabilities.
[0010] Therefore, a method is needed that can both achieve real-time error correction for false positives and false negatives, expand user feedback into local training sample clusters, and ultimately solidify it into the local classification model, thereby enabling video content recognition and interception. Summary of the Invention
[0011] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for identifying and intercepting abnormal video content, which can solve the problems described in the background technology.
[0012] The technical solution to achieve the objective of this invention is: a method for identifying and intercepting abnormal video content, comprising the following steps: Step 1: Obtain the video stream to be identified, capture video frames of the video stream, encode the captured video frames through a visual semantic model to obtain visual feature vectors that include semantic descriptions of the video frames, and normalize the visual feature vectors using the L2 norm to obtain normalized visual feature vectors. Step 2: Divide the abnormal content in the video into several abnormal categories to obtain an abnormal category set. Input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category. This yields the risk score of each video frame's content belonging to each abnormal category, and the risk score is converted into a risk probability. For each anomaly category, a whitelist vector library and a blacklist vector library are constructed. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Whitelist samples indicate that the video frame should not be classified as belonging to the corresponding category, while blacklist samples indicate that the video frame should be classified as belonging to the corresponding category. Among them, the abnormal category The whitelist sample indicates that the video frame should not be judged as belonging to the abnormal category. The blacklist sample indicates that the video frame is determined to belong to the abnormal category. , Calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library. Find the maximum cosine similarity among all cosine similarities to obtain the maximum cosine similarity between the video frame and the whitelist vector library. Calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library. Find the maximum cosine similarity among all cosine similarities to obtain the maximum cosine similarity between the video frame and the blacklist vector library. Step 3: The MLP model calculates the anomaly score for each anomaly category by fusing the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and is allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prevent the video frame from playing.
[0013] Furthermore, the first The video frames captured at each moment are denoted as follows: Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula:
[0014] In the formula, express The normalized visual feature vector obtained by L2 normalization, .
[0015] Furthermore, the classification head of the MLP model Output an independent risk score for each anomaly category:
[0016] Represents a set of exception categories. Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component is the category number, which serves as the risk score. The risk score of the anomaly category is then converted into a risk probability using the Sigmoid function, and the risk probability is calculated using the following formula:
[0017] In the formula, Represents video frames Belongs to the abnormal category The probability of risk.
[0018] Furthermore, cosine similarity is calculated by performing an inner product between the normalized visual feature vector and either the blacklist or whitelist samples. For blacklisted samples, video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula:
[0019] In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples. For whitelisted samples, video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula:
[0020] In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples.
[0021] Furthermore, regarding anomaly categories The corresponding anomaly score is calculated using the following formula:
[0022] In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
[0023] A video abnormal content identification and interception system, comprising: The video frame acquisition module is used to obtain the video stream to be identified and to capture the video frames of the video stream; The feature extraction and normalization module is used to encode the acquired video frames through a visual semantic model to obtain a visual feature vector that includes a semantic description of the video frame, and to normalize the visual feature vector by the second norm to obtain a normalized visual feature vector. The risk probability calculation module is used to classify abnormal video content into several abnormal categories to obtain an abnormal category set; input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category, thereby obtaining the risk score of the content of each video frame belonging to each abnormal category, and converting the risk score into a risk probability. The blacklist / whitelist vector library construction module is used to construct a whitelist vector library and a blacklist vector library corresponding to each anomaly category. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Among them, whitelist samples of anomaly category k indicate that the video frame should not be judged to belong to anomaly category k, and blacklist samples indicate that the video frame should be judged to belong to anomaly category k. The similarity calculation module is used to calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the whitelist vector library; and to calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the blacklist vector library. The fusion judgment and interception module is used to enable the MLP model to perform fusion calculations based on the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories to obtain an anomaly score corresponding to each anomaly category. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prohibit the playback of the video frame.
[0024] Furthermore, in the feature extraction and normalization module, the first... The video frames captured at each moment are denoted as follows: Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula:
[0025] In the formula, express The normalized visual feature vector obtained by L2 normalization, .
[0026] Furthermore, in the risk probability calculation module, the classification head of the MLP model... Output an independent risk score for each anomaly category:
[0027] Represents a set of exception categories. Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component is the category number, which serves as the risk score. The risk score of the anomaly category is then converted into a risk probability using the Sigmoid function, and the risk probability is calculated using the following formula:
[0028] In the formula, Represents video frames Belongs to the abnormal category The probability of risk.
[0029] Furthermore, in the similarity calculation module, the cosine similarity is obtained by calculating the inner product of the normalized visual feature vector and the blacklisted or whitelisted samples. For blacklisted samples, video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula:
[0030] In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples. For whitelisted samples, video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula:
[0031] In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples.
[0032] Furthermore, in the fusion judgment and interception module, for abnormal categories... The corresponding anomaly score is calculated using the following formula:
[0033] In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
[0034] The present invention has the following beneficial technical effects: The present invention improves the recognition ability of video content with complex semantics by using visual semantic feature vectors, and realizes timely error correction of false positives and false negatives by using blacklist and whitelist vector libraries. It also supports offline, intranet and cloud-free local self-correction deployment. Compared with simple threshold adjustment, it is more difficult to locally correct the spatial classification boundary of visual feature vectors, and avoid the loss of overall coverage caused by global threshold changes. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating a preferred embodiment of the method of the present invention; Figure 2 This is a schematic diagram of the system framework of the present invention. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: like Figure 1 As shown, a method for identifying and intercepting abnormal video content includes the following steps: Step 1: Obtain the video stream to be identified, acquire video frames from the video stream, encode the acquired video frames using a visual semantic model to obtain visual feature vectors that include semantic descriptions of the video frames, and normalize the visual feature vectors using the L2 norm to obtain normalized visual feature vectors.
[0037] It is understandable that the visual semantic model, also known as the visual encoder, can employ CLIP, FG-CLIP, SigLIP, DINO, or other pre-trained visual semantic models. The visual semantic model remains frozen during the edge training phase and does not participate in backpropagation.
[0038] Among them, the The video frames captured at each moment are denoted as follows: Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula:
[0039] In the formula, express The normalized visual feature vector obtained by L2 normalization, , which is a very small constant greater than zero, to prevent the above formula from being zero.
[0040] For example, after obtaining a video frame, the video frame is preprocessed. The preprocessing includes one or more of the following: color space conversion, size scaling, cropping, padding, and pixel normalization, to obtain a preprocessed video frame. The preprocessed video frame is then sent to the visual semantic model for encoding.
[0041] Step 2: Divide the abnormal content of the video into several abnormal categories to obtain a set of abnormal categories, such as three abnormal categories: protests and riots, bloodshed and terror. Input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category, so as to obtain the risk score of each video frame belonging to each abnormal category, and convert the risk score into risk probability.
[0042] Assuming an anomaly category set for 1 represents protests and riots, 2 represents bloodshed, and 3 represents terror. This is the classification head of the MLP model. Output an independent risk score for each anomaly category:
[0043] Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component of the category number serves as the risk score, which is essentially a normalized visual feature vector of the input. Output category is Risk score for category number.
[0044] It is not a probability value; it belongs to the logit score or unnormalized classification score, and can be converted into an anomaly category using the Sigmoid function. Risk probability :
[0045] In the formula, Indicates the current video frame Belongs to the abnormal category The probability of risk.
[0046] MLP models can employ two lightweight networks, which can be represented by the following expressions for each lightweight network. And another layer of lightweight network :
[0047]
[0048] in, For MLP classification header parameters, It is a non-linear activation function.
[0049] Construct a whitelist vector library and a blacklist vector library for each anomaly category. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Whitelist samples indicate that the video frame should not be judged to belong to the corresponding category, while blacklist samples indicate that the video frame should be judged to belong to the corresponding category.
[0050] Among them, the abnormal category The whitelist sample indicates that the video frame should not be judged as belonging to the abnormal category. The blacklist sample indicates that the video frame is determined to belong to the abnormal category. .
[0051] The whitelist sample only indicates that the video frame should not be judged as belonging to the corresponding abnormal category, and does not mean that the video frame must belong to the global normal content, or that the video frame does not necessarily belong to other abnormal categories.
[0052] Anomaly Category Whitelist vector library It can be represented as: , In the formula, Indicates the exception category Whitelist vector library The Middle Normalized visual feature vectors of whitelisted samples, Indicates the exception category The total number of whitelisted samples.
[0053] Anomaly Category Blacklist vector library It can be represented as: , In the formula, Indicates the exception category Blacklist vector library The Middle Normalized visual feature vectors of blacklisted samples Indicates the exception category The total number of blacklist samples.
[0054] Calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library, and find the maximum cosine similarity among all cosine similarities to obtain the maximum cosine similarity between the video frame and the whitelist vector library.
[0055] Similarly, calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the blacklist vector library.
[0056] For blacklisted samples, the cosine similarity is calculated by performing an inner product between the normalized visual feature vector and the blacklisted sample. For video frames... Its corresponding normalized visual feature vector Video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula:
[0057] In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples is equivalent to the cosine similarity, since both have been normalized.
[0058] like This indicates that the video frame rate needs to be increased. To belong to the category Risk score or risk probability, This represents the similarity threshold compared to the blacklist, which is a preset constant.
[0059] The blacklist hit flag can be represented by the following expression:
[0060] Represents video frames Does it hit the anomaly category? Blacklist samples.
[0061] It is understandable that when a video frame is mistakenly identified as belonging to an abnormal category... When this happens, the video frame can be normalized into a visual feature vector and then used as a whitelist sample and added to the whitelist vector library. Initially, the whitelist samples can be established in advance; that is, video frames that should not be misclassified as belonging to a certain abnormal category are identified in advance, and their visual feature vectors are normalized and then used as whitelist samples to construct the whitelist vector library.
[0062] For whitelisted samples, cosine similarity is calculated by performing an inner product between the normalized visual feature vector and the whitelisted sample. For video frames... Its corresponding normalized visual feature vector Video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula:
[0063] In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples is equivalent to the cosine similarity, since both have been normalized.
[0064] like This indicates a video frame. To belong to the category To suppress or reduce the probability of abnormal alarms. This represents the similarity threshold compared to the whitelist, which is a preset constant.
[0065] The whitelist hit flag can be represented by the following expression:
[0066] Represents video frames Does it hit the anomaly category? Whitelist samples.
[0067] It is understandable that when a video frame is mistakenly identified as belonging to an abnormal category... When this happens, the video frame can be normalized into a visual feature vector and then used as a whitelist sample and added to the whitelist vector library. Initially, the whitelist samples can be created in advance; that is, video frames that are misjudged as belonging to a certain abnormal category are identified in advance, and their visual feature vectors are normalized and then used as whitelist samples to construct the whitelist vector library.
[0068] Step 3: The MLP model calculates the anomaly score for each anomaly category by fusing the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and is allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prevent the video frame from playing.
[0069] Understandably, for a given video frame, it is only considered normal video content if the anomaly scores for all anomaly categories are less than the corresponding anomaly threshold. The anomaly thresholds for different anomaly categories can be the same or different. Conversely, if the anomaly score for at least one anomaly category is greater than or equal to the corresponding anomaly threshold, the video frame is considered to belong to at least that anomaly category and is therefore considered abnormal video content, requiring interception measures.
[0070] For example, for exception categories The corresponding anomaly score is calculated using the following formula:
[0071] In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
[0072] For example, the interception measures include replacing video frames that are determined to be abnormal video content with preset images.
[0073] Understandably, when video content is determined to be abnormal, the transmission of that video frame to the display terminal (i.e., the screen) is blocked, thus preventing the video source from being played and displayed on the display terminal.
[0074] The above-mentioned steps and skills effectively and accurately categorize abnormal video content, and can also effectively identify the three types of video content—protests and riots, bloodshed, and terror—which are characterized by semantic complexity and strong subjectivity.
[0075] For example, to avoid false positives and false negatives, it is necessary to further correct the video frame determination based on user feedback to determine whether it belongs to the whitelist or blacklist. Therefore, step 2 also includes... Step S1: When a video frame is matched with a whitelist sample or a blacklist sample, receive a user confirmation feedback instruction. If the user confirms that it is a whitelist sample or a blacklist sample, then the video frame is finally matched with a whitelist sample or a blacklist sample. If the user confirms that the video frame is incorrectly matched with a whitelist sample or a blacklist sample, all the incorrectly matched whitelist samples are used to construct an incorrect whitelist sample set, and all the incorrectly matched blacklist samples are used to construct an incorrect blacklist sample set.
[0076] Step S2: Calculate the cosine similarity between each whitelist sample in the erroneous whitelist sample set and each reference sample in the terminal-side reference sample set. The cosine similarity between a whitelist sample and a reference sample is the inner product of the normalized visual feature vector of the whitelist sample and the normalized visual feature vector of the reference sample. Similarly, calculate the cosine similarity between each blacklist sample in the erroneous blacklist sample set and each reference sample in the terminal-side reference sample set. The cosine similarity between a blacklist sample and a reference sample is the inner product of the normalized visual feature vector of the blacklist sample and the normalized visual feature vector of the reference sample.
[0077] The top N reference samples with the highest cosine similarity for both the whitelist and blacklist samples are recalled. These recalled reference samples are then used as candidate reference samples, thus obtaining a set of candidate reference samples.
[0078] To avoid overfitting of the MLP model due to an insufficient number of blacklisted and whitelisted samples, a reference sample library is pre-installed on the display terminal. This library includes multiple reference samples. The reference sample library can be constructed at the factory stage using the original training set, validation set, publicly compliant sample set, manually selected sample set, or category prototype sample set.
[0079] In this embodiment, the reference sample library may include approximately 20,000 or other numbers of reference samples. Each reference sample may include a sample number, a low-resolution thumbnail or anonymized image, a pre-extracted normalized visual feature vector, initial factory labels, the output of the base model, and necessary metadata. During edge training, it is preferable to directly use the pre-extracted visual feature vectors without performing backpropagation training on the visual encoder.
[0080] Set up a reference sample library for:
[0081] in, Indicates the first An image, thumbnail, or desensitized display of a reference sample. This represents the normalized visual feature vector of the reference sample. This indicates the initial label from the factory. This indicates the total number of reference samples.
[0082] To reduce the risk of data leakage, users may not be granted full access to the reference sample library. Instead, a limited number of candidate samples with the highest similarity to the submitted feedback sample may be displayed only after the user submits feedback.
[0083] Step S3: Select several candidate reference samples from the candidate reference sample set as adjustment label samples to obtain an adjustment label sample set. Modify and adjust the labels of the adjustment label samples to obtain candidate reference samples with valid labels. Label adjustment includes: for whitelisted samples that are falsely reported as an anomaly category, if the false report is incorrect... Then the label of the adjusted label sample will be marked as a non-abnormal category. For blacklist samples that were missed in reporting, if the user confirms that the blacklist sample should belong to the abnormal category... Then the label of the adjusted label sample will be marked as belonging to the abnormal category. .
[0084] Step S4: When the number of candidate reference samples containing valid labels is The number of samples that were matched as whitelist and blacklist samples is then... ,when Furthermore, when there is no input video stream, the MLP model deployed on the display terminal is retrained, and the retraining is completed on the display terminal side.
[0085] Understandably, retraining can also be triggered based on the target parameters of the display terminal. These target parameters include one or more of the following: CPU load rate, device temperature, power supply status, user-manual triggering, nighttime hours, or specified maintenance periods.
[0086] The training data for retraining includes visual feature vectors of candidate reference samples with valid labels, factory initial labels, user-confirmed labels in the local label coverage table, visual feature vectors of blacklist and whitelist feedback samples, and optional recent high-confidence audit cache samples.
[0087] During retraining, its training loss function The expression is as follows:
[0088]
[0089] In the formula, Indicates the first Normalized visual feature vectors of reference samples, Indicates MLP model pair Belongs to the abnormal category The predicted risk probability, Indicates the first One reference sample in the anomaly category The first local effective label vector on One portion, Indicates the weight of the reference sample. This indicates the total number of reference samples.
[0090] To prevent significant degradation of the edge model during retraining due to excessive influence from local samples, the system introduces a stability control mechanism during the training and model activation phases.
[0091] During the training phase, methods such as limiting the number of training rounds, early stopping strategy, sample weight control, class balanced sampling, weight decay or hold loss are adopted to reduce the risk of overfitting the model to a small number of local modified samples.
[0092] For reference samples whose labels have not been modified by the user, key retained samples, and recent high-confidence cached samples, calculate the retention loss. :
[0093] in, This represents the set of reference samples, key retained samples, or high-confidence cached samples where local label overwriting has not occurred. This loss is used to constrain the model's ability to identify non-target samples so as not to significantly degrade.
[0094] The magnitude of parameter changes can be used as one of the risk assessment indicators for candidate models, but it is not the only hard condition for model activation. When the parameters of a candidate model change significantly relative to the current stable model, the system can enter a gray-scale activation, category-level partial activation, similar region partial activation, or manual confirmation activation process; when the candidate model verification fails, the system rolls back to the previous stable model version.
[0095] After training, the system does not directly overwrite the current model, but instead generates candidate MLP classification heads. Validation data may include a set of user-confirmed modified samples, a set of unmodified reference samples, a set of blacklist / whitelist feedback samples, a cache of recent high-confidence normal and abnormal samples, an optional set of factory-validated feature anchors, and a set of key retained samples.
[0096] Let the current stable model parameters be... The candidate model parameters are The system first calculates the correction gain on the user feedback samples:
[0097] in, This represents the correction loss on user feedback samples, user-confirmed label change samples, or blacklist / whitelist samples. Candidate models should satisfy the following:
[0098] in, This represents the minimum effective improvement threshold.
[0099] For reference samples, key retained samples, and high-confidence cached samples whose labels have not been modified by the user, the system calculates the retention degradation amount:
[0100] Candidate models should satisfy:
[0101] in, This indicates the permissible range of performance degradation for non-target samples.
[0102] The system can select the following activation strategy based on the verification results: 1. Full Activation: When the feedback samples show significant improvement and the degradation of unmodified samples is below the threshold, the candidate MLP classification head is activated as a new stable model; 2. Category-level local activation: When a candidate model shows significant improvement only on a certain outlier category, only the output header, bias term, or correction parameter corresponding to that category is activated; 3. Local Activation in Similar Regions: When a candidate model is only effective for a certain feedback sample cluster, the candidate correction branch is activated only when the similarity between the current frame and that sample cluster exceeds a threshold. 4. Gray-scale activation: The candidate model first enters shadow mode or observation mode, and the output of the candidate model is continuously compared with that of the current model without affecting the actual interception results; 5. Rollback Retention: If the candidate model fails to meet the minimum improvement criteria or causes significant degradation of unmodified samples, the current stable model is retained, and only blacklist / whitelist vector retrieval is used for real-time error correction.
[0103] If, after a candidate model is enabled, the false positive rate, false negative rate, number of user withdrawals, or key sample degradation indicators exceed the threshold during subsequent operation, it can be automatically rolled back to the previous stable model version, while retaining the corresponding training records, label coverage records, and model version records.
[0104] When only the threshold is adjusted, the category The judgment rule is:
[0105] If the threshold is increased to reduce false alarms, then all categories Samples are harder to intercept, potentially leading to missed detections of genuine anomalies; if the threshold is lowered to reduce missed detections, then all categories... Samples are more likely to trigger interception, which may lead to false positives for normal content.
[0106] This invention does not rely on simply raising or lowering the category threshold to correct false positives or false negatives. Instead, it maps user feedback samples to a visual feature space, recalls similar samples from an edge-side reference sample library, and, after user confirmation, forms local sample clusters and a local label coverage table. The MLP model's classification head is then retrained based on this coverage table. Therefore, this invention can provide targeted correction to the classification boundaries of specific visual semantic clusters, reducing the problem of false positives and false negatives shifting due to global threshold adjustments.
[0107] Example 1. Example of correcting a red advertisement that was mistakenly reported as bloody. A client was playing a red-themed advertisement on-site, featuring a large red background and liquid-like decorative patterns. This was mistakenly flagged as gore and triggered a replacement output. The user confirmed in the alert log that the image was a false alarm and added it to the gore category whitelist.
[0108] The system immediately adds the visual features of the image to the blood-related whitelist vector library. When similar red advertisements subsequently appear, the system uses the whitelist similarity to suppress blood-related alerts, achieving real-time error correction.
[0109] Simultaneously, using this false positive sample as a query, the system recalls visually similar candidate samples from the on-device reference sample library, including red advertisements, red lights, red backgrounds, red paint, and red special effects in movies. The user confirms that some of these samples should not be classified as gore. The system writes these confirmations into a local label coverage table. When the device is idle, the system retrains the MLP model based on the features of the reference samples and the locally valid labels, enabling the MLP model to learn the boundary differences between this type of red visual pattern and gore content.
[0110] 2. Examples of corrections for underreporting of specific terrorist content A customer discovered that a type of terrifying content with specific symbols or atmosphere was not being blocked by the system. The user took a screenshot in the live preview interface, specified that the image belonged to the horror category, and added it to the horror blacklist.
[0111] The system immediately writes the visual features of the image into the terror blacklist vector database. When similar images appear subsequently, the system either enhances the terror risk score based on the blacklist similarity or directly triggers an interception.
[0112] Simultaneously, the system recalls candidate samples similar to the image from the client-side reference sample library, and the user confirms that several of these samples should also belong to the horror category. The system writes these confirmation results into a local label coverage table and retrains the MLP during idle time. The retrained MLP can more stably identify this type of horror content without relying on searching blacklists one by one.
[0113] 3. Examples of adaptation to differences in user subjective standards Client A is lenient on mild gore in film and television, while Client B requires strict blocking of any potentially gory scenes. Both clients use the same factory-built base model, but through their respective blacklists / whitelists, similar reference sample recall, and interactive relabeling, they create different local label coverage tables.
[0114] Therefore, Client A's local model reduces the risk of gore in some film and television special effects samples; Client B's local model increases the risk in more samples suspected of gore. Neither requires cloud retraining and does not affect other clients' devices.
[0115] refer to Figure 2 A video abnormal content identification and interception system, comprising: The video frame acquisition module is used to obtain the video stream to be identified and to capture the video frames of the video stream; The feature extraction and normalization module is used to encode the acquired video frames through a visual semantic model to obtain a visual feature vector that includes a semantic description of the video frame, and to normalize the visual feature vector by the second norm to obtain a normalized visual feature vector. The risk probability calculation module is used to classify abnormal video content into several abnormal categories to obtain an abnormal category set; input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category, thereby obtaining the risk score of the content of each video frame belonging to each abnormal category, and converting the risk score into a risk probability. The blacklist / whitelist vector library construction module is used to construct a whitelist vector library and a blacklist vector library corresponding to each anomaly category. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Among them, whitelist samples of anomaly category k indicate that the video frame should not be judged to belong to anomaly category k, and blacklist samples indicate that the video frame should be judged to belong to anomaly category k. The similarity calculation module is used to calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the whitelist vector library; and to calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the blacklist vector library. The fusion judgment and interception module is used to enable the MLP model to perform fusion calculations based on the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories to obtain an anomaly score corresponding to each anomaly category. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prohibit the playback of the video frame.
[0116] Furthermore, in the feature extraction and normalization module, the first... The video frames captured at each moment are denoted as Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula:
[0117] In the formula, express The normalized visual feature vector obtained by L2 normalization, .
[0118] Furthermore, in the risk probability calculation module, the classification head of the MLP model... Output an independent risk score for each anomaly category:
[0119] Represents a set of exception categories. Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component is the category number, which serves as the risk score. The risk score of the anomaly category is then converted into a risk probability using the Sigmoid function, and the risk probability is calculated using the following formula:
[0120] In the formula, Represents video frames Belongs to the abnormal category The probability of risk.
[0121] Furthermore, in the similarity calculation module, the cosine similarity is obtained by calculating the inner product of the normalized visual feature vector and the blacklisted or whitelisted samples. For blacklisted samples, video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula:
[0122] In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples. For whitelisted samples, video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula:
[0123] In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples.
[0124] Furthermore, in the fusion judgment and interception module, for abnormal categories... The corresponding anomaly score is calculated using the following formula:
[0125] In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
[0126] The embodiments disclosed in this specification are merely illustrative of one aspect of the invention, and the scope of protection of the invention is not limited to these embodiments. Any other functionally equivalent embodiments fall within the scope of protection of the invention. Those skilled in the art can make various other corresponding changes and modifications based on the technical solutions and concepts described above, and all such changes and modifications should fall within the scope of protection of the claims of this invention.
Claims
1. A method for identifying and intercepting abnormal video content, characterized in that, Includes the following steps: Step 1: Obtain the video stream to be identified, capture video frames of the video stream, encode the captured video frames through a visual semantic model to obtain visual feature vectors that include semantic descriptions of the video frames, and normalize the visual feature vectors using the L2 norm to obtain normalized visual feature vectors. Step 2: Divide the abnormal content in the video into several abnormal categories to obtain an abnormal category set. Input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category. This yields the risk score of each video frame's content belonging to each abnormal category, and the risk score is converted into a risk probability. For each anomaly category, a whitelist vector library and a blacklist vector library are constructed. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Whitelist samples indicate that the video frame should not be classified as belonging to the corresponding category, while blacklist samples indicate that the video frame should be classified as belonging to the corresponding category. Among them, the abnormal category The whitelist sample indicates that the video frame should not be judged as belonging to the abnormal category. The blacklist sample indicates that the video frame is determined to belong to the abnormal category. , Calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library. Find the maximum cosine similarity among all cosine similarities to obtain the maximum cosine similarity between the video frame and the whitelist vector library. Calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library. Find the maximum cosine similarity among all cosine similarities to obtain the maximum cosine similarity between the video frame and the blacklist vector library. Step 3: The MLP model calculates the anomaly score for each anomaly category by fusing the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and is allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prevent the video frame from playing.
2. The video abnormal content identification and interception method according to claim 1, characterized in that, No. The video frames captured at each moment are denoted as follows: Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula: In the formula, express The normalized visual feature vector obtained by L2 normalization, .
3. The video abnormal content identification and interception method according to claim 2, characterized in that, MLP model classification head Output an independent risk score for each anomaly category: Represents a set of exception categories. Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component is the category number, which serves as the risk score. The risk score of the anomaly category is then converted into a risk probability using the Sigmoid function, and the risk probability is calculated using the following formula: In the formula, Represents video frames Belongs to the abnormal category The probability of risk.
4. The video abnormal content identification and interception method according to claim 3, characterized in that, Cosine similarity is calculated by performing an inner product between a normalized visual feature vector and either a blacklisted or whitelisted sample. For blacklisted samples, video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula: In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples. For whitelisted samples, video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula: In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples.
5. The video abnormal content identification and interception method according to claim 4, characterized in that, For exception categories The corresponding anomaly score is calculated using the following formula: In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
6. A video abnormal content recognition and interception system, characterized in that, include: The video frame acquisition module is used to obtain the video stream to be identified and to capture the video frames of the video stream; The feature extraction and normalization module is used to encode the acquired video frames through a visual semantic model to obtain a visual feature vector that includes a semantic description of the video frame, and to normalize the visual feature vector by the second norm to obtain a normalized visual feature vector. The risk probability calculation module is used to classify abnormal video content into several abnormal categories to obtain an abnormal category set; input the normalized visual feature vector into the MLP model, and use the classification head of the MLP model to calculate the risk score of the normalized visual feature vector belonging to each abnormal category, thereby obtaining the risk score of the content of each video frame belonging to each abnormal category, and converting the risk score into a risk probability. The blacklist / whitelist vector library construction module is used to construct a whitelist vector library and a blacklist vector library corresponding to each anomaly category. The whitelist vector library includes normalized visual feature vectors of several whitelist samples, and the blacklist vector library includes normalized visual feature vectors of several blacklist samples. Among them, whitelist samples of anomaly category k indicate that the video frame should not be judged to belong to anomaly category k, and blacklist samples indicate that the video frame should be judged to belong to anomaly category k. The similarity calculation module is used to calculate the cosine similarity between the video frame and each whitelist sample in the whitelist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the whitelist vector library; and to calculate the cosine similarity between the video frame and each blacklist sample in the blacklist vector library, find the maximum cosine similarity among all cosine similarities, and thus obtain the maximum cosine similarity between the video frame and the blacklist vector library. The fusion judgment and interception module is used to enable the MLP model to perform fusion calculations based on the risk probability, the maximum cosine similarity between the video frame and the whitelist vector library of anomaly categories, and the maximum cosine similarity between the video frame and the blacklist vector library of anomaly categories to obtain an anomaly score corresponding to each anomaly category. If the anomaly scores of all categories are less than the anomaly judgment threshold, the video frame is judged to be non-abnormal video content and allowed to play. Otherwise, the video frame is judged to be abnormal video content and interception measures are taken to prohibit the playback of the video frame.
7. The video abnormal content identification and interception system according to claim 6, characterized in that, In the feature extraction and normalization module, the first... The video frames captured at each moment are denoted as follows: Its corresponding visual feature vector is denoted as , The L2 norm normalization is achieved using the following formula: In the formula, express The normalized visual feature vector obtained by L2 normalization, .
8. The video abnormal content identification and interception system according to claim 7, characterized in that, In the risk probability calculation module, the classification head of the MLP model Output an independent risk score for each anomaly category: Represents a set of exception categories. Indicates the first Video frames captured at each moment The corresponding exception category is Risk score for category number, Indicates the classification head of the MLP model For normalized visual feature vectors The corresponding exception category obtained as input is The output component is the category number, which serves as the risk score. The risk score of the anomaly category is then converted into a risk probability using the Sigmoid function, and the risk probability is calculated using the following formula: In the formula, Represents video frames Belongs to the abnormal category The probability of risk.
9. The video abnormal content identification and interception system according to claim 8, characterized in that, In the similarity calculation module, cosine similarity is obtained by calculating the inner product of a normalized visual feature vector with either a blacklist sample or a whitelist sample. For blacklisted samples, video frames With exception categories Blacklist vector library Maximum cosine similarity Calculated using the following formula: In the formula, Represents video frames With exception categories Blacklist vector library Maximum similarity express With exception categories Blacklist vector library The Middle The inner product of the normalized visual feature vectors of the blacklisted samples. For whitelisted samples, video frames With exception categories Whitelist vector library Maximum cosine similarity Calculated using the following formula: In the formula, Represents video frames With exception categories Whitelist vector library Maximum similarity express With exception categories Whitelist vector library The Middle The inner product of the normalized visual feature vectors of the whitelisted samples.
10. The video abnormal content identification and interception system according to claim 9, characterized in that, In the fusion judgment and interception module, for the anomaly category The corresponding anomaly score is calculated using the following formula: In the formula, , These represent the weighting of the blacklist (enhanced) and the weighting of the whitelist (suppressed), respectively.
