A method, system and medium for creating a text review model

By constructing a text moderation model, using data mining algorithms to generate negative samples and adjusting the classifier, the problems of insufficient sensitive word database and high machine learning cost are solved, achieving efficient text moderation results.

CN113469212BActive Publication Date: 2025-02-28SUZHOU MODUO INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110493576.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-07
Publication Date
2025-02-28
Estimated Expiration
2041-05-07

AI Technical Summary

Technical Problem

Existing technologies for website text moderation suffer from poor recognition results due to insufficient richness of sensitive word databases, and the high training cost of machine learning models makes them difficult to promote and use.

Method used

By setting the subject text dataset, word segmentation threshold, sensitive word library, sample generator, weak classifier, and strong classifier, a text review model is constructed. Negative samples are generated using data mining algorithms, and the classifier model is trained and adjusted to improve the accuracy of review.

Benefits of technology

It expands the richness of negative samples, reduces the risk of model overfitting, improves the predictive ability and accuracy of text review, and reduces human and material costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 210430191204
    Figure 210430191204
  • Figure 210430191242
    Figure 210430191242
Patent Text Reader

Abstract

The present invention discloses a method, system and medium for creating a text audit model. The method comprises the following steps: setting a text data set to be audited, a word segmentation quantity threshold, a sensitive word library, a sample generator, a first classifier, a balance threshold and a second classifier; performing a negative sample generation operation to obtain a third training data set; performing a step of matching a numerical vector with a text vector to obtain a first article numerical vector; training the first article numerical vector, setting a score threshold in a first classifier, performing sample data screening, and obtaining a fourth training data set; training the fourth training data set to obtain a second classifier model, and performing a model optimization operation to obtain a text audit model; in the above manner, the present invention can expand the number of negative samples of different distributions through a sample generator, and expand the number of negative samples using a first classifier, so as to achieve a data enhancement effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of text analysis technology, and in particular to a method, system and medium for creating a text review model. Background Art

[0002] There are currently two main technical solutions for reviewing the text content of a website:

[0003] Current technology 1: Detect the text content of the website and match the words in the text content of the website with the sensitive words in the existing sensitive word library. If a sensitive word in the sensitive word library is matched, it is considered that the text content of the website contains unhealthy content. However, the shortcomings of the current technology 1 are also obvious. The richness of the sensitive word library determines the execution effect of the current technology 1. If the sensitive word library is not rich enough, the execution effect of the current technology 1 will be greatly reduced. In addition, the current technology 1 is limited by the sensitive word library and cannot identify new sensitive words in a timely manner.

[0004] The second current technology: through NLP (Natural Language Processing) natural language processing technology, using machine learning or deep learning methods to train and classify the labeled website texts, and to predict and classify the unlabeled website texts. However, the process of labeling website texts requires a lot of manpower, material resources and financial resources, which is not economical and difficult to promote and use. Summary of the invention

[0005] The present invention mainly solves the problems of low prediction ability and insufficient audit accuracy of current audit models.

[0006] In order to solve the above technical problems, a technical solution adopted by the present invention is: to provide a method for creating a text review model, comprising the following steps:

[0007] Set the text dataset to be reviewed, the word segmentation quantity threshold, the sensitive word library, the sample generator, the first classifier, the balance threshold and the second classifier;

[0008] Performing a test text data selection operation according to the test text data set to obtain a first training data set; performing a word segmentation operation on the first training data set according to the first training data set and the word segmentation quantity threshold to obtain a second training data set; performing a negative sample generation operation according to the second training data set, the sensitive word library and the sample generator to obtain a third training data set;

[0009] Calculate a global keyword text vector according to the third training data set and a data retrieval mining algorithm, perform a keyword matching operation according to the global keyword text vector, and obtain a first article numerical vector;

[0010] Training the first article numerical vector to obtain a first prediction score, and setting a score threshold of the first classifier according to the first prediction score; performing a sample data screening step according to the score threshold, and performing a sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold to obtain a fourth training data set;

[0011] The fourth training data set is trained by the second classifier to obtain a second classifier model, and a model evaluation adjustment operation is performed according to the second classifier model to obtain a text review model.

[0012] Preferably, the step of performing the operation of selecting the text data to be examined according to the text data set to be examined is:

[0013] Further including:

