Method, device, computer equipment and storage medium for predicting blocked sensitive words
By building a variety of preset sensitive word prediction models to predict the blocked sensitive words in the public sensitive word library, the problems of low efficiency and low accuracy of manual screening are solved, automatic screening and accurate screening of blocked sensitive words are achieved, and labor costs are reduced.
Patent Information
- Application Number
- CN202011434908.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-10
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2040-12-10
AI Technical Summary
In the prior art, when a business company maintains a sensitive word list, manual screening and blocking of sensitive words is greatly affected by human factors, resulting in low screening efficiency and accuracy, and increasing the workload of business personnel.
Construct preset sensitive word prediction models, including support vector machines, gradient boosting trees, and proximity classification models. Use these models to predict sensitive words in the public sensitive word library, and comprehensively consider the output results of multiple models to determine whether sensitive words should be blocked.
It realizes automatic screening of sensitive blocked words, improves screening efficiency and accuracy, reduces the workload of business personnel, and reduces labor costs.
Smart Images

Figure CN112528636B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment and storage medium for predicting blocked sensitive words. Background Art
[0002] Operators usually have their own lists of blocked sensitive words. When a text message sent by a user contains a blocked sensitive word, the number will be blocked. The user needs to go to the business hall to handle the unblocking service before the number can continue to be used. This is very inconvenient for the user. Therefore, relevant business companies need to maintain their own sensitive word lists, make their own sensitive word lists as close as possible to the operator's blocked sensitive word lists, and use the sensitive word lists to issue early warnings for text messages sent within the company to avoid causing internal company numbers to be blocked.
[0003] Currently, when companies maintain their own sensitive word lists, their staff typically screen and block sensitive words from publicly available sensitive word libraries based on historically blocked SMS data. However, this manual screening process is subject to significant subjective influence and can easily lead to missed or incorrect selections. This results in low screening efficiency and accuracy, significantly increasing the workload for staff. Summary of the Invention
[0004] The present invention provides a method, device, computer equipment and storage medium for predicting blocked sensitive words, which are mainly capable of improving the efficiency and accuracy of screening blocked sensitive words and reducing the workload of business personnel.
[0005] According to a first aspect of the present invention, a method for predicting blocked sensitive words is provided, comprising:
[0006] Obtain the public sensitive words to be predicted;
[0007] Inputting the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtaining prediction results output by the different types of preset sensitive word prediction models;
[0008] According to the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive word is a blocked sensitive word.
[0009] According to a second aspect of the present invention, a device for predicting blocked sensitive words is provided, comprising:
[0010] An acquisition unit, used to acquire public sensitive words to be predicted;
[0011] A prediction unit, configured to input the public sensitive words into different types of preset sensitive word prediction models respectively to perform prediction on blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models;
[0012] The determination unit is configured to determine whether the public sensitive word is a blocked sensitive word according to the prediction results output by the different types of preset sensitive word prediction models.
[0013] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0014] Obtain the public sensitive words to be predicted;
[0015] Inputting the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtaining prediction results output by the different types of preset sensitive word prediction models;
[0016] According to the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive word is a blocked sensitive word.
[0017] According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps are implemented:
[0018] Obtain the public sensitive words to be predicted;
[0019] Inputting the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtaining prediction results output by the different types of preset sensitive word prediction models;
[0020] According to the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive word is a blocked sensitive word.
[0021] The present invention provides a method, device, computer equipment and storage medium for predicting blocked sensitive words. Compared with the current method of manually screening blocked sensitive words, the present invention can obtain public sensitive words to be predicted; and input the public sensitive words into different types of preset sensitive word prediction models for blocking sensitive word prediction, to obtain prediction results output by the different types of preset sensitive word prediction models; at the same time, based on the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive words are blocked sensitive words. Therefore, by constructing a preset sensitive word prediction model and using the preset sensitive word prediction model to predict blocked sensitive words for public sensitive words, automatic screening of blocked sensitive words in a public sensitive word library is achieved, the screening efficiency of blocked sensitive words is improved, and the accuracy of the screening results can be ensured. In addition, by constructing different types of preset sensitive word prediction models, the accuracy of the prediction results can be further improved, the reliability of the screening results can be ensured, and the workload of business personnel and labor costs are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 A flowchart of a method for predicting blocked sensitive words provided by an embodiment of the present invention is shown;
[0024] Figure 2 A flow chart of another method for predicting blocked sensitive words provided by an embodiment of the present invention is shown;
[0025] Figure 3 A schematic diagram of the structure of a device for predicting sensitive words to be blocked provided by an embodiment of the present invention is shown;
[0026] Figure 4 A schematic diagram showing the structure of another device for predicting blocked sensitive words provided by an embodiment of the present invention is shown;
[0027] Figure 5 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0028] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0029] Currently, when companies maintain their own sensitive word lists, their staff typically screen and block sensitive words from publicly available sensitive word libraries based on historically blocked SMS data. However, this manual screening process is subject to significant subjective influence and can easily lead to missed or incorrect selections. This results in low screening efficiency and accuracy, significantly increasing the workload for staff.
[0030] In order to solve the above problems, the embodiment of the present invention provides a method for predicting blocked sensitive words, such as Figure 1 As shown, the method includes:
[0031] 101. Obtain the public sensitive words to be predicted.
[0032] Among them, the public sensitive words to be predicted are sensitive words in the public sensitive word library, such as loan, bank, system, etc. The public sensitive word library records a large number of public sensitive words, and the vocabulary can reach hundreds of thousands. However, if the business company directly uses the public sensitive word library for short message warnings, a large number of text messages will be intercepted and unable to be sent. Therefore, it is necessary to screen the blocked sensitive words from the public sensitive word library in order to obtain a sensitive word library that is the same as or similar to the operator's blocked sensitive word library. In order to overcome the defects of manual selection of blocked sensitive words in the prior art, the embodiment of the present invention constructs a preset sensitive word prediction model and uses the preset sensitive word prediction model to predict each sensitive word in the public sensitive word library, thereby achieving the purpose of automatically selecting blocked sensitive words in the public sensitive word library. The execution subject of the embodiment of the present invention is a device or equipment capable of predicting public sensitive words, which can be specifically set on the client or server side.
[0033] 102. Input the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models.
[0034] Among them, different types of preset sensitive word prediction models include a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model, and a preset proximity classification sensitive word prediction model. It should be noted that the different types of preset sensitive word prediction models in the embodiments of the present invention are not limited to the above-mentioned ones. The specific architecture of the preset support vector machine sensitive word prediction model is as follows:
[0035]
[0036] Among them, (x, y) is a training sample. The white sensitive word samples and black sensitive word samples are used as training samples to train the initial support vector machine model and build a preset support vector machine sensitive word prediction model. Specifically, the optimization goal of the preset support vector machine sensitive word prediction model is to maximize the minimum geometric distance between all white sensitive word samples and black sensitive word samples and the segmentation hyperplane. The objective function is:
[0037]
[0038] Therefore, the parameters w and b in the initial support vector machine model are continuously optimized through the objective function, so that the preset support vector machine sensitive word prediction model is finally trained.
[0039] Furthermore, the specific architecture of the preset gradient boosting tree sensitive word prediction model is as follows:
[0040]
[0041] Where T represents the decision tree, M is the number of decision trees, Represents the parameters of the decision tree, x is the white sensitive word sample and the black sensitive word sample, the boosting tree uses the forward division algorithm, first determine , the model architecture of step m is:
[0042]
[0043] Parameters of decision tree The determination of is determined by empirical risk minimization, and the objective function is as follows:
[0044]
[0045] Therefore, the white sensitive word samples and the black sensitive word samples are used as training sets. The constructed objective function can continuously optimize the parameters in the initial gradient boosting tree model, and finally obtain the preset gradient boosting tree sensitive word prediction model.
[0046] Furthermore, for the preset proximity classification sensitive word prediction algorithm, since the sensitive words in the white sensitive word sample are not blocked sensitive words, while the sensitive words in the black sensitive word sample are blocked sensitive words, the Euclidean distance between the public sensitive word to be predicted and the white sensitive word sample, as well as the Euclidean distance between the sensitive word to be predicted and the black sensitive word sample can be calculated separately. If the Euclidean distance between the public sensitive word and the white sensitive word sample is less than the Euclidean distance between the public sensitive word and the black sensitive word sample, it can be considered that the public sensitive word and the white sensitive word sample belong to the same category, that is, the public sensitive word is not a blocked sensitive word; if the Euclidean distance between the public sensitive word and the white sensitive word sample is greater than the Euclidean distance between the public sensitive word and the black sensitive word sample, it can be considered that the public sensitive word and the black sensitive word sample belong to the same category, that is, the public sensitive word is a blocked sensitive word. The Euclidean distance calculation formula for the public sensitive word and the white sensitive word sample or the black sensitive word sample is as follows:
[0047]
[0048] in, is the public sensitive word to be predicted, White sensitive word samples or black sensitive word samples, d is the Euclidean distance between the public sensitive word and any white sensitive word sample or any black sensitive word sample. The Euclidean distances between the public sensitive word and each white sensitive word sample are added together. At the same time, the Euclidean distances between the fair sensitive word and each black sensitive word sample are added together. The added Euclidean distances are then compared to determine whether the public sensitive word is in the same category as the white sensitive word sample or the black sensitive word sample. The judgment result is then used to determine whether the public sensitive word is a blocked sensitive word.
[0049] For the embodiment of the present invention, in order to automatically screen the blocked sensitive words in the public sensitive word library and ensure the reliability of the screening results, the sensitive words to be predicted in the public pre-sense word library are respectively input into different types of preset public sensitive word prediction models for blocked sensitive word prediction, and the prediction results output by different types of preset sensitive word prediction models are obtained. Specifically, the sensitive words to be predicted are respectively input into the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model for blocked sensitive word prediction, and the prediction results corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model are obtained, so as to determine whether the public sensitive word to be dependent is a blocked sensitive word based on the prediction result, thereby achieving the purpose of automatically screening blocked sensitive words from the public sensitive word library.
[0050] 103. Determine whether the public sensitive word is a blocked sensitive word based on prediction results output by the different types of preset sensitive word prediction models.
[0051] Among them, if a blocked sensitive word appears in a text message sent by a user, the number sending the text message will be blocked. The prediction result includes determining that the public sensitive word is a blocked sensitive word and determining that the public sensitive word is not a blocked sensitive word. For an embodiment of the present invention, in order to ensure the accuracy of the blocked sensitive word screening result, the embodiment of the present invention will comprehensively consider the prediction results of different types of preset sensitive word prediction models to finally determine whether the public sensitive word to be predicted is a blocked sensitive word. Specifically, if the output results of different types of preset sensitive word prediction models are all that the public sensitive word is a blocked sensitive word, it is finally determined that the public sensitive word is a blocked sensitive word; if the output result of any type of preset sensitive word prediction model is that the public sensitive word is not a blocked sensitive word, it is finally determined that the public sensitive word is not a blocked sensitive word.
[0052] For example, if the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model are all that the public sensitive word is a blocked sensitive word, then the public sensitive word is ultimately determined to be a blocked sensitive word; if the prediction result output by the support vector machine sensitive word prediction model is that the public sensitive word is not a blocked sensitive word, and the prediction results output by the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model are both that the public sensitive word is a blocked sensitive word, then it is ultimately determined that the public sensitive word is not a blocked sensitive word. In this way, the prediction results of different types of preset sensitive word prediction models can be comprehensively considered, thereby further improving the prediction accuracy of blocked sensitive words and ensuring the accuracy of the blocked sensitive word screening results in the public sensitive word library.
[0053] A method for predicting blocked sensitive words provided by an embodiment of the present invention, compared with the current method of manually screening blocked sensitive words, can obtain public sensitive words to be predicted; and input the public sensitive words into different types of preset sensitive word prediction models respectively to perform blocked sensitive word prediction, and obtain prediction results output by the different types of preset sensitive word prediction models; at the same time, based on the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive words are blocked sensitive words. Therefore, by constructing a preset sensitive word prediction model and using the preset sensitive word prediction model to predict blocked sensitive words for public sensitive words, automatic screening of blocked sensitive words in the public sensitive word library is achieved, the screening efficiency of blocked sensitive words is improved, and the accuracy of the screening results can be ensured. In addition, by constructing different types of preset sensitive word prediction models, the accuracy of the prediction results can be further improved, the reliability of the screening results can be ensured, and the workload of business personnel and labor costs are reduced.
[0054] Furthermore, in order to better illustrate the prediction process of the above-mentioned sensitive words, as a refinement and extension of the above-mentioned embodiment, the embodiment of the present invention provides another method for predicting sensitive words, such as Figure 2 As shown, the method includes:
[0055] 201. Determine black text message samples and white text message samples in historical text message data, and use a preset public sensitive word library to filter black sensitive word samples and white sensitive word samples in the black text message samples and white text message samples respectively.
[0056] Among them, the historical SMS data is the SMS data sent by the company's business personnel. In order to build a preset sensitive word preset model, the historical SMS data is used as sample SMS data. The black SMS samples are SMS sent by numbers blocked by operators in the historical SMS data. The white SMS samples are SMS sent by numbers not blocked by operators in the historical SMS data, that is, the remaining SMS samples in the historical SMS data except the black SMS samples. The black sensitive word samples are sensitive words extracted from the black SMS samples, and the white sensitive word samples are sensitive words extracted from the white SMS samples. The results of the black SMS samples, white SMS samples, black sensitive word samples and white sensitive word samples are as follows: The acquisition process, step 201 specifically includes: obtaining historical suspension information; determining, based on the time information and number information in the historical suspension information, that the SMS data sent by the number information under the time information in the historical SMS data is a black SMS sample, and the remaining SMS data is a white SMS sample; performing word segmentation processing on the black SMS sample and the white SMS sample to obtain each word segmentation corresponding to the black SMS sample and the white SMS sample respectively; using each public sensitive word in the preset public sensitive word library, screening black sensitive word samples and white sensitive word samples from each word segmentation corresponding to the black SMS sample and the white SMS sample respectively. Among them, the historical suspension information is the information that the operator has blocked the business company. The business company can request the historical suspension information from the operator. The historical suspension information mainly includes the time information and number information of the blockage. For example, the mobile phone number 185xxxxxx49 was blocked on June 29, 2020. The sensitive words in the preset public sensitive word library can be publicly obtained. After deduplication, 98,955 sensitive words can be obtained. Some of these 98,955 sensitive words are blocked sensitive words, and some are not blocked sensitive words, so they need to be selected.
[0057] Specifically, first, the business company will request historical suspension information from the operator. Since the historical suspension information only contains information about the relevant mobile phone number being blocked on a certain day, that is, the suspension information can only be targeted at the day, not accurate to the hour, minute, second, let alone the specific text message, it can be considered that all text messages sent by the blocked number in the historical text message data on this day are black text message samples. For example, if the mobile phone number 185xxxxxx49 is blocked on June 29, 2020, then it is confirmed that all text messages sent by 185xxxxxx49 on June 29, 2020 in the historical text message data are black text message samples, and the remaining text messages in the historical text message data are It is determined to be a white SMS sample. Further, after determining the black SMS sample and the white SMS sample, word segmentation processing is performed on the black SMS sample and the SMS sample respectively. Specifically, a preset conditional random field model can be used to perform word segmentation processing on the black SMS sample and the white SMS sample to obtain each segmentation word corresponding to each black SMS sample and each segmentation word corresponding to each white SMS sample. Then, sensitive words in a preset public sensitive word library are used to screen black sensitive word samples and white sensitive word samples from each segmentation word corresponding to the black SMS sample and the white SMS sample respectively. Since the embodiment of the present invention uses a public sensitive word library when performing sensitive word screening, sensitive words must also exist in the white SMS sample.
[0058] For example, a white SMS sample is "Hello, Mu Qiongxian, your loan is currently overdue and has exceeded the limit. The system prompts that your installment repayment qualification will be closed at 10:00 tomorrow. You need to pay the full amount of your default in one go. At the same time, the amount will be uploaded to your bank's credit report. Subsequently, your credit report will show the overdue concern category or even the secondary category. At that time, your cooperation with financial institutions, especially banks, will be restricted. Please be aware." After screening through the public sensitive word library, it is determined that the sensitive words in the white SMS sample are {77: 'bank', 116: 'bank', 13: 'loan', 22: 'system', 119: 'cooperation'}. The number in front represents the key, indicating the starting position of the sensitive word in the white SMS sample. The value after the number indicates which sensitive word in the public sensitive word library is hit. However, it is obvious that "bank", "loan", and "system" are not sensitive words blocked by operators.
[0059] Furthermore, after obtaining all the sensitive words in the black SMS samples and the white SMS samples, since the sensitive words in the white SMS samples must not be the blocked sensitive words in the operator's blocked word library, and for the black sample SMS, when determining the black SMS samples in the early stage, all SMS sent by the blocked number on that day are considered to be black SMS samples. Therefore, some sensitive words in the black SMS samples are likely not blocked sensitive words, that is, they are not black sensitive words and should not be included in the black sensitive word samples. In order to improve the training accuracy of the model and accurately determine the black sensitive word samples, the method also includes: determining the sensitive word samples in the black sensitive word samples that overlap with the white sensitive word samples; excluding the overlapping sensitive word samples in the black sensitive word samples to obtain the remaining samples in the black sensitive word samples.
[0060] For example, the determined white sensitive word sample set is A, the determined black sensitive word sample set is B, and the intersection of the white sensitive word sample set A and the black sensitive word sample set B is C. Then, the remaining samples in the black sensitive word sample set are determined to be BC, that is, the portion of the white sensitive word samples is removed from the black sensitive word sample set.
[0061] 202. Use the black sensitive word samples and the white sensitive word samples as training sets, and construct different types of preset sensitive word prediction models based on the training sets.
[0062] In this embodiment of the present invention, since the sensitive words in the white sensitive word sample are definitely not blocked sensitive words, the black sensitive word sample excludes the parts that overlap with the white sensitive word sample. Based on this, step 202 specifically includes: using the remaining samples and the white sensitive word samples as training sets, and constructing different types of preset sensitive word prediction models based on the training sets.
[0063] Specifically, the sensitive words in the remaining samples are marked as 1, and the sensitive words in the white sensitive word samples are marked as 0. The remaining samples and white sensitive word samples after marking are used as sample training sets, and a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model and a preset proximity classification sensitive word prediction model are constructed respectively, so as to determine whether the sensitive word to be predicted in the public sensitive word library is a blocked sensitive word according to the output results of different types of sensitive word prediction models, which can further improve the screening accuracy of blocked sensitive words.
[0064] 203. Obtain the public sensitive words to be predicted.
[0065] Among them, the public sensitive words to be predicted are sensitive words in the public sensitive word library, such as loan, bank, system, etc. In order to make the business company's own sensitive word library closer to the operator's blocked sensitive word library, it is necessary to select blocked sensitive words from various sensitive words in the public sensitive word library, that is, to predict blocked sensitive words for each sensitive word in the public sensitive word library.
[0066] 204. Input the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models.
[0067] Among them, in order to improve the screening accuracy of blocked sensitive words, public sensitive words can be input into different types of preset sensitive word prediction models for prediction, and then the prediction results output by different types of preset sensitive word prediction models can be obtained. The specific process of using the preset sensitive word prediction model to predict blocked sensitive words is exactly the same as step 102, and will not be repeated here.
[0068] 205. Determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models.
[0069] In this embodiment of the present invention, to determine whether a public sensitive word to be predicted is a blocked sensitive word, step 205 specifically includes: if the prediction results output by the different types of preset sensitive word prediction models all indicate that the public sensitive word is a blocked sensitive word, then ultimately determining that the public sensitive word is a blocked sensitive word; if any of the different types of preset sensitive word prediction models outputs a prediction result that the public sensitive word is not a blocked sensitive word, then ultimately determining that the public sensitive word is not a blocked sensitive word. The different types of preset sensitive word prediction models may include, but are not limited to, a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model, and a preset proximity classification sensitive word prediction model.
[0070] Furthermore, in order to select more blocked sensitive words from the public sensitive word library, the output results of different types of sensitive word prediction models may be comprehensively considered. Based on this, step 205 further specifically includes:
[0071] Determine the prediction weights corresponding to the different types of preset sensitive word prediction models; and determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models and their corresponding prediction weights. The different types of preset sensitive word prediction models include: a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model, and a preset neighboring classification sensitive word prediction model; determining the prediction weights corresponding to the different types of preset sensitive word prediction models includes: respectively setting the prediction weights corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model; and determining whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models and their corresponding prediction weights includes: determining whether the public sensitive word is a blocked sensitive word based on the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model and their corresponding prediction weights.
[0072] For example, the prediction weights corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model are set to 0.5, 0.25 and 0.25 respectively. The probability values of the public sensitive word being a blocked sensitive word in the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model are 0.8, 0.7 and 0.5 respectively. The output results of different models and their corresponding weight values are weightedly summed, and the result is 0.7. Therefore, it is determined that the public sensitive word to be predicted is a blocked sensitive word.
[0073] Another method for predicting blocked sensitive words provided by an embodiment of the present invention, compared with the current method of manually screening blocked sensitive words, the present invention can obtain public sensitive words to be predicted; and input the public sensitive words into different types of preset sensitive word prediction models respectively to perform blocked sensitive word prediction, and obtain prediction results output by the different types of preset sensitive word prediction models; at the same time, based on the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive words are blocked sensitive words. Therefore, by constructing a preset sensitive word prediction model and using the preset sensitive word prediction model to predict blocked sensitive words for public sensitive words, automatic screening of blocked sensitive words in the public sensitive word library is achieved, the screening efficiency of blocked sensitive words is improved, and the accuracy of the screening results can be ensured. In addition, by constructing different types of preset sensitive word prediction models, the accuracy of the prediction results can be further improved, the reliability of the screening results can be ensured, and the workload of business personnel and labor costs are reduced.
[0074] Further, as Figure 1 The specific implementation of the present invention provides a device for predicting sensitive words such as Figure 3 As shown, the device includes: an acquisition unit 31, a prediction unit 32 and a determination unit 33.
[0075] The acquisition unit 31 can be used to acquire the public sensitive words to be predicted. The acquisition unit 31 is the main functional module for acquiring the public sensitive words to be predicted in this device.
[0076] The prediction unit 32 can be used to input the public sensitive words into different types of preset sensitive word prediction models to predict the blocked sensitive words, and obtain the prediction results output by the different types of preset sensitive word prediction models. The prediction unit 32 is the main functional module and core module of this device, which inputs the public sensitive words into different types of preset sensitive word prediction models to predict the blocked sensitive words, and obtains the prediction results output by the different types of preset sensitive word prediction models.
[0077] The determination unit 33 can be used to determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models. The determination unit 33 is the main functional module and core module of this device that determines whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models.
[0078] Furthermore, in order to determine whether the public sensitive word is a blocked sensitive word, the determination unit 33 may be specifically configured to determine that the public sensitive word is a blocked sensitive word if the prediction results output by the different types of preset sensitive word prediction models are all that the public sensitive word is a blocked sensitive word;
[0079] If any of the different types of preset sensitive word prediction models outputs a prediction result that the public sensitive word is not a blocked sensitive word, it is finally determined that the public sensitive word is not a blocked sensitive word.
[0080] Furthermore, in order to determine whether the public sensitive word is a blocked sensitive word, Figure 4 As shown, the determination unit 33 includes: a determination module 331 and a determination module 332 .
[0081] The determination module 331 may be configured to determine prediction weights corresponding to the different types of preset sensitive word prediction models.
[0082] The determination module 332 may be configured to determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models and their corresponding prediction weights.
[0083] In a specific application scenario, the different types of preset sensitive word prediction models include: a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model and a preset neighboring classification sensitive word prediction model. The determination module 331 can be specifically used to set the prediction weights corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model and the preset neighboring classification sensitive word prediction model respectively.
[0084] The determination module 332 can be specifically used to determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model and their corresponding prediction weights.
[0085] Furthermore, in order to construct different types of preset sensitive word prediction models, the device further includes: a determination unit 34 , a screening unit 35 and a construction unit 36 .
[0086] The determining unit 34 may be used to determine black text message samples and white text message samples in the historical text message data.
[0087] The screening unit 35 may be configured to use a preset public sensitive word library to screen the black sensitive word samples and the white sensitive word samples in the black text message samples and the white text message samples, respectively.
[0088] The construction unit 36 may be configured to use the black sensitive word samples and the white sensitive word samples as training sets, and to construct different types of preset sensitive word prediction models according to the training sets.
[0089] Furthermore, in order to determine the black text message samples and the white text message samples in the historical text message data, the determining unit 34 includes: an obtaining module 341 and a determining module 342 .
[0090] The acquisition module 341 can be used to obtain historical suspension information.
[0091] The determination module 342 can be used to determine, based on the time information and number information in the historical suspension information, that the SMS data sent by the number information at the time information in the historical SMS data is a black SMS sample, and the remaining SMS data is a white SMS sample.
[0092] Furthermore, in order to determine the black sensitive word samples and the white sensitive word samples, the screening unit 35 includes: a word segmentation module 351 and a screening module 352 .
[0093] The word segmentation module 351 may be configured to perform word segmentation processing on the black text message sample and the white text message sample to obtain the respective word segments corresponding to the black text message sample and the white text message sample.
[0094] The screening module 352 may be configured to use the public sensitive words in the preset public sensitive word library to screen black sensitive word samples and white sensitive word samples from the word segments corresponding to the black SMS samples and the white SMS samples, respectively.
[0095] Furthermore, in order to exclude the overlapping sensitive word samples from the black sensitive word samples, the apparatus further includes an exclusion unit 37 .
[0096] The determining unit 34 may also be configured to determine sensitive word samples in the black sensitive word samples that overlap with the white sensitive word samples.
[0097] The exclusion unit 37 may be configured to exclude the overlapping sensitive word samples from the black sensitive word samples to obtain the remaining samples from the black sensitive word samples.
[0098] The construction unit 36 may be specifically configured to use the remaining samples and the white sensitive word samples as training sets, and to construct different types of preset sensitive word prediction models according to the training sets.
[0099] It should be noted that for other corresponding descriptions of the functional modules involved in the apparatus for predicting sensitive words that are blocked provided by the embodiment of the present invention, please refer to Figure 1 The corresponding description of the method shown will not be repeated here.
[0100] Based on the above Figure 1 The method shown, accordingly, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which implements the following steps when executed by a processor: obtaining a public sensitive word to be predicted; inputting the public sensitive word into different types of preset sensitive word prediction models to predict a blocked sensitive word, and obtaining the prediction results output by the different types of preset sensitive word prediction models; and determining whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models.
[0101] Based on the above Figure 1 The method shown and Figure 3 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of a computer device, such as Figure 5As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, and when the processor 41 executes the program, the following steps are implemented: obtaining public sensitive words to be predicted; inputting the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words, and obtaining prediction results output by the different types of preset sensitive word prediction models; and determining whether the public sensitive words are blocked sensitive words based on the prediction results output by the different types of preset sensitive word prediction models.
[0102] Through the technical solution of the present invention, the present invention can obtain public sensitive words to be predicted; and input the public sensitive words into different types of preset sensitive word prediction models respectively to predict blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models; at the same time, according to the prediction results output by the different types of preset sensitive word prediction models, it is determined whether the public sensitive words are blocked sensitive words. Therefore, by constructing a preset sensitive word prediction model and using the preset sensitive word prediction model to predict blocked sensitive words for public sensitive words, automatic screening of blocked sensitive words in the public sensitive word library is achieved, the screening efficiency of blocked sensitive words is improved, and the accuracy of the screening results can be ensured. In addition, by constructing different types of preset sensitive word prediction models, the accuracy of the prediction results can be further improved, the reliability of the screening results can be ensured, and the workload of business personnel and labor costs are reduced.
[0103] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0104] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for predicting blocked sensitive words, characterized in that: include: Obtain the public sensitive words to be predicted; Inputting the public sensitive words into different types of preset sensitive word prediction models respectively to predict blocked sensitive words, and obtaining prediction results output by the different types of preset sensitive word prediction models, wherein the different types of preset sensitive word prediction models include: a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model, and a preset proximity classification sensitive word prediction model; Determining whether the public sensitive word is a blocked sensitive word based on prediction results output by the different types of preset sensitive word prediction models; The determining whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models specifically includes: If the prediction results output by the different types of preset sensitive word prediction models are all that the public sensitive word is a blocked sensitive word, then the public sensitive word is finally determined to be a blocked sensitive word; If any of the different types of preset sensitive word prediction models outputs a prediction result that the public sensitive word is not a blocked sensitive word, then it is finally determined that the public sensitive word is not a blocked sensitive word; The determining whether the public sensitive word is a blocked sensitive word based on the prediction results output by the different types of preset sensitive word prediction models specifically includes: respectively setting prediction weights corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset proximity classification sensitive word prediction model; Determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model and their corresponding prediction weights.
2. The method according to claim 1, characterized in that Before inputting the public sensitive words into different types of preset sensitive word prediction models to predict blocked sensitive words and obtaining prediction results output by the different types of preset sensitive word prediction models, the method further includes: Determine the black SMS samples and white SMS samples in the historical SMS data; Using a preset public sensitive word library to filter black sensitive word samples and white sensitive word samples in the black text message samples and the white text message samples respectively; The black sensitive word samples and the white sensitive word samples are used as training sets, and different types of preset sensitive word prediction models are constructed according to the training sets.
3. The method according to claim 2, characterized in that Determining the black text message samples and the white text message samples in the historical text message data includes: Get historical suspension information; According to the time information and number information in the historical suspension information, determine that the SMS data sent by the number information at the time information in the historical SMS data is a black SMS sample, and the remaining SMS data is a white SMS sample; The using a preset public sensitive word library to respectively filter the black sensitive word samples and the white sensitive word samples in the black text message samples and the white text message samples includes: Performing word segmentation processing on the black text message sample and the white text message sample to obtain each word segmentation corresponding to the black text message sample and the white text message sample respectively; Using each public sensitive word in the preset public sensitive word library, black sensitive word samples and white sensitive word samples are screened from each segmented word corresponding to the black short message sample and the white short message sample respectively.
4. The method according to claim 2, characterized in that After using the preset public sensitive word library to screen the black sensitive word samples and the white sensitive word samples in the black text message samples and the white text message samples, the method further includes: determining sensitive word samples in the black sensitive word samples that overlap with the white sensitive word samples; excluding the overlapping sensitive word samples from the black sensitive word samples to obtain the remaining samples in the black sensitive word samples; The method of using the black sensitive word samples and the white sensitive word samples as training sets and constructing different types of preset sensitive word prediction models based on the training sets includes: The remaining samples and the white sensitive word samples are used as training sets, and different types of preset sensitive word prediction models are constructed according to the training sets.
5. A device for predicting blocked sensitive words, characterized in that: include: An acquisition unit, used to acquire public sensitive words to be predicted; A prediction unit, configured to input the public sensitive words into different types of preset sensitive word prediction models respectively to perform prediction on blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models; a determination unit, configured to determine whether the public sensitive word is a blocked sensitive word based on prediction results output by the different types of preset sensitive word prediction models; An acquisition unit, used to acquire public sensitive words to be predicted; A prediction unit, configured to input the public sensitive words into different types of preset sensitive word prediction models respectively to perform prediction on blocked sensitive words, and obtain prediction results output by the different types of preset sensitive word prediction models, wherein the different types of preset sensitive word prediction models include: a preset support vector machine sensitive word prediction model, a preset gradient boosting tree sensitive word prediction model, and a preset proximity classification sensitive word prediction model; a determination unit, configured to determine whether the public sensitive word is a blocked sensitive word based on prediction results output by the different types of preset sensitive word prediction models; The determination unit specifically includes: if the prediction results output by the different types of preset sensitive word prediction models are all that the public sensitive word is a blocked sensitive word, then finally determining that the public sensitive word is a blocked sensitive word; If any of the different types of preset sensitive word prediction models outputs a prediction result that the public sensitive word is not a blocked sensitive word, then it is finally determined that the public sensitive word is not a blocked sensitive word; The determination unit specifically includes: setting prediction weights corresponding to the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model respectively; Determine whether the public sensitive word is a blocked sensitive word based on the prediction results output by the preset support vector machine sensitive word prediction model, the preset gradient boosting tree sensitive word prediction model, and the preset neighboring classification sensitive word prediction model and their corresponding prediction weights.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Sensitive word real-time monitoring method, electronic device, storage medium and system
CN108717408A
Credit risk prediction model construction method and system, storage medium and electronic equipment
CN110930248A