Methods, systems, apparatus, and media for sensitive information pre-classification
By constructing a bag-of-words model for high-frequency words and a multi-label decision tree model, sensitive information is pre-classified, which solves the problem of poor recognition performance of general algorithms, realizes efficient prediction of sensitive information types and algorithm selection, and improves recognition and desensitization performance.
Patent Information
- Application Number
- CN202111572987.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In existing technologies, common sensitive information identification and desensitization algorithms are ineffective due to the significant differences in the format and characteristics of different types of sensitive information, and manual judgment is inefficient and inaccurate.
By constructing a bag-of-words system for high-frequency words and generating word frequency vectors, a multi-label decision tree model is used to pre-classify sensitive information, and the most suitable sensitive information identification and desensitization algorithm is automatically selected.
It achieves efficient prediction of sensitive information types, selects the most suitable algorithm, and improves the performance of sensitive information identification and data desensitization.
Smart Images

Figure CN114254112B_ABST
Abstract
Description
Technical Field
[0001] This application relates to sensitive information processing, and more particularly to methods for training sensitive information pre-classification models, as well as methods and systems for sensitive information pre-classification, and related apparatus and media. Background Technology
[0002] Currently, the protection of sensitive information is receiving increasing attention. Various types of sensitive information exist.
[0003] In some traditional solutions, the type of sensitive information in the text is not usually determined; instead, general sensitive information identification and de-identification algorithms are directly used. However, due to the significant differences in the format and characteristics of different types of sensitive information, general sensitive information identification and de-identification algorithms typically perform poorly.
[0004] Therefore, there is a need for a scheme that can pre-classify sensitive information in order to select the most suitable sensitive information identification algorithm and / or desensitization algorithm. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, one or more embodiments of this specification pre-classify sensitive information by exploring the correlation between high-frequency words in a sensitive text set and sensitive information categories, thereby selecting the most suitable sensitive information identification algorithm and / or desensitization algorithm.
[0006] One or more embodiments of this specification achieve their above-mentioned objectives through the following technical solutions.
[0007] In one aspect, a method for training a pre-classification model for sensitive information is provided, including:
[0008] Construct a bag-of-frequency words W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n};
[0009] Based on the bag-of-words W of high-frequency words, a training set is constructed, which includes multiple samples. The construction of the training set includes:
[0010] Get the text;
[0011] Determine the tag set L = {l1, ..., l} of the text. i ,…l k}, wherein the tag l in the tag set L i Indicate whether the text involves the corresponding sensitive information type;
[0012] Generate the word frequency vector WF = {wf1, ..., wf...} of the text. i ,…,wfn The element wf in the term frequency vector WF i For the word w in the bag of high-frequency words i The frequency of occurrence in the text;
[0013] Using {WF,L} as samples in the training set; and
[0014] The training set is used to train the sensitive information pre-classification model.
[0015] Preferably, constructing the bag-of-words W for high-frequency words includes:
[0016] Perform word segmentation on the sensitive text in the sensitive text set to obtain multiple words included in the sensitive text set; and
[0017] Count the occurrence frequency of words in the aforementioned sensitive text set; and
[0018] Select the specified number n words that appear most frequently and place them into the high-frequency word bag.
[0019] Preferably, constructing the bag-of-words for high-frequency words W further includes:
[0020] Before counting the occurrences of words in the sensitive text set, words included in the exclusion list are filtered out.
[0021] Preferably, constructing the bag-of-words for high-frequency words W further includes:
[0022] Before counting the occurrences of words in the sensitive text set, set or adjust the weights of one or more words in the sensitive text set.
[0023] Preferably, generating the word frequency vector of the text includes:
[0024] Statistical analysis of each word w in the bag of high-frequency words i The number of times it appears in the text;
[0025] For each word w, the length of the text is considered. i The occurrence count is normalized; and
[0026] each word w i The normalized frequency of occurrence of the term w is used as the number of occurrences of the term w. i frequency of occurrence in the text wf i .
[0027] Preferably, the sensitive information pre-classification model is a multi-label decision tree model.
[0028] Preferably, the type of sensitive information involved in the text depends on the format of the information fragments in the text.
[0029] On the other hand, a method for performing sensitive information pre-classification is disclosed, including:
[0030] Obtain a bag-of-frequency words W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n};
[0031] Get the text to be processed;
[0032] Based on the bag-of-words W of high-frequency words, a word frequency vector WF = {wf1, ..., wf2} of the text to be processed is generated. i ,…,wf n}, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed; and
[0033] Based on the word frequency vectors, a trained sensitive information pre-classification model is used to predict the type of sensitive information involved in the text to be processed.
[0034] Preferably, the method further includes:
[0035] The system automatically selects the appropriate sensitive information identification algorithm based on the predicted type of sensitive information.
[0036] Preferably, the method further includes:
[0037] The selected sensitive information identification algorithm automatically determines the location of the corresponding type of sensitive information in the text to be processed.
[0038] Preferably, the method further includes:
[0039] The system automatically selects the appropriate data anonymization algorithm based on the predicted type of sensitive information.
[0040] Preferably, the method further includes:
[0041] The selected data anonymization algorithm is used to perform data anonymization on the text to be processed.
[0042] Preferably, the method further includes:
[0043] If the sensitive information pre-classification model predicts that the text to be processed does not involve any sensitive information type, then sensitive information identification and data desensitization will not be performed on the text to be processed.
[0044] In another aspect, a system for performing sensitive information pre-classification is disclosed, comprising:
[0045] The data acquisition module is used to acquire the text to be processed.
[0046] The high-frequency word bag module is used to obtain a high-frequency word bag W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n};
[0047] The sensitive information pre-classification module is used to generate a word frequency vector WF = {wf1, ..., wf...} of the text to be processed based on the bag-of-words of high-frequency words W. i ,…,wf n}, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed; and based on the word frequency vector, using a sensitive information pre-classification model trained according to claims 1-7 to predict the type of sensitive information involved in the text to be processed.
[0048] Preferably, the system further includes:
[0049] The sensitive information identification module is used to automatically select the corresponding sensitive information identification algorithm based on the predicted sensitive information type.
[0050] Preferably, the sensitive information identification module is further used for:
[0051] The selected sensitive information identification algorithm automatically determines the location of the corresponding type of sensitive information in the text to be processed.
[0052] Preferably, the system further includes:
[0053] The data anonymization module is used to automatically select the corresponding data anonymization algorithm based on the predicted type of sensitive information.
[0054] Preferably, the data anonymization module is further used for:
[0055] The selected data anonymization algorithm is used to perform data anonymization on the text to be processed.
[0056] In another aspect, an apparatus is provided, comprising: a memory; and a processor configured to perform the method as described in any of the preceding descriptions.
[0057] In another aspect, a computer-readable storage medium is provided that stores instructions which, when executed by a computer, cause the computer to perform the methods described above.
[0058] Compared with the prior art, one or more embodiments of this specification can achieve one or more of the following technical effects:
[0059] It can efficiently predict the types of sensitive information involved in a text;
[0060] It can select the most suitable sensitive information identification algorithm and / or data de-identification algorithm; and
[0061] It can improve the performance of sensitive information identification and / or data desensitization. Attached Figure Description
[0062] The above-described invention and the following detailed embodiments will be better understood when read in conjunction with the accompanying drawings. It should be noted that the drawings are merely examples of the claimed invention. In the drawings, the same reference numerals represent the same or similar elements.
[0063] Figure 1 A schematic diagram illustrating an example scenario in which the solution according to embodiments of this specification can be implemented.
[0064] Figure 2 A schematic diagram illustrating an example process in which a scheme according to an embodiment of this specification may be applied.
[0065] Figure 3 A schematic diagram illustrating the process of an example method for training a sensitive information pre-classification model according to an embodiment of this specification.
[0066] Figure 4 An example flowchart is shown for the process of constructing a bag of high-frequency words according to an embodiment of this specification.
[0067] Figure 5 A schematic flowchart illustrating an example method for constructing a training set according to an embodiment of this specification is shown.
[0068] Figure 6 A schematic flowchart illustrating an example process for generating word frequency vectors for text according to an embodiment of this specification is shown.
[0069] Figure 7 A schematic flowchart illustrating an example method for performing sensitive information pre-classification according to embodiments of this specification is shown.
[0070] Figure 8 A block diagram of an example system for pre-classifying sensitive information according to an embodiment of this specification is shown.
[0071] Figure 9 A schematic block diagram of an apparatus for implementing a system according to one or more embodiments of this specification is shown. Detailed Implementation
[0072] The following detailed description is sufficient to enable any person skilled in the art to understand the technical content of one or more embodiments of this specification and to implement them accordingly. Furthermore, based on the specification, claims, and drawings disclosed in this specification, those skilled in the art can easily understand the objectives and advantages associated with one or more embodiments of this specification.
[0073] See Figure 1 It illustrates a schematic diagram of an example scenario in which the solution according to the embodiments of this specification can be implemented.
[0074] like Figure 1 As shown, data requesting device 106 can request data from data providing device 102. For example, data requesting device 106 can transmit a data request to data providing device 102 via a network. Data providing device 102 can obtain data from data storage 108 and return it to data requesting device 106 (e.g., via network 104).
[0075] Data request device 106 can be, for example, a client, such as a mobile device. However, data request device 106 can be any type of data request device, which can be any type of client device (e.g., mobile or fixed client device) or other servers. An application can be installed on data request device 106, and the application can send requests for data.
[0076] The data providing device 102 may be, for example, a server. However, the data providing device 102 may also be any type of client device (e.g., a mobile or fixed client device). For example, the server may send a request for data to the client device.
[0077] Both the data requesting device 106 and the data providing device 102 can be implemented by computing devices, as described below.
[0078] Data storage 108 may be, for example, cloud storage. However, data storage 108 may be any type of data storage independent of data providing device 102, but may also be part of data providing device 102. In some examples, data storage 108 may be distributed storage.
[0079] In some examples, data providing device 102 may retrieve data via a retrieval operation (e.g., a search operation on an internal network). In this case, data storage 108 may be one or more data sources of any type.
[0080] Network 104 can be any type of network, such as the Internet, wide area network, metropolitan area network, local area network, etc. Network 104 can be a wired network or a wireless network.
[0081] like Figure 1As shown, the data providing device 102 may include a data transmission module 110 and a sensitive data processing module 112.
[0082] The data transmission module 110 can be used to receive and send data. The data transmission module 110 may include data transceiver elements, such as a transceiver, for receiving data from other devices and / or transmitting data to other devices. The data providing device 102 can receive data requests from the data requesting device 106, transmit data requests to the data storage 108, obtain data from the data storage 108, and transmit data to the data requesting device 102 via the data transmission module 110.
[0083] The sensitive data processing module 112 can implement one or more embodiments of this specification. The sensitive data processing module 112 can perform sensitive information identification on data obtained from the data storage 108, and, if necessary, perform data desensitization on the identified sensitive information. The data providing device 102 can transmit the desensitized data to the data requesting device 106. In this way, the data requesting device 106 (and other devices in the network 104 that may intercept data) will not receive sensitive information, thus protecting the sensitive information.
[0084] Sensitive information can include a wide variety of sensitive information. Sensitive information may include, but is not limited to:
[0085] Personal privacy information, including but not limited to identity information, device identification, marital status, hobbies, photos and videos, location, shopping history, browsing history, application installation or execution history, medical and health information, financial information, etc.
[0086] Corporate or other organization privacy information, including but not limited to organizational identification, business license information, tax registration information, employee information, customer information, order information, corporate strategy information, etc.
[0087] It may also include other conceivable sensitive information.
[0088] The aforementioned sensitive information can encompass a variety of different types of sensitive information. The type of sensitive information contained in a text can depend on the format of the information fragments within that text. For example, email addresses typically have a specific format. Chinese ID numbers have yet another specific format. Alternatively, the type of sensitive information contained in a text can depend on other features, such as keywords, regular expressions, or other statistical features. The type of sensitive information contained in a text can also depend on the content of the information fragments within that text; for example, corporate strategic information may exist in various formats, but its content typically possesses specific characteristics.
[0089] The types of sensitive information can be preset by developers, data administrators or other professionals, as discussed below.
[0090] Other network structures can also be used. For example, instead of data providing device 102, sensitive data processing can be performed by a separate device.
[0091] It should be understood that, although in Figure 1 The examples shown are application scenarios of the embodiments described in this specification, but they are only for the purpose of understanding. The embodiments of this specification are not limited to the above scenarios, but can be applied to any other applicable scenarios.
[0092] See Figure 2 It illustrates a schematic diagram of an example process 200 in which a scheme according to an embodiment of this specification may be applied. This process 200 may, for example, be... Figure 1 The data is provided by device 102 to perform the process. The process 200 can also be performed by any other suitable device.
[0093] like Figure 1 As shown, process 200 may include: in operation 202, a request for data may be received. For example, a request for data from data requesting device 106 may be received by data providing device 102 via data transmission module 110. For example, the request for data may be sent by an application on data requesting device 106, or it may be sent in other ways. The data may include, for example, “text” as discussed below.
[0094] Process 200 may further include: in operation 204, acquiring data and performing sensitive information identification on the data. For example, data providing device 102 may acquire data from data storage 108 via data transmission module 110. Subsequently, data providing device 102 may identify sensitive information in the acquired data via sensitive data processing module 112.
[0095] Process 200 may further include, in operation 206, performing data anonymization on the acquired data if necessary. For example, the data providing device 102 may perform data anonymization on the acquired data through the sensitive data processing module 112 to eliminate, mask, or otherwise prevent the disclosure of sensitive information in the data.
[0096] Examples of data anonymization methods include, but are not limited to: data hashing, encryption, masking, obfuscation, deletion, transformation, scope expansion, etc.
[0097] Process 200 may also include: in operation 208, the requested de-identified data may be returned to the data requesting device. For example, the data providing device 102 may transmit the de-identified data to the data requesting device 106 via the data transmission module 110.
[0098] It should be understood that the above process is merely an example of the process that can be implemented in the embodiments of this specification. Other processes may be used. For example, the application server may receive a data request from the client and call the sensitive data processing service of the sensitive data processing server to perform sensitive information identification and data desensitization, etc.
[0099] In this document, the term "sensitive information identification and desensitization" of "text" is commonly used. "Text" refers to "text fragments," such as sentences or paragraphs. However, it should be understood that the solutions in the embodiments of this specification are not limited to processing "text," but can be applied to various forms of structured or unstructured data. Such data includes not only text but also audio, video, images, and other content. When necessary, preprocessing can be performed on the structured or unstructured data first, such as performing speech recognition or image recognition, so that the solutions of this invention can be applied.
[0100] In some traditional approaches, the type of sensitive information in the text is not determined; instead, generic sensitive information identification and de-identification algorithms are directly used. However, due to the significant differences in format and characteristics among different types of sensitive information, generic sensitive information identification and de-identification algorithms typically perform poorly.
[0101] In other solutions, human judgment (e.g., by developers, data administrators, etc.) or machine judgment based on simple rules (e.g., regular expressions, keyword matching, etc.) is used to determine the type of sensitive information in the text, and the sensitive information identification algorithm and / or de-identification algorithm are selected manually or by the machine based on simple rules. Such solutions not only require specialized human knowledge but are also inefficient and inaccurate. In particular, these solutions are not effective for dynamic de-identification of large amounts of data.
[0102] In the embodiments of this specification, the operations of sensitive data identification and data desensitization are not performed by human selection of algorithms. Instead, a pre-classification model based on machine learning is used to pre-classify the sensitive information that may be contained in the data to obtain the categories of potentially sensitive information, and a sensitive data identification algorithm (and / or data desensitization algorithm) is automatically selected based on the category of sensitive information. The solutions in the embodiments of this specification can be used for both static and dynamic desensitization, and can achieve good results in both cases (especially in the case of dynamic desensitization).
[0103] Those skilled in the art will appreciate that machine learning models typically have a training phase and a prediction phase. In the following text, references... Figures 3-7 An example implementation of a method for the training and prediction phases of a pre-classification model according to an embodiment of the present invention is provided.
[0104] refer to Figure 3This illustrates a schematic diagram of an example method 300 for training a sensitive information pre-classification model according to an embodiment of this specification. Method 300 may, for example, be derived from... Figure 1 The data is provided by device 102 for execution. Method 300 can also be executed by any other suitable device.
[0105] like Figure 3 As shown, method 300 may include: in operation 302, constructing a bag-of-frequency words W, wherein the bag-of-frequency words includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n}
[0106] A bag-of-words (BOW) is a collection of words. In preferred examples, the words in the bag-of-words are arranged in a specific order (e.g., frequency of occurrence). In other examples, the words in the bag-of-words may not be arranged in a specific order. It's understandable that in sensitive information datasets, sensitive information often appears alongside certain words. For example, time information may often be accompanied by "timestamp," certificate and ID card information often by "cert," bank account information often by "account" or "bank," and so on. By statistically analyzing the frequency of keywords in sensitive information datasets, it's often possible to explore the correlation between high-frequency words and the types of sensitive information.
[0107] The term "weighted frequency of occurrence" refers to the frequency of occurrence (or number of occurrences) of a word after adjustments based on algorithms such as TF-IDF, TextRank, exclusion list filtering, and user input.
[0108] A sensitive text set refers to a collection of multiple sensitive texts, each of which may include zero, one, or more types of sensitive information. Preferably, the sensitive text set is a large-scale text set. This sensitive text set may come from various data sources, such as, but not limited to, system logs, traffic data, transaction records, etc. As defined above, "text" in the embodiments of this specification may refer to any structured or unstructured data.
[0109] Preferably, the sensitive text set includes a balanced distribution of sensitive information of various types. That is, the number of sensitive texts of each type in the sensitive text set can be roughly the same. The number of sensitive texts that do not contain any sensitive information can be roughly the same as the number of sensitive texts that include any type of sensitive information. In this way, it is possible to train a more accurate and less biased pre-classification system for sensitive information categories.
[0110] In embodiments of this specification, the type of sensitive information involved in the text may depend on the format of the information segments in the text. Alternatively, the type of sensitive information involved in the text may depend on other features, such as keywords, regular expression matching, or other statistical features.
[0111] The specified quantity n can be pre-specified by the developer or data administrator. Examples of specified quantities n are 100, 1000, 2000, 5000, etc. As you can imagine, the larger the specified quantity n, the more resources may be required for execution. The specified quantity n can vary depending on the specific application.
[0112] See Figure 4 It shows an example flowchart of a process 400 for constructing a bag-of-words of high-frequency words W according to an embodiment of this specification.
[0113] like Figure 4 As shown, process 400 may include: in operation 402, performing word segmentation on the sensitive text in the sensitive text set to obtain multiple words included in the sensitive text set.
[0114] Word segmentation, also known as "word cutting," is a commonly used technique in text processing. Any appropriate algorithm known to those skilled in the art can be used to perform word segmentation on sensitive text in a sensitive text set.
[0115] The process 400 may also include: in operation 404, counting the number of occurrences of words in the sensitive text set.
[0116] Process 400 may further include: in operation 406, selecting the specified number n words that appear most frequently and placing them into the high-frequency word bag. For example, words in the sensitive text set can be sorted by frequency of occurrence, and the n words that appear most frequently can be selected and placed into the high-frequency word bag.
[0117] Preferably, words can be placed into the high-frequency word bag in order of their frequency of occurrence. That is, the word that appears most frequently is the first word in the high-frequency word bag, the word that appears second most frequently is the second word in the high-frequency word bag, and so on.
[0118] In a preferred example, it's not about excluding all words appearing in the sensitive text set, but rather excluding certain words. For instance, much data may contain machine-generated or algorithm-generated numerical sequences, such as various random numbers. The number of these random numbers might happen to resemble the format of privacy-sensitive data such as ID numbers, transaction amounts, or millisecond- or second-level timestamps, potentially leading to subsequent problems. To address these issues, potentially problematic words can be added to an exclusion list. Therefore, before counting the occurrences of words in the sensitive text set, words included in the exclusion list can be filtered out first.
[0119] In a preferred example, before counting the occurrences of words in the sensitive text set, the weight of one or more words in the sensitive text set can be set or adjusted, so as to obtain the weighted occurrences. After setting or adjusting the weight, the actual occurrence count can be multiplied by the weight to be used as the occurrence count in subsequent steps.
[0120] An example of such a weighting algorithm is the TF-IDF algorithm. The TF-IDF algorithm can be used to evaluate the importance of a word for a text in a text set.
[0121] For example, weights can be assigned to corresponding words based on the IDF values obtained by the TF-IDF algorithm. For example, the IDF value can be multiplied by the occurrence count of the word as the adjusted occurrence count of the word. Or, words with IDF values less than a specific threshold can be directly excluded. For example, words such as "的" (de) and "了" (le). For example, the occurrence frequency is the occurrence count of the corresponding word in the current article, and the IDF weight is the result in the training text. The two can be weighted to adjust the occurrence count.
[0122] Other algorithms that can adjust the frequency of words depending on the representativeness or importance of the words can also be used for the words in the sensitive text set.
[0123] In another preferred example, input from the user can be received, and based on the input from the user, the weight of one or more words in the sensitive text set can be adjusted. For example, some words can be excluded based on the user's input.
[0124] The weight of the occurrence frequency can also be adjusted in a different way from Figure 4 to construct a bag of high-frequency words. For example, a bag of high-frequency words can be constructed by means such as WordCount, TextRank, etc.
[0125] After the bag of high-frequency words is constructed, it can be stored for subsequent use.
[0126] Method 300 may include: at operation 304, a training set can be constructed based on the bag of high-frequency words, and the training set includes multiple samples. The following describes the specific details of an example of operation 304 in conjunction with Figure 5 to describe the specific details of an example of operation 304.
[0127] See Figure 5 , which shows a schematic flowchart of an example method 500 for constructing a training set according to an embodiment of the present specification.
[0128] As Figure 5As shown, method 500 may include: in operation 502, acquiring text. Text can be acquired from various data sources. Examples of data sources may include, but are not limited to, log data, traffic data, transaction history, meeting minutes, etc. As defined above, "text" in embodiments of this specification may refer to any structured or unstructured data.
[0129] This text can be used to train the sensitive information pre-classification model of the embodiments of this specification. Each text can serve as the basis for generating a data sample. In the example below, assume that the obtained text is "Zhang San, mobile phone number 13818888888, was at the Beijing Zoo at 13:00 on January 1, 2021".
[0130] Method 500 may include: in operation 504, determining the tag set L = {l1, ..., l...} of the text. i ,…l k}. Tag l in tag set L i Indicates whether the text involves the corresponding sensitive information type.
[0131] For example, assuming a sensitive information type set {time, name, ID number, location, email, mobile phone number, etc.} is defined, then the tag set L can define whether the text includes sensitive information of type time, name, ID number, location, email, mobile phone number, etc. If sensitive information of this type is included, the corresponding element of the tag set can be set to "1", and if sensitive information of this type is not included, the corresponding element of the tag set can be set to "0".
[0132] Taking the above text, “Zhang San, mobile phone number 13818888888, was at Beijing Zoo at 13:00 on January 1, 2021”, as an example, since the text includes time, name, location and mobile phone number, but not ID number and email, its corresponding tag set can be set as L={1,1,0,1,0,1……}.
[0133] It can be understood that the label can be defined in any applicable manner as conceived by a person skilled in the art so that it can indicate the type of sensitive information involved in the text.
[0134] Determining the set of labels for text can be done using various data annotation methods.
[0135] It's important to note that while the tag set is shown as including multiple tags in the example above, it can actually include zero or more tags. For instance, if the text does not contain any sensitive information, the tag set will not contain any tags. If the text contains a sensitive information type, the tag set may contain only one tag.
[0136] The specific types of sensitive information included in the sensitive information type set can be set by developers, data administrators, users, or other personnel. Depending on the specific application, the sensitive information type set may only include the sensitive information types of interest. For example, if the current application only cares about the user's location information and not other information, then only the location information tag can be used. Or, for another example, if only the user's ID number and location information are relevant and other information (such as browsing history) is not relevant, then only the ID number and location tags can be used.
[0137] In one example, the types of sensitive information in the text can be determined based on manual annotation, thereby determining the corresponding tag values. For instance, user input can be received indicating zero or more tags involved in the text.
[0138] In another example, a rule-based approach can be used to automatically determine the sensitive information type of text and thus determine the corresponding tag value. For example, regular expressions and keyword matching can be used to automatically determine the sensitive information type of text. For instance, a regular expression for email addresses can be used to match email addresses, and when an email address is matched, the tag corresponding to the email address can be automatically set to "1".
[0139] In yet another example, more sophisticated machine learning models can be used to automatically determine the types of sensitive information in the text in order to determine the corresponding label values, such as smart labeling algorithms.
[0140] In another example, a combination of two or more of the above methods can be used. For instance, a rule-based approach can be used for initial annotation, followed by more refined annotation based on user input.
[0141] Method 500 may include: in operation 506, generating a word frequency vector WF = {wf1, ..., wf...} of the text. i ,…,wf n It can be seen that the number of elements in the word frequency vector WF can be the same as the number of words in the bag-of-words for high-frequency words, that is, the specified number n. The elements wf in the word frequency vector WF i For the word w in the bag of high-frequency words i The frequency of occurrence in the text. See below for reference. Figure 6 Describe the specific details of example operations for generating word frequency vectors of text.
[0142] See Figure 6 It shows a schematic flowchart of an example process 600 for generating word frequency vectors for text according to an embodiment of this specification.
[0143] like Figure 6As shown, process 600 may include: in operation 602, counting each word w in the bag of high-frequency words. i The number of times it appears in the text.
[0144] Process 600 may further include: preferably, in operation 604, adjusting each word w according to the length of the text. i The frequency of occurrences of a word can be normalized. For example, normalization can be performed by dividing the frequency of each word by the length of the text.
[0145] In the first example, the length of the text can be represented by the number of characters included in the text.
[0146] In the second preferred example, the length of the text can be represented by the number of words included in the text. In the specific application of this specification, representing the length of the text by the number of words is more reasonable than representing the length by the number of characters.
[0147] It can be understood that high-frequency words are likely to appear more frequently in texts with more words (such as long sentences or paragraphs) than in texts with fewer words (such as short sentences or paragraphs).
[0148] By normalizing the frequency of word occurrences based on the text length, the distortion caused by text length on the frequency of high-frequency words can be offset, thereby improving model performance. Of course, in some examples, normalization of occurrence counts can be omitted, and the occurrence counts can be used directly as the frequency of occurrence.
[0149] Process 600 may also include: in operation 606, each word w i The number of times the word w appears is used as the number of times the word w appears. i frequency of occurrence in the text wf i Preferably, the number of occurrences can be a normalized number of occurrences.
[0150] The above process is merely an example. Other methods can be used to generate word frequency vectors for text.
[0151] In the example above, assuming that "phone number" and "located in" are both in the bag of high-frequency words, and "phone number" is the 2nd word in the bag of high-frequency words while "located in" is the 4th word in the bag of high-frequency words, then the unnormalized word frequency vector of this example can be WF = {0,1,0,1,0…,0}, while the normalized word frequency vector of this example can be WF = {0,0.037,0,0.037,0…,0}.
[0152] Method 500 may include: in operation 508, using {WF,L} as samples in the training set. Multiple samples together constitute the training set. It can be seen that a training set can be generated in this way. In the example above, the sample could be d = {{0,0.037,0,0.037,0…,0},{1,1,0,1,0,1……}}.
[0153] Method 300 may include, in operation 306, using the training set to train the sensitive information pre-classification model. The sensitive information pre-classification model can be any applicable multi-label model. For example, the sensitive information pre-classification model may employ a multi-label decision tree model.
[0154] Through the above training process, a trained sensitive information pre-classification model can be obtained. This sensitive information pre-classification model can be used to predict zero or one or more types of sensitive information involved in a text.
[0155] See Figure 7 This illustrates a schematic flowchart of an example method 700 for performing sensitive information pre-classification according to embodiments of this specification. This process 700 may, for example, be performed by... Figure 1 The data is provided by device 102 to perform the process. The process 200 can also be performed by any other suitable device.
[0156] like Figure 7 As shown, process 700 may include: in operation 702, a bag of high-frequency words W may be obtained, wherein the bag of high-frequency words includes a specified number of n words W = {w1, ..., w2} that appear most frequently in the sensitive text set. i ,…w n}
[0157] Similar to the training process, when using a trained sensitive information pre-classification model to predict the types of sensitive information involved in the text to be processed, a bag-of-words format should also be used.
[0158] If a high-frequency word bag does not currently exist, it can be constructed first. The process of constructing a high-frequency word bag is the same as described above. Figure 3 and Figure 4 The process described is the same, so I will not repeat it here.
[0159] However, in practice, a bag of high-frequency words has usually already been constructed during the training phase. Therefore, it is not necessary to construct another bag of high-frequency words. Instead, the bag of high-frequency words constructed during the training phase can be directly obtained and used.
[0160] Process 700 may also include: in operation 704, the text to be processed can be obtained. For example, refer to... Figure 1The text to be returned can be obtained from data storage 108. Text to be processed from other data sources can also be obtained in other ways. As defined above, "text" in the embodiments of this specification can refer to any structured or unstructured data.
[0161] Process 700 may include: in operation 706, generating a word frequency vector WF = {wf1, ..., wf...} of the text to be processed. i ,…,wf n}, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed.
[0162] The specific process of this operation is the same as the above reference. Figure 5 and Figure 6 The process for generating word frequency vectors is the same as described above, and will not be repeated here.
[0163] Process 700 may include, in operation 708, using a trained sensitive information pre-classification model based on a bag-of-high-frequency words to predict the types of sensitive information involved in the text to be processed. For example, the sensitive information pre-classification model will output a predicted label for the text to be processed, which indicates whether the text to be processed contains a prediction of the corresponding sensitive information type. It will be understood that zero, one, or more sensitive information types involved in the text to be processed may be predicted.
[0164] In the first example, the model can output a probability value indicating that the text to be processed involves a certain type of sensitive information. That is, for each label corresponding to a sensitive information type, the pre-classification model will output a probability value. In this case, this probability value can be used for subsequent processing.
[0165] In the second example, a binarized result indicating whether the text to be processed belongs to a certain sensitive information type can be output based on a specified probability threshold. In this case, the probability value can be compared with the specified probability threshold, and a conclusion of "1" or "0" can be output based on the comparison result. That is, for each label corresponding to a sensitive information type, the pre-classification model will output a conclusion of "1" (i.e., it belongs to that sensitive information type) or "0" (i.e., it does not belong to that sensitive information type)".
[0166] The sensitive information categories predicted by the sensitive information pre-classification model can be used for subsequent accurate sensitive information identification and data desensitization operations.
[0167] In some examples, the prediction can be submitted to the user (e.g., a developer or data administrator), who can then perform subsequent processing manually or semi-automatically. Therefore, the pre-classification of sensitive information can itself be a standalone technical solution, without the need for subsequent sensitive information identification or data desensitization.
[0168] In other examples, as described below, it can be generated by a computer (e.g. Figure 1 The data provided (to device 102 or any other suitable device) is used to automatically perform subsequent sensitive information identification or data desensitization.
[0169] It can be understood that if the sensitive information pre-classification model predicts that the text does not contain any associated sensitive information types, then subsequent sensitive information identification and data desensitization operations do not need to be performed.
[0170] Process 700 may include: Preferably, in operation 710, a corresponding sensitive information identification algorithm may be automatically selected based on the predicted sensitive information type. When it is predicted that the text to be processed involves multiple sensitive information types, a corresponding sensitive information identification algorithm may be selected for each sensitive information type. For example, if it is predicted that the text to be processed contains an ID card number, an algorithm specifically designed for identifying ID card numbers may be selected. For example, an algorithm specifically designed for identifying ID card numbers can verify the check digits to further clarify whether the text to be processed indeed contains an ID card number. As another example, if it is predicted that the text to be processed contains location coordinates, an algorithm specifically designed for identifying location coordinates may be selected. The specific sensitive information identification algorithm used for each sensitive information type can be preset by, for example, developers or users. It is conceivable that, because a sensitive information identification algorithm is specifically selected for each sensitive information type, its identification effect will be significantly better than a general sensitive information identification algorithm.
[0171] Process 700 may include: preferably, in operation 712, the location of sensitive information of a corresponding type in the text to be processed can be automatically determined using a selected sensitive information identification algorithm. After a sensitive information identification algorithm is selected, the operation of determining the location of sensitive information using the sensitive information identification algorithm can be performed in any manner conceived by those skilled in the art.
[0172] Process 700 may include: Preferably, in operation 714, an appropriate data anonymization algorithm may be automatically selected based on the predicted sensitive information type. When the text to be processed is predicted to involve multiple sensitive information types, a corresponding data anonymization algorithm may be selected for each sensitive information type. For example, for location information, a location fuzzing algorithm may be used to expand the range of the location information (e.g., from a precise location to a wider range of locations), thereby still anonymizing the data without losing its original functionality. Another example is for ID card number information, an algorithm that deletes or replaces the middle digits may be used. Yet another example is for email address information, a hashing anonymization algorithm may be used, and so on. The specific data anonymization algorithm used for each sensitive information type may be preset by, for example, developers or users.
[0173] It is conceivable that, because data anonymization algorithms are specifically selected for each type of sensitive information, the anonymization effect will be significantly better than general sensitive information identification algorithms.
[0174] Process 700 may include: preferably, in operation 716, performing data desensitization on the text to be processed using a selected data desensitization algorithm. After selecting a data desensitization algorithm, the operation of using the data desensitization algorithm to determine the location of sensitive information may be performed in any manner conceived by those skilled in the art.
[0175] See Figure 8 The diagram shows a block diagram of an example system 800 for pre-classifying sensitive information according to an embodiment of this specification.
[0176] like Figure 8 As shown, system 800 may include a data acquisition module 802. The data acquisition module 802 can be used to acquire data. For example, the data acquisition module 802 can be used to acquire text for constructing a training set. The data acquisition module 802 can also be used to acquire text to be processed. The data acquisition module 802 can be used for any other required data, such as sensitive text sets, etc.
[0177] System 800 may further include a high-frequency word bag module 804. The high-frequency word bag module 804 can be used to construct, acquire, and / or store a high-frequency word bag W, wherein the high-frequency word bag W includes a specified number of n words W = {w1, ..., wn} that appear most frequently in the sensitive text set. i ,…w n The process of constructing or obtaining a bag of high-frequency words can be found in the description above.
[0178] System 800 may also include a sensitive information pre-classification module 806. This sensitive information pre-classification module 806 can be used to train a sensitive information pre-classification model and / or use the trained sensitive information pre-classification model to predict the types of sensitive information involved in the text to be processed. The training and prediction of the sensitive information pre-classification model are described above.
[0179] Specifically, the sensitive information pre-classification module 806 can be used to generate the word frequency vector WF = {wf1, ..., wf2} of the text to be processed based on the bag-of-words of high-frequency words W. i ,…,wf n}, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed; and based on the word frequency vector, using a trained sensitive information pre-classification model to predict the type of sensitive information involved in the text to be processed.
[0180] Preferably, the system may further include a sensitive information identification module 808, which can be used to automatically select a corresponding sensitive information identification algorithm based on the predicted sensitive information type. This sensitive information identification module can also be used to automatically determine the location of the corresponding type of sensitive information in the text to be processed using the selected sensitive information identification algorithm.
[0181] Preferably, the system 800 may further include a data desensitization module 810, which can be used to automatically select a corresponding data desensitization algorithm based on the predicted type of sensitive information. This data desensitization module is also used to perform data desensitization on the text to be processed using the selected data desensitization algorithm.
[0182] For other specific details about System 800, please refer to the descriptions of the corresponding methods or processes above.
[0183] Figure 9 A schematic block diagram of an apparatus 900 for implementing a system (e.g., system 800 above) according to one or more embodiments of this specification is shown. The apparatus 900 can be used to implement... Figure 1 The data providing device 102 or the data requesting device 106 in the middle.
[0184] The device 900 may include a processor 910 and a memory 915, the processor 910 being configured to perform any of the methods described above, such as Figure 2-7 The methods shown are examples of this. The memory 915 can store, for example, the acquired text, training set, text to be processed, data that may be generated during processing, and necessary algorithms, etc.
[0185] The device 900 may include a network connectivity element 925, such as a network connectivity device that connects to other devices via a wired or wireless connection. The wireless connection may be, for example, a WiFi connection, a Bluetooth connection, or a 3G / 4G / 5G network connection.
[0186] The device 900 may also optionally include other peripheral components 920, such as input devices (e.g., keyboard, mouse) and output devices (e.g., display). For example, in a user input-based method, the user can perform input operations via the input device. Corresponding information can also be output to the user via the output device.
[0187] Each of these modules can communicate with each other directly or indirectly, for example, via one or more buses (e.g., bus 905).
[0188] Furthermore, this application also discloses a computer-readable storage medium including computer-executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the methods of the various embodiments described herein.
[0189] In addition, this application also discloses an apparatus including a processor and a memory storing computer-executable instructions that, when executed by the processor, cause the processor to perform the methods of the embodiments described herein.
[0190] In addition, this application also discloses a system including means for implementing the methods of the various embodiments described herein.
[0191] It is understood that the methods according to one or more embodiments of this specification can be implemented in software, firmware, or a combination thereof.
[0192] It should be understood that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments. In particular, for the apparatus and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0193] It should be understood that the foregoing description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0194] It should be understood that the use of a singular form to describe an element or to show only one element in the accompanying drawings does not imply that the number of such element is limited to one. Furthermore, modules or elements described or shown as separate herein may be combined into a single module or element, and modules or elements described or shown as single herein may be broken down into multiple modules or elements.
[0195] It should also be understood that the terminology and expressions used herein are for descriptive purposes only, and one or more embodiments described herein should not be limited to these terms and expressions. The use of these terms and expressions does not exclude any illustrative and descriptive equivalent features (or parts thereof), and it should be recognized that various modifications that may exist should also be included within the scope of the claims. Other modifications, variations, and substitutions may also exist. Accordingly, the claims should be considered to cover all such equivalents.
[0196] Similarly, it should be noted that although specific embodiments have been described with reference to the present invention, those skilled in the art should recognize that the above embodiments are merely illustrative of one or more embodiments of this specification, and various equivalent changes or substitutions can be made without departing from the spirit of the invention. Therefore, any changes or modifications to the above embodiments within the scope of the essential spirit of the invention will fall within the scope of the claims of this application.
Claims
1. A method for training a pre-classification model for sensitive information, comprising: Construct a bag-of-frequency words W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n }; Based on the bag-of-words W of high-frequency words, a training set is constructed, which includes multiple samples. The construction of the training set includes: Get the text; Determine the tag set L = {l1, ..., l} of the text. i ,…l k }, wherein the tag l in the tag set L i Indicate whether the text involves the corresponding sensitive information type; Generate the word frequency vector WF = {wf1, ..., wf...} of the text. i ,…,wf n The element wf in the term frequency vector WF i For the word w in the bag of high-frequency words i The frequency of occurrence in the text; Using {WF,L} as samples in the training set; and The training set is used to train the sensitive information pre-classification model.
2. The method of claim 1, wherein constructing the bag-of-frequency words W comprises: Perform word segmentation on the sensitive text in the sensitive text set to obtain multiple words included in the sensitive text set; as well as Count the weighted frequency of words in the aforementioned sensitive text set; as well as Select the specified number n words that appear most frequently and place them into the high-frequency word bag.
3. The method of claim 2, wherein constructing the bag-of-high-frequency words W further includes: Before counting the occurrences of words in the sensitive text set, words included in the exclusion list are filtered out.
4. The method of claim 2, wherein constructing the bag-of-high-frequency words W further includes: Before counting the occurrences of words in the sensitive text set, the weights of one or more words in the sensitive text set are set or adjusted based on the TF-IDF algorithm.
5. The method of claim 1, wherein generating the word frequency vector of the text comprises: Statistical analysis of each word w in the bag of high-frequency words i The number of times it appears in the text; For each word w, the length of the text is considered. i The frequency of occurrence is normalized; as well as each word w i The normalized frequency of occurrence of the term w is used as the number of occurrences of the term w. i frequency of occurrence in the text wf i .
6. The method as described in claim 1, wherein the sensitive information pre-classification model is a multi-label decision tree model.
7. The method of claim 1, wherein the type of sensitive information involved in the text depends on the format of the information fragments in the text.
8. A method for performing sensitive information pre-classification, comprising: Obtain a bag-of-frequency words W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n }; Get the text to be processed; Based on the bag-of-words W of high-frequency words, a word frequency vector WF = {wf1, ..., wf2} of the text to be processed is generated. i ,…,wf n }, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed; as well as Based on the word frequency vectors, a sensitive information pre-classification model trained according to any one of claims 1-7 is used to predict the type of sensitive information involved in the text to be processed.
9. The method of claim 8, wherein the method further comprises: The system automatically selects the appropriate sensitive information identification algorithm based on the predicted type of sensitive information.
10. The method of claim 9, wherein the method further comprises: The selected sensitive information identification algorithm automatically determines the location of the corresponding type of sensitive information in the text to be processed.
11. The method of claim 8, wherein the method further comprises: The system automatically selects the appropriate data anonymization algorithm based on the predicted type of sensitive information.
12. The method of claim 11, wherein the method further comprises: The selected data anonymization algorithm is used to perform data anonymization on the text to be processed.
13. The method of claim 8, wherein the method further comprises: If the sensitive information pre-classification model predicts that the text to be processed does not involve any sensitive information type, then sensitive information identification and data desensitization will not be performed on the text to be processed.
14. A system for performing pre-classification of sensitive information, comprising: The data acquisition module is used to acquire the text to be processed. The high-frequency word bag module is used to obtain a high-frequency word bag W, which includes a specified number of n words W = {w1, ..., wn} that have the highest weighted frequency in the sensitive text set. i ,…w n }; The sensitive information pre-classification module is used to generate a word frequency vector WF = {wf1, ..., wf...} of the text to be processed based on the bag-of-words of high-frequency words W. i ,…,wf n }, the wf i For the word w in the bag of high-frequency words i The frequency of occurrence in the text to be processed; and based on the word frequency vector, using a sensitive information pre-classification model trained according to any one of claims 1-7 to predict the type of sensitive information involved in the text to be processed.
15. The system of claim 14, wherein the system further comprises: The sensitive information identification module is used to automatically select the corresponding sensitive information identification algorithm based on the predicted sensitive information type.
16. The system of claim 15, wherein the sensitive information identification module is further configured to: The selected sensitive information identification algorithm automatically determines the location of the corresponding type of sensitive information in the text to be processed.
17. The system of claim 14, wherein the system further comprises: The data anonymization module is used to automatically select the corresponding data anonymization algorithm based on the predicted type of sensitive information.
18. The system of claim 17, wherein the data anonymization module is further configured to: The selected data anonymization algorithm is used to perform data anonymization on the text to be processed.
19. An apparatus for training a pre-classification model for sensitive information, comprising: Memory; as well as A processor configured to perform the method as described in any one of claims 1-7.
20. An apparatus for pre-classifying sensitive information, comprising: Memory; as well as A processor configured to perform the method as described in any one of claims 8-13.
21. A computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-7.
22. A computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 8-13.
Citation Information
Patent Citations
Text classification method for intelligent voice interaction
CN110188199A
Sensitive information detection method and device
CN113672976A