A method for searching a video related to politics by using key frames

By using keyframe retrieval and feature vector comparison, the problem of time-consuming and labor-intensive retrieval of politically sensitive videos has been solved, achieving efficient and accurate detection of politically sensitive content and reducing the review burden on enterprises.

CN115344743BActive Publication Date: 2026-02-24NAT COMPUTER NETWORK & INFORMATION SECURITY MANAGEMENT CENT QINGHAI BRANCH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210857330.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2026-02-24
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

Existing video retrieval technologies are time-consuming and labor-intensive in reviewing politically sensitive content, especially when the video is long, and their reliance on prior tags and multiple data sources leads to insufficient feature information.

Method used

A keyframe retrieval method is adopted, which extracts keyframes through inter-frame difference and uses the EfficientNet network to extract feature vectors. The Faiss library is constructed for comparison, and a threshold is set to return the top 1 result.

Benefits of technology

It improves the accuracy and efficiency of political video retrieval, reduces the pressure of manual review, and demonstrates high accuracy in real-world environments, outperforming full-frame comparison methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344743B_ABST
    Figure CN115344743B_ABST
Patent Text Reader

Abstract

The application discloses a method for searching government-related videos by using key frames, which comprises video input, image input, text extraction, key frame extraction, feature extraction, faiss library search, result return, key frame extraction, frame cutting processing, interframe difference value processing, smoothing processing, difference value selection and image processing. The key frame extraction module extracts key frames by using the interframe difference method. The principle is that the average pixel intensity of the difference between two images can be used to measure the change size of the two images. Based on the average intensity of the interframe difference, by using the method, a search library is constructed by using video key frames, and compared with the method of comparing all frames, the performance can be improved. The method classifies and constructs the library of government-related videos, contains prior labels, and ensures the accuracy of the results. When the frame image features are extracted, the ShuffleNet is used, and the network structure has the quantization adjustment ability of complex networks and strong high-dimensional feature extraction ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video retrieval technology, specifically a method for retrieving politically relevant videos using keyframes. Background Technology

[0002] Video content moderation has always been a crucial part of internet development, especially given the massive amounts of data generated daily in today's internet environment. This inevitably leads to the presence of some inappropriate content. Politically sensitive content has always been a target of strict crackdown by relevant national departments. However, due to the diversity of such content, it has traditionally relied heavily on manual review, the cost of which remains a significant issue. In recent years, the development of artificial intelligence technology and the continuous optimization and implementation of algorithms have brought hope for intelligent content moderation, with many industries gradually replacing manual review with algorithmic methods. Simultaneously, the moderation of politically sensitive video content is also increasingly using algorithms for filtering. However, the diverse forms of such content—for example, within the sub-field of politically sensitive incidents—represent several categories of events, each with significant differences in content, making it difficult to fit a single algorithm for filtering. Therefore, using keyframes for video retrieval has emerged as a new direction. While current research has shown some applications in video retrieval, its application in the retrieval of politically sensitive content is limited. Therefore, applying video retrieval technology to the moderation of politically sensitive content is of great significance.

[0003] Chinese patent "CN114201646A" discloses a video retrieval method and system. This method extracts deep feature vectors from the image to be retrieved based on a ResNet deep neural network. The extracted feature vector data is then used to quickly retrieve a set of similar vectors from a distributed big data storage system using the Milvus vector search engine. This result set is analyzed and processed to ultimately obtain a video file highly similar to the content of the image being retrieved. Using this method, by inputting an image containing a suspected target into the retrieval system, a video file containing similar features to the target image is returned.

[0004] Chinese patent "CN108133058A" discloses a video retrieval method and device. The method involves obtaining a first video set; calculating the information entropy of at least two attribute categories in the first video set, each attribute category including at least two subcategories; and prompting the user to select from the subcategories of the attribute category with the highest information entropy.

