Artificial intelligence based sensitive document identification protection and security restriction system

CN122571636BActive Publication Date: 2026-10-27BEIJING ZHIXIN HENGRUI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610781632.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-10-27
Estimated Expiration
2046-06-02

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供基于人工智能的敏感文档识别防护和安全限制系统,用于解决现有技术无法动态评估文档中各结构单元的访问难度与潜在威胁之间的非对称关系的问题;

Benefits of technology

[0016]1、通过为每个结构单元独立计算访问成本值与静态风险值,并构建与访问成本负相关、与静态风险指数正相关的静态基础权重,使得高威胁宏节点即便具有较高的访问成本,其初始扫描优先级仍可反超普通可见节点;由此,打破了现有技术中“低成本优先”的固定扫描顺序,从根本上解决了攻击者利用高成本节点藏匿敏感内容所导致的漏判问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122571636B_ABST
    Figure CN122571636B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of information security and document processing technology, and is used to solve the problem that the prior art cannot dynamically evaluate the asymmetric relationship between the access difficulty and the potential threat of each structural unit in the document. Specifically, it is an artificial intelligence-based sensitive document identification protection and security restriction system, which includes a document acquisition module, a distribution statistics module, a static analysis module, a sensitive analysis module, and an instruction output module. The present application independently calculates the access cost value and the static risk value for each structural unit, and constructs a static basic weight that is negatively correlated with the access cost and positively correlated with the static risk index, so that even if a high-threat macro node has a higher access cost, its initial scanning priority can still be higher than that of an ordinary visible node. This breaks the fixed scanning order of "low cost first" in the prior art and fundamentally solves the problem of missed judgment caused by attackers hiding sensitive content in high-cost nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security and document processing technology, specifically an artificial intelligence-based sensitive document identification, protection, and security restriction system. Background Technology

[0002] With the popularization of office automation and collaborative office work, the number of electronic documents circulating within enterprises and across organizations has increased dramatically. Documents containing sensitive information such as trade secrets and personal privacy will have serious consequences if leaked. Artificial intelligence-based sensitive document identification technology has been widely deployed in email gateways, file sharing systems and terminal data leakage prevention software. Its core principle is to analyze the document content and match it with a predefined sensitive word library or classification model to determine whether the document contains sensitive information and trigger protection actions.

[0003] Existing technologies generally employ a "display-first" parsing strategy when handling such tasks. Specifically, the system first deconstructs the document (such as PDF, DOCX, XLSX, etc.) into a text stream or layout tree, and then prioritizes extracting the areas that are visible to the user by default after opening the document—including text paragraphs, visible cells, and text in regular layers. However, for hidden rows or columns, notes pages, embedded objects, macro code, and underlying object streams not directly referenced by the page, they are ignored or only minimally extracted for parsing efficiency and resource consumption considerations. The implicit premise of this approach is that sensitive information in the document will only appear in areas that can be covered by the normal reading path.

[0004] However, document format standards allow for the construction of numerous "non-display" or "high-activation-cost" structural units. Attackers can easily disassemble sensitive content and hide it in embedded objects that require double-clicking to expand, in worksheet rows that require manual unhiding to see, or in string constants that can only be decrypted by running macros. When existing systems scan in the order of "default display layer priority, low cost priority," sensitive signals in high-activation-cost nodes are systematically delayed or even completely skipped. For example, a spreadsheet containing a confidential customer list can be placed in a deeply nested hidden row and then encrypted a second time using an automatically executed macro. When the system parses the data, it only hits irrelevant data in the display layer, ultimately outputting a "low-risk" judgment and allowing the data to pass through.

[0005] It is evident that the fundamental flaw of existing technologies lies in the fact that their resource allocation logic and the attacker's concealment strategy exhibit a "cost-risk inversion," meaning that areas with higher activation costs are more likely to be ignored. Therefore, the core technical problem that this solution aims to address is: how to dynamically assess the asymmetric relationship between the access difficulty of each structural unit in a document and the potential threats, and to establish a decision-making mechanism that can guide scanning resources to prioritize high-threat concealment areas. Summary of the Invention

[0006] The purpose of this invention is to provide an artificial intelligence-based sensitive document identification, protection, and security restriction system to solve the problem that existing technologies cannot dynamically assess the asymmetric relationship between the access difficulty and potential threats of each structural unit in a document;

[0007] The technical problem to be solved by this invention is: how to provide an artificial intelligence-based sensitive document identification, protection and security restriction system that can dynamically assess the asymmetric relationship between the access difficulty and potential threats of each structural unit in a document.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] AI-based sensitive document identification, protection, and security restriction systems include:

[0010] Document Acquisition Module: Acquires the target document, parses it to generate a structure tree containing nodes and parent-child relationships; determines the access cost value for each node, which represents the operational complexity of reaching the node from its default open state;

[0011] Distribution statistics module: Performs in-depth distribution statistics on the tree structure to generate a structural entropy index that characterizes the complexity of the document structure; performs static analysis on nodes of executable code type to generate static risk values;

[0012] Static analysis module: Calculates the static base weight based on the access cost and static risk value of each node, initializes the dynamic priority of each node based on the static base weight, and adds all nodes to the priority queue;

[0013] Sensitivity Analysis Module: Iteratively execute the following process until the priority queue is empty: Take the highest priority node as the current node; extract its content and identify and generate a local sensitivity score; update the dynamic priority of unprocessed nodes that have a parent-child or sibling relationship with it based on the score; if the current node is executable code and the static risk value exceeds the preset risk threshold, perform a sandbox simulation, correct the local sensitivity score based on the simulation behavior, and increase the priority of the accessed node when it is detected that it is accessing other nodes.