[0014] Dividing the text dataset under review into a labeled text dataset and an unlabeled text dataset;

[0015] Deleting the first character data, the website data and the position data in the text data set under review by using a regular expression;

[0016] Select data from several annotated text datasets and record them as the first negative sample dataset;

[0017] Selecting data from a number of unlabeled text datasets, recorded as a first text dataset, and dividing the first text dataset into a training sample dataset and a test sample dataset;

[0018] Selecting data from a number of the training sample data sets, recorded as a first positive sample data set;

[0019] The first negative sample data set and the first positive sample data set are recorded as a first training data set.

[0020] Preferably, the first training is performed according to the first training data set and the word segmentation quantity threshold.

[0021] The steps of the data set segmentation operation further include:

[0022] Segmenting the data in the first training data set to obtain the number of segmented words in each data in the first training data set, recorded as the first number of segmented words, and comparing the first number of segmented words with the threshold number of segmented words;

[0023] Deleting data in the first training data set whose number of the first segmented words is less than the segmented word number threshold;

[0024] The data in the first training data set whose number of the first segmented words is not less than the segmented word number threshold is saved and recorded as the second training data set.

[0025] Preferably, the second training data set, the sensitive word library and the sample generation

[0026] The step of performing the negative sample generation operation further includes:

[0027] Selecting a number of sensitive word data from the sensitive word library using the sample generator, and selecting a number of positive sample data from the first positive sample data set;

[0028] Recording the plurality of sensitive word data and the plurality of positive sample data as a second negative sample data set;

[0029] The second negative sample data set is added to the second training data set to obtain a new second training data set, which is recorded as a third training data set.

[0030] Preferably, the numerical vector matching text vector operation is performed according to the global keyword text vector.

[0031] The steps further include:

[0032] Using a data retrieval and mining algorithm to obtain non-repeated keywords from the third training data set, recording the non-repeated keywords as global keywords, and forming a global keyword text vector with the global keywords;

[0033] The data retrieval mining algorithm is used to obtain the keywords of each article under review, recorded as the first keyword, and the corresponding position of the first keyword in the global keyword text vector is found. The value of the corresponding position of the numerical vector of each article under review is set to 1, and the remaining positions are set to 0 to obtain the first article numerical vector.

[0034] Preferably, the sample data screening step further comprises:

[0035] Using the first classifier to filter out data in the first positive sample data set whose first prediction score is not less than the score threshold, and record it as a second positive sample data set;

[0036] The data in the first positive sample data set whose first prediction score is lower than the score threshold is also screened out and recorded as the third negative sample data set.

[0037] Preferably, the execution result of the sample data screening step and the balance threshold are performed

[0038] The steps of the sample quantity ratio judgment operation further include:

[0039] The third negative sample data set is added to the second negative sample data set to obtain a fourth negative sample data set.

[0040] Datasets;

[0041] Dividing the number of samples in the second positive sample data set by the number of samples in the fourth negative sample data set to obtain a first sample number ratio;

[0042] Determining whether the first sample quantity ratio is within the equilibrium threshold;

[0043] If the first sample quantity ratio is within the balance threshold, the second positive sample data set and the fourth negative sample data set are recorded as a fourth training data set;

[0044] If the first sample quantity ratio is not within the equilibrium threshold, the amount of data in the fourth negative sample data set is adjusted so that the first sample quantity ratio is within the equilibrium threshold, and the second positive sample data set and the fourth negative sample data set are recorded as a fourth training data set.

[0045] Preferably, the step of performing a model evaluation adjustment operation according to the second classifier model further comprises:

[0046] Steps include:

[0047] Adding labels to the data in the test sample data set;

[0048] The second classifier model performs prediction processing on the test sample data set;

[0049] According to the result of the prediction process, the parameters of the second classifier model are adjusted through the label to obtain the text review model.

[0050] The present invention also provides a system for creating a text audit model, comprising: a setting module, a first data set acquisition module, a vector matching module, a second data set acquisition module, and a classifier model adjustment module;

[0051] The setting module is used to set the text data to be reviewed, the word segmentation quantity threshold, the sensitive word library, the sample generator, the first classifier, the balance threshold and the second classifier;

[0052] The first data set acquisition module is used to perform a review text data selection operation according to the review text data set to acquire a first training data set;

[0053] The first data set acquisition module is used to perform a first training data set segmentation operation according to the first training data set and the segmentation quantity threshold to acquire a second training data set;

