Sensitive data identification method and device, electronic equipment, medium and program product

By calculating the joint probability of word segmentation paths based on punctuation and implicit semi-Markov models, the problem of low accuracy in Chinese text recognition by traditional sensitive word matching algorithms is solved, and higher precision sensitive data recognition is achieved.

CN119557916BActive Publication Date: 2026-02-17CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411596271.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2026-02-17
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Traditional sensitive word matching algorithms are prone to errors when processing Chinese text, resulting in low accuracy in identifying sensitive data.

Method used

Sentence segmentation is performed based on punctuation marks in the text data to be identified. The frequency of specific words not in the preset common word library is counted. The joint probability of the word segmentation path is calculated using the time residence matrix and the implicit semi-Markov model to determine the target word segmentation path. Finally, sensitive word retrieval is performed.

Benefits of technology

It improves the accuracy of sensitive data identification, reduces ambiguity caused by random word segmentation, ensures that the word segmentation results are more in line with Chinese vocabulary habits, and improves the precision of sensitive data identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557916B_ABST
    Figure CN119557916B_ABST
Patent Text Reader

Abstract

The application discloses a sensitive data identification method and device, electronic equipment, medium and program product, and relates to the technical field of data security. The sensitive data identification method comprises the following steps: performing sentence segmentation on to-be-identified text data to obtain a plurality of short sentences; counting specific words in each short sentence which are not in a preset common word library, and recording the word frequency in a corresponding time residence matrix; performing word segmentation on each short sentence according to a preset word segmentation rule, determining a plurality of word segmentation paths corresponding to each short sentence; calculating the joint probability corresponding to each word segmentation path based on the word frequency of each time residence matrix, taking the word segmentation path with the highest joint probability as a target word segmentation path, and performing sensitive word retrieval on each word segmentation to obtain a sensitive data identification result. The technical scheme of the application solves the problem that the traditional sensitive word matching algorithm is prone to errors when processing Chinese text, thereby affecting the accuracy of sensitive data identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, and in particular to sensitive data identification methods, devices, electronic devices, computer-readable storage media, and computer program products. Background Technology

[0002] Currently, sensitive word matching algorithms are commonly used for sensitive data identification in text. These algorithms match words based on alphabetic languages, where spaces distinguish words, and each word's meaning is relatively precise and standardized, resulting in minimal ambiguity. However, due to the characteristics of Chinese, there are no clear word boundaries. Multiple consecutive characters constitute more diverse semantics, and each character may have different inherent meanings in different words. A single character may form words with preceding or following characters. This characteristic makes word segmentation for Chinese text data complex, and incorrect segmentation can lead to semantic deviations in sentences. Therefore, inaccurate word segmentation causes traditional sensitive word matching algorithms to err when processing Chinese text, affecting the accuracy of sensitive data identification.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a sensitive data identification method, apparatus, electronic device, computer-readable storage medium, and computer program product, aiming to solve the technical problem that traditional sensitive word matching algorithms are prone to errors when processing Chinese text, affecting the accuracy of sensitive data identification.

[0005] To achieve the above objectives, this application proposes a sensitive data identification method, which includes:

[0006] Based on the punctuation marks in the text data to be identified, the text data to be identified is segmented into sentences to obtain multiple short sentences;

[0007] Statistically analyze the specific words in each of the short sentences that are not in the preset common vocabulary, and record the word frequency of each specific word in the corresponding time dwell matrix;

[0008] Based on the preset word segmentation rules, each short sentence is segmented separately, and multiple word segmentation paths corresponding to each short sentence are determined;

[0009] Based on the word frequency of each of the time-resident matrices, the joint probability corresponding to each of the word segmentation paths is calculated, and the word segmentation path with the highest joint probability is taken as the target word segmentation path.

[0010] All word segments of the text data to be identified are obtained according to the target word segmentation path of each short sentence. Sensitive word retrieval is performed on each word segment to obtain the sensitive data identification result.

[0011] In one embodiment, the step of segmenting each short sentence according to a preset segmentation rule and determining multiple segmentation paths corresponding to each short sentence includes:

[0012] Based on the word segmentation rules, candidate attributes for each character in the short sentence are determined. The candidate attributes include one or more of the following: first character, middle character, last character, and single character. The word segmentation rules include at least the following: the first character of the short sentence is the first character or a single character, and the last character of the short sentence is the last character or a single character.

[0013] Based on the multiple alternative attributes corresponding to each character, the short sentence is divided into multiple segmentation paths according to the segmentation rules. The segmentation rules include at least the following: the character following the first or middle character is the middle or last character, and the character following the last or single character is the first or single character.

[0014] In one embodiment, the step of calculating the joint probability corresponding to each segmentation path based on the word frequency of each of the time-residence matrices, and taking the segmentation path with the highest joint probability as the target segmentation path includes:

[0015] The word frequency of each of the time-resident matrices and the joint probability corresponding to each of the word segmentation paths are respectively input into a preset hidden semi-Markov model to calculate the joint probability corresponding to each word segmentation path.

[0016] The target word segmentation path is obtained by selecting the word segmentation path with the highest joint probability among all the word segmentation paths.

[0017] In one embodiment, before the step of inputting the word frequencies of each of the time-residence matrices and the joint probabilities corresponding to each of the word segmentation paths into a preset implicit semi-Markov model, the method further includes:

[0018] By querying each of the word segments in a preset original lexicon, meaningless word segments that do not exist in the original lexicon are identified;

[0019] Delete the word segmentation paths that include the meaningless words from each of the word segmentation paths to obtain updated word segmentation paths, and then perform the step of inputting the word frequency of each of the time-resident matrices and the joint probability corresponding to each of the word segmentation paths into a preset implicit semi-Markov model based on the updated word segmentation paths.

[0020] In one embodiment, the sensitive data identification result is a sensitivity level. The step of obtaining all word segments of the text data to be identified according to the target word segmentation path of each of the short sentences, and performing sensitive word retrieval on each of the word segments to obtain the sensitive data identification result includes:

[0021] Each of the short sentences is divided according to the target word segmentation path corresponding to each short sentence, resulting in multiple word segments corresponding to each short sentence;

[0022] Based on a preset sensitive word classification table, the sensitivity level of each word is determined sequentially to obtain the sensitivity level corresponding to each word.

[0023] The highest sensitivity level among the sensitivity levels corresponding to each of the segmented words is determined as the sensitivity level corresponding to the text data to be identified.

[0024] In one embodiment, the sensitive data identification method further includes:

[0025] Collect corresponding vocabulary data from multiple training material files to construct an original vocabulary corpus;

[0026] Based on preset general and professional material files, the number of files containing each word and each character in the original thesaurus is counted.

[0027] Based on the number of files containing each word and each character and the total number of training material files, calculate the inverse text frequency index corresponding to each word or character;

[0028] Select words or characters whose inverse text frequency index is less than a preset inverse text frequency index threshold to form a preset common word library.

[0029] Furthermore, to achieve the above objectives, this application also proposes a sensitive data identification device, which includes:

[0030] The sentence segmentation module is used to segment the text data to be identified into multiple short sentences based on the punctuation marks in the text data to be identified.

[0031] The vocabulary statistics module is used to count specific words in each of the short sentences that are not in the preset common vocabulary, and to record the word frequency of each specific word in the corresponding time residence matrix;

[0032] The short sentence segmentation module is used to segment each short sentence according to preset segmentation rules and determine multiple segmentation paths corresponding to each short sentence;

[0033] The path selection module is used to calculate the joint probability of each segmentation path based on the word frequency of each of the time-resident matrices, and to take the segmentation path with the highest joint probability as the target segmentation path.

[0034] The sensitive retrieval module is used to obtain all the word segments of the text data to be identified according to the target word segmentation path of each of the short sentences, and to perform sensitive word retrieval on each of the word segments to obtain the sensitive data identification results.

[0035] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the sensitive data identification method as described above.

[0036] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the sensitive data identification method described above.

[0037] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the sensitive data identification method described above.

[0038] This application proposes a sensitive data identification method. First, based on the punctuation marks in the text data to be identified, the text data is segmented into multiple short sentences. Then, specific words not in a preset common word library are counted in each short sentence, and the word frequency of each specific word is recorded in the corresponding time-resident matrix. Next, each short sentence is segmented according to preset word segmentation rules to determine multiple word segmentation paths corresponding to each short sentence. Then, based on the word frequency of each time-resident matrix, the joint probability corresponding to each word segmentation path is calculated, and the word segmentation path with the highest joint probability is taken as the target word segmentation path. Finally, all the words of the text data to be identified are obtained according to the target word segmentation path of each short sentence, and sensitive word retrieval is performed on each of the word segments to obtain the sensitive data identification result. The technical solution of this application proposes a method that uses a preset common vocabulary database to screen specific words and performs joint probability calculation based on the word frequency of specific words recorded in the time-resident matrix and multiple word segmentation paths determined by preset word segmentation rules. Compared with traditional word segmentation methods, this method takes into account the frequency influence of specific words in the text and can obtain the optimal target word segmentation path that is more in line with Chinese vocabulary habits. It minimizes the semantic deviation of the text to be identified caused by ambiguity due to random word segmentation. Therefore, by performing word segmentation and then sensitive data identification through the technical solution of this application, the accuracy of sensitive data identification is improved by improving the word segmentation accuracy of sensitive words. Attached Figure Description

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

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating an embodiment of the sensitive data identification method of this application.

[0042] Figure 2 This is a schematic diagram of semantic sequences and text sequences in the embodiments of this application;

[0043] Figure 3 This is a schematic diagram illustrating how, according to an embodiment of this application, optional attributes are assigned to each character in a short sentence based on word segmentation rules.

[0044] Figure 4 This is a schematic diagram of the structure of the sensitive data identification device in the embodiments of this application;

[0045] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the sensitive data identification method in the embodiments of this application.

[0046] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0047] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0048] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, server, etc., or an electronic device or control device capable of performing the above functions. The following description uses a server as the executing entity to illustrate this embodiment and the subsequent embodiments.

[0050] Existing sensitive word matching algorithms are all based on matching words in alphabetic languages. Since there are spaces to distinguish between words, the meaning of each word is relatively precise and standardized, and there is generally little ambiguity. Due to the characteristics of Chinese, there is no clear word boundary, but diverse semantics are formed by multiple consecutive Chinese characters. The inherent meaning of each Chinese character is not exactly the same in different words. A character may form a word with the previous character or the following character. This characteristic makes word segmentation complex, and traditional sensitive word matching algorithms may make mistakes when dealing with Chinese. Taking the judgment of the sensitivity degree in the documents of the telecommunications industry support system as an example, "phone number" is typical personal information and has a high-sensitivity mark in the sensitive word library. When processing the following sentence "At the third dock of Jia Port in Area A", the usual full-text retrieval method will determine that this sentence contains the word "phone number". However, in fact, the semantics of this sentence do not contain "phone number". Therefore, according to the existing sensitive word retrieval technology, this information will be misjudged as sensitive, with the defect of low accuracy in identifying sensitive data.

[0051] In order to overcome the technical defects existing in the above sensitive word matching algorithm, the embodiments of the present application provide a method for identifying sensitive data. Considering the negative impact of unreasonable word segmentation on sensitive word matching, the technical solution of the embodiments of the present application proposes an improved word segmentation method according to Chinese semantics and context. Considering that the same Chinese sentence may have multiple word segmentations, a preset common word library is used to screen specific words, and the word frequency of specific words is combined to calculate the probability that each word segmentation path conforms to the Chinese context, and then the most reasonable word segmentation path is inferred, thereby effectively reducing the errors generated in the word segmentation process.

[0052] Referring to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the sensitive data identification method of the present application. The sensitive data identification method includes:

[0053] Step S10, based on the punctuation marks in the text data to be identified, break the text data to be identified into sentences to obtain multiple short sentences;

[0054] First, obtain the text data to be identified for sensitive data identification. The text data to be identified can be directly obtained or converted from other forms of data, such as extracted from audio data or video data. When the text data to be identified has punctuation marks, during the preliminary sentence breaking, the entire text data to be identified can be divided into multiple short sentences based on the functions of various punctuation marks (such as commas, periods, and semicolons, etc.) for further processing.

[0055] Step S20, count the specific words in each short sentence that are not in the preset common word library, and record the word frequency of each specific word in the corresponding time residence matrix;

[0056] The preset commonly used vocabulary is a pre-established vocabulary database composed of non-specific words and commonly used words. Non-specific words and commonly used words refer to words that are widely used in various fields and scenarios, such as pronouns (I, you, he, etc.), prepositions (and, with, at, etc.), and everyday expressions (hello, thank you, goodbye, etc.). These types of words are generally not closely related to sensitive words and have little impact on semantic understanding. Therefore, non-specific words and commonly used words in short sentences that belong to the preset commonly used vocabulary database do not require further processing. For specific words that are not in the preset commonly used vocabulary database, their frequency of occurrence in the text data to be identified is counted, and the corresponding word frequency is recorded in its corresponding time residence matrix to facilitate the determination of the probability of various specific words.

[0057] It is understandable that the higher the frequency of a particular word, the higher the probability that this particular word represents the true meaning of the sentence, and the higher the accuracy of the word segmentation method containing that particular word. In this application's embodiments, recording the frequency of each specific word provides a reliable data reference for sentence segmentation.

[0058] Step S30: According to the preset word segmentation rules, each short sentence is segmented separately to determine multiple word segmentation paths corresponding to each short sentence;

[0059] Understandably, when segmenting short sentences, certain rules need to be followed to ensure that the resulting segmentation and path are logical. For example, during segmentation, the attributes of each character in the sentence can be analyzed in detail. These attributes could include first character (the first character of a word), middle character (the middle character of a word), last character (the last character of a word), or single character (a word formed by a single character). Segmentation rules can stipulate that each character must adhere to the first character, middle character (which can be one or more), and last character rules when forming words, ensuring smooth segmentation.

[0060] Specifically, in the word segmentation process, we can analyze all possible word segmentation paths corresponding to each short sentence based on the word segmentation rules. These word segmentation paths are all possible word segmentation results of the short sentence. Each word segmentation path corresponds to a different semantic. We need to further determine which word segmentation path is more likely and can better express the true semantics of the short sentence.

[0061] Step S40: Based on the word frequency of each time-resident matrix, calculate the joint probability corresponding to each word segmentation path, and take the word segmentation path with the highest joint probability as the target word segmentation path;

[0062] The time-resident matrix includes the word frequencies of various specific words, and the word frequencies of these specific words affect the joint probability of various word segmentation paths.

[0063] Specifically, for a single short sentence, there are multiple different word segments in the various word segmentation paths. If the word segments in each word segmentation path include a specific word, its word frequency in the time residence matrix can be determined. The higher the word frequency, the more likely the specific word is to express the true meaning in the short sentence. The higher the accuracy of the specific word, the higher the joint probability of the word segmentation path corresponding to the specific word.

[0064] Finally, the target segmentation path with the highest joint probability is used to represent the segmentation path that is closest to the true semantic meaning that the text wants to express among the multiple segmentation paths corresponding to each short sentence.

[0065] In this embodiment of the application, the influence of the frequency of specific words appearing in the full text of the text data to be identified is taken into consideration when selecting the word segmentation path, which further improves the accuracy of word segmentation and makes the final target word segmentation path more accurate, providing an accurate text basis for sensitive data identification.

[0066] Step S50: Obtain all word segments of the text data to be identified according to the target word segmentation path of each short sentence, perform sensitive word retrieval on each word segment, and obtain the sensitive data identification result.

[0067] After determining the target word segmentation path for each short phrase in the text data to be identified, all the words in the text data to be identified can be obtained according to the target word segmentation path corresponding to each short phrase. Then, the sensitivity of each word segmentation is judged in turn according to the predefined sensitive word identification and detection rules to obtain the sensitive data identification result.

[0068] The sensitive data identification results can include information on sensitive words in the text data to be identified, such as which sensitive words are included and their distribution. If the sensitivity levels of the sensitive words are predefined, the sensitivity level of each word segment in the text data to be identified can be further determined, and a more detailed sensitive data analysis report can be generated.

[0069] In another feasible embodiment, after obtaining the sensitive data identification results, this application embodiment can also define a protection rule base for different stages of the data lifecycle. After completing the data classification and grading determination according to the sensitive types, the corresponding security protection measures can be automatically completed according to the definition of the protection rule base.

[0070] For example, the sensitive data lifecycle in this application embodiment may include: data collection, which involves authenticating the accessed data source to prevent data source impersonation, logging and security auditing of collection activities, and incorporating temporary storage files and cache areas used during collection into a unified security management scope; data transmission, which involves managing data transmission between systems, using encryption or encrypted channels for data transmission, employing reliable authentication measures for both parties, and preventing tampering during data transmission; data storage, which involves providing data integrity protection and authentication mechanisms, recording data storage and access, restricting external mobile storage media, and implementing the same security management measures for backup data; data usage, which involves allocating permissions based on the principle of least privilege, logging and authorizing data access and operations, providing dedicated monitoring solutions and comprehensive emergency plans to improve the ability to handle dangerous behaviors and response speed; and data sharing, which requires user authorization, authenticates and logs access to external interfaces, adopts secure sharing methods to prevent unauthorized access, and uses technologies such as digital watermarking to ensure that shared data is traceable. Continuously monitor the security status of shared data; for data destruction, establish a data destruction management process, verify the effectiveness, and perform physical destruction to ensure that the data is completely deleted and cannot be recovered.

