A method for identifying a political image based on semantic analysis filtering

CN117391089BActive Publication Date: 2026-10-23BEIJING WEIZHIXINYE TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311294956.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2026-10-23
Estimated Expiration
2043-10-08

AI Technical Summary

Technical Problem

为此,本发明提供了一种基于语义分析过滤的涉政图像的识别方法,通过优化文本比对的过程,解决了涉政图像识别速度较慢和识别准确率较低的技术问题,从而实现快速准确识别涉政图像是否为敏感涉政图像的技术效果

Benefits of technology

[0059]本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117391089B_ABST
    Figure CN117391089B_ABST
Patent Text Reader

Abstract

The application provides a method for identifying a political image based on semantic analysis filtering, comprising the following steps: obtaining a political image to be identified; performing image preprocessing on the political image to be identified to obtain a preprocessed image; performing text extraction on the preprocessed image to obtain text information of the preprocessed image; and performing semantic analysis filtering processing on the text information, and taking a processing result as an identification result of the political image. The technical effect of quickly and accurately identifying whether the political image is a sensitive political image is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method for recognizing political images based on semantic analysis filtering. Background Technology

[0002] With the rapid development of network technology, the ways of information dissemination have become diverse, resulting in a variety of information dissemination network channels. People can freely express their thoughts through various channels, thus creating diverse information content.

[0003] However, many criminals use diverse information dissemination networks to spread false information. Among these, false political information has a particularly serious negative impact, severely endangering my country's national security and social stability. Current methods for identifying whether politically sensitive images are sensitive are primarily based on setting keywords or key text to identify the images and determining their sensitivity based on the results. However, because sensitive politically sensitive images contain complex and sensitive content, existing methods for identifying them are time-consuming and limited, resulting in slow identification speeds and low accuracy.

[0004] Therefore, how to quickly and accurately identify whether politically sensitive images are politically sensitive is one of the urgent problems to be solved in the field of image recognition technology. Summary of the Invention

[0005] This invention aims to at least partially solve the technical problems in the aforementioned technologies. To this end, this invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. By optimizing the text comparison process, it solves the technical problems of slow recognition speed and low accuracy of politically sensitive images, thereby achieving the technical effect of quickly and accurately identifying whether a politically sensitive image is sensitive.

[0006] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering, comprising:

[0007] Obtain the politically sensitive image to be identified;

[0008] Image preprocessing is performed on politically sensitive images to obtain preprocessed images;

[0009] Text extraction is performed on the preprocessed image to obtain the text information of the preprocessed image;

[0010] The text information is semantically analyzed and filtered, and the results are used as the recognition results for politically sensitive images.

[0011] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves preprocessing the politically sensitive images to obtain a preprocessed image, including:

[0012] Edge detection processing is performed on politically sensitive images to obtain the first processed image;

[0013] The first processed image is subjected to image noise reduction processing to obtain the second processed image;

[0014] The second processed image is sharpened to obtain the third processed image, which is then used as the preprocessed image.

[0015] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves performing image denoising processing on a first processed image to obtain a second processed image, including:

[0016] The first image is filtered to obtain a filtered image.

[0017] The pixel values ​​of each pixel in the filtered image are obtained using an image pixel acquisition algorithm.

[0018] The pixel value of a pixel is compared with a preset pixel boundary value. If the pixel value is not less than the preset pixel boundary value, the pixel is determined to be in the first image region. If the pixel value is less than the preset pixel boundary value, the pixel is determined to be in the second image region.

[0019] The first scaling parameter corresponding to the first image region is determined according to the first preset processing parameter and the second preset processing parameter; the second scaling parameter corresponding to the second image region is determined according to the third preset processing parameter and the fourth preset processing parameter.

[0020] The filtered image is transformed in the frequency domain to obtain the transformed image and the corresponding frequency domain transformation coefficients;

[0021] The frequency domain conversion coefficients are corrected based on the first scaling parameter and the second scaling parameter to obtain the frequency domain conversion correction coefficients;

[0022] The frequency domain transformed image is subjected to inverse frequency domain transformation based on the frequency domain transformation correction coefficient to obtain the inverse frequency domain transformed image, which is then used as the second processed image.

[0023] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves extracting text from a preprocessed image to obtain its text information, including:

[0024] A target text recognition network is constructed. The preprocessed image is input into the target text recognition network for text detection to obtain the text region corresponding to the preprocessed image.

[0025] Feature extraction is performed on the text region to obtain the text feature vector;

[0026] The text feature vector is matched with the preset text feature vector in the preset text feature set to determine the text content;

[0027] Stroke filtering is performed on the text content to obtain filtered text content, which is then used as the text information for the preprocessed image.

[0028] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves performing stroke filtering on the text content to obtain filtered text content, including:

[0029] Based on the characters included in the text content, several character regions are determined, each containing one character; these character regions are then used as the first processing region.

[0030] The area within the text region other than the first processing area is designated as the second processing area.

