Long text composite sensitive data identification method and system and storage medium

By using context learning LLM and single-category sensitive data recognition model in long text sensitive data recognition, the problem that the prior art cannot handle long text input of multiple sensitive data categories is solved, and efficient sensitive data recognition is achieved.

CN119646217APending Publication Date: 2025-03-18WEBANK (CHINA) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411723826.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing sensitive data identification methods can only process sensitive data in a single category and cannot effectively process long text inputs containing multiple sensitive data categories.

Method used

By obtaining long text sensitive data to be classified, similar data are retrieved in the preset database, context learning LLM is used to extract and decompose named entities and sensitive information, and classify fusion features in combination with a single-category sensitive data identification model to determine the sensitive category of data to be classified.

Benefits of technology

The identification of a variety of sensitive information is realized, the recognition efficiency and recognition effect of sensitive data is improved, and various types of long text composite data can be processed more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646217A_ABST
    Figure CN119646217A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a long text composite sensitive data recognition method and system and a storage medium, and the method comprises the steps: obtaining to-be-classified long text sensitive data, and searching n pieces of data similar to the to-be-classified long text sensitive data in a preset long text sensitive database; inputting n pieces of data into a context learning LLM to execute training learning, and inputting the long text sensitive data to be classified into the learned LLM to carry out effective named entity and sensitive information extraction and decomposition to obtain a plurality of pieces of data only containing one category, respectively executing fusion operation on each piece of data only containing one category in the plurality of pieces of data only containing one category to obtain a plurality of fusion features, and inputting the plurality of fusion features into a single-category sensitive data identification model to obtain a plurality of categories corresponding to the plurality of fusion features, and determining the plurality of categories as sensitive categories of the long text sensitive data to be classified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer software technology, and specifically relates to a method, system and storage medium for identifying long text composite sensitive data. Background Art

[0002] Existing sensitive data identification methods generally train network models on a data set consisting of a single category of sensitive data to classify and identify the single category of sensitive data. In the classification process, given a single category of data that needs to be classified, the model will first convert each character in the input text into a corresponding number based on a predefined vocabulary, and then extract the corresponding word vector based on the number. In this way, each input character is converted into a word vector representation that can be processed by the model. By averaging all the word vectors of the input text, the representation of the input text can be obtained. After being processed by the model, the classification result of the input text can be obtained.

[0003] However, current sensitive data identification methods can only process single-category sensitive data. Current models cannot effectively handle long text inputs containing multiple sensitive data categories. Summary of the invention

[0004] The present application provides a method, system and storage medium for identifying long text composite sensitive data, which can effectively identify multiple sensitive data in long text data, realize the identification of multiple sensitive data, and improve the identification efficiency and recognition effect.

[0005] In a first aspect, the present application provides a method for identifying long text composite sensitive data, the method comprising the following steps:

[0006] Acquire the long text sensitive data to be classified, and retrieve n data similar to the long text sensitive data to be classified in a preset long text sensitive database;

[0007] Input n data into the context learning LLM to perform training and learning, input the long text sensitive data to be classified into the learned LLM to effectively extract and decompose named entities and sensitive information to obtain multiple data containing only one category.

[0008] Perform a fusion operation on each of multiple data containing only one category to obtain multiple fused features, input the multiple fused features into a single-category sensitive data recognition model to obtain multiple categories corresponding to the multiple fused features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

[0009] In a second aspect, a long text composite sensitive data identification system is provided, the system comprising:

[0010] An acquisition and retrieval unit is used to acquire the long text sensitive data to be classified, and retrieve n data similar to the long text sensitive data to be classified in a preset long text sensitive database;

[0011] The classification unit is used to input n data into the context learning LLM for training and learning, and input the long text sensitive data to be classified into the learned LLM for effective extraction and decomposition of named entities and sensitive information to obtain multiple data containing only one category.

[0012] The identification unit is used to perform a fusion operation on each of the multiple data containing only one category to obtain multiple fusion features, input the multiple fusion features into the single-category sensitive data identification model to obtain multiple categories corresponding to the multiple fusion features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

[0013] In a third aspect, the present application provides a computer storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute some or all of the steps described in the first aspect of the present application.

[0014] The embodiments of the present application have the following beneficial effects:

[0015] The technical solution of the present application proposes a retrieval-enhanced extraction and processing method for long-text composite sensitive data, which can process various types of long-text composite data in a more targeted manner, and can better cope with different long-text composite data that may appear in practical applications. The technical solution of the present application is further combined with a single-category sensitive data recognition model, and single-category classification is performed on the extracted and processed data, and the results are summarized as the classification results of the long-text data to be classified, thereby realizing the recognition of multiple sensitive information and improving the recognition efficiency and recognition effect of sensitive data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 is a schematic diagram of the structure of a computer provided in an embodiment of the present application;