[0071] Based on the data classification and grading results and the definition of the protection rule base, the embodiments of this application can automatically complete the above-mentioned corresponding security protection measures, avoiding manual intervention and greatly reducing the possibility of data leakage caused by human intentionality or negligence.

[0072] Furthermore, in a feasible embodiment, the step of segmenting each short sentence according to preset word segmentation rules and determining multiple word segmentation paths corresponding to each short sentence includes:

[0073] Step S31: Based on the word segmentation rules, determine the candidate attributes for each character in the short sentence. The candidate attributes include one or more of the following: first character, middle character, last character, and single character. The word segmentation rules include at least the following: the first character of the short sentence is the first character or a single character, and the last character of the short sentence is the last character or a single character.

[0074] Step S32: Based on the multiple alternative attributes corresponding to each character, the short sentence is divided into multiple segmentation paths according to the segmentation rules. Among them, the segmentation rules include at least: the character following the first or middle character is the middle or last character, and the character following the last or single character is the first or single character.

[0075] Understandably, for each character in a short sentence, there are four possible candidate attributes for word segmentation: the beginning of a word, i.e., the first character, can be expressed as B (Begin); the middle part of a word (a word with more than three characters), i.e., the middle character, can be expressed as M (Middle); the end of a word, i.e., the last character, can be expressed as E (End); and a word that is not part of a word but consists of a single character, i.e., a single character, can be expressed as S (Separate). In this embodiment, word segmentation is specifically performed by combining a preset commonly used dictionary and probability calculation to obtain multiple possible word segmentation paths corresponding to each short sentence.

[0076] It should be noted that, following the preset word segmentation rules, each word must be complete. Therefore, after B or M, there can only be M or E (otherwise the word is not finished); after E or S, there can only be B or S (otherwise the word is not started).

[0077] Based on the above rules, each short sentence is segmented into words, and all possible segmentation paths for each short sentence are listed.

[0078] In one feasible embodiment, the step of calculating the joint probability corresponding to each segmentation path based on the word frequency of each of the time-resident matrices, and taking the segmentation path with the highest joint probability as the target segmentation path includes:

[0079] Step S31: Input the word frequency of each time-resident matrix and the joint probability corresponding to each word segmentation path into the preset hidden semi-Markov model to calculate the joint probability corresponding to each word segmentation path.

[0080] Step S32: Select the segmentation path with the highest joint probability among all segmentation paths to obtain the target segmentation path.

[0081] In this embodiment, the approach of Hidden Markov Models is used to calculate the joint probability of each word segmentation path. Generally, natural language semantics conforms to Hidden Markov Models. A Markov Model is a discrete-time, discrete-state stochastic process in mathematics that possesses the Markov property. In this process, given the current state, predicting the future state is independent of past states and depends only on the current state. Let a certain stochastic process {X}... n If n = 0, 1, 2, ..., and it takes a finite number of values ​​(called the states of the process, denoted as 0, 1, 2, ...), for any n > 0 and states i, j, i0, i1, ..., i n-1 P(X) n+1 =j|X0=i0, X1=i1,…,X n-1 =i n-1 X n =in )=P(X n+1 =j|X n =i), then this process is called having Markov properties, and a process with Markov properties {X} n This is called a Markov chain. A Markov model is generally denoted as: λ = (π, A, B), where π is the initial probability distribution vector, A is the state transition probability matrix, and B is the observation probability matrix.

[0082] Because the semantic content of the short sentences in this embodiment is y n The unobservable (hidden), the observable is the textual expression X. n Therefore, it is generally believed that the random variable y in natural language n It satisfies the Markov property, that is, the state of y at time n is only related to the value of its state at the previous time (y). n-1 The state of the observable sequence x at time n is determined solely by the hidden state yn at time n. Under this assumption, the Hidden Markov Model (HMM) can infer the content semantics y by considering the joint probability P(y,x). n The actual distribution of [the data / information].

[0083] The Markov property of natural language is an ideal situation. In reality, treating each sentence as an independent entity and insufficient consideration of the context can lead to semantic misunderstandings. For example, "The tennis auction is over." If we follow the Markov property, this sentence can be interpreted as "Tennis / auction / over" or "Tennis rackets / sold out." In practice, we need to observe the context based on the preceding content (context) and analyze the scene in which the sentence is located. If the words "tennis" and "auction" are mentioned multiple times in the preceding text, the semantic scene is considered to be at an auction, and it should be interpreted as "Tennis / auction / over." If the word "racket" is mentioned multiple times in the preceding text, the semantic scene is considered to be buying a racket, and it should be interpreted as "Tennis rackets / sold out."

[0084] Therefore, the embodiments of this application need to be extended based on the hidden Markov model to determine the state of y at time n and the value of its state at the previous time (y). n-1 It is related to, and is also affected by, the values ​​of the states at a finite number of earlier times (y). n-i (i = 2, 3, 4, ..., k)) influences, and the state of the observable sequence x at time n is determined by the hidden state y at time n. nThis model is also known as a Hidden Semi-Markov Model (HSMM). An HSMM can be represented as λ = (π, A, B, P), where π, A, and B have the same meanings as in a regular HMM, and P is the probability distribution describing the state dwell time. Unlike a regular HMM where one state (semantic) corresponds to one observation symbol (text), in an HSMM, one state (semantic) corresponds to a segment of observation symbols (text). Building upon HSMM, and considering the actual situation of Chinese semantics, an inverse text index can be introduced as the probability distribution of state dwell time. This index is created by recording the word frequencies of specific words in the dwell time matrix, serving as the basis for calculating the joint probability of the hidden state yn.

[0085] For example, refer to Figure 2 The diagram shows semantic and text sequences, where y is a word segmentation sequence, including y1 to y5; and x is a text sequence, including x1 to x5, where the character is the beginning (B), middle (M), end (E), or single word (S) of a word. Each word segmentation sequence is represented as a text and is influenced by a finite number of preceding words. Each y shown in the diagram... i Only affected by y i-3 y i-2 y i-1 The effect shown in the figure is for ease of illustration. In actual calculations, the actual effect step size can be much larger than the effect step size represented by the figure.