[0014] Command output module: After the queue is cleared, the comprehensive risk score is calculated based on the weighted average of the static basic weights and local sensitivity scores of each node; the comprehensive risk score is compared with the preset security threshold, and protection commands are output based on the comparison results.

[0015] The present invention has the following beneficial effects:

[0016] 1. By independently calculating the access cost value and static risk value for each structural unit, and constructing a static basic weight that is negatively correlated with the access cost and positively correlated with the static risk index, the initial scanning priority of high-threat macro nodes can still surpass that of ordinary visible nodes, even if they have high access costs. This breaks the fixed scanning order of "low cost first" in the existing technology and fundamentally solves the problem of missed detection caused by attackers using high-cost nodes to hide sensitive content.

[0017] 2. During the iterative scanning process, the dynamic priorities of parent nodes, child nodes, and sibling nodes are updated through multi-directional propagation based on the local sensitivity score of the current node. The increment propagated to the parent node is negatively correlated with the access cost of the parent node, while the access cost of the child node is temporarily reduced and a fixed boost is added when propagating to the child node. This mechanism enables risk signals to adaptively spread along the topology of the tree structure, guiding scanning resources to focus on high-risk hiding areas, while avoiding shallow noise amplification or deep signal attenuation caused by a fixed propagation factor.

[0018] 3. For executable code nodes, sandbox simulation execution is triggered by static risk values, and local sensitivity scores are adjusted based on the positive interaction between dynamic behavior scores and static risk values. Simultaneously, when macro access to a specific node is detected during simulation, the node's dynamic priority is immediately elevated to the top of the queue. This mechanism not only reduces the false positive rate of static analysis for obfuscated macros but also enables real-time guidance of the scanning order by macro behavior, allowing deeply hidden content dynamically referenced by macros to be captured promptly.

[0019] 4. After the comprehensive risk score is calculated, risk attribution analysis is further performed to extract high-risk node clusters. Based on the access cost range, depth range, and node type labels, the dominant attribution category and dominant risk type are determined, and differentiated protection instructions such as deep blocking, rapid desensitization, or sandbox mandatory isolation are output accordingly. This achieves refined matching of identification and response strategies for concealment characteristics (deeply concealed, macro-driven, and explicitly sensitive, etc.), ensuring that high-threat documents are strictly handled while avoiding excessive blocking of low-risk explicitly sensitive content, thus improving the system's business acceptability. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a system structure block diagram of Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of the system operation method according to Embodiment 1 of the present invention. Detailed Implementation

[0023] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] In existing data leakage prevention and sensitive document identification and protection technologies, especially in the content parsing and risk assessment of office documents (such as PDF, DOCX, XLSX, PPTX), the system generally adopts a "display layer priority" parsing strategy. The implicit assumption of this strategy is that sensitive information in the document will only appear in the areas that are visible after the user opens it by default, such as the main text paragraphs, visible cells, or regular layers. This assumption is equivalent to assuming that "only explicit actions have value" at the biomechanical level, while ignoring the high-cost nodes hidden in the deep structure of the document.

[0025] However, existing technologies lack a verification mechanism for the asymmetric relationship between the "access cost" and "hidden value" of document structural units, making it impossible to accurately identify deep structural escape behaviors deliberately constructed by attackers. Among these, hidden attacks manifest as follows: sensitive content is disassembled and placed in embedded objects that require double-click activation, rows and columns that need to be manually unhidden, or string constants that require macro execution to decrypt. Because the system follows a "low-cost priority" scanning order, sensitive signals in high-access-cost nodes are systematically delayed or even completely skipped. As a result, a strict physical correspondence cannot be established between the risk score of a document and the actual threat, causing the system to miss hidden attacks or falsely block normal documents.

[0026] For example, during a security audit of an enterprise email gateway, an attacker placed the data tables within deeply nested hidden rows in a spreadsheet containing a customer database and then encrypted it again with an automatically executing macro. Existing systems, through conventional parsing, can only extract irrelevant table headers from the display layer and cannot detect the structural interaction between the hidden rows and the macro code. Furthermore, when the macro is set to "execute silently on open," the system only records the existence of the macro module but fails to assess its intent to target the hidden area after decryption. Specifically, the system may misclassify sensitive data in the hidden rows as ordinary noise or incorrectly categorize the encrypted macro as harmless scripts, thus allowing sensitive documents to pass through and perpetuating the risk of data leakage.

[0027] If the above problems are not addressed, the security protection system will continuously lose its ability to objectively identify document structure concealment attacks. Specifically, the failure to correct the missed detections of high-cost nodes will allow attackers to continuously utilize nested embeddings, password-protected areas, and unreferenced streams for iterative concealment, thereby weakening the protection system's ability to prevent deep escapes. Simultaneously, misjudgments of occasional deep structures (such as legitimate macros or hidden comments) in normal documents will cause frequent business disruptions, forcing users to lower their security policies or completely disable protection. Therefore, inaccurate risk assessments will systematically hinder the effective deployment of sensitive document protection technologies in high-adversarial environments, impacting the achievement of the core objectives of enterprise data security governance.

[0028] Example 1: As Figure 1-2 As shown, the AI-based sensitive document identification, protection, and security restriction system includes:

[0029] Document Acquisition Module: Acquires the target document, parses it to generate a structure tree containing nodes and parent-child relationships; determines the access cost value for each node, which represents the operational complexity of reaching the node from its default open state;

[0030] The document acquisition module in this embodiment is responsible for receiving the electronic document to be detected (e.g., a macro-containing workbook file with the extension ".xlsm"), and completing the conversion from raw binary data to a computable structure tree, while assigning a quantified access cost value to each structural unit.