[0018] Figure 2 It is a flowchart of a method for identifying long text composite sensitive data provided by an embodiment of the present application;

[0019] Figure 3 A feature fusion schematic diagram provided for this application;

[0020] Figure 4 It is a structural diagram of a long text composite sensitive data identification system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, systems, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The following is an introduction to the relevant terms involved in this application.

[0025] Sensitive data refers to data that may cause serious harm to society or individuals if leaked. It includes personal privacy data, such as name, ID number, address, phone number, bank account, email, password, medical information, educational background, etc. It also includes data that is not suitable for enterprises or social institutions to publish, such as the business situation of the enterprise, the network structure of the enterprise, IP address list, etc.

[0026] LLM (Large Language Model) is a deep learning model trained with a large amount of text data. It can perform a variety of natural language processing tasks, such as text classification, question answering, and dialogue. They usually use the Transformer architecture and are trained through self-supervised learning methods.

[0027] BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained natural language processing (NLP) model. BERT uses the Transformer architecture to achieve deep bidirectional language representation, thereby achieving significant performance improvements in multiple NLP tasks.

[0028] The FastText model is a word vector and text classification tool. Its main application scenarios include text classification and word vector calculation, especially when processing large-scale text data.

[0029] The following describes the system architecture of a computer related to an embodiment of the present application.

[0030] The present application also provides a computer 10, such as Figure 1 As shown, it includes at least one processor 11 and a memory 12, and may also include a communications interface 14 and a bus 13. The processor 11, the memory 12 and the communications interface 14 may communicate with each other through the bus 13. The communications interface 14 may transmit information. The processor 11 may call the logic instructions in the memory 12 to execute the method in the above embodiment.

[0031] In addition, the logic instructions in the above-mentioned memory 12 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. The above-mentioned logic instructions can also become an operating system, application program or computer program, etc.

[0032] The memory 12 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 11 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 12, that is, implementing the methods in the above embodiments.

[0033] The memory 12 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer 10, etc. In addition, the memory 12 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, may also be a transient storage medium.

[0034] It is understandable that the computer in this embodiment can be understood as a server, for example, the server includes a cloud server or an edge server, and no unique limitation is made here. Of course, in an optional technical scenario, the above-mentioned computer can also be a personal computer (PC), a tablet computer, a laptop computer, and other smart devices. This application does not limit the specific form of the above-mentioned computer, as long as the above-mentioned computer has an operating system and shortcuts.

[0035] The specific methods are introduced in detail below.

[0036] See also Figure 2 ,This application also provides a method for identifying long text composite sensitive data, Figure 2 A flowchart of a method for identifying long text composite sensitive data provided by this application, the method can be used in Figure 1 The computer shown in the figure can be a personal computer, a server, a tablet computer, a laptop computer or other smart devices. The computer can form a blockchain network or a cloud network. The method is as follows: Figure 2 As shown, the following steps are included:

[0037] Step S201: obtaining long text sensitive data to be classified, and searching a preset long text sensitive database for n data similar to the long text sensitive data to be classified;

[0038] For example, the above-mentioned searching for n data similar to the long text sensitive data to be classified in the preset long text sensitive database may specifically include:

[0039] The long text sensitive data to be classified is extracted through a preset model to mark multiple sensitive data categories, multiple data representations corresponding to the multiple sensitive data categories are extracted, and multiple vectors corresponding to the multiple data representations are constructed. The similarity with the multiple vectors is calculated in parallel in a preset long text sensitive database. Taking a single vector as a benchmark, multiple data with a similarity greater than a similarity threshold in the preset long text sensitive database are obtained, and category prediction is performed on the multiple data as preliminary data to obtain multiple category prediction probabilities corresponding to the multiple data. After the multiple category prediction probabilities are arranged in descending order, the first n data are selected as the similar n data.

[0040] For example, performing category prediction on the plurality of data as the plurality of preliminary data to obtain the plurality of category prediction probabilities corresponding to the plurality of preliminary data may specifically include:

[0041] Extract one preliminary data from multiple preliminary data, use the trained FastText model to perform category prediction on the preliminary data to obtain a category prediction probability corresponding to the preliminary data, traverse the multiple preliminary data to obtain multiple category prediction probabilities, and train the FastText model specifically including:

[0042] Input any training data d to the FastText model, and the model outputs an N-dimensional vector m as the classification prediction result. During the training process, the cross entropy loss function and gradient descent method are used to update the FastText model parameters W.

[0043] The above cross entropy loss function is specifically:

[0044]

[0045] Where y is the correct category corresponding to data d, m y 、m j They are the prediction results corresponding to the correct category and the prediction results corresponding to category j;

[0046] The above-mentioned gradient descent method may specifically include:

[0047]

[0048] Where W t , W t+1 , α are the model parameters of the t-th iteration and the model parameters of the t+1-th iteration, is the gradient value.