[0054] The first data set acquisition module is used to perform a negative sample generation operation according to the second training data set, the sensitive word library and the sample generator to obtain a third training data set;

[0055] The vector matching module is used to obtain a global keyword text vector according to the third training data set;

[0056] The vector matching module is used to perform a numerical vector matching text vector operation according to the global keyword text vector to obtain a first article numerical vector;

[0057] The second data set acquisition module is used to train the first article numerical vector to obtain a first prediction score, and set a score threshold of the first classifier according to the first prediction score;

[0058] The second data set acquisition module is used to perform a sample data screening step according to the score threshold, and perform a sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold to obtain a fourth training data set;

[0059] The classifier model adjustment module is used to train the fourth training data set through the second classifier to obtain a second classifier model, and perform a model evaluation adjustment operation according to the second classifier model to obtain a text review model.

[0060] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps for creating a text audit model are implemented.

[0061] The beneficial effects of the present invention are:

[0062] 1. The method for creating a text audit model described in the present invention can expand the number of negative samples with different distributions through a sample generator, greatly expand the richness of negative samples, effectively avoid the risk of overfitting of the model, and achieve the effect of data enhancement in a small number of annotated samples;

[0063] 2. The system for creating a text audit model described in the present invention can expand the number of negative samples by using weak classifiers, screen out negative samples with high credibility, and ensure the effectiveness of negative samples, so that the effect of data enhancement can be achieved in a small number of labeled samples;

[0064] 3. The medium for creating a text audit model described in the present invention can increase the number of effective negative samples, provide more effective and reliable samples for the subsequent training of text data models, and greatly increase the predictive processing capabilities of the text data model and the accuracy of the audit. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 It is a flowchart of a method for creating a text review model according to Embodiment 1 of the present invention;

[0067] Figure 2 It is a schematic diagram of a system architecture for creating a text review model as described in Example 2 of the present invention. DETAILED DESCRIPTION

[0068] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "middle" and "inner" is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third" and "fourth" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0070] It should be noted that in the description of the present invention:

[0071] NLP (Natural Language Processing) is natural language processing technology;

[0072] TF-IDF (term frequency–inverse document frequency) is a weighted technology for information retrieval and data mining;

[0073] LR (Logistic regression) is a logistic regression model;

[0074] GBDT (Gradient Boosting Decision Tree) is a gradient boosting decision tree.

[0075] It should also be noted that:

[0076] The first classifier corresponds to the weak classifier;

[0077] The second classifier corresponds to the strong classifier;

[0078] The second classifier model corresponds to the GBDT model;

[0079] The text review model corresponds to the first GBDT model. Example 1

[0080] The present invention provides a method for creating a text audit model. Figure 1 , including the following steps:

[0081] S100, setting the text data set to be reviewed, the word segmentation quantity threshold, the sensitive word library, the sample generator, the weak classifier, the balance threshold and the strong classifier;

[0082] S200, obtaining a first training data set, a second training data set, and a third training data set:

[0083] S201, obtaining a first training data set: all data used for text review, including labeled data and unlabeled data, using regular expressions to delete data for special characters, data for URLs, and data for specifying information locations in the text data under review;

[0084] Select 1,000 data from the labeled data used for text review, and set the 1,000 labeled data as the first negative sample data set;

[0085] One million data are selected from the unlabeled data used for text review, recorded as the first text data set, and the first text data set is divided into two types of data sets, one type of data set has 997,000 unlabeled data, recorded as the training sample data set, and the other type of data set has 3,000 unlabeled data, recorded as the test sample data set;

[0086] Performing a random sampling operation on the training sample data to obtain random sampling data of the training sample data, and setting the random sampling data of the training sample data as the first positive sample data set;

[0087] Using the first negative sample data set and the first positive sample data set as initial training data sets, and recording the initial training data set as the first training data set;

[0088] S202, obtaining a second training data set: using the Jieba word segmentation technology to perform word segmentation on the data in the first training data set, obtaining the number of word segments of each data in the first training data set, recorded as the first word segmentation number, comparing the first word segmentation number with the word segmentation number threshold, obtaining a first comparison result, if the first comparison result is: the first word segmentation number is less than the word segmentation number threshold, then deleting the data in the first training data set whose first word segmentation number is less than the word segmentation number threshold; if the first comparison result is: the first word segmentation number is not less than the word segmentation number threshold, then retaining the data in the first training data set whose first word segmentation number is greater than the word segmentation number threshold, and recording it as the second training data set;