[0005] Chinese patent "CN111581437A" discloses a video retrieval method and apparatus for improving the quality of video representation and enhancing the accuracy of video retrieval. The method includes: acquiring image information, audio information, and text information of a target video; determining image features of the target video based on its image information; determining audio features of the target video based on its audio information; determining text features of the target video based on its text information; fusing the image features, audio features, and text features of the target video to obtain comprehensive features; and performing a similarity retrieval between the target video and a reference video based on the comprehensive features. However, existing processing devices have the following shortcomings:

[0006] Chinese patent "CN114201646A" discloses a video retrieval method and system. This method extracts deep feature vectors from the image to be retrieved using a ResNet deep neural network. The extracted feature vector data is then used to quickly retrieve a set of similar vectors from a distributed big data storage system using the Milvus vector search engine. This result set is analyzed and processed to ultimately obtain a video file highly similar to the content of the image being retrieved. Using this method, by inputting an image containing a suspected target into the retrieval system, a video file containing similar features to the target image is returned. The main drawback of this method is the lack of keyframe filtering in the video. As a result, the image being searched needs to be compared with every frame of the video, which can be very time-consuming, especially with long videos.

[0007] Chinese patent "CN108133058A" discloses a video retrieval method and device. The method involves obtaining a first video set; calculating the information entropy of at least two attribute categories within the first video set, each attribute category including at least two subcategories; and prompting the user to select from the subcategories of the attribute category with the highest information entropy. The drawback of this method is its heavy reliance on the construction of prior labels, which have little relevance to the content of the videos themselves.

[0008] Chinese patent "CN111581437A" discloses a video retrieval method and apparatus to improve the quality of video representation and enhance the accuracy of video retrieval. The method includes: acquiring image information, audio information, and text information of a target video; determining image features of the target video based on its image information; determining audio features of the target video based on its audio information; determining text features of the target video based on its text information; fusing the image, audio, and text features of the target video to obtain comprehensive features; and performing a similarity retrieval between the target video and a reference video based on the comprehensive features. The method has two main drawbacks: first, the input for retrieval must be video, limiting its use in many scenarios; second, the features of the video itself depend on three sources: video, audio, and text. If any one of these data sources is missing from the input, the feature information will be insufficient.

[0009] Therefore, we propose a method for retrieving politically sensitive videos using keyframes to address the problems mentioned above. Summary of the Invention

[0010] The purpose of this invention is to provide a method for retrieving politically sensitive videos using keyframes. The method involves classifying a collected dataset of politically sensitive videos, extracting keyframes and text from each category, inputting these into an EfficientNet network to extract feature vectors, and constructing a Faiss database. In use, the input can be either an image or a video. If it is a video, keyframes are first extracted and input into the EfficientNet network to extract feature vectors. Then, the extracted keyframes are compared in different categories of politically sensitive content Faiss databases. The top-ranked comparison result is selected from each database. If the top-ranked result's comparison result is higher than a set threshold, the result label is returned, thus solving the problems mentioned in the background art.

[0011] To achieve the above objectives, this invention provides the following technical solution: a method for retrieving politically sensitive videos using keyframes, comprising video input, image input, text extraction, keyframe extraction, feature extraction, Faiss database retrieval, and result return. The keyframe extraction includes frame segmentation, inter-frame difference value processing, smoothing, difference value selection, and image processing. This keyframe extraction module uses the inter-frame difference method to extract keyframes. The principle is to perform difference analysis on two frames of images, and the average pixel intensity of the images can be used to measure the magnitude of the change between the two frames. Based on the average intensity of the inter-frame difference, whenever a frame in the video shows a significant change in content compared to the previous frame, it is extracted as a keyframe.

[0012] The keyframe extraction includes the following five steps:

[0013] S1: The input video is processed by cutting frames in sequence. After the frames are cut, each frame is processed by Gaussian filtering.

[0014] S2: First, perform absolute value difference calculation on each original frame of the video and the previous frame (if the input is the first frame, copy the frame as the previous frame for processing). Then, binarize the results and add the matrix values ​​to obtain the inter-frame difference value.

[0015] S3: Standardize and smooth the difference value list from the previous step; S4: Select the maximum difference value using a sliding window method and obtain the original frame data according to its index; S5: Scaling the extracted keyframe image to 224*224 and normalizing it.

