A data processing method and device based on a document system

By creating a data table in the document system to store the number of processable nodes and updating the number of processable nodes on the node path during access control operations, the problem of inflexible and inaccurate access control in existing technologies is solved, thereby achieving flexibility and accuracy in access control and improving ease of use.

CN115758449BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2022-11-17
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing document system permission management methods are relatively fixed and cannot flexibly and accurately reflect the actual permission situation, resulting in inconvenience during use, especially when folder permission settings conflict with child node permissions, making it impossible to accurately control user operation permissions.

Method used

By creating a data table in the document system to store the number of nodes that can be processed for each node, and updating the number of nodes that can be processed on the target node path when an access control operation is detected, the system responds to requests based on the number of nodes that can be processed, thus achieving flexibility and accuracy in access control.

Benefits of technology

It improves the flexibility and accuracy of access control, solves the problems of inflexibility and inaccuracy in existing access control technologies, and enhances the convenience in actual use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115758449B_ABST
    Figure CN115758449B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and device based on a document system, the method comprising: creating a data table for the document system; wherein the data table stores a number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node comprises the number of processable nodes in the node itself and its child nodes; upon detecting a permission control operation on a target node in the document system, updating the number of processable nodes corresponding to all nodes in the node path of the target node; and responding to a request for the target node based on the number of processable nodes. Through the embodiments of the present application, the optimization of permission management in the document system is achieved, the permission situation of the upper node can be updated according to the permission situation of the lower node, the flexibility and accuracy of the permission management are improved, and the convenience in actual use is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method and apparatus based on a document system. Background Technology

[0002] For enterprises, there is usually a need for document management. For example, employees at all levels need to create, view, edit, transmit, share, and print documents in the enterprise. The document system can assign relevant roles to personnel, and different roles have different permissions, thereby controlling the operation of documents by personnel at all levels and ensuring the visibility and security of documents.

[0003] However, in document systems, the methods for managing permissions on documents or directories are relatively fixed. For example, for folders, the existing permission management methods are as follows: 1. When a folder is set to visible or invisible, all files within that folder simultaneously inherit the folder's permissions, becoming visible or invisible. 2. When a folder is set to visible or invisible, files within that folder do not inherit the folder's permissions; that is, the permissions are only valid for that folder. It is evident that because the existing permission management methods are relatively fixed, they cannot flexibly and accurately reflect the actual permission situation, leading to many inconveniences during use. Summary of the Invention

[0004] In view of the above problems, a data processing method and apparatus based on a document system are proposed to overcome or at least partially solve the above problems, comprising:

[0005] A data processing method based on a document system, the method comprising:

[0006] Create a data table for the document system; wherein the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes;

[0007] When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is updated; wherein, the node path where the target node is located is the path from the root node to the target node;

[0008] Based on the number of processable nodes, a response is made to the request for the target node.

[0009] Optionally, when an access control operation on a target node in the document system is detected, updating the number of processable nodes corresponding to all nodes in the node path where the target node is located includes:

[0010] When an authorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is increased.

[0011] When a deauthorization operation is detected on a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is reduced.

[0012] Optionally, the processable nodes include visible nodes, and the number of processable nodes includes the number of visible nodes;

[0013] The authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding a visible node operation, and copying a visible node operation;

[0014] The revocation of authorization operation includes any of the following: revoking visibility authorization, revoking download authorization, deleting a visible node, or moving a visible node.

[0015] Optionally, when the processable nodes are visible nodes and the number of processable nodes is the number of visible nodes, responding to the request for the target node based on the number of processable nodes includes:

[0016] When a query request is received for visible nodes under the target node, the number of visible nodes is determined to be non-zero among all nodes with the target node as the parent directory, and the authorized objects include nodes of all users or the current user, and then displayed.

[0017] Optionally, the processable node includes an operable node, and the number of processable nodes includes the number of operable nodes;

[0018] The authorization operation includes any one of the following: a movable authorization operation, or a deletable authorization operation;

[0019] The revocation of authorization includes any of the following: revoking the move authorization or revoking the delete authorization.

[0020] Optionally, when the processable node is an operable node and the number of processable nodes is the number of operable nodes, responding to the request for the target node based on the number of processable nodes includes:

[0021] Upon receiving an operation request for the target node, determine the number of all nodes with the target node as the parent directory, and respond to the operation request for the target node when the total number of all nodes equals the number of operable nodes.