[0089] S203, obtaining a third training data set: using a sample generator to randomly select 5 sensitive word data from the sensitive word library, and then using a sample generator to randomly select 500 to 1000 positive sample data from the first positive sample data set, combining the 5 sensitive word data and the 500 to 1000 positive sample data together to form valid negative sample data, recording the valid negative sample data as a second negative sample data set, adding the second negative sample data set to the second training data set, and obtaining a new training data set, recorded as a third training data set;

[0090] S300, according to the third training data set, using the TF-IDF algorithm to obtain a global keyword text vector, according to the global keyword text vector and the keywords in each article to obtain a numerical vector of each article, the numerical vector of each article under review is recorded as the first article numerical vector;

[0091] S301, the third training data set includes keywords of each article under review, and all non-repeated keywords are obtained from the third training data set using the TF-IDF algorithm, recorded as global keywords, and all global keywords are combined into a global keyword text vector;

[0092] S302, using the TF-IDF algorithm to find out the keyword of each article under review, record it as the first keyword, find out the corresponding position of the first keyword in the global keyword text vector, then set the corresponding position in the numerical vector of each article to 1, and set the remaining positions to 0, to obtain the numerical vector of the first article;

[0093] For example, the TF-IDF algorithm is used to obtain global keywords from the third training data set. Assuming that there are: "hello", "city", "lady", "motorcycle", "sports meeting" and "city", "hello", "city", "lady", "motorcycle", "sports meeting" and "city" form a global keyword text vector: {hello, city, lady, motorcycle, sports meeting, city}. Assuming that the keywords of article A are: "hello" and "city", the positions of the global keyword text vector corresponding to "hello" and "city" in article A are the positions of the first vector value and the second vector value in the global keyword text vector. In the numerical vector of article A, the position of the first vector value and the position of the second vector value are set to 1, and the remaining positions are set to 0. The numerical vector of article A is {1,1,0,0,0,0};

[0094] Assuming that the keywords of article B are "ladies" and "motorcycles", the positions of "ladies" and "motorcycles" in article B in the global keyword text vector are the positions of the third vector value and the fourth vector value in the global keyword text vector. In the numerical vector of article B, the positions of the third vector value and the fourth vector value are set to 1, and the remaining positions are set to 0. The numerical vector of article B is {0,0,1,1,0,0};

[0095] Assuming that the keywords of article C are: "sports meeting" and "city", the positions of "sports meeting" and "city" in the global keyword text vector corresponding to the global keyword text vector are the positions of the fifth vector value and the sixth vector value in the global keyword text vector. In the numerical vector of article C, the positions of the fifth vector value and the sixth vector value are set to 1, and the remaining positions are set to 0, so the numerical vector of article C is {0,0,0,0,1,1};

[0096] S400, training all the first article numerical vectors obtained in step S300 to obtain a prediction score for each article under review, recorded as a first prediction score;

[0097] According to the first prediction score, the score threshold of the LR model is set. The LR model is a weak classifier model. The LR model can predict samples with high confidence and reduce the risk of overfitting. Use the LR model to screen out positive samples whose first prediction scores are not lower than the score threshold and negative samples that are lower than the score threshold, record the screened first positive sample data as the second positive sample data set, and record the screened first positive sample data as the third negative sample data set. At this time, the probability of obtaining a positive sample event is relatively low, while the probability of obtaining a negative sample event is relatively high. Add the third negative sample data set to the second negative sample data set of the third training data set to obtain a fourth negative sample data set. Divide the number of data in the second positive sample data set by the number of data in the fourth negative sample data set to obtain the first sample number ratio, and determine whether the first sample number ratio is within the equilibrium threshold. If it is within the equilibrium threshold, it means that the data in the second positive sample data set and the data in the fourth negative sample data set have reached a balanced state. If it is not within the equilibrium threshold, the number of samples in the fourth negative sample data set is adjusted to make the data in the second positive sample data set and the data in the fourth negative sample data set reach a balanced state, and the second positive sample data set and the fourth negative sample data set in a balanced state are recorded as the fourth training data set.