[0016] Preferably, the feature extraction includes confirming the network structure, determining the model loss function, and a processing module. The feature extraction involves inputting the image into a pre-trained deep learning model ShuffleNetV1, extracting features from the intermediate representation layer, and obtaining a feature vector.

[0017] The three-step operation method for feature extraction is as follows:

[0018] S1: Determine the network structure. The network structure uses 3x3 convolutions and maxpooling. Then there are three stages, each of which repeatedly stacks several ShuffleNet basic units. For each stage, the first basic unit uses stride=2, which halves the width and height of the feature map while doubling the number of channels. Subsequent basic units all use stride=1, keeping the feature map and number of channels unchanged. For basic units with stride=2, since the original input contributes to the number of channels in the final output, the number of channels before concatenation is used when calculating 1 / 4. The more groups in groupconvolution, the more channels can be used with the same computing resources, so more convolution kernels are used when the groupconvolution is larger. After completing the three stages, globalpooling is used to reduce the feature map size to 1x1. Finally, a fully connected layer is used to output the predicted class value, with the dimensions of the fully connected layer set to [1, 512].

[0019] S2: Determine the model loss function. The model uses Triplet loss during training. Its input is a triplet.<anchor,positive,negative> Here, anchor represents the samples iterated during training, positive represents randomly selected samples with the same label as anchor, and negative represents randomly selected samples with different labels from anchor. The goal of this loss function is to continuously optimize and reduce the distance between anchor and positive samples, while increasing the distance between anchor and negative samples. The feature vectors are calculated using Euclidean distance. S3: During model training, the output layer is connected. After training, when extracting image features, only the image needs to be input, and forward inference is performed to the last fully connected layer.

[0020] Preferably, the faiss library retrieval involves classifying politically sensitive videos, extracting keyframes, extracting features, and constructing the faiss library. The faiss library construction includes two steps: extraction and classification, and faiss processing and construction.

[0021] The two-step operation method:

[0022] S1: Use the feature extraction module built in the previous step to extract and classify the feature vectors of the original keyframe data of the political video.

[0023] S2: Build the faiss library according to different categories, using the IndexIDMap method in the faiss library.

[0024] Preferably, the search module in the Faiss database search includes two steps: search setting and search processing.

[0025] The two-step operation method:

[0026] S1: A threshold needs to be set in advance when judging the results. The threshold is set based on historical search results and experience.

[0027] S2: The retrieval process is as follows: extract the retrieval feature vector for the input, and finally use the IndexFlatL2 method to search the Faiss library of each category based on the Euclidean distance between the vectors and return the Top 1 result. If the Top 1 result is greater than the threshold, the label of that category is returned.

[0028] Preferably, the text extraction includes text classification and text processing. The text processing includes an input module, a comparison processing module, and an output module. The text extraction steps are as follows: extract text from multiple videos, classify the text, compare it with data in a comparison library, process it, and output it for the next step.

[0029] Compared with the prior art, the beneficial effects of the present invention are:

[0030] 1. When searching videos and images, text extraction and keyframe extraction are required. Text extraction involves separating the text and then comparing it. Keyframe extraction uses the inter-frame difference method. The principle is to subtract two frames from each other to obtain the average pixel intensity, which can be used to measure the magnitude of the change between the two frames. Based on the average intensity of the inter-frame difference, whenever a frame in the video shows a significant change from the previous frame, it is extracted as a keyframe. The input video is processed by sequentially slicing frames, and each frame is then subjected to Gaussian filtering. The absolute value difference between each original frame and the previous frame (if the input is the first frame, it is copied as the previous frame) is calculated. The results are binarized, and the matrix values ​​are summed to obtain the inter-frame difference value. The list of difference values ​​from the previous step is then standardized and smoothed. The maximum difference value is selected using a sliding window method, and the original frame data is obtained according to its index. The extracted keyframe images are scaled down to 224*224 and normalized. Feature extraction involves inputting the image into a pre-trained ShuffleNetV1 deep learning model, extracting features from the intermediate representation layers to obtain feature vectors. The network structure is then determined, employing 3x3 convolutions and maxpooling. Three stages follow, each repeatedly stacking several ShuffleNet basic units. For each stage, the first basic unit uses a stride of 2, halving the feature map width and height while doubling the number of channels. Subsequent basic units use a stride of 1, maintaining the same feature map and channel count. For the stride-2 basic unit, since the original input contributes to the final output channel count, the number of channels before concatenation is used when calculating 1 / 4. A larger number of groups in groupconvolution allows for more channels to be used with the same computational resources, hence the use of more convolutional kernels. After the three stages, global pooling reduces the feature map size to 1x1. Finally, a fully connected layer outputs the predicted class value, with dimensions set to [1, 512]. The model loss function is then determined. The model uses Tripletloss as its loss function during training. Its input is a triplet.<anchor,positive,negative> , where anchor is the sample used in the training iteration, positive is a randomly selected sample with the same label as anchor, and negative is a randomly selected sample with a different label than anchor.The goal of this loss function is to continuously optimize and reduce the distance between the anchor and positive samples, while increasing the distance between the anchor and negative samples. The feature vectors are calculated using Euclidean distance. During model training, the output layer is connected. After training, when extracting image features, only the image input is needed. The model is forward-inferred to the last fully connected layer, and then the feature vectors of the original political video keyframe data are extracted and classified using the Faiss retrieval library and the feature extraction module built in the previous step. The Faiss library is built according to different categories using the IndexIDMap method in the Faiss library. Finally, the retrieval module is used. When judging the results, a threshold needs to be set in advance. The threshold is set based on historical retrieval results and experience. The retrieval process is as follows: the retrieval feature vector is extracted for the input, and then the retrieval vector is compared with the Faiss library of each category using the IndexFlatL2 method based on the Euclidean distance between the vectors. The top 1 result is returned. If the top 1 result is greater than the threshold, the label of that category is returned.

[0031] This method first classifies the collected politically sensitive video dataset and extracts keyframes and text from each category. These are then input into the EfficientNet network to extract feature vectors and construct a Faiss database. In practice, the input can be either an image or a video. For videos, keyframes are first extracted and input into the EfficientNet network to extract feature vectors. The extracted keyframes are then compared against different categories of politically sensitive content Faiss databases. The top-ranked result from each database is selected; if the top-ranked result's comparison exceeds a set threshold, the result label is returned. Verification and testing demonstrate that this method has high accuracy in detecting politically sensitive videos in real-world environments, helping companies reduce the burden of manual review. This invention uses video keyframes to construct the retrieval database, improving performance compared to methods that compare all frames. The method classifies politically sensitive videos to construct the database, including prior labels to ensure accuracy. The method uses ShuffleNet for frame image feature extraction, a network structure with complex network quantization adjustment capabilities and strong high-dimensional feature extraction capabilities. Attached Figure Description

[0032] Figure 1 This is a simplified flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention.

[0033] Figure 2 This is a partial flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention;

[0034] Figure 3 This is a partial flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention;

[0035] Figure 4 This is a partial flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention;

[0036] Figure 5 This is a partial flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention;

[0037] Figure 6 This is a partial flowchart of a method for retrieving politically relevant videos using keyframes according to the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Please see Figure 1-6 As shown, this invention provides a technical solution: a method for retrieving politically sensitive videos using keyframes, including video input, image input, text extraction, keyframe extraction, feature extraction, Faiss database retrieval, and result return. The keyframe extraction includes frame segmentation, inter-frame difference value processing, smoothing, difference value selection, and image processing. This keyframe extraction module uses the inter-frame difference method to extract keyframes. The principle is to perform difference analysis on two frames of images, and the average pixel intensity of the images can be used to measure the magnitude of the change between the two frames. Based on the average intensity of the inter-frame difference, whenever a frame in the video shows a significant change in content compared to the previous frame, it is extracted as a keyframe.