[0031] Select any pixel in the first processing area as the pixel to be processed, and calculate the difference between the brightness value of the pixel to be processed and the brightness values ​​of each pixel in the second processing area to determine the first filter value.

[0032] The second filter value is determined based on the gradient magnitude of each pixel in the second processing region from the pixel to be processed.

[0033] Calculate the brightness weight value of each pixel in the second processing area for the pixel to be processed based on the first filter value and the second filter value;

[0034] The brightness correction value of the pixel to be processed is determined based on the brightness weight value and the preset stroke filtering algorithm; the brightness value of the pixel to be processed is replaced with the brightness correction value;

[0035] The above operations are performed on all pixels in the first processing area to complete the stroke filtering operation and obtain the filtered text content.

[0036] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves performing semantic analysis filtering on text information and using the processing result as the recognition result of the politically sensitive image, including:

[0037] The text information is segmented into word units to obtain the word units of the text information;

[0038] Train a first keyword extraction model based on the first keyword in the existing political image text information, input word units into the preset first keyword extraction model, and obtain the first keyword set corresponding to the text information;

[0039] The first analysis result is obtained by analyzing the first set of keywords; the first keywords include perspective expression words in the word units.

[0040] A second keyword extraction model is trained based on the second keywords in existing political image text information. Word units are input into the preset second keyword extraction model to obtain the set of second keywords corresponding to the text information.

[0041] The second set of keywords is analyzed to obtain the second analysis result; wherein, the second keywords include key expressions related to the political field in the word units;

[0042] Based on the results of the first and second analyses, the semantic information corresponding to the text information is determined;

[0043] Input semantic information into a pre-defined political semantic analysis network to obtain the semantic analysis results of the semantic information;

[0044] The semantic analysis results are input into a preset politically sensitive word tagging model, and the political sensitivity of the text information is determined based on the tagging results of the preset politically sensitive word tagging model.

[0045] Text information with political sensitivity exceeding a preset threshold is filtered out and designated as sensitive text information. The political images corresponding to the sensitive text information are then identified as sensitive political images. Text information with political sensitivity not exceeding the preset threshold is identified as non-sensitive political images.

[0046] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves extracting a first keyword from the text information to obtain a first keyword set, and analyzing the first keyword set to obtain a first analysis result, including:

[0047] The first keyword is extracted from the text information to obtain the first keyword set, and the first keyword set is analyzed to obtain the analysis results of the first keyword set of the text information;

[0048] Based on the analysis results of the text information and the first keyword set, the sentence weighting graph corresponding to the text information is determined. The sentence weighting graph is then input into the pre-set first keyword set to analyze the convolutional neural network and obtain the first analysis result.

[0049] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves extracting second keywords from textual information to obtain a second keyword set, and analyzing the second keyword set to obtain a second analysis result, including:

[0050] Lexical analysis is performed on the second keyword set, and the second analysis result is obtained based on the lexical analysis results.

[0051] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering involves inputting the semantic analysis results into a preset politically sensitive word tagging model, and determining the political sensitivity of the text information based on the tagging results of the preset politically sensitive word tagging model, including:

[0052] Construct a preset set of sensitive words based on existing sensitive words in politically sensitive image and text information;

[0053] Input the semantic analysis results into the preset vocabulary analysis model to obtain the vocabulary set corresponding to the semantic analysis results;

[0054] Input the vocabulary set into the preset political sensitive word labeling model. If the distance between the vocabulary set and the preset sensitive word set is not greater than the preset sensitive distance, then the vocabulary set contains sensitive words; if the distance between the vocabulary set and the preset sensitive word set is greater than the preset sensitive distance, then the vocabulary set does not contain sensitive words. Perform word matching between the words in the vocabulary set containing sensitive words and the sensitive words in the preset sensitive word set. The words in the vocabulary set that match successfully are taken as sensitive words in the text information and labeled as sensitive words.

[0055] The political sensitivity of a text message is determined by the percentage of the number of marked sensitive words relative to the number of words in the vocabulary set.

[0056] Preferably, a method for recognizing politically sensitive images based on semantic analysis filtering further includes, after performing semantic analysis filtering on the text information and using the processing result as the recognition result of the politically sensitive image:

[0057] The system outputs politically sensitive images identified as such, performs further verification on these images, and then blocks the verified politically sensitive images.

[0058] The above technical solution obtains a preprocessed image by preprocessing the acquired politically sensitive image, extracts text from the preprocessed image to obtain the text information contained in the preprocessed image, and performs semantic analysis and filtering on the text information to obtain the recognition result of the politically sensitive image, thereby achieving the technical effect of quickly and accurately identifying whether a politically sensitive image is a sensitive politically sensitive image.

[0059] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0060] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0061] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0062] Figure 1This is a flowchart of a method for recognizing politically sensitive images based on semantic analysis filtering, as described in an embodiment of the present invention.

[0063] Figure 2 This is a flowchart of an optional method for denoising politically sensitive images in an embodiment of the present invention;

[0064] Figure 3 This is a flowchart of an optional text content stroke filtering method for political images in an embodiment of the present invention. Detailed Implementation

