Method and device for extracting sensitive words of internet community and storage medium

By combining the BERT model with manual review, a sensitive word extraction method was developed, which solved the problems of lag and lack of flexibility in sensitive word extraction in the Internet community, and achieved efficient and accurate sensitive word updates, thereby improving the user experience.

CN114936553BActive Publication Date: 2026-07-07SHENZHEN BAICHUAN SHUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN BAICHUAN SHUAN TECH CO LTD
Filing Date
2022-06-22
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, the extraction of sensitive words in internet communities relies on manual labor and rule expansion, which suffers from high labor costs, lag, and insufficient flexibility. It cannot respond to the rapid changes in black market rhetoric in a timely manner, resulting in delayed spam processing and affecting user experience and retention.

Method used

An automated sensitive word extraction method based on the BERT model is adopted. A coarse extraction model is trained using a total sensitive word database and historical post and comment data. Combined with manual review, a fine extraction model is further trained. The combination of automation and manual review enables rapid updates to the sensitive word database.

Benefits of technology

It improves the efficiency and accuracy of sensitive word extraction, reduces labor costs, enables timely detection and handling of new sensitive words, and enhances user experience and community atmosphere.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936553B_ABST
    Figure CN114936553B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and relates to a sensitive word extraction method and device for an Internet community and a storage medium. The method comprises the following steps: obtaining a total sensitive word library and historical post and comment data; training using the total sensitive word library, the historical post and comment data and a first preset BERT model to obtain a sensitive word coarse extraction model; extracting sensitive words from post and comment data that has been manually audited using the sensitive word coarse extraction model to extract first target sensitive words; when it is determined through manual auditing that the first target sensitive words meet sensitive word extraction rules, storing the first target sensitive words and corresponding first target post and comment data in a sensitive word source post and comment library; training using data in the sensitive word source post and comment library and a second preset BERT model to obtain a sensitive word fine extraction model; and extracting sensitive words from online full-amount post and comment data using the sensitive word fine extraction model to extract second target sensitive words.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, and storage medium for extracting sensitive words from internet communities. Background Technology

[0002] Internet community products have a one-to-many characteristic; a message posted by one user can be seen by multiple users. Based on this characteristic, internet community products are highly susceptible to black market activities and spam. Black market operators use internet technology to promote illegal platforms, and messages posted by them for the purpose of attracting traffic constitute spam. If internet communities fail to address black market activities and spam in the long term, it will negatively impact user experience and reduce user retention. Currently, platforms use sensitive word matching to identify spam posted by black market operators. The sensitive word databases used by these platforms are mostly extracted, added, and maintained manually. Due to the diverse expression characteristics of internet community products, the same meaning can be expressed in numerous ways. Therefore, continuously maintaining a timely, updated, and comprehensive sensitive word database is crucial for the healthy development of internet communities.

[0003] Currently, most platforms rely on manual extraction of sensitive words. However, due to the high cost of labor, the lag in manual extraction, and the rapid changes in sensitive words used by black market operators, manual extraction inevitably leads to some omissions and cannot promptly address spam, thus affecting user experience, community atmosphere, and reducing user retention. Some solutions use rules to expand existing sensitive words, but due to the rigidity of these rules, the expanded sensitive words are not flexible enough and cannot generate new sensitive words with new posts and comments in the community. Once black market operators develop new tactics and illegally promote products, this method cannot detect spam in a timely manner and can only passively wait for human intervention. Summary of the Invention

[0004] To overcome the limitations and lag of manual extraction and rule-based expansion of sensitive words in related technologies, this invention provides a method, apparatus, and storage medium for extracting sensitive words from internet communities. This addresses the issues of discovering and expanding new sensitive words, and also takes into account the rapid iteration of keyword extraction models, thus reducing manual intervention and improving the speed of sensitive word extraction.

[0005] According to a first aspect of the present invention, a method for extracting sensitive words based on internet communities is provided for a terminal device, the method comprising:

[0006] Obtain the total sensitive word database and historical post / comment data;

[0007] The sensitive word database, historical post and comment data, and the first preset BERT model are used for training to obtain a coarse sensitive word extraction model;

[0008] The aforementioned sensitive word coarse extraction model is used to extract sensitive words from the manually reviewed illegal postings and comments data, in order to extract the first target sensitive words;