[0040] The keyframe extraction includes the following five steps:

[0041] S1: The input video is processed by cutting frames in sequence. After the frames are cut, each frame is processed by Gaussian filtering.

[0042] S2: First, perform absolute value difference calculation on each original frame of the video and the previous frame (if the input is the first frame, copy the frame as the previous frame for processing). Then, binarize the results and add the matrix values ​​to obtain the inter-frame difference value.

[0043] S3: Standardize and smooth the difference value list from the previous step; S4: Select the maximum difference value using a sliding window method and obtain the original frame data according to its index; S5: Scaling the extracted keyframe image to 224*224 and normalizing it.

[0044] according to Figure 4As shown, the feature extraction includes confirming the network structure, determining the model loss function, and a processing module. The feature extraction involves inputting the image into a pre-trained deep learning model ShuffleNet V1, extracting features from the intermediate representation layer, and obtaining a feature vector.

[0045] The three-step operation method for feature extraction is as follows:

[0046] S1: Determine the network structure. The network structure uses 3x3 convolutions and maxpooling. Then there are three stages, each of which repeatedly stacks several ShuffleNet basic units. For each stage, the first basic unit uses stride=2, which halves the width and height of the feature map while doubling the number of channels. Subsequent basic units all use stride=1, keeping the feature map and number of channels unchanged. For basic units with stride=2, since the original input contributes to the number of channels in the final output, the number of channels before concatenation is used when calculating 1 / 4. The more groups in groupconvolution, the more channels can be used with the same computing resources, so more convolution kernels are used when the groupconvolution is larger. After completing the three stages, globalpooling is used to reduce the feature map size to 1x1. Finally, a fully connected layer is used to output the predicted class value, with the dimensions of the fully connected layer set to [1, 512].

[0047] S2: Determine the model loss function. The model uses Triplet loss during training. Its input is a triplet.<anchor,positive,negative> Here, anchor represents the samples iterated during training, positive represents randomly selected samples with the same label as anchor, and negative represents randomly selected samples with different labels from anchor. The goal of this loss function is to continuously optimize and reduce the distance between anchor and positive samples, while increasing the distance between anchor and negative samples. The feature vectors are calculated using Euclidean distance. S3: During model training, the output layer is connected. After training, when extracting image features, only the image needs to be input, and forward inference is performed to the last fully connected layer.

[0048] according to Figure 1 As shown, the Faiss library retrieval involves classifying politically sensitive videos, extracting keyframes, extracting features, and constructing the Faiss library. The construction of the Faiss library includes two steps: extraction and classification, and Faiss processing and construction.

[0049] The two-step operation method:

[0050] S1: Use the feature extraction module built in the previous step to extract and classify the feature vectors of the original keyframe data of the political video.

[0051] S2: Build the faiss library according to different categories, using the IndexIDMap method in the faiss library.

[0052] according to Figure 6 As shown, the search module in the Faiss database search includes two steps: search settings and search processing.

[0053] The two-step operation method:

[0054] S1: A threshold needs to be set in advance when judging the results. The threshold is set based on historical search results and experience.

[0055] S2: The retrieval process is as follows: extract the retrieval feature vector for the input, and finally use the IndexFlatL2 method to search the Faiss library of each category based on the Euclidean distance between the vectors and return the Top 1 result. If the Top 1 result is greater than the threshold, the label of that category is returned.

[0056] according to Figure 3 As shown, the text extraction includes text classification and text processing. The text processing includes an input module, a comparison processing module, and an output module. The text extraction steps are as follows: extract text from multiple videos, classify the text, compare it with data in a comparison library, process it, and output it for the next step.