[0065] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0066] Reference Figure 1 This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering, comprising:

[0067] Step S1: Obtain the politically sensitive image to be identified;

[0068] Step S2: Perform image preprocessing on the politically sensitive images to obtain preprocessed images;

[0069] Step S3: Extract text from the preprocessed image to obtain the text information of the preprocessed image;

[0070] Step S4: Perform semantic analysis and filtering on the text information, and use the processing result as the recognition result of the political image.

[0071] In this embodiment, the politically sensitive images can be obtained from the network or captured by an image acquisition device.

[0072] In this embodiment, the specific implementation method for text extraction from the preprocessed image can be as follows: inputting the preprocessed image into a pre-constructed convolutional neural network to determine the text region, extracting features from the text region to obtain a feature vector, matching the feature vector with features in a preset set to determine the text content, and filtering the text content to obtain the final extracted text information.

[0073] In this embodiment, the specific implementation of performing semantic analysis and filtering on text information and using the processing result as the image recognition result can be as follows: extracting keywords from the text information to determine the semantic information corresponding to the text information, inputting the semantic information into a preset convolutional neural network to obtain the semantic analysis result, filtering the text information based on the semantic analysis result, and determining the image recognition result based on the filtered text information.

[0074] The working principle of the above technical solution is as follows: acquire the political image to be identified; perform image preprocessing on the political image to obtain a preprocessed image; extract text from the preprocessed image to obtain the text information of the preprocessed image; perform semantic analysis and filtering on the text information, and use the processing result as the recognition result of the image.

[0075] The technical effect of the above technical solution is as follows: by preprocessing the acquired image to obtain a preprocessed image, extracting text from the preprocessed image to obtain the text information contained in the preprocessed image, and performing semantic analysis and filtering on the text information to determine whether the political image is a sensitive political image, the technical effect of quickly and accurately identifying whether an image is a sensitive political image is achieved.

[0076] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves preprocessing the politically sensitive images to obtain a preprocessed image, including:

[0077] Edge detection processing is performed on politically sensitive images to obtain the first processed image;

[0078] The first processed image is subjected to image noise reduction processing to obtain the second processed image;

[0079] The second processed image is sharpened to obtain the third processed image, which is then used as the preprocessed image.

[0080] In this embodiment, the specific implementation of edge detection processing for the image to be identified can be: using the Roberts operator to perform edge detection on the image to be identified; using the Prevet operator to perform edge detection on the image to be identified; using the Sopper operator to perform edge detection on the image to be identified; using the Laplacian operator to perform edge detection on the image to be identified, etc.

[0081] In this embodiment, the specific implementation of image sharpening processing for the second processed image may be as follows: feature extraction is performed on the second processed image to determine the politically relevant parts of the image (e.g., people, flags, etc.) as sharpening regions, and the sharpening degree of the sharpening regions is increased to obtain a sharpened region image; the non-politically relevant parts are determined as unsharpened regions, and the sharpening degree of the unsharpened regions is reduced to obtain an unsharpened region image; the sharpened region image and the unsharpened region image are then merged to complete the image sharpening processing of the second processed image.

[0082] The technical principle of the above technical solution is as follows: edge detection processing is performed on the political image to obtain a first processed image; image noise reduction processing is performed on the first processed image to obtain a second processed image; image sharpening processing is performed on the second processed image to obtain a third processed image, and the third processed image is used as a preprocessed image.

[0083] The technical effect of the above solution is that by preprocessing the image to be recognized, edge parts and noise in the image are removed, the image sharpness is improved, and the image contrast is improved, which is beneficial to text recognition in subsequent text extraction operations.

[0084] Reference Figure 2 This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering, which involves performing image noise reduction processing on a first processed image to obtain a second processed image, including:

[0085] Step S221: Filter the first image to obtain a filtered image;

[0086] Step S222: Use an image pixel acquisition algorithm to obtain the pixel value of each pixel in the filtered image;

[0087] Step S223: Compare the pixel value of the pixel with a preset pixel boundary value. If the pixel value is not less than the preset pixel boundary value, the pixel is determined to be in the first image region. If the pixel value is less than the preset pixel boundary value, the pixel is determined to be in the second image region.

[0088] Step S224: Determine the first scaling parameter corresponding to the first image region based on the first preset processing parameter and the second preset processing parameter; determine the second scaling parameter corresponding to the second image region based on the third preset processing parameter and the fourth preset processing parameter;

[0089] Step S225: Perform frequency domain transformation on the filtered image to obtain the frequency domain transformed image and the corresponding frequency domain transformation coefficients;

[0090] Step S226: Correct the frequency domain conversion coefficients according to the first scaling parameter and the second scaling parameter to obtain the frequency domain conversion correction coefficients;

[0091] Step S227: Perform inverse frequency domain transformation on the frequency domain transformed image according to the frequency domain transformation correction coefficient to obtain the inverse frequency domain transformed image, and use the inverse frequency domain transformed image as the second processed image.

[0092] In this embodiment, the filtering process can be: Gaussian filtering, median filtering, bilateral filtering, etc.