[0049] For example, the above-mentioned use of the trained FastText model to perform category prediction on a preliminary data to obtain the category prediction probability corresponding to the preliminary data may specifically include:

[0050] The long text sensitive data to be classified is input into the trained FastText model to obtain multiple prediction probabilities corresponding to multiple sensitive categories, α sensitive categories greater than the probability threshold and the corresponding α prediction probabilities are extracted from the multiple prediction probabilities, a preliminary data is input into the trained FastText model to obtain x sensitive categories, β prediction probabilities corresponding to β categories in the x categories that are the same as the α sensitive categories are determined, and the sum of the β prediction probabilities is determined as the category prediction probability corresponding to the preliminary data.

[0051] In an optional technical scenario, for example, the long text sensitive data to be classified has 5 categories, and the corresponding prediction probabilities are: 0.05, 0.1, 0.25, 0.3, 0.3; if the probability threshold is 0.2, 0.25, 0.3, 0.3 are determined as the corresponding 3 sensitive categories. If a preliminary data is identified as having the above 3 sensitive categories, the corresponding category prediction probability is: 0.3+0.3+0.25=0.85; if a preliminary data is identified as having the 1st and 2nd categories of the above 3 sensitive categories, the corresponding category prediction probability is: 0.25+0.3=0.55. The above values ​​are only for illustration, and other values ​​can also be used in other application scenarios.

[0052] The following example illustrates how to obtain the above n data. The long text data 'Xiao Ming's home address is No. 1 Beijing Avenue, and his bank account number is 1234' contains sensitive data categories marked as 'name; address; bank account'. Therefore, each piece of data contains the corresponding data representation and sensitive data category as a piece of data in the database. Therefore, this example can construct a database containing different types of long text data and corresponding representations and categories; then, for the long text data that needs to be classified, first retrieve the most similar data from the database. The retrieval method is as follows: first, use the same BERT model to extract the corresponding representation for the long text data to be classified, and then calculate the cosine similarity between the representation and the representation of all data in the database. For the representation represented in the form of a vector, the cosine similarity is calculated as follows: for the representation x of the data to be classified and the representation c of any data in the database, the cosine similarity can be expressed as follows:

[0053]

[0054] Of course, the above similarity may also be other similarities, such as vector difference similarity and the like.

[0055] Because the calculations are independent of each other and can be performed in parallel, the time consumed to calculate the similarity between all the data in the database is theoretically close to the time consumed to calculate the similarity between a pair of data; after obtaining the similarity with all the data, the top 20 data (i.e., multiple data) with the greatest similarity are found as the result of preliminary retrieval and screening. Because the BERT model pre-training process does not include the goal of the classification task, if only this method is used, it may not be possible to find the samples that are most helpful for subsequent classification. For example, "No. 1 Beijing Road" and "No. 9 North-South Avenue" are both sensitive data of the same type of address, but they may not be similar in BERT representation. Therefore, in order to retrieve similar samples more effectively, another method is proposed as an auxiliary. Specifically, a large number of labeled single sensitive data and cross entropy loss function are used at the same time to train a high-accuracy single-category sensitive data recognition model FastText model. The training method is as follows: for an N-category single-category data classification model, for any input data d, the model outputs an N-dimensional vector m = [m1, ..., m n ], as the result of classification prediction. The cross entropy loss function is used to update the model parameters W during training. The loss function can be expressed as

[0056] The above cross entropy loss function is specifically:

[0057]

[0058] Where y is the correct category corresponding to data d, m y 、m j They are the prediction results corresponding to the correct category and the prediction results corresponding to category j;

[0059] The above-mentioned gradient descent method may specifically include:

[0060]

[0061] Where W t , W t+1 , α are the model parameters of the t-th iteration, the model parameters of the t+1-th iteration, and the learning rate.

[0062] Although the trained FastText model cannot effectively process long text data to obtain all sensitive data categories and corresponding data contained in it, if the FastText model is used to classify the long text, a preliminary estimate of the sensitive data categories contained in it can be obtained. For example, for the example 'Xiao Ming's home address is No. 1 Beijing Avenue, and his bank account number is 1234', the classification result of FastText may be a person's name, address, or bank account number, depending on which type of information is dominant. And there is a high probability that the prediction probabilities of the categories of name, address, and bank account number are the largest among all categories. Because we use the first three categories of the FastText prediction results as an estimate of the categories contained in the long text data to be classified. Based on the estimated results, we then further select the first 10 data containing more estimated categories from the 20 data that were initially screened as the final retrieval results. Because each data is annotated with the sensitive data category contained when the database is constructed, this step of screening can be completed directly through keyword matching. For example, for the data to be classified, 'Xiao Bei's home address is No. 1 Guangming Avenue, and his personal information includes 132xxxxxxxx, aqx@aqx.com', the categories estimated by the single-category model include names, place names, and mobile phone numbers. The existing 20 preliminary search results include two data, 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' and 'Xiao Ming's mobile phone number is 134xxxxxxxx'. Among them, the sensitive categories marked for 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' are names, place names, mobile phone numbers, and email addresses; the sensitive categories marked for 'Xiao Ming's mobile phone number is 134xxxxxxxx' are names and mobile phone numbers. Therefore, the data 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' contains more estimated categories of data to be classified, and has a higher priority in the screening of the final search results.

