A text hierarchical desensitization method and system based on a syntax tree and a storage medium
By constructing a syntax tree to prioritize matching semantically related keywords and processing sensitive words hierarchically, this method solves the problems of high computational load, redundancy, and resource waste in existing technologies, and realizes an efficient and simplified hierarchical text desensitization method.
Patent Information
- Application Number
- CN202410323919.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-03-21
AI Technical Summary
Existing technologies for text processing suffer from problems such as massive computational demands, data redundancy, redundant processing procedures, inability to handle semantic relationships of sensitive words, and resource waste due to multiple processing steps.
A syntax tree-based hierarchical text desensitization method is adopted. By constructing a syntax tree, keywords are matched first based on semantic relevance. Sensitive words are processed hierarchically, and different desensitization strategies are adopted, such as encryption, random replacement and displacement operation. Different processing methods are used for different levels of sensitive words.
It improves text matching efficiency, reduces computation, avoids resource waste, simplifies the processing flow, enhances generalization, and makes subsequent operations more convenient.
Smart Images

Figure CN118332586B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of data security, specifically relating to a text hierarchical desensitization method, system, and storage medium based on syntax trees. Background Technology
[0002] With the rapid development of the internet age, data security has become increasingly important. Existing patent 202211666253.3 discloses a text processing method, apparatus, and electronic device. This method involves obtaining a reference word list of sensitive words and their corresponding first weights; traversing the text based on the reference word list to determine the set of target sensitive words contained within the text; and, if the number of target sensitive words in the target word set is less than a first threshold and the number of header target sensitive words is less than a second threshold, processing the text to be published using a text processing model to determine the sensitivity probability of the text to be published; and determining whether to block the text to be published based on the first weight and sensitivity probability of each target sensitive word. However, this solution assigns a corresponding first weight to each sensitive word, and does not specify whether the first weights for each sensitive word are different. If the number of sensitive words in the text is too large, it may lead to risks such as massive data volume and data redundancy. If each sensitive word corresponds to a unique first weight, it will cause inconvenience in subsequent operations of adding or deleting sensitive words. In summary, although this solution can achieve the stated function, it still involves a large amount of computation and carries the risk of data redundancy.
[0003] Existing patent 202110466698.6 discloses a text processing method, apparatus, electronic device, and storage medium. The method involves acquiring the text to be processed; then, for each sensitive word in a first preset set of sensitive words, in response to determining that the text to be processed includes the sensitive word, performing a first masking process on the location of the sensitive word in the text to be processed; then, performing word segmentation processing on the text to be processed after the first masking process to obtain a word segmentation sequence; finally, for each word in the word segmentation sequence to be processed, in response to determining that the word belongs to a second preset set of sensitive words, performing a second masking process on the corresponding location of the word in the text to be processed after the first masking process, thereby achieving hierarchical processing of sensitive words. This scheme processes the entire text to obtain a first preset set of sensitive words, performs a first masking process on the locations of the sensitive words, processes the text obtained after the first masking process again to obtain a second preset set of sensitive words, and then performs a second masking process on the sensitive words in this set, thus achieving hierarchical processing of sensitive words. However, while existing solutions can achieve graded processing of sensitive words, the process is redundant. Sensitive words in the second preset set of sensitive words need to be processed in the first step before a second processing step can be performed. Furthermore, this method can only process sensitive words at two levels. If multiple levels of processing are performed, the processing flow will iterate again, making the process even more complicated. Therefore, it is only suitable for situations with a small number of sensitive word grades and has poor generalization ability.
[0004] Existing patent 202211295311.6 discloses a sensitive word matching method, apparatus, device, storage medium, and product. It identifies the language type of the information to be identified, determines the sensitive word library corresponding to that language type, performs a first preprocessing on the information to be identified based on the determined sensitive word library to obtain a first preprocessing result, and performs sensitive word matching on the first preprocessing result in the determined sensitive word library to obtain a sensitive word matching result. Different processing methods are used for preprocessing the information to be identified for different language types, and different sensitive word libraries are used for sensitive word matching based on different language types. The first preprocessing result obtained after preprocessing can more accurately match sensitive words in the corresponding sensitive word library, and can match sensitive words according to the language rules of the corresponding language in the rule-based dictionary, making the matching of sensitive words more comprehensive and flexible, effectively improving the accuracy of sensitive word identification in the information to be identified. However, this solution can only match sensitive words through a simple string matching method, which has inherent limitations: it cannot handle the semantic relationships between sensitive words. In actual business scenarios, the words in the dictionary to be matched may have strong semantic relationships. For example, the words to be matched are: A "vast", B "river", C "grassland", and D "sea". Existing methods, after retrieving word A, cannot understand its semantics and can only mechanically match word A, failing to connect it to words B, C, and D. Furthermore, existing methods process different levels of sensitive words multiple times, reprocessing already processed sensitive words, which is redundant and wasteful of resources. Summary of the Invention
[0005] The purpose of this invention is to provide a text hierarchical desensitization method, system, and storage medium based on syntax trees, aiming to solve the above-mentioned problems and improve efficiency and reduce the risk of attack by adopting a hierarchical desensitization method for different sensitive words.
[0006] This invention is mainly achieved through the following technical solutions:
[0007] A syntax tree-based hierarchical text anonymization method includes the following steps:
[0008] Step S1: Create a thesaurus by adding sensitive words to the text to be matched and technical terms related to the text type to the thesaurus;
[0009] Step S2: Construct a syntax tree T based on the semantic relevance between the sensitive words in the text to be matched;
[0010] Step S3: Perform Chinese word segmentation on the text to be matched in the dictionary using a string matching-based word segmentation method;
[0011] Step S4: Combine the characteristics of the syntax tree to perform sensitive word matching on the word segmentation groups obtained from word segmentation. When node A is matched, A is added to the Map for storage to prevent the matching process from forming a cycle, and priority is given to matching the keywords represented by the child nodes of A to improve the group matching efficiency.
[0012] Step S5: Perform hierarchical desensitization on the matched sensitive words:
[0013] Step S51: Divide the matched sensitive words into Level 1, Level 2, and Level 3 sensitive words according to the classification criteria;
[0014] Step S52: For level 1 sensitive words, use an encryption algorithm to encrypt them, and then use the average value of the digital key to encrypt the key;
[0015] Step S53: For secondary sensitive words, calculate the number of digits to be replaced, and then replace the secondary sensitive words with random values or numerical values;
[0016] Step S54: For level 3 sensitive words, perform random shift and rounding operations in sequence.
[0017] To better realize the present invention, step S52 further includes the following steps:
[0018] Step SA1: First, convert the matched first-level sensitive words into a first string P consisting of the sensitive words and their positions in the article;
[0019] Step SA2: Input the key K and the first string P into the encryption function F(K,P);
[0020] Step SA3: The first string P and the key K are split into several groups, each group is encrypted separately, and finally the encrypted contents are combined to form ciphertext C;
[0021] Step SA4: After encryption, take the average value of the key K to obtain K', and then return C+K' to the user.
[0022] To better implement the present invention, step S53 further includes the following steps:
[0023] Step SB1: Convert the matched secondary sensitive words into a second string M2, which is the sensitive word plus its position in the article.
[0024] Step SB2: Define the function F(x) as:
[0025] F(x+1)=(F(x)*A+C)modm
[0026] Where A and C are constants,
[0027] mod is the modulo operation.
[0028] m is a prime number with the smallest absolute difference from the second string M2;
[0029] Step SB3: Next, define the function G(x) as:
[0030] G(x) = F(x) mod (b+1)
[0031] Where b is the number of bits in the second string M2;
[0032] Step SB4: Use the function G(x) to randomly generate multiple values smaller than the number of digits in the second string M2. Define the values corresponding to the number of digits in the second string M2 as the number group X to be randomly replaced. Then, use the function G(x) to calculate the replacement number group Y for each digit in X. Finally, restore Y to the corresponding position in the original second string M2. For M2-X that are not randomly generated, replace them with values according to the pre-established database.
[0033] To better implement the present invention, in step S54, the matched level 3 sensitive words are converted into a third string M3 consisting of the sensitive word and its position in the article. Then, the third string M3 is shifted one position to the left, that is, the third string M3 is divided by 2, and the result is rounded down.
[0034] To better realize the present invention, step S2 further includes the following steps:
[0035] Step S21: Tokenization: Decompose the sentence in the text to be matched into a sequence of words or sub-words.
[0036] Step S22: Part-of-speech tagging: Determine the part of speech for each word to facilitate understanding its grammatical role in the sentence;
[0037] Step S23: Dependency Analysis: Construct a directed graph by determining the dependency relationships between words. G =( V , E () indicates the grammatical structure between words in a sentence.
[0038] in, V This represents a set of nodes, i.e., the words in a sentence; V =( t 1, t 2, t 3,…, t M ), M The number of words or subwords after word segmentation;
[0039] EIndicates the dependency relationship between words; E ={( t i , t j , R i,j |1≤i,j≥ M,R i,j For dependency relationship tags};
[0040] Step S24: Based on the directed graph G Building a syntax tree T .
[0041] To better realize the present invention, in step S21, by learning the semantic relationships between words, each word is mapped to a point in a high-dimensional real vector space; in this vector space, semantically similar words are mapped to nearby points, thereby capturing the semantic associations between words.
[0042] This invention is mainly achieved through the following technical solutions:
[0043] A syntax tree-based text hierarchical desensitization system, based on the aforementioned method, includes a word segmentation matching module, a sensitivity classification module, and a desensitization module. The word segmentation matching module performs Chinese word segmentation on the text to be matched, constructs a syntax tree based on the semantic relevance between the words to be matched, and matches the word segments based on the properties of the syntax tree. The sensitivity classification module classifies the matched sensitive words into different levels of sensitive words according to a classification standard. The desensitization module performs hierarchical desensitization based on the sensitivity level of the sensitive words.
[0044] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the above-described method.
[0045] The beneficial effects of this invention are as follows:
[0046] (1) This invention uses a word segmentation method based on string matching to segment the text, thereby optimizing the attempt to match the text to be matched; secondly, it uses a syntax tree to prioritize matching keywords that are semantically more relevant to the matched keywords, thereby reducing the number of attempts and backtracking in group matching and effectively improving the matching efficiency of group matching.
[0047] (2) The present invention adopts a graded desensitization method for sensitive words, which can not only distinguish the sensitivity and confidentiality of sensitive words, but also adopt complex desensitization methods for sensitive words with high confidentiality level, and adopt relatively computationally-saving desensitization methods for sensitive words with relatively low confidentiality level, which is targeted and avoids the waste of computing power.
[0048] (3) This invention only requires one matching of the entire text and uses an innovative method of constructing a syntax tree to match sensitive words, saving time and improving matching efficiency. Different processing methods are used for the matched sensitive words according to their sensitivity level. Compared with the prior art, this invention adopts a hierarchical processing method for sensitive words, which is more efficient. Furthermore, subsequent operations such as adding, deleting, and modifying sensitive words do not involve other sensitive words, making the operation more convenient and resource-saving.
[0049] (4) Regarding the method for matching sensitive words, this invention innovatively employs jieba segmentation of the text to be matched, manually constructs a syntax tree based on the semantic relevance between the keywords to be matched, and uses the characteristics of the syntax tree to perform keyword matching on the segmented output to improve matching efficiency. In processing sensitive words at different levels, it does not process them multiple times, but rather uses different processing methods for different levels of sensitive words, requiring each level of sensitive word to be processed only once, ensuring safety and efficiency. Compared to the above methods, the processing flow of this invention is simpler and has stronger generalization capabilities. Attached Figure Description
[0050] Figure 1 This is a flowchart of the text keyword matching and classification method of the present invention;
[0051] Figure 2 A flowchart for constructing a syntax tree for this invention. Detailed Implementation
[0052] Example 1:
[0053] A syntax tree-based hierarchical text anonymization method, such as Figure 1 As shown, it includes the following steps:
[0054] S1: Create a thesaurus and add sensitive words and technical terms related to the text type to the thesaurus;
[0055] S2: Construct a syntax tree T based on the semantic relevance between sensitive words in the text; where the keywords represented by parent and child nodes have strong semantic relevance, and the keywords represented by parent nodes often appear before the keywords represented by child nodes.
[0056] S3: A word segmentation method based on string matching. It performs Chinese word segmentation on the text according to the created dictionary, and combines the segmented results with the characteristics of the syntax tree for matching.
[0057] S4: Combining the characteristics of the syntax tree, the output results after word segmentation are used for sensitive word matching. When node A is matched, A is added to the Map for storage to prevent the matching process from forming a cycle. Priority is given to matching the keywords represented by the child nodes of A to improve the efficiency of group matching.
[0058] S5: Perform hierarchical desensitization on the matched sensitive words.
[0059] S51: The matched sensitive words are divided into three categories according to the classification criteria;
[0060] S52: For level 1 sensitive words, an improved encryption algorithm is used to encrypt the sensitive words, and then the average value of the digital key is taken to encrypt the key;
[0061] S53: The algorithm calculates the number of digits to be replaced for secondary sensitive words, and then the secondary sensitive words are randomly replaced or numerically replaced.
[0062] S54: Random shift and rounding operations are applied to Level 3 sensitive words.
[0063] This invention uses a string matching-based word segmentation method to segment text, optimizing the attempted matching positions of the text to be matched. Secondly, it uses a syntax tree approach to prioritize matching keywords with strong semantic relevance to already matched keywords, reducing the number of matching attempts and backtracking in group matching and improving the matching efficiency of group matching. This invention employs a tiered desensitization method for sensitive words, not only distinguishing between the sensitivity and confidentiality levels of sensitive words, but also using complex desensitization methods for highly confidential sensitive words and relatively computationally efficient desensitization methods for less confidential sensitive words, thus being targeted while avoiding waste of computational resources.
[0064] Example 2:
[0065] A syntax tree-based hierarchical text anonymization method includes the following steps:
[0066] S1: Use a string matching-based word segmentation method to perform Chinese word segmentation on the text to be matched, build a syntax tree, and prioritize matching the keywords represented by the keyword child nodes that have already been matched to improve matching efficiency;
[0067] S11: Create a thesaurus by adding words and keywords related to the text type to be matched. For example, if the text is medical, the thesaurus should include not only keywords but also relevant medical terms. Ensure that the words to be matched are available when performing Chinese word segmentation on the text.
[0068] S12: Construct a syntax tree based on the semantic relevance between the words to be matched. The semantic relevance between parent and child nodes is strong; the keyword represented by the parent node appears before the child nodes in the text. Assume a sentence S consists of N words, represented as: S = ( W 1, W 2, W 3,…, W N ).like Figure 2As shown, the steps for constructing a syntax tree are as follows:
[0069] S121: Tokenization: The sentence S in the text to be matched is decomposed into a sequence of words or sub-words. This method performs tokenization through a word embedding model, that is, by learning the semantic relationships between words, each word is mapped to a point in a high-dimensional real vector space. In this vector space, semantically similar words are mapped to nearby points, thereby capturing the semantic associations between words;
[0070] S122: Part-of-speech tagging: Determine the part of speech of each word, such as noun, verb, adjective, etc. In the Chinese context, the order of parts of speech has a fixed collocation. For example, adjectives are usually followed by nouns, and nouns are followed by verbs. Part-of-speech tagging helps to understand the grammatical role of words in sentences.
[0071] S123: Dependency Analysis: Constructing a directed graph by determining the dependency relationships between words. G =( V , E ) represents the grammatical structure between words in a sentence, where V This represents a set of nodes, i.e., the words in a sentence; E This directed graph represents the dependency relationships between words. G This forms the basis of the syntax tree.
[0072] V =( t 1, t 2, t 3,…, t M )
[0073] E ={( t i , t j , R i,j |1≤i,j≥ M,R i,j For dependency relationship tags}
[0074] S124: Constructing the syntax tree: based on the directed graph G Building a syntax tree T .
[0075] S13: The forward maximum matching method in string matching word segmentation is used to scan the text to be matched and perform Chinese word segmentation. The resulting word segments include the keywords to be matched.
[0076] S14: The obtained word segments are matched using the properties of the syntax tree. For each matched word segment A in a sentence, A is added to the Map, and the keywords represented by A's child nodes are matched first. During the matching of child nodes, the Map is queried to prevent the matching process from becoming circular. Since the keywords represented by child nodes have a relatively higher probability of appearing compared to other keywords, the number of matching attempts or backtracking is reduced, improving matching efficiency.
[0077] S2: The matched sensitive words are divided into three categories according to the classification criteria, and different desensitization strategies are adopted for different levels of sensitive words;
[0078] S21: First, rewrite the matched first-level sensitive words into a first string P consisting of the sensitive words and their positions in the article. Then, feed the key K and the first string P into the encryption function F(K,P). The first string P and the key K are split into 9 groups, and each group is encrypted separately. Finally, the encrypted content is integrated to form ciphertext C. After encryption, the key K is averaged to obtain K', and then C+K' is returned to the user.
[0079] S22: Rewrite the matched secondary sensitive words into a second string M2 consisting of the sensitive word and its position in the article. First, define the function F(x) as:
[0080] F(x+1)=(F(x)*A+C)modm,
[0081] Where A and C are predetermined constants, mod is the modulo operation, m is the prime number with the smallest absolute difference from the second string M2, and then the function G(x) is defined as:
[0082] G(x) = F(x) mod (b+1)
[0083] Where b is the number of digits in the second string M2; multiple values smaller than the number of digits in the second string M2 are randomly generated by G(x), and the values corresponding to the number of digits in the second string M2 are defined as the number group X to be randomly replaced. Then, G(x) is used to calculate the number group Y to be replaced for each number in X. Then, Y is restored to the corresponding position in the original second string M2. The M2-X that are not randomly generated are replaced with values according to the pre-established database.
[0084] S23: Rewrite the matched level 3 sensitive words into a third string M3 consisting of the sensitive word and its position in the article. Then shift the third string M3 one position to the left, i.e., divide the third string M3 by 2 and round the result.
[0085] In this invention, only one matching is required for the entire text, and an innovative method of constructing a syntax tree is used to match sensitive words, saving time and improving matching efficiency. Different processing methods are applied to the matched sensitive words according to their sensitivity levels. Compared with the existing patent 202211666253.3, this invention's hierarchical processing of sensitive words is more efficient; furthermore, subsequent operations such as adding, deleting, and modifying sensitive words do not involve other sensitive words, making the operation more convenient and resource-saving.
[0086] This invention processes sensitive words only once for each level, and employs different levels of complexity in its processing for each level, with higher sensitivity levels requiring more complex processing. Compared to existing technologies, this invention has a simpler processing flow and greater generalizability.
[0087] This invention innovatively employs jieba segmentation of the text to be matched in its method for matching sensitive words. A syntax tree is constructed based on the semantic relevance between the keywords to be matched. The segmented output is then used for keyword matching, leveraging the characteristics of the syntax tree to improve matching efficiency. Furthermore, instead of processing sensitive words at different levels multiple times, different processing methods are applied to each level, ensuring that each level of sensitive word is processed only once, making it both safe and efficient.
[0088] Example 3:
[0089] A syntax tree-based hierarchical text anonymization method includes the following steps:
[0090] (1) Create a thesaurus containing technical terms related to the text type and keywords to be matched;
[0091] (2) Use a string-based text matching method to scan the text and perform Chinese word segmentation to obtain a segmented word group;
[0092] (3) Perform keyword matching on word segmentation phrases based on the properties of the syntax tree;
[0093] (4) The system classifies the matched sensitive words according to the classification criteria;
[0094] (5) Pass different levels of sensitive words into different algorithms for desensitization processing;
[0095] (6) Restore the processed sensitive words to the original document;
[0096] (7) Return the document to user U;
[0097] (8) The transaction is completed.
[0098] Regarding the method for matching sensitive words, this invention innovatively employs jieba segmentation of the text to be matched. A syntax tree is manually constructed based on the semantic relevance between the keywords to be matched. The segmented output is then used for keyword matching, leveraging the characteristics of the syntax tree to improve matching efficiency. In handling sensitive words at different levels, instead of multiple processing steps, different processing methods are applied to different levels of sensitive words, with each level requiring only one processing step, ensuring safety and efficiency. Compared to the methods described above, the processing flow of this invention is simpler and has stronger generalization capabilities.
[0099] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A text hierarchical desensitization method based on syntax trees, characterized in that, Includes the following steps: Step S1: Create a thesaurus by adding sensitive words and technical terms related to the type of text to be matched to the thesaurus; Step S2: Construct a syntax tree based on the semantic relevance between sensitive words in the text to be matched; specifically including steps S21 to S24: Step S21: Tokenization: Decompose the sentence in the text to be matched into a sequence of words or sub-words; Step S22: Part-of-speech tagging: Determine the part of speech for each word to facilitate understanding the word's grammatical role in the sentence; Step S23: Dependency Analysis: Construct a directed graph by determining the dependency relationships between words. G =( V , E () indicates the grammatical structure between words in a sentence; in, V This represents a set of nodes, i.e., the words in a sentence; V =( t 1, t 2, t 3,…, t M ), M The number of words or subwords after word segmentation; E Indicates the dependency relationship between words; E ={( t i , t j , R i,j |1≤i,j≥ M,R i,j For dependency relationship tags}; Step S24: Construct the syntax tree: based on the directed graph G Building a syntax tree T ; Step S3: Perform Chinese word segmentation on the text to be matched in the dictionary using a string matching-based word segmentation method; Step S4: Combine the characteristics of the syntax tree to perform sensitive word matching on the word segmentation groups obtained from word segmentation. When node A is matched, A is added to the Map for storage to prevent the matching process from forming a cycle, and the sensitive words represented by the child nodes of A are matched first to improve the group matching efficiency. Step S5: Perform hierarchical desensitization on the matched sensitive words; specifically including steps S51 to S54: Step S51: Divide the matched sensitive words into Level 1, Level 2, and Level 3 sensitive words according to the classification criteria; Step S52: For level 1 sensitive words, use an encryption algorithm to encrypt them, and then use the average value of the digital key to encrypt the key; Step S53: For secondary sensitive words, calculate the number of digits to be replaced, and then perform random value replacement or numerical replacement on the secondary sensitive words; specifically including steps SB1 to SB4: Step SB1: Convert the matched secondary sensitive words into a second string M2, which consists of the secondary sensitive words plus their positions in the text. Step SB2: Define the function F(x) as: F(x+1)=(F(x)*A+C) mod m Where A and C are constants, mod is the modulo operation. m is a prime number with the smallest absolute difference from the second string M2; Step SB3: Next, define the function G(x) as: G(x) = F(x) mod (b+1) Where b is the number of bits in M2; Step SB4: Randomly generate multiple values smaller than the number of digits in the second string M2 using the function G(x). Define the values corresponding to the number of digits in the second string M2 as the first number group X to be randomly replaced. Then, calculate the second number group Y for each digit in the first number group X using the function G(x). Finally, restore the second number group Y to the corresponding position in the original second string M2. For M2-X that were not randomly generated, numerical replacement is performed according to the pre-established database. Step S54: For level 3 sensitive words, perform random shift and rounding operations in sequence.
2. The text hierarchical desensitization method based on syntax trees according to claim 1, characterized in that, Step S52 includes the following steps: Step SA1: First, convert the matched first-level sensitive words into a first string P consisting of the first-level sensitive words and their positions in the text; Step SA2: Input the key K and the first string P into the encryption function F(K,P); Step SA3: The first string P and the key K are split into several groups, each group is encrypted separately, and finally the encrypted contents are combined to form ciphertext C; Step SA4: After encryption, take the average value of the key K to obtain K', and then return C+K' to the user.
3. The text hierarchical desensitization method based on syntax trees according to claim 1, characterized in that, In step S54, the matched level 3 sensitive words are converted into a third string M3 consisting of the sensitive word and the position of the level 3 sensitive word in the text. Then, the third string M3 is shifted one position to the left, that is, the third string M3 is divided by 2, and the result is rounded down.
4. The text hierarchical desensitization method based on syntax trees according to claim 1, characterized in that, In step S21, by learning the semantic relationships between words, each word is mapped to a point in a high-dimensional real vector space; in this vector space, semantically similar words are mapped to nearby points, thereby capturing the semantic associations between words.
5. A text hierarchical desensitization system based on a syntax tree, wherein the method described in any one of claims 1-4 is characterized in that, It includes a word segmentation and matching module, a sensitivity classification module, and a desensitization module. The word segmentation and matching module is used to perform Chinese word segmentation on the text to be matched, construct a syntax tree based on the semantic relevance between the words to be matched, and match the word segments based on the properties of the syntax tree. The sensitivity classification module is used to classify the matched sensitive words into different levels of sensitive words according to the classification criteria. The desensitization module is used to perform graded desensitization according to the sensitivity level of the sensitive words.
6. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1-4.
Citation Information
Patent Citations
Text processing method and device, electronic equipment and storage medium
CN113221554A
Sensitive word matching method and device, equipment, storage medium and product
CN115659017A
Text processing method and device and electronic equipment
CN116245109A
Big data desensitization method and system
CN110532797A
Database data desensitization method, system and device and readable storage medium
CN117633863A