[0093] In this embodiment, the preset pixel boundary value can be the average pixel value of each pixel in the filtered image.

[0094] In this embodiment, the first preset processing parameter may be a pre-set first preset scaling rate, and the second preset processing parameter may be a pre-set first preset brightness threshold.

[0095] In this embodiment, the third preset processing parameter can be a pre-set second preset scaling rate, and the fourth preset processing parameter can be a pre-set second preset brightness threshold.

[0096] In this embodiment, the specific implementation of correcting the frequency domain conversion coefficients according to the first scaling parameter and the second scaling parameter to obtain the frequency domain conversion correction coefficients can be as follows: perform a threshold scaling operation on the frequency domain conversion coefficients according to the first scaling parameter and the second scaling parameter to obtain the frequency domain conversion correction coefficients.

[0097] The technical principle of the above solution is as follows: A first processed image is filtered to obtain a filtered image; the pixel value of each pixel in the filtered image is obtained using an image pixel acquisition algorithm; the pixel value of each pixel is compared with a preset pixel boundary value, and the pixel is determined to be in the first image region if the pixel value is not less than the preset pixel boundary value; the pixel is determined to be in the second image region if the pixel value is less than the preset pixel boundary value; a first scaling parameter corresponding to the first image region is determined according to a first preset processing parameter and a second preset processing parameter; a second scaling parameter corresponding to the second image region is determined according to a third preset processing parameter and a fourth preset processing parameter; the filtered image is frequency domain transformed to obtain a frequency domain transformed image and corresponding frequency domain transformation coefficients; the frequency domain transformation coefficients are corrected according to the first scaling parameter and the second scaling parameter to obtain frequency domain transformation correction coefficients; the frequency domain transformed image is inversely frequency domain transformed according to the frequency domain transformation correction coefficients to obtain an inverse frequency domain transformed image, and the inverse frequency domain transformed image is used as the second processed image.

[0098] The technical effect of the above solution is that it removes image noise from the first processed image, improves the smoothness of the first processed image, and is beneficial to text recognition during subsequent text extraction operations.

[0099] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves extracting text from a preprocessed image to obtain its text information, including:

[0100] A target text recognition network is constructed. The preprocessed image is input into the target text recognition network for text detection to obtain the text region corresponding to the preprocessed image.

[0101] Feature extraction is performed on the text region to obtain the text feature vector;

[0102] The text feature vector is matched with the preset text feature vector in the preset text feature set to determine the text content;

[0103] Stroke filtering is performed on the text content to obtain filtered text content, which is then used as the text information for the preprocessed image.

[0104] In this embodiment, the specific implementation of constructing the target text recognition network can be: training a convolutional neural network based on existing images and the text regions corresponding to those images, and obtaining the target text recognition network after training.

[0105] In this embodiment, the specific methods for obtaining text feature vectors may be: obtaining text feature vectors through one-hot encoded text feature vectorization, obtaining text feature vectors through term frequency-inverse document frequency text feature vectorization, obtaining text feature vectors through hash text feature vectorization, etc.

[0106] In this embodiment, the specific way to match the text feature vector with the preset text feature vector in the preset text feature set can be: calculate the Manhattan distance between the text feature vector and the preset text feature vector, and when the Manhattan distance between the two is less than the preset matching distance, the text feature vector and the preset text feature vector are successfully matched.

[0107] The technical principle of the above solution is as follows: construct a target text recognition network, input the preprocessed image into the target text recognition network for text detection, and obtain the text region corresponding to the preprocessed image; extract features from the text region to obtain text feature vectors; match the text feature vectors with preset text feature vectors in a preset text feature set to determine the text content; perform stroke filtering on the text content to obtain filtered text content, and use the filtered text content as the text information of the preprocessed image.

[0108] The technical effect of the above solution is that by extracting text from the preprocessed image, the text information of the preprocessed image is obtained, which provides a basis for subsequent image content recognition and helps to accurately determine the content represented by the image.

[0109] Reference Figure 3 This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves performing stroke filtering on the text content to obtain filtered text content, including:

[0110] Step S341: Based on the characters included in the text content, determine several character regions, each containing one character; use these character regions as the first processing region;

[0111] Step S342: The area within the text region other than the first processing area is designated as the second processing area;

[0112] Step S343: Select any pixel in the first processing area as the pixel to be processed, and calculate the difference between the brightness value of the pixel to be processed and the brightness values ​​of each pixel in the second processing area to determine the first filter value.

[0113] Step S344: Determine the second filter value based on the gradient magnitude of each pixel in the second processing area from the pixel to be processed.

[0114] Step S345: Calculate the brightness weight value of each pixel in the second processing area for the pixel to be processed based on the first filter value and the second filter value;

[0115] Step S346: Determine the brightness correction value of the pixel to be processed based on the brightness weight value and the preset stroke filtering algorithm; replace the brightness value of the pixel to be processed with the brightness correction value;