[0009] When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word and its corresponding first target post / comment data are stored in the sensitive word source post / comment database;

[0010] The sensitive word source comment library and the second preset Bert model are used to train the model to obtain a sensitive word fine extraction model.

[0011] The sensitive word extraction model described above is used to extract sensitive words from the full online post and comment data in order to extract the second target sensitive words.

[0012] In one embodiment, preferably, the overall sensitive word library, historical post and comment data, and a first preset BERT model are used for training to obtain a coarse sensitive word extraction model, including:

[0013] Based on the total sensitive word library and historical post comment data, BIO annotation is performed to obtain the first annotation post comment data;

[0014] The first post comment data after annotation and the first preset BERT model are used for training to obtain a coarse extraction model for sensitive words.

[0015] In one embodiment, preferably, the method further includes:

[0016] When it is determined through manual review that the first target sensitive word meets the sensitive word extraction rules, the first target sensitive word is then manually confirmed as a sensitive word.

[0017] When the first target sensitive word is confirmed by manual verification to be a sensitive word, the first target sensitive word is added to the total sensitive word library;

[0018] When it is manually confirmed that the first target sensitive word cannot be used as a sensitive word, the first target sensitive word is discarded.

[0019] In one embodiment, preferably, the method further includes:

[0020] When it is determined through manual review that the first target sensitive word does not comply with the sensitive word extraction rules, a third target sensitive word is extracted from the illegal post data and added to the total sensitive word library.

[0021] In one embodiment, preferably, the sensitive word source comment library is used as the training method to obtain a sensitive word fine extraction model, including:

[0022] BIO annotation is performed on the first target sensitive word and its corresponding first target post comment data in the sensitive word source post comment library to obtain the annotated second post comment data;

[0023] The second post data after annotation and the second preset BERT model are used for training to obtain a sensitive word extraction model.

[0024] In one embodiment, preferably, the method further includes:

[0025] When it is determined through manual review that the second target sensitive word meets the sensitive word extraction rules, it is then manually confirmed whether the second target sensitive word can be used as a sensitive word.

[0026] When the second target sensitive word is confirmed by manual verification to be a sensitive word, the second target sensitive word is added to the total sensitive word database;

[0027] When it is manually confirmed that the second target sensitive word cannot be used as a sensitive word, the second target sensitive word is discarded.

[0028] In one embodiment, preferably, the method further includes:

[0029] When it is determined through manual review that the second target sensitive word does not meet the sensitive word extraction rules, a fourth target sensitive word is extracted from the full online post and comment data and added to the total sensitive word library.

[0030] According to a second aspect of the present invention, an apparatus for extracting sensitive words from internet communities is provided, the apparatus comprising:

[0031] The acquisition module is used to obtain the total sensitive word database and historical post and comment data;

[0032] The first training module is used to train the sensitive word extraction model using the total sensitive word library, historical post and comment data and the first preset BERT model.

[0033] The first extraction module is used to extract sensitive words from the manually reviewed illegal posting data using the sensitive word coarse extraction model, so as to extract the first target sensitive word;

[0034] The storage module is used to store the first target sensitive word and its corresponding first target post comment data into the sensitive word source post comment database when the first target sensitive word is determined to meet the sensitive word extraction rules through manual review;

[0035] The second training module is used to train the sensitive word source comment library and the second preset Bert model to obtain a sensitive word fine extraction model.

[0036] The second extraction module is used to extract sensitive words from the full online post and comment data using the sensitive word fine extraction model, so as to extract the second target sensitive words.

[0037] In one embodiment, preferably, in one embodiment, the first training module is used for:

[0038] Based on the total sensitive word library and historical post comment data, BIO annotation is performed to obtain the first annotation post comment data;

[0039] The first post comment data after annotation and the first preset BERT model are used for training to obtain a coarse extraction model for sensitive words.

[0040] In one embodiment, preferably, the device further includes:

[0041] The first confirmation module is used to manually confirm whether the first target sensitive word can be used as a sensitive word when it is determined by manual review that the first target sensitive word meets the sensitive word extraction rules.

[0042] The first supplementary module is used to supplement the first target sensitive word into the total sensitive word library when it is confirmed by manual verification that the first target sensitive word can be used as a sensitive word;

