Enterprise document synchronization method and system, electronic device, and storage medium
By performing permission verification, content compliance verification, and version consistency verification in the enterprise document synchronization system, the problem of insufficient permission control and security audit in the enterprise environment is solved, and secure, efficient, traceable collaboration and consistent synchronization of documents are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YONYOU NETWORK TECH CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies lack sophisticated access control and content security review mechanisms in enterprise environments with multiple collaborators, making it difficult to prevent unauthorized access or the spread of sensitive information and failing to meet enterprise-level security and compliance management needs.
By receiving operation requests from clients on the server side, performing permission verification, content compliance verification, and version consistency verification, document synchronization is only performed after ensuring that the operation request is legal, compliant, and version consistent. Distributed locks and transaction queues are used to handle concurrent requests, and a custom sensitive information rule base is set for detection.
It enables secure and efficient document collaboration in multi-terminal and multi-user environments, ensuring document content consistency and compliance, preventing unauthorized operations and the spread of non-compliant content, and improving collaboration efficiency and system scalability.
Smart Images

Figure CN122173464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of enterprise office technology, and more specifically, to an enterprise document synchronization method and system, electronic device, and storage medium. Background Technology
[0002] Existing file synchronization solutions (such as personal cloud storage) are primarily geared towards individual users, focusing on backup and basic synchronization of files across multiple devices. However, when these technologies are applied to collaborative enterprise environments, they lack granular access control and content security review mechanisms, failing to prevent unauthorized access or the spread of sensitive information, and thus failing to meet enterprise-level security and compliance management needs. Summary of the Invention
[0003] The present invention aims to address the problem of the lack of sophisticated access control and content security review mechanisms in existing or related technologies.
[0004] Therefore, the first aspect of the present invention proposes an enterprise document synchronization method.
[0005] A second aspect of the present invention proposes an enterprise document synchronization system.
[0006] A third aspect of the present invention provides an electronic device.
[0007] A fourth aspect of the present invention provides a storage medium.
[0008] In view of this, according to a first aspect of the present invention, an enterprise document synchronization method is proposed for a server, wherein the enterprise document synchronization method includes: receiving an operation request for a target document from a first client, the operation request including adding, editing, or deleting; performing permission verification on the operation request according to the first client; performing content compliance verification on the operation request based on the successful permission verification; performing version consistency verification on the operation request based on the successful content compliance verification; and sending consent information to the first client based on the successful version consistency verification, and distributing the operation request to multiple second clients to process the target document in the first client according to the operation request, while simultaneously updating the target document in the multiple second clients.
[0009] The enterprise document synchronization method provided by this invention is mainly used on the server side, where the server can be located in the cloud. The enterprise document synchronization method mainly includes: firstly, receiving operation requests for a target document from a first client, where the operation requests include adding, editing, or deleting. That is, this invention is mainly used on the server side. When a user adds, edits, or deletes a target document locally (i.e., on the first client), the local machine sends the add request, edit request, or delete request to the server. Then, the first client verifies the permissions based on the operation requests, i.e., determining whether the user using the first client has permission to perform the operation corresponding to the operation request on the target document. If the user using the first client has permission to perform the operation corresponding to the operation request on the target document, the permission verification is deemed successful; if the user using the first client does not have permission to perform the operation corresponding to the operation request on the target document, the permission verification is deemed unsuccessful. After permission verification passes, the operation request undergoes content compliance verification. This involves determining whether the content of the new target document, obtained after processing the target document according to the operation request, is compliant. If the content of the new target document is compliant, the content compliance verification passes; otherwise, it fails. The compliance criteria are pre-set on the server side. Following content compliance verification, the operation request undergoes version consistency verification. This involves determining whether the version of the target document associated with the operation request is consistent with the current version of the target document stored in the cloud. This version consistency verification ensures that all clients see consistent document content when multiple people are collaboratively editing the same document. If the version of the target document associated with the operation request is consistent with the latest version of the target document stored in the cloud, the version consistency verification passes. If the version of the target document associated with the operation request is inconsistent with the current version of the target document stored in the cloud, the version consistency verification fails, meaning the operation request is for a previous version of the target document. When permission verification, content compliance verification, and version consistency verification all pass, an agreement message is sent to the first client, allowing the first client to process the target document according to the operation request, i.e., to add, edit, or delete the target document. Simultaneously, the server distributes the operation request to multiple second clients, updating the target document in each of these clients. If the target document already exists on the server, the server can also update the target document according to the operation request, and then send the processed target document to multiple second clients, thus ensuring the consistency of the target document across multiple terminals and user environments.This invention achieves secure and efficient document collaboration in a multi-terminal, multi-user environment by verifying the operation request's permissions, content compliance, and version consistency, and simultaneously synchronizing the target document in real time upon successful verification. This overcomes the problem of the lack of refined permission control and content security review mechanisms in related technologies.
[0010] In some technical solutions, optionally, the step of verifying the permission of the operation request based on the first client includes: determining the user identity information based on the login information of the first client; determining the target document identifier based on the target document; determining the operation permission of the first client on the target document based on the user identity information and the target document identifier; and verifying the permission of the operation request based on the operation permission.
[0011] In this technical solution, the steps for the first client to verify the operation request include: firstly, obtaining the user login information of the first client; then, determining the user identity information based on the user login information, and simultaneously determining the target document identifier based on the target document. Subsequently, the first client's operation permissions for the target document are determined based on the user identity information and the target document identifier. For example, a permission database can be obtained, which includes multiple user identity information, multiple document identifiers, and permission information associated with each user identity information and each document identifier. After obtaining the first client's user identity information and the target document identifier, these can be input into the permission database to determine the permission information associated with the first client's user identity information and the target document identifier, and then the first client's operation permissions for the target document are determined based on the permission information. After obtaining the first client's operation permissions for the target document, the operation permissions are matched with the operation request to complete the permission verification of the operation request. When the operation permissions match the operation request, the permission verification passes; when the operation request is not within the operation permissions, the permission verification fails. This invention verifies the permissions of operation requests based on user identity information and target document identifiers, thereby preventing unauthorized operations and ensuring the security and compliance of the target document.
[0012] In some technical solutions, optionally, the steps for performing content compliance verification on the operation request include: determining the filename of the folder containing the target document; determining the file content associated with the operation request; and matching a preset sensitive information rule base with the filename and file content respectively to perform content compliance verification on the operation request.
[0013] In this technical solution, the steps for content compliance verification of operation requests include: first, determining the filename of the folder containing the target document, and simultaneously determining the file content associated with the operation request. The file content associated with the operation request refers to the content that the first client wants to add, edit, or delete in the target document. Then, a preset sensitive information rule base is obtained. This sensitive information rule base is set on the server side and can be modified on the server side. After obtaining the sensitive information rule base, it is matched against the filename and file content respectively, i.e., determining whether the content in the sensitive information rule base includes the filename and file content. If they are included, the content compliance verification fails; otherwise, it passes. This invention, by setting a custom sensitive information rule base and performing sensitive information detection on the filename and file content to be synchronized before synchronization between the client and the cloud, prevents non-compliant content from being automatically synchronized to the cloud or from processing the target document when non-compliant content is detected. This avoids non-compliant content from entering the target document or being stored and disseminated in the cloud, thus meeting enterprise compliance requirements.
[0014] In some technical solutions, optionally, the step of performing version consistency verification on the operation request includes: obtaining the first version number of the target document carried in the operation request; obtaining the second version number of the target document in the current server; and comparing the first version number with the second version number to perform version consistency verification on the operation request.
[0015] In this technical solution, the step of performing version consistency verification on the operation request includes: firstly, obtaining the first version number of the target document carried in the operation request, where the first version number of the target document refers to the version number of the target document before processing. Simultaneously, obtaining the second version number of the target document currently stored on the server, i.e., the version number of the target document stored on the server at this moment. Then, comparing the first version number and the second version number, if the first version number and the second version number are the same, the version consistency verification passes; if the first version number and the second version number are different, it indicates that the target document in the first client is a previous version, and the version consistency verification fails. By performing version consistency verification, the eventual consistency of the target document is guaranteed.
[0016] In some technical solutions, optionally, after processing the target document in the first client according to the operation request, the steps include: generating a new document version number based on the processed target document; and storing the document version number on the server.
[0017] In this technical solution, after processing the target document according to the operation request, the steps include: generating a new document version number based on the processed target document, and then storing the new document version number on the server. Simultaneously, the first client and the operation time are also stored. By storing a snapshot of the new document version number, version number consistency verification can be performed, and historical version rollback, recovery, and difference comparison can be supported. The device identifier, operating user, and timestamp of the version source are also recorded, thereby achieving document content consistency and traceability.
[0018] In some technical solutions, optionally, when there are multiple operation requests, the steps of processing the target document in the first client according to the operation requests include: determining the priority attribute of each operation request; determining the processing order of multiple operation requests according to the priority attribute of each operation request and the state of the distributed lock; adding multiple operation requests to a transaction queue according to the processing order; and processing the target document sequentially according to the transaction queue.
[0019] In this technical solution, when there are multiple operation requests, the steps for processing the target document according to the operation requests include: first, determining the priority attribute of each operation request, i.e., determining the priority of the operation requests among multiple operation requests. Then, based on the priority attribute of each operation request and the state of the distributed lock, determining the processing order of the multiple operation requests. Subsequently, adding the multiple operation requests to the transaction queue in the processing order, and finally processing the target document according to the operation requests in the transaction queue. This invention, in scenarios where multiple people operate simultaneously, employs a distributed lock, transaction queue, and asynchronous task scheduling mechanism to process concurrent requests in an orderly manner, thereby improving synchronization speed, reducing resource contention, and achieving efficient real-time collaboration.
[0020] In some technical solutions, the enterprise document synchronization method may optionally include: when any one of the verifications—permission verification, content compliance verification, and version consistency verification—fails, determining the error type of the verification failure; determining the error information based on the error type and a preset error handling template; and feeding back the error information to the first client.
[0021] In this technical solution, the enterprise document synchronization method further includes: when any one of the verification processes—permission verification, content compliance verification, and version consistency verification—fails, the error type is determined, which can be a permission error, content error, or version error. Subsequently, a corresponding error message is generated based on the error type and a preset error handling template, including possible solutions. Finally, the error message is sent back to the first client. This invention improves the user experience by sending error messages to the first client when verification fails.
[0022] According to a second aspect of the present invention, an enterprise document synchronization system is proposed for a server, comprising: a first processing module for receiving an operation request for a target document from a first client, the operation request including adding, editing, or deleting; a second processing module for performing permission verification on the operation request based on the first client; a third processing module for performing content compliance verification on the operation request based on the successful permission verification; a fourth processing module for performing version consistency verification on the operation request based on the successful content compliance verification; and a fifth processing module for sending an agreement message to the first client based on the successful version consistency verification, and distributing the operation request to multiple second clients to process the target document in the first client according to the operation request, while simultaneously updating the target document in the multiple second clients.
[0023] The enterprise document synchronization system provided by this invention is mainly used on the server side, where the server can be located in the cloud. The enterprise document synchronization system mainly includes: a first processing module, a second processing module, a third processing module, a fourth processing module, and a fifth processing module. The first processing module first receives operation requests for the target document from a first client. These operation requests include adding, editing, or deleting. That is, this invention is mainly used on the server side. When a user adds, edits, or deletes the target document locally (on the first client), the local machine sends the add, edit, or delete request to the server. Subsequently, the second processing module verifies the permissions of the operation requests based on the first client's actions, determining whether the user of the first client has permission to perform the operation corresponding to the operation request on the target document. If the user of the first client has permission to perform the operation corresponding to the operation request on the target document, the permission verification is successful; otherwise, if the user of the first client does not have permission to perform the operation corresponding to the operation request on the target document, the permission verification is unsuccessful. After the permission verification passes, the third processing module performs a content compliance check on the operation request. This involves determining whether the content of the new target document, after processing according to the operation request, is compliant. If the content of the new target document is compliant, the content compliance check passes; otherwise, it fails. The compliance criteria are pre-set on the server side. Following the content compliance check, the fourth processing module performs a version consistency check on the operation request. This involves determining whether the version of the target document associated with the operation request is consistent with the current version of the target document stored in the cloud. This version consistency check ensures that when multiple users collaboratively edit the same document, all clients ultimately see the same document content. If the version of the target document associated with the operation request is consistent with the latest version of the target document stored in the cloud, the version consistency check passes. If the version of the target document associated with the operation request is inconsistent with the current version of the target document stored in the cloud, the version consistency check fails, meaning the operation request is for a previous version of the target document. When permission verification, content compliance verification, and version consistency verification all pass, the fifth processing module sends an agreement message to the first client, enabling the first client to process the target document according to the operation request, i.e., to add, edit, or delete the target document. Simultaneously, the server distributes the operation request to multiple second clients, updating the target document in each client. If the target document already exists on the server, the server can also update the target document according to the operation request, and then send the processed target document to multiple second clients, thus ensuring the consistency of the target document across multiple terminals and user environments.This invention achieves secure and efficient document collaboration in a multi-terminal, multi-user environment by verifying the operation request's permissions, content compliance, and version consistency, and simultaneously synchronizing the target document in real time upon successful verification. This overcomes the problem of the lack of refined permission control and content security review mechanisms in related technologies.
[0024] According to a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the enterprise document synchronization method as described above.
[0025] The electronic device provided by this invention, when the processor executes the computer program, implements the steps of the above-mentioned enterprise document synchronization method, and can achieve the technical effects of any of the above technical solutions, which will not be elaborated here.
[0026] According to a fourth aspect of the invention, a storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the steps of the enterprise document synchronization method as described above.
[0027] The storage medium provided by this invention, when the computer program is executed by the processor, implements the steps of the above-mentioned enterprise document synchronization method, and can achieve the technical effects of any of the above technical solutions, which will not be elaborated here.
[0028] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0029] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0030] Figure 1 One of the flowcharts of an enterprise document synchronization method according to an embodiment of the present invention is shown;
[0031] Figure 2 This diagram illustrates a step in the enterprise document synchronization method of an embodiment of the present invention: verifying the permission of an operation request based on a first client.
[0032] Figure 3 This diagram illustrates a step in the enterprise document synchronization method of an embodiment of the present invention: performing content compliance verification on an operation request.
[0033] Figure 4 This diagram illustrates a step in the enterprise document synchronization method of an embodiment of the present invention: performing version consistency verification on an operation request.
[0034] Figure 5 This diagram illustrates a flow chart of an enterprise document synchronization method according to an embodiment of the present invention, following the step of processing a target document in a first client based on an operation request.
[0035] Figure 6 This is a flowchart illustrating the steps of processing a target document in a first client according to an operation request in an enterprise document synchronization method according to an embodiment of the present invention.
[0036] Figure 7 A second flowchart illustrating an embodiment of the enterprise document synchronization method of the present invention is shown.
[0037] Figure 8 A schematic diagram of the structure of an enterprise document synchronization system according to an embodiment of the present invention is shown. Detailed Implementation
[0038] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0040] Figure 1 One of the flowcharts of an enterprise document synchronization method according to an embodiment of the present invention is shown, wherein the enterprise document synchronization method includes:
[0041] Step 102: Receive an operation request for the target document from the first client. The operation request may include adding, editing, or deleting.
[0042] Step 104: Verify the permissions of the operation request based on the first client;
[0043] Step 106: Based on the successful permission verification, perform content compliance verification on the operation request;
[0044] Step 108: Based on the successful content compliance verification, perform version consistency verification on the operation request;
[0045] Step 110: Based on the successful version consistency check, send an agreement message to the first client and distribute the operation request to multiple second clients to process the target document in the first client according to the operation request, and at the same time update the target document in multiple second clients.
[0046] The enterprise document synchronization method provided by this invention is mainly used on the server side, where the server can be located in the cloud. The enterprise document synchronization method mainly includes: firstly, receiving operation requests for a target document from a first client, where the operation requests include adding, editing, or deleting. That is, this invention is mainly used on the server side. When a user adds, edits, or deletes a target document locally (i.e., on the first client), the local machine sends the add request, edit request, or delete request to the server. Then, the first client verifies the permissions based on the operation requests, i.e., determining whether the user using the first client has permission to perform the operation corresponding to the operation request on the target document. If the user using the first client has permission to perform the operation corresponding to the operation request on the target document, the permission verification is deemed successful; if the user using the first client does not have permission to perform the operation corresponding to the operation request on the target document, the permission verification is deemed unsuccessful. After permission verification passes, the operation request undergoes content compliance verification. This involves determining whether the content of the new target document, obtained after processing the target document according to the operation request, is compliant. If the content of the new target document is compliant, the content compliance verification passes; otherwise, it fails. The compliance criteria are pre-set on the server side. Following content compliance verification, the operation request undergoes version consistency verification. This involves determining whether the version of the target document associated with the operation request is consistent with the current version of the target document stored in the cloud. This version consistency verification ensures that all clients see consistent document content when multiple people are collaboratively editing the same document. If the version of the target document associated with the operation request is consistent with the latest version of the target document stored in the cloud, the version consistency verification passes. If the version of the target document associated with the operation request is inconsistent with the current version of the target document stored in the cloud, the version consistency verification fails, meaning the operation request is for a previous version of the target document. When permission verification, content compliance verification, and version consistency verification all pass, an agreement message is sent to the first client, allowing the first client to process the target document according to the operation request, i.e., to add, edit, or delete the target document. Simultaneously, the server distributes the operation request to multiple second clients, updating the target document in each of these clients. If the target document already exists on the server, the server can also update the target document according to the operation request, and then send the processed target document to multiple second clients, thus ensuring the consistency of the target document across multiple terminals and user environments.This invention achieves secure and efficient document collaboration in a multi-terminal, multi-user environment by verifying the operation request's permissions, content compliance, and version consistency, and simultaneously synchronizing the target document in real time upon successful verification. This overcomes the problem of the lack of refined permission control and content security review mechanisms in related technologies.
[0047] Figure 2 The diagram illustrates a flowchart of a step in an enterprise document synchronization method according to an embodiment of the present invention, wherein the step of verifying the permission of an operation request based on a first client includes:
[0048] Step 202: Determine the user's identity information based on the login information of the first client;
[0049] Step 204: Determine the target document identifier based on the target document;
[0050] Step 206: Determine the first client's operation permissions for the target document based on the user's identity information and the target document identifier;
[0051] Step 208: Verify the permissions of the operation request based on the operation permissions.
[0052] In this embodiment, the steps for the first client to verify the operation request include: firstly, obtaining the user login information of the first client; then, determining the user identity information based on the user login information, and simultaneously determining the target document identifier based on the target document. Subsequently, the first client's operation permissions for the target document are determined based on the user identity information and the target document identifier. For example, a permission database can be obtained, which includes multiple user identity information, multiple document identifiers, and permission information associated with each user identity information and each document identifier. After obtaining the first client's user identity information and the target document identifier, these can be input into the permission database to determine the permission information associated with the first client's user identity information and the target document identifier, and then the first client's operation permissions for the target document are determined based on the permission information. After obtaining the first client's operation permissions for the target document, the operation permissions are matched with the operation request to complete the permission verification of the operation request. When the operation permissions match the operation request, the permission verification passes; when the operation request is not within the operation permissions, the permission verification fails. This invention verifies the permissions of operation requests based on user identity information and target document identifiers, thereby preventing unauthorized operations and ensuring the security and compliance of the target document.
[0053] Figure 3The diagram illustrates a flowchart of a step in performing content compliance verification on an operation request in an enterprise document synchronization method according to an embodiment of the present invention. The step of performing content compliance verification on the operation request includes:
[0054] Step 302: Determine the filename of the folder containing the target document;
[0055] Step 304: Determine the file content associated with the operation request;
[0056] Step 306: Match the preset sensitive information rule base with the file name and file content respectively to perform content compliance verification on the operation request.
[0057] In this embodiment, the step of performing content compliance verification on the operation request includes: firstly, determining the filename of the folder containing the target document, and simultaneously determining the file content associated with the operation request. The file content associated with the operation request refers to the content that the first client wants to add, edit, or delete in the target document. Then, a preset sensitive information rule base is obtained. This sensitive information rule base is set on the server side and can be modified on the server side. After obtaining the sensitive information rule base, it is matched against the filename and file content respectively, i.e., determining whether the content in the sensitive information rule base includes both the filename and file content. If they are included, the content compliance verification fails; otherwise, it passes. This invention, by setting a custom sensitive information rule base and performing sensitive information detection on the filename and file content to be synchronized before synchronization between the client and the cloud, prevents non-compliant content from being automatically synchronized to the cloud or from processing the target document when non-compliant content is detected. This avoids non-compliant content from entering the target document or being stored and disseminated in the cloud, thus meeting enterprise compliance requirements.
[0058] Figure 4 The diagram illustrates a step in the enterprise document synchronization method of an embodiment of the present invention to perform version consistency verification on an operation request. The step of performing version consistency verification on the operation request includes:
[0059] Step 402: Obtain the first version number of the target document carried in the operation request;
[0060] Step 404: Obtain the second version number of the target document in the current server;
[0061] Step 406: Compare the first version number with the second version number to perform version consistency verification on the operation request.
[0062] In this embodiment, the step of performing version consistency verification on the operation request includes: firstly, obtaining the first version number of the target document carried in the operation request, wherein the first version number of the target document carried in the operation request refers to the version number of the target document before processing. Simultaneously, obtaining the second version number of the target document currently stored on the server, i.e., the version number of the target document stored on the server at this moment. Then, comparing the first version number and the second version number, if the first version number and the second version number are the same, the version consistency verification passes; if the first version number and the second version number are different, it indicates that the target document in the first client is a previous version, and the version consistency verification fails. By performing version consistency verification, the eventual consistency of the target document is ensured.
[0063] Figure 5 The diagram illustrates a flowchart of an enterprise document synchronization method according to an embodiment of the present invention, following the step of processing a target document according to an operation request. The step after processing the target document in a first client according to the operation request includes:
[0064] Step 502: Generate a new document version number based on the processed target document;
[0065] Step 504: Store the document version number on the server.
[0066] In this embodiment, after processing the target document according to the operation request, the process includes: generating a new document version number based on the processed target document, and then storing the new document version number on the server. Simultaneously, the first client and the operation time are also stored. By storing a snapshot of the new document version number, version number consistency verification can be performed, and historical version rollback, recovery, and difference comparison can be supported. The device identifier, operating user, and timestamp of the version source are also recorded, thereby achieving document content consistency and traceability.
[0067] Figure 6 The diagram illustrates a flowchart of a step in an enterprise document synchronization method according to an embodiment of the present invention, which involves processing a target document based on an operation request. The step of processing the target document in a first client according to the operation request includes:
[0068] Step 602: Determine the priority attribute of each operation request;
[0069] Step 604: Determine the processing order of multiple operation requests based on the priority attribute of each operation request and the state of the distributed lock;
[0070] Step 606: Add multiple operation requests to the transaction queue according to the processing order;
[0071] Step 608: Process the target documents sequentially according to the transaction queue.
[0072] In this embodiment, when there are multiple operation requests, the steps for processing the target document according to the operation requests include: first, determining the priority attribute of each operation request, i.e., determining the operation requests with higher priority and those with lower priority among the multiple operation requests. Then, based on the priority attribute of each operation request and the state of the distributed lock, determining the processing order of the multiple operation requests. Subsequently, adding the multiple operation requests to the transaction queue in the processing order, and finally processing the target document according to the operation requests in the transaction queue. This invention, in scenarios where multiple people operate simultaneously, employs a distributed lock, transaction queue, and asynchronous task scheduling mechanism to process concurrent requests in an orderly manner, thereby improving synchronization speed, reducing resource contention, and achieving efficient real-time collaboration.
[0073] Figure 7 The second schematic flowchart illustrates an embodiment of the enterprise document synchronization method of the present invention, wherein the enterprise document synchronization method further includes:
[0074] Step 702: If any of the permissions verification, content compliance verification, or version consistency verification fails, determine the error type of the verification failure;
[0075] Step 704: Determine the error information based on the error type and the preset error handling template;
[0076] Step 706: Send the error message to the first client.
[0077] In this embodiment, when there are multiple operation requests, the steps for processing the target document according to the operation requests include: first, determining the priority attribute of each operation request, i.e., determining the operation requests with higher priority and those with lower priority among the multiple operation requests. Then, based on the priority attribute of each operation request and the state of the distributed lock, determining the processing order of the multiple operation requests. Subsequently, adding the multiple operation requests to the transaction queue in the processing order, and finally processing the target document according to the operation requests in the transaction queue. This invention, in scenarios where multiple people operate simultaneously, employs a distributed lock, transaction queue, and asynchronous task scheduling mechanism to process concurrent requests in an orderly manner, thereby improving synchronization speed, reducing resource contention, and achieving efficient real-time collaboration.
[0078] The purpose of this invention is to provide a file synchronization method and system for enterprise-level document management. Through real-time synchronization, intelligent conflict detection, version control, permission verification, and content compliance review, it enables secure, efficient, and traceable collaboration of documents in a multi-terminal, multi-user environment, overcoming problems such as insufficient synchronization consistency, lack of permission and compliance control, and poor scalability in existing technologies.
[0079] To address data consistency issues, when a user adds, edits, or deletes a document on the client side, the client reports the operation information to the cloud synchronization module in real time via the event capture module. The cloud then persists the operation and distributes it to other clients. During multi-user collaboration, the system automatically determines whether there are conflicts by comparing document version numbers. When a conflict is detected, it uses a difference merging algorithm or a rule-based priority strategy to handle the issue, and generates a conflict prompt interface on the client side when necessary, allowing users to choose a solution. Furthermore, the system generates a corresponding version number and stores a snapshot each time a document is modified, supporting the rollback, recovery, and difference comparison of historical versions. It also records the device identifier, user, and timestamp of the version source, thereby achieving consistency and traceability of document content. Moreover, unlike file identifier (ID)-based matching methods, this invention uses a name-based matching mechanism for folder and file paths to avoid redundant folders due to path conflicts, thus ensuring the consistency of file path structure between the client and the cloud.
[0080] When addressing access control issues, this invention dynamically determines a user's access, editing, or sharing permissions based on their identity information and permission configuration during document synchronization and collaboration. Combined with encrypted transmission and log auditing mechanisms, it prevents unauthorized operations and ensures document security and compliance.
[0081] When addressing the issue of collaboration efficiency, this invention employs a distributed lock, transaction queue, and asynchronous task scheduling mechanism in scenarios where multiple people operate simultaneously. This mechanism processes concurrent requests in an orderly manner, thereby improving synchronization speed, reducing resource contention, and achieving efficient real-time collaboration.
[0082] To address content compliance issues, this invention establishes custom sensitive information detection rules. Before synchronization between the client and the cloud, the system performs sensitive information detection on the filenames and contents of the files to be synchronized. When non-compliant content is detected, it prevents automatic synchronization to the cloud and notifies the user, thereby preventing non-compliant content from being stored and disseminated in the cloud and meeting enterprise compliance requirements.
[0083] To address system scalability issues, this invention deploys conflict detection and synchronization verification logic uniformly on the server side. When a client performs document operations, it only needs to report the operation information to the server, which then performs conflict judgment and verification processing, and returns possible resolution options and error information. When adding or adjusting verification rules (such as conflict detection, permission policies, and sensitive word rules), only the server needs to be extended or updated; the client does not need to upgrade its version or modify its code, thereby achieving high scalability and flexibility of the system.
[0084] Figure 8 A schematic diagram of an enterprise document synchronization system according to an embodiment of the present invention is shown, wherein the enterprise document synchronization system 80 includes:
[0085] The first processing module 802 is used to receive operation requests for the target document from the first client, including adding, editing or deleting;
[0086] The second processing module 804 is used to perform permission verification on the operation request based on the first client.
[0087] The third processing module 806 is used to perform content compliance verification on the operation request based on the pass of permission verification.
[0088] The fourth processing module 808 is used to perform version consistency verification on operation requests based on the content compliance verification passing.
[0089] The fifth processing module 810 is used to send an agreement message to the first client based on the successful version consistency check, and distribute the operation request to multiple second clients to process the target document in the first client according to the operation request, while updating the target document in multiple second clients.
[0090] The enterprise document synchronization system 80 provided by this invention is mainly used on the server side, where the server can be located in the cloud. The enterprise document synchronization system 80 mainly includes: a first processing module 802, a second processing module 804, a third processing module 806, a fourth processing module 808, and a fifth processing module 810. The first processing module 802 first receives operation requests for the target document from a first client. These operation requests include adding, editing, or deleting. Since this invention is mainly used on the server side, when a user adds, edits, or deletes the target document locally (i.e., on the first client), the local machine sends the add, edit, and delete requests to the server. Subsequently, the second processing module 804 performs permission verification based on the operation requests from the first client, determining whether the user of the first client has permission to perform the operation corresponding to the operation request on the target document. If the user of the first client has permission to perform the operation corresponding to the operation request on the target document, the permission verification is successful; otherwise, if the user of the first client does not have permission to perform the operation corresponding to the operation request on the target document, the permission verification is unsuccessful. After the permission verification passes, the third processing module 806 performs a content compliance check on the operation request. This involves determining whether the content of the new target document, obtained after processing the target document according to the operation request, is compliant. If the content of the new target document is compliant, the content compliance check passes; otherwise, it fails. The compliance criteria are pre-set on the server side. After the content compliance check passes, the fourth processing module 808 performs a version consistency check on the operation request. This involves determining whether the version of the target document associated with the operation request is consistent with the current version of the target document stored in the cloud. This version consistency check ensures that when multiple users collaboratively edit the same document, all clients ultimately see the same document content. If the version of the target document associated with the operation request is consistent with the current (latest) version of the target document stored in the cloud, the version consistency check passes. If the version of the target document associated with the operation request is inconsistent with the current version of the target document stored in the cloud, the version consistency check fails, meaning the operation request is for a previous version of the target document. When the permission verification, content compliance verification, and version consistency verification all pass, the fifth processing module 810 sends an agreement message to the first client, enabling the first client to process the target document in its own file according to the operation request, i.e., to add, edit, or delete the target document. Simultaneously, the server distributes the operation request to multiple second clients, causing the target documents in these clients to be updated.When the target document exists on the server, the server can update the target document according to the operation request, and then send the processed target document to multiple second clients, thereby ensuring the consistency of the target document in multi-terminal and multi-user environments. This invention achieves secure and efficient document collaboration in multi-terminal and multi-user environments by performing permission verification, content compliance verification, and version consistency verification on operation requests, and simultaneously synchronizing the target document in real time upon successful verification. This overcomes the problem of lacking granular permission control and content security review mechanisms in related technologies.
[0091] In some embodiments, optionally, the second processing module 804 is specifically configured to: determine user identity information based on the login information of the first client; determine a target document identifier based on the target document; determine the first client's operation permissions for the target document based on the user identity information and the target document identifier; and perform permission verification on the operation request based on the operation permissions.
[0092] In this embodiment, the second processing module 804 is specifically used to first obtain the user login information of the first client, then determine the user identity information based on the user login information, and simultaneously determine the target document identifier based on the target document. Subsequently, the operation permissions of the first client on the target document are determined based on the user identity information and the target document identifier. For example, a permission database can be obtained, which includes multiple user identity information, multiple document identifiers, and permission information associated with each user identity information and each document identifier. After obtaining the user identity information and target document identifier of the first client, these can be input into the permission database to determine the permission information associated with the user identity information and the target document identifier, and then the operation permissions of the first client on the target document are determined based on the permission information. After obtaining the operation permissions of the first client on the target document, the operation permissions are matched with the operation request to complete the permission verification of the operation request. When the operation permissions match the operation request, the permission verification passes; when the operation request is not within the operation permissions, the permission verification fails. This invention verifies the permissions of operation requests based on user identity information and target document identifiers, thereby preventing unauthorized operations and ensuring the security and compliance of the target document.
[0093] In some embodiments, optionally, the third processing module 806 is specifically used to determine the file name of the folder where the target document is located; determine the file content associated with the operation request; and match the preset sensitive information rule base with the file name and file content respectively, so as to realize the content compliance verification of the operation request.
[0094] In this embodiment, the third processing module 806 is specifically used to first determine the filename of the folder containing the target document, and simultaneously determine the file content associated with the operation request. The file content associated with the operation request refers to the content that the first client wants to add, edit, or delete in the target document. Then, a preset sensitive information rule base is obtained. This sensitive information rule base is set on the server side and can be modified on the server side. After obtaining the sensitive information rule base, it is matched against the filename and file content respectively, i.e., it is determined whether the content in the sensitive information rule base includes both the filename and file content. If they are included, the content compliance check fails; if not, the content compliance check passes. This invention, by setting a custom sensitive information rule base and performing sensitive information detection on the filename and file content to be synchronized before synchronization between the client and the cloud, prevents non-compliant content from being automatically synchronized to the cloud or from processing the target document when non-compliant content is detected. This avoids non-compliant content from entering the target document or being stored and disseminated in the cloud, thus meeting enterprise compliance requirements.
[0095] In some embodiments, optionally, the fourth processing module 808 is specifically used to obtain the first version number of the target document carried in the operation request; obtain the second version number of the target document in the current server; and compare the first version number with the second version number to realize version consistency verification of the operation request.
[0096] In this embodiment, the fourth processing module 808 is specifically used to first obtain the first version number of the target document carried in the operation request, where the first version number of the target document carried in the operation request refers to the version number of the target document before processing. Simultaneously, it obtains the second version number of the target document currently stored on the server, that is, the version number of the target document stored on the server at this moment. Then, it compares the first version number with the second version number. If the first version number and the second version number are the same, the version consistency check passes; if the first version number and the second version number are different, it means that the target document in the first client is a previous version, and the version consistency check fails. By performing version consistency checks, the eventual consistency of the target document is ensured.
[0097] In some embodiments, the enterprise document synchronization system 80 may optionally include: a sixth processing module for generating a new document version number based on the processed target document; and a seventh processing module for storing the document version number on the server.
[0098] In this embodiment, the enterprise document synchronization system 80 further includes a sixth processing module and a seventh processing module. The sixth processing module generates a new document version number based on the processed target document, and the seventh processing module stores the new document version number on the server. Simultaneously, it stores the first client and the operation time. By storing a snapshot of the new document version number, version number consistency verification can be performed, and historical version rollback, recovery, and difference comparison can be supported. The system also records the device identifier, operating user, and timestamp of the version source, thereby achieving document content consistency and traceability.
[0099] In some embodiments, optionally, when there are multiple operation requests, the fifth processing module 810 is specifically used to determine the priority attribute of each operation request; determine the processing order of multiple operation requests based on the priority attribute of each operation request and the state of the distributed lock; add multiple operation requests to a transaction queue according to the processing order; and process the target document sequentially according to the transaction queue.
[0100] In this embodiment, when there are multiple operation requests, the fifth processing module 810 is specifically used to first determine the priority attribute of each operation request, that is, to determine the operation request with higher priority and the operation request with lower priority among multiple operation requests. Then, based on the priority attribute of each operation request and the state of the distributed lock, the processing order of the multiple operation requests is determined. Subsequently, the multiple operation requests are added to the transaction queue in the order of processing. Finally, the target document is processed in the order of the operation requests in the transaction queue. In the scenario of multiple people operating simultaneously, the present invention uses a distributed lock, a transaction queue, and an asynchronous task scheduling mechanism to process concurrent requests in an orderly manner, thereby improving the synchronization speed, reducing resource contention, and achieving efficient real-time collaboration.
[0101] In some embodiments, the enterprise document synchronization system 80 may optionally include: an eighth processing module, used to determine the error type of the verification failure when any one of the verifications—permission verification, content compliance verification, and version consistency verification—fails; a ninth processing module, used to determine the error information based on the error type and a preset error handling template; and a tenth processing module, used to feed back the error information to the first client.
[0102] In this embodiment, the business document synchronization system further includes an eighth processing module, a ninth processing module, and a tenth processing module. When any of the verifications—permission verification, content compliance verification, and version consistency verification—fail, the eighth processing module determines the error type, which can be a permission error, a content error, or a version error. Subsequently, the ninth processing module generates corresponding error information based on the error type and a preset error handling template, where the error information may include possible solutions. Finally, the tenth processing module sends the error information back to the first client. This invention improves the user experience by sending error information back to the first client when verification fails.
[0103] An electronic device according to an embodiment of the present invention includes a memory processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the enterprise document synchronization method as described above.
[0104] The electronic device provided by the present invention, when the processor executes the computer program, implements the steps of the above-described enterprise document synchronization method, and can achieve the technical effects of any of the above embodiments, which will not be repeated here.
[0105] One embodiment of the present invention provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the enterprise document synchronization method as described above.
[0106] The storage medium provided by this invention, when the computer program is executed by the processor, implements the steps of the above-described enterprise document synchronization method, and can achieve the technical effects of any of the above embodiments, which will not be repeated here.
[0107] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance, unless otherwise expressly specified and limited. The terms "connection," "installation," and "fixing," etc., should be interpreted broadly. For example, "connection" can mean a fixed connection, a detachable connection, or an integral connection; it can mean a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0108] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the 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.
[0109] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for synchronizing enterprise documents on a server-side basis, characterized in that, include: Receive an operation request for the target document from a first client, the operation request including adding, editing or deleting; The first client performs permission verification on the operation request. Based on the successful permission verification, the operation request undergoes content compliance verification. Based on the successful content compliance verification, a version consistency verification is performed on the operation request; Based on the successful version consistency check, an agreement message is sent to the first client, and the operation request is distributed to multiple second clients to process the target document in the first client according to the operation request, while simultaneously updating the target document in the multiple second clients.
2. The enterprise document synchronization method according to claim 1, characterized in that, The step of verifying the permission of the operation request based on the first client includes: The user's identity information is determined based on the login information of the first client; Determine the target document identifier based on the target document; The first client's operation permissions for the target document are determined based on the user identity information and the target document identifier. The operation request is validated based on the specified operation permissions.
3. The enterprise document synchronization method according to claim 1, characterized in that, The step of performing content compliance verification on the operation request includes: Determine the filename of the folder containing the target document; Determine the file content associated with the operation request; The preset sensitive information rule base is matched with the file name and the file content respectively to realize the content compliance verification of the operation request.
4. The enterprise document synchronization method according to claim 1, characterized in that, The step of performing version consistency verification on the operation request includes: Obtain the first version number of the target document carried in the operation request; Obtain the second version number of the target document within the current server; The first version number is compared with the second version number to perform version consistency verification on the operation request.
5. The enterprise document synchronization method according to any one of claims 1 to 4, characterized in that, After the step of processing the target document in the first client according to the operation request, the following is included: A new document version number is generated based on the processed target document; The document version number is stored on the server.
6. The enterprise document synchronization method according to any one of claims 1 to 4, characterized in that, When there are multiple operation requests, the step of processing the target document in the first client according to the operation requests includes: Determine the priority attribute for each of the operation requests; The processing order of multiple operation requests is determined based on the priority attribute of each operation request and the state of the distributed lock; Add multiple operation requests to the transaction queue according to the processing order; The target documents are processed sequentially according to the transaction queue.
7. The enterprise document synchronization method according to any one of claims 1 to 4, characterized in that, The enterprise document synchronization method also includes: If any one of the permission verification, content compliance verification, and version consistency verification fails, the error type of the verification failure shall be determined. The error information is determined based on the error type and the preset error handling template; The error message is then sent back to the first client.
8. An enterprise document synchronization system for server-side use, characterized in that, include: A first processing module is configured to receive an operation request for a target document from a first client, the operation request including adding, editing, or deleting; The second processing module is used to perform permission verification based on the operation request from the first client. The third processing module is used to perform content compliance verification on the operation request based on the successful permission verification. The fourth processing module is used to perform version consistency verification on the operation request based on the content compliance verification passing. The fifth processing module is used to send an agreement message to the first client based on the successful version consistency check, and distribute the operation request to multiple second clients to process the target document in the first client according to the operation request, while updating the target document in the multiple second clients.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the enterprise document synchronization method as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the enterprise document synchronization method as described in any one of claims 1 to 7.