Method and device for expanding sensitive words of internet community and storage medium
By splitting Chinese characters into strokes and replacing similar-looking characters to generate variants of sensitive words, the problem of time-consuming manual updates to the sensitive word database is solved, enabling fast and low-cost identification of black market keywords and improving the content maintenance effect of internet communities.
Patent Information
- Application Number
- CN202210463353.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-04-28
AI Technical Summary
In existing technologies, the method of manually extracting sensitive word databases cannot be updated in a timely manner, which makes it impossible to effectively identify changes in keywords used by black market operators. Furthermore, the identification process is time-consuming, affecting the content maintenance effect of internet communities.
By obtaining a list of commonly used Chinese characters, breaking down the strokes of Chinese characters, determining a set of similar-looking characters, replacing the target Chinese characters in the sensitive words, generating a candidate extended sensitive word set, and then screening and reviewing it before adding it to the initial sensitive word library to form the target sensitive word set.
By generating variants of sensitive words in advance and quickly updating the sensitive word database, manual costs are reduced, the efficiency and accuracy of identifying black market posts and comments are improved, and the iteration cycle is shortened.
Smart Images

Figure CN114817760B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to an expansion method and device for sensitive words of an Internet community and a storage medium. BACKGROUND
[0002] In the Internet community scenario, various black production will often appear, which will attract other illegal content through posting and commenting. The posts and comments posted by them often have some same keywords. By identifying whether these sensitive words are contained in the posts and comments, the illegal content can be processed in time to achieve the purpose of maintaining the community atmosphere, that is, content anti-spam. However, the poster of illegal content will often experiment how to avoid these extracted sensitive words through testing means, which greatly reduces the effect of the sensitive words. Therefore, how to update the sensitive word library is crucial for anti-cheating. Most platforms supplement the sensitive word library through manual extraction.
[0003] The method of supplementing the sensitive word library through manual extraction can achieve certain effect, but due to the post-positioned characteristics of this method, that is, the black production must be posted and discovered by manual extraction. In the whole process, it cannot be guaranteed that every illegal post and comment is identified. Even if the keywords are extracted, due to the long time consumed, the newly added keywords are no longer effective after the change of the black production. SUMMARY
[0004] In order to overcome the problems in the related art, the present application provides an expansion method and device for sensitive words of an Internet community and a storage medium, thereby achieving the effect of predicting black production keywords and identifying black production posts and comments.
[0005] According to a first aspect of an embodiment of the present application, an expansion method for sensitive words based on an Internet community is provided for a terminal device, and the method comprises:
[0006] obtaining a common Chinese character table and performing stroke splitting on each common Chinese character in the common Chinese character table;
[0007] determining the near-formation words corresponding to each common Chinese character according to the strokes of the common Chinese character, to obtain a near-formation word set corresponding to each common Chinese character;
[0008] obtaining an initial sensitive word set and extracting target common Chinese characters from each sensitive word in the initial sensitive word set;
[0009] replacing the target common Chinese characters with the near-formation word set corresponding to the target common Chinese characters to obtain a candidate expansion sensitive word set corresponding to the sensitive word;
[0010] screening and auditing each candidate extended sensitive word in the candidate extended sensitive word set corresponding to each sensitive word to obtain an extended sensitive word;
[0011] adding the extended sensitive word to the initial sensitive word set to obtain a target sensitive word set.
[0012] In an embodiment, preferably, the method further comprises:
[0013] performing sensitive word detection on post evaluation data in an Internet community using the target sensitive word set.
[0014] In an embodiment, preferably, the similar characters corresponding to each commonly used Chinese character are determined according to strokes of the commonly used Chinese character to obtain a set of similar characters corresponding to each commonly used Chinese character, comprising:
[0015] calculating a maximum number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character in the commonly used Chinese character table according to total strokes;
[0016] calculating a number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character according to stroke names;
[0017] when the number of dissimilar strokes is greater than the maximum number of dissimilar strokes, determining that the commonly used Chinese character and the other commonly used Chinese character are not similar characters;
[0018] when the number of dissimilar strokes is less than or equal to the maximum number of dissimilar strokes, determining that the commonly used Chinese character and the other commonly used Chinese character are similar characters, and adding the other commonly used Chinese character to the set of similar characters corresponding to the commonly used Chinese character.
[0019] In an embodiment, preferably, the maximum number of dissimilar strokes A is calculated using the following first calculation formula:
[0020]
[0021] wherein A represents the maximum number of dissimilar strokes, Floor represents a floor function, Sa represents the total number of strokes of the commonly used Chinese character, Sb represents the total number of strokes of the other commonly used Chinese character, and min(Sa, Sb) represents the number of strokes of the smaller one of Sa and Sb.
[0022] In an embodiment, preferably, screening and auditing each candidate extended sensitive word in the candidate extended sensitive word set corresponding to each sensitive word to obtain an extended sensitive word, comprises:
[0023] calculating a maximum number of inconsistent strokes between the sensitive word and each candidate extended sensitive word according to total strokes;
[0024] According to the stroke name, calculate the number of inconsistent strokes between the sensitive word and each candidate extended sensitive word;
[0025] When the number of inconsistent strokes is greater than the maximum number of inconsistent strokes, discard the candidate extended sensitive word;
[0026] When the number of inconsistent strokes is less than or equal to the maximum number of inconsistent strokes, manually review the candidate extended sensitive word, and determine the candidate extended sensitive word as an extended sensitive word after manual review is passed.
[0027] In one embodiment, preferably, the maximum number of inconsistent strokes B is calculated using the following second calculation formula:
[0028]
[0029] Wherein, B represents the maximum number of inconsistent strokes, Wa represents the total number of strokes of the sensitive word, Wb represents the total number of strokes of the candidate extended sensitive word, and Floor represents the floor function.
[0030] According to a second aspect of the embodiment of the present application, an apparatus for extending sensitive words of an Internet community is provided, and the apparatus comprises:
[0031] An acquisition module is configured to acquire a commonly used Chinese character table and perform stroke splitting on each commonly used Chinese character in the commonly used Chinese character table.
[0032] A determination module is configured to determine a set of similar characters corresponding to each commonly used Chinese character according to the strokes of the commonly used Chinese character.
[0033] An extraction module is configured to acquire an initial sensitive word set and extract a target commonly used Chinese character from each sensitive word in the initial sensitive word set.
[0034] A replacement module is configured to replace the target commonly used Chinese character with the set of similar characters corresponding to the target commonly used Chinese character to obtain a set of candidate extended sensitive words corresponding to the sensitive word.
[0035] A processing module is configured to screen and review each candidate extended sensitive word in the set of candidate extended sensitive words corresponding to each sensitive word to obtain an extended sensitive word.
[0036] An addition module is configured to add the extended sensitive word to the initial sensitive word set to obtain a target sensitive word set.
[0037] In one embodiment, preferably, the apparatus further comprises:
[0038] A detection module is configured to perform sensitive word detection on post review data in the Internet community using the target sensitive word set.
[0039] In one embodiment, preferably, the determining module includes:
[0040] The first calculation unit is used to calculate the maximum number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character in the table of commonly used Chinese characters, based on the total number of strokes.
[0041] The second calculation unit is used to calculate the number of dissimilar strokes between each commonly used Chinese character and each of the other commonly used Chinese characters, based on the stroke names.
[0042] The first determining unit is used to determine that the commonly used Chinese character and the other commonly used Chinese characters are not similar characters when the number of dissimilar strokes is greater than the maximum number of dissimilar strokes;
[0043] The second determining unit is used to determine that the commonly used Chinese character and the other commonly used Chinese characters are similar in form when the number of dissimilar strokes is less than or equal to the maximum number of dissimilar strokes, and to add the other commonly used Chinese character to the set of similar characters corresponding to the commonly used Chinese character.
[0044] In one embodiment, preferably, the maximum number of dissimilar strokes A is calculated using the following first calculation formula:
[0045]
[0046] Where A represents the maximum number of dissimilar strokes, Floor represents the floor function, Sa represents the total number of strokes of the commonly used Chinese characters, Sb represents the total number of strokes of the other commonly used Chinese characters, and min(Sa,Sb) means taking the one with the smaller number of strokes between Sa and Sb.
[0047] In one embodiment, preferably, the processing module includes:
[0048] The third calculation module is used to calculate the maximum number of inconsistent strokes between the sensitive word and each candidate extended sensitive word based on the total number of strokes.
[0049] The fourth calculation module is used to calculate the number of inconsistent strokes between the sensitive word and each candidate extended sensitive word based on the stroke name;
[0050] The first processing unit is used to discard the candidate extended sensitive words when the number of inconsistent strokes is greater than the maximum number of inconsistent strokes.
[0051] The second processing unit is used to manually review the candidate extended sensitive words when the number of inconsistent strokes is less than or equal to the maximum number of inconsistent strokes, and to determine the candidate extended sensitive words as extended sensitive words after the manual review is passed.
[0052] In one embodiment, preferably, the following second calculation formula is used to calculate the maximum number of inconsistent strokes B:
[0053]
[0054] Wherein, B represents the maximum number of inconsistent strokes, Wa represents the total number of strokes of the sensitive word, Wb represents the total number of strokes of the candidate extended sensitive word, and Floor represents a floor function.
[0055] According to a third aspect of the embodiments of the present application, an extension device of a sensitive word of an Internet community is provided, and the device comprises:
[0056] A processor;
[0057] A memory for storing processor-executable instructions;
[0058] The processor is configured to:
[0059] Obtain a commonly used Chinese character table, and perform stroke splitting on each commonly used Chinese character in the commonly used Chinese character table;
[0060] Determine the homograph corresponding to each commonly used Chinese character according to the strokes of the commonly used Chinese character, to obtain a homograph set corresponding to each commonly used Chinese character;
[0061] Obtain an initial sensitive word set, and extract a target commonly used Chinese character from each sensitive word in the initial sensitive word set;
[0062] Replace the target commonly used Chinese character with the homograph set corresponding to the target commonly used Chinese character, to obtain a candidate extended sensitive word set corresponding to the sensitive word;
[0063] Screen and audit each candidate extended sensitive word in the candidate extended sensitive word set corresponding to each sensitive word, to obtain an extended sensitive word;
[0064] Add the extended sensitive word to the initial sensitive word set, to obtain a target sensitive word set.
[0065] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, and the medium stores computer instructions, and the instructions are executed by a processor to implement the steps of the method according to any one of the embodiments of the first aspect.
[0066] The technical solutions provided by the embodiments of the present application can include the following beneficial effects:
[0067] In the embodiment of the present application, by using the similar character to expand the sensitive word library, some variants of the sensitive word are generated in advance, and after secondary filtering, the sensitive words that cannot be read are removed after review, and the easy-to-read variants are added to the sensitive word library, which has the effect of predicting black production keywords, so as to achieve the effect of identifying black production comments. Compared with some complex language recognition models, such as Bert, the method has the characteristics of fast iteration speed, short cycle, low labor cost and the like.
[0068] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0069] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0070] Figure 1 is a flowchart of an internet community-based sensitive word expansion method according to an exemplary embodiment.
[0071] Figure 2 is a flowchart of another internet community-based sensitive word expansion method according to an exemplary embodiment.
[0072] Figure 3 is a flowchart of step S102 in an internet community-based sensitive word expansion method according to an exemplary embodiment.
[0073] Figure 4 is a flowchart of step S105 in an internet community-based sensitive word expansion method according to an exemplary embodiment.
[0074] Figure 5 is a block diagram of an internet community-based sensitive word expansion device according to an exemplary embodiment.
[0075] Figure 6 is a block diagram of another internet community-based sensitive word expansion device according to an exemplary embodiment.
[0076] Figure 7 is a block diagram of a determination module in an internet community-based sensitive word expansion device according to an exemplary embodiment.
[0077] Figure 8 is a block diagram of a determination module in an internet community-based sensitive word expansion device according to an exemplary embodiment. DETAILED DESCRIPTION
[0078] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0079] Figure 1 is a flowchart of an extended method for sensitive words based on an Internet community shown according to an exemplary embodiment.
[0080] As Figure 1 shown, according to the first aspect of the embodiments of the present invention, there is provided an extended method for sensitive words based on an Internet community, for a terminal device, the method includes:
[0081] Step S101, obtain a common Chinese character table, and perform stroke splitting on each common Chinese character in the common Chinese character table; the general table of common Chinese characters, according to the "Table of Commonly Used Chinese Characters" published in 1998, contains 2,500 commonly used Chinese characters in the Chinese mainland and 1,000 less commonly used Chinese characters. Perform stroke disassembling on each Chinese character in the common Chinese character table, and convert each Chinese character into a collection of the smallest strokes. For example, the Chinese character "big" can be disassembled into three strokes - horizontal, left-falling stroke, and right-falling stroke.
[0082] Step S102, determine the similar-shaped Chinese characters corresponding to each common Chinese character according to the strokes of each common Chinese character, so as to obtain a set of similar-shaped Chinese characters corresponding to each common Chinese character;
[0083] Step S103, obtain an initial sensitive word set, and extract target common Chinese characters from each sensitive word in the initial sensitive word set;
[0084] Step S104, replace the target common Chinese characters according to the set of similar-shaped Chinese characters corresponding to the target common Chinese characters, so as to obtain a candidate extended sensitive word set corresponding to the sensitive word;
[0085] Step S105, screen and review each candidate extended sensitive word in the candidate extended sensitive word set corresponding to each sensitive word to obtain extended sensitive words;
[0086] Step S106, add the extended sensitive words to the initial sensitive word set to obtain a target sensitive word set.
[0087] In this embodiment, by using the similar character to expand the sensitive word library, some variants of the sensitive word are generated in advance, and after secondary filtering, the unreadable sensitive words are removed after review, and the readable variants are added to the sensitive word library, which has the effect of predicting black production keywords, so as to achieve the effect of identifying black production comments. At the same time, compared with some complex language recognition models such as Bert, it has the characteristics of fast iteration speed, short cycle and low labor cost.
[0088] Figure 2 FIG. 6 is a flowchart illustrating another method for expanding sensitive words based on an Internet community according to an example embodiment.
[0089] As shown in FIG. 6, in one embodiment, preferably, the method further comprises: Figure 2
[0090] Step S201, using the target sensitive word set to detect sensitive words in the post comment data in the Internet community.
[0091] In this embodiment, online post comment data is obtained, which is issued by a user and is new incremental unreviewed data. In combination with the target sensitive word set and the online post comment data, it is verified whether any sensitive word in the target sensitive word set is contained in the post comment. If the post comment does not contain any sensitive word in the target sensitive word set, the post comment enters the next review link. If the post comment contains a sensitive word, the post comment directly enters the human review link.
[0092] Figure 3 FIG. 5 is a flowchart illustrating step S102 in a method for expanding sensitive words based on an Internet community according to an example embodiment.
[0093] As shown in FIG. 5, in one embodiment, preferably, step S102 comprises: Figure 3
[0094] Step S301, calculating the maximum dissimilar stroke number between each commonly used Chinese character and each other commonly used Chinese character in the commonly used Chinese character table according to the total stroke number;
[0095] In one embodiment, preferably, the maximum dissimilar stroke number A is calculated by using the following first calculation formula:
[0096]
[0097] Wherein, A represents the maximum dissimilar stroke number, Floor represents the floor function, Sa represents the total stroke number of the commonly used Chinese character, Sb represents the total stroke number of the other commonly used Chinese character, and min(Sa, Sb) represents the stroke number of the smaller one of Sa and Sb.
[0098] For example, "大" (big) and "犬" (dog). "大" can be disassembled into a horizontal stroke, a left-falling stroke, and a right-falling stroke. "犬" can be disassembled into a horizontal stroke, a left-falling stroke, a right-falling stroke, and a dot. The common strokes of the two characters are the horizontal stroke, the left-falling stroke, and the right-falling stroke, and the different stroke is the dot. Therefore, the maximum number of dissimilar strokes between "大" and "犬" is 0.
[0099] Step S302: Calculate the number of dissimilar strokes between each common Chinese character and each of the other common Chinese characters according to the stroke names.
[0100] Calculate the number of inconsistent strokes between two Chinese characters. Among them, replacement and lack are both recorded as different. For example, for "大" and "犬", "大" can be disassembled into a horizontal stroke, a left-falling stroke, and a right-falling stroke, and "犬" can be disassembled into a horizontal stroke, a left-falling stroke, a right-falling stroke, and a dot. The common strokes of the two characters are the horizontal stroke, the left-falling stroke, and the right-falling stroke, and the different stroke is the dot. Therefore, the number of dissimilar strokes between "大" and "犬" is 1.
[0101] Step S303: When the number of dissimilar strokes is greater than the maximum number of dissimilar strokes, determine that the common Chinese character and the other common Chinese character are not similar-looking characters; for example, "大" and "犬".
[0102] Step S304: When the number of dissimilar strokes is less than or equal to the maximum number of dissimilar strokes, determine that the common Chinese character and the other common Chinese character are similar-looking characters, and add the other common Chinese character to the set of similar-looking characters corresponding to the common Chinese character. For example, "大" and "丈".
[0103] Figure 4 It is a flowchart of step S105 in an extended method for sensitive words based on an Internet community shown according to an exemplary embodiment.
[0104] Such as Figure 4 As shown, in one embodiment, preferably, step S105 includes:
[0105] Step S401: Calculate the maximum number of inconsistent strokes between the sensitive word and each candidate extended sensitive word according to the total number of strokes.
[0106] In one embodiment, preferably, the following second calculation formula is used to calculate the maximum number of inconsistent strokes B:
[0107]
[0108] Among them, B represents the maximum number of inconsistent strokes, Wa represents the total number of strokes of the sensitive word, Wb represents the total number of strokes of the candidate extended sensitive word, and Floor represents the floor function.
[0109] For example, "help you dominate the server" and "help you灞菔", where "help you dominate the server" can be disassembled into 43 strokes, and "help you灞菔" can be disassembled into 49 strokes. Therefore, the maximum number of dissimilar strokes between "help you dominate the server" and "help you灞菔" is 8.
[0110] Step S402, according to the stroke names, calculate the number of inconsistent strokes between the sensitive word and each candidate extended sensitive word; for example, "help you dominate the server" and "help you灞菔", where "help you dominate the server" can be disassembled into 43 strokes, and "help you灞菔" can be disassembled into 49 strokes. The same strokes of the two words are all the strokes in "help you dominate the server", and the different strokes are the 6 strokes included in "氵" and "艹". Therefore, the number of dissimilar strokes between "help you dominate the server" and "help you灞菔" is 6.
[0111] Step S403, when the number of inconsistent strokes is greater than the maximum number of inconsistent strokes, discard the candidate extended sensitive word;
[0112] Step S404, when the number of inconsistent strokes is less than or equal to the maximum number of inconsistent strokes, conduct a manual review of the candidate extended sensitive word, and after the manual review is passed, determine the candidate extended sensitive word as an extended sensitive word.
[0113] Figure 5 is a block diagram of an extended device for sensitive words based on an Internet community shown according to an exemplary embodiment.
[0114] Such as Figure 5 As shown, according to the second aspect of the embodiments of the present invention, there is provided an extended device for sensitive words based on an Internet community, and the device includes:
[0115] An acquisition module 51, configured to acquire a common Chinese character table and disassemble the strokes of each common Chinese character in the common Chinese character table;
[0116] A determination module 52, configured to determine the similar-shaped characters corresponding to each common Chinese character according to the strokes of each common Chinese character, so as to obtain a set of similar-shaped characters corresponding to each common Chinese character;
[0117] An extraction module 53, configured to acquire an initial sensitive word set and extract target common Chinese characters from each sensitive word in the initial sensitive word set;
[0118] A replacement module 54, configured to replace the target common Chinese character according to the set of similar-shaped characters corresponding to the target common Chinese character, so as to obtain a set of candidate extended sensitive words corresponding to the sensitive word;
[0119] A processing module 55, configured to screen and review each candidate extended sensitive word in the set of candidate extended sensitive words corresponding to each sensitive word, and obtain an extended sensitive word;
[0120] An adding module 56 is configured to add the extended sensitive words to the initial sensitive word set to obtain a target sensitive word set.
[0121] Figure 6 FIG. 6 is a block diagram of another apparatus for extending sensitive words based on an Internet community according to an example embodiment.
[0122] As shown in FIG. 6, in one embodiment, preferably, the apparatus further comprises: Figure 6 A detecting module 61 is configured to perform sensitive word detection on post data in the Internet community using the target sensitive word set.
[0123]
[0124] FIG. 7 is a block diagram of a determining module in an apparatus for extending sensitive words based on an Internet community according to an example embodiment. Figure 7 As shown in FIG. 7, in one embodiment, preferably, the determining module 52 comprises:
[0125] Figure 7 A first calculating unit 71 is configured to calculate a maximum number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character in the commonly used Chinese character table according to a total number of strokes.
[0126] A second calculating unit 72 is configured to calculate a number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character according to stroke names.
[0127] A first determining unit 73 is configured to determine that the commonly used Chinese character and the other commonly used Chinese character are not homophonic characters when the number of dissimilar strokes is greater than the maximum number of dissimilar strokes.
[0128] A second determining unit 74 is configured to determine that the commonly used Chinese character and the other commonly used Chinese character are homophonic characters when the number of dissimilar strokes is less than or equal to the maximum number of dissimilar strokes, and to add the other commonly used Chinese character to a homophonic character set corresponding to the commonly used Chinese character.
[0129] In one embodiment, preferably, the maximum number of dissimilar strokes A is calculated using the following first calculation formula:
[0130]
[0131] wherein A represents the maximum number of dissimilar strokes, Floor represents a floor function, Sa represents a total number of strokes of the commonly used Chinese character, Sb represents a total number of strokes of the other commonly used Chinese character, and min(Sa, Sb) represents a number of strokes of a smaller one of Sa and Sb.
[0132]
[0133] Figure 8 is a block diagram of a determining module in an Internet community-based sensitive word extension device according to an exemplary embodiment.
[0134] As shown in Figure 8 In one embodiment, preferably, the processing module 55 comprises:
[0135] a third calculating module 81, configured to calculate a maximum inconsistent stroke number between the sensitive word and each candidate extended sensitive word according to the total stroke number;
[0136] a fourth calculating module 82, configured to calculate an inconsistent stroke number between the sensitive word and each candidate extended sensitive word according to stroke names;
[0137] a first processing unit 83, configured to discard the candidate extended sensitive word when the inconsistent stroke number is greater than the maximum inconsistent stroke number;
[0138] a second processing unit 84, configured to perform manual review on the candidate extended sensitive word when the inconsistent stroke number is less than or equal to the maximum inconsistent stroke number, and determine the candidate extended sensitive word as an extended sensitive word after the manual review is passed.
[0139] In one embodiment, preferably, the maximum inconsistent stroke number B is calculated by using the following second calculating formula:
[0140]
[0141] wherein B represents the maximum inconsistent stroke number, Wa represents the total stroke number of the sensitive word, Wb represents the total stroke number of the candidate extended sensitive word, and Floor represents a down-round function.
[0142] According to a third aspect of an embodiment of the present application, there is provided an Internet community-based sensitive word extension device, which comprises:
[0143] a processor;
[0144] a memory for storing processor-executable instructions;
[0145] wherein the processor is configured to:
[0146] obtain a commonly-used Chinese character table, and perform stroke splitting on each commonly-used Chinese character in the commonly-used Chinese character table;
[0147] determine a set of homograph of each commonly-used Chinese character according to strokes of the commonly-used Chinese character;
[0148] obtain an initial sensitive word set, and extract a target commonly-used Chinese character from each sensitive word in the initial sensitive word set;
[0149] replacing the target commonly-used Chinese character with a set of homophonic characters corresponding to the target commonly-used Chinese character to obtain a candidate extended sensitive word set corresponding to the sensitive word;
[0150] screening and auditing each candidate extended sensitive word in the candidate extended sensitive word set corresponding to each sensitive word to obtain an extended sensitive word;
[0151] adding the extended sensitive word to the initial sensitive word set to obtain a target sensitive word set.
[0152] According to a fourth aspect of the embodiment of the present application, a computer readable storage medium is provided, which stores computer instructions, and the instructions are executed by a processor to implement the steps of the method according to any one of the embodiments of the first aspect.
[0153] It should be further understood that “multiple” in the present application refers to two or more, and other quantifiers are similar. “And / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship. The singular form “a”, “said” and “the” are also intended to include the plural form, unless the context clearly indicates otherwise.
[0154] It should be further understood that the terms “first”, “second”, etc. are used to describe various information, but these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not represent a specific order or importance. In fact, the expressions of “first”, “second”, etc. can be used interchangeably. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information without departing from the scope of the present application.
[0155] It should be further understood that although the operations are described in a specific order in the accompanying drawings in the embodiments of the present application, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring all the operations to be performed to obtain the desired results. In a specific environment, multi-tasking and parallel processing can be advantageous.
[0156] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
[0157] It is to be understood that the application is not limited to the precise construction herein described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be indicated by the appended claims, rather than the description and examples.
Claims
1. An extension method of sensitive words of an Internet community, characterized in that, The method for a terminal device comprises: In step S101, a commonly used Chinese character table is obtained, and strokes of each commonly used Chinese character in the commonly used Chinese character table are split; In step S102, according to the strokes of each commonly used Chinese character, a set of similar characters corresponding to each commonly used Chinese character is obtained; The step S102 comprises: In step S301, according to the total number of strokes, a maximum number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character in the commonly used Chinese character table is calculated; In step S302, according to the stroke name, a number of dissimilar strokes between each commonly used Chinese character and each other commonly used Chinese character is calculated; In step S303, when the number of dissimilar strokes is greater than the maximum number of dissimilar strokes, it is determined that the commonly used Chinese character and the other commonly used Chinese character are not similar characters; In step S304, when the number of dissimilar strokes is less than or equal to the maximum number of dissimilar strokes, it is determined that the commonly used Chinese character and the other commonly used Chinese character are similar characters, and the other commonly used Chinese character is added to the set of similar characters corresponding to the commonly used Chinese character; Wherein, the maximum number of dissimilar strokes A is calculated by using the following first calculation formula: wherein A represents the maximum number of dissimilar strokes, Floor represents a floor function, represents the total number of strokes of the commonly used Chinese characters, represents the total number of strokes of the other commonly used Chinese characters, represents taking a middle number of strokes. In step S103, an initial sensitive word set is obtained, and a target commonly used Chinese character is extracted from each sensitive word in the initial sensitive word set; In step S104, according to the set of similar characters corresponding to the target commonly used Chinese character, the target commonly used Chinese character is replaced to obtain a candidate expanded sensitive word set corresponding to the sensitive word; The step S104 comprises: In step S401, according to the total number of strokes, a maximum number of inconsistent strokes between the sensitive word and each candidate expanded sensitive word is calculated; In step S402, according to the stroke name, a number of inconsistent strokes between the sensitive word and each candidate expanded sensitive word is calculated; In step S403, when the number of inconsistent strokes is greater than the maximum number of inconsistent strokes, the candidate expanded sensitive word is discarded; In step S404, when the number of inconsistent strokes is less than or equal to the maximum number of inconsistent strokes, the candidate expanded sensitive word is manually audited, and after the manual audit is passed, the candidate expanded sensitive word is determined as an expanded sensitive word; Wherein, the maximum number of inconsistent strokes B is calculated by using the following second calculation formula: wherein B represents the maximum number of inconsistent strokes, represents the total number of strokes of the sensitive word, represents the total number of strokes of the candidate extended sensitive word, and Floor represents a floor function. In step S105, each candidate expanded sensitive word in the candidate expanded sensitive word set corresponding to each sensitive word is screened and audited to obtain an expanded sensitive word; In step S106, the expanded sensitive word is added to the initial sensitive word set to obtain a target sensitive word set.
2. The method of claim 1, wherein, The method further comprises: In step S201, the target sensitive word set is used for sensitive word detection on post evaluation data in an Internet community.
3. A computer readable storage medium having stored thereon computer instructions, wherein, The instructions are executed by the processor to implement the steps of the method of any one of claims 1-2.
Citation Information
Patent Citations
Recognizing and verifying method and system for anagram
CN107357778A
Automatic construction method and device of text proofreading error word library
CN107665190A
Sensitive word derivative vocabulary discovery method, device and system and storage medium
CN114386385A