[0063] Through the retrieval method proposed above, similar examples that are more consistent with the data characteristics can be retrieved for any data to be classified, which is more conducive to the subsequent context learning to process and extract the sensitive data contained. For example, for the data to be classified 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com', according to the retrieval method proposed above, the following examples can be obtained:

[0064] Input data: Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com.

[0065] Named entity or sensitive information: Xiao Ming; No. 1 Beijing Avenue; 131xxxxxxxx; 123; abc@abc.com Input data: Xiao Hong’s home address is No. 3 North-South Avenue and her bank account number is 123xxxxxxx.

[0066] Named entity or sensitive information: Xiaohong; No. 3 North-South Avenue; 123xxxxxxx

[0067] …

[0068] Input data: Xiao Ming opened an account at the Industrial and Commercial Bank of China in Beijing in 2004, and his phone number is 133xxxxxxx.

[0069] Named entity or sensitive information: Xiao Ming; Beijing; Industrial and Commercial Bank of China; 2004; 133xxxxxxx.

[0070] Step S202: n data are input into LLM (context learning) for training and learning, and the long text sensitive data to be classified is input into the learned LLM for effective extraction and decomposition of named entities and sensitive information to obtain multiple data containing only one category.

[0071] Step S203: perform a fusion operation on each of the multiple data containing only one category to obtain multiple fusion features, input the multiple fusion features into the single-category sensitive data recognition model to obtain multiple categories corresponding to the multiple fusion features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

[0072] The technical solution of the present application proposes a retrieval-enhanced extraction and processing method for long-text composite sensitive data, which can process various types of long-text composite data in a more targeted manner, and can better cope with different long-text composite data that may appear in practical applications. The technical solution of the present application is further combined with a single-category sensitive data recognition model, and single-category classification is performed on the extracted and processed data, and the results are summarized as the classification results of the long-text data to be classified, thereby realizing the recognition of multiple sensitive information and improving the recognition efficiency and recognition effect of sensitive data.

[0073] For example, the above-mentioned fusion operation is performed on each of the multiple data containing only one category to obtain multiple fusion features, which specifically includes:

[0074] Get first data containing only one category, LLM generates m similar data, the m similar data are data of the same category in a similar form to the first data, divide the first data into w1 subfields with p characters as a whole, generate a k-dimensional vector Vi for each subfield, calculate the average value of the k-dimensional vector Vi of each subfield to obtain a feature vector of the first data, traverse the m similar data to obtain m feature vectors of m similar data, perform addition operation on the m feature vectors to obtain a first fused feature vector, perform multiplication operation on the first fused feature vector and the feature vector of the first data to obtain a second fused feature vector, the second fused feature vector is the fused feature of the first data, and traverse multiple data containing only one category to obtain multiple fused features.

[0075] In an optional technical scenario, take three characters as an example, such as Figure 3 As shown, Figure 3 A feature fusion schematic diagram provided for this application, such as Figure 3 As shown in the figure, the first data is "Guangming Avenue No. 1" as an example, then LLM can automatically generate two similar forms of data of the same category, "Beijing Road No. 3" and "North-South Avenue No. 9". Every three characters are a whole, so "Guangming Avenue No. 1" is divided into sub-fields such as "Guangming Avenue", "Ming Avenue", "Avenue 1", and "Dao 1". A sub-field is represented by a K-dimensional vector V i =[v1, v2, …, v k ], where i represents the i-th subfield, and then these features are fused, such as Figure 3 As shown, the features of the two generated data of the same category are first fused, that is, the features of the two data of 'No. 3 Beijing Road' and 'No. 9 North-South Avenue' are extracted respectively, and then the features of the two data are summed up for a fusion, and then the fusion result is fused with 'No. 1 Guangming Avenue' for a second time. During the second fusion, the multiplication operation is used to obtain multiple fusion features by the product operation. For the first fusion, the addition operation is used to highlight the category information shared between different generated data. The features obtained in this way already include the feature data shared by different data. The multiplication operation only retains the same feature data, and different data cannot be fused together, avoiding the problem of feature loss in the final data fusion. Then the multiplication operation is performed to fuse the features of the first data with the features after the first fusion, so as to improve the reliability of the classification results.

[0076] Embodiment 1

