A multimodal banned word detection method and system

Through the combination of multi-dimensional character-word frequency vector, emotional tendency point mutual information algorithm and neural network model, the problem of misjudgment of banned words caused by the polysemicity of Chinese vocabulary is solved, the accuracy and precision of banned word detection are improved, and misjudgments are reduced. Condition.

CN118536506BActive Publication Date: 2024-10-29XIAMEN ZHONGLIAN CENTURY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411010651.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-29
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

In multi-modal prohibited word detection, the multiple meanings of Chinese words and the difficulty of contextual understanding increase, resulting in a decrease in the accuracy of prohibited word recognition and frequent misjudgments. In particular, the complexity of vocabulary meanings in different contexts makes the detection of prohibited words incorrect. High judgment rate.

Method used

Multi-dimensional character-word frequency vectors, emotional tendency point mutual information algorithms, positivity and negativity judgment functions, banned feature factors, character re-confirmation feature indexes and TF-IDF values ​​combined with clustering algorithms are used to construct non-banned judgment factors for banned words, and The neural network model is used for detection and the contextual semantic relationship of the text data is combined to improve the accuracy of banned words.

Benefits of technology

Through the combination of emotional tendency point mutual information algorithm and neural network model, the accuracy of identification of prohibited words is improved, misjudgments are reduced, and prohibited word detection can accurately understand the ambiguity and contextual relationship of words, improving the accuracy of detection. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536506B_ABST
    Figure CN118536506B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of natural language processing, and in particular to a multimodal banned word detection method and system, the method comprising: extracting images, voices and text data in an advertising video, obtaining each banned word in a banned word library, obtaining a word segmentation result set of text data, constructing a multidimensional character-word frequency vector of each character of each banned word in the banned word library, obtaining a positive judgment function and a negative judgment function of a new vocabulary of each character in each banned word in the banned word library, determining a positive index and a negative index of each character of each banned word in the banned word library, obtaining a character reconfirmation feature index of each character of each banned word in the banned word library, obtaining a non-banned judgment factor of each banned word in the banned word library in the text data, and completing multimodal banned word detection in an advertising video in combination with a neural network model. The present invention aims to improve the accuracy of banned word detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a multimodal banned word detection method and system. Background Art

[0002] With the rapid development of social media and online platforms, more and more businesses use social media or online platforms for marketing and advertising. In order to avoid the advertisements containing bad, false, fraudulent or negative content, it is necessary to detect banned words in advertising videos, that is, to use computer technology to analyze and identify the text, voice and images in the advertising videos, and perform multimodal banned word detection.

[0003] However, in the face of contextual understanding and the diversity of Chinese vocabulary in multimodal illegal word detection, the rich information, polysemy and ambiguity in the context increase the difficulty of accurately understanding the meaning of specific words, and the diversity of Chinese expressions makes the identification of banned words more complicated. Due to the polysemy of words, that is, a word may have different meanings in different contexts, and these words are judged as illegal words when expressing one of the meanings of the word, so that this word is added to the banned word library, but when the word expresses other meanings, it does not violate the relevant regulations of the management platform, so that the compliant content in the advertising video is incorrectly marked, the accuracy of banned word detection is reduced, and it causes trouble to users. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a multimodal banned word detection method and system, and the technical solutions adopted are as follows:

[0005] In a first aspect, an embodiment of the present invention provides a multimodal banned word detection method, the method comprising the following steps:

[0006] Extract text data from images and voices, and obtain banned words from a banned word library;

[0007] Segmenting the text data to obtain a segmentation result set; obtaining a multidimensional character-word frequency vector of each character of each banned word in the banned word library according to the number of new words formed by each character of each banned word in the segmentation result set and the occurrence frequency of the new words in the text data;

[0008] Determining a positivity judgment function and a negativity judgment function of the new vocabulary based on the sentiment characteristics of the new vocabulary;

[0009] Determining the positivity index and the negativity index of each character of each banned word in the banned word library based on the distribution of the function value of the positivity judgment function and the function value of the negativity judgment function;