[0022] Optionally, when the operation request is a move request, the operable node is a movable node, and the number of operable nodes is the number of movable nodes; when the operation request is a delete request, the operable node is a deleteable node, and the number of operable nodes is the number of deleteable nodes.

[0023] Optionally, the data table also stores atomic permission control information for each node in the document system, the atomic permission control information including detailed information for each permission control operation.

[0024] Optionally, the document system is a cloud-based document system, and the nodes in the document system include file nodes and directory nodes.

[0025] A data processing apparatus based on a document system, the apparatus comprising:

[0026] The data table creation module is used to create a data table for the document system; wherein, the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes;

[0027] The processable node count update module is used to update the processable node count of all nodes in the node path where the target node is located when an access control operation on a target node in the document system is detected; wherein, the node path where the target node is located is the path from the root node to the target node;

[0028] The request-response module is used to respond to requests for the target node based on the number of processable nodes.

[0029] The embodiments of the present invention have the following advantages:

[0030] In this embodiment of the invention, a data table is created for the document system. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes. When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the path of the target node is updated. Then, based on the number of processable nodes, a response is made to the request for the target node. This optimizes the access control management in the document system, enabling the updating of the access control status of upper-level nodes based on the access control status of lower-level nodes. This improves the flexibility and accuracy of access control management and enhances the convenience in actual use. Attached Figure Description

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

[0032] Figure 1a This is a schematic diagram of a node tree in a document system provided by an embodiment of the present invention;

[0033] Figure 1b This is a schematic diagram of a node tree in another document system provided by an embodiment of the present invention;

[0034] Figure 1c This is a schematic diagram of a visibility update provided in an embodiment of the present invention;

[0035] Figure 2 This is a flowchart of the steps of a data processing method based on a document system provided in an embodiment of the present invention;

[0036] Figure 3 This is a flowchart of another data processing method based on a document system provided in an embodiment of the present invention;

[0037] Figure 4 This is a flowchart of another data processing method based on a document system provided in an embodiment of the present invention;

[0038] Figure 5 This is a structural block diagram of a data processing device based on a document system provided in an embodiment of the present invention. Detailed Implementation

[0039] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0040] In the document system, the file system structure is a tree structure. Non-leaf nodes are stored as directories, and leaf nodes are stored as files. Directories can contain files or directories. There can be no limit to the number of files and directories contained in a directory, or a maximum limit can be set. The directory hierarchy can be set to unlimited or a maximum limit can be set.

[0041] like Figure 1aThe root node can include directory A, directory B, and file 1. Directory A can include file 2, directory A1, and directory A2. Directory B can include directory B1, directory B2, and file 3. Directory B2 can include file 4, file 5, and file 6.

[0042] Existing permission management methods fall into two categories: 1. When a folder is set to visible or invisible, all files within that folder inherit the folder's permissions, becoming visible or invisible. 2. When a folder is set to visible or invisible, files within that folder do not inherit the folder's permissions; these permissions only apply to the current folder. Because these existing permission management methods are relatively fixed and cannot flexibly and accurately reflect the actual permission situation (especially since parent nodes cannot adjust their own permissions based on the permissions granted to child nodes—for example, if a parent node is set to not be previewable while a child node is previewable, this creates a conflict), it leads to considerable inconvenience during use.

[0043] For example, when performing operations such as moving, copying, printing, downloading, and sharing authorization, it is necessary to ensure that the parent directory is previewable. For example, in Figure 1a In the example, directory B is set to be unpreviewable for user U1, but file 5 is set to be downloadable. Therefore, user U1 should be able to preview directory B -> directory B2 -> file 5, but other files and directories under directory B should not be previewable. This conflicts with the previous setting that directory B is unpreviewable for user U1. For example, in... Figure 1a If file 5 has its download permission revoked, then directory B2 should become unpreviewable. However, since file 3 is previewable, directory B remains previewable. This conflicts with the previous setting that directory B is unpreviewable for user U1.

[0044] In this embodiment of the invention, by adding visibility values ​​to each node of a document, it is used to indicate whether each document is visible when the user browses it, and to count the number of visible documents under a node (of course, it can also be the number of deleteable documents, movable documents, and downloadable documents), which facilitates the document management system's query and makes full use of the document system's read-heavy and write-light characteristics, making it more convenient for problem querying and index design.