[0086] Specifically, the mathematical expression for calculating the joint probability of each word segmentation path is as follows:

[0087]

[0088] Where, P(x1,y1,x2,y2……x n ,y n ) refers to the word segmentation path y1 to y n The joint probability.

[0089] In another feasible embodiment, O can be defined as (O1, O2, O3, ... O n ) represents the output result, O i ={B,M,E,S}, λ=(λ1,λ2,λ3,…λ n ) represents the input, i.e., λ i =Each character in the input. Calculate the probability of each word segmentation for this sentence, i.e., calculate P(O|λ) = P(O1,O2,O3,…O…). n |λ1,λ2,λ3,…λ n ).

[0090] According to the independence principle of Hidden Markov Models, the possible output of each character is only related to that character, that is: P(O1,…,O) n |λ1,…,λ n )=∏P(O k |λ k ), where k = 1, ..., n.

[0091] Finally, according to Bayes' theorem, the mathematical expression for the joint probability corresponding to the output result is calculated as follows:

[0092]

[0093] Where P(O|λ) is the joint probability of output O given input λ, P(λ,O) is the probability of output O given input λ, P(λ) is the probability of input λ, P(O) is the total probability of output O, and P(λO) is the probability of input λ given output O.

[0094] In this embodiment, the probability score is assigned by calculating the frequency of a specific word in a non-preset common vocabulary that matches between B and E (or S) under each path corresponding to each short sentence, and assigning a corresponding probability score to the word frequency of that specific word. The probability score is then adjusted based on the above calculation results in the inverse text word frequency counting matrix (high-frequency specific words) P. Then, by calculating the probability of all paths, the path with the highest joint probability is the target word segmentation path. The semantics corresponding to the target word segmentation path is the true semantics of the short sentence that best conforms to Chinese vocabulary habits.

[0095] In one feasible embodiment, before the step of inputting the word frequencies of each of the time-residence matrices and the joint probabilities corresponding to each of the word segmentation paths into a preset implicit semi-Markov model, the method further includes:

[0096] Step A10: By querying each word segment in the preset original lexicon, identify meaningless word segments that do not exist in the original lexicon;

[0097] Step A20: Delete word segmentation paths that include meaningless words from each word segmentation path to obtain updated word segmentation paths. Then, based on the updated word segmentation paths, perform the step of inputting the word frequency of each time-resident matrix and the joint probability corresponding to each word segmentation path into a preset implicit semi-Markov model.

[0098] In the process of word segmentation, it is necessary to consider the situation of meaningless word segmentation. The original word library described in step A10 is a word library formed in advance by collecting a large amount of data. The data involved includes materials such as Cihai and Modern Chinese Dictionary, and professional vocabulary in the fields applied for sensitive data recognition (such as telecommunications support and security in the communication field) is added, and finally the word library is formed. It can be understood that the words in the original word library are all meaningful words. If the segmented words cannot be found in the original word library, it means that such words belong to meaningless word segmentation.

[0099] For example, for the short sentence "On the third pier of Port A in Area A", after word segmentation, words such as "Port A" and "pier three" may be obtained. These words do not exist in the original word library and are regarded as meaningless word segmentation.

[0100] After determining the meaningless word segmentation, the formed word segmentation paths can be screened. If a certain word segmentation path includes meaningless word segmentation, this path can be ignored, and the joint probability of this path does not need to be calculated, saving computing resources and improving processing efficiency.

[0101] For the convenience of understanding, as an example, taking the short sentence "On the third pier of Port A in Area A" as an example, the word segmentation method in the embodiment of the present application will be described in detail.

[0102] First, at the beginning of a short sentence, it can only be B (the first character) or S (a single character), and at the end, it can only be E (the last character) or S (a single character). The characters in the middle follow the rule that after B or M, it can only be M or E; after E or S, it can only be B or S, and list all possible word segmentation paths, such as Figure 3 As shown, different colors represent different word segmentation paths.

[0103] Perform word frequency statistics on the rare words that appear in the text data. It is very likely that words such as "Area A" and "pier" will appear multiple times in this article. These two words are not in the preset common word library. Statistically calculate the word frequencies of these two words and fill the corresponding time residence matrix.

[0104] Define O=(O1, O2, O3,... O8) to represent the output result, O n ={B, M, E, S}, and λ=(λ1, λ2, λ3,... λ8) represents the input, that is, λ1="A", λ2="rea"... λ8="up". Calculate the probability of each word segmentation path of this sentence, that is, find P(O|λ)=P(O1, O2, O3,... O8|λ1, λ2, λ3,... λ8).

[0105] According to the joint probability calculation formula of the hidden Markov model, calculate the joint probability of each word segmentation path

[0106] Select the one with the largest joint probability, which is to select the most appropriate word segmentation path ( Figure 3 the red line in).

[0107] Among them, "Jiadi Port / No. 3 / Wharf / on" ( Figure 3 the red line in) and "Jiadi Port / three / number / on the head" ( Figure 3 the green line in) both contain three words in the original word library and a single character. Other word segmentation methods ( Figure 3 the blue line in) must contain more single characters or non-existent words. In the word segmentation combination of "Jiadi Port / No. 3 / Wharf / on", "on" is a locative preposition and has a relatively high probability of being a single character. In the word segmentation combination of "Jiadi Port / three / number / on the head", "three" is a number and has a relatively low probability of being a single character. According to the time residence matrix, "wharf" has appeared in the previous text, so the word frequency in the time residence matrix is relatively high. According to the Markov model, although the common usage degree (probability) of "number" and "on the head" exceeds that of a word like "No. 3", the common usage degree (probability) of "three" as a single character is relatively low, and "wharf" as an uncommon word has appeared in this text data, resulting in the joint probability of "Jiadi Port / No. 3 / Wharf / on" being greater than that of "Jiadi Port / three / number / on the head". Finally, "Jiadi Port / No. 3 / Wharf / on" is selected as the target word segmentation path, and it is determined that no sensitive words are included.