[0010] Determining the prohibited characteristic factor of each character of each prohibited word in the prohibited word library based on the occurrence frequency of prohibited words and non-prohibited words in the new vocabulary;

[0011] According to the difference between the positive index and the negative index of each character, combined with the prohibited characteristic factor, the character reconfirmation characteristic index of each character of each prohibited word in the prohibited word library is obtained;

[0012] According to the contextual semantic relationship of each banned word in the banned word library in the text data, combined with the character reconfirmation feature index, a non-banned determination factor of each banned word in the banned word library in the text data is obtained;

[0013] The non-prohibited word determination factor and the neural network model are combined to complete the detection of prohibited words in text data.

[0014] Preferably, the multi-dimensional character-frequency vector of each character of each banned word in the banned word library includes:

[0015] The number is used as the length of the multi-dimensional character-word frequency vector, and the occurrence frequency of the new vocabulary in the text data is used as the element in the multi-dimensional character-word frequency vector.

[0016] Preferably, the positivity judgment function is to calculate the PMI value of each new vocabulary formed by each character in each banned word in the banned word library using the sentiment tendency point mutual information algorithm. If the PMI value is greater than or equal to 0, the positivity judgment function value of the corresponding vocabulary is the PMI value; otherwise, the positivity judgment function value of the corresponding vocabulary is 0.

[0017] Preferably, the negativity judgment function is such that if the PMI value is less than 0, the negativity judgment function value of the corresponding word is the opposite of the PMI value; otherwise, the negativity judgment function value of the corresponding word is 0.

[0018] Preferably, the positivity index and negativity index are respectively the average values ​​of the positivity judgment function values ​​and negativity judgment function values ​​of all non-banned words in the new vocabulary formed by each character of each banned word in the banned word library.

[0019] Preferably, the forbidden characteristic factor is the sum of the occurrence frequencies of all banned words in a new vocabulary formed by each character of each banned word in the banned word library, recorded as a first sum, and the sum of the occurrence frequencies of all non-banned words, recorded as a second sum, calculating the sum of the second sum and a preset adjustment parameter greater than 0, and taking the ratio of the first sum to the sum as the forbidden characteristic factor of each character of each banned word in the banned word library.

[0020] Preferably, the character reconfirmation feature index of each character of each banned word in the banned word library includes:

[0021] The difference between the positivity index and the negativity index of each character is calculated, the prohibited characteristic factor is used as the exponent of an exponential function with a natural constant as the base, and the product of the calculation result of the exponential function and the difference is used as the character reconfirmation characteristic index of each character of each prohibited word in the prohibited word library.

[0022] Preferably, the non-banned determination factor of each banned word in the banned word library in the text data includes:

[0023] Using a clustering algorithm to obtain clusters from the TF-IDF values ​​of all words in the word segmentation result set, composing the feature vectors of each cluster with the TF-IDF values ​​of all words in each cluster, calculating the cumulative sum of the character reconfirmation feature indexes of all characters of each banned word in the banned word library, calculating the similarity and metric distance between the feature vectors of the cluster to which the banned word belongs and other clusters, and calculating the ratio of the similarity to the metric distance, which is recorded as a first ratio;

[0024] Calculate the absolute value of the difference between the mean TF-IDF values ​​of the cluster to which the banned word belongs and other clusters, use the opposite of the absolute value of the difference as the exponent of an exponential function with a natural constant as the base, record it as a first exponential function, calculate the product of a calculation result of the first exponential function and the first ratio, record it as a first product, calculate the addition result of the first products of the cluster to which the banned word belongs and all other clusters, and use the product of the cumulative sum and the addition result as a non-banned determination factor of the banned word in the text data.

[0025] Preferably, the detection of banned words in text data by combining the non-banned determination factor and the neural network model includes:

[0026] The word embedding algorithm is used to obtain the word vectors of all text data as the input of the neural network model. The non-banned judgment factor of each banned word in the banned word library is used as the weight of the corresponding word vector. The output of the neural network model is the banned word detection result of the text data.