[0045] Taking visibility as an example, we can increase the number of visible nodes for each node in the document system, such as... Figure 1b Each node is assigned a visibility value (i.e., the number of visible nodes). The number of visible nodes can be stored in the data table of the relevant node, as shown in Table 1 below:

[0046]

[0047] Table 1

[0048] When granting permissions to a file or directory, data is inserted into the table. The authorization affects the state of nodes along the path from the root to the current node, but not the state of child nodes. That is, authorizing a file or folder will insert or update the relevant data for all nodes along the path from the root to this node. Each row records the atomic permission authorization status of the tree containing the current node, and also adds a field for the visibility of the file or directory authorization.

[0049] 1. Initialize visibility table data

[0050] Initially invisible: Visible quantity is 0.

[0051] Initial visibility: The visibility of a file or directory is equal to the number of nodes.

[0052] Initialize to atomic permissions that depend on visibility: visibility is the number of nodes.

[0053] 2. Visibility Update

[0054] When performing authorization operations on files or directories, any authorization that relies on atomic permissions of visibility will cause a change in visibility. For example, granting someone download permission will increment the visibility of all nodes in the corresponding path directory by 1; if download permission is revoked, the visibility of all nodes in the corresponding path will decrease by 1. Figure 1c You can iterate through all nodes on the path. If there is a record for that node in the table, you can directly update the visibility of that node in the table. If there is no record for that node in the table, you can insert an initial visibility record.

[0055] When a file or directory becomes invisible: the visibility of all nodes on the path from the root to this node is reduced by 1;

[0056] When a file or directory becomes visible: the visibility of all nodes on the path from the root to this node is increased by 1;

[0057] New files or folders inherit the visibility of their nearest parent node: if they are not visible, their visibility is 0; if they are visible, the visibility of all nodes along the path from the root to this node is incremented by 1.

[0058] Deleting a file or directory: If the directory or file is not visible, it is deleted directly; if the directory or file is visible, the visibility of all nodes from the root node to this node is reduced.

[0059] Moving files or directories: Invisible files or directories do not need to be modified; for visible directories or files, the visibility of all nodes from the source root node to this node is reduced, and the visibility of all nodes from the target root node to this node is increased.

[0060] Copy files or directories: For invisible files or directories, no modification is required; for visible directories or files, the visibility of all nodes from the target root node to this node is increased.

[0061] 3. Visible directory search

[0062] By performing a join query on the file table and the visibility table, with the query conditions being "parent directory is the current directory, and the target audience is the current user ID, and the visibility is > 0", records that meet the conditions can be retrieved, and pagination and sorting can be performed.

[0063] For movable and deletable nodes, if any of their child nodes become immovable or imdeletable, the movable and deletable counts of nodes along the path from the root node to this node are decreased by 1. When performing move or delete operations, it can be determined by checking if the total number of nodes in the tree containing the node equals the movable and deletable counts. If the total number of nodes in the tree containing the node equals the movable and deletable counts, then the move or delete operation can be performed.

[0064] The embodiments of the present invention will be further described below:

[0065] Reference Figure 2 The diagram illustrates a flowchart of a data processing method based on a document system according to an embodiment of the present invention, which may specifically include the following steps:

[0066] Step 201: Create a data table for the document system; wherein the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes.

[0067] The processable nodes can include any of the following: visible nodes, deleteable nodes, movable nodes, and downloadable nodes. Correspondingly, the number of processable nodes can include any of the following: the number of visible nodes, the number of deleteable nodes, the number of movable nodes, and the number of downloadable nodes.

[0068] In a document system, nodes can include file nodes and directory nodes. Each file or directory can correspond to a node. If a directory contains files or directories, then the directory is the parent node, and the files or directories contained under it are the child nodes. All nodes can be organized into a tree structure, with non-leaf nodes stored as directories and leaf nodes stored as files.

[0069] For a document system, a data table can be created in the database, as shown in Table 1 above. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes.

[0070] In one embodiment of the present invention, since enterprise internal OA systems are migrating to the cloud, the document system is a cloud-based document system, i.e., a cloud document system.

[0071] In one embodiment of the present invention, the data table may also store atomic permission control information for each node in the document system. The atomic permission control information may include detailed information for each permission control operation, such as authorization type (organization, individual), authorized object ID, etc.

[0072] Step 202: When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is updated; wherein, the node path where the target node is located is the path from the root node to the target node.