[0108] The target word segmentation path of the final word segmentation is: BME / BE / BE / S, and the corresponding text is: Jiadi Port / No. 3 / Wharf / on. According to the above target word segmentation path, this short sentence does not contain sensitive words such as "number" and will not be determined as sensitive data. Compared with the traditional method of sensitive word matching and retrieval, the technical solution of the embodiment of the present application greatly reduces the misjudgment rate of sensitive data identification.

[0109] In a feasible embodiment, the sensitive data identification result is a sensitive level. The step of obtaining all the word segmentations of the text data to be identified according to the target word segmentation paths of each short sentence and performing sensitive word retrieval on each word segmentation to obtain the sensitive data identification result includes:

[0110] Step S51, dividing each short sentence according to the target word segmentation path corresponding to each short sentence to obtain multiple word segmentations corresponding to each short sentence respectively;

[0111] Step S52, based on a preset sensitive word classification table, sequentially determine the sensitive levels of each word segmentation to obtain the sensitive levels corresponding to each word segmentation respectively;

[0112] Step S53, determining the highest sensitive level among the sensitive levels corresponding to each word segmentation as the sensitive level corresponding to the text data to be identified.

[0113] After determining the target word segmentation path for each short sentence, one or more word segments corresponding to each short sentence are determined based on the word segmentation method in the target word segmentation path. The word segments obtained in this way are closest to the semantics expressed by the original text data to be recognized, which can bring higher data recognition accuracy.

[0114] For example, the sensitive word classification table in this application embodiment can divide the sensitivity level into 4 levels, and the categories, subcategories and ranges are shown in the table below:

[0115]

[0116]

[0117] Natural speech processing technology can be used to identify the part-of-speech tag and understand the meaning of each word to determine the data category to which each word belongs, and then the sensitivity level corresponding to each word can be determined by combining the above table.

[0118] Finally, the sensitivity level of the segment with the highest sensitivity level among all segmented words is taken as the sensitivity level of the entire text data to be identified, thus completing the entire sensitive data identification process. It should be noted that the sensitivity level of the text data to be identified can be used as a basis for subsequent sensitive data processing; different sensitivity levels require different processing methods.

[0119] In another feasible embodiment, the sensitive data identification method further includes:

[0120] Step B10: Collect corresponding vocabulary data from multiple training material files to construct the original vocabulary database;

[0121] Step B20: Based on the preset general material files and professional material files, count the number of files containing each word and each character in the original thesaurus;

[0122] Step B30: Calculate the inverse text frequency index corresponding to each word or word based on the number of files containing each word and each character and the total number of training material files.

[0123] Step B30: Select words or characters whose inverse text frequency index is less than the preset inverse text frequency index threshold to form a preset common word library.

[0124] This application also discloses a method for constructing an original lexicon and a preset commonly used lexicon. Specifically, a large-scale original lexicon, namely an IDF (Inverse Document Frequency) lexicon, is first constructed. Vocabulary is extracted from materials such as the *Cihai* and *Modern Chinese Dictionary*, and professional vocabulary from training material files in fields such as telecommunications support and security is added to form the original lexicon. For example, vocabulary from fields such as telecommunications support and security is combined with vocabulary from materials such as the *Cihai* and *Modern Chinese Dictionary* to obtain an original lexicon of approximately 400,000 words. Then, the frequency of occurrence of various words or characters in the lexicon is statistically analyzed for a large number of general material files (files with no clear domain bias) and professional material files (files from professional fields such as telecommunications support and security), determining the number of files corresponding to each word or character. The number of files corresponding to a word or character refers to the total number of times the word or character appears in all files. Whether a word or character appears once or multiple times in a file, it is counted as 1. For example, if the word "port" appears twice in file A, five times in file B, and once in file C, then the number of files (files A, B, and C) corresponding to the word "port" is 3.

[0125] Then, the IDF index for each word is calculated using the IDF calculation formula, which is shown below:

[0126]

[0127] Among them, the total number of training files refers to the total number of general material files and professional material files, while the number of files containing specific words refers to the number of files corresponding to each word or character.

[0128] As an example, in this embodiment, words with an IDF index lower than 1.5 are selected as non-specific common words (which can also be understood as general common words) to form a preset common word library, i.e., the preset inverse text frequency index threshold is 1.5. It should be noted that when IDF = 1.5 ≈ lg32, it means that at least 3.1% of the data files in the full training files contain the word, and thus the word is considered a non-specific common word. In practical application scenarios, the IDF index threshold can be adjusted between 0.7 (at least 20% of the data files contain the word) and 2.3 (at least 0.5% of the database files contain the word) according to the generality or specialization of the sensitive data identification system.

[0129] The technical solution of this application proposes a strategy for identifying sensitive Chinese data using an implicit semi-Markov model. Specifically, it involves constructing a general-purpose and telecommunications security-specific original lexicon, statistically analyzing the frequency of each character and word in the lexicon using historical source files, and forming an IDF inverse text lexicon (i.e., a pre-set general-purpose lexicon). During word segmentation, the probability that each character in the text data to be identified is the first character (B), middle character (M), last character (E), or single character (S) of a word is calculated to infer the most reasonable segmentation path. Finally, sensitive word matching is performed to ultimately confirm sensitive information. Furthermore, by introducing the IDF inverse text vocabulary occurrence probability as a parameter in the time-residence matrix within the implicit semi-Markov model, a method is used to effectively segment and select ambiguous word segments based on the current text content, avoiding the impact of segmentation errors on the semantic understanding of the text data. The technical solution of this application can accurately segment words based on complete sentences and correctly understand the part-of-speech and meaning of each word, ensuring the accuracy of sensitive word identification. After identifying sensitive information, the sensitive information content is classified and graded, and complete lifecycle protection requirements and methods are provided to ensure the compliance of data management and prevent the possibility of sensitive data getting out of control.

[0130] In practice, using traditional full-word matching algorithms on historically accumulated text data to be identified in telecommunications security production systems, the confidence level (detection of actual sensitive words / all detected words) for sensitive word detection is only 93.8%, with a false positive rate as high as 6.2%. However, using the sensitive data identification method of the present application embodiment, the confidence level for sensitive word detection can reach 99.7%, with a false positive rate of only 0.3%. It can be seen that the sensitive data identification method of the present application embodiment has a significant improvement effect on the accuracy of sensitive data identification.

[0131] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the sensitive data identification method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0132] This application also provides a sensitive data identification device, referring to... Figure 4 The sensitive data identification device includes:

[0133] The sentence segmentation module 10 is used to segment the text data to be identified into multiple short sentences based on the punctuation marks in the text data to be identified.

[0134] The vocabulary statistics module 20 is used to count specific words in each of the short sentences that are not in the preset common vocabulary library, and to record the word frequency of each specific word in the corresponding time residence matrix;

[0135] The short sentence segmentation module 30 is used to segment each short sentence according to preset segmentation rules and determine multiple segmentation paths corresponding to each short sentence;

[0136] The path selection module 40 is used to calculate the joint probability corresponding to each word segmentation path based on the word frequency of each of the time-resident matrices, and to take the word segmentation path with the highest joint probability as the target word segmentation path.

[0137] The sensitive retrieval module 50 is used to obtain all the word segments of the text data to be identified according to the target word segmentation path of each of the short sentences, and to perform sensitive word retrieval on each of the word segments to obtain the sensitive data identification result.

[0138] In one embodiment, the short sentence segmentation module 30 is further used for:

[0139] Based on the word segmentation rules, candidate attributes for each character in the short sentence are determined. The candidate attributes include one or more of the following: first character, middle character, last character, and single character. The word segmentation rules include at least the following: the first character of the short sentence is the first character or a single character, and the last character of the short sentence is the last character or a single character.

[0140] Based on the multiple alternative attributes corresponding to each character, the short sentence is divided into multiple segmentation paths according to the segmentation rules. The segmentation rules include at least the following: the character following the first or middle character is the middle or last character, and the character following the last or single character is the first or single character.

[0141] In one embodiment, the path selection module 40 is further configured to:

[0142] The word frequency of each of the time-resident matrices and the joint probability corresponding to each of the word segmentation paths are respectively input into a preset hidden semi-Markov model to calculate the joint probability corresponding to each word segmentation path.

[0143] The target word segmentation path is obtained by selecting the word segmentation path with the highest joint probability among all the word segmentation paths.

[0144] In one embodiment, the path selection module 40 is further configured to:

[0145] By querying each of the word segments in a preset original lexicon, meaningless word segments that do not exist in the original lexicon are identified;

[0146] Delete the word segmentation paths that include the meaningless words from each of the word segmentation paths to obtain updated word segmentation paths, and then perform the step of inputting the word frequency of each of the time-resident matrices and the joint probability corresponding to each of the word segmentation paths into a preset implicit semi-Markov model based on the updated word segmentation paths.

[0147] In one embodiment, the sensitive data identification result is a sensitivity level, and the sensitive data retrieval module 50 is further used for:

[0148] Each of the short sentences is divided according to the target word segmentation path corresponding to each short sentence, resulting in multiple word segments corresponding to each short sentence;

[0149] Based on a preset sensitive word classification table, the sensitivity level of each word is determined sequentially to obtain the sensitivity level corresponding to each word.

[0150] The highest sensitivity level among the sensitivity levels corresponding to each of the segmented words is determined as the sensitivity level corresponding to the text data to be identified.

[0151] In one embodiment, the sensitive data identification device further includes a lexicon building module, which is used for:

[0152] Collect corresponding vocabulary data from multiple training material files to construct an original vocabulary corpus;

[0153] Based on preset general and professional material files, the number of files containing each word and each character in the original thesaurus is counted.

[0154] Based on the number of files containing each word and each character and the total number of training material files, calculate the inverse text frequency index corresponding to each word or character;

[0155] Select words or characters whose inverse text frequency index is less than a preset inverse text frequency index threshold to form a preset common word library.

[0156] The sensitive data identification device provided in this application, employing the sensitive data identification method in the above embodiments, can solve the technical problem that traditional sensitive word matching algorithms are prone to errors when processing Chinese text, affecting the accuracy of sensitive data identification. Compared with the prior art, the beneficial effects of the sensitive data identification device provided in this application are the same as those of the sensitive data identification method provided in the above embodiments, and other technical features in this sensitive data identification device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0157] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the sensitive data identification method in Embodiment 1 above.

[0158] The following is for reference. Figure 5The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0159] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0160] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0161] The electronic device provided in this application, employing the sensitive data identification method described in the above embodiments, can solve the technical problem that traditional sensitive word matching algorithms are prone to errors when processing Chinese text, affecting the accuracy of sensitive data identification. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the sensitive data identification method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0162] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0163] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0164] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the sensitive data identification method in the above embodiments.

[0165] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0166] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0167] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the following actions: to segment the text data to be identified based on punctuation marks, obtaining multiple short sentences; to count specific words in each short sentence that are not in a preset common vocabulary, and to record the word frequency of each specific word in the corresponding time-resident matrix; to segment each short sentence according to preset word segmentation rules, determining multiple word segmentation paths corresponding to each short sentence; to calculate the joint probability corresponding to each word segmentation path based on the word frequency of each time-resident matrix, and to take the word segmentation path with the highest joint probability as the target word segmentation path; to obtain all the word segments of the text data to be identified according to the target word segmentation path of each short sentence, and to perform sensitive word retrieval on each word segment to obtain sensitive data identification results.

[0168] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0169] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0170] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0171] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described sensitive data identification method. This solves the technical problem that traditional sensitive word matching algorithms are prone to errors when processing Chinese text, affecting the accuracy of sensitive data identification. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the sensitive data identification method provided in the above embodiments, and will not be repeated here.

[0172] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the sensitive data identification method described above.

[0173] The computer program product provided in this application can solve the technical problem that traditional sensitive word matching algorithms are prone to errors when processing Chinese text, affecting the accuracy of sensitive data identification. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the sensitive data identification method provided in the above embodiments, and will not be repeated here.

[0174] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method of sensitive data identification, the method comprising: The sensitive data identification method comprises: Based on the punctuation marks in the text data to be identified, the text data to be identified is punctuated to obtain a plurality of short sentences; Statistical each specific vocabulary in the short sentence not in the preset common vocabulary library, and record the word frequency of each specific vocabulary in the corresponding time residence matrix, wherein the preset common vocabulary library is a vocabulary library composed of non-specific vocabulary and common vocabulary, and the non-specific vocabulary and the common vocabulary refer to vocabulary that is applied in various fields and scenes; According to the preset word segmentation rule, each short sentence is segmented respectively to determine the plurality of word segmentation paths corresponding to each short sentence; Based on the word frequency of each time residence matrix, the joint probability corresponding to each word segmentation path is calculated, and the word segmentation path with the highest joint probability is taken as the target word segmentation path; According to the target word segmentation path of each short sentence, all word segmentation of the text data to be identified is obtained, each word segmentation is searched for sensitive words, and a sensitive data identification result is obtained.

2. The sensitive data identification method of claim 1, wherein, The step of determining a plurality of word segmentation paths corresponding to each short sentence according to the preset word segmentation rule comprises: Based on the word segmentation rule, the candidate attributes of each character in the short sentence are determined, wherein the candidate attributes include one or more of the first character, the middle character, the last character and the single character, and the word segmentation rule at least includes that the first character of the short sentence is the first character or the single character, and the last character of the short sentence is the last character or the single character; According to the plurality of candidate attributes corresponding to each character, the path of the short sentence is divided according to the word segmentation rule, and a plurality of word segmentation paths are obtained, wherein the word segmentation rule at least further includes that the next character of the first character or the middle character is the middle character or the last character, and the next character of the last character or the single character is the first character or the single character.

3. The sensitive data identification method of claim 1, wherein, The step of calculating the joint probability corresponding to each word segmentation path based on the word frequency of each time residence matrix and taking the word segmentation path with the highest joint probability as the target word segmentation path comprises: The word frequency of each time residence matrix and the joint probability corresponding to each word segmentation path are respectively input into the preset implicit semi-Markov model, and the joint probability corresponding to each word segmentation path is calculated; The word segmentation path with the highest joint probability is selected from each word segmentation path to obtain the target word segmentation path.

4. The sensitive data identification method of claim 3, wherein, Before the step of inputting the word frequency of each time residence matrix and the joint probability corresponding to each word segmentation path into the preset implicit semi-Markov model, the method further comprises: Determine meaningless word segmentation that does not exist in the original vocabulary by querying each word segmentation in the preset original vocabulary; Delete the word segmentation path including the meaningless word segmentation in each word segmentation path to obtain the updated word segmentation path, and execute the step of inputting the word frequency of each time residence matrix and the joint probability corresponding to each word segmentation path into the preset implicit semi-Markov model based on the updated word segmentation path.

5. The sensitive data identification method of claim 1, wherein, The sensitive data recognition result is a sensitive level, and the step of obtaining all word segmentation of the text data to be recognized according to the target word segmentation path of each short sentence, and performing sensitive word retrieval on each word segmentation to obtain a sensitive data recognition result comprises: dividing each short sentence according to the target word segmentation path corresponding to each short sentence to obtain a plurality of word segmentations corresponding to each short sentence respectively; based on a preset sensitive word classification table, sequentially performing sensitive level determination on each word segmentation to obtain a sensitive level corresponding to each word segmentation respectively; determining the highest sensitive level in the sensitive level corresponding to each word segmentation as the sensitive level corresponding to the text data to be recognized.

6. The sensitive data identification method of any one of claims 1 to 5, wherein, The sensitive data recognition method further comprises: collecting corresponding vocabulary data from a plurality of training material files to construct an original vocabulary library; based on a preset general material file and a professional material file, counting the number of files containing each vocabulary and each single character in the original vocabulary library; according to the number of files containing each vocabulary and each single character and the total number of the training material files, calculating the inverse text frequency index corresponding to each vocabulary or single character respectively; selecting vocabularies or single characters with an inverse text frequency index less than a preset inverse text frequency index threshold to form a preset common vocabulary library.

7. A sensitive data identification apparatus characterized by comprising: The sensitive data recognition device comprises: a short sentence division module configured to divide the text data to be recognized based on punctuation marks in the text data to be recognized to obtain a plurality of short sentences; a vocabulary statistics module configured to count specific vocabularies in each short sentence that are not in a preset common vocabulary library, and record the word frequency of each specific vocabulary in a corresponding time residence matrix, wherein the preset common vocabulary library is a vocabulary library pre-established by non-specific vocabularies and common vocabularies, and the non-specific vocabularies and the common vocabularies refer to vocabularies that are applicable in multiple fields and scenarios; a short sentence word segmentation module configured to perform word segmentation on each short sentence according to a preset word segmentation rule to determine a plurality of word segmentation paths corresponding to each short sentence; a path selection module configured to calculate the joint probability corresponding to each word segmentation path based on the word frequency of each time residence matrix, and select the word segmentation path with the highest joint probability as a target word segmentation path; a sensitive retrieval module configured to obtain all word segmentations of the text data to be recognized according to the target word segmentation path of each short sentence, and perform sensitive word retrieval on each word segmentation to obtain a sensitive data recognition result.

8. An electronic device, comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the sensitive data recognition method according to any one of claims 1 to 6.

9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the sensitive data recognition method according to any one of claims 1 to 6.

10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the steps of the sensitive data recognition method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Chinese statement identification method and device

    CN103902521A

  • HMM-based Chinese word-segmentation method

    CN107861940A