[0057] The overall effect of this mechanism is as follows: When searching for videos and images, text extraction and keyframe extraction are required. Text extraction involves separating the text and then performing comparison processing. Keyframe extraction uses the inter-frame difference method to extract keyframes. The principle is to perform difference analysis on two frames of images to obtain the average pixel intensity, which can be used to measure the magnitude of the change between the two frames. Based on the average intensity of the inter-frame difference, whenever a frame in the video has a significant change in content compared to the previous frame, it is extracted as a keyframe. The input video is processed by sequentially cutting frames, and each frame is processed by Gaussian filtering. The absolute value difference is first calculated between each original frame of the video and the previous frame (if the input is the first frame, the frame is copied as the previous frame for processing). The results are binarized and the matrix values ​​are added to obtain the inter-frame difference value. The list of difference values ​​from the previous step is then standardized and smoothed. The maximum difference value is selected using a sliding window method, and the original frame data is obtained according to its index. The extracted keyframe images are scaled down to 224*224 and normalized. Feature extraction involves inputting the image into a pre-trained ShuffleNetV1 deep learning model, extracting features from the intermediate representation layers to obtain feature vectors. The network structure is then determined, employing 3x3 convolutions and maxpooling. Three stages follow, each repeatedly stacking several ShuffleNet basic units. For each stage, the first basic unit uses a stride of 2, halving the feature map width and height while doubling the number of channels. Subsequent basic units use a stride of 1, maintaining the same feature map and channel count. For the stride-2 basic unit, since the original input contributes to the final output channel count, the number of channels before concatenation is used when calculating 1 / 4. A larger number of groups in groupconvolution allows for more channels to be used with the same computational resources, hence the use of more convolutional kernels. After the three stages, global pooling reduces the feature map size to 1x1. Finally, a fully connected layer outputs the predicted class value, with dimensions set to [1, 512]. The model loss function is then determined. The model uses Tripletloss as its loss function during training. Its input is a triplet.<anchor,positive,negative> , where anchor is the sample used in the training iteration, positive is a randomly selected sample with the same label as anchor, and negative is a randomly selected sample with a different label than anchor.The goal of this loss function is to continuously optimize and reduce the distance between the anchor and positive samples, while increasing the distance between the anchor and negative samples. The feature vectors are calculated using Euclidean distance. During model training, the output layer is connected. After training, when extracting image features, only the image input is needed. The model is forward-inferred to the last fully connected layer, and then the feature vectors of the original political video keyframe data are extracted and classified using the Faiss retrieval library and the feature extraction module built in the previous step. The Faiss library is built according to different categories using the IndexIDMap method in the Faiss library. Finally, the retrieval module is used. When judging the results, a threshold needs to be set in advance. The threshold is set based on historical retrieval results and experience. The retrieval process is as follows: the retrieval feature vector is extracted for the input, and then the retrieval vector is compared with the Faiss library of each category using the IndexFlatL2 method based on the Euclidean distance between the vectors. The top 1 result is returned. If the top 1 result is greater than the threshold, the label of that category is returned. This method first classifies the collected politically sensitive video dataset and extracts keyframes and text from each category. These are then input into an EfficientNet network to extract feature vectors and construct a Faiss database. In practice, the input can be either an image or a video. For videos, keyframes are extracted and input into the EfficientNet network to extract feature vectors. The extracted keyframes are then compared against different categories of politically sensitive content Faiss databases. The top-ranked result from each database is selected; if the top-ranked result's comparison exceeds a set threshold, the result label is returned. Verification and testing demonstrate that this method has high accuracy in detecting politically sensitive videos in real-world environments, helping companies reduce the burden of manual review. This invention uses video keyframes to construct the retrieval database, improving performance compared to methods that compare all frames. The method classifies politically sensitive videos to construct the database, including prior labels to ensure accuracy. The method uses ShuffleNet for frame image feature extraction, a network structure with complex network quantization adjustment capabilities and strong high-dimensional feature extraction capabilities.