[0031] First, the system calls an open-source document parsing engine—the Apache POI library for Office documents and the PDFBox library for PDF documents—to perform a full parsing of the binary stream of the target document. The parsing process does not pre-set a "display layer priority" filtering rule, but recursively traverses all enumerable objects in the document container. Specifically, the parsing engine starts from the root node of the document and reads each logical unit one by one according to the file format specification (such as OOXML or PDF 1.7 standard), including but not limited to: visible paragraphs and cells in ordinary pages or worksheets, rows or columns marked as hidden, comment bubbles and notes pages located in sidebars or bottoms, OLE objects embedded as independent binary streams (such as embedded charts or another document), macro code (VBA or JavaScript) stored in modules, protected sections with access passwords, and a type of "unreferenced object stream" unique to the PDF format (i.e., those isolated objects that are not referenced by the page tree or any annotation objects through reference relationships). For each identified object, the parser creates a node for it, recording the following attributes: a unique node identifier, a type label (e.g., "visible_cell", "hidden_row", "comment_note", "ole_object", "macro_module", "password_protected_section", "unreferenced_stream"), its byte offset in the original file (used for quick location and extraction of the actual content), and, if it is a macro node, its source code text. When there is an explicit containment relationship between two objects (e.g., a worksheet contains a hidden row, a page contains a paragraph), the former becomes the parent node and the latter becomes the child node, thus forming a tree structure rooted at the document root node. Top-level objects without a parent node (such as top-level macro modules or unreferenced streams) are uniformly treated as direct children of the root node.

[0032] If the parsing engine returns an error or fails to construct a valid tree structure (e.g., file corruption, unsupported format version, or decompression failure), the document acquisition module directly marks the target document as "parsing failed" and passes an empty tree structure and a failure flag to subsequent modules. Upon receiving this flag, the subsequent distribution statistics module skips routine calculations and directly outputs a preset high-risk blocking command from the command output module.

[0033] After the structure tree is generated, the document acquisition module enters the stage of calculating the access cost value. The physical meaning of the access cost value is: the operational cost required to reach the node from the default view after the user double-clicks to open the document, through interactive steps that conform to the normal operation logic. In this embodiment, a cost rule table was pre-calibrated through user behavior experiments. The construction process of this table is as follows: 100 volunteers with typical office software usage experience were selected, and the operation sequence they performed from the default document interface to various structural units was recorded in a controlled environment. The median time of each operation was calculated and rounded down to 0.5 seconds as a cost unit. For example, clicking a tab or menu item takes an average of about 0.5 seconds, which is mapped to cost value 1; double-clicking to activate an embedded object takes an average of about 1.0 second, which is mapped to cost value 2; entering a known password takes an average of about 1.5 seconds, which is mapped to cost value 3. Objects that are never referenced do not have any reachable path in the normal UI, so they are assigned a special cost value of 4. Based on the above calibration, the following additional operation cost mapping is obtained: Visible text or visible cells require no additional operation, with an additional cost of 0; Hidden rows or columns require an "Unhide" menu operation, with an additional cost of 1; Annotation bubbles or notes pages require clicking a tab or bubble icon, with an additional cost of 1; Embedded OLE objects require double-clicking to activate, with an additional cost of 2; Macro modules require clicking the "Enable Macro" button, with an additional cost of 2; Password-protected sections require a password, with an additional cost of 3; PDFs without referenced object flows have no normal operation path, and the additional cost is directly set to 4.

[0034] Based on this, the system traverses the tree structure and calculates the access cost value of each node according to the following recursive relationship. The access cost value of the root node is fixed at 0; for non-root nodes, let the parent node of node v be p, and the additional operation cost from the parent node to node v is denoted as p. (This value is directly obtained from the cost rule table above based on the type label of node v), then the access cost value of node v is... The calculation formula is ;

[0035] in This represents the access cost value of the parent node p; for unreferenced flow nodes, since they are direct children of the root node in the structure and there is no normal operation path to reach them, this embodiment directly sets the access cost value. The parent node value is not accumulated (because the root node has a zero cost, and accumulating it would yield the same result); for example, a hidden cell at level 3 depth has a parent node that is a hidden row. The access cost of this hidden row is 1 (the additional cost from the root node to the hidden row), while the hidden cell itself requires no additional operation. Therefore, the access cost of this cell is 1 + 0 = 1; if a macro module is embedded inside an OLE object, the access cost of the OLE object is 2 (double-click to activate), and the macro module needs to click the "Enable Macro" button again. The access cost of this macro node is 2 + 2 = 4; for the root node itself, the access cost is directly set. .

[0036] The above calculations are performed using a breadth-first traversal, ensuring that the access cost of the parent node is determined before the child node's cost is calculated. After calculation, each node in the tree structure has a non-negative integer access cost value. This value will be used in subsequent static base weight calculation steps to guide the scanning engine to prioritize nodes with low cost and high macro threat. It's worth noting that the values ​​in the cost rule table can be scaled overall according to the security policy of the actual deployment environment (e.g., multiplying all cost values ​​by a coefficient less than 1 to reduce scanning latency for high-cost nodes), but this scaling does not affect the relative order of cost values ​​between nodes.

[0037] Distribution statistics module: Performs in-depth distribution statistics on the tree structure to generate a structural entropy index that characterizes the complexity of the document structure; performs static analysis on nodes of executable code type to generate static risk values;

[0038] After the document acquisition module completes the construction of the tree structure and the calculation of the access cost of each node, the distribution statistics module is responsible for quantifying the structural complexity of the entire tree and performing static risk analysis on the executable code nodes present in it.

[0039] To calculate the structural entropy index, this embodiment first statistically analyzes the node distribution at each depth level in the structure tree; let the maximum depth of the structure tree be... For each depth d (the root node has a depth of 0, its child nodes have a depth of 1, and so on), count the number of nodes at that depth. And calculate the total number of nodes. Then calculate the probability mass function value for depth d. The structural entropy index is based on the Shannon entropy formula, i.e. ;