[0077] Implementation 1 of the present application provides a method for identifying long text composite sensitive data. The long text sensitive data to be classified in this embodiment is "Xiao Ming's home address is No. 1 Beijing Avenue, and his bank account number is 1234", and the sensitive data category contained therein is marked as 'name; address; bank account'. Therefore, each piece of data contains the corresponding data representation, sensitive data category, as a piece of data in the database. Thus, we can build a database containing different types of long text data and corresponding representations and categories. Then, for the long text data that needs to be classified, we first retrieve the most similar data from the database. The retrieval method is as follows. We first use the same BERT model to extract the corresponding representation for the long text data to be classified, and then calculate the cosine similarity between the representation and the representation of all data in the database. For the representation represented in the form of a vector, the cosine similarity is calculated as follows. For the pair of data, the representation x of the data to be classified and the representation c of any piece of data in the database, the cosine similarity can be expressed as:

[0078]

[0079] Because the calculations are independent of each other and can be performed in parallel, the time consumed to calculate the similarity between all the data in the database is theoretically close to the time consumed to calculate the similarity between a pair of data. After obtaining the similarity with all the data, find the top 20 data with the greatest similarity as the result of the preliminary retrieval screening. As mentioned above, because the BERT model pre-training process does not include the goal of the classification task, if only this method is used, it may not be possible to find the most helpful samples for subsequent classification. For example, 'No. 1 Beijing Road' and 'No. 9 North-South Avenue' are both sensitive data of the same type of address, but they may not be similar in BERT representation. Therefore, in order to retrieve similar samples more effectively, we propose another method as an auxiliary. Specifically, we use a large number of labeled single sensitive data and cross entropy loss function at the same time to train a high-accuracy single-category sensitive data recognition model FastText model. The training method is as follows: for an N-category single-category data classification model, for any input data d, the model outputs an N-dimensional vector m = [m1,…,m n ], as the result of classification prediction. The cross entropy loss function is used to update the model parameters W during training. The loss function can be expressed as:

[0080]

[0081] Among them, y is the correct category corresponding to the data d, m y 、m j They are the prediction results corresponding to the correct category and the prediction results corresponding to category j. After calculating the loss function, the gradient descent method can be used to update the model parameters, which is expressed as:

[0082]

[0083] Among them, W t , W t+1 , α are the model parameters for the tth iteration, the model parameters for the t+1th iteration, and the learning rate, is the gradient value. After multiple iterations, a sensitive data recognition model can be trained.

[0084] Although the trained FastText model cannot effectively process long text data to obtain all sensitive data categories and corresponding data contained in it, if the FastText model is used to classify the long text, a preliminary estimate of the sensitive data categories contained in it can be obtained. For example, for the example 'Xiao Ming's home address is No. 1 Beijing Avenue, and his bank account number is 1234', the classification result of FastText may be a person's name, address, or bank account number, depending on which type of information is dominant. And there is a high probability that the prediction probabilities of the categories of name, address, and bank account number are the largest among all categories. Because we use the first three categories of the FastText prediction results as an estimate of the categories contained in the long text data to be classified. Based on the estimated results, we then further select the first 10 data containing more estimated categories from the 20 data that were initially screened as the final retrieval results. Because each data is annotated with the sensitive data category contained when the database is constructed, this step of screening can be completed directly through keyword matching. For example, for the data to be classified, 'Xiao Bei's home address is No. 1 Guangming Avenue, and his personal information includes 132xxxxxxxx, aqx@aqx.com', the categories estimated by the single-category model include names, place names, and mobile phone numbers. The existing 20 preliminary search results include two data, 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' and 'Xiao Ming's mobile phone number is 134xxxxxxxx'. Among them, the sensitive categories marked for 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' are names, place names, mobile phone numbers, and email addresses; the sensitive categories marked for 'Xiao Ming's mobile phone number is 134xxxxxxxx' are names and mobile phone numbers. Therefore, the data 'Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com' contains more estimated categories of data to be classified, and has a higher priority in the screening of the final search results.

[0085] Through the retrieval method proposed above, similar examples that are more consistent with the data characteristics can be retrieved for any data to be classified, which is more conducive to the subsequent context learning to process and extract the contained sensitive data. For example, for the data to be classified 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com', according to the retrieval method proposed above, the following examples can be obtained:

[0086] Input data: Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com.

[0087] Named entity or sensitive information: Xiao Ming; No. 1 Beijing Avenue; 131xxxxxxxx; 123; abc@abc.com

[0088] Input data: Xiaohong's home address is No. 3 North-South Avenue and her bank account is 123xxxxxxx.

[0089] Named entity or sensitive information: Xiaohong; No. 3 North-South Avenue; 123xxxxxxx

[0090] …

[0091] Input data: Xiao Ming opened an account at the Industrial and Commercial Bank of China in Beijing in 2004, and his phone number is 133xxxxxxx.