[0027] In a second aspect, an embodiment of the present invention further provides a multimodal banned word detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.

[0028] The present invention has at least the following beneficial effects:

[0029] The present invention uses a sentiment tendency point mutual information algorithm to judge the positive and negative characteristics of new words composed of each character in the banned word in the text data, reflecting the sentiment characteristics of the words, so that the sentiment tendency of the words is combined in the banned word detection to improve the accuracy of the banned word recognition expressing negative emotions; then, combined with the probability of forming banned words and non-banned words in the new words composed of each character in the banned word in the text data, the character reconfirmation feature index of each character of the banned word is constructed; the polysemy of each character in the banned word is reflected, so that the banned word integrates the semantic features; secondly, the probability of forming banned words and non-banned words in the new words composed of each character in the banned word in the text data is combined to form a character reconfirmation feature index of each character of the banned word ... secondly, the probability of forming banned words and non-banned words in the new words composed of each character in the banned word in the text data is combined to form a character reconfirmation feature index of each character of the banned word; secondly, the probability of forming banned words and non-banned words in the new words composed of each character in the banned word in the text data is combined to form a character reconfirmation feature index of each character of the banned word; secondly, the probability of forming banned words and non-banned words in the new words composed of each character in the text data is combined to form a character reconfirmation feature index of each character of the banned word; secondly, the probability of forming banned words and non-ban The TF-IDF value of the new vocabulary formed in the data is combined with the clustering algorithm to obtain the non-banned judgment factor of each banned word in the banned word library in the text data, and the contextual semantic features of the banned words in the text data and the correlation between words are analyzed. Finally, the banned words in the text data are detected in combination with the neural network model, which solves the problem of misjudgment of banned words due to the polysemy of Chinese words. When detecting banned words, the accurate meaning of the banned words in the text can be determined according to the polysemy of the banned words and the contextual relationship, which improves the accuracy of banned word detection and reduces the misjudgment of banned words. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A flowchart of a multimodal banned word detection method provided by an embodiment of the present invention;

[0032] Figure 2 Build a flow chart for the banned word detection metric. DETAILED DESCRIPTION

[0033] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a multimodal banned word detection method and system proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0035] The following is a detailed description of a multimodal banned word detection method and system provided by the present invention in conjunction with the accompanying drawings.

[0036] See also Figure 1 , which shows a flowchart of a multimodal banned word detection method provided by an embodiment of the present invention, the method comprising the following steps:

[0037] Step S001, extracting text data from images and voices of an advertisement video, and obtaining each banned word in a banned word library.

[0038] As an embodiment of the present application, each frame of video images, voice, and text related to the advertising video is obtained on an open source website, and a multi-threaded reading method is used to perform multimodal processing on the various types of advertising data read, and the advertising video is framed into images to be detected, and the framed images are encoded. The same task uses different character strings with the same ID. For each frame of video image, an optical character recognition algorithm is used to convert the text in the image into text data. For voice data, the Tansformer voice conversion model is used to convert the voice data into text data. This embodiment analyzes all the obtained text data and detects banned words in the text data. In addition, this embodiment also obtains a banned word library from an open source website, and the banned word library contains various banned words. The optical character recognition algorithm and the Tansformer voice conversion model are both existing well-known technologies, and this embodiment will not be described in detail here.

[0039] Step S002, pre-processing the text data to obtain a multi-dimensional character-frequency vector of each character of each banned word in the banned word library.

[0040] Specifically, this embodiment extracts text data from images, voices, and texts, obtains each banned word in a banned word library, obtains a word segmentation result set of text data, constructs a multi-dimensional character-word frequency vector of each character of each banned word in the banned word library, obtains a positive judgment function and a negative judgment function of a new vocabulary for each character in each banned word in the banned word library, determines a positive index and a negative index for each character of each banned word in the banned word library, obtains a character reconfirmation feature index for each character of each banned word in the banned word library, obtains a non-banned judgment factor of each banned word in the banned word library in the text data, and completes the detection of banned words in the text data in combination with a neural network model. The specific banned word detection index construction flow chart is shown in FIG. Figure 2 The construction process of the non-banned determination factor of each banned word in the banned word library in the text data is specifically as follows:

[0041] For all the text data obtained, this embodiment uses regular expressions based on punctuation rules to divide the text data into sentences. Regular expressions are existing well-known technologies and are not described in detail in this embodiment. The implementer can choose other algorithms to divide the text data into sentences, and this embodiment does not limit this.

[0042] After the sentences are divided, taking the ith sentence as an example, a multi-matching word segmentation model is constructed. The multi-matching word segmentation model uses a word segmentation algorithm based on a conditional random field (CRF), a word segmentation algorithm based on a hidden Markov model (HMM), and a word segmentation algorithm based on an n-gram. The ith sentence is taken as input, and the ith sentence is segmented using a CRF model to obtain a first word segmentation result. The ith sentence is segmented using an HMM model to obtain a second word segmentation result. The ith sentence is segmented using an n-gram model to obtain a third word segmentation result. The three word segmentation results are counted, and the word segmentation results are saved after deduplication to ensure that the saved word segmentation results do not contain repeated word segmentation results. For all text data, all the saved word segmentation results are taken as a word segmentation result set. Among them, the word segmentation algorithm based on a conditional random field (CRF), the word segmentation algorithm based on a hidden Markov model (HMM), and the word segmentation algorithm based on an n-gram are all existing well-known technologies, and this embodiment will not be described in detail here.

[0043] For each banned word in the banned word library, the banned word is split into characters, and the number of new words formed by each character in the word segmentation result set and the frequency of occurrence of the new words in the text data are counted, and each occurrence frequency is used as each element in the multidimensional character-word frequency vector; for example, there is a banned word "chapter" in the banned word library, then "chapter" is split into the character "chapter" and the character "section", and all words with the character "chapter" in the vocabulary of the word segmentation result set are traversed, and the frequency of occurrence of each word with the character "chapter" in the word segmentation result set is counted. For example, the words with the character "chapter" in the word segmentation result set are "article" and "charter", the frequency of occurrence of "article" in the word segmentation result set is 6, and the frequency of occurrence of "charter" in the word segmentation result set is 7, then the multidimensional character-word frequency vector of the banned word "chapter" in the banned word library is [6,7].

[0044] Step S003, obtaining a character reconfirmation feature index of each character of each banned word in the banned word library according to the multi-dimensional character-word frequency vector and the sentiment features of the words in the word segmentation result set and the association features between words.

[0045] For each new word formed by each character of the banned word in the word segmentation result set, the sentiment tendency point mutual information of each new word is calculated using the sentiment tendency point mutual information (SO-PMI) algorithm to obtain the PMI value of each new word, thereby constructing the character reconfirmation feature index of each character of the banned word:

[0046] First, determine the positive judgment function and negative judgment function of each non-banned word in the new vocabulary formed by each character of the banned word, specifically:

[0047] ;

[0048] ;

[0049] in, Indicates prohibited words No. The first character in the new vocabulary The positive judgment function of non-banned words, Indicates prohibited words No. The first character in the new vocabulary The negativity judgment function of non-banned words, Indicates prohibited words No. The first character in the new vocabulary The PMI value of non-banned words.

[0050] Secondly, the positivity index and negativity index of each character of the banned word are determined according to the positivity judgment function and the negativity judgment function, and the expression is:

[0051] ;

[0052] ;

[0053] In the formula, Indicates prohibited words No. The positivity index of the characters, Indicates prohibited words No. The negativity index of the characters, Indicates prohibited words No. The number of banned words in the new vocabulary consisting of characters, Indicates prohibited words No. The number of new words formed by characters.

[0054] Finally, the prohibited feature factor of each character of the prohibited word is obtained, and the character reconfirmation feature index of each character of the prohibited word is obtained, and the expression is:

[0055] ;

[0056] ;

[0057] In the formula, Indicates prohibited words No. The character reconfirmation feature index of characters, Indicates prohibited words No. Characters of prohibited characteristic factors, Indicates prohibited words No. The first character in the new vocabulary The frequency of occurrence of banned words, Indicates prohibited words No. The first character in the new vocabulary The frequency of occurrence of non-banned words, To preset adjustment parameters greater than 0, avoid the denominator being 0. is a natural constant. , the implementer can set it according to the actual situation, and this embodiment does not limit it. Denoted as the first sum, Recorded as the second sum.

[0058] Character Reconfirmation Feature Index The sentiment characteristics and the polysemy of the words composed of characters reflect the reconfirmation of the prohibited meaning of the characters. and Make positive and negative judgments on the word composition of characters, and combine the mutual information algorithm of sentiment tendency points. The emotional characteristics of the word are determined by the degree of association between the word composed of characters and the positive benchmark word and the negative benchmark word. When it is greater than or equal to 0, the word is judged as a positive word, and The larger the value of represents, the greater the possibility that the word is a positive word. Similarly, when When it is less than 0, the word is judged as a negative word, and The smaller the value of, the greater the possibility that the word is a negative word; pass Only positive words are calculated specifically, and the average positive probability of positive words is calculated. Similarly, pass Only negative words are calculated specifically, and the average negative probability of negative words is calculated; the difference between the two Represents the positive judgment possibility of the word composed of characters. Greater than 0 and When the value is larger, the more words composed of the representative characters are positive words. At this time, the representative characters are more likely to have non-prohibited meanings in the banned words composed of them, that is, the banned words composed of the characters may have multiple meanings. Less than 0 and The smaller the value, the more negative words are formed by the representative characters. At this time, it is less likely that the representative characters have non-prohibited meanings in the banned words they form, and the banned words formed by the representative characters are less likely to have multiple meanings.

[0059] The prohibited features of characters are determined by the ratio of the probability of prohibited words composed of characters to the probability of non-prohibited words composed of characters. The larger the value, the more prohibited the character is in the article or comment, and the lower the non-prohibited polysemy of the prohibited words composed of the character. The smaller it is, the banned words detected are determined by the banned features of the characters and the positivity and negativity of the characters that make up the vocabulary, and the banned features are reassigned.

[0060] Step S004, according to the contextual semantic relationship of each banned word in the banned word library in the text data, combined with the character re-confirmation feature index, obtain the non-banned determination factor of each banned word in the banned word library in the text data.

[0061] For all words in the word segmentation result set, the TF-IDF (term frequency-inverse document frequency) algorithm is used to obtain the TF-IDF value of each word. The TF-IDF values ​​of all words are used as the input of the K-means clustering algorithm to cluster all words to obtain clusters. In this embodiment, K=3, and the implementer can set it according to the actual situation. This embodiment is not limited here. That is, 3 clusters are obtained, and the TF-IDF values ​​of all words in each cluster are arranged in ascending order to form the feature vectors of each cluster. The K-means clustering algorithm and the TF-IDF (term frequency-inverse document frequency) algorithm are both existing well-known technologies. This embodiment will not be described in detail here, and the implementer can choose other clustering algorithms according to the actual situation. This embodiment is not limited here. The non-prohibited judgment factor of each banned word in the banned word library is thus constructed, and the expression is:

[0062] ;

[0063] In the formula, is the non-banned decision factor of the banned word p in the text data, Prohibited words No. The character reconfirmation feature index of characters, Prohibited words The DTW distance between the feature vectors of cluster c and cluster A, Prohibited words The cosine similarity between the feature vectors of cluster c and cluster A, and Prohibited words The average of all TF-IDF values ​​in cluster c and cluster A, Q is the number of characters contained in the banned word p, is a natural constant, is the number of clusters. The value of is 3. Recorded as the first ratio, Denoted as the first exponential function, Recorded as the first product.

