Sensitive information identification method for multi-modal data
By combining the MacBERT-BiLSTM-CRF model and multi-level rule template, based on the Kafka architecture method, the problem of insufficient identification accuracy and operating performance of sensitive data classification and grading in the prior art is solved, and efficient and stable multi-source data identification and classification and grading are achieved.
Patent Information
- Application Number
- CN202510217778.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems in the classification and classification of sensitive data, such as low recognition accuracy, insufficient operating performance, and limited functional scalability and adaptability, making it difficult to adapt to complex multi-source data environments.
The MacBERT-BiLSTM-CRF model architecture is combined with multi-level rule templates to preprocess and identify multi-modal data, and real-time data transmission and processing are realized based on the Kafka architecture, dynamic resource adjustment strategies are designed, and dynamic classification and modular design are supported.
It significantly improves the recognition accuracy of multi-source data, realizes stable real-time processing capabilities in high concurrent scenarios, enhances functional scalability and adaptability, and meets personalized needs in multiple business scenarios.
Smart Images

Figure CN120145108A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security, and particularly to a method for identifying sensitive information for multi-modal data. Background Art
[0002] With the rapid development and wide application of information technology, the world is currently in the era of big data. Through technologies such as data mining and machine learning, the commercial and scientific research values of data have been massively explored and utilized, resulting in a large amount of data being collected and stored. This data may contain a large amount of sensitive data, such as personal privacy data, financial data, medical records, etc. As the degree of data resource development and sharing deepens, the security of data gradually decreases. Once sensitive data is leaked, it may cause serious impacts on individuals, institutions, and society. For example, if the personal information and medical treatment data of patients in a medical institution are illegally obtained and misused, it will cause serious damage to the rights and interests of patients.
[0003] To address the needs of data leakage prevention and sensitive information protection, in recent years, the state has continuously strengthened the legal and policy guarantees for data security. According to these regulations and policies, data can be classified into general data, important data, and critical data according to their importance. Among them, critical data has an important impact on national security and social stability, so its protection is particularly important. In addition, according to the source and field of data, data can be further divided into types such as personal information data, medical data, traffic data, and financial data. Among them, personal information data, as one of the most common types of sensitive data in the era of big data, involves sensitive content such as an individual's basic information, behavior habits, and social network. For data in different fields, it is particularly necessary to adopt corresponding protection strategies and technical means, and the key to achieving this goal lies in accurately identifying the sensitive content in the data and classifying and grading it.
[0004] At the same time, sensitive data in real life often comes from a variety of different data sources, including structured data (such as tabular data), unstructured data (such as text, pictures), and semi-structured data (such as JSON files). The differences between these data sources pose a huge challenge to unified data classification and grading. Therefore, researching how to accurately identify sensitive information in multi-source data and achieve classification and grading has become one of the important topics in the current field of data protection technology. Solving this problem not only helps to develop sensitive data protection methods that support multi-level and diverse data sources, but also meets the needs of different data source characteristics and realizes precise protection of sensitive data.
[0005] Existing sensitive data classification and grading technologies have some technical problems in terms of recognition accuracy, operation performance, and functional scalability. Rule-based methods are limited by manually designed rules and are difficult to adapt to complex data formats; although deep learning methods have improved recognition performance, they still have limitations in multi-source data processing and generalization ability. Existing technologies have bottlenecks in real-time processing and stability and are difficult to support large-scale data classification and grading. In addition, existing methods lack dynamic adaptation capabilities, which limit the flexible adjustment to different scenario requirements, and the functional module design is relatively fixed, making it difficult to meet personalized needs. Summary of the Invention
[0006] To solve the problems of low recognition accuracy, insufficient operation performance, and limited functional scalability and adaptability existing in the prior art, the present invention provides a method for identifying sensitive information for multi-modal data, including:
[0007] S1. Preprocess the Chinese dataset to obtain preprocessed data;
[0008] S2. Use the MacBERT-BiLSTM-CRF model architecture to identify sensitive information from the preprocessed data to obtain the recognition result;
[0009] S3. Optimize the MacBERT-BiLSTM-CRF model architecture to improve its accuracy and efficiency in identifying sensitive information from the Chinese dataset;
[0010] S4. Implement real-time transmission and processing of data based on the Kafka architecture, design a dynamic resource adjustment strategy to ensure stable operation in high-concurrency scenarios;
[0011] S5. Classify and grade the recognition results according to the preset classification and grading templates and dynamic rules, and store the recognition results in the database to support subsequent analysis and auditing.
[0012] Further, S1 specifically includes:
[0013] S11. Extract domain multi-level rule templates from the Chinese dataset to obtain text data;
[0014] S12. Use the character-level BIOES annotation method to annotate the text data;
[0015] S13. Convert the characters and their labels of the text data into index values through a self-built vocabulary, and pad the data to a unified length and convert it into a tensor format to obtain the preprocessed data.
[0016] Further, in S2, the MacBERT-BiLSTM-CRF model architecture includes:
[0017] The MacBERT layer is used to extract semantic features through a masked language model based on text error correction and a sentence order prediction task;
[0018] The BiLSTM layer is used to capture the context dependencies of the text;
[0019] The CRF layer is used to constrain the output of legal label sequences through a label transition matrix.
[0020] Furthermore, S3 specifically includes:
[0021] S31. Introduce regular expressions as conditional restrictions, calculate the constraint loss, and combine it with the original loss function to form a new total loss function;
[0022] S32. Conduct correlation analysis through multi-source data to improve the quality and usability of the data, and enhance the interpretability and adaptability of the model.
[0023] Furthermore, S4 specifically includes:
[0024] S41. Send the preprocessed data in S1 to the specified Topic of the Kafka message queue;
[0025] S42. Dynamically adjust the number of instances according to the data volume and processing speed to achieve load balancing in high-concurrency scenarios.
[0026] Furthermore, in S5, the classification and grading module includes: a data scanning and analysis module, a data text parsing module, and a distributed task implementation module.
[0027] The beneficial effects of the present invention are as follows:
[0028] By combining an optimized deep learning model with multi-level rule templates, the present invention significantly improves the recognition accuracy of complex multi-source data. Especially in unstructured and heterogeneous data environments, it can accurately identify sensitive information. At the same time, a distributed task scheduling and execution method is adopted, and a dynamic scheduling and resource optimization allocation method for tasks is realized based on the Kafka distributed publish-subscribe mechanism, ensuring that the present invention has efficient and stable real-time processing capabilities in high-concurrency scenarios. In addition, through modular design, the present invention supports dynamic adjustment of classification and grading criteria, custom template configuration, and data authorization management, enhancing the overall functional scalability and adaptability, and meeting the personalized needs in multi-business scenarios. In summary, the present invention has achieved technological breakthroughs in recognition accuracy, operating performance, and flexible adaptability, providing an efficient, accurate, and stable solution for the classification and grading of sensitive data. Description of the Drawings
[0029] Figure 1 It is a flow chart of a sensitive information recognition method for multi-modal data;
[0030] Figure 2 It is a framework diagram of a sensitive information recognition method for multimodal data;
[0031] Figure 3 It is a process diagram for training the MacBERT model;
[0032] Figure 4 It is a structure diagram of BiLSTM;
[0033] Figure 5 It is a mechanism diagram of BiLSTM;
[0034] Figure 6 It is the prediction result of the BiLSTM mechanism;
[0035] Figure 7 It is a schematic diagram of the CRF structure;
[0036] Figure 8 It is a diagram of the classification and grading module. Specific implementation manners
[0037] In order to make the technical solutions and advantages in the embodiments of the present invention clearer and more understandable, the following further details the exemplary embodiments of the present invention with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than an exhaustive list of all embodiments. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0038] Embodiment 1: A sensitive information recognition method for multimodal data, including:
[0039] S1. Preprocess the Chinese dataset to obtain the preprocessed data;
[0040] S2. Use the MacBERT-BiLSTM-CRF model architecture to identify sensitive information from the preprocessed data to obtain the recognition result;
[0041] S3. Optimize the MacBERT-BiLSTM-CRF model architecture to improve its accuracy and efficiency in identifying sensitive information from the Chinese dataset;
[0042] S4. Implement real-time data transmission and processing based on the Kafka architecture, and design a dynamic resource adjustment strategy to ensure stable operation in high-concurrency scenarios;
[0043] S5. Classify and grade the recognition result according to the preset classification and grading templates and dynamic rules, and store the recognition result in the database to support subsequent analysis and auditing.
[0044] Specifically, in combination with Figure 1 and Figure 2It can be seen that by adopting the MacBERT-BiLSTM-CRF architecture, the present invention effectively improves the recognition accuracy of sensitive data. At the same time, based on the Kafka architecture design, real-time data processing in high-concurrency scenarios is achieved, improving the performance of the method. The present invention also supports flexible function expansion modules to adapt to diverse business scenarios and meet the classification and grading requirements in multi-source data environments, thus significantly enhancing data compliance and security.
[0045] S1 specifically includes:
[0046] S11. Extract domain multi-level rule templates from the Chinese dataset to obtain text data;
[0047] S12. Use the character-level BIOES annotation method to annotate the text data;
[0048] S13. Convert the characters and their labels of the text data into index values through a self-built vocabulary, pad the data to a unified length, and convert it into a tensor format to obtain preprocessed data.
[0049] Specifically, for the Chinese dataset, the present invention has selected data classification and grading guidance documents, laws and regulations documents, classification and grading policy standard documents, and business data documents in various industries, and extracted multi-level rule templates for each field and industry. To avoid incorrect word segmentation caused by the word segmentation tool misidentifying the word boundary, the present invention uses the character-level BIOES annotation method to convert the labels, successfully replacing the traditional word segmentation method. Through the self-built vocabulary, the text characters and their labels are converted into corresponding index values. Add a marker at the beginning of the sentence, pad the length of each batch of data to the length of the longest sentence, ensure the accurate alignment of the text and the label, and convert it into a tensor format for easy loading into the model.
[0050] Furthermore, in S2, the MacBERT-BiLSTM-CRF model architecture includes:
[0051] The MacBERT layer is used to extract semantic features through a masked language model based on text correction and a sentence order prediction task;
[0052] The BiLSTM layer is used to capture the context dependencies of the text;
[0053] The CRF layer is used to constrain the output of legal label sequences through a label transition matrix.
[0054] Specifically, in this embodiment, MacBERT (Mask Language Model Based on Text Error Correction) is evolved from the BERT (Bidirectional Encoder Representation Transformer) model, and both use encoders based on multi-layer bidirectional Transformers to obtain text features. The difference is that MacBERT modifies the mask language model and proposes a mask language model based on text error correction (Mac), which solves the problem that the [MASK] tag in the BERT model does not appear in downstream tasks.
[0055] The training process of MacBERT includes two tasks: sentence order prediction (Sentence Order Prediction, SOP) and masked language model based on text error correction (MLM as correction). The training process is Figure 3 It can be seen that in the Mac stage, N-gram and Whole Word Masking (WWM) strategies are adopted, and synonyms are used to replace the [MASK] tag. First, the continuous n words in the text are masked using whole word masking (WWM) and N-gram masking techniques, and the masking probabilities of word combinations of different lengths are set, specifically 1-gram (40%), 2-gram (30%), 3-gram (20%) and 4-gram (10%).
[0056] In the [MASK] processing, the special character [MASK] is replaced by a synonym, and similar words are obtained by using the **Synonyms tool (Synonyms) based on the word vector (WordVector)** similarity calculation. These similar words can replace the original vocabulary to a certain extent, providing the model with richer semantic information and context association. The model performs mask processing on 15% of the input words, of which 80% of the words are replaced with similar words, 10% of the words are randomly replaced, and the remaining 10% of the words remain unchanged.
[0057] In the SOP task, unlike the traditional BERT model, negative samples are implemented by swapping the positions of two consecutive sentences. This innovative method is more effective than the traditional NSP task (next sentence prediction) and can better simulate the text order changes in actual scenarios, thereby improving the performance of the model on related tasks.
[0058] In this embodiment, the BiLSTM layer is composed of two LSTM layers, which process the sequence from the forward and reverse directions respectively, and finally splice the outputs from the two directions together to obtain more comprehensive context information and learn the dependencies between the context. In the sequence labeling task, the BiLSTM layer network architecture can effectively model the context order of the text sequence. Its structure is as follows Figure 4 As shown in the figure, x tRepresents the t-th word in the input sequence. Is the forward output result, Is the reverse output result, and the output information h t Can be expressed as
[0059] The input and output of the BiLSTM layer are as Figure 5 Shown. In the figure, the input of each neuron is a word, and the output is the score for each type of label. Theoretically, the higher the score, the greater the possibility.
[0060] Sequence labeling can be regarded as a sequence classification problem. However, different from a simple sequence classification problem, in the task of the present invention, there are constraint relationships between sequence labels. For example, the first word in a sentence can only start with the label "B-" or "O"; among the consecutive predicted labels B-X, I-X, E-X, X should belong to the same type of entity, that is, "B-name, I-name" is a legal label sequence, but "B-name, I-game" is illegal; the starting label of each entity is "B-" or "S-", so the labels "O, I-" are also illegal. In Figure 6 The prediction results, there are obvious errors such as 'I-game, I-name' and 'O, I-game'.
[0061] The output of the BiLSTM is the score for each word corresponding to different labels. Usually, the label with the highest score is selected as the final prediction result. However, these prediction results may not satisfy the label constraint relationships and result in illegal sequences. The Conditional Random Field (CRF) ensures the legality of the output label sequence by adding constraint rules between labels. During the data training process, the CRF layer can automatically learn the constraint relationships between the labels in the sentence and effectively reduce prediction errors. Its structure can be known from Figure 7 Given the sentence sequence X=(x 1 , x 2 ,..., x n ), input into the recognition model, and the predicted sequence Y=(y 1 , y 2 ,..., y n ), the score of this label sequence is:
[0062]
[0063] Where A is the score transition matrix, Represents the score obtained by mapping the i-th character in the sentence to the label y i . S(X, y) has many possible label sequences. After normalizing all possible label sequences, the probability of the sequence y is:
[0064]
[0065] where is the true annotation sequence, and Y X represents all possible annotation sequences.
[0066] The label sequence with the highest predicted probability after decoding is the optimal sequence, denoted as:
[0067]
[0068] Furthermore, S3 specifically includes:
[0069] S31. Introduce a regular expression as a conditional constraint, calculate the constraint loss, and combine it with the original loss function to form a new total loss function;
[0070] S32. Conduct correlation analysis through multi-source data to improve the quality and usability of the data, and enhance the interpretability and adaptability of the model.
[0071] Specifically, to enhance the interpretability of the model architecture and effectively utilize prior knowledge, a regular expression is introduced as a conditional constraint, the constraint loss is calculated, and it is combined with the original loss to form a new total loss function, thereby optimizing the adaptability of the model to the sensitive information recognition task. In addition, through correlation analysis of multiple data sources, the quality and usability of the data are effectively improved.
[0072] Furthermore, S4 specifically includes:
[0073] S41. Send the preprocessed data in S1 to the specified Topic of the Kafka message queue;
[0074] S42. Dynamically adjust the number of instances according to the data volume and processing speed to achieve load balancing in high-concurrency scenarios.
[0075] Specifically, by using the Kafka-based distributed publish-subscribe mechanism to implement the dynamic scheduling of tasks and the resource optimization allocation method, it is ensured that the present invention has efficient and stable real-time processing capabilities in high-concurrency scenarios.
[0076] Furthermore, in S5, the classification and grading module includes: a data scanning and analysis module, a data text parsing module, and a distributed task implementation module.
[0077] Specifically, in combination with Figure 8 it can be seen that around the core requirements of sensitive data classification and grading, three major modules of data source scanning, data text parsing, and distributed task scheduling are designed to address the deficiencies of the prior art in terms of recognition accuracy, operating performance, and scalability.
[0078] Through the data source scanning module, the present invention can identify and collect various data asset information, comprehensively supporting data source types such as local files, HTTP, FTP, MySQL, MongoDB, Redis, etc. Through the implemented access authorization mechanism, the present invention can call remote connection functions according to different protocols (such as HTTP, FTP, etc.), verify the accessibility of the data source, and obtain authorization information. For data sources that pass the verification, the present invention further performs resource scanning, accurately extracts key metadata such as file paths, file sizes, table structures, etc., and stores the results in the database. At the same time, the present invention automatically records the task status, marks the data sources that are scanned successfully or failed, providing an accurate and reliable data basis for subsequent data text parsing and task scheduling.
[0079] Through the data text parsing module, the present invention realizes efficient text conversion and sensitive information extraction functions for different data formats. For text files (such as txt, docx, pdf, xlsx, etc.), the present invention directly extracts the text content through a dedicated parsing library; for formats that are not directly supported (such as doc and ppt), the present invention automatically converts the file format and then extracts the content to ensure no data is missed. For image files, the present invention uses mature OCR technology (such as Tesseract) to convert the image data into a standard text format to support subsequent sensitive data identification. In terms of database data parsing, the present invention can extract text information at the table, column, or document level, and accurately obtain the stored data for the key-value structure of the Redis database or the collection structure of MongoDB. The parsed text data is sent by the producer module to the Kafka distributed message queue, and the consumer module then pulls the data and performs sensitive information identification to ensure efficient and orderly data flow.
[0080] The present invention realizes the efficient identification and accurate storage of sensitive data through sensitive data storage, ensuring the accuracy, integrity, and traceability of the identification results. The OCR consumer is responsible for processing image data, accurately extracting the text information in the image through OCR technology, and submitting it for processing after converting it into a standard text. The text consumer then performs sensitive information identification on the extracted text content, combining the preset classification and grading templates and AI model technology or high-performance matching engines (such as Hyperscan) to accurately locate sensitive data. The identification results include the data source, the hit rules, the sensitive level, and the specific location. The present invention stores them in the database through the log processing module, supporting refinement to the file path, paragraph location, line number, and the table and column levels of the database, etc. This storage design fully considers the characteristics of different data sources and meets the subsequent statistical analysis and auditing requirements. In addition, the present invention adopts an asynchronous processing mechanism, greatly improving the task execution efficiency, and can maintain an efficient and stable running state even in the case of massive data and high concurrency scenarios.
[0081] In the distributed task implementation module, the present invention is based on the Kafka distributed message queue and has realized the efficient publication and consumption of tasks. To further optimize the task execution efficiency, the present invention dynamically adjusts the number of consumers according to the data volume, CPU resource usage, and consumer processing speed to ensure the balance between task execution and data load. Through this distributed architecture design, the present invention can efficiently and stably process massive data in high-concurrency scenarios, fully meeting the actual requirements of sensitive information classification and grading in different business scenarios.
[0082] Although the present invention has been described with reference to a limited number of embodiments, those skilled in the art in this technical field will understand that other embodiments can be envisaged within the scope of the present invention as thus described. In addition, it should be noted that the language used in this specification has been mainly selected for readability and teaching purposes rather than for the purpose of explaining or limiting the subject matter of the present invention. Therefore, many modifications and variations will be obvious to those of ordinary skill in the art in this technical field without departing from the scope and spirit of the appended claims. For the scope of the present invention, the disclosure made of the present invention is illustrative rather than restrictive, and the scope of the present invention is defined by the appended claims.
Claims
1. A sensitive information identification method for multimodal data, characterized in that: include: S1. Preprocess the Chinese data set to obtain preprocessed data; S2. Use the MacBERT-BiLSTM-CRF model architecture to identify sensitive information on the preprocessed data and obtain the identification results; S3. Optimize the MacBERT-BiLSTM-CRF model architecture to improve its accuracy and efficiency in identifying sensitive information in Chinese datasets; S4. Realize real-time data transmission and processing based on Kafka architecture, design resource dynamic adjustment strategy, and ensure stable operation in high-concurrency scenarios; S5. Classify the recognition results according to the preset classification and grading module, and store the recognition results in the database to support subsequent analysis and auditing.
2. The method for identifying sensitive information in multimodal data according to claim 1, characterized in that: S1 specifically includes: S11. Extracting domain multi-level rule templates from the Chinese data set to obtain text data; S12. Use word-level BIOES annotation method to annotate text data; S13. Convert the characters and labels of text data into index values through self-built vocabulary, pad the data to a uniform length, convert it into tensor format, and obtain preprocessed data.
3. The method for identifying sensitive information in multimodal data according to claim 1, characterized in that: In S2, the MacBERT-BiLSTM-CRF model architecture includes: MacBERT layer for extracting semantic features through masked language model and sentence order prediction tasks based on text error correction; BiLSTM layer, used to capture the contextual dependencies of text; The CRF layer is used to output a legal label sequence through label transfer matrix constraints.
4. The method for identifying sensitive information in multimodal data according to claim 1, characterized in that: S3 specifically includes: S31. Introduce regular expressions as conditional constraints, calculate constraint losses, and combine them with the original loss function to form a new total loss function; S32. Improve data quality and availability and enhance the interpretability and adaptability of models by conducting correlation analysis on multi-source data.
5. The method for identifying sensitive information in multimodal data according to claim 1, characterized in that: S4 specifically includes: S41. Send the pre-processed data in S1 to the specified Topic of the Kafka message queue; S42. Dynamically adjust the number of instances according to the data volume and processing speed to achieve load balancing in high-concurrency scenarios.
6. The method for identifying sensitive information in multimodal data according to claim 1, characterized in that: In S5, the classification and grading module includes: a data scanning and analysis module, a data text parsing module and a distributed task implementation module.
Citation Information
Patent Citations
Sensitive information discovery and automatic classification and grading method based on multi-modal fusion
CN116049397A
Private data classification and grading method
CN118133221A
Cited By
Data transmission service system and method, electronic equipment and storage medium
CN121638935A