[0092] Named entity or sensitive information: Xiao Ming; Beijing; Industrial and Commercial Bank of China; 2004; 133xxxxxxx

[0093] Input the above examples into LLM, and LLM can automatically learn the characteristics of this type of data and different types of sensitive data from the examples, and then effectively extract and decompose the named entities and sensitive information of the data to be classified, 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com'. The form of data input into LLM is as follows: first, arrange the 10 retrieved results and the corresponding named entities or sensitive information in order, and then add the data to be classified. LLM can automatically output the named entities or sensitive information contained in the classified data:

[0094] You are a good named entity recognition tool that can effectively extract named entities or sensitive information contained in the text. Given the following example, your task is to extract the named entities or sensitive information contained in any input text.

[0095] Example:

[0096] Input data: Xiao Ming's home address is No. 1 Beijing Avenue, and his personal information includes 131xxxxxxxx, 123, abc@abc.com.

[0097] Named entity or sensitive information: Xiao Ming; No. 1 Beijing Avenue; 131xxxxxxxx; 123; abc@abc.com

[0098] Input data: Xiaohong's home address is No. 3 North-South Avenue and her bank account is 123xxxxxxx.

[0099] Named entity or sensitive information: Xiaohong; No. 3 North-South Avenue; 123xxxxxxx

[0100] …

[0101] Input data: Xiao Ming opened an account at the Industrial and Commercial Bank of China in Beijing in 2004, and his phone number is 133xxxxxxx.

[0102] Named entity or sensitive information: Xiao Ming; Beijing; Industrial and Commercial Bank of China; 2004; 133xxxxxxx

[0103] According to the example, the named entities or sensitive information of the data 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com' are extracted and output. After extracting and decomposing the classified data, multiple data containing only one category can be obtained. For example, for the classified data 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com', LLM can extract the single-category classified data of 'Xiaobei; No. 1 Guangming Avenue; 132xxxxxxxx; aqx@aqx.com'. In order to further improve the recognition accuracy of sensitive data, we propose a feature fusion module to fuse multiple data of the same category, and then combine the FastText model to train a multi-input single-category sensitive data recognition model. First, after obtaining the extracted single-category classified data, for each data, we use LLM to automatically generate two additional data of similar form (same category). For example, for the single-category data 'No. 1 Guangming Avenue', LLM can automatically generate two similar forms of data of the same category, 'No. 3 Beijing Road' and 'No. 9 North-South Avenue'. Then we use 3-gram features to train a multi-input feature fusion sensitive data recognition model. The 3-gram feature divides the data into three parts, each of which is a whole. For example, for the data 'No. 1 Guangming Avenue', after 3-gram division, it becomes 'Guangming Avenue', 'Ming Avenue', 'Avenue 1', 'Dao 1' and other sub-fields. Each sub-field is represented by a K-dimensional vector V i =[v1,v2,…,vk ], where i represents the i-th subfield. Then we propose a feature fusion module to fuse the three input data. The feature fusion module can highlight the text information that is more important for classification, thereby improving the classification accuracy. For example, for the data to be classified, 'Guangming Avenue No. 1', the field 'Dao' can better indicate that this is a data belonging to the place name category than 'Guangming' or 'No. 1'. Therefore, the model should pay more attention to this part of information in classification. At the same time, this type of information is shared among different data of the same category. For example, in the three data 'Guangming Avenue No. 1', 'Beijing Road No. 3', and 'North-South Avenue No. 9', 'Dao' and 'Lu' are shared information, indicating that these three data belong to the place name category. Therefore, the feature fusion module we proposed trains the network to automatically learn to recognize the shared category information in different input data of the same category, so as to better utilize the input data and further improve the accuracy. Specifically, in the design of the feature fusion module, we first extract 3-gram features from the two additional data automatically generated by LLM, and average the 3-gram features of different subfields of each data. Then we use a fully connected layer network to extract the features of the two data respectively, and then we sum the two sets of features for the first fusion. Then we use another fully connected layer network for further feature extraction, and the obtained features already contain the category information shared by different data. At the same time, for the data to be classified, we also extract 3-gram features, and then multiply the 3-gram features with the features of the additional data just obtained for a second fusion. This fusion can further highlight the category information shared between different data. Then we use the fully connected layer to extract the result after the second fusion as the final fusion feature of the feature module; then combine it with the fully connected layer of the FastText model to output the final classification result.

[0104] The loss function and training method used in the training of the model with the feature module are the same as those used in the training of the FastText model only, which have been described in detail. After the model is trained, each piece of data to be classified can be classified and identified with higher accuracy. For this example, different categories can be obtained, such as name, place name, mobile phone number, and email address; these categories are put together to serve as the final classification result of the input data to be classified, 'Xiaobei's home address is No. 1 Guangming Avenue, personal information is 132xxxxxxxx, aqx@aqx.com', that is, [name, place name, mobile phone number, email address].