[0064] pass For banned words The interval weight between cluster c and cluster A, reflects the correlation between cluster c and cluster A based on TF-IDF feature vectors, while The cosine similarity is used to determine the correlation between cluster c and cluster A based on the TF-IDF feature vector, and and Inversely proportional, when The larger the value, the worse the correlation. The smaller the correlation between cluster c and cluster A based on TF-IDF value, the smaller the semantic similarity between cluster c and cluster A. By clustering cluster c and cluster A based on the average difference within, it reflects the contextual difference between the banned words and the other dissimilar words. When the value is larger, it means that there are semantic differences between the words in cluster c and cluster A, the distribution of words with different semantics in the text data is more extreme, and the two different semantic relationships have more incoherent contextual collusion. The smaller; finally The introduction of polysemy represented by characters can further constrain the non-prohibited judgment of banned words, that is, the greater the polysemy of a banned word, the more likely it is that the banned word has a non-prohibited meaning.

[0065] Step S005, based on the non-banned determination factor of each banned word in the banned word library, a neural network model is used to complete the detection of banned words in the text data.

[0066] Finally, for the detection of banned words in advertising videos, the present application adopts an RNN recurrent neural network model, and uses a word embedding algorithm to obtain word vectors for all text data in this embodiment, taking each sentence as a unit as the input of the RNN recurrent neural network model, and using the non-banned judgment factor of each banned word in the banned word library as the weight of the corresponding word vector in the RNN recurrent neural network model. The output of the RNN recurrent neural network model is the detection result of banned words in the text data, completing the preliminary screening of multimodal banned words, wherein the RNN recurrent neural network model and the training process of the RNN recurrent neural network model are existing public known technologies, and this embodiment will not be described in detail here.

[0067] The sentences in which banned words are detected are aggregated into a preliminary screening database as preliminary screening results of the ambiguity of banned words.

[0068] Based on the same inventive concept as the above method, an embodiment of the present invention also provides a multimodal banned word detection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned multimodal banned word detection methods are implemented.

[0069] In summary, the embodiment of the present invention analyzes the banned words in the advertising video, and uses the emotional tendency point mutual information algorithm to determine the positive and negative characteristics of the new vocabulary composed of each character in the banned word in the text data, which reflects the emotional characteristics of the vocabulary, so that the emotional tendency of the vocabulary is combined during the banned word detection to improve the accuracy of the recognition of banned words expressing negative emotions; then, combined with the probability of forming banned words and non-banned words in the new vocabulary composed of each character in the banned word in the text data, the character reconfirmation feature index of each character of the banned word is constructed; the polysemy of each character in the banned word is reflected, so that the banned word integrates the semantic features ; Secondly, the TF-IDF value of the new vocabulary composed of each character in the banned word in the text data is used, combined with the clustering algorithm, to obtain the non-banned judgment factor of each banned word in the banned word library in the text data, and the contextual semantic features of the banned words in the text data, as well as the correlation between words, are analyzed. Finally, the banned words in the text data are detected in combination with the neural network model, which solves the problem of misjudgment of banned words due to the polysemy of Chinese words, so that the accurate meaning of the banned words in the text can be determined according to the polysemy of the banned words and the contextual relationship during the banned word detection, thereby enhancing the accuracy of banned word detection.