[0098] S500, using GBDT to train the fourth training data set that has reached a balanced state to obtain a GBDT model, where the GBDT model is a strong classifier model, and the GBDT model has better accuracy than the fourth training set;

[0099] Each test sample data is manually labeled. Labeling can evaluate the performance of the GBDT model and adjust the parameters of the GBDT model through labels. The GBDT model performs prediction processing on each test sample data. For problems that arise during the prediction processing of the GBDT model, the parameters of the GBDT model are adjusted through labels. The GBDT model is optimized to obtain the optimal GBDT model, which is recorded as the first GBDT model.

[0100] Develop and launch the optimal GBDT model, and provide an online service interface for online text review. Example 2

[0101] The embodiment of the present invention also provides a system for creating a text review model, see Figure 2 , including: a setting module, a first data set acquisition module, a vector matching module, a second data set acquisition module and a classifier model adjustment module;

[0102] The setting module is used to set the text data to be reviewed, the word segmentation quantity threshold, the sensitive word library, the sample generator, the first classifier, the balance threshold and the second classifier;

[0103] The first data set acquisition module is used to perform a review text data selection operation according to the review text data set to obtain a first training data set; perform a first training data set segmentation operation according to the first training data set and the segmentation quantity threshold to obtain a second training data set; perform a negative sample generation operation according to the second training data set, the sensitive word library and the sample generator to obtain a third training data set;

[0104] The vector matching module is used to obtain a global keyword text vector according to the third training data set; perform a numerical vector matching text vector operation according to the global keyword text vector to obtain a first article numerical vector;

[0105] The second data set acquisition module is used to train the first article numerical vector to obtain a first prediction score, and set a score threshold of the first classifier according to the first prediction score; perform a sample data screening step according to the score threshold, and perform a sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold to obtain a fourth training data set;

[0106] The classifier model adjustment module is used to train the fourth training data set through the second classifier to obtain a second classifier model, and perform a model evaluation adjustment operation according to the second classifier model to obtain a text review model. Example 3

[0107] The present invention also provides a computer-readable storage medium, which stores a computer program that performs the above method when executed by a processor.

[0108] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program, when executed, can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned arbitrary method embodiments.

[0109] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0110] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0111] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for creating a text audit model, characterized in that: The following steps are involved: Pre-settings: Set the text dataset to be reviewed, the word segmentation threshold, the sensitive word library, the sample generator, the first classifier, the balance threshold, and the second classifier; Processing the text data under review: performing a text data selection operation on the text data set under review to obtain a first training data set; performing a word segmentation operation on the first training data set according to the first training data set and the word segmentation quantity threshold to obtain a second training data set; Perform a negative sample generation operation according to the second training data set, the sensitive word library, and the sample generator to obtain a third training data set; Calculate the training data set and match keywords: calculate the global keyword text vector according to the third training data set and the data retrieval mining algorithm, perform a keyword matching operation according to the global keyword text vector, and obtain the first article numerical vector; Obtaining a classifier model training data set: training the first article numerical vector to obtain a first prediction score, and setting a score threshold of the first classifier according to the first prediction score; performing a sample data screening step according to the score threshold, and performing a sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold to obtain a fourth training data set; Training the text review model: training the fourth training data set through the second classifier to obtain a second classifier model, performing a model evaluation and adjustment operation according to the second classifier model to obtain a text review model.

2. A method for creating a text audit model according to claim 1, characterized in that: Place The step of performing the operation of selecting the text data to be examined according to the text data set to be examined further comprises: Dividing the text dataset under review into a labeled text dataset and an unlabeled text dataset; Deleting the first character data, the website data and the location data in the text data set under review by using a regular expression; Select data from several annotated text datasets and record them as the first negative sample dataset; Selecting data from a number of unlabeled text datasets, recorded as a first text dataset, and dividing the first text dataset into a training sample dataset and a test sample dataset; Selecting data from a number of the training sample data sets, recorded as a first positive sample data set; The first negative sample data set and the first positive sample data set are recorded as a first training data set.

3. A method for creating a text audit model according to claim 2, characterized in that: Place The step of performing a word segmentation operation on the first training data set according to the first training data set and the word segmentation quantity threshold further includes: Segmenting the data in the first training data set to obtain the number of segmented words in each data in the first training data set, recorded as the first number of segmented words, and comparing the first number of segmented words with the threshold number of segmented words; Deleting data in the first training data set whose number of the first segmented words is less than the segmented word number threshold; The data in the first training data set whose number of the first segmented words is not less than the segmented word number threshold is saved and recorded as the second training data set.

