Sensitive data prediction method based on user editing track in collaborative editing scenario
By constructing a user editing trajectory graph model and combining graph attention network and user role information, the latency and accuracy problems of sensitive data identification in collaborative document editing are solved, and efficient and accurate sensitive data prediction is achieved.
Patent Information
- Application Number
- CN202411712426.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In collaborative document editing scenarios, traditional document systems suffer from high latency and low accuracy in sensitive data identification, especially when multiple users are editing, making it difficult to meet low latency requirements and accurately identify sensitive data in documents with different themes.
By analyzing users' historical editing trajectories, a keyword-based user trajectory graph model is constructed. Low-weight nodes are removed using a graph attention network, and sensitive word sets are dynamically predicted by combining user role information, thereby reducing global sensitive word searches and improving recognition efficiency and accuracy.
It enables faster identification of sensitive data in low-latency scenarios, improves the efficiency and accuracy of sensitive data identification, and meets the data security protection needs of multi-user collaborative editing.
Smart Images

Figure CN119475433B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data security, in particular to a sensitive data prediction method based on user editing track in a collaborative editing scenario. BACKGROUND
[0002] Collaborative editing of documents has become the preferred choice for many companies' internal office work. Multiple people can edit a document simultaneously, and real-time observation and participation in the editing process of others, which not only makes collaboration more efficient, but also reduces the multi-version problem caused by too complex flow of shared documents. Whether it is remote team cooperation or project collaboration, it greatly improves work efficiency and project experience.
[0003] However, in terms of data security protection, collaborative editing of documents is very different from traditional document systems, especially in sensitive data identification. The traditional document system method cannot fully meet the requirements in sensitive data identification. In the traditional document, the sensitive data identification is completed after the text content editing, and the time delay requirement is not high. Generally, it is matched by the full library of sensitive word library. However, in the collaborative editing scenario, multiple users will edit at the same time, and there will be concurrent full library matching, which will cause great editing time delay and cannot meet the actual scene requirements. In addition, different theme documents have different sensitive data, which will cause the problem of sensitive data identification accuracy. SUMMARY
[0004] Therefore, the present application provides a sensitive data prediction model based on user editing track in the editing document scenario. The user editing track is trained by user historical editing text data, which can predict and load the sensitive word set of different users under different editing themes in real time when multiple users share editing, without global sensitive word search matching, so as to improve the matching efficiency of sensitive data. At the same time, the method can realize the differential identification of sensitive data under different theme documents, increase the efficiency, and improve the accuracy, thereby providing a solution for identifying sensitive data in low time delay requirement scenarios.
[0005] In order to achieve the above purpose, the present application mainly provides the following technical solutions:
[0006] A sensitive data prediction method based on user editing track in a collaborative editing scenario, the method comprising the following steps:
[0007] S1: Preprocess the user historical text data, filter out the text containing sensitive data, divide the content according to the theme, and at the same time, perform word segmentation on the filtered text and extract key words and their position information to establish key word editing clues;
[0008] S2: For each keyword in the keyword set obtained in step S1, a context window mechanism is used to select a sensitive word set and divide the sensitive word security level;
[0009] S3: According to the keyword editing clues obtained in step S1, the theme label and the sensitive word set with security level division obtained in step S2, first construct the editing track tree of each text, then merge the track trees according to the theme and process, then use the graph attention network to delete the nodes with weight lower than the threshold, finally merge the theme track graphs to construct the user track graph model based on keywords;
[0010] S4: Input the editing process text, identify the keywords and labels, combine the receiver role identity level, input the user track graph model based on keywords, and output the predicted sensitive word set.
[0011] Further, in step S1, specifically comprising:
[0012] S11: Obtain user historical text data, filter out target text containing sensitive data, and classify according to target text content to obtain text data theme label;
[0013] S12: For the target text obtained in step S11, use the known jieba segmentation algorithm combined with textRank algorithm for keyword extraction, and record the position of each keyword first appearing in the text. All keywords first appearing in the text are linked in order, which forms the keyword editing clues.
[0014] Further, in step S2, specifically comprising:
[0015] S21: For each keyword in the keyword editing clues obtained in step S12, select an appropriate size of context window to obtain the keyword segmentation set in its window range, and select the sensitive words in the segmentation set as the window sensitive word set of the keyword;
[0016] S22: According to the security level of sensitive words defined in the sensitive database, mark the security level of each keyword and its window sensitive word set obtained in step S21.
[0017] Further, in step S3, specifically comprising:
[0018] S31: According to the keyword editing clues obtained in step S1, use the keywords as graph nodes, use the position relationship between adjacent keyword nodes as edges, and use the keyword window sensitive word set obtained in step S2 as the leaf node of the keyword node, to construct the editing track tree of the text;
[0019] S32: According to the theme label, the editing track tree obtained by each text data set is merged by theme, and the S1, S2 results are de-duplicated, the nodes with a weight lower than a threshold are deleted by using a graph attention network, and a user track graph model of different themes is obtained;
[0020] S33: All theme text graphs are merged according to the same node, and the theme is taken as an edge label; for a sensitive word set of the same keyword, a union set is taken according to the sensitive word set of the same theme label, and the sensitive word sets of different theme labels are independently stored and do not affect each other, and finally a user track model based on a keyword is obtained.
[0021] Further, in step S4, specifically comprising:
[0022] S41: For the currently edited text, a keyword is extracted by jieba segmentation, a group of keywords of the latest editing is extracted, a group of keyword sets containing text themes is obtained as model input in combination with the currently selected editing text theme, and matching is performed in the keyword set in the constructed model; if the extracted keyword can match the keyword and theme in the model, a prediction result is obtained through the model track, and the output is a predicted sensitive word set of the keyword, and step S42 is turned to; otherwise, step S43 is executed;
[0023] S42: The identity level of the receiver role is identified, the sensitive word security level is matched with the identity level, and the sensitive words with a level lower than the matched level in the predicted sensitive word set are removed. When the receiver changes, the predicted content also changes with the role identity level, so that the effect of dynamically predicting sensitive words according to the receiver is achieved;
[0024] S43: If the keyword in the model fails to match the keyword extracted from the currently edited text, all sensitive word libraries are matched.
[0025] Further, in step S32, the merging and de-duplication process of the graph is constructed, specifically comprising:
[0026] S321: The same keyword nodes in the same theme label text editing tree are merged, different edges under different text data are retained, and for a sensitive word set of the same keyword, a union set is taken to obtain a keyword track graph;
[0027] S322: According to the keyword track graph in step S321, an embedding vector of the keyword is extracted as a keyword feature, a graph attention network is constructed, and the weight size between the connected keywords is trained and calculated, the keywords with a weight lower than a threshold are deleted, and the track graph structure is simplified.
[0028] The beneficial effects of the application are:
[0029] 1) By making full use of users' historical editing data and analyzing their editing trajectory, it is possible to predict the content edited by users to a certain extent, which lays the groundwork for the prediction of sensitive data.
[0030] 2) By predicting sensitive data, the efficiency of sensitive data identification can be accelerated, especially in scenarios where the latency requirement for sensitive information is low, and this method can meet the requirements of such scenarios.
[0031] 3) This method incorporates user role information attributes, which can further improve the accuracy of sensitive data identification and provides a solution for scenarios with role-based security information, thereby improving the accuracy of sensitive data identification.
[0032] This invention provides a new solution for efficient data security protection. It combines user editing trajectory to achieve data prediction, which can accelerate the protection efficiency of sensitive data. It achieves hierarchical data governance through user role information and improves the accuracy of sensitive data identification. Attached Figure Description
[0033] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0034] Figure 1 This is a structural diagram of a sensitive data prediction method based on user editing trajectory in a collaborative editing scenario;
[0035] Figure 2 This is a flowchart illustrating the overall process of a sensitive data prediction method based on user editing trajectories in a collaborative editing scenario. Detailed Implementation
[0036] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0037] This invention provides a method for predicting sensitive data based on user editing trajectories in collaborative editing scenarios. The method mainly includes the following steps:
[0038] S1: Obtain user's historical text data, filter out target texts containing sensitive data, divide the text into topics, segment the text into words and extract keywords and their location information, and establish a text editing trajectory based on keywords.
[0039] S2: For each keyword in the text keyword set obtained in step S1, a context window mechanism is used to select its sensitive word set and classify the sensitive word security level;
[0040] S3: Based on the keyword editing clues obtained in step S1, use keywords as graph nodes, connect adjacent keyword nodes using their positional relationships as edges, and use the set of sensitive words in the keyword window obtained in step S2 as the leaf nodes of the keyword nodes to construct the text editing trajectory tree;
[0041] S4: Input the text of the editing process, identify keywords and tags, combine the recipient's role and identity level, input the user trajectory graph model based on keywords, and output the predicted sensitive word set.
[0042] like Figure 2 As shown, the main steps of the method implementation include:
[0043] Step 1: Given a user's past short text dataset D, consisting of short texts ST, represented as:
[0044] D = {ST1, ST2, ..., ST} m}
[0045] Plain text is represented by PT, indicating short text content. The collection of article topics is as follows:
[0046] T={topic1, topic2,...,topic r}
[0047] Each short text can be represented as ST i ={topic i PT i Short texts containing sensitive words. For specific short texts containing sensitive words, SST i Using the known jieba word segmentation algorithm combined with the textRank algorithm, the top k short text keywords are extracted to obtain SST. i The following is a collection of keywords:
[0048]
[0049] Among them, the keyword k ij According to the short text SST i The order of their positions in the text is used as sample data to establish a text editing trajectory based on keywords.
[0050] Step 2: Given a set of sensitive words S = {s1, s2, ..., s...} n}, where s i This indicates specific sensitive words. For keyword k... ij Through continuous experimentation and adjustment, the context window size was set to n, then the keyword k ij The set of sensitive words appearing within this context window size is:
[0051]
[0052] This indicates that the topic is... i In the text, the keyword k ij The set of sensitive words within a context window of size n.
[0053] For the set of sensitive words S = {s1, s2, ..., s...} n The database has already categorized the sensitive word set into security levels, represented as follows:
[0054] L(s)={L(s1), L(s2),..., L(s) m )}
[0055] Where L(s) represents the set of security levels for the entire set of sensitive words, and for each level L(s) i L(s) contains a subset of sensitive words from the sensitive word set. i )={s i s i+1 , ..., s k}. In each keyword k ij sensitive word set The middle also needs to be divided according to L(s), resulting in:
[0056]
[0057] Step 3: Construct a directed label graph G =<V,E> For SST i , from keyword set Figure G can be drawn i The set of nodes V in the graph i ={k i1 ,k i2 ,...,k ik}, edge set E i e mn Indicates keyword k im To keyword k in Its tag is topic i All graphs G i According to topic i The graph is obtained by classifying and merging. The process merges nodes with the same keyword, and the set of sensitive words with the same keyword is taken as the union.
[0058] For each The embedding technique is used to obtain F-dimensional vectors of keywords as keyword features, which are then used to construct a graph attention network to obtain a set of nodes. Feature combinations:
[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 for each node. After training the graph neural network, the internal feature values change as follows:
[0061] h′=h′1,h′2,h′3,...,h′ n ,h′ i ∈R F′
[0062] The attention value e between two distinct 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 transformation between feature dimensions, and a is a computation function used to calculate the attention coefficients between nodes. Then, the neighboring nodes of each node are normalized.
[0065]
[0066] To satisfy the non-linear characteristics, an activation function is used to calculate the attention value:
[0067] e ij =LeakyReLU(a T [Wh i ||Wh j ])
[0068] LeakyReLU is the activation function used for nonlinear attention transformation. In summary, the complete formula for calculating inter-node attention is obtained:
[0069]
[0070] Calculated Nodes with attention below a threshold are removed to simplify the graph structure.
[0071] All Merging: For overlapping keyword nodes, retain their values in different SSTs. i The different edges and corresponding labels formed in the text. In this way, a preliminary text editing trajectory diagram based on keywords is constructed.
[0072] On this basis, combined with the sensitive word set obtained in step two, for the sensitive word set of the same keyword k, it 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 editing document scenario, for the document EST in the editing process, set the text topic topic, extract the latest edited paragraph of EST, and use the jieba segmentation algorithm to extract the keyword set K EST . For the extracted keyword set K EST , input into the model and match the keywords in the model, and according to the matching result, it is specifically divided into the following steps:
[0076] Step 1: If the keyword and the text topic are matched successfully, get the sensitive word set of the matched keyword k Through the keyword-based user trajectory graph model, the next keyword k next and its sensitive word set can be predicted through the keyword k Get the existing user role level information R, represented as R={r1, r2,..., r i}, where r i represents the specific role level, which corresponds to the sensitive word set level, further refine the sensitive word set range, get the prediction result. Finally, match the latest edited paragraph with the prediction result.
[0077] Step 2: If the keyword and the text topic are not matched, match the latest edited paragraph with the sensitive word library, and perform sensitive word recognition.
Claims
1. A method for predicting sensitive data based on user editing track in a collaborative editing scenario, characterized in that, The method comprises the following steps: S1: preprocessing the user historical text data, screening out the text containing sensitive data, dividing the theme according to the content, and at the same time, performing word segmentation on the screened text and extracting keywords and their position information to establish keyword editing clues; S2: for each keyword of the text keyword set obtained in step S1, the context window mechanism is used to select its sensitive word set, and the sensitive word security level is divided; S3: according to the keyword editing clues obtained in step S1, the theme label and the sensitive word set with security level division obtained in step S2, first construct the editing track tree of each text, then merge the track trees according to the theme and process, then use the graph attention network to delete the nodes with weight lower than the threshold, and finally merge the theme track graphs to construct the keyword-based user track graph model; S4: input the editing process text, identify the keywords and labels, combine the receiver role identity level, input the keyword-based user track graph model, and output the predicted sensitive word set.
2. The method of claim 1, wherein the method is based on a user editing track in a collaborative editing scenario. In step S1, specifically comprising: S11: obtaining user historical text data, screening out target text containing sensitive data, and classifying according to the content of the target text to obtain text data theme labels; S12: for the target text obtained in step S11, use the known jieba word segmentation algorithm combined with the textRank algorithm to extract keywords, and record the position of each keyword first appearing in the text. All the positions of the first appearance of the keywords in the text are linked in order, which forms the keyword editing clues.
3. The method of claim 1, wherein the method further comprises: In step S2, specifically comprising: S21: for each keyword in the keyword editing clues obtained in step S12, select an appropriate size of context window to obtain the keyword segmentation set in its window range, and select the sensitive words in the segmentation set as the window sensitive word set of the keyword; S22: according to the sensitive word security level defined in the sensitive database, mark the security level of each keyword and its window sensitive word set obtained in step S21.
4. The method of claim 1, wherein the method further comprises: In step S3, specifically comprising: S31: according to the keyword editing clues obtained in step S1, use the keywords as graph nodes, use the position relationship between adjacent keyword nodes as edges, and use the keyword window sensitive word set obtained in step S2 as the leaf node of the keyword node to construct the editing track tree of the text; S32: according to the theme label, merge the editing track trees obtained from each text data set according to the theme, and perform deduplication processing on the results of steps S1 and S2, use the graph attention network to delete the nodes with weight lower than the threshold, and obtain the user track graph model of different themes; S33: merge all theme text graphs according to the same node, take the theme as the edge label, for the sensitive word set of the same keyword, take the union set according to the same theme label sensitive word set, and store the different theme label sensitive word sets independently without affecting each other, and finally obtain the keyword-based user track model.
5. The method of claim 1, wherein the method further comprises: In step S4, specifically comprising: S41: For the currently edited text, extract keywords by jieba segmentation, extract the latest edited set of keywords, combine the currently selected edited text theme, obtain a set of keyword sets containing text themes as model input, match in the keyword set in the constructed model, if the extracted keywords can match the keywords and theme in the model, get the prediction result through the model track, output the predicted sensitive word set of the keyword, go to step S42; otherwise, execute step S43; S42: Identify the role identity level of the recipient, match the identity level according to the sensitive word security level, remove the sensitive words in the predicted sensitive word set whose level is lower than the matching level; 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 currently edited text, perform full matching of the sensitive word library.
6. The method of claim 4, wherein the method further comprises: In step S32, the merging and deduplication process of the graph is constructed, specifically including: S321: Merge the same keyword nodes in the same theme label text editing tree, keep different edges under different text data, take the union set for the sensitive word set of the same keyword, and obtain the keyword track graph; S322: According to the keyword track graph in step S321, extract the embedding of the keyword as the keyword feature, construct the graph attention network, train and calculate the weight size between the connected keywords, delete the keywords with weight lower than the threshold, and simplify the track graph structure.
Citation Information
Patent Citations
A real-time privacy exposure monitoring method for data publishing
CN109308295A
Business sensitive data lexicon construction method and device, medium and equipment
CN117744634A