[0116] Step S347: Perform the above operation on all pixels within the first processing area to complete the stroke filtering operation and obtain the filtered text content. In this embodiment, the brightness weight value is obtained by exponentially calculating the value obtained by adding the first filter value and the second filter value.

[0117] In this embodiment, the specific implementation process of determining the brightness correction value of the pixel to be processed based on the brightness weight value and the preset stroke filtering algorithm can be as follows: the brightness weight value is subjected to exponential operation, and the result of the operation is multiplied by the current brightness value of the pixel to be processed to obtain the brightness correction value.

[0118] The technical principle of the above solution is as follows: Based on the characters included in the text content, several character regions are determined, each containing one character; these character regions are used as the first processing region; the region within the text region excluding the first processing region is used as the second processing region; any pixel in the first processing region is selected as the pixel to be processed, and the difference between the brightness value of the pixel to be processed and the brightness values ​​of each pixel in the second processing region is calculated to determine the first filter value; the second filter value is determined based on the gradient magnitude from the pixel to be processed to each pixel in the second processing region; the brightness weight value of each pixel in the second processing region relative to the pixel to be processed is calculated based on the first and second filter values; the brightness correction value of the pixel to be processed is determined based on the brightness weight value and a preset stroke filtering algorithm; the brightness value of the pixel to be processed is replaced with the brightness correction value; the above operations are performed on all pixels in the first processing region to complete the stroke filtering operation and obtain the filtered text content.

[0119] The technical effect of the above solution is that by performing stroke filtering on the text content, filtered text content is obtained, which enhances the clarity of the text content and improves the processing accuracy when processing the text content.

[0120] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves performing semantic analysis filtering on text information and using the processing result as the recognition result for the politically sensitive image. The method includes:

[0121] The text information is segmented into word units to obtain the word units of the text information;

[0122] Train a first keyword extraction model based on the first keyword in the existing political image text information, input word units into the preset first keyword extraction model, and obtain the first keyword set corresponding to the text information;

[0123] The first analysis result is obtained by analyzing the first set of keywords; the first keywords include perspective expression words in the word units.

[0124] A second keyword extraction model is trained based on the second keywords in existing political image text information. Word units are input into the preset second keyword extraction model to obtain the set of second keywords corresponding to the text information.

[0125] The second set of keywords is analyzed to obtain the second analysis result; wherein, the second keywords include key expressions related to the political field in the word units;

[0126] Based on the results of the first and second analyses, the semantic information corresponding to the text information is determined;

[0127] Input semantic information into a pre-defined political semantic analysis network to obtain the semantic analysis results of the semantic information;

[0128] The semantic analysis results are input into a preset politically sensitive word tagging model, and the political sensitivity of the text information is determined based on the tagging results of the preset politically sensitive word tagging model.

[0129] Text information with political sensitivity exceeding a preset threshold is filtered out and designated as sensitive text information. The political images corresponding to the sensitive text information are then identified as sensitive political images. Text information with political sensitivity not exceeding the preset threshold is identified as non-sensitive political images.

[0130] In this embodiment, the specific method for segmenting text information can be as follows: A segmentation lexicon is determined based on existing political image text information; the first character of the text information is obtained; the word segmentation starting with the first character is determined based on the segmentation lexicon; this word segmentation is then segmented from the text information; the remaining text information is processed in the same way until segmentation is complete. Since there is more than one word segmentation starting with the first character in the text information, there are more than one segmentation result. Therefore, the segmentation weight of each segmentation result is calculated separately, and the segmentation result with the highest weight is selected as the final segmentation result. In this embodiment, perspective-expressing words are words that express emotions, such as: "The national flag of this country is very beautiful," where "national flag" and "beautiful" are the first keywords of this text information.

[0131] In this embodiment, political images refer to images involving the political field, such as images of meetings between leaders of two countries.

[0132] The technical principle of the above technical solution is as follows: the text information is segmented to obtain word units of the text information; a first keyword extraction model is trained based on the first keyword in the existing political image text information; the word units are input into the preset first keyword extraction model to obtain the first keyword set corresponding to the text information; the first keyword set is analyzed to obtain the first analysis result; wherein, the first keyword includes perspective expression words in the word units. A second keyword extraction model is trained based on the second keywords in existing politically sensitive image text information. Word units are input into the preset second keyword extraction model to obtain a set of second keywords corresponding to the text information. The second keyword set is analyzed to obtain a second analysis result. The second keywords include key expressions related to the political field within the word units. Based on the first and second analysis results, the semantic information corresponding to the text information is determined. The semantic information is input into a preset politically sensitive word labeling model to obtain the semantic analysis result. The semantic analysis result is input into a preset politically sensitive word labeling model, and the political sensitivity of the text information is determined based on the labeling result. Text information with a political sensitivity greater than the preset political sensitivity is filtered out as sensitive text information, and the politically sensitive images corresponding to the sensitive text information are identified as sensitive politically sensitive images. Politically sensitive images corresponding to text information with a political sensitivity not greater than the preset political sensitivity are identified as non-sensitive politically sensitive images.

