Method for secure access and synchronization of a document
By combining a chain-based encryption structure and a hash list, dynamic permission management and secure synchronization of documents are achieved in offline environments, which solves the shortcomings of static permission control and ensures the legality of permissions and data security.
Patent Information
- Application Number
- CN202611363399.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-11-24
AI Technical Summary
The existing static offline permission control mechanism cannot achieve temporary, time-limited, and segmented permission control, and permission control is disconnected from data synchronization, resulting in data with expired permissions or unauthorized operations still being synchronized when connected to the network.
An offline permission chain with a chained encryption structure, combined with a base hash list and asymmetric encryption, enables dynamic permission verification and synchronization of documents. The legality of permissions is ensured through compliance verification of differential data blocks. Combined with file segmentation and differential synchronization, deep binding of permissions and data is achieved.
It enables dynamic access control in offline environments, preventing access forgery and tampering, ensuring data security and synchronization compliance, and meeting the high compliance and high reliability requirements of government and enterprise and confidential scenarios.
Smart Images

Figure CN123158676A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of document security management and data synchronization technology, specifically relating to a method for secure access and synchronization of documents. Background Technology
[0002] In scenarios such as government and enterprise offices, engineering construction, management of classified documents, external cooperation, and business travel, staff often need to download internal documents, classified drawings, and core materials to their local machines for offline editing to meet business operation needs in environments with no or weak network access. After the network is restored, the locally modified documents are then synchronized to the server to complete data updates and archiving. Such scenarios require both ensuring business continuity for offline document use and strictly controlling document access permissions to prevent data leaks, unauthorized operations, and unauthorized tampering.
[0003] Currently, the common method for managing users' offline documents is to encrypt the documents and send them to the local machine when the user is connected to the internet, while also issuing fixed permission credentials (such as validity period and role permissions). During offline periods, the validity and basic legality of the permission credentials are only verified locally to allow users to open and edit the documents. After connecting to the internet, the permissions are re-verified and the data is synchronized through a file differential synchronization mechanism.
[0004] The existing static offline access control mechanism cannot handle situations requiring temporary, time-limited, segmented, and automatically revoked access control (e.g., allowing editing for a certain period, viewing for another, and prohibiting any operation during a certain period). Furthermore, access control is completely disconnected from data synchronization. Synchronization only focuses on data transmission efficiency and content integrity, neglecting the legality of permissions. Expired permissions and unauthorized operations are also synchronized during network access. Summary of the Invention
[0005] The technical problem solved by this invention: This invention provides a secure document access and synchronization method that solves the technical problem that static offline permission control mechanisms cannot achieve temporary, time-limited, segmented, and automatically reclaimable permission control, and that permission control synchronization only focuses on data transmission efficiency and content integrity without considering the legality of operation permissions. It also synchronizes data with expired permissions and unauthorized operations when connected to the network.
[0006] The technical solution adopted in this invention is as follows: A method for secure access and synchronization of documents includes the following steps: S1. The user requests offline access to the target document, generates an offline permission chain, the server divides the target document into data blocks and generates a base hash list for the corresponding target document, binds the base hash list to the offline permission chain, and the server sends the encrypted document, offline permission chain, and base hash list to the client together. S2. After a user enters offline mode, the client automatically starts the full-process recursive verification of the offline permission chain. If the verification passes, the client decrypts the document and allows the user to perform the corresponding operation. S3. The client filters out the data blocks that have changed content and removes the data blocks that have not changed, forming the basic differential content; the basic differential content is bound and encapsulated with the permission tracing information to obtain the differential package; S4. After the client regains network access, it uploads the locally generated compliance differential package to the server. After verification, it is merged with the server-side baseline document, the baseline hash list is updated, and the client permission chain and baseline data are refreshed after synchronization is completed.
[0007] The offline permission chain is a chain-like encrypted structure, including a permission root node, a change node, and a revocation node. Each node is distinguished by its permission type field, and each node has a built-in parent node hash value. The parent node hash value is a digest value calculated by using the SHA-256 algorithm on the complete serialized content of the parent node. The permission root node at the head of the chain has no parent node, and its parent node hash value is agreed to be a fixed initial value. Each node forms a chain relationship based on its parent node hash value.
[0008] The method for generating the baseline hash list is as follows: For each independent data block after partitioning, a rolling weak hash and a strong SHA hash are calculated separately. Based on the weak and strong hashes of all data blocks, a baseline hash list for the corresponding target document is generated. The strong SHA hashes of all data blocks are then aggregated and calculated again to obtain the root hash value of the baseline hash list, which serves as the unique data fingerprint of the entire document.
[0009] The rolling weak hash is calculated using a fast hash algorithm; the SHA strong hash is calculated using a secure hash algorithm.
[0010] The baseline hash list and the offline permission chain are jointly encrypted, and the binding signature is performed using the RSA asymmetric encryption algorithm. The specific steps are as follows: the root hash value of the baseline hash list and the tail node ID of the offline permission chain are concatenated into a signature plaintext in a fixed format. The server's private key is used to encrypt and sign the plaintext to generate a unique binding signature value. The signature value is stored together with the baseline hash list and the offline permission chain to establish a unique association between the data block and the offline permission chain.
[0011] The offline permission chain undergoes a full-process recursive verification process, including verifying the integrity of the offline permission chain, verifying the legality of the offline permission chain signature, verifying the validity of permissions, and verifying operation permissions. Among these verifications, the integrity of the offline permission chain is also verified by checking the legality of the chain structure, confirming that there is one and only one permission root node located at the head of the chain, and that change nodes and revocation nodes are only appended to the tail of the chain. When verifying operation permissions, the type of effective node matched with the current trusted time is first determined. If it is a revocation node, the entire permission chain is deemed invalid. If it is a change node, the changed permissions shall prevail.
[0012] The difference data block is defined as follows: the client starts file driver listening, intercepts user editing behaviors such as writing, modifying, and deleting documents in real time, locates the data block offset and range corresponding to the editing operation, extracts the data block and recalculates its rolling weak hash and SHA strong hash, and compares the new hash value with the baseline hash list issued in the online stage one by one. The data block whose content has changed is the difference data block.
[0013] The differential packet includes: the content of the differential data block, the ID of the currently effective permission chain node, the local trusted timestamp of the editing time, the corresponding operation mask, and the permission chain signature.
[0014] Before receiving the compliance differential packet uploaded by the client, the server first verifies whether there are any revocation or change nodes in the permission chain to confirm that the permission chain is in a valid state.
[0015] After receiving the differential packet, the server performs two layers of strict verification: the first layer is permission compliance verification, which verifies whether the permission chain node bound to the differential packet is valid, whether the editing time is within the authorization window, and whether the operation type conforms to the permission mask; the second layer is data integrity verification, which verifies whether the differential block hash is normal and has not been tampered with.
[0016] The beneficial effects of this invention are: (1) The present invention provides a secure access and synchronization method for documents, which effectively solves the industry pain points of traditional offline document permissions being statically fixed, unable to be dynamically managed, permission management and data synchronization being disconnected, and permission revocation being incomplete.
[0017] (2) The present invention provides a document secure access and synchronization method, which realizes dynamic verification, automatic switching and remote revocation of document permissions in the absence of network environment through offline permission chain, and prevents permission forgery and tampering by chain hash and asymmetric signature. At the same time, it deeply binds permission control and block differential synchronization, so that only compliant permissions can be edited and only legal differential can be synchronized. It takes into account the synchronization efficiency of large files and data security, and the whole process is auditable and traceable. It can meet the high compliance and high reliability requirements of offline document secure access and synchronization in various scenarios such as government and enterprise, confidentiality, and engineering construction. Attached Figure Description
[0018] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in describing the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are merely some embodiments recorded in the present invention. Those skilled in the art can derive other drawings from the following drawings without any creative effort.
[0019] Figure 1 A flowchart illustrating a secure document access and synchronization method provided by this invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 protection scope of the present invention.
[0021] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., refer to the orientation or positional relationship shown in the accompanying drawings, and are used only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0022] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or a connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0023] like Figure 1 As shown, the present invention provides a method for secure access and synchronization of documents, comprising the following steps: S1. Online Authorization and Initialization When a user requests offline access to a target document, the server first verifies the user's identity and online permissions. After the request is approved, the following two core operations are performed: S101. Generate offline permission chain The offline permission chain is a chain-like encrypted structure, containing a root permission node (the initial node), change nodes, and revocation nodes. Each type is distinguished by the node's "permission type" field. Each node in the offline permission chain contains information such as node ID, parent node hash value, user ID, document ID, operation mask, effective time, expiration time, and permission type. It uses a server private key for asymmetric signing to prevent tampering and forgery of the permission chain. The parent node hash value is a digest value calculated using the SHA-256 algorithm from the complete serialized content of the parent node (including the parent node ID, data in each field, and the server signature). The root permission node at the head of the chain has no parent node, and its parent node hash value is conventionally set to a fixed initial value (e.g., all zeros). Change nodes and revocation nodes are appended to the tail of the chain and cannot be inserted into the chain or skipped. To prevent individual tampering with the permission chain fields, when the server performs asymmetric signing on each node, the original signature must include at least: node ID, parent node hash value, approval credential ID, user ID, document ID, permission type, operation mask, effective time, and expiration time. If any field is modified, the node signature verification will fail. The offline permission chain supports preset permissions for multiple time periods. When different permissions are granted for different time periods, an independent node is generated for each time period and linked into a chain. During verification, only nodes whose effective time period covers the current time are matched based on the current trusted time. If multiple nodes are matched at the same time (time periods overlap), the node most recently generated at the end of the chain is the currently effective node. Once a node triggers a permission downgrade (e.g., from editable to read-only) or expires due to time expiration, subsequent nodes of the same dimension must not upgrade or restore its permissions without re-authorization from the server. If restoration is necessary, a new modified node must be generated and signed by the server. The offline permission chain can automatically upgrade, downgrade, and invalidate permissions in offline mode.
[0024] The information for nodes in the offline permission chain (including three types: permission root node, change node, and revocation node, with different node types distinguished by the permission type field) is as follows: When different permissions need to be configured for different time periods (e.g., edit permission from 12:00 on 2026-3-12 to 23:59:59, and read-only permission from 00:00 on 2026-3-13 to 23:59:59), multiple permission nodes need to be configured.
[0025] If user permissions need to be modified after they have been granted offline permissions, a change node needs to be generated to describe the changed permissions.
[0026] Node modification and revocation are issued online by the server based on online approval only when the user is connected to the internet, and carry the approval credential ID corresponding to this authorization. Clients are not allowed to generate or add any modification or revocation nodes while offline. During verification, in addition to verifying the node signature, the server also verifies that the approval credential ID carried by the node matches the server's issuance record, preventing attackers from forging or adding nodes or tampering with the permission chain structure in an offline environment.
[0027] S102. Document chunking and base hash binding The server divides the target document into fixed-size blocks, defaulting to 4KB blocks. For each independent data block, two types of hash values are calculated: a rolling weak hash, calculated using a fast hash algorithm (commonly Adler-32 or CRC32), used for quick comparison and locating whether the data block has been modified, with high verification efficiency; and a SHA strong hash, calculated using a secure hash algorithm (such as SHA-256), used to ensure that the data block content is not tampered with, providing extremely high collision resistance. The two types of hashes are used in combination to balance verification efficiency and data security. Based on the weak and strong hashes of all data blocks, a baseline hash list corresponding to the target document is generated. The SHA strong hashes of all data blocks are then aggregated and calculated again to obtain the root hash value of the baseline hash list, which serves as the unique data fingerprint of the entire document.
[0028] Subsequently, the baseline hash list and the offline permission chain are jointly encrypted, and the binding signature is performed using the RSA asymmetric encryption algorithm. The specific steps are as follows: The root hash value of the baseline hash list, the tail node ID of the offline permission chain, and the current permission chain version number are concatenated into a signature plaintext in a fixed format. The plaintext is then encrypted and signed using the server's private key to generate a unique binding signature value. The signature value is stored together with the baseline hash list and the offline permission chain to establish a unique association between the data block and the offline permission chain. When nodes are subsequently added, changed, or removed from the permission chain, the permission chain version number is updated, and the binding signature is regenerated using the latest version number and the root hash value of the baseline hash list. This ensures that the binding relationship always points to the latest legitimate permission chain, guaranteeing that each data block corresponds to a unique legitimate permission credential, thereby achieving binding control and immutability of data and permissions.
[0029] After completing the above operations, the server will send the encrypted document, offline permission chain, and base hash list to the client. The client will then store these in a local secure encrypted storage area, prohibiting ordinary users from directly reading or modifying them.
[0030] The offline permission chain mechanism solves the problem of static and fixed permissions in traditional offline documents, which cannot be dynamically managed.
[0031] S2. Offline document access and dynamic permission verification After a user enters offline mode, the client automatically initiates a full-process recursive verification of the offline permission chain before each time the user opens or operates on a document. The verification steps are as follows: S201. Verify the integrity of the offline permission chain. Recursively verify the hash value of the parent node from the tail node upwards to determine if the offline permission chain is broken or tampered with. If the hash does not match, the permission chain is deemed invalid, and the document is locked to prevent decryption. At the same time, verify the legality of the offline permission chain structure. Confirm that there is one and only one permission root node in the chain, and that it is located at the head of the chain. Change nodes and revocation nodes are appended to the tail of the chain. There should be no multiple permission root nodes in the chain or nodes jumping or rearranging in order. If the interface is invalid, the entire offline permission chain is invalid, and file access is prohibited. S202. Verify the legality of offline permission chain signatures. Use the server's public key to verify the signatures of each permission node to prevent forgery of the permission chain and access to documents. Each node's signature already contains its approval credential ID; offline verification verifies the node signatures to confirm that the approval credential ID has not been tampered with. After the client regains network access, it reports the approval credential IDs of the changed and revoked nodes in the permission chain to the server, comparing them one by one with the server's issuance records to confirm that each added node corresponds to a genuine and valid online authorization, preventing forgery of added nodes and tampering with the permission chain structure in an offline environment. S203. Verify the validity of permissions. Using the client's local trusted time, determine if the current time is within the valid window of the permission node. Simultaneously, identify the time period rules built into the offline permission chain and automatically match currently available permissions. The local trusted time acquisition and anti-tampering methods are as follows: When the client is connected to the internet, it synchronously obtains the standard timestamp from the server and binds this timestamp to the permission chain for encrypted storage. During offline periods, the time is incremented in millisecond steps starting from the server's base timestamp. Simultaneously, during each permission verification, the continuity of the current time increment with the base timestamp is checked to ensure that the time increases uniformly, without rollback or jumps. If a timestamp jump, rollback, or break in continuity is detected, the permission is directly deemed invalid, and the document is locked and access is prohibited.
[0032] S204. Verify the effective node and operation permissions. First, determine the type of the effective node matched by the current trusted time. If it is a revocation node, the entire permission chain is directly deemed invalid, and the document is locked and access is prohibited. If it is a change node, the changed permissions shall prevail. Based on the operation mask built into the effective node, determine whether the current operation is compliant, distinguish between fine-grained permissions such as read-only, editable, access prohibited, and export prohibited, and block unauthorized operations.
[0033] Only after all verifications pass will the client decrypt the document, allowing the user to perform the corresponding operation; if any verification fails, the document will be locked immediately, and the violation will be logged. The offline permission chain can automatically switch permissions according to preset time periods in offline mode, realizing dynamic permission management without network access.
[0034] S3, Offline Editing and Compliance Differential Generation S301, Permission Pre-verification Interception When a user initiates a document editing operation, the client first triggers a round of lightweight offline permission chain verification to check whether the operation mask of the current permission node has editing permissions, whether the trusted time is within the valid editing window, and whether the permission chain is complete and has not been tampered with. If any verification fails, the editing operation is directly blocked, a permission insufficient prompt is displayed, and a violation operation log is recorded.
[0035] S302, File Write Interception and Block Comparison After verification, the client starts file driver listening to intercept user editing behaviors such as writing, modifying, and deleting documents in real time, locates the offset and range of the data block corresponding to the editing operation, extracts the data block and recalculates its rolling weak hash (Adler-32) and SHA strong hash, compares the new hash value with the baseline hash list issued in the online stage one by one, and filters out the data blocks with changed content.
[0036] S303, Differential Data Encapsulation Remove unchanged data blocks and retain only changed data blocks to form basic differential content. Bind and encapsulate the basic differential content with permission tracing information to obtain a differential package, which specifically includes: the content of the differential data block, the ID of the currently effective permission chain node, the local trusted timestamp at the time of editing, the corresponding operation mask, the permission chain signature, and the root hash value of the base hash list on which this editing is based (i.e., the version fingerprint of the edited document), ensuring that each piece of differential data can be traced back to a legitimate permission node.
[0037] S304, Encrypted Storage and Access Control Linkage The packaged, compliant differential data is encrypted and stored locally in the client's secure encrypted area, separate from the document itself and the offline permission chain, to prevent the differential data from being tampered with. If, during editing, the offline permission chain automatically downgrades due to expiration (e.g., editable permissions are converted to read-only permissions), the client immediately stops listening, closes the editing entry point, prohibits the generation of further differential data, and only retains the already generated compliant differential records.
[0038] Anomaly Handling: If the client is powered off or loses power during the editing process, the generated compliant differential package will not be lost. After powering on, the encrypted last trusted timestamp and differential data will be read. Editing can continue after the permission verification is passed. The time continuity during the shutdown period will still be verified to prevent unauthorized editing by tampering with the time validity through power outage.
[0039] By deeply binding access control with block differential synchronization, it ensures that editing is only allowed if the permissions are compliant and synchronization is only allowed if the differential is valid, thus solving the problem of potential unauthorized synchronization and merging in previous offline synchronization solutions.
[0040] S4, Network Synchronization and Dual Authentication After the client regains network access, it does not initiate data synchronization directly. Instead, it organizes all locally generated compliance differential packages in ascending order of edit timestamps and then reports the local permission chain information to the server. The server first verifies whether there are any revocation or change nodes in the permission chain. After confirming that the permission chain is in a valid state, it then receives the compliance differential package uploaded by the client.
[0041] After receiving the differential packet, the server performs two layers of strict verification: the first layer is permission compliance verification, which verifies whether the permission chain node bound to the differential packet is valid, whether the editing time is within the authorization window, and whether the operation type conforms to the permission mask; the second layer is data integrity verification, which verifies whether the differential block hash is normal and has not been tampered with.
[0042] Multiple compliant differential packages can be generated while the client is offline. After reconnection, they are uploaded sequentially in ascending order of edit timestamp. The server merges multiple differential packages that have passed dual verification block by block in the order of edit timestamp. If the same data block has changes from multiple differential packages, the differential package with the latest edit timestamp and that has passed permission compliance verification shall prevail, avoiding multiple edits of the same data block from overwriting or conflicting each other.
[0043] Only compliant differential blocks that pass the double verification will be merged with the server-side baseline document, the baseline hash list will be updated, and the client's permission chain and baseline data will be refreshed after synchronization is completed. If the permission verification fails, the server will immediately reject the synchronization request, issue a permission invalidation command, the client will automatically delete the local non-compliant differential package, roll back the document to the previous permission compliant version, and permanently lock the document.
[0044] If an administrator revokes or cancels permissions on the server while a user is offline, the server will append a cancellation node to the end of the permission chain and complete the signature. In this solution, after the cancellation node is appended, the entire permission chain is immediately deemed invalid. The client immediately encrypts and locks the local cached document and all unsynchronized differential data, prohibiting access and editing, and refusing to synchronize any differential data. (To support targeted cancellation of only certain time periods or operations, a "Cancellation Target Node ID" field can be added to the cancellation node to invalidate only the target node; this embodiment uses full chain cancellation as an example.) This invention achieves dynamic permission control for offline document access by constructing an offline permission chain mechanism, abandoning the traditional static permission credentials; it deeply binds the permission chain with block differential synchronization to achieve a closed-loop control of the entire process: "access is only allowed if the permission is compliant, editing is only allowed if the access is legal, and synchronization is only allowed if the editing is compliant," balancing the convenience of offline use with the stringent requirements of data security control.
[0045] While those skilled in the art will recognize that the present invention is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention, the embodiments should be considered illustrative and non-limiting in all respects. The scope of the invention is defined by the appended claims rather than the foregoing description, and therefore all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0046] Furthermore, it should be understood that although the present invention is described according to embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for secure access and synchronization of documents, characterized in that, Includes the following steps: S1. The user requests offline access to the target document, generates an offline permission chain, the server divides the target document into data blocks and generates a base hash list for the corresponding target document, binds the base hash list to the offline permission chain, and the server sends the encrypted document, offline permission chain, and base hash list to the client together. S2. After a user enters offline mode, the client automatically starts the full-process recursive verification of the offline permission chain. If the verification passes, the client decrypts the document and allows the user to perform the corresponding operation. S3. The client filters out the data blocks that have changed in content and removes the data blocks that have not changed, forming the basic differential content; The basic differential content is bound and encapsulated with the permission tracing information to obtain the differential package; S4. After the client regains network access, it uploads the locally generated compliance differential package to the server. After verification, it is merged with the server-side baseline document, the baseline hash list is updated, and the client permission chain and baseline data are refreshed after synchronization is completed.
2. The method for secure access and synchronization of documents according to claim 1, characterized in that, The offline permission chain is a chain-like encrypted structure, including a permission root node, a change node, and a revocation node. Each node is distinguished by its permission type field, and each node has a built-in parent node hash value. The parent node hash value is a digest value calculated by using the SHA-256 algorithm on the complete serialized content of the parent node. The permission root node at the head of the chain has no parent node, and its parent node hash value is agreed to be a fixed initial value. Each node forms a chain relationship based on its parent node hash value.
3. The method for secure access and synchronization of documents according to claim 2, characterized in that, The method for generating the baseline hash list is as follows: For each independent data block after partitioning, a rolling weak hash and a strong SHA hash are calculated separately. Based on the weak and strong hashes of all data blocks, a baseline hash list for the corresponding target document is generated. The strong SHA hashes of all data blocks are then aggregated and calculated again to obtain the root hash value of the baseline hash list, which serves as the unique data fingerprint of the entire document.
4. The method for secure access and synchronization of documents according to claim 3, characterized in that, The rolling weak hash is calculated using a fast hash algorithm; the SHA strong hash is calculated using a secure hash algorithm.
5. The method for secure access and synchronization of documents according to claim 4, characterized in that, The baseline hash list and the offline permission chain are jointly encrypted, and the binding signature is performed using the RSA asymmetric encryption algorithm. The specific steps are as follows: the root hash value of the baseline hash list and the tail node ID of the offline permission chain are concatenated into a signature plaintext in a fixed format. The server's private key is used to encrypt and sign the plaintext to generate a unique binding signature value. The signature value is stored together with the baseline hash list and the offline permission chain to establish a unique association between the data block and the offline permission chain.
6. The method for secure access and synchronization of documents according to claim 5, characterized in that, The offline permission chain undergoes a full-process recursive verification process, including verifying the integrity of the offline permission chain, verifying the legality of the offline permission chain signature, verifying the validity of permissions, and verifying operation permissions. Among these verifications, the integrity of the offline permission chain is also verified by checking the legality of the chain structure, confirming that there is one and only one permission root node located at the head of the chain, and that change nodes and revocation nodes are only appended to the tail of the chain. When verifying operation permissions, the type of effective node matched with the current trusted time is first determined. If it is a revocation node, the entire permission chain is deemed invalid. If it is a change node, the changed permissions shall prevail.
7. The method for secure access and synchronization of documents according to claim 6, characterized in that, The difference data block is defined as follows: the client starts file driver listening, intercepts user editing behaviors such as writing, modifying, and deleting documents in real time, locates the data block offset and range corresponding to the editing operation, extracts the data block and recalculates its rolling weak hash and SHA strong hash, and compares the new hash value with the baseline hash list issued in the online stage one by one. The data block whose content has changed is the difference data block.
8. The method for secure access and synchronization of documents according to claim 7, characterized in that, The differential packet includes: the content of the differential data block, the ID of the currently effective permission chain node, the local trusted timestamp of the editing time, the corresponding operation mask, and the permission chain signature.
9. The method for secure access and synchronization of documents according to claim 8, characterized in that, Before receiving the compliance differential packet uploaded by the client, the server first verifies whether there are any revocation or change nodes in the permission chain to confirm that the permission chain is in a valid state.
10. The method for secure access and synchronization of documents according to claim 9, characterized in that, After receiving the differential packet, the server performs two layers of strict verification: the first layer is permission compliance verification, which verifies whether the permission chain node bound to the differential packet is valid, whether the editing time is within the authorization window, and whether the operation type conforms to the permission mask; The second layer is for data integrity verification, which checks whether the differential block hash is normal and has not been tampered with.