[0040] The agreement is as follows hour The basic entropy value reflects the degree of dispersion of the depth distribution: if the nodes are evenly distributed across all depths, then H is larger; if the nodes are highly concentrated in a few depths (for example, most nodes are concentrated in depths 0 and 1), then H is smaller.

[0041] Furthermore, this embodiment introduces a depth anomaly factor to penalize the proportion of nodes whose depth exceeds a third threshold; here, the third threshold is preset to 3 (i.e., nodes with a depth greater than 3 are considered deep nodes); let the total number of nodes with a depth exceeding 3 be... Then the depth anomaly factor The final structural entropy index Defined as If the number of nodes in the tree structure exceeds the preset maximum number of nodes (e.g., 200,000), the system automatically enters "fast mode": skipping sibling propagation and child node propagation in risk propagation, retaining only parent node propagation, and setting the structure entropy index... Set it directly to 0 to save on calculations.

[0042] This metric considers both the uniformity of depth distribution (via H) and the density of deep nodes (via For example: Suppose a tree structure has 100 nodes, with 90 nodes distributed at depths 0-2 and 10 nodes distributed at depths 4-6. Then, the calculated... (Because the depth distribution is relatively concentrated) ,final If the nodes of the other tree structure are evenly distributed across depths 0 to 5 (approximately 20 nodes per depth), then , It could be 0.4 (the percentage of nodes with a depth greater than 3). ;visible It can effectively distinguish between simple documents and deeply nested complex documents.

[0043] To generate static risk values, this embodiment performs a lexical scan on all nodes in the structure tree whose type labels belong to executable code nodes (e.g., "macro_module"); for each macro node, its source code string is extracted; first, a set of valid opcodes is constructed. This includes frequently used and relatively safe operations in common office macros, such as: "Range.Value=", "Cells", "Save", "Close", "MsgBox", "ActiveSheet", "Select", "Copy", and "Paste". It also constructs a high-risk API call set. This includes dangerous functions with system calls or persistence capabilities, such as "Shell", "CreateObject", "FileSystemObject", "RegWrite", "RegRead", "WScript.Shell", "Run", "Execute", and "Eval". Furthermore, to detect potentially hidden cryptographic payloads, this embodiment also extracts all string literals enclosed in double or single quotes from the source code and calculates the Shannon entropy of the character frequency for each string. Suppose a string contains... There are 1 character, and the frequency of each character is 1. Then the entropy value of the string is ;like If so, the string is marked as a high-entropy string.

[0044] Based on the above statistics, for each macro node, the following three counting variables are defined: For the source code belonging to The total number of times the opcode appears; Belongs to Total number of API calls; The number of high-entropy strings is given; then the static risk value is calculated using the following formula. :

[0045] ;

[0046] Adding 1 to the denominator is to prevent the denominator from being... A division-by-zero error occurred; the coefficient 0.3 was determined through offline experiments: on 200 known labeled macro samples (100 normal macros, 100 malicious macros), grid search maximized the discriminative power (AUC); the final static risk value was truncated between 0 and 1; for example, a macro code containing 2 shell calls ( ), 1 high-entropy string ( 5 legal operations ( Then the molecule is The denominator is The ratio is approximately 0.383, therefore If the macro code contains 10 high-risk calls without any legal operations, the numerator is 10, the denominator is 1, the ratio is 10, and it is truncated. For documents that do not have executable code nodes, the static risk value of all macro nodes is 0 by default.

[0047] If the source code of a macro node is encrypted and the password cannot be obtained, lexical scanning cannot be performed in this embodiment. In this case, a preset medium-risk value of 0.6 is directly assigned, and the node is marked as an "encrypted macro" to trigger the subsequent sandbox simulation step. After the above calculation is completed, each executable code node carries a static risk value between 0 and 1, while the static risk value of non-executable code nodes is uniformly set to 0. This value, together with the previously calculated node access cost value, serves as the input for the subsequent static basic weight calculation. Finally, the distribution statistics module passes the structural entropy index to the next module. And the static risk value of each node.

[0048] Static analysis module: Calculates the static base weight based on the access cost and static risk value of each node, initializes the dynamic priority of each node based on the static base weight, and adds all nodes to the priority queue;

[0049] After the distribution statistics module completes the calculation of the access cost value of each node and the static risk value of the executable code node, the static analysis module is responsible for calculating the static basic weight of each node in the entire structure tree, and initializing the dynamic priority based on the weight, thereby organizing all nodes into a priority queue for use by the subsequent sensitivity analysis module.

[0050] First, this embodiment defines the calculation logic for static basic weights. Let the access cost value for any node v in the structure tree be denoted as... (Calculated by the document acquisition module), its static risk value is denoted as (Calculated by the distribution statistics module; for non-executable code nodes,) Static base weights The calculation involves two factors; the first factor is inversely proportional to the access cost value, specifically defined as... Its physical meaning is: the lower the access cost of a node (i.e., the easier it is for users to reach it), the closer this factor is to 1; the higher the cost, the more drastically the factor decays; the second factor exponentially amplifies the static risk value, defined as... ,in The sensitivity coefficient is a preset value; in this embodiment, it is determined through offline experiments. On 500 labeled documents containing known covert attacks, grid search optimization yielded the highest F1 score between the overall risk score and the manually labeled results. The exponential function's characteristic is that as the static risk value increases from 0 to 0.5, the exponential value increases from 1 to approximately 2.72; when the static risk value reaches 1.0, the exponential value is approximately 7.39, thus allowing for an order-of-magnitude increase in the static base weight of high-threat macronodes. Multiplying these two factors yields the static base weight: To prevent floating-point overflow, when When the value is greater than 10, direct saturation treatment is e. 10 (approximately 22026), but in this embodiment β=2, ≤1, the actual maximum exponent is e 2 ≈7.389, no saturation required.

[0051] After completing the static basic weight calculation for all nodes, the static analysis module enters the dynamic priority initialization phase; the system creates a dynamic priority variable for each node, denoted as . And set the initial value of this variable to the corresponding static base weight: ;

[0052] Subsequently, the system constructs a priority queue with a max-heap structure. A max-heap is a complete binary tree where the key value of each parent node is not less than the key value of its child nodes, ensuring that each pop operation returns the element with the largest key value in the current queue. In this embodiment, all nodes in the tree structure are inserted into the priority queue one by one, with insertion based on the node's dynamic priority. As the sorting key; after insertion, the queue contains all nodes, each in an "unscanned" state; it is worth noting that the construction of the priority queue does not depend on the parent-child relationship in the tree structure, but is independent of the tree topology and is sorted entirely based on numerical size; this means that even if the parent node of a deep node has a low priority, the deep node itself may be at the front of the queue due to its high static basic weight, and thus be taken out and scanned first in the subsequent sensitivity analysis module.

[0053] After the static analysis module completes the above initialization, it passes the priority queue, the static base weight of each node, and the current dynamic priority (which is equal to the static base weight) to the sensitivity analysis module. The sensitivity analysis module will continuously modify the dynamic priority value in subsequent iterations, but the static base weight remains unchanged and is used for the final comprehensive risk score calculation. This design ensures that risk propagation only affects the scanning order and does not pollute the static baseline of the final score.

[0054] Sensitivity Analysis Module: Iteratively execute the following process until the priority queue is empty: Take the highest priority node as the current node; extract its content and identify and generate a local sensitivity score; update the dynamic priority of unprocessed nodes that have a parent-child or sibling relationship with it based on the score; if the current node is executable code and the static risk value exceeds the preset risk threshold, perform a sandbox simulation, correct the local sensitivity score based on the simulation behavior, and increase the priority of the accessed node when it is detected that it is accessing other nodes.

[0055] After the static analysis module completes the initialization of the priority queue, the sensitivity analysis module takes over the execution flow, processes the nodes in the queue one by one in an iterative manner, dynamically adjusts the priority of nodes that have not yet been scanned during the processing, and triggers sandbox simulation for executable code nodes to correct their local sensitivity scores.

[0056] The sensitivity analysis module in this embodiment maintains a max-heap priority queue. Each node v is associated with a dynamic priority. Initially, In addition, maintain a result set. It is used to record the static base weight and final local sensitivity score of each node after it has been scanned.

[0057] The iterative process begins when the queue is not empty and repeats the following steps until the queue is empty.

[0058] The first step is to pop the node with the highest current dynamic priority from the priority queue Q, denoted as v, and marked as "being scanned". The pop operation is guaranteed by the property of a max-heap: the returned node has the highest priority in the current queue. value.

[0059] The second step involves extracting the content of node v and calculating its local sensitivity score. Different content extraction methods are used based on the type label of node v: for text nodes (e.g., "visible_text", "hidden_row", "comment_note"), the corresponding data block is extracted from the original document binary stream based on the byte offset recorded in step one, and decoded into UTF-8 text; for image nodes, if system policies allow, an optical character recognition engine (such as Tesseract) is called to convert the text in the image into a text string; for embedded OLE object nodes, the complete detection process of this solution is recursively called, and the returned comprehensive risk score is used as the local sensitivity score of the node; for executable code nodes, the local sensitivity score is temporarily deferred after extracting the source code text, and the sandbox simulation in step three is executed instead, with the score determined after the simulation is complete. For ordinary text nodes, the extracted text is fed into a lightweight sensitivity classifier. In this embodiment, the classifier is implemented based on TF-IDF vectorization and logistic regression models. It is pre-trained using text samples containing sensitive words (such as "confidential," "contract," "ID number," and "bank card number") and normal office text samples. The classifier outputs a confidence score between 0 and 1, denoted as . The higher the value, the greater the likelihood that the node's content contains sensitive information.

[0060] The training process of the sensitivity classifier is as follows: 100,000 labeled document fragments are collected (positive samples are texts containing keywords such as ID card number, bank card number, confidential, and contract; negative samples are ordinary office texts); jieba word segmentation (Chinese) or space segmentation (English) is used to construct a TF-IDF vector with a vocabulary size of 5000; the logistic regression model uses L2 regularization and is trained for 1000 iterations; the classifier output is... , where w is the weight vector and x is the TF-IDF feature vector; the classifier achieves an AUC of 0.92 on the validation set; if the target document is pure numbers or non-natural language content (such as hexadecimal strings), it is directly sent to the regular expression matching module (matching preset sensitive formats such as credit card numbers, IP addresses, etc.); while outputting local sensitivity scores, the sensitivity classifier returns the specific keywords that trigger high scores (such as "confidential", "contract number", etc.), and these keywords are replaced with asterisks of equal length during desensitization.

[0061] Third step, when node v is executable code type and its static risk value When the risk threshold is exceeded (set to 0.5 in this embodiment), the sandbox simulation process is triggered. The specific construction and execution process of the sandbox simulation are as follows. In this embodiment, a lightweight sandbox environment is pre-built, which is based on an operating system-level isolation mechanism (such as Windows). Implemented using a sandbox or Linux container, network access is completely blocked, write operations to the host file system are redirected to a temporary read-only directory, and all operations are subject to a 2-second timeout (if the sandbox simulation execution exceeds 2 seconds, macro execution is forcibly terminated, and a dynamic risk score D is calculated based on the captured behavior flag; if no behavior is captured before termination, D=0); a minimal Office host program is launched in the sandbox (for VBA macros, the Excel or Word automation interface is launched; for JavaScript macros, the corresponding script host is launched), injecting and executing the source code of the current macro node; simultaneously, the sandbox monitoring module intercepts the following four system behaviors through hook functions: whether a file creation API (such as CreateFile) is called, whether a registry write API (such as RegSetValue) is called, whether a child process (such as CreateProcess) is launched, and whether other structural units in the document are read through the host object model (such as ActiveSheet.OLEObjects); once each behavior occurs, the corresponding flag is set. Set to 1 if true, otherwise 0; after the sandbox execution is complete, calculate the dynamic risk score: This embodiment assumes that the macro code does not have the ability to actively resist sandboxing, or that the sandbox environment has been made transparent (e.g., by modifying the registry identifier); if obvious anti-sandboxing behavior is detected (e.g., long delay), the dynamic risk score D is directly set to 0.8.

[0062] In this embodiment, the sixth threshold is set to 0.7, the seventh threshold is set to 0.3, the eighth threshold is set to 0.6, and the ninth threshold is set to 0.3; the first high score is set to 0.95, the second high score is set to 0.85, and the middle score is set to 0.5.

[0063] in Then, based on the static risk value... The relationship with the dynamic risk score D is used to adjust the local sensitivity score of the current node according to the following rules. :like and Then force setting ;like and Then let ;like and This triggers a global rescan flag. and set Other situations remain unchanged. =Equal to the raw score directly output by the classifier; During the sandbox simulation, if the monitoring module detects that the macro code accesses a specific node in the document through the host object model (for example, by obtaining an embedded object through ActiveSheet.OLEObjects(1)), it immediately obtains the unique identifier of the node and dynamically raises its priority to 1.5 times the maximum priority value in the current priority queue, and then re-inserts it at the top of the queue (if the node is already in the queue, it updates its priority key value and adjusts the heap structure); This mechanism ensures that the hidden areas dynamically referenced by macros can be scanned immediately with priority.

[0064] The fourth step is to calculate the local sensitivity score of node v. Update the dynamic priority of unprocessed nodes that have a parent-child or sibling relationship with it; the specific propagation rules are as follows:

[0065] For parent node propagation: If node v has a parent node p, and p has not yet been scanned (i.e., it is still in the priority queue), then update the parent node's dynamic priority: ;

[0066] in As the propagation factor, in this embodiment, we take... The physical meaning of this formula is: the access cost of the parent node. The lower the threshold (i.e., the easier it is for the parent node to be reached by the user), the greater the propagation increment it receives; meanwhile, the propagation strength is affected by the sensitivity of the current child nodes. Modulation; after the update, adjust the position of node p in the priority queue to maintain the max-heap property.

[0067] For child node propagation: when At that time, perform temporary cost reduction and priority recalculation for each child node c of node v (if c has not yet been scanned). First, define the temporary access cost:

[0068] ;

[0069] This means temporarily reducing the priority by 1 unit, with a minimum of 0; then, the priority of the child nodes is recalculated based on this temporary cost. ;

[0070] in The fixed boost amount (selected through simulation experiments) ensures that the priority of deep sensitive nodes can exceed that of shallow non-sensitive nodes. The sensitivity coefficient is the same as that used in the static base weight calculation (taken as 2.0); it is worth noting that the static risk value used here is different. Compared to the original access cost (Not reduced) Remains unchanged; only temporary costs are used for this priority update. After calculation, the priority of child node c will be updated to... And adjust the position in the queue.

[0071] For sibling node propagation: If node v has a parent node, then obtain the set of all other child nodes of that parent node (i.e., v's sibling nodes); for each unscanned sibling node s in the set, execute: ;

[0072] in This is a sibling enhancement factor; this operation increases the priority of sibling nodes under the same parent node by 30%, in order to deal with the situation where attackers fragment sensitive information and distribute it across multiple sibling nodes.

[0073] Fifth step, set the static base weights of the current node v. and the final determined local sensitivity score Store the result set Then remove node v from the priority queue (it has been removed by the pop operation, and is only marked as scanned here), and continue to the next iteration.

[0074] The iteration terminates when the priority queue Q is empty; at this point, if the global rescan flag is performed... If true, then the clear result set in this embodiment is cleared. The dynamic priorities of all nodes are reset to their static base weights, the priority queue is rebuilt, and the entire iterative scanning process described above is executed again. In the second round of scanning, no macro sandbox simulation is triggered (i.e., the third step is skipped), and for all executable code nodes, their static risk values ​​are temporarily increased by a preset penalty value of 0.2 (with the upper limit truncated to 1.0) to penalize macros that bypassed static detection through obfuscation techniques in the first round. After the second round of scanning, the result set is... The final static base weights and local sensitivity scores are recorded for use by the instruction output module.

[0075] Command output module: After the queue is cleared, the comprehensive risk score is calculated based on the weighted average of the static basic weights and local sensitivity scores of each node; the comprehensive risk score is compared with the preset security threshold, and protection commands are output based on the comparison results.

[0076] The sensitivity analysis module completes the scan of all nodes and stores the results in the result set. Then, the instruction output module takes over the execution process; this module sequentially performs comprehensive risk score calculation, risk attribution analysis, and differentiated protection instruction generation, and finally outputs protection actions for the target document.

[0077] First, the calculation of the comprehensive risk score is based on the result set. The static base weights of each node recorded in the data. Local sensitivity score This embodiment uses a weighted average method, taking the static base weights as the node importance weights, to calculate the overall risk score of the document. The formula is as follows: ;

[0078] Where V is the set of all nodes in the tree structure; the denominator is the sum of the static base weights of all nodes, used for normalization; the physical meaning of this weighted average is: the larger the static base weight of a node (i.e., the lower the access cost or the higher the static risk), the higher its contribution to the overall risk score of the document; for example, suppose a document contains two nodes: node A has a static base weight of 2.0 and a local sensitivity score of 0.9; node B has a static base weight of 0.5 and a local sensitivity score of 0.1; then the comprehensive risk score is... If a simple average is used instead, the score is only 0.5, which cannot reflect the dominant role of node A; therefore, the weighted average can accurately reflect the contribution of high-risk, low-weight nodes to the overall risk of the document.

[0079] After calculating the comprehensive risk score, this embodiment further performs risk attribution analysis to support subsequent differentiated protection decisions; this analysis is based on the result set. The data in the result set is processed through the following steps: First, traverse all nodes in the result set and calculate the risk contribution value of each node. Preset a contribution threshold In this embodiment, we take Extract all that satisfy The nodes constitute a high-risk node cluster Then, for each node in the high-risk node cluster, based on its access cost value... The cost range and the depth range to which the depth level belongs determine the attribution category; in this embodiment, the cost range is divided into three ranges: the lower range corresponds to... The middle interval corresponds to The high interval corresponds to The depth range is divided into three intervals: the shallow interval corresponds to the depth... The middle layer corresponds to the depth The deep interval corresponds to the depth The two methods intersect to form nine attribution categories, such as "low interval_shallow interval" and "high interval_deep interval". Simultaneously, based on the node type labels (such as "visible_cell", "hidden_row", "macro_module", "unreferenced_stream", "password_protected_section", etc.), the total risk contribution corresponding to each type label in the high-risk node cluster is calculated; that is, for each type t, the risk contribution is calculated... Then calculate the sum of all types of risk contributions. This leads to the contribution ratios for each type of contribution. The type with the largest contribution ratio is the dominant risk type; the attribution category with the largest contribution ratio (the one with the largest total contribution among the nine categories) is the dominant attribution category; finally, the dominant risk type, the dominant attribution category, and a label that identifies concealed characteristics (for example, if the cost range in the dominant attribution category is a high range and the depth range is a deep range, then the label is "deeply concealed"; if the dominant risk type is "macro_module", then the label is "macro-driven") are combined into a risk attribution report.

[0080] After obtaining the comprehensive risk score and risk attribution report, the instruction output module generates differentiated protection instructions based on these two pieces of information; this embodiment presets a security threshold. ;like If so, a permission command will be output directly, allowing the user to access the target document normally.

[0081] like Then, based on the dominant attribution category and dominant risk type in the risk attribution report, a specific protection strategy is selected. In the first case: when the cost range in the dominant attribution category is high, or the dominant risk type is "unreferenced_stream" or "password_protected_section," it is determined to be a deeply hidden sensitive document. At this time, a deep-blocking instruction is output, which includes three actions: blocking the current document access request and returning an access denied response to the requester; calculating the hash value of the target document (using the SHA-256 algorithm) and adding this hash value to the persistent blacklist database, so that subsequent access to the document can be directly blocked without rescanning; and triggering an audit event, recording the visitor's identity, timestamp, document name, and attribution report content to the security log system.

[0082] The second scenario: When the cost range in the dominant attribution category is low and the dominant risk type is "visible_cell" or "visible_text", it is determined to be an explicitly sensitive document; in this case, a rapid desensitization instruction is output; specifically, this embodiment maintains a desensitization threshold. For the result set, the local sensitivity score The node is masked, and its corresponding content area is masked: for text nodes, the sensitive words (the keyword list attached by the sensitive classifier) ​​are replaced with a preset number of asterisks; for cells or paragraphs, the non-sensitive parts are left as is; after processing, a de-sensitized copy of the document is output, and the original document is not released; this instruction does not trigger audit events to reduce interference with normal business operations.

[0083] The third scenario: When the dominant risk type is "macro_module" (executable code node) and the risk contribution ratio corresponding to this type... Exceeding the macro contribution threshold (In this embodiment, we take) When a document is identified as a macro threat-driven sensitive document, a sandbox mandatory isolation command is output. This command redirects the target document to a restricted virtualization environment. This virtualization environment employs the same isolation strategy as the sandbox (disallowing network access, disallowing writing to the system directory, and setting timeouts). Macro code is automatically disabled or only a limited number of whitelisted security operations are allowed in this environment. The original document is not directly delivered to the user; the user can only view the document content through a restricted view within the virtualization environment. The whitelist is a predefined set of limited security operations, such as allowing only read-only access to the current worksheet and prohibiting any write operations or the initiation of child processes. In this embodiment, the whitelist is configured by the system administrator.

[0084] If none of the above three conditions are met (i.e., the overall risk score exceeds the security threshold but does not fall into any specific category), a default blocking instruction will be output, which will only block access without performing any additional blacklisting or auditing.

[0085] This embodiment achieves a complete closed loop from risk quantification to attribution deconstruction and then to strategy differentiation output through the above-mentioned phased and dimensional processing, ensuring that sensitive documents with different concealment characteristics can obtain a protection response that matches their threat level.

[0086] Based on the complete technical solution described in Embodiment 1, the document structure parsing and dynamic priority scanning mechanism constructed in this embodiment can systematically solve the deep structure escape problem caused by the "inverted relationship between access cost and risk value" in the prior art. By independently calculating the access cost value and static risk value for each structural unit, and generating static basic weights based on these values, even if high-threat macro nodes have high access costs, their initial scanning priority can still surpass that of ordinary visible nodes, thereby breaking the fixed scanning order of low cost priority. During the iterative scanning process, the local sensitivity score dynamically adjusts the priority of unprocessed nodes through multi-directional risk propagation of parent nodes, child nodes, and sibling nodes, ensuring that high-risk hiding areas can be detected. Timely focus; simultaneously, macro behavior simulation and positive interaction verification mechanisms can correct misjudgments in static analysis and include macro-referenced objects in the scanning scope in advance through real-time priority interruption; thus, this solution achieves effective detection of sensitive content hidden in hidden lines, embedded objects, password protection areas, and unreferenced streams, while avoiding over-response or under-response through risk attribution analysis and differentiated protection instructions; based on the above mechanisms, the beneficial effects of this invention are: while ensuring that the overhead of conventional document processing remains basically unchanged, it significantly improves the detection recall rate of deep structure escape attacks, reduces the frequency of production business interruptions caused by misjudgments, and provides an engineering-deployable technical path for sensitive document protection in high-adversarial environments.

[0087] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined in the claims, all of which should fall within the protection scope of the present invention.

[0088] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0089] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A sensitive document identification, protection, and security restriction system based on artificial intelligence, characterized in that: include: Document Acquisition Module: Acquires the target document and parses it to generate a structure tree containing nodes and parent-child relationships; Determine an access cost value for each node, which represents the operational complexity of reaching that node from its default open state. Distribution statistics module: Performs in-depth distribution statistics on the tree structure to generate a structural entropy index that characterizes the complexity of the document structure; Perform static analysis on nodes of executable code type to generate static risk values; Static analysis module: Calculates the static base weight based on the access cost and static risk value of each node, initializes the dynamic priority of each node based on the static base weight, and adds all nodes to the priority queue; Sensitivity Analysis Module: Iteratively execute the following process until the priority queue is empty: retrieve the highest priority node as the current node; extract its content and identify and generate local sensitivity scores; The dynamic priority of unprocessed nodes that have a parent-child or sibling relationship with this score is updated accordingly. If the current node is executable code and the static risk value exceeds the preset risk threshold, a sandbox simulation is performed. The local sensitivity score is corrected based on the simulation behavior, and the priority of the accessed node is increased when access to other nodes is detected. Instruction output module: After the queue is cleared, the comprehensive risk score is calculated based on the weighted average of the static basic weights and local sensitivity scores of each node; Compare the overall risk score with the preset security threshold, and output protection instructions based on the comparison results.

2. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The access cost value is determined as follows: the root node cost is zero, and the non-root node cost is equal to the parent node cost plus the additional operation cost corresponding to the node type. The additional operation cost is pre-calibrated based on the standard operation steps from the parent node to the node.

3. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The structural entropy index is generated as follows: the proportion of nodes at each depth level is statistically analyzed and Shannon entropy is calculated as the base entropy. The proportion of nodes with depths exceeding a preset threshold is statistically analyzed as the depth anomaly factor. The base entropy is multiplied by a coefficient that is positively correlated with the depth anomaly factor to obtain the structural entropy index.

4. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The static risk value is generated as follows: Lexical scanning is performed on the source code of the executable code to count the number of legal opcodes, the number of high-risk application interface calls, and the number of high-entropy strings. The weighted sum of the number of high-risk calls and the number of high-entropy strings is divided by the sum of the number of legal opcodes and a preset constant. The resulting ratio is truncated and used as the static risk value.

5. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The static base weight is calculated as follows: calculate the first factor by dividing by the access cost value, calculate the second factor with the natural constant as the base and the sensitivity coefficient multiplied by the static risk value as the exponent, and use the product of the first factor and the second factor as the static base weight.

6. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The specific process of updating the dynamic priority of unprocessed nodes includes: when propagating to the parent node, adding the local sensitivity score multiplied by the propagation factor to the parent node's current priority and then dividing by the increment of the parent node's access cost value; when the local sensitivity score exceeds the second threshold, propagating to the child nodes: temporarily reducing the child node's access cost value and recalculating the priority based on the reduced value and then adding a fixed boost; when propagating to the sibling nodes, multiplying the sibling node's current priority by the sibling enhancement factor.

7. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The specific process of sandbox simulation and correction includes: executing executable code in the sandbox and monitoring whether behaviors such as creating files, writing to the registry, starting child processes, and reading other structural units occur, and counting the number of behaviors to generate a dynamic risk score; if both the static risk value and the dynamic risk score are higher than their respective thresholds, the local sensitivity score of the current node is forcibly set to the first highest score; if the static risk value is higher than the sixth threshold and the dynamic risk score is lower than the seventh threshold, it is set to the middle score; if the dynamic risk score is higher than the eighth threshold and the static risk value is lower than the ninth threshold, a global rescan flag is triggered and set to the second highest score.

8. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 7, characterized in that, If executable code is detected accessing a specific node during the sandbox simulation, the dynamic priority of that specific node will be increased to a preset multiple of the highest priority in the current queue and placed at the top of the queue.

9. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 7, characterized in that, When the global rescan flag is triggered, the result set is cleared after the current round of scanning is completed, the dynamic priority of all nodes is reset to the static base weight, the priority queue is rebuilt and the iterative scan is executed again. The second round of scanning does not trigger sandbox simulation and the static risk value of each executable code node is temporarily increased by a preset penalty value.

10. The sensitive document identification, protection, and security restriction system based on artificial intelligence according to claim 1, characterized in that, The comprehensive risk score is calculated as follows: the sum of the products of the static basic weights of each node and the corresponding local sensitivity scores is divided by the sum of the static basic weights of each node, and the resulting weighted average is used as the comprehensive risk score; the output of protection instructions based on the comparison results is specifically as follows: when the comprehensive risk score is greater than or equal to the security threshold, at least one of the following instructions is output: blocking, desensitization or alarm instructions are output; otherwise, a release instruction is output.

Citation Information

Patent Citations

  • Electronic document content examination method

    CN121637572A

  • Method, system and recording medium for maintaining the order of nodes in a heirarchical document

    US20050028091A1