[0043] The first discarding module is used to discard the first target sensitive word when it is manually confirmed that the first target sensitive word cannot be used as a sensitive word.

[0044] In one embodiment, preferably, the device further includes:

[0045] The second supplementary module is used to manually extract a third target sensitive word from the violation post data when it is determined by manual review that the first target sensitive word does not meet the sensitive word extraction rules, and to supplement the third target sensitive word to the total sensitive word library.

[0046] In one embodiment, preferably, the second training module is used for:

[0047] BIO annotation is performed on the first target sensitive word and its corresponding first target post comment data in the sensitive word source post comment library to obtain the annotated second post comment data;

[0048] The second post data after annotation and the second preset BERT model are used for training to obtain a sensitive word extraction model.

[0049] In one embodiment, preferably, the device further includes:

[0050] The second confirmation module is used to manually confirm whether the second target sensitive word can be used as a sensitive word when it is determined by manual review that the second target sensitive word meets the sensitive word extraction rules.

[0051] The third supplementary module is used to supplement the second target sensitive word into the total sensitive word library when it is confirmed by manual verification that the second target sensitive word can be used as a sensitive word.

[0052] The second discarding module is used to discard the second target sensitive word when it is manually confirmed that the second target sensitive word cannot be used as a sensitive word.

[0053] In one embodiment, preferably, the device further includes:

[0054] The fourth supplementary module is used to manually extract the fourth target sensitive word from the full online posting data when it is determined by manual review that the second target sensitive word does not meet the sensitive word extraction rules, and to supplement the fourth target sensitive word into the total sensitive word library.

[0055] According to a third aspect of the present invention, an apparatus for extracting sensitive words from internet communities is provided, the apparatus comprising:

[0056] processor;

[0057] Memory used to store processor-executable instructions;

[0058] The processor is configured as follows:

[0059] Obtain the total sensitive word database and historical post / comment data;

[0060] The sensitive word database, historical post and comment data, and the first preset BERT model are used for training to obtain a coarse sensitive word extraction model;

[0061] The aforementioned sensitive word coarse extraction model is used to extract sensitive words from the manually reviewed illegal postings and comments data, in order to extract the first target sensitive words;

[0062] When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word and its corresponding first target post / comment data are stored in the sensitive word source post / comment database;

[0063] The sensitive word source comment library and the second preset Bert model are used to train the model to obtain a sensitive word fine extraction model.

[0064] The sensitive word extraction model described above is used to extract sensitive words from the full online post and comment data in order to extract the second target sensitive words.

[0065] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any one of the embodiments of the first aspect.

[0066] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0067] In this embodiment of the invention, based on the total sensitive word database and historical existing posts and comments, automatic BIO sequence labeling is performed on the post and comment data to quickly obtain the first coarse sensitive word extraction model. Compared with manually re-labeling the data, this method has the advantages of high efficiency and low cost. Based on the first coarse sensitive word extraction model, with a small amount of human review, a training set for the second fine sensitive word extraction model can be constructed. The fine sensitive word extraction model is then trained and used to extract sensitive words. Compared with directly labeling the dataset manually, this method has the advantages of low labor costs and fast data acquisition.

[0068] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0069] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0070] Figure 1 This is a flowchart illustrating a method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0071] Figure 2 This is a flowchart of step S102 in a method for extracting sensitive words based on an Internet community, according to an exemplary embodiment.

[0072] Figure 3 This is a flowchart illustrating another method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0073] Figure 4 This is a flowchart of step S105 in a method for extracting sensitive words based on an Internet community, according to an exemplary embodiment.

[0074] Figure 5 This is a flowchart illustrating yet another method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0075] Figure 6 This is a block diagram illustrating a sensitive word extraction device based on an internet community, according to an exemplary embodiment. Detailed Implementation

[0076] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0077] Figure 1 This is a flowchart illustrating a method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0078] like Figure 1 As shown, according to a first aspect of the present invention, a method for extracting sensitive words based on internet communities is provided for a terminal device, the method comprising:

[0079] Step S101: Obtain the total sensitive word database and historical post / comment data;