4. A method for creating a text audit model according to claim 3, characterized in that: Place The step of performing a negative sample generation operation according to the second training data set, the sensitive word library and the sample generator further includes: Selecting a number of sensitive word data from the sensitive word library using the sample generator, and selecting a number of positive sample data from the first positive sample data set; Recording the plurality of sensitive word data and the plurality of positive sample data as a second negative sample data set; The second negative sample data set is added to the second training data set to obtain a new second training data set, which is recorded as a third training data set.

5. The method for creating a text audit model according to claim 1, characterized in that: Place The step of performing a keyword matching operation according to the global keyword text vector further comprises: Using a data retrieval and mining algorithm to obtain non-repeated keywords from the third training data set, recording the non-repeated keywords as global keywords, and forming a global keyword text vector with the global keywords; The data retrieval mining algorithm is used to obtain the keywords of each article under review, recorded as the first keyword, and the corresponding position of the first keyword in the global keyword text vector is found. The value of the corresponding position of the numerical vector of each article under review is set to 1, and the remaining positions are set to 0 to obtain the first article numerical vector.

6. A method for creating a text audit model according to claim 4, characterized in that: The sample data screening step further comprises: Using the first classifier to filter out data in the first positive sample data set whose first prediction score is not less than the score threshold, and record it as a second positive sample data set; The data in the first positive sample data set whose first prediction score is lower than the score threshold is also screened out and recorded as the third negative sample data set.

7. A method for creating a text audit model according to claim 6, characterized in that: Place The step of performing the sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold further includes: The third negative sample data set is added to the second negative sample data set to obtain a fourth negative sample data set. Datasets; Dividing the number of samples in the second positive sample data set by the number of samples in the fourth negative sample data set to obtain a first sample number ratio; Determining whether the first sample quantity ratio is within the equilibrium threshold; If the first sample quantity ratio is within the balance threshold, the second positive sample data set and the fourth negative sample data set are recorded as a fourth training data set; If the first sample quantity ratio is not within the equilibrium threshold, the amount of data in the fourth negative sample data set is adjusted so that the first sample quantity ratio is within the equilibrium threshold, and the second positive sample data set and the fourth negative sample data set are recorded as a fourth training data set.

8. A method for creating a text audit model according to claim 2, characterized in that: The step of performing a model evaluation adjustment operation according to the second classifier model further comprises: Adding labels to the data in the test sample data set; The second classifier model performs prediction processing on the test sample data set; According to the result of the prediction process, the parameters of the second classifier model are adjusted through the label to obtain the text review model.

9. A system for creating a text review model, characterized in that: include: A setting module, a first data set acquisition module, a vector matching module, a second data set acquisition module, and a classifier model adjustment module; The setting module is used to set the text data to be reviewed, the word segmentation quantity threshold, the sensitive word library, the sample generator, the first classifier, the balance threshold and the second classifier; The first data set acquisition module is used to perform a review text data selection operation according to the review text data set to acquire a first training data set; The first data set acquisition module is used to perform a first training data set segmentation operation according to the first training data set and the segmentation quantity threshold to acquire a second training data set; The first data set acquisition module is used to perform a negative sample generation operation according to the second training data set, the sensitive word library and the sample generator to obtain a third training data set; The vector matching module is used to obtain a global keyword text vector according to the third training data set; The vector matching module is used to perform a numerical vector matching text vector operation according to the global keyword text vector to obtain a first article numerical vector; The second data set acquisition module is used to train the first article numerical vector to obtain a first prediction score, and set a score threshold of the first classifier according to the first prediction score; The second data set acquisition module is used to perform a sample data screening step according to the score threshold, and perform a sample quantity ratio judgment operation according to the execution result of the sample data screening step and the balance threshold to obtain a fourth training data set; The classifier model adjustment module is used to train the fourth training data set through the second classifier to obtain a second classifier model, and perform a model evaluation adjustment operation according to the second classifier model to obtain a text review model.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps for creating a text review model described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Text classification method, text classification system and computer device

    CN108520030A

  • Model construction method for multi-level user comment safety auditing

    CN111966944A