[0073] When a user completes permission control operations on a target node (which can be a file node or a directory node) in a document system, the node path from the root node to the target node can be determined, and all nodes on that path can be identified. Then, the number of processable nodes corresponding to all nodes on the node path is updated in the data table. For example, if the target node is changed from visible to invisible, the number of visible nodes on all nodes on the node path from the root node to the target node will be reduced by 1.

[0074] In one embodiment of the present invention, the access control operation can be an authorization operation and a deauthorization operation. When an access control operation on a target node in the document system is detected, updating the number of processable nodes corresponding to all nodes in the node path where the target node is located can include:

[0075] When an authorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is increased; when a deauthorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decreased.

[0076] In the specific implementation, when an authorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is incremented by 1. When a deauthorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decremented by 1.

[0077] Regarding visibility:

[0078] In one embodiment of the present invention, the processable node may include visible nodes, the number of processable nodes may include the number of visible nodes, and the authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding visible node operation, and copying visible node operation.

[0079] In one embodiment of the present invention, the revocation of authorization operation includes any one of the following: revocation of visibility authorization operation, revocation of download authorization operation, deletion of visible node operation, and movement of visible node operation.

[0080] Specifically as follows:

[0081] When a file or directory becomes invisible: the visibility of all nodes on the path from the root to this node is reduced by 1;

[0082] When a file or directory becomes visible: the visibility of all nodes on the path from the root to this node is increased by 1;

[0083] New files or folders inherit the visibility of their nearest parent node: if they are not visible, their visibility is 0; if they are visible, the visibility of all nodes along the path from the root to this node is incremented by 1.

[0084] Deleting a file or directory: If the directory or file is not visible, it is deleted directly; if the directory or file is visible, the visibility of all nodes from the root node to this node is reduced.

[0085] Moving files or directories: Invisible files or directories do not need to be modified; for visible directories or files, the visibility of all nodes from the source root node to this node is reduced, and the visibility of all nodes from the target root node to this node is increased.

[0086] Copy files or directories: For invisible files or directories, no modification is required; for visible directories or files, the visibility of all nodes from the target root node to this node is increased.

[0087] Regarding operability (e.g., deletability, removability):

[0088] In one embodiment of the present invention, the processable node includes an operable node, the number of processable nodes includes the number of operable nodes, the operable node may include a deleteable node and a moveable node, and the number of processable nodes may include the number of deleteable nodes and the number of moveable nodes.

[0089] In one embodiment of the present invention, the authorization operation includes any one of the following: a movable authorization operation and a deleteable authorization operation; the cancellation authorization operation includes any one of the following: cancel the movable authorization operation and cancel the delete authorization operation.

[0090] Specifically, for movable and deletable items, if any child node becomes immovable or deletable, the movable and deletable items of the nodes on the path from the root node to this node are reduced by 1.

[0091] Step 203: Based on the number of processable nodes, respond to the request for the target node.

[0092] Once the number of processable nodes is obtained, requests for the target node can be responded to based on the number of processable nodes. These requests may include query requests for visible nodes, deletion requests for nodes, and movement requests for nodes. The response to each request can be based on the specific number of visible nodes, the number of movable nodes, and the number of deleteable nodes.

[0093] In one embodiment of the present invention, when the processable node is a visible node and the number of processable nodes is the number of visible nodes, responding to the request for the target node based on the number of processable nodes may include:

[0094] When a query request is received for visible nodes under the target node, the number of visible nodes is determined to be non-zero among all nodes with the target node as the parent directory, and the authorized objects include nodes of all users or the current user, and then displayed.

[0095] By performing a join query on the file table and the visibility table, with the query conditions being "parent directory is the current directory, and the target audience is the current user ID, and the visibility is > 0", records that meet the conditions can be retrieved, and pagination and sorting can be performed.

[0096] In one embodiment of the present invention, when the processable node is an operable node and the number of processable nodes is the number of operable nodes, responding to the request for the target node based on the number of processable nodes includes:

[0097] Upon receiving an operation request for the target node, determine the number of all nodes with the target node as the parent directory, and respond to the operation request for the target node when the total number of all nodes equals the number of operable nodes.

[0098] When performing move or delete operations, you can check if the total number of nodes in the tree containing the node is equal to the number of nodes that can be moved or deleted. If the total number of nodes in the tree containing the node is equal to the number of nodes that can be moved or deleted, then the move or delete operation can be performed.

