A multilingual harmful information feature intelligent mining method based on deep learning
Through the combination of deep learning and genetic algorithms, intelligent mining of harmful information characteristics of multilinguals is achieved, the efficiency and accuracy of the recognition of harmful information in multilinguals in the existing technology is solved, and an efficient and interpretable harmful information recognition solution is provided.
Patent Information
- Application Number
- CN201911063979.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-04
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2039-11-04
AI Technical Summary
The existing harmful information recognition methods based on keyword and rule matching are costly to maintain, machine learning-based methods cannot be applied to multilinguals, and classification results are poorly interpretable, and the prior art is difficult to efficiently identify harmful information from multilinguals.
The intelligent mining method of multilingual harmful information features based on deep learning is adopted, and text features are reduced by RNSW method, and harmful information features are screened with CNN model and genetic algorithms are used to screen harmful information features to achieve language-independent harmful information recognition.
The number of model training parameters is reduced, the recognition speed and accuracy is improved, and it is suitable for large-scale text data, and the feature selection is highly accurate and the recognition results are interpretable.
Smart Images

Figure CN111626318B_ABST
Abstract
Description
Technical field:
[0001] The present invention relates to text analysis technology in the field of the Internet, and in particular to a method for identifying harmful text. The method is a multilingual harmful information feature intelligent mining method based on deep learning. Background technology:
[0002] In internet scenarios, there are two common methods for identifying harmful content: one based on keyword and rule matching, and the other based on machine learning. This method requires manual compilation of a harmful word dictionary, and sometimes the rules must be sufficiently complex to achieve good results. However, harmful words and phrases are constantly emerging online, and the update cycle is short. Maintaining the dictionary and designing new rules are very costly. Machine learning has been increasingly adopted in recent years. Its advantage is that it does not require technical personnel to have in-depth domain knowledge of harmful content or to manually build a large harmful word dictionary. Instead, it automatically extracts harmful words from online text by optimizing machine learning algorithms, improving the accuracy of harmful content identification.
[0003] In their patent application, "A Method for Identifying Harmful Information on Web Pages Based on Machine Learning" (patent application number: 201811302974.X), Zhang Jialiang et al. proposed a method for identifying harmful information on web pages based on machine learning. Through machine learning, model training, and text classification technology, the method classifies and identifies captured web pages. Based on the categories of the web page identification results, the method determines whether the web pages contain harmful information and further determines whether the website contains harmful information. This method is trained based on collected corpus data, and the trained model can only be used to identify text data in the corresponding language. Furthermore, the method cannot extract the characteristics of harmful information, and the interpretability of the classification results is relatively poor.
[0004] Hu Weiming et al. proposed a web page classification method based on multi-instance learning in their patent application, "A Method for Identifying Harmful Information and Classifying Web Pages Based on Multi-instance Learning" (patent application number: CN201410609728). By using the images and related text contained in the web page as examples in the web page package, the algorithm is more consistent with the actual distribution of web page content. It can also utilize the effective information of the web page to deeply explore the complementarity between image information and text information, ultimately achieving better results than classification using only single-modal information. This method requires images in the web page as auxiliary information for identification, but most online text does not have images, and some images may be irrelevant to the text, so this method is not convenient for use on large-scale text data.
[0005] To address these issues, this patent proposes a multilingual intelligent mining method for harmful information features based on deep learning. This method tokenizes samples from an annotated training dataset and constructs a candidate word list for each category using the language-independent text feature dimensionality reduction (RNSW) method. A unique one-hot encoding (one-hot encoding) is then assigned to each word, forming word-encoding pairs. This pairing is then used to map the training dataset into a vector space. A CNN model is then trained. The optimal trained model is then used to input candidate words to obtain weights for each word. Based on these weights, the initial range of harmful information features is determined, and a genetic algorithm is used to select the final number of harmful information feature words. This method can be used to mine harmful text features across various categories in various languages. Furthermore, by using the RNSW method for text feature dimensionality reduction and limiting candidate words to training samples in that language and category, the number of word vectors and parameters required for the training model is significantly reduced, resulting in faster training. The adaptive nature of the genetic algorithm automatically selects the optimal number of harmful information feature words, resulting in high feature selection accuracy and suitability for processing large-scale text data. Summary of the invention:
[0006] The purpose of the present invention is to provide a multilingual harmful information feature intelligent mining method based on deep learning. Through this general method of mining harmful information features that is independent of the specific language, the mined harmful information features in different languages can be used to identify harmful text data.
[0007] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0008] A multilingual harmful information feature intelligent mining method based on deep learning, as shown in the attached Figure 1 As shown, the following steps are included:
[0009] 1) Collect harmful information texts and harmless information texts in various languages and categories, and establish a data annotation set <s>, label the positive and negative sample data of harmful information text data in each language and category, where the positive sample is the harmful information text in this category and language, and the number of samples is N 正样本 , the negative sample is the harmless information text of this category in this language, and the number of samples is N 负样本 .
[0010] 2) Label the data set in step 1) <s>Text tokenization of positive and negative samples in various languages and categories.
[0011] 3) Select n candidate words for each category of each language in step 2) using the RNSW method, and establish a word pair set of word-ID for that category {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, where n is the number of word pairs in the word pair set of this category, W x Represents words or words after segmentation in various languages, ID x The ID of the word is represented by a one-hot encoding of a unique integer value in the set.
[0012] 4) Each sample data of each category of each language is divided into the word pair set of the language and category in step 3) {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, converted into the corresponding ID data vector X: {Vec1, Vec2, ... Vec m }.
[0013] 5) The number of words in each category of each language in step 4) is M max As the number of words in this category, the data vector X: {Vec1, Vec2, ... Vec m }The word vector dimension is less than M max Fill the front end with 0. According to whether each sample is a positive sample or a negative sample, set the category vector of the corresponding data: y:{y1, y2, ..., y m }, for the positive sample y of this category x is [1, 0], and the negative sample is y x is [0, 1].
[0014] 6) Divide the data vectors X and y of each category of each language in step 5) into training sets train_x, train_y and test sets dev_x, dev_y according to a certain ratio.
[0015] 7) According to the batch size of a certain value, input the train_x and train_y of step 6) into the following batches: Figure 4 The CNN neural network model shown is trained using the Adam optimizer and cross entropy loss function, and finally the softmax normalization classification is used to obtain the final classification result.
[0016] 8) The word pair set {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >} for each word W x Input into the final model trained and optimized in step 7) to obtain each word W x The score of this harmful category for this language is M x , M x As the weight of the word, sort the words from large to small according to the weight, and get a set of p words {W1, W2, ... W p }, then the word set is the harmful information feature of this category in this language selected by machine learning.
[0017] 9) Using genetic algorithm to process the harmful information features {W1, W2, ... W p } perform feature selection, select the optimal number of harmful information feature words, and form the final harmful information feature {W1, W2, ... W q} and weights {M1, M2, ..., M q }.
[0018] 10) Using the harmful information features {W1, W2, ... W q } and the corresponding weights {M1, M2, ..., M q }, determine whether the text is harmful information.
[0019] The above step 1) describes the process of collecting and labeling harmful information and harmless information and the data labeling set <s>The establishment process is the basis for mining harmful information features, including but not limited to the following languages: Chinese, English, Uyghur, Korean, Japanese, Arabic, German, and French.
[0020] The above step 2) describes the data annotation set <s>The process of word segmentation or tokenization of harmful information text and harmless information text in each language. There are different processing processes for different languages, such as the attached Figure 2 As shown, you can proceed as follows:
[0021] 2a) Determine the language of the text. If it is Chinese, Korean, or Japanese, go to step 2b); if it is English, French, or other Latin languages, go to step 2c); if it is Uyghur or Arabic, go to step 2d).
[0022] 2b) For languages like Chinese, Korean, and Japanese, word segmentation is performed, which involves breaking character sequences into word sequences and removing stop words and punctuation.
[0023] 2c) For Latin-based languages such as English and French, tokenize the sentences by breaking down the words according to the language rules, primarily using spaces and punctuation marks, and converting all uppercase letters to lowercase.
[0024] 2d) For Uyghur and Arabic scripts, tokenize the sentences and break down the words according to the language rules, primarily using spaces, Uyghur or Arabic punctuation, and parallel words for segmentation. For different spellings within the language, convert the words to the same spelling. For example, convert current Uyghur, Latin Uyghur, Cyrillic Uyghur, new Uyghur, and non-standard Latin Uyghur scripts to the current Uyghur spelling.
[0025] The above step 3) describes a language-independent method for reducing the dimensionality of text: the RNSW method. This method can select candidate words from each category of text in each language, establish a word pair set, and use this word pair set to perform feature dimensionality reduction on the original text. This process only establishes a word pair set in this category of this language. The number of words in the set is determined according to the specific situation of feature dimensionality reduction, including but not limited to 10,000, 100,000, and 1,000,000. The specific process of selecting candidate words is shown in the attached figure. Figure 3 As shown, you can proceed as follows:
[0026] 3a) Based on the negative samples of this language and category, build a dictionary of negative sample words dict 负样本 ={W1:V1, ..., W n :V n }, where W i For words, V i is the number of times the word appears in the negative sample, and n is the maximum number of words in the negative sample after step 2).
[0027] 3b) According to V i Sort the values from large to small, take the largest k words, and get the dict 负样本MAX ={W1:V1, ..., W k :V k }, where the value of k includes but is not limited to 100, 1000 and 10000. k Get the collection:
[0028] set(W 负样本MAX )={W1,W2,......W k } (1)
[0029] 3c) Based on the positive samples of this language and category, build a dictionary of words for the positive samples 正样本 ={W1:V1, ..., W m :V m }, where W x For words, V x is the number of times the word appears in the positive sample, and m is the maximum number of words in the positive sample after step 2). m Get the collection:
[0030] set(W 正样本 )={W1,W2,......W m } (2)
[0031] 3d) Perform set difference operation by formula (2) and formula (1) to obtain the candidate word set set (W 候选 ), where s is the number of words in the candidate word set:
[0032] set(W 候选 )=set(W 正样本 )-set(W 负样本MAX )={W1,W2,......W s } (3)
[0033] The above step 4) describes the process of vectorizing the sample data of each category in each language. This process only uses the word pair set of this category in this language to vectorize the positive and negative samples of this category in this language.
[0034] Step 5) above describes the process of expanding the vector dimension of the data vector X of each category in each language, which is based only on the number of words M in the largest sample of the category in the language. max The dimension is expanded by the number of words in this category in this language.
[0035] The above step 6) describes the process of dividing the training set and the test set. The division ratio of this process is set according to the effect of the specific implementation process. For example, it can be set to include but not limited to 10:1, where the training set is 10 parts and the test set is 1 part.
[0036] The model training process described in step 7) above can use, but is not limited to, batch sizes of 16, 32, and 64. Figure 4 The CNN neural network model shown is a CNN neural network model of a specific embodiment. In the specific implementation process, it is necessary to calculate the number of words M in each category of each language. max Adjust the input parameters of the CNN neural network during the specific implementation process. The above step 8) describes the process of obtaining the harmful information features of this language and category based on the trained model, where the harmful information features are only used to identify harmful information of this language and category. The value of p is manually calculated based on the word W that matches the language and category. x to determine the quantity.
[0037] Step 9) above describes the process of using a genetic algorithm to screen harmful information features. The harmful information features selected by the genetic algorithm are only used to select features for harmful information of this language and category. The genetic algorithm performs feature selection according to the following steps:
[0038] 9a) The p word sets {W1, W2, ..., W p The word group of} is taken as the total population, and the initial population is generated by random method to generate t individuals.
[0039] 9b) Use the data annotation set from step 1) <s>Samples or other larger external data corpus, calculate the set {W1, W2, ..., W p } with other words in the set, and a similar word set for each word is established based on the set similarity threshold.
[0040] 9c) Using the data annotation set from step 1) <s>The fitness of each feature word of the population is calculated using the following formula:
[0041] f(x)=α×(N 识别的正样本 -N 误识别的负样本 ) / (N 正样本 +N 负样本 )-β×t
[0042] where N 识别的正样本 N is the number of samples in the word set of each sample in the positive sample set that contains the feature word and similar words to the feature word, 误识别的负样本 is the number of samples in the word set of each sample in the negative sample set that contain the feature word and similar words to the feature word. α is a parameter used to control the contribution of the improvement of classification accuracy to the evaluation function, β is a parameter used to control the contribution of the reduction of the number of features to the evaluation function, t is the number of individuals in step 9a), N 正样本 is the number of harmful information text samples in step 1), N 负样本 is the number of harmless information text samples in step 1).
[0043] 9d) Calculating the probability proportional to the fitness, determining the father and mother, and generating each offspring sample by crossover and mutation of the father and mother
[0044] 9e) Calculate the difference in fitness function between the new and old individuals, accept the new individual according to the probability according to the Boltzmann criterion, and determine the new population
[0045] 9f) Algorithm Termination Condition: The algorithm terminates when the maximum number of generations has been reached, or when the fitness of individuals in consecutive generations changes very little, falling below a set threshold. If the algorithm termination condition is not met, repeat steps 9c) through 9e).
[0046] The above step 10) describes the process of using the harmful information feature to identify harmful information, wherein the harmful information feature and the corresponding weight are only used for identifying harmful information of this category in this language.
[0047] The present invention firstly proposes a language-independent RNSW method for text dimensionality reduction representation, which effectively reduces the number of parameters in model training, speeds up training, and improves the accuracy of model recognition; secondly, it adopts a deep learning method to realize the intelligent mining of harmful information features, and screens harmful information features through a genetic algorithm, making the harmful information category identification more accurate and the harmful information identification more interpretable. Description of the drawings:
[0048] Figure 1 This is a flowchart of the intelligent mining method of harmful information features based on deep learning.
[0049] Figure 2 This is a diagram of the process of word segmentation or tokenization of language samples according to the language.
[0050] Figure 3 This is a diagram of the process of selecting candidate words using the RNSW method.
[0051] Figure 4 This is a schematic diagram of the CNN network structure used in the present invention Specific implementation method:
[0052] The present invention will be further described below with reference to the accompanying drawings through embodiments, which however do not limit the scope of the present invention in any way.
[0053] The overall process of the multilingual harmful information feature intelligent mining method based on deep learning of the present invention is shown in the attached figure. Figure 1 As shown in the figure, taking the intelligent mining of harmful information features in a certain language as an example, it specifically includes:
[0054] 1) Collect harmful information texts and harmless information texts in various languages, including Chinese, and establish a data annotation set <s>, label the positive and negative sample data of harmful information text data, where the positive sample is the harmful information text of this category and language, and the number of samples is N 正样本 , the negative sample is the harmless information text of this category in this language, and the number of samples is N 负样本 .
[0055] 2) According to the attached Figure 2 When the language is determined to be a certain language, the word segmentation process of a certain language is executed to mark the data set. <s>The harmful information text and the harmless information text are segmented using, but not limited to, the Jieba segmentation tool.
[0056] 3) According to the attached Figure 3 The processing flow uses negative samples of a certain language to build a dictionary of negative sample words 负样本 ={W1:V1, ..., W n :V n }, where W i For words, V i is the number of times the word appears in the negative sample, and n is the maximum number of words in the negative sample after step 2).
[0057] 4) According to V i Sort the values from large to small, take the largest k words, and get the dict 负样本MAX ={W1:V1, ..., W k :V k }, where the value of k includes but is not limited to 100, 1000 and 10000. k Get the collection:
[0058] set(W 负样本MAX )={W1,W2,......W k } (1)
[0059] 5) Based on the positive samples of this language and category, build a dictionary of words for the positive samples 正样本 ={W1:V1, ..., W m :V m }, where W x For words, V x is the number of times the word appears in the positive sample, and m is the maximum number of words in the positive sample after step 2). m Get the collection:
[0060] set(W 正样本 )={W1,W2,......W m } (2)
[0061] 6) Perform set difference operation by formula (2) and formula (1) to obtain the candidate word set set (W 候选 ), where s is the number of words in the candidate word set:
[0062] set(W 候选 )=set(W 正样本 )-set(W 负样本MAX )={W1,W2,......W s } (3)
[0063] 7) According to step 6) generated candidate word set set (W 候选 ), establish a word pair set of harmful words-IDs in a certain language {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, where n is the number of word pairs in the word pair set of this category, W x Represents candidate words, ID x The ID of the word is represented by a one-hot encoding of a unique integer value in the set.
[0064] 8) Each sample data of a harmful class of a certain language is divided into the word pair set {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, converted into the corresponding ID data vector X: {Vec1, Vec2, ... Vec m }.
[0065] 9) The number of words in the largest sample in step 8) is M max As the number of harmful words in a language, the data vector X: {Vec1, Vec2, ... Vec m }The word vector dimension is less than M max Fill the front end with 0. According to whether each sample is a positive sample or a negative sample, set the harmful class vector of a certain language of the corresponding data: y:{y1,y2,……,y m }, for a positive sample y of a harmful class in a certain language x is [1, 0], and the negative sample is y x is [0, 1].
[0066] 10) Divide the data vectors X and y from step 9) into training sets train_x, train_y and test sets dev_x, dev_y according to a ratio of 10:1.
[0067] 11) According to the batch size of 32, input the train_x and train_y of step 10) into the following batches: Figure 4 The CNN neural network model shown in the figure is trained and learned using the Adam optimizer and cross entropy loss function, and finally the softmax normalization classification is used to obtain the final classification result.
[0068] 12) The word pair set {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >} for each word W x Input into the final model trained and optimized in step 11) to obtain each word W x The score of a language that is harmful is M x , M x As the weight of the word, sort the words from large to small according to the weight, and get a set of p words {W1, W2, ... W p }, then the word set is the harmful information features of a certain language class selected by machine learning.
[0069] 13) The word group of the p word set {W1, W2, ..., Wp} generated in step 12) above is used as the total population, and the initial population is randomly generated to generate t individuals.
[0070] 14) Use the data annotation set from step 1) <s>Samples or other larger external data corpus, calculate the set {W1, W2, ..., W p } with other words in the set, and a similar word set for each word is established based on the set similarity threshold.
[0071] 15) Using the data annotation set from step 1) <s>The fitness of each feature word of the population is calculated using the following formula:
[0072] f(x)=α×(N 识别的正样本 -N 误识别的负样本 ) / (N 正样本 +N 负样本 )-β×t
[0073] where N 识别的正样本 N is the number of samples in the word set of each sample in the positive sample set that contains the feature word and similar words to the feature word, 误识别的负样本 is the number of samples in the word set of each sample in the negative sample set that contain the feature word and similar words to the feature word. α is a parameter used to control the contribution of improving the classification accuracy to the evaluation function, and β is a parameter used to control the contribution of reducing the number of features to the evaluation function.
[0074] 16) Calculate the probability proportional to the fitness, determine the father and mother, and generate each offspring sample through crossover and mutation of the father and mother
[0075] 17) Calculate the difference in fitness function between the new and old individuals, accept the new individuals according to the probability according to the Boltzmann criterion, and determine the new population
[0076] 18) Algorithm Termination Condition: The algorithm terminates when the maximum number of generations has been reached, or when the fitness of individuals in consecutive generations changes very little, falling below a set threshold. If the algorithm termination condition is not met, repeat steps 15) to 17).
[0077] 19) After the algorithm terminates, the feature words in the last generation of the population are the selected optimal harmful information feature words, forming the final harmful information feature {W1, W2, ... W q} and weights {M1, M2, ..., M q }.
[0078] 20) Using the harmful information features {W1, W2, ... W q } and the corresponding weights {M1, M2, ..., M q }, determine whether the text is harmful information in a certain language.< / s> < / s> < / s> < / s> < / s> < / s> < / s> < / s> < / s> < / s>
Claims
1. A method for intelligently mining multilingual harmful information features based on deep learning, comprising the following steps: 1) Collect harmful information texts and harmless information texts in various languages and establish a data annotation set <s>, label the positive and negative sample data of harmful information text data in each language and category, where the positive sample is the harmful information text in this category and language, and the number of samples is N 正样本 , the negative sample is the harmless information text of this category and language, and the number of samples is N 负样本 ;< / s> <s> 2) Label the data set in step 1) <s> Tokenize harmful information text and harmless information text in each language, and then remove stop words and punctuation marks;< / s> <s> 3) Use the RNSW (Remove Negative Sample Words) method to select n candidate words for each category of each language in step 2) and establish a word pair set of word-ID for this category {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, where n is the number of word pairs in the word pair set of this category, W x Represents words or words after segmentation in various languages, ID x The ID of the word is represented by a one-hot encoding of a unique integer value in the set; 4) Each sample data of each category of each language in step 3) is divided into a word pair set of the language and category {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >}, converted into the corresponding ID data vector X: {Thing1,Thing2,…Thing m }; 5) The number of words in each category of each language in step 4) is M max As the number of words in this category, the data vector X: {Vec1, Vec2, ... Vec m }The word vector dimension is less than M max Fill the front end with 0; according to whether each sample is a positive sample or a negative sample, set the category vector of the corresponding data: y:{y1, y2, ..., y m }, for the positive sample y of this category x is [1, 0], and the negative sample is y x is [0, 1]; 6) Divide the data vectors X and y of each category of each language in step 5) into training sets train_x, train_y and test sets dev_x, dev_y according to a certain ratio; 7) According to a certain batch size, input the train_x and train_y of step 6) into the CNN neural network model for training and learning, using the Adam optimizer and the cross entropy loss function for training, and finally using softmax normalization to obtain the final classification results; 8) The word pair set {<W1,ID1> ,<W2,ID2> ,……, <W n , ID n >} for each word W x Input into the final model trained and optimized in step 7) to obtain each word W x The score of this harmful category for this language is M x , M x As the weight of the word, sort it from large to small according to the weight, and get a set of p words {W1, W2, ..., W p }, then the word set is the harmful information feature of this category in this language selected by machine learning; 9) Using genetic algorithm to process the harmful information features {W1, W2, ... W p } Perform feature selection to select the optimal number of harmful information feature words to form the final harmful information feature {W1, W2, ...W q} and weights {M1, M2, ..., M q }; 10) Using the harmful information features {W1, W2, ..., W q } and the corresponding weights {M1, M2, ..., M q }, determine whether the text is harmful information.
2. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1 is characterized in that: The process of collecting and labeling harmful information and harmless information and the data labeling set in step 1) <s> The establishment process is the basis for mining harmful information features, where harmful information in various languages includes but is not limited to the following languages: Chinese, English, Uyghur, Korean, Japanese, Arabic, German, and French.< / s> <s> 3. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1 is characterized in that: In step 2), the data annotation set <s> The process of word segmentation or tokenization of harmful information text and harmless information text in various languages; there are different processing processes for different languages, which can be carried out according to the following steps:< / s> <s> 2a) Determine the language of the text. If it is Chinese, Korean, or Japanese, proceed to step 2b); if it is English, French, or other Latin-based languages, proceed to step 2c); If the language is Uyghur or Arabic, go to step 2d); 2b) For languages like Chinese, Korean, and Japanese, word segmentation is performed, which involves breaking character sequences into word sequences and removing stop words and punctuation. 2c) For Latin-based languages such as English and French, tokenize the sentences by breaking down the words according to the language rules, primarily using spaces and punctuation marks, and converting all uppercase letters to lowercase. 2d) For Uyghur and Arabic, etc., tokenize the words contained in the sentences according to the language rules, mainly using spaces, Uyghur or Arabic punctuation marks, and parallel words for segmentation; for different spellings in the language, convert the text to the same spelling, and convert Latin Uyghur, Cyrillic Uyghur, New Uyghur, and non-standard Latin Uyghur to the current Uyghur spelling.
4. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1 is characterized in that: Step 3) describes a language-independent method for dimensionality reduction of text: the RNSW (Remove Negative Sample Words) method. This method can select candidate words from texts of each category in each language, establish a word pair set, and use the word pair set to perform feature dimensionality reduction on the original text. This process only establishes a word pair set in this category of this language. The number of words in the set is determined according to the specific situation of feature dimensionality reduction, including but not limited to 10,000, 100,000, and 1,000,000. The specific process of selecting candidate words is as follows: 3a) Based on the negative samples of this language and category, build a dictionary of negative sample words dict 负样本 ={W1:V1, ..., W n :V n }, where W i For words, V i is the number of times the word appears in the negative sample, and n is the maximum number of words in the negative sample after step 2); 3b) According to V i Sort the values from large to small, take the largest k words, and get the dict 负样本MAX ={W1:V1, ..., W k :V k }, where the value of k includes but is not limited to 100, 1000 and 10000; take W1 to W k Get the collection: set(W 负样本MAX )={W1,W2,......W k } (1); 3c) Based on the positive samples of this language and category, build a dictionary of words for the positive samples 正样本 ={W1:V1, ..., W m :V m }, where W x For words, V x is the number of times the word appears in the positive sample, m is the maximum number of words in the positive sample after step 2); take W1 to W m Get the collection: set(W 正样本 )={W1,W2,......W m } (2); 3d) Perform set difference operation by formula (2) and formula (1) to obtain the candidate word set set (W 候选 ), where s is the number of words in the candidate word set: set(W 候选 )=set(W 正样本 )-set(W 负样本MAX )={W1,W2,......W s } (3)。 5. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: The step 4) is a process of vectorizing the sample data of each category in each language. This process only uses the word pair set of this category in this language to vectorize the positive and negative samples of this category in this language.
6. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: The step 5) is a process of expanding the vector dimension of the data vector X of each category of each language. This process is based only on the number of words M of the largest sample of the category of the language. max The dimension is expanded as the number of words of this category in this language.
7. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: The step 6) is a process of dividing the training set and the test set. The division ratio of this process is set according to the effect of the specific implementation process. For example, it can be set but not limited to 10:1, where the training set is 10 parts and the test set is 1 part.
8. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: In the model training process of step 7), the batch size can be used but not limited to 16, 32, 64, according to the number of words M in each category of each language. max Adjust the input parameters of the CNN neural network.
9. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: The step 8) is a process of obtaining the harmful information features of the language and category based on the trained model, wherein the harmful information features are only used for identifying harmful information of the language and category.
10. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: In step 9), the genetic algorithm is used to screen harmful information features, wherein the harmful information features selected by the genetic algorithm are only used for feature selection of harmful information of this language and category. The feature selection process of the genetic algorithm is performed according to the following steps: 9a) The p word sets {W1, W2, ..., W p The word group of} is taken as the total population, and the initial population is generated by random method to generate t individuals. 9b) Use the data annotation set from step 1) <s>Samples or other larger external data corpus, calculate the set {W1, W2, ..., W p } with other words in the set, and establish a similar word set for each word based on the set similarity threshold;< / s> <s> 9c) Using the data annotation set from step 1) <s> The fitness of each feature word of the population is calculated using the following formula:< / s> <s> f(x)=α×(N 识别的正样本 -N 误识别的负样本 ) / (N 正样本 +N 负样本 )-β×t where N 识别的正样本 N is the number of samples in the word set of each sample in the positive sample set that contains the feature word and similar words to the feature word, 误识别的负样本 is the number of samples in the word set of each sample in the negative sample set that contains the feature word and the similar words of the feature word; α is a parameter used to control the contribution of the improvement of classification accuracy to the evaluation function, β is a parameter used to control the contribution of the reduction of the number of features to the evaluation function, t is the number of individuals in step 9a), N 正样本 is the number of harmful information text samples in step 1), N 负样本 is the number of harmless information text samples in step 1); 9d) calculating a probability proportional to the fitness, determining the sire and the dam, and generating each offspring sample by crossover and mutation of the sire and the dam; 9e) Calculate the fitness function difference between the new and old individuals, accept the new individuals according to the probability according to the Boltzmann criterion, and determine the new population; 9f) Algorithm termination condition: The algorithm terminates when the operation reaches the specified maximum number of generations, or the fitness of individuals in consecutive generations changes very little and is less than the set threshold; if the algorithm termination condition is not met, repeat the iterations of steps 9c) to 9e).
11. The multilingual harmful information feature intelligent mining method based on deep learning as claimed in claim 1, characterized in that: The step 10) is a process of using the harmful information feature to identify harmful information, wherein the harmful information feature and the corresponding weight are only used for identifying harmful information of this category in this language. < / s> < / s> < / s> < / s> < / s> < / s>
Citation Information
Patent Citations
Harmful information identification and web page classification method based on multi-instance learning
CN104361059A
A webpage harmful information identification method based on machine learning
CN109710825A
Sensitive data dynamic identification method based on data mining
CN102012985A
A Chinese comment emotion analysis method based on a GRU neural network
CN109165387A