[0070] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0071] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A multimodal banned word detection method, characterized in that: The method comprises the following steps: Extract text data from images and voices, and obtain banned words from a banned word library; Segmenting the text data to obtain a segmentation result set; obtaining a multidimensional character-word frequency vector of each character of each banned word in the banned word library according to the number of new words formed by each character of each banned word in the segmentation result set and the occurrence frequency of the new words in the text data; Determining a positivity judgment function and a negativity judgment function of the new vocabulary based on the sentiment characteristics of the new vocabulary; Determining the positivity index and the negativity index of each character of each banned word in the banned word library based on the distribution of the function value of the positivity judgment function and the function value of the negativity judgment function; Determining the prohibited characteristic factor of each character of each prohibited word in the prohibited word library based on the occurrence frequency of prohibited words and non-prohibited words in the new vocabulary; According to the difference between the positive index and the negative index of each character, combined with the prohibited characteristic factor, the character reconfirmation characteristic index of each character of each prohibited word in the prohibited word library is obtained; According to the contextual semantic relationship of each banned word in the banned word library in the text data, combined with the character reconfirmation feature index, a non-banned determination factor of each banned word in the banned word library in the text data is obtained; Combining the non-prohibited determination factor and the neural network model to complete the detection of prohibited words in the text data; The multi-dimensional character-word frequency vector of each character of each banned word in the banned word library includes: Taking the number as the length of the multidimensional character-word frequency vector, and taking the frequency of occurrence of the new vocabulary in the text data as the element in the multidimensional character-word frequency vector; The positivity judgment function is to calculate the PMI value of each new word formed by each character in each banned word in the banned word library by using the sentiment tendency point mutual information algorithm. If the PMI value is greater than or equal to 0, the positivity judgment function value of the corresponding word is the PMI value, otherwise, the positivity judgment function value of the corresponding word is 0; The negativity judgment function is that if the PMI value is less than 0, the negativity judgment function value of the corresponding word is the opposite of the PMI value, otherwise, the negativity judgment function value of the corresponding word is 0; The positivity index and negativity index are respectively the average values ​​of the positivity judgment function values ​​and negativity judgment function values ​​of all non-banned words in the new vocabulary formed by each character of each banned word in the banned word library; The prohibited characteristic factor is the sum of the occurrence frequencies of all prohibited words in a new vocabulary formed by each character of each prohibited word in the prohibited word library, recorded as a first sum, and the sum of the occurrence frequencies of all non-prohibited words, recorded as a second sum, calculating the sum of the second sum and a preset adjustment parameter greater than 0, and taking the ratio of the first sum to the sum as the prohibited characteristic factor of each character of each prohibited word in the prohibited word library; The character reconfirmation feature index of each character of each banned word in the banned word library includes: Calculating the difference between the positivity index and the negativity index of each character, taking the prohibited characteristic factor as the exponent of an exponential function with a natural constant as the base, and taking the product of the calculation result of the exponential function and the difference as the character reconfirmation characteristic index of each character of each prohibited word in the prohibited word library; The non-prohibited determination factors of each prohibited word in the prohibited word library in the text data include: Using a clustering algorithm to obtain clusters from the TF-IDF values ​​of all words in the word segmentation result set, composing the feature vectors of each cluster with the TF-IDF values ​​of all words in each cluster, calculating the cumulative sum of the character reconfirmation feature indexes of all characters of each banned word in the banned word library, calculating the similarity and metric distance between the feature vectors of the cluster to which the banned word belongs and other clusters, and calculating the ratio of the similarity to the metric distance, which is recorded as a first ratio; Calculate the absolute value of the difference between the mean TF-IDF values ​​of the cluster to which the banned word belongs and other clusters, use the opposite of the absolute value of the difference as the exponent of an exponential function with a natural constant as the base, record it as a first exponential function, calculate the product of the calculation result of the first exponential function and the first ratio, record it as a first product, calculate the addition result of the first products of the cluster to which the banned word belongs and all other clusters, and use the product of the cumulative sum and the addition result as a non-banned determination factor of the banned word in the text data; The method of combining the non-prohibited determination factor and the neural network model to complete the detection of prohibited words in text data includes: The word embedding algorithm is used to obtain the word vectors of all text data as the input of the neural network model. The non-banned judgment factor of each banned word in the banned word library is used as the weight of the corresponding word vector. The output of the neural network model is the banned word detection result of the text data.

2. A multimodal banned word detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to claim 1 are implemented.

Citation Information

Patent Citations

  • Filtering method and system for bad literal information in text

    CN105468584A

  • Sensitive word recognition method, device and equipment

    CN111368535A