Sensitive data prediction method based on user editing track in collaborative editing scene
By training the model based on user editing trajectory in the collaborative editing document scenario, predicting and loading sensitive word collections in real-time, the problem of delay and accuracy of sensitive data recognition in collaborative editing documents is solved, and efficient and accurate identification and protection of sensitive data is achieved.
Patent Information
- Application Number
- CN202411712426.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In the case of collaborative editing of documents, traditional sensitive data recognition methods have great editing delays due to concurrent matching, and the accuracy of sensitive data recognition of different topic documents is low, which cannot meet the actual scenario requirements of low latency requirements.
Train the user editing trajectory model through user history editing text data, predict and load the sensitive word collections of different users under different editing topics in real time, avoid global sensitive word search matching, improve the efficiency of sensitive data matching, and realize the sensitive data under different topic documents Differential identification.
It improves the accuracy and efficiency of sensitive data identification, meets the scenario requirements of low latency requirements, and further divides the identification accuracy through user role information, providing solutions for scenarios where roles divide safety information.
Smart Images

Figure CN119475433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data security, and specifically to a sensitive data prediction method based on user editing trajectories in a collaborative editing scenario. Background Art
[0002] Collaborative document editing has become the first choice for many companies' internal office work. Multiple people can edit a document at the same time, and observe and participate in the editing process of others in real time. This not only makes collaboration more efficient, but also reduces the problem of multiple versions caused by the overly complex circulation of shared documents. Whether it is remote teamwork or project collaboration, this greatly improves work efficiency and project experience.
[0003] However, in terms of data security protection, collaborative document editing is very different from traditional document systems, especially in the identification of sensitive data, which traditional document system methods are not fully competent. In traditional documents, when sensitive data is identified after the text content is edited, the latency requirement is not high, and it is generally done through full database matching of sensitive word libraries. In collaborative editing scenarios, since multiple users will edit at the same time, there will be concurrent full database matching, which will lead to huge editing delays and cannot meet the needs of actual scenarios. In addition, the sensitive data of documents of different subjects will be different, which will lead to problems with the accuracy of sensitive data identification. Summary of the invention
[0004] In view of this, the present application provides a sensitive data prediction model based on user editing trajectories in a document editing scenario. The user editing trajectories are trained by the user's historical editing text data. When multiple users share editing, the sensitive word sets of different users under different editing topics can be predicted and loaded in real time without the need for global sensitive word search and matching, thereby improving the matching efficiency of sensitive data. At the same time, the method can realize differential identification of sensitive data under documents of different topics, increase efficiency while improving accuracy, and provide a solution for identifying sensitive data in scenarios with low latency requirements.
[0005] In order to achieve the purpose of appeal, this application mainly provides the following technical solutions:
[0006] A method for predicting sensitive data based on user editing trajectories in a collaborative editing scenario, the method comprising the following steps:
[0007] S1: Preprocess the user's historical text data, filter out the text containing sensitive data, divide it into topics, and at the same time, segment the filtered text and extract keywords and their location information to establish keyword editing clues;
[0008] S2: For each keyword in the text keyword set obtained in step S1, a context window mechanism is used to select a sensitive word set, and the sensitive words are classified into security levels;
[0009] S3: Based on the keyword editing clues and topic tags obtained in step S1, and the keyword obtained in step S2 having a hierarchical sensitive word set, a user trajectory model based on keywords is constructed using a graph attention network;
[0010] S4: Input the editing process text, identify keywords and tags, combine the recipient's role identity level, input the keyword-based user trajectory graph model, and output the predicted sensitive word set.
[0011] Furthermore, in step S1, it specifically includes:
[0012] S11: Obtain user historical text data, filter out target text containing sensitive data, and classify the target text according to its content to obtain a text data topic label;
[0013] S12: For the target text obtained in step S11, the known Jieba word segmentation algorithm is used in combination with the textRank algorithm to extract keywords, and the position where each keyword first appears in the text is recorded. The positions where all keywords first appear in the text are linked in chronological order to form a keyword editing clue.
[0014] Furthermore, in step S2, it specifically includes:
[0015] S21: for each keyword in the keyword editing clue obtained in step S12, select a context window of appropriate size, obtain a word set of the keyword within its window range, and select sensitive words in the word set as the window sensitive word set of the keyword;
[0016] S22: According to the security level of sensitive words pre-defined in the sensitive database, mark the security level of each keyword and its window sensitive word set obtained in step S21.
[0017] Furthermore, in step S3, it specifically includes:
[0018] S31: According to the keyword editing clues obtained in step S1, the keywords are used as graph nodes, and the keyword window sensitive word set obtained in step S2 is used as its leaf nodes to construct a text editing track tree;
[0019] S32: Based on the topic labels, the edit trajectory trees obtained from each text dataset are merged by topic, and the results of S1 and S2 are deduplicated. The graph attention network is used to delete nodes with weights lower than the threshold to obtain user trajectory graph models of different topics.
[0020] S33: All topic text graphs are merged according to the same nodes, with the topic as the edge label. For the sensitive word sets of the same keyword, the union is taken according to the sensitive word sets with the same topic label. The sensitive word sets with different topic labels are stored independently without affecting each other, and finally a user trajectory model based on keywords is obtained.
[0021] Furthermore, in step S4, it specifically includes:
[0022] S41: For the currently edited text, extract keywords through Jieba word segmentation, extract a group of keywords for the latest edit, combine with the currently selected edited text theme, obtain a set of keywords containing the text theme as model input, and match them in the keyword set in the constructed model. If the extracted keywords can match the keywords and themes in the model, obtain the prediction results through the model trajectory, output as the sensitive word set predicted by the keyword, and go to step S42; otherwise, execute step S43;
[0023] S42: Identify the role identity level of the recipient, match the identity level according to the security level of the sensitive words, and remove sensitive words with a level lower than the matching level in the predicted sensitive word set. When the recipient changes, the predicted content also changes with the role identity level, achieving the effect of dynamically predicting sensitive words according to the recipient;
[0024] S43: If the keywords in the model fail to match the keywords extracted from the current edited text, a full match of the sensitive word library is performed.
[0025] Furthermore, in step S32, a subgraph merging process is constructed, which specifically includes:
[0026] S321: Merge the same keyword nodes in the same topic tag text editing tree, retain the different edges under different text data, and take the union of the sensitive word sets of the same keyword to obtain a keyword trajectory graph;
[0027] S322: According to the keyword trajectory graph in step S321, extract the keyword embedding vector as the keyword feature, build a graph attention network, train and calculate the weights between connected keywords, delete keywords with weights lower than the threshold, and simplify the trajectory graph structure.
[0028] The beneficial effects of the present invention are:
[0029] 1) Make full use of the user's historical editing data and analyze the user's editing trajectory, which can predict the user's editing content to a certain extent and lay the foundation for the prediction of sensitive data.
[0030] 2) By predicting sensitive data, the efficiency of identifying sensitive data can be accelerated, especially in scenarios with low latency requirements for sensitive information. This method can meet the requirements of the scenario.
[0031] 3) This method adds user role information attributes, which can further divide the recognition accuracy of sensitive data, provide a solution for scenarios where security information is divided by role, and improve the recognition accuracy of sensitive data.
[0032] The present invention provides a new solution for efficient data security protection, achieves data prediction in combination with user editing trajectories, can accelerate the protection efficiency of sensitive data, achieves data hierarchical management through user role information, and improves the accuracy of sensitive data identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0034] Figure 1 This is a structural diagram of a sensitive data prediction method based on user editing trajectories in a collaborative editing scenario;
[0035] Figure 2 This is an overall flow chart of a sensitive data prediction method based on user editing trajectories in a collaborative editing scenario. DETAILED DESCRIPTION
[0036] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0037] The present invention provides a sensitive data prediction method based on user editing trajectory in a collaborative editing scenario, and the method mainly comprises the following steps:
[0038] S1: Obtain user historical text data, filter out target texts containing sensitive data, divide them into topics, segment the texts, extract keywords and their location information, and establish text editing tracks with keywords as clues;
[0039] S2: For each keyword in the text keyword set obtained in step S1, a context window mechanism is used to select a sensitive word set, and the sensitive words are classified into security levels;
[0040] S3: Based on the keyword editing clues and topic tags obtained in step S1, and the keyword obtained in step S2 having a hierarchical sensitive word set, a keyword-based user trajectory model is constructed;
[0041] S4: Input the editing process text, identify keywords and tags, combine the recipient's role identity level, input the keyword-based user trajectory graph model, and output the predicted sensitive word set.
[0042] like Figure 2 As shown, the main steps of implementing the method include:
[0043] Step 1: Given a user's previous short text dataset D, consisting of short text ST, represented as:
[0044] D = {ST1, ST2, ..., ST m}
[0045] Plain text is expressed in PT, which means short text content. The article topic set is:
[0046] T={topic1, topic2,...,topic r}
[0047] Each short text can be represented as ST i ={topic i , PT i}. Short text containing sensitive words For specific short texts containing sensitive words SST i , use the known Jieba word segmentation algorithm combined with the textRank algorithm to extract the topk short text keywords and get SST i The following keyword collection:
[0048]
[0049] The keyword k ij Follow in short text SST i The data are sorted by the preceding and following position relationship, and this data is used as sample data for establishing text editing tracks based on keywords.
[0050] Step 2: Given a sensitive word set S = {s1, s2, ..., s n}, where s i Indicates a specific sensitive word. For keyword k ij , through continuous experimental adjustment, the context window size is set to n, then the keyword k ij The set of sensitive words that appear in this context window size is:
[0051]
[0052] Indicates that the topic is topic i In the text, the keyword k ij The set of sensitive words within the context window size n.
[0053] For the sensitive word set S = {s1, s2, ..., sn}, the database has divided the sensitive word set into security levels, expressed as:
[0054] L(s)={L(s1), L(s2),..., L(s m )}
[0055] Where L(s) represents the security level set of the entire sensitive word set. For each level L(s i ), including some sensitive words in the sensitive word set, represented by L(s i )={s i ,s i+1 , ..., s k}. For each keyword k ij Sensitive word collection It is also necessary to divide according to L(s) to obtain:
[0056]
[0057] Step 3: Construct a directed label graph G =<V,E> , for SST i , by keyword collection We can draw a graph G i , the node set V in the graph i ={k i1 , k i2 , ..., k ik}, edge set E i e in mn Indicates keyword k im To keyword k in , whose label is topic i . All graphs G i By topic i Classification and merging to obtain graph The process merges nodes with the same keyword, and takes the union of the sensitive word sets with the same keyword.
[0058] For each Use embedding technology to obtain the keyword F-dimensional vector as the keyword feature, and use it to build a graph attention network to obtain a node set The feature combination of:
[0059] h=h1,h2,h3,...,h n ,h i ∈R F
[0060] Where n represents the number of nodes in the graph, and F represents the number of feature representations of each node. After training the graph neural network, the internal feature value changes to:
[0061] h′=h′1, h′2, h′3,..., h′ n , h′ i ∈R F′
[0062] For the attention value e between two different nodes (i, j) ij The definition is as follows:
[0063] e ij =a(Wh i ,Wh j )
[0064] Where W is a projection matrix used for conversion between feature dimensions, and a is a calculation function used to calculate the attention coefficient between nodes. Then the adjacent nodes of each node are normalized:
[0065]
[0066] In order to meet the nonlinear characteristics, the activation function is used to calculate the attention value:
[0067] e ij =LeakyReLU(a T [Wh i ||Wh j ])
[0068] Where LeakyReLU is the activation function used for nonlinear attention conversion. In summary, the complete formula for calculating attention between nodes is obtained:
[0069]
[0070] By calculating Attention between intermediate nodes, nodes with attention below the threshold are deleted to simplify the graph structure.
[0071] All Merge, for overlapping keyword nodes, retain them in different SST i The different edges and corresponding labels formed in the text editing are shown in Figure 1. In this way, a text editing trajectory graph with keywords as clues is preliminarily constructed.
[0072] On this basis, combined with the sensitive word set obtained in step 2, the sensitive word set for the same keyword k is processed by the following function:
[0073]
[0074] In summary, the keyword-based user trajectory graph model has been constructed.
[0075] Step 4: In the collaborative document editing scenario, for the document EST in the editing process, set the text topic, extract the latest edited paragraphs of EST, and use the Jieba word segmentation algorithm to extract the keyword set K EST For the extracted keyword set K EST , input into the model to match with the keywords in the model, and the specific steps are as follows according to the matching results:
[0076] Step 1: If both the keyword and the text topic are matched successfully, obtain the sensitive word set of the successfully matched keyword k Through the keyword-based user trajectory graph model, the next keyword k can be predicted by keyword k next , and its sensitive word set Get the existing user role level information R, expressed as R = {r1, r2, ..., r i}, where r i Indicates the specific role level and sensitive word set The levels correspond to each other, further refining the sensitive word set Finally, the latest edited paragraph is matched with the predicted result.
[0077] Step 2: If the keyword and text topic match fails, the most recently edited paragraph will be matched with the sensitive word library to identify sensitive words.
Claims
1. A sensitive data prediction method based on user editing trajectory in a collaborative editing scenario, characterized in that: The method comprises the following steps: S1: Preprocess the user's historical text data, filter out the text containing sensitive data, divide it into topics, and at the same time, segment the filtered text and extract keywords and their location information to establish keyword editing clues; S2: For each keyword in the text keyword set obtained in step S1, a context window mechanism is used to select a sensitive word set, and the sensitive words are classified into security levels; S3: Based on the keyword editing clues and topic tags obtained in step S1, and the keyword obtained in step S2 having a hierarchical sensitive word set, a user trajectory model based on keywords is constructed using a graph attention network; S4: Input the editing process text, identify keywords and tags, combine the recipient's role identity level, input the keyword-based user trajectory graph model, and output the predicted sensitive word set.
2. The sensitive data prediction method based on user editing trajectory according to claim 1, characterized in that: In step S1, it specifically includes: S11: Obtain user historical text data, filter out target text containing sensitive data, and classify the target text according to its content to obtain a text data topic label; S12: For the target text obtained in step S11, the known Jieba word segmentation algorithm is used in combination with the textRank algorithm to extract keywords, and the position where each keyword first appears in the text is recorded. The positions where all keywords first appear in the text are linked in chronological order to form a keyword editing clue.
3. The sensitive data prediction method based on user editing trajectory according to claim 1 is characterized in that: In step S2, it specifically includes: S21: for each keyword in the keyword editing clue obtained in step S12, select a context window of appropriate size, obtain a word set of the keyword within its window range, and select sensitive words in the word set as the window sensitive word set of the keyword; S22: According to the security level of sensitive words pre-defined in the sensitive database, mark the security level of each keyword and its window sensitive word set obtained in step S21.
4. The sensitive data prediction method based on user editing trajectory according to claim 1, characterized in that: In step S3, it specifically includes: S31: According to the keyword editing clues obtained in step S1, the keywords are used as graph nodes, and the keyword window sensitive word set obtained in step S2 is used as its leaf nodes to construct a text editing track tree; S32: Based on the topic labels, the edit trajectory trees obtained from each text dataset are merged by topic, and the results of steps S1 and S2 are deduplicated. The graph attention network is used to delete nodes with weights lower than the threshold to obtain user trajectory graph models of different topics. S33: All topic text graphs are merged according to the same nodes, with the topic as the edge label. For the sensitive word sets of the same keyword, the union is taken according to the sensitive word sets with the same topic label. The sensitive word sets with different topic labels are stored independently without affecting each other, and finally a user trajectory model based on keywords is obtained.
5. The sensitive data prediction method based on user editing trajectory according to claim 1, characterized in that: In step S4, it specifically includes: S41: For the currently edited text, extract keywords through Jieba word segmentation, extract a group of keywords for the latest edit, combine with the currently selected edited text theme, obtain a set of keywords containing the text theme as model input, and match them in the keyword set in the constructed model. If the extracted keywords can match the keywords and themes in the model, obtain the prediction results through the model trajectory, output as the sensitive word set predicted by the keyword, and go to step S42; otherwise, execute step S43; S42: Identify the role identity level of the recipient, match the identity level according to the security level of the sensitive words, and remove sensitive words with a level lower than the matching level in the predicted sensitive word set. When the recipient changes, the predicted content also changes with the role identity level, achieving the effect of dynamically predicting sensitive words according to the recipient; S43: If the keywords in the model fail to match the keywords extracted from the current edited text, a full match of the sensitive word library is performed.
6. The sensitive data prediction method based on user editing trajectory according to claim 4 is characterized in that: In step S32, the merging process of the construction graphs specifically includes: S321: Merge the same keyword nodes in the same topic tag text editing tree, retain the different edges under different text data, and take the union of the sensitive word sets of the same keyword to obtain a keyword trajectory graph; S322: According to the keyword trajectory graph in step S321, extract the keyword embedding vector as the keyword feature, build a graph attention network, train and calculate the weights between connected keywords, delete keywords with weights lower than the threshold, and simplify the trajectory graph structure.
Citation Information
Patent Citations
A real-time privacy exposure monitoring method for data publishing
CN109308295A
Sensitivity analysis method and system for text content
CN115510500A
Sensitive word detection method and device, computer equipment and readable medium
CN116415551A
Column semantic recognition method and system based on context awareness of GCN and RoBERTa
CN117312989A
Business sensitive data lexicon construction method and device, medium and equipment
CN117744634A