[0080] Step S102: Use the total sensitive word library, historical post and comment data and the first preset Bert model to train and obtain a sensitive word coarse extraction model;

[0081] Step S103: Use the aforementioned sensitive word coarse extraction model to extract sensitive words from the manually reviewed illegal posting data, so as to extract the first target sensitive words;

[0082] Step S104: When it is determined through manual review that the first target sensitive word meets the sensitive word extraction rules, the first target sensitive word and its corresponding first target post comment data are stored in the sensitive word source post comment database;

[0083] Step S105: Use the data in the sensitive word source comment library and the second preset Bert model to train the sensitive word fine extraction model;

[0084] Step S106: Use the sensitive word extraction model to extract sensitive words from the full online post and comment data to extract the second target sensitive words.

[0085] The online full-volume posting data differs from the manually reviewed data of prohibited posts. This is because the coarse-level sensitive word extraction model is trained on automatically labeled sensitive word data. Due to inaccuracies inherent in automatic labeling, its accuracy doesn't reach the level of directly usable sensitive words. Therefore, it requires data confirmed as prohibited by human review as input to help the model achieve a more accurate result. In contrast, the fine-level sensitive word extraction model is trained on manually verified correct data. The training set is more accurate, resulting in a more accurate model. Therefore, it doesn't need human-confirmed prohibited data as input to improve accuracy. Instead, the entire online posting data can be used as input, ensuring accuracy while identifying data that human review might have missed.

[0086] In one embodiment, preferably, step S102 includes:

[0087] Step S201: Perform BIO annotation based on the total sensitive word library and historical post comment data to obtain the first annotated post comment data; BIO annotation refers to annotating each element as "BX", "IX", or "O". Among them, "BX" indicates that the segment containing this element belongs to type X and this element is at the beginning of this segment, "IX" indicates that the segment containing this element belongs to type X and this element is in the middle of this segment, and "O" indicates that it does not belong to any type.

[0088] Step S202: Use the labeled first post comment data and the first preset BERT model to train a coarse extraction model for sensitive words.

[0089] Figure 3 This is a flowchart illustrating another method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0090] like Figure 3 As shown, in one embodiment, preferably, the above method further includes:

[0091] Step S301: When it is determined by manual review that the first target sensitive word meets the sensitive word extraction rules, the first target sensitive word is manually confirmed as a sensitive word.

[0092] Step S302: When the first target sensitive word is confirmed by manual verification to be a sensitive word, the first target sensitive word is added to the total sensitive word library;

[0093] Step S303: When it is manually confirmed that the first target sensitive word cannot be used as a sensitive word, the first target sensitive word is discarded.

[0094] In this embodiment, the first target sensitive word that meets the sensitive word extraction rules through manual review can be manually confirmed a second time. If the first target sensitive word is confirmed to be a sensitive word, it can be added to the total sensitive word library to expand the sensitive word library; otherwise, the first target sensitive word is directly discarded.

[0095] In one embodiment, preferably, the method further includes:

[0096] When it is determined through manual review that the first target sensitive word does not comply with the sensitive word extraction rules, a third target sensitive word is extracted from the illegal post data and added to the total sensitive word library.

[0097] In this embodiment, if it is determined that the first target sensitive word does not conform to the sensitive word extraction rules, the third target sensitive word can be manually extracted from the illegal post data and added to the total sensitive word library.

[0098] Figure 4 This is a flowchart of step S105 in a method for extracting sensitive words based on an Internet community, according to an exemplary embodiment.

[0099] like Figure 4 As shown, in one embodiment, preferably, step S105 includes:

[0100] Step S401: Perform BIO annotation based on the first target sensitive word and its corresponding first target post data in the sensitive word source post comment library to obtain the annotated second post comment data;

[0101] Step S402: Use the labeled second post data and the second preset Bert model to train a sensitive word extraction model.

[0102] The sensitive word extraction model is generated using manually verified correct data as the training set. The training set is more accurate, so the sensitive word extraction model is also more accurate. Therefore, it does not need to use data confirmed by human review as input to help improve the accuracy of the results. Instead, it can use the full volume of online posts and comments as input. While ensuring the accuracy of the results, it can find some data that was missed by human reviewers.

[0103] Figure 5 This is a flowchart illustrating yet another method for extracting sensitive words based on an internet community, according to an exemplary embodiment.