[0099] In one embodiment of the present invention, when the operation request is a move request, the operable node is a movable node, and the number of operable nodes is the number of movable nodes; when the operation request is a delete request, the operable node is a deleteable node, and the number of operable nodes is the number of deleteable nodes.

[0100] In this embodiment of the invention, a data table is created for the document system. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes. When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the path of the target node is updated. Then, based on the number of processable nodes, a response is made to the request for the target node. This optimizes the access control management in the document system, enabling the updating of the access control status of upper-level nodes based on the access control status of lower-level nodes. This improves the flexibility and accuracy of access control management and enhances the convenience in actual use.

[0101] Reference Figure 3 The diagram illustrates a flowchart of another data processing method based on a document system according to an embodiment of the present invention, which may specifically include the following steps:

[0102] Step 301: Create a data table for the document system; wherein the data table stores the number of visible nodes corresponding to each node in the document system, and the number of visible nodes corresponding to each node includes the number of visible nodes in the node itself and its child nodes.

[0103] The processable nodes can include any of the following: visible nodes, deleteable nodes, movable nodes, and downloadable nodes. Correspondingly, the number of processable nodes can include any of the following: the number of visible nodes, the number of deleteable nodes, the number of movable nodes, and the number of downloadable nodes.

[0104] In a document system, nodes can include file nodes and directory nodes. Each file or directory can correspond to a node. If a directory contains files or directories, then the directory is the parent node, and the files or directories contained under it are the child nodes. All nodes can be organized into a tree structure, with non-leaf nodes stored as directories and leaf nodes stored as files.

[0105] For a document system, a data table can be created in the database, as shown in Table 1 above. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes.

[0106] In one embodiment of the present invention, since enterprise internal OA systems are migrating to the cloud, the document system is a cloud-based document system, i.e., a cloud document system.

[0107] In one embodiment of the present invention, the data table may also store atomic permission control information for each node in the document system. The atomic permission control information may include detailed information for each permission control operation, such as authorization type (organization, individual), authorized object ID, etc.

[0108] Step 302: When an access control operation on a target node in the document system is detected, the number of visible nodes corresponding to all nodes in the node path where the target node is located is updated; wherein, the node path where the target node is located is the path from the root node to the target node.

[0109] When a user completes permission control operations on a target node (which can be a file node or a directory node) in a document system, the node path from the root node to the target node can be determined, and all nodes on that path can be identified. Then, the number of processable nodes corresponding to all nodes on the node path is updated in the data table. For example, if the target node is changed from visible to invisible, the number of visible nodes on all nodes on the node path from the root node to the target node will be reduced by 1.

[0110] In one embodiment of the present invention, the access control operation can be an authorization operation and a deauthorization operation. When an access control operation on a target node in the document system is detected, updating the number of processable nodes corresponding to all nodes in the node path where the target node is located can include:

[0111] When an authorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is increased; when a deauthorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decreased.

[0112] In the specific implementation, when an authorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is incremented by 1. When a deauthorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decremented by 1.

[0113] Regarding visibility:

[0114] In one embodiment of the present invention, the processable node may include visible nodes, the number of processable nodes may include the number of visible nodes, and the authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding visible node operation, and copying visible node operation.

[0115] In one embodiment of the present invention, the revocation of authorization operation includes any one of the following: revocation of visibility authorization operation, revocation of download authorization operation, deletion of visible node operation, and movement of visible node operation.

[0116] Specifically as follows:

[0117] When a file or directory becomes invisible: the visibility of all nodes on the path from the root to this node is reduced by 1;

[0118] When a file or directory becomes visible: the visibility of all nodes on the path from the root to this node is increased by 1;

[0119] New files or folders inherit the visibility of their nearest parent node: if they are not visible, their visibility is 0; if they are visible, the visibility of all nodes along the path from the root to this node is incremented by 1.

[0120] Deleting a file or directory: If the directory or file is not visible, it is deleted directly; if the directory or file is visible, the visibility of all nodes from the root node to this node is reduced.

[0121] Moving files or directories: Invisible files or directories do not need to be modified; for visible directories or files, the visibility of all nodes from the source root node to this node is reduced, and the visibility of all nodes from the target root node to this node is increased.

[0122] Copy files or directories: For invisible files or directories, no modification is required; for visible directories or files, the visibility of all nodes from the target root node to this node is increased.

[0123] Regarding operability (e.g., deletability, removability):