[0105] See also Figure 4 , Figure 4 A schematic diagram of the structure of a long text composite sensitive data identification system provided in this application, the system comprising:

[0106] The acquisition and retrieval unit 401 is used to acquire the long text sensitive data to be classified, and retrieve n data similar to the long text sensitive data to be classified in a preset long text sensitive database;

[0107] The classification unit 402 is used to input n data into the context learning LLM to perform training and learning, and input the long text sensitive data to be classified into the learned LLM to effectively extract and decompose the named entities and sensitive information to obtain multiple data containing only one category.

[0108] The identification unit 403 is used to perform a fusion operation on each of the multiple data containing only one category to obtain multiple fusion features, input the multiple fusion features into the single-category sensitive data identification model to obtain multiple categories corresponding to the multiple fusion features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

[0109] For example,

[0110] The acquisition retrieval unit 401 is specifically used to extract the long text sensitive data to be classified through a preset model to mark multiple sensitive data categories, extract multiple data representations corresponding to the multiple sensitive data categories, construct multiple vectors corresponding to the multiple data representations, and parallelly calculate the similarity with the multiple vectors in a preset long text sensitive database. Taking a single vector as a benchmark, multiple data with similarities greater than a similarity threshold in the preset long text sensitive database are obtained, and category prediction is performed on the multiple data as preliminary data to obtain multiple category prediction probabilities corresponding to the multiple data. After arranging the multiple category prediction probabilities in descending order, the first n data are selected as similar n data.

[0111] For example,

[0112] The acquisition retrieval unit 401 is specifically used to extract one preliminary data from multiple preliminary data, use the trained FastText model to perform category prediction on the preliminary data to obtain a category prediction probability corresponding to the preliminary data, and traverse multiple preliminary data to obtain multiple category prediction probabilities.

[0113] For example,

[0114] The retrieval unit 401 is obtained, which is specifically used to input arbitrary training data d into the FastText model, and the model outputs an N-dimensional vector m as a classification prediction result. During the training process, the cross entropy loss function and the gradient descent method are used to update the FastText model parameters W.

[0115] For example,

[0116] The acquisition retrieval unit 401 is specifically used to input the long text sensitive data to be classified into the trained FastText model to obtain multiple prediction probabilities corresponding to multiple sensitive categories, extract α sensitive categories greater than the probability threshold and the corresponding α prediction probabilities from the multiple prediction probabilities, input a preliminary data into the trained FastText model to obtain x sensitive categories, determine β prediction probabilities corresponding to β categories in the x categories that are the same as the α sensitive categories, and determine the sum of the β prediction probabilities as the category prediction probability corresponding to the preliminary data.

[0117] For example,

[0118] The identification unit 403 is specifically used to obtain first data containing only one category, LLM generates m similar data, the m similar data are data of the same category in a similar form to the first data, the first data is divided into w1 subfields with p characters as a whole, a k-dimensional vector Vi of each subfield is generated, the average value of the k-dimensional vector Vi of each subfield is calculated to obtain a feature vector of the first data, m similar data are traversed to obtain m feature vectors of m similar data, the m feature vectors are added to obtain a first fused feature vector, the first fused feature vector is multiplied with the feature vector of the first data to obtain a second fused feature vector, the second fused feature vector is the fused feature of the first data, and multiple data containing only one category are traversed to obtain multiple fused features.

[0119] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0120] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0121] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0122] In the several embodiments provided in the present application, it should be understood that the disclosed methods, systems and systems can be implemented in other ways. For example, the system embodiments described above are only schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0125] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus RAM (DR RAM). Various media that can store program code are available.

[0126] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.

Claims

1. A method for identifying long text composite sensitive data, characterized in that: The method comprises the following steps: Acquire the long text sensitive data to be classified, and retrieve n data similar to the long text sensitive data to be classified in a preset long text sensitive database; Input n data into the context learning LLM to perform training and learning, input the long text sensitive data to be classified into the learned LLM to effectively extract and decompose named entities and sensitive information to obtain multiple data containing only one category. Perform a fusion operation on each of multiple data containing only one category to obtain multiple fused features, input the multiple fused features into a single-category sensitive data recognition model to obtain multiple categories corresponding to the multiple fused features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

2. The method for identifying long text composite sensitive data according to claim 1, characterized in that: The step of retrieving n data similar to the long text sensitive data to be classified from a preset long text sensitive database specifically includes: The long text sensitive data to be classified is extracted through a preset model to mark multiple sensitive data categories, multiple data representations corresponding to the multiple sensitive data categories are extracted, and multiple vectors corresponding to the multiple data representations are constructed. The similarity with the multiple vectors is calculated in parallel in a preset long text sensitive database. Taking a single vector as a benchmark, multiple data with a similarity greater than a similarity threshold in the preset long text sensitive database are obtained, and category prediction is performed on the multiple data as preliminary data to obtain multiple category prediction probabilities corresponding to the multiple data. After the multiple category prediction probabilities are arranged in descending order, the first n data are selected as the similar n data.