[0058] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for retrieving politically sensitive videos using keyframes, characterized in that: The system includes video input, image input, text extraction, keyframe extraction, feature extraction, Faiss library retrieval, and result return. The keyframe extraction includes frame segmentation, inter-frame difference value processing, smoothing, difference value selection, and image processing. This module uses the inter-frame difference method to extract keyframes. The principle is to perform difference analysis on two frames of images to obtain the average pixel intensity of the images, which can be used to measure the magnitude of the change between the two frames. Based on the average intensity of the inter-frame difference, whenever a frame in the video has a significant change in content compared to the previous frame, it is extracted as a keyframe. The keyframe extraction includes the following five steps: S1: The input video is processed by cutting frames in sequence. After the frames are cut, each frame is processed by Gaussian filtering. S2: Take each original frame of the video and the previous frame. If the input is the first frame, copy the frame as the previous frame for processing. First, perform absolute value difference calculation. After binarizing the result, add the matrix values ​​to get the inter-frame difference value. S3: Standardize and smooth the difference value list from the previous step; S4: Select the maximum difference value using a sliding window method and obtain the original frame data according to its index; S5: Scale the extracted keyframe image to 224. 224 and normalized; The feature extraction includes confirming the network structure, determining the model loss function, and processing modules. The feature extraction involves inputting the image into a pre-trained deep learning model ShuffleNet V1, extracting features from the intermediate representation layer, and obtaining a feature vector. The three-step operation method for feature extraction is as follows: S1: Determine the network structure. The network structure uses 3x3 convolutions and max pooling, followed by three stages. Each stage repeatedly stacks several ShuffleNet basic units. For each stage, the first basic unit uses stride=2, which halves the width and height of the feature map while doubling the number of channels. Subsequent basic units use stride=1, keeping the feature map and number of channels unchanged. For basic units with stride=2, since the original input contributes to the final output channel count, the number of channels before concatenation is used when calculating 1 / 4. The more groups in groupconvolution, the more channels can be used with the same computing resources, so the larger the group, the more convolution kernels are used. After completing the three stages, global pooling is used to reduce the feature map size to 1x1. Finally, there is a fully connected layer that outputs the predicted class value, with dimensions set to [1, 512]. S2: Determine the model loss function. The model uses triplet loss during training, and its input is a triplet.<anchor,positive,negative> Where anchor is the sample iterated during training, positive is a randomly selected sample with the same label as anchor, and negative is a randomly selected sample with a different label than anchor. The goal of this loss function is to continuously optimize and reduce the distance between anchor and positive samples, while increasing the distance between anchor and negative samples. The calculation between feature vectors uses Euclidean distance. S3: Connect the output layer during model training. After training, when extracting image features, simply input the image and forward infer to the last fully connected layer.

2. The method for retrieving politically sensitive videos using keyframes according to claim 1, characterized in that: The Faiss database retrieval process involves classifying politically relevant videos, extracting keyframes, extracting features, and constructing the Faiss database. The construction of the Faiss database includes two steps: extraction and classification, and Faiss processing and construction. The two-step operation method: S1: Use the feature extraction module built in the previous step to extract and classify the feature vectors of the original keyframe data of the political video. S2: Build the faiss library according to different categories, using the IndexIDMap method in the faiss library.

3. The method for retrieving politically sensitive videos using keyframes according to claim 2, characterized in that: The search module in the Faiss database search includes two steps: search settings and search processing. The two-step operation method: S1: A threshold needs to be set in advance when judging the results. The threshold is set based on historical search results and experience. S2: The retrieval process is as follows: extract the retrieval feature vector for the input, and finally use the IndexFlatL2 method to search the Faiss library of each category based on the Euclidean distance between the vectors and return the Top 1 result. If the Top 1 result is greater than the threshold, the label of that category is returned.

4. The method for retrieving politically sensitive videos using keyframes according to claim 1, characterized in that: The text extraction includes text classification and text processing. The text processing includes an input module, a comparison processing module, and an output module. The text extraction steps are as follows: extract text from multiple videos, classify the text, compare it with data in a comparison library, process it, and output it for the next step.

Citation Information

Patent Citations

  • Video retrieval method

    CN108133058A

  • Video retrieval method and device

    CN111581437A

  • Video retrieval method and system

    CN114201646A

  • An HBase-based quick retrieval method for ship monitoring video content

    CN109918537A

  • Methods and apparatuses for video segmentation, classification, and retrieval using image class statistical models

    US20020028021A1