[0124] In one embodiment of the present invention, the processable node includes an operable node, the number of processable nodes includes the number of operable nodes, the operable node may include a deleteable node and a moveable node, and the number of processable nodes may include the number of deleteable nodes and the number of moveable nodes.

[0125] In one embodiment of the present invention, the authorization operation includes any one of the following: a movable authorization operation and a deleteable authorization operation; the cancellation authorization operation includes any one of the following: cancel the movable authorization operation and cancel the delete authorization operation.

[0126] Specifically, for movable and deletable items, if any child node becomes immovable or deletable, the movable and deletable items of the nodes on the path from the root node to this node are reduced by 1.

[0127] Step 303: When a query request for visible nodes under the target node is received, determine that the number of visible nodes is non-zero among all nodes with the target node as the parent directory, and that the authorized objects include nodes of all users or the current user, and then display them.

[0128] By performing a join query on the file table and the visibility table, with the query conditions being "parent directory is the current directory, and the target audience is the current user ID, and the visibility is > 0", records that meet the conditions can be retrieved, and pagination and sorting can be performed.

[0129] Reference Figure 4 The diagram illustrates a flowchart of another data processing method based on a document system according to an embodiment of the present invention, which may specifically include the following steps:

[0130] Step 401: Create a data table for the document system; wherein the data table stores the number of operable nodes corresponding to each node in the document system, and the number of operable nodes corresponding to each node includes the number of operable nodes in the node itself and its child nodes.

[0131] The processable nodes can include any of the following: visible nodes, deleteable nodes, movable nodes, and downloadable nodes. Correspondingly, the number of processable nodes can include any of the following: the number of visible nodes, the number of deleteable nodes, the number of movable nodes, and the number of downloadable nodes.

[0132] In a document system, nodes can include file nodes and directory nodes. Each file or directory can correspond to a node. If a directory contains files or directories, then the directory is the parent node, and the files or directories contained under it are the child nodes. All nodes can be organized into a tree structure, with non-leaf nodes stored as directories and leaf nodes stored as files.

[0133] For a document system, a data table can be created in the database, as shown in Table 1 above. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes.

[0134] In one embodiment of the present invention, since enterprise internal OA systems are migrating to the cloud, the document system is a cloud-based document system, i.e., a cloud document system.

[0135] In one embodiment of the present invention, the data table may also store atomic permission control information for each node in the document system. The atomic permission control information may include detailed information for each permission control operation, such as authorization type (organization, individual), authorized object ID, etc.

[0136] Step 402: When an access control operation on a target node in the document system is detected, the number of operable nodes corresponding to all nodes in the node path where the target node is located is updated; wherein, the node path where the target node is located is the path from the root node to the target node.

[0137] When a user completes permission control operations on a target node (which can be a file node or a directory node) in a document system, the node path from the root node to the target node can be determined, and all nodes on that path can be identified. Then, the number of processable nodes corresponding to all nodes on the node path is updated in the data table. For example, if the target node is changed from visible to invisible, the number of visible nodes on all nodes on the node path from the root node to the target node will be reduced by 1.

[0138] In one embodiment of the present invention, the access control operation can be an authorization operation and a deauthorization operation. When an access control operation on a target node in the document system is detected, updating the number of processable nodes corresponding to all nodes in the node path where the target node is located can include:

[0139] When an authorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is increased; when a deauthorization operation for a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decreased.

[0140] In the specific implementation, when an authorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is incremented by 1. When a deauthorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is decremented by 1.

[0141] Regarding visibility:

[0142] In one embodiment of the present invention, the processable node may include visible nodes, the number of processable nodes may include the number of visible nodes, and the authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding visible node operation, and copying visible node operation.

[0143] In one embodiment of the present invention, the revocation of authorization operation includes any one of the following: revocation of visibility authorization operation, revocation of download authorization operation, deletion of visible node operation, and movement of visible node operation.

[0144] Specifically as follows:

[0145] When a file or directory becomes invisible: the visibility of all nodes on the path from the root to this node is reduced by 1;

[0146] When a file or directory becomes visible: the visibility of all nodes on the path from the root to this node is increased by 1;

[0147] New files or folders inherit the visibility of their nearest parent node: if they are not visible, their visibility is 0; if they are visible, the visibility of all nodes along the path from the root to this node is incremented by 1.

[0148] Deleting a file or directory: If the directory or file is not visible, it is deleted directly; if the directory or file is visible, the visibility of all nodes from the root node to this node is reduced.