[0104] like Figure 5 As shown, in one embodiment, preferably, the method further includes:

[0105] Step S501: When it is determined by manual review that the second target sensitive word meets the sensitive word extraction rules, the second target sensitive word is manually confirmed as a sensitive word.

[0106] Step S502: When the second target sensitive word is confirmed by manual verification to be a sensitive word, the second target sensitive word is added to the total sensitive word library;

[0107] Step S503: When it is manually confirmed that the second target sensitive word cannot be used as a sensitive word, the second target sensitive word is discarded.

[0108] In one embodiment, preferably, the method further includes:

[0109] When it is determined through manual review that the second target sensitive word does not meet the sensitive word extraction rules, a fourth target sensitive word is extracted from the full online post and comment data and added to the total sensitive word library.

[0110] By supplementing the overall sensitive word database, the problems of discovering and expanding new sensitive words have been solved.

[0111] Figure 6 This is a block diagram illustrating a sensitive word extraction device based on an internet community, according to an exemplary embodiment.

[0112] like Figure 6 As shown, according to a second aspect of the present invention, an apparatus for extracting sensitive words from internet communities is provided, the apparatus comprising:

[0113] Module 61 is used to obtain the total sensitive word library and historical post and comment data;

[0114] The first training module 62 is used to train the sensitive word database, historical post and comment data and the first preset BERT model to obtain a coarse sensitive word extraction model.

[0115] The first extraction module 63 is used to extract sensitive words from the manually reviewed illegal posting data using the sensitive word coarse extraction model, so as to extract the first target sensitive word;

[0116] Storage module 64 is used to store the first target sensitive word and its corresponding first target post comment data in the sensitive word source post comment database when the first target sensitive word is determined to meet the sensitive word extraction rules through manual review;

[0117] The second training module 65 is used to train the sensitive word source comment library and the second preset Bert model to obtain a sensitive word fine extraction model.

[0118] The second extraction module 66 is used to extract sensitive words from the full online post and comment data using the sensitive word fine extraction model, so as to extract the second target sensitive words.

[0119] In one embodiment, preferably, in one embodiment, the first training module is used for:

[0120] Based on the total sensitive word library and historical post comment data, BIO annotation is performed to obtain the first annotation post comment data;

[0121] The first post comment data after annotation and the first preset BERT model are used for training to obtain a coarse extraction model for sensitive words.

[0122] In one embodiment, preferably, the device further includes:

[0123] The first confirmation module is used to manually confirm whether the first target sensitive word can be used as a sensitive word when it is determined by manual review that the first target sensitive word meets the sensitive word extraction rules.

[0124] The first supplementary module is used to supplement the first target sensitive word into the total sensitive word library when it is confirmed by manual verification that the first target sensitive word can be used as a sensitive word;

[0125] The first discarding module is used to discard the first target sensitive word when it is manually confirmed that the first target sensitive word cannot be used as a sensitive word.

[0126] In one embodiment, preferably, the device further includes:

[0127] The second supplementary module is used to manually extract a third target sensitive word from the violation post data when it is determined by manual review that the first target sensitive word does not meet the sensitive word extraction rules, and to supplement the third target sensitive word to the total sensitive word library.

[0128] In one embodiment, preferably, the second training module is used for:

[0129] BIO annotation is performed on the first target sensitive word and its corresponding first target post comment data in the sensitive word source post comment library to obtain the annotated second post comment data;

[0130] The second post data after annotation and the second preset BERT model are used for training to obtain a sensitive word extraction model.

[0131] In one embodiment, preferably, the device further includes:

[0132] The second confirmation module is used to manually confirm whether the second target sensitive word can be used as a sensitive word when it is determined by manual review that the second target sensitive word meets the sensitive word extraction rules.

[0133] The third supplementary module is used to supplement the second target sensitive word into the total sensitive word library when it is confirmed by manual verification that the second target sensitive word can be used as a sensitive word.

[0134] The second discarding module is used to discard the second target sensitive word when it is manually confirmed that the second target sensitive word cannot be used as a sensitive word.

[0135] In one embodiment, preferably, the device further includes:

[0136] The fourth supplementary module is used to manually extract the fourth target sensitive word from the full online posting data when it is determined by manual review that the second target sensitive word does not meet the sensitive word extraction rules, and to supplement the fourth target sensitive word into the total sensitive word library.

[0137] According to a third aspect of the present invention, an apparatus for extracting sensitive words from internet communities is provided, the apparatus comprising:

[0138] processor;

[0139] Memory used to store processor-executable instructions;

[0140] The processor is configured as follows:

[0141] Obtain the total sensitive word database and historical post / comment data;

[0142] The sensitive word database, historical post and comment data, and the first preset BERT model are used for training to obtain a coarse sensitive word extraction model;

[0143] The aforementioned sensitive word coarse extraction model is used to extract sensitive words from the manually reviewed illegal postings and comments data, in order to extract the first target sensitive words;

[0144] When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word and its corresponding first target post / comment data are stored in the sensitive word source post / comment database;

[0145] The sensitive word source comment library and the second preset Bert model are used to train the model to obtain a sensitive word fine extraction model.

[0146] The sensitive word extraction model described above is used to extract sensitive words from the full online post and comment data in order to extract the second target sensitive words.

[0147] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any one of the embodiments of the first aspect.

[0148] Furthermore, it can be understood that in this invention, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

[0149] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this invention, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.

[0150] It is further understood that although the operations are described in a specific order in the accompanying drawings in the embodiments of the present invention, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0151] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0152] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for extracting sensitive words from internet communities, characterized in that, For use in a terminal device, the method includes: Obtain the total sensitive word database and historical post / comment data; Based on the total sensitive word library and historical post comment data, BIO annotation is performed to obtain the first annotated post comment data; the first annotated post comment data and the first preset BERT model are used for training to obtain a sensitive word coarse extraction model; the BIO annotation is automatic annotation; The aforementioned sensitive word coarse extraction model is used to extract sensitive words from the manually reviewed illegal postings and comments data, in order to extract the first target sensitive words; When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word and its corresponding first target post / comment data are stored in the sensitive word source post / comment database; Based on the first target sensitive word and its corresponding first target post data in the sensitive word source post comment library, BIO annotation is performed to obtain the annotated second post comment data; the annotated second post comment data and the second preset Bert model are used for training to obtain a sensitive word fine extraction model; The sensitive word extraction model described above is used to extract sensitive words from the full online post and comment data in order to extract the second target sensitive words; In this context, BIO annotation refers to labeling each element as "BX", "IX", or "O". "BX" indicates that the segment containing this element belongs to type X and this element is at the beginning of this segment, "IX" indicates that the segment containing this element belongs to type X and this element is in the middle of this segment, and "O" indicates that it does not belong to any type. When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word is manually confirmed as a sensitive word; when the first target sensitive word is manually confirmed as a sensitive word, the first target sensitive word is added to the total sensitive word library. When it is determined by manual review that the first target sensitive word does not conform to the sensitive word extraction rules, a third target sensitive word is extracted from the illegal post data and added to the total sensitive word library; When the second target sensitive word is determined to meet the sensitive word extraction rules through manual review, the second target sensitive word is manually confirmed as a sensitive word; when the second target sensitive word is manually confirmed as a sensitive word, the second target sensitive word is added to the total sensitive word library. When it is determined through manual review that the second target sensitive word does not meet the sensitive word extraction rules, a fourth target sensitive word is extracted from the full online post and comment data and added to the total sensitive word library.

2. The method according to claim 1, characterized in that, The method further includes: When it is manually confirmed that the first target sensitive word cannot be used as a sensitive word, the first target sensitive word is discarded.

3. The method according to claim 1, characterized in that, The method further includes: When it is manually confirmed that the second target sensitive word cannot be used as a sensitive word, the second target sensitive word is discarded.