[0133] The technical effect of the above solution is that by extracting keywords and performing semantic analysis on the text information, the political sensitivity of the text information is determined, and the text information is filtered according to the political sensitivity, thus quickly and efficiently identifying sensitive political images.

[0134] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves extracting a first keyword from the text information to obtain a first keyword set, and analyzing the first keyword set to obtain a first analysis result, including:

[0135] The first keyword is extracted from the text information to obtain the first keyword set, and the first keyword set is analyzed to obtain the analysis results of the first keyword set of the text information;

[0136] Based on the analysis results of the text information and the first keyword set, the sentence weighting graph corresponding to the text information is determined. The sentence weighting graph is then input into the pre-set first keyword set to analyze the convolutional neural network and obtain the first analysis result.

[0137] In this embodiment, the specific implementation method for analyzing the first keyword set to obtain the analysis result of the text information can be as follows: construct a semantic space based on multiple word vectors corresponding to the existing text information; calculate the sinusoidal distance between any two word vectors as a semantic similarity index; determine approximate words based on the semantic similarity index to complete the establishment of an approximate word library; map the keywords in the first keyword set to the semantic space to obtain the corresponding keyword vectors, calculate the sinusoidal distance between any two keyword vectors as a semantic similarity index, search for approximate words based on the semantic similarity index; and determine the analysis result of the first keyword set based on the searched approximate words.

[0138] In this embodiment, the specific method for determining the sentence weighting graph corresponding to the text information based on the analysis results of the text information and the first keyword set can be as follows: obtain the part-of-speech information of the keywords in the first keyword set based on the analysis results of the text information and the first keyword set, and determine the part-of-speech vectors corresponding to the part-of-speech information; train a dependency parser based on the English Pennsylvania Treebank dataset, input the part-of-speech vectors and the keyword vectors corresponding to the keywords in the first keyword set into the pre-trained dependency parser, determine the text probability matrix corresponding to the text information, and determine the sentence weighting graph based on the text probability matrix.

[0139] The technical principle of the above technical solution is as follows: extract the first keyword from the text information to obtain the first keyword set, analyze the first keyword set to obtain the first keyword set analysis result of the text information; determine the sentence weighting graph corresponding to the text information based on the text information and the first keyword set analysis result, input the sentence weighting graph into the preset first keyword set analysis convolutional neural network to obtain the first analysis result.

[0140] The technical effect of the above technical solution is that by analyzing the first keyword set, the first analysis result is obtained, which improves the accuracy of text information analysis, thereby improving the accuracy of image recognition.

[0141] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves extracting second keywords from text information to obtain a second keyword set, and analyzing the second keyword set to obtain a second analysis result, including:

[0142] Lexical analysis is performed on the second keyword set, and the second analysis result is obtained based on the lexical analysis results.

[0143] In this embodiment, the specific method for performing lexical analysis on the second keyword set can be as follows: Feature extraction is performed on the second keyword set formed from existing text information to obtain the context features corresponding to the second keyword set; a second key feature function is obtained based on the context features; part-of-speech information of each keyword in the second keyword set is obtained; a lexical information tag sequence of the second keyword set is determined based on the part-of-speech information; the weight of the second key feature of the second keyword set is determined based on the second keyword set and the lexical information tag sequence; the weight of the second key feature is adjusted using a Gaussian prior; the analysis result of the second keyword set is determined based on the second key feature function, the adjusted weight of the second key feature, the second keyword set, and the part-of-speech information of each keyword, thus completing the lexical analysis.

[0144] The technical principle of the above technical solution is: to perform lexical analysis on the second keyword set, and to obtain the second analysis result based on the lexical analysis result.

[0145] The technical effect of the above technical solution is that by analyzing the second keyword set, a second analysis result is obtained, which further improves the accuracy of text information analysis and thus improves the accuracy of image recognition.

[0146] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. The method involves inputting the semantic analysis results into a preset politically sensitive word tagging model, and determining the political sensitivity of the text information based on the tagging results of the preset politically sensitive word tagging model. The method includes:

[0147] Construct a preset set of sensitive words based on existing sensitive words in politically sensitive image and text information;

[0148] Input the semantic analysis results into the preset vocabulary analysis model to obtain the vocabulary set corresponding to the semantic analysis results;

[0149] Input the vocabulary set into the preset political sensitive word labeling model. If the distance between the vocabulary set and the preset sensitive word set is not greater than the preset sensitive distance, then the vocabulary set contains sensitive words; if the distance between the vocabulary set and the preset sensitive word set is greater than the preset sensitive distance, then the vocabulary set does not contain sensitive words. Perform word matching between the words in the vocabulary set containing sensitive words and the sensitive words in the preset sensitive word set. The words in the vocabulary set that match successfully are taken as sensitive words in the text information and labeled as sensitive words.

[0150] The political sensitivity of a text message is determined by the percentage of the number of marked sensitive words relative to the number of words in the vocabulary set.

[0151] In this embodiment, the specific formula for determining the distance between the vocabulary set and the preset sensitive word set can be:

[0152]