[0149] Moving files or directories: Invisible files or directories do not need to be modified; for visible directories or files, the visibility of all nodes from the source root node to this node is reduced, and the visibility of all nodes from the target root node to this node is increased.

[0150] Copy files or directories: For invisible files or directories, no modification is required; for visible directories or files, the visibility of all nodes from the target root node to this node is increased.

[0151] Regarding operability (e.g., deletability, removability):

[0152] In one embodiment of the present invention, the processable node includes an operable node, the number of processable nodes includes the number of operable nodes, the operable node may include a deleteable node and a moveable node, and the number of processable nodes may include the number of deleteable nodes and the number of moveable nodes.

[0153] In one embodiment of the present invention, the authorization operation includes any one of the following: a movable authorization operation and a deleteable authorization operation; the cancellation authorization operation includes any one of the following: cancel the movable authorization operation and cancel the delete authorization operation.

[0154] Specifically, for movable and deletable items, if any child node becomes immovable or deletable, the movable and deletable items of the nodes on the path from the root node to this node are reduced by 1.

[0155] Step 403: Upon receiving an operation request for the target node, determine the number of all nodes with the target node as the parent directory, and respond to the operation request for the target node when the total number of all nodes equals the number of operable nodes.

[0156] When performing move or delete operations, you can check if the total number of nodes in the tree containing the node is equal to the number of nodes that can be moved or deleted. If the total number of nodes in the tree containing the node is equal to the number of nodes that can be moved or deleted, then the move or delete operation can be performed.

[0157] In one embodiment of the present invention, when the operation request is a move request, the operable node is a movable node, and the number of operable nodes is the number of movable nodes.

[0158] In one embodiment of the present invention, when the operation request is a deletion request, the operable node is a deleteable node, and the number of operable nodes is the number of deleteable nodes.

[0159] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0160] Reference Figure 5 The diagram illustrates a structural schematic of a data processing device based on a document system according to an embodiment of the present invention, which may specifically include the following modules:

[0161] The data table creation module 501 is used to create a data table for the document system; wherein, the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes.

[0162] The processable node count update module 502 is used to update the processable node count of all nodes in the node path where the target node is located when an access control operation on the target node in the document system is detected; wherein, the node path where the target node is located is the path from the root node to the target node.

[0163] The request response module 503 is used to respond to requests for the target node based on the number of processable nodes.

[0164] In one embodiment of the present invention, the processable node count update module 502 includes:

[0165] The quantity increase submodule is used to increase the number of processable nodes corresponding to all nodes in the node path where the target node is located when an authorization operation for the target node is detected in the document system.

[0166] The quantity reduction submodule is used to reduce the number of processable nodes corresponding to all nodes in the node path where the target node is located when a deauthorization operation is detected on the target node in the document system.

[0167] In one embodiment of the present invention, the processable nodes include visible nodes, and the number of processable nodes includes the number of visible nodes;

[0168] The authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding a visible node operation, and copying a visible node operation;

[0169] The revocation of authorization operation includes any of the following: revoking visibility authorization, revoking download authorization, deleting a visible node, or moving a visible node.

[0170] In one embodiment of the present invention, when the processable nodes are visible nodes and the number of processable nodes is the number of visible nodes, the request response module 503 includes:

[0171] The query request response submodule is used to, when receiving a query request for visible nodes under the target node, determine that the number of visible nodes is not zero among all nodes with the target node as the parent directory, and that the authorized objects include nodes of all users or the current user, and then display them.

[0172] In one embodiment of the present invention, the processable node includes an operable node, and the number of processable nodes includes the number of operable nodes;

[0173] The authorization operation includes any one of the following: a movable authorization operation, or a deletable authorization operation;

[0174] The revocation of authorization includes any of the following: revoking the move authorization or revoking the delete authorization.

[0175] In one embodiment of the present invention, when the processable node is an operable node and the number of processable nodes is the number of operable nodes, the request response module 503 includes:

[0176] The operation request response submodule is used to determine the number of all nodes with the target node as the parent directory when an operation request for the target node is received, and to respond to the operation request for the target node when the number of all nodes is equal to the number of operable nodes.

[0177] In one embodiment of the present invention, when the operation request is a move request, the operable node is a movable node, and the number of operable nodes is the number of movable nodes; when the operation request is a delete request, the operable node is a deleteable node, and the number of operable nodes is the number of deleteable nodes.