4. A device for extracting sensitive words from internet communities, characterized in that, The device includes: The acquisition module is used to obtain the total sensitive word database and historical post and comment data; The first training module is used to perform BIO annotation based on the total sensitive word library and historical post comment data to obtain the first annotated post comment data; the first annotated post comment data and the first preset BERT model are used for training to obtain a sensitive word coarse extraction model; the BIO annotation is automatic annotation; The first extraction module is used to extract sensitive words from the manually reviewed illegal posting data using the sensitive word coarse extraction model, so as to extract the first target sensitive word; The storage module is used to store the first target sensitive word and its corresponding first target post comment data into the sensitive word source post comment database when the first target sensitive word is determined to meet the sensitive word extraction rules through manual review; The second training module is used to perform BIO annotation based on the first target sensitive word and its corresponding first target post data in the sensitive word source post comment library to obtain the annotated second post comment data; and to train the second preset Bert model using the annotated second post comment data to obtain a sensitive word fine extraction model. The second extraction module is used to extract sensitive words from the full online post and comment data using the sensitive word fine extraction model, so as to extract the second target sensitive words; The first confirmation module is used to manually confirm whether the first target sensitive word can be used as a sensitive word when it is determined by manual review that the first target sensitive word meets the sensitive word extraction rules. The first supplementary module is used to supplement the first target sensitive word into the total sensitive word library when it is confirmed by manual verification that the first target sensitive word can be used as a sensitive word; The second supplementary module is used to manually extract a third target sensitive word from the violation post data when it is determined by manual review that the first target sensitive word does not meet the sensitive word extraction rules, and to supplement the third target sensitive word to the total sensitive word library; The second confirmation module is used to manually confirm whether the second target sensitive word can be used as a sensitive word when it is determined by manual review that the second target sensitive word meets the sensitive word extraction rules. The third supplementary module is used to supplement the second target sensitive word into the total sensitive word library when it is confirmed by manual verification that the second target sensitive word can be used as a sensitive word. The fourth supplementary module is used to manually extract the fourth target sensitive word from the full online post and comment data when it is determined by manual review that the second target sensitive word does not meet the sensitive word extraction rules, and to supplement the fourth target sensitive word into the total sensitive word library. In this context, BIO annotation refers to labeling each element as "BX", "IX", or "O". "BX" indicates that the segment containing this element belongs to type X and this element is at the beginning of this segment. "IX" indicates that the segment containing this element belongs to type X and this element is in the middle of this segment. "O" indicates that it does not belong to any type.

5. A device for extracting sensitive words from an internet community, characterized in that, The device includes: processor; Memory used to store processor-executable instructions; The processor is configured as follows: Obtain the total sensitive word database and historical post / comment data; Based on the total sensitive word library and historical post comment data, BIO annotation is performed to obtain the first annotated post comment data; the first annotated post comment data and the first preset BERT model are used for training to obtain a sensitive word coarse extraction model; the BIO annotation is automatic annotation; The aforementioned sensitive word coarse extraction model is used to extract sensitive words from the manually reviewed illegal postings and comments data, in order to extract the first target sensitive words; When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word and its corresponding first target post / comment data are stored in the sensitive word source post / comment database; Based on the first target sensitive word and its corresponding first target post data in the sensitive word source post comment library, BIO annotation is performed to obtain the annotated second post comment data; the annotated second post comment data and the second preset Bert model are used for training to obtain a sensitive word fine extraction model; The sensitive word extraction model described above is used to extract sensitive words from the full online post and comment data in order to extract the second target sensitive words; When the first target sensitive word is determined to meet the sensitive word extraction rules through manual review, the first target sensitive word is manually confirmed as a sensitive word; when the first target sensitive word is manually confirmed as a sensitive word, the first target sensitive word is added to the total sensitive word library. When it is determined by manual review that the first target sensitive word does not conform to the sensitive word extraction rules, a third target sensitive word is extracted from the illegal post data and added to the total sensitive word library; When the second target sensitive word is determined to meet the sensitive word extraction rules through manual review, the second target sensitive word is manually confirmed as a sensitive word; when the second target sensitive word is manually confirmed as a sensitive word, the second target sensitive word is added to the total sensitive word library. When it is determined through manual review that the second target sensitive word does not meet the sensitive word extraction rules, a fourth target sensitive word is extracted from the full online post and comment data and added to the total sensitive word library; In this context, BIO annotation refers to labeling each element as "BX", "IX", or "O". "BX" indicates that the segment containing this element belongs to type X and this element is at the beginning of this segment. "IX" indicates that the segment containing this element belongs to type X and this element is in the middle of this segment. "O" indicates that it does not belong to any type.

6. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method described in any one of claims 1-3.