[0153] Where D represents the distance between the vocabulary set and the preset sensitive word set, T represents the vocabulary set, and |T| represents the number of words in the vocabulary set. * Represents a preset set of sensitive words, |T * | indicates the number of words in the preset sensitive word set, TT * |TT represents the intersection of the vocabulary set and the preset sensitive word set. * | indicates the number of words in the intersection of the vocabulary set and the preset sensitive word set.

[0154] In this embodiment, the specific method for matching words in the vocabulary set containing sensitive words with sensitive words in the preset sensitive word set can be as follows: calculate the word matching degree between the words in the vocabulary set containing sensitive words and the sensitive words in the preset sensitive word set; if the word matching degree is not less than the preset word matching degree, the word matching is successful; if the word matching degree is less than the preset word matching degree, the word matching fails.

[0155] The technical principle of the above solution is as follows: A preset sensitive word set is constructed based on sensitive words in existing politically sensitive image text information; the semantic analysis results are input into a preset vocabulary analysis model to obtain a vocabulary set corresponding to the semantic analysis results; the vocabulary set is input into a preset politically sensitive word tagging model, and if the distance between the vocabulary set and the preset sensitive word set is not greater than a preset sensitivity distance, then the vocabulary set contains sensitive words; if the distance between the vocabulary set and the preset sensitive word set is greater than the preset sensitivity distance, then the vocabulary set does not contain sensitive words; the words in the vocabulary set containing sensitive words are matched with the sensitive words in the preset sensitive word set, and the words in the successfully matched vocabulary set are used as sensitive words in the text information and tagged; the political sensitivity of the text information is determined based on the percentage of tagged sensitive words to the number of words in the vocabulary set.

[0156] The technical effect of the above solution is that the political sensitivity of the text information is determined by the percentage of the number of marked sensitive words to the number of words in the vocabulary set, and the sensitive words in the text information are accurately identified, thereby improving the speed and efficiency of confirming whether an image is a sensitive political image.

[0157] This invention provides a method for recognizing politically sensitive images based on semantic analysis filtering. After performing semantic analysis filtering on the text information and using the processing result as the recognition result for the politically sensitive image, the method further includes:

[0158] The system outputs politically sensitive images identified as such, performs further verification on these images, and then blocks the verified politically sensitive images.

[0159] In this embodiment, the specific method for further proofreading the output sensitive political images can be: manually reviewing the output sensitive political images to further determine whether they meet the requirements for sensitive political images.

[0160] The technical principle of the above solution is as follows: output the politically sensitive images that are identified as such, perform further verification on the output politically sensitive images, and then intercept the politically sensitive images after the verification.

[0161] The technical effect of the above solution is that it performs further verification on images identified as sensitive political images, further confirms the identification results of political images, and intercepts sensitive political images to ensure the security of the dissemination of political images and the authenticity of information.

[0162] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for recognizing politically sensitive images based on semantic analysis filtering, characterized in that, include: Obtain the politically sensitive image to be identified; The politically sensitive images are preprocessed to obtain preprocessed images; Text extraction is performed on the preprocessed image to obtain the text information of the preprocessed image; The text information is subjected to semantic analysis and filtering, and the processing result is used as the recognition result of the political image. The text information is subjected to semantic analysis and filtering, and the processing result is used as the recognition result of the politically sensitive image, including: The text information is segmented to obtain word units of the text information; A first keyword extraction model is trained based on the first keyword in the existing political image text information. The word unit is input into the preset first keyword extraction model to obtain the first keyword set corresponding to the text information. The first analysis result is obtained by analyzing the first keyword set; wherein, the first keyword includes perspective expression words in the word unit; A second keyword extraction model is trained based on the second keywords in existing political image text information. The word units are input into the preset second keyword extraction model to obtain the second keyword set corresponding to the text information. The second keyword set is analyzed to obtain the second analysis result; wherein, the second keyword includes key expressions related to the political field in the word unit; Based on the first analysis result and the second analysis result, determine the semantic information corresponding to the text information; The semantic information is input into a preset political semantic analysis network to obtain the semantic analysis results of the semantic information; The semantic analysis results are input into a preset politically sensitive word tagging model, and the political sensitivity of the text information is determined based on the tagging results of the preset politically sensitive word tagging model. Text information with political sensitivity greater than a preset political sensitivity level is filtered out and identified as sensitive text information. The political images corresponding to the sensitive text information are identified as sensitive political images. The political images corresponding to text information with political sensitivity not greater than the preset political sensitivity level are identified as non-sensitive political images. The semantic analysis results are input into a preset politically sensitive word tagging model. Based on the tagging results of the preset politically sensitive word tagging model, the political sensitivity of the text information is determined, including: Construct a preset set of sensitive words based on existing sensitive words in politically sensitive image and text information; The semantic analysis results are input into a preset vocabulary analysis model to obtain the vocabulary set corresponding to the semantic analysis results; The vocabulary set is input into a preset political sensitive word labeling model. If the distance between the vocabulary set and the preset sensitive word set is not greater than a preset sensitive distance, then the vocabulary set contains sensitive words; if the distance between the vocabulary set and the preset sensitive word set is greater than the preset sensitive distance, then the vocabulary set does not contain sensitive words. Words in the vocabulary set containing sensitive words are matched with sensitive words in the preset sensitive word set. Words in the vocabulary set that match successfully are used as sensitive words in the text information, and the sensitive words are labeled. The political sensitivity of the text information is determined based on the percentage of the number of marked sensitive words to the number of words in the vocabulary set; The specific formula for determining the distance between the vocabulary set and the preset sensitive word set is: ; in, This indicates the distance between the vocabulary set and the preset sensitive word set. Represents a set of words, This represents the number of words in the vocabulary set. This represents a preset set of sensitive words. This indicates the number of words containing sensitive words in the preset sensitive word set. This represents the intersection of the vocabulary set and the preset sensitive word set. This represents the number of words in the intersection of the vocabulary set and the preset sensitive word set.

2. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 1, characterized in that, The politically sensitive images are preprocessed to obtain preprocessed images, including: Edge detection processing is performed on the politically sensitive image to obtain a first processed image; The first processed image is subjected to image noise reduction processing to obtain the second processed image; The second processed image is sharpened to obtain a third processed image, which is then used as a preprocessed image.

3. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 2, characterized in that, The first processed image is subjected to image noise reduction processing to obtain a second processed image, including: The first processed image is filtered to obtain a filtered image; The pixel values ​​of each pixel in the filtered image are obtained using an image pixel acquisition algorithm. The pixel value of a pixel is compared with a preset pixel boundary value. If the pixel value is not less than the preset pixel boundary value based on the comparison result, the pixel is determined to be located in a first image region. If the pixel value is less than the preset pixel boundary value based on the comparison result, the pixel is determined to be located in a second image region. A first scaling parameter corresponding to the first image region is determined based on a first preset processing parameter and a second preset processing parameter; a second scaling parameter corresponding to the second image region is determined based on a third preset processing parameter and a fourth preset processing parameter. The filtered image is transformed in the frequency domain to obtain a frequency-domain transformed image and the corresponding frequency-domain transformation coefficients; The frequency domain conversion coefficients are corrected according to the first scaling parameter and the second scaling parameter to obtain the frequency domain conversion correction coefficients; The frequency domain transformed image is subjected to inverse frequency domain transformation according to the frequency domain transformation correction coefficient to obtain an inverse frequency domain transformed image, which is then used as the second processed image.

4. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 1, characterized in that, Text extraction is performed on the preprocessed image to obtain the text information of the preprocessed image, including: A target text recognition network is constructed, and the preprocessed image is input into the target text recognition network for text detection to obtain the text region corresponding to the preprocessed image. Feature extraction is performed on the text region to obtain a text feature vector; The text feature vector is matched with a preset text feature vector in a preset text feature set to determine the text content; Stroke filtering is performed on the text content to obtain filtered text content, which is then used as the text information for the preprocessed image.

5. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 4, characterized in that, Perform stroke filtering on the text content to obtain filtered text content, including: Based on the characters included in the text content, several character regions are determined, and each character region includes one character; Several character regions are used as the first processing region; The area within the text region other than the first processing area is designated as the second processing area. Select any pixel in the first processing area as the pixel to be processed, and calculate the difference between the brightness value of the pixel to be processed and the brightness values ​​of each pixel in the second processing area to determine the first filter value. The second filter value is determined based on the gradient magnitude of each pixel in the second processing region from the pixel to be processed. Calculate the brightness weight value of each pixel in the second processing area for the pixel to be processed based on the first filter value and the second filter value; The brightness correction value of the pixel to be processed is determined based on the brightness weight value and the preset stroke filtering algorithm; the brightness value of the pixel to be processed is replaced with the brightness correction value; The above operations are performed on all pixels in the first processing area to complete the stroke filtering operation and obtain the filtered text content.

6. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 1, characterized in that, The analysis of the first keyword set yields the first analysis result, including: The analysis results of the first keyword set are obtained by analyzing the first keyword set of the text information. Based on the text information and the analysis results of the first keyword set, a sentence weighting graph corresponding to the text information is determined. The sentence weighting graph is then input into a pre-set first keyword set analysis convolutional neural network to obtain a first analysis result.

7. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 1, characterized in that, The analysis of the second keyword set yielded the following results: Lexical analysis is performed on the second keyword set, and the second analysis result is obtained based on the lexical analysis results.

8. The method for recognizing politically sensitive images based on semantic analysis filtering as described in claim 1, characterized in that, After performing semantic analysis and filtering on the text information and using the processing result as the recognition result of the politically sensitive image, the method further includes: The identification result identifies sensitive political images as politically sensitive images, and the output sensitive politically sensitive images are further verified; the verified sensitive politically sensitive images are then intercepted.

Citation Information

Patent Citations

  • Text enhancement method and device, text extraction method and device

    CN102831579A

  • Image identification method and device

    CN106529380A

  • Sensitive information detection method and device, training method and device, equipment and storage medium

    CN114021548A