[0178] In one embodiment of the present invention, the data table further stores atomic permission control information for each node in the document system, the atomic permission control information including detailed information for each permission control operation.

[0179] In one embodiment of the present invention, the document system is a cloud-based document system, and the nodes in the document system include file nodes and directory nodes.

[0180] In this embodiment of the invention, a data table is created for the document system. The data table stores the number of processable nodes corresponding to each node in the document system. The number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes. When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the path of the target node is updated. Then, based on the number of processable nodes, a response is made to the request for the target node. This optimizes the access control management in the document system, enabling the updating of the access control status of upper-level nodes based on the access control status of lower-level nodes. This improves the flexibility and accuracy of access control management and enhances the convenience in actual use.

[0181] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described data processing method based on a document system.

[0182] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described data processing method based on a document system.

[0183] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0184] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0185] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0186] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0187] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0188] These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable terminal equipment, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0189] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0190] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.

[0191] The above provides a detailed description of a data processing method and apparatus based on a document system. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A data processing method based on a document system, characterized in that, The method includes: Create a data table for the document system; wherein the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes; When an access control operation on a target node in the document system is detected, the number of processable nodes corresponding to all nodes in the node path where the target node is located is updated; wherein, the node path where the target node is located is the path from the root node to the target node; Based on the number of processable nodes, respond to requests for the target node; The step of updating the number of processable nodes corresponding to all nodes in the node path where the target node is located when an access control operation on a target node in the document system is detected includes: When an authorization operation is detected for a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is increased. When a deauthorization operation is detected on a target node in the document system, the number of processable nodes corresponding to all nodes in the node path where the target node is located is reduced.

2. The method according to claim 1, characterized in that, The processable nodes include visible nodes, and the number of processable nodes includes the number of visible nodes; The authorization operation includes any one of the following: visible authorization operation, downloadable authorization operation, adding a visible node operation, and copying a visible node operation; The revocation of authorization operation includes any of the following: revoking visibility authorization, revoking download authorization, deleting a visible node, or moving a visible node.

3. The method according to any one of claims 1 or 2, characterized in that, When the processable nodes are visible nodes and the number of processable nodes is the number of visible nodes, responding to the request for the target node based on the number of processable nodes includes: When a query request is received for visible nodes under the target node, the number of visible nodes is determined to be non-zero among all nodes with the target node as the parent directory, and the authorized objects include nodes of all users or the current user, and then displayed.

4. The method according to claim 1, characterized in that, The processable node includes the operable node, and the number of processable nodes includes the number of operable nodes; The authorization operation includes any one of the following: a movable authorization operation, or a deletable authorization operation; The revocation of authorization includes any of the following: revoking the move authorization or revoking the delete authorization.

5. The method according to claim 1 or 4, characterized in that, When the processable node is an operable node and the number of processable nodes is the number of operable nodes, responding to the request for the target node based on the number of processable nodes includes: Upon receiving an operation request for the target node, determine the number of all nodes with the target node as the parent directory, and respond to the operation request for the target node when the total number of all nodes equals the number of operable nodes.

6. The method according to claim 5, characterized in that, When the operation request is a move request, the operable node is a movable node, and the number of operable nodes is the number of movable nodes; when the operation request is a delete request, the operable node is a deleteable node, and the number of operable nodes is the number of deleteable nodes.

7. The method according to claim 1, characterized in that, The data table also stores atomic permission control information for each node in the document system, including detailed information for each permission control operation.

8. The method according to claim 1, characterized in that, The document system is a cloud-based document system, and the nodes in the document system include file nodes and directory nodes.

9. A data processing device based on a document system, characterized in that, The device includes: The data table creation module is used to create a data table for the document system; wherein, the data table stores the number of processable nodes corresponding to each node in the document system, and the number of processable nodes corresponding to each node includes the number of processable nodes in the node itself and its child nodes; The processable node count update module is used to update the processable node count of all nodes in the node path where the target node is located when an access control operation on a target node in the document system is detected; wherein, the node path where the target node is located is the path from the root node to the target node; The request-response module is used to respond to requests for the target node based on the number of processable nodes; The module for updating the number of processable nodes further includes: The quantity increase submodule is used to increase the number of processable nodes corresponding to all nodes in the node path where the target node is located when an authorization operation for the target node is detected in the document system. The quantity reduction submodule is used to reduce the number of processable nodes corresponding to all nodes in the node path where the target node is located when a deauthorization operation is detected on the target node in the document system.