3. The method for identifying long text composite sensitive data according to claim 2, characterized in that: The performing category prediction on the multiple data as multiple preliminary data to obtain the corresponding multiple category prediction probabilities in the multiple preliminary data specifically includes: Extract one preliminary data from multiple preliminary data, use the trained FastText model to perform category prediction on the preliminary data to obtain a category prediction probability corresponding to the preliminary data, and traverse the multiple preliminary data to obtain multiple category prediction probabilities.

4. The method for identifying long text composite sensitive data according to claim 3, characterized in that: Training the FastText model specifically includes: Input arbitrary training data d into the FastText model, and the model outputs an N-dimensional vector m as the classification prediction result. During the training process, the cross entropy loss function and gradient descent method are used to update the FastText model parameters W.

5. The method for identifying long text composite sensitive data according to claim 3, characterized in that: The method of using the trained FastText model to perform category prediction on a preliminary data to obtain a category prediction probability corresponding to the preliminary data specifically includes: The long text sensitive data to be classified is input into the trained FastText model to obtain multiple prediction probabilities corresponding to multiple sensitive categories, α sensitive categories greater than the probability threshold and the corresponding α prediction probabilities are extracted from the multiple prediction probabilities, a preliminary data is input into the trained FastText model to obtain x sensitive categories, β prediction probabilities corresponding to β categories in the x categories that are the same as the α sensitive categories are determined, and the sum of the β prediction probabilities is determined as the category prediction probability corresponding to the preliminary data.

6. The method for identifying long text composite sensitive data according to claim 1, characterized in that: The step of performing a fusion operation on each of the multiple data containing only one category to obtain multiple fusion features specifically includes: Get first data containing only one category, LLM generates m similar data, the m similar data are data of the same category in a similar form to the first data, divide the first data into w1 subfields with p characters as a whole, generate a k-dimensional vector Vi for each subfield, calculate the average value of the k-dimensional vector Vi of each subfield to obtain a feature vector of the first data, traverse the m similar data to obtain m feature vectors of m similar data, perform addition operation on the m feature vectors to obtain a first fused feature vector, perform multiplication operation on the first fused feature vector and the feature vector of the first data to obtain a second fused feature vector, the second fused feature vector is the fused feature of the first data, and traverse multiple data containing only one category to obtain multiple fused features.

7. A long text composite sensitive data identification system, characterized in that: The system comprises: An acquisition and retrieval unit is used to acquire the long text sensitive data to be classified, and retrieve n data similar to the long text sensitive data to be classified in a preset long text sensitive database; The classification unit is used to input n data into the context learning LLM for training and learning, and input the long text sensitive data to be classified into the learned LLM for effective extraction and decomposition of named entities and sensitive information to obtain multiple data containing only one category. The identification unit is used to perform a fusion operation on each of the multiple data containing only one category to obtain multiple fusion features, input the multiple fusion features into the single-category sensitive data identification model to obtain multiple categories corresponding to the multiple fusion features, and determine the multiple categories as sensitive categories of the long text sensitive data to be classified.

8. The long text composite sensitive data identification system according to claim 7, characterized in that: The acquisition and retrieval unit is specifically used to extract multiple sensitive data categories from the long text sensitive data to be classified through a preset model, extract multiple data representations corresponding to the multiple sensitive data categories, construct multiple vectors corresponding to the multiple data representations, and parallelly calculate the similarity with the multiple vectors in a preset long text sensitive database. Taking a single vector as a benchmark, multiple data with similarities greater than a similarity threshold in the preset long text sensitive database are obtained, and category prediction is performed on the multiple data as preliminary data to obtain multiple category prediction probabilities corresponding to the multiple data. After arranging the multiple category prediction probabilities in descending order, the first n data are selected as the similar n data.

9. The long text composite sensitive data identification system according to claim 7, characterized in that: The recognition unit is specifically used to obtain first data containing only one category, LLM generates m similar data, the m similar data are data of the same category in a similar form to the first data, the first data is divided into w1 subfields with p characters as a whole, a k-dimensional vector Vi of each subfield is generated, the average value of the k-dimensional vector Vi of each subfield is calculated to obtain a feature vector of the first data, m similar data are traversed to obtain m feature vectors of m similar data, the m feature vectors are added to obtain a first fused feature vector, the first fused feature vector is multiplied with the feature vector of the first data to obtain a second fused feature vector, the second fused feature vector is the fused feature of the first data, and multiple data containing only one category are traversed to obtain multiple fused features.

10. A computer storage medium storing a computer program for electronic data exchange, characterized in that: The computer program enables a computer to execute the steps of the method according to any one of claims 1 to 6.