Tree structure data authority management method and device, computer equipment and readable storage medium

By separating and managing business data and using sectional technology to integrate processing during interface calls, the problem of complexity and poor performance of data permission management in the existing technology is solved, and flexible and efficient tree structure data permission management is achieved .

CN118965402APending Publication Date: 2024-11-15SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411143647.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing data permission management methods closely couple business data and permission data, resulting in difficulty in data maintenance, poor performance and high code complexity, especially when the parent-child node permission relationship in tree structure data is complex.

Method used

By separating and managing business data and permission data, using the data query interface to query user access rights in the permission database, and querying target business data in the business database, the synthesis of business data and permission data is achieved when the interface is called using section technology. .

Benefits of technology

It effectively solves problems such as data maintenance difficulties, poor performance, and code complexity, improves the flexibility and efficiency of data permission management, and simplifies the permission synchronization update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118965402A_ABST
    Figure CN118965402A_ABST
Patent Text Reader

Abstract

The invention relates to a tree structure data authority management method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: receiving an access request of a user to a service database, and analyzing the access request to obtain a user identifier; calling a data query interface of the business database, and judging whether the data query interface has an authority label or not; under the condition that the permission label exists, querying the access permission of the user identifier in the permission database through the data query interface, and querying target business data in the permission in the business database according to the access permission; and returning the target business data to a user operation interface. By adopting the method, the service data and the authority distribution data of the tree structure can be separately stored, fusion processing of the service data and the authority data is realized during interface calling by utilizing the aspect technology, and the problems of difficulty in data maintenance, high code complexity and the like can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data authority management of computer information systems, and in particular to a tree-structured data authority management method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of information technology, information systems need to display different business data for different users due to business, position, authority and other requirements. In order to achieve this differential data display function, it is necessary to add permission management to tree structure data. Since tree structure data has a parent-child node relationship, the permission setting of each node is limited by the parent node permission. The parent node permission update needs to synchronize the child node permission data to ensure the correctness of the permission data.

[0003] However, existing data permission management methods often tightly couple business data and permission data. Permission data and business data are loaded through joint table association queries. As the amount of data increases, permission updates and data storage become more and more complicated, resulting in problems such as difficult data maintenance, poor performance, and high code complexity. Summary of the invention

[0004] Based on this, it is necessary to provide a tree-structured data permission management method, apparatus, computer equipment, computer-readable storage medium and computer program product that can separately manage business data and permission data in order to address the above technical problems.

[0005] In a first aspect, the present application provides a tree structure data rights management method, comprising:

[0006] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0007] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0008] Return the target business data to the user operation interface.

[0009] In one embodiment, it also includes:

[0010] Receive permission configuration request;

[0011] Parsing the permission configuration request to obtain the user ID, business data ID and permission type to be configured, where the permission type is one of public, inherited and custom;

[0012] Determining the access rights of the user identifier to be configured according to the permission type and the business data identifier;

[0013] The access rights of the user identification to be configured are added to the authority database.

[0014] In one embodiment, it also includes:

[0015] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request;

[0016] Based on the target operation, update the permissions database.

[0017] In one embodiment, a business database stores multiple business data, each business data corresponds to a node, and a tree structure is formed between the multiple nodes; the data operation request is a data deletion request, and based on the target operation, the permission database is updated, including:

[0018] Determine the target node corresponding to the target business data;

[0019] Query the target user ID that has access rights to the target node;

[0020] Remove the target user ID's access rights to the target node from the target user's access rights.

[0021] In one embodiment, a business database stores multiple business data, each business data corresponds to a node, and a tree structure is formed between the multiple nodes; the data operation request is a data movement request, and based on the target operation, the permission database is updated, including:

[0022] Determine the target node where the target business data is located;

[0023] Determine the parent node of the target node according to the position of the target node in the tree structure after it moves;

[0024] Query the target user ID that has access rights to the parent node;

[0025] Add access permissions for the target node in the target user ID's access permissions.

[0026] In one embodiment, it also includes:

[0027] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0028] In a second aspect, the present application further provides a tree structure data rights management device, comprising:

[0029] A receiving module is used to receive a user's access request to a business database, parse the access request, and obtain a user identifier. The business database stores business data in a tree structure.

[0030] The query module is used to call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user identifier in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0031] The return module is used to return the target business data to the user operation interface.

[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0033] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0034] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0035] Return the target business data to the user operation interface.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0037] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0038] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0039] Return the target business data to the user operation interface.

[0040] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0041] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0042] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0043] Return the target business data to the user operation interface.

[0044] The above-mentioned tree-structured data permission management method, device, computer equipment, computer-readable storage medium and computer program product first receive a user's access request to a business database, parse the access request and obtain a user ID; then call the data query interface of the business database and determine whether the data query interface has a permission tag; if there is a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights; finally, return the target business data to the user operation interface. By storing the business data and permission allocation data in a tree structure separately, and using aspect technology to realize the fusion processing of business data and permission data when calling the interface, it can effectively solve the problems of difficult data maintenance, poor performance, and high code complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0046] FIG1 is an application environment diagram of a tree structure data rights management method according to an embodiment;

[0047] Figure 2 A flowchart of a tree structure data authority management method in one embodiment;

[0048] Figure 3 A schematic diagram of a permission allocation page in an embodiment;

[0049] Figure 4is a schematic diagram of a permission label in one embodiment;

[0050] Figure 5 A schematic diagram of a data query process in another embodiment;

[0051] Figure 6 A structural block diagram of a tree structure data authority management device in an embodiment;

[0052] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The tree structure data permission management method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 receives the user's access request to the business database, parses the access request, and obtains the user identification; the server 104 calls the data query interface of the business database, and determines whether the data query interface has a permission label; in the case of a permission label, the access rights of the user identification are queried in the permission database through the data query interface, and the target business data within the permission is queried in the business database according to the access rights; the server 104 returns the target business data to the user operation interface. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0055] In an exemplary embodiment, Figure 2 As shown, a tree structure data rights management method is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and includes the following steps 202 to 206. Among them:

[0056] Step 202: Receive a user's access request to a business database, parse the access request, and obtain a user identifier. The business database stores business data in a tree structure.

[0057] Among them, the tree structure is a data structure, which is a finite set of one or more nodes.

[0058] The user ID is the unique identification code of the user.

[0059] Exemplarily, a user's access request to a business database is received, the access request is parsed, and a unique identification code of the user is obtained.

[0060] Step 204, call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user identifier in the permission database through the data query interface, and query the target business data within the permission in the business database based on the access rights.

[0061] Among them, an interface is a collection that defines a set of methods and property conventions, which is used to define the services that a class of objects can provide.

[0062] The permission tag is used to determine whether relevant permissions are required when using the interface query.

[0063] The permission database is used to store permission data. Access permission is a type of permission data. Optionally, permission data also includes deletion permission, move permission, etc.

[0064] Exemplarily, a data query interface of a business database is called to determine whether the query interface has a permission tag. If there is a permission tag, the access rights of the user identifier are queried in the permission database, and target business data to which the user has access rights is screened in the business database according to the access rights.

[0065] Step 206: Return the target business data to the user operation interface.

[0066] Among them, the user operation interface is the display interface of the device used by the user.

[0067] Exemplarily, the filtered target business data within the user's authority is returned to the display interface of the device used by the user.

[0068] In this embodiment, firstly, a user's access request to the business database is received, and the access request is parsed to obtain a user ID; then the data query interface of the business database is called, and it is determined whether the data query interface has a permission tag; if there is a permission tag, the access rights of the user ID are queried in the permission database through the data query interface, and the target business data within the permission is queried in the business database according to the access rights; finally, the target business data is returned to the user operation interface. By storing the tree-structured business data and the permission allocation data separately, and using the aspect technology to realize the fusion processing of business data and permission data when the interface is called, the problems of difficult data maintenance, poor performance, and high code complexity can be effectively solved.

[0069] In an exemplary embodiment, Figure 3 As shown, it also includes: receiving a permission configuration request; parsing the permission configuration request to obtain the user ID to be configured, the business data ID and the permission type, where the permission type is one of public, inherited and customized; determining the access rights of the user ID to be configured according to the permission type; and adding the access rights of the user ID to be configured to the permission database.

[0070] The business data identifier is a unique identifier of the business data.

[0071] Public means setting the business data corresponding to the business data identifier as public permission, and authorized users of the business data of the upper node can access this business data.

[0072] Among them, inheritance is to set the access rights of the business data corresponding to the business data identifier to the same as the rights of the parent business data, inherit the rights of the parent node, and the subordinate node has the same rights as the parent node.

[0073] Customization is to assign access rights to the business data corresponding to the business data identifier to a specified user. Only users who are assigned access rights can access the business data normally.

[0074] Exemplarily, a permission configuration request is received, parsed, and a configuration user ID, a business data ID, and a custom permission type are obtained. For the business data pointed to by the business data ID, permission to access the business data is allocated to the user pointed to by the specified user ID.

[0075] In this embodiment, when the permission setting of the upper-level business data is changed, the permission setting of the sub-business data that inherits the business data can be updated synchronously, making the setting of the user's permission more flexible.

[0076] In an exemplary embodiment, it also includes: receiving a data operation request from a user for business data within the authority, performing an authority check on the data operation request, and if the check passes, executing a target operation corresponding to the data operation request; and updating the authority database based on the target operation.

[0077] Optionally, the data operation request includes a query request, a data deletion request, a data movement request, and a data addition request, etc.

[0078] Exemplarily, a data operation request from a user for business data within the user's authority is received, the data operation request is parsed, and the user ID, operation request, and business data ID are obtained; based on the user ID, a check is made in the authority database as to whether the user has the authority to operate the relevant business data; if the check passes, a target operation corresponding to the data operation request is executed; based on the target operation, the authority database is updated using post-aspect technology.

[0079] In this embodiment, by parsing the operation data, the business data required for the operation and the user's authority data can be efficiently located.

[0080] In an exemplary embodiment, a business database stores multiple business data, each business data corresponds to a node, and the multiple nodes are in a tree structure; the data operation request is a data deletion request, and based on the target operation, the permission database is updated, including: determining the target node corresponding to the target business data; querying the target user ID with access rights to the target node; and deleting the access rights to the target node in the access rights of the target user ID.

[0081] The nodes are nodes of a tree structure.

[0082] Exemplarily, a data deletion request for business data within the user's authority is received, the data deletion request is parsed, and the user ID, the deletion request, and the business data ID are obtained; based on the user ID, a check is made in the authority database as to whether the user has the deletion authority for the relevant business data node; if the check passes, the target node corresponding to the target business data identified by the business data is deleted; based on the deleted target node, the post-aspect technology is used to synchronously delete the authority data of all users in the authority database including the target node.

[0083] In this embodiment, after deleting the target node, the permission data of all users including the target node in the permission database are synchronously deleted through the post-section technology, so that the permission data in the permission database can be effectively updated without affecting the business data.

[0084] In an exemplary embodiment, a business database stores a plurality of business data, each business data corresponds to a node, and a tree structure is formed between the plurality of nodes; the data operation request is a data move request, and based on the target operation, the permission database is updated, including: determining a target node where the target business data is located, and determining a parent node of the target node according to the position of the target node in the tree structure after the target node is moved; querying a target user identifier having access rights to the parent node;

[0085] Add access permissions for the target node in the target user ID's access permissions.

[0086] Exemplarily, a user's request to move business data within the authority is received, the data movement request is parsed, and the user identification, the movement request, and the business data identification are obtained; based on the user identification, it is checked in the authority database whether the user has the movement authority of the relevant business data node, and if the check is passed, the target node corresponding to the target business data of the business data identification is moved; according to the position of the target node in the tree structure after the movement, the parent node of the target node is determined, the target user identification with access rights to the parent node is queried, and the access rights to the target node are added to the access rights of the target user identification by using the post-aspect technology.

[0087] In this embodiment, by checking the user's authority to determine whether to execute the user's data movement request, malicious tampering of house data can be effectively prevented, thereby protecting the security of business data.

[0088] In an exemplary embodiment, the method further includes: when the data query interface does not have a permission tag, querying the corresponding business data in the business database; and returning the queried business data to the user operation interface.

[0089] Exemplarily, if the data query interface does not have a permission tag, there is no need to check the user's permissions, and the corresponding business data is directly queried in the business database, and all the queried business data is returned to the display interface of the device used by the user.

[0090] In this embodiment, access to certain business data does not require authority verification, so that users can query these business data conveniently and quickly, saving the system's time for querying data.

[0091] In an exemplary embodiment, Figure 4 The figure shows a schematic diagram of the permission labels of the tree structure operation interface. By using JAVA's custom annotations, permission labels are set for the operation interfaces of the tree structure business data, including: node update, node move, node delete, node query and other permission operation interfaces, to restrict users' operations on the tree structure business data nodes and protect data security.

[0092] In an exemplary embodiment, Figure 5The flowchart shown is a user access to business data. The user's query request to the business database is received, and the query request is parsed to obtain the user ID, query request and business data ID; the permission data of the user ID is queried in the permission database through the data query interface, and the data query interface of the business database is called to obtain the original data, that is, the business data corresponding to the business data ID; it is determined whether the data query interface has a permission label. In the case of a permission label, the business data to which the user has access rights is filtered from the original data according to the permission data, and the target business data is returned to the user operation interface. In the case of no permission label, the original data is directly returned to the user operation interface.

[0093] In an exemplary embodiment, a user's operation request for a business database is received, the operation request is parsed to obtain the user's unique identification code, and it is determined whether the relevant operation request interface contains a permission tag. If there is a permission tag, the user's permission is checked. When the operation request is a permission configuration request, the permission configuration request is parsed to obtain the configuration user ID, business data ID and custom permission type, and for the business data pointed to by the business data ID, the user pointed to by the specified user ID is assigned permission to access the business data. A plurality of business data are stored in the business database, each of which corresponds to a node, and a tree structure is formed between the plurality of nodes; when a user's data operation request for business data within the permission is received, the data operation request is parsed to obtain the user ID, operation request and business data ID; if the data operation request is a data deletion request, the data deletion request is parsed to obtain the user ID, operation request and business data ID; based on the user ID, it is checked in the permission database whether the user has the deletion permission for the relevant business data node, and if the check is passed, the target node corresponding to the target business data of the business data ID is deleted; according to the deleted target node, the post-cutting technology is used to synchronously delete the target node in the permission database All users of the target node include permission data; if the data operation request is a data movement request, then receive the user's data movement request for the business data within the permission, parse the data movement request, obtain the user ID, movement request, business data ID, and check whether the user has the movement permission of the relevant business data node in the permission database based on the user ID. If the check passes, then move the target node corresponding to the target business data of the business data ID, determine the parent node of the target node according to the position of the target node in the tree structure after the movement, query the target user ID with the access permission of the parent node, and use the post-cutting technology to add the access permission to the target node in the access permission of the target user ID. If there is a permission label, there is no need to check the user's permission, and the corresponding business data operation is performed directly in the business database, and the operation result of the business data is returned to the display interface of the device used by the user.

[0094] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] In an exemplary embodiment, Figure 6 As shown, a tree structure data rights management device is provided, including: a receiving module, a query module and a return module, wherein:

[0096] A receiving module is used to receive a user's access request to a business database, parse the access request, and obtain a user identifier. The business database stores business data in a tree structure.

[0097] The query module is used to call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user identifier in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0098] The return module is used to return the target business data to the user operation interface.

[0099] In one embodiment, it further includes:

[0100] Receive a permission configuration request; parse the permission configuration request to obtain a user ID to be configured, a business data ID and a permission type, wherein the permission type is one of public, inherited and customized; determine the access rights of the user ID to be configured according to the permission type and the business data ID; and add the access rights of the user ID to be configured to the permission database.

[0101] In one embodiment, it further includes:

[0102] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0103] In one embodiment, the query module includes:

[0104] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0105] In one embodiment, the query module includes:

[0106] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0107] In one embodiment, the query module further includes:

[0108] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0109] Each module in the tree structure data rights management device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0110] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business data and permission data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a tree structure data permission management method is implemented.

[0111] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0113] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0114] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0115] Return the target business data to the user operation interface.

[0116] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0117] Receive a permission configuration request; parse the permission configuration request to obtain a user ID to be configured, a business data ID and a permission type, wherein the permission type is one of public, inherited and customized; determine the access rights of the user ID to be configured according to the permission type and the business data ID; and add the access rights of the user ID to be configured to the permission database.

[0118] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0119] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0120] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0121] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0122] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0123] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0125] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0126] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0127] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0128] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0129] Return the target business data to the user operation interface.

[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0131] Receive a permission configuration request; parse the permission configuration request to obtain a user ID to be configured, a business data ID and a permission type, wherein the permission type is one of public, inherited and customized; determine the access rights of the user ID to be configured according to the permission type and the business data ID; and add the access rights of the user ID to be configured to the permission database.

[0132] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0133] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0134] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0135] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0137] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0139] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0140] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0141] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0142] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0143] Return the target business data to the user operation interface.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Receive a permission configuration request; parse the permission configuration request to obtain the user ID to be configured and the permission type, where the permission type is one of public, inherited, and customized; determine the access rights of the user ID to be configured based on the permission type; and add the access rights of the user ID to be configured to the permission database.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0151] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0153] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0154] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0155] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0156] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0157] Return the target business data to the user operation interface.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] Receive a permission configuration request; parse the permission configuration request to obtain a user ID to be configured, a business data ID and a permission type, wherein the permission type is one of public, inherited and customized; determine the access rights of the user ID to be configured according to the permission type and the business data ID; and add the access rights of the user ID to be configured to the permission database.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0168] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0169] Receive a user's access request to a business database, parse the access request, and obtain a user ID. The business database stores business data in a tree structure.

[0170] Call the data query interface of the business database and determine whether the data query interface has a permission tag; if it has a permission tag, query the access rights of the user ID in the permission database through the data query interface, and query the target business data within the permission in the business database according to the access rights;

[0171] Return the target business data to the user operation interface.

[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0173] Receive a permission configuration request; parse the permission configuration request to obtain the user ID to be configured and the permission type, where the permission type is one of public, inherited, and customized; determine the access rights of the user ID to be configured based on the permission type; and add the access rights of the user ID to be configured to the permission database.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] Receive data operation requests from users for business data within their permissions, perform permission checks on the data operation requests, and if the check passes, execute the target operation corresponding to the data operation request; based on the target operation, update the permission database.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0177] Determine the target node corresponding to the target business data; query the target user ID that has access rights to the target node; and delete the access rights to the target node from the access rights of the target user ID.

[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0179] Determine the target node where the target business data is located; determine the parent node of the target node according to the position of the target node in the tree structure after it is moved; query the target user ID with access rights to the parent node and add access rights to the target node in the access rights of the target user ID.

[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0181] When the data query interface does not have an authorization tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

[0182] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0183] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0184] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A tree structure data rights management method, characterized in that: The method comprises: Receiving a user's access request to a business database, parsing the access request, and obtaining a user identifier, wherein the business database stores business data in a tree structure; Calling a data query interface of a business database and determining whether the data query interface has a permission tag; if the data query interface has a permission tag, querying the permission database for the access rights of the user identifier through the data query interface, and querying the business database for target business data within the permission according to the access rights; The target business data is returned to the user operation interface.

2. The method according to claim 1, characterized in that The method further comprises: Receive permission configuration request; Parsing the permission configuration request to obtain the user ID, business data ID and permission type to be configured, where the permission type is one of public, inherited and custom; Determining the access rights of the user identifier to be configured according to the permission type and the business data identifier; The access rights of the user identification to be configured are added to the authority database.

3. The method according to claim 1, characterized in that The method further comprises: Receive a data operation request from a user for business data within the authority, perform an authority check on the data operation request, and if the check passes, execute a target operation corresponding to the data operation request; Based on the target operation, the rights database is updated.

4. The method according to claim 3, characterized in that The business database stores a plurality of business data, each business data corresponds to a node, and a tree structure is formed between the plurality of nodes; the data operation request is a data deletion request, and the updating of the permission database based on the target operation includes: Determine a target node corresponding to the target service data; Querying a target user ID having access rights to the target node; The access permission to the target node in the access permission of the target user identifier is deleted.

5. The method according to claim 3, characterized in that: The business database stores a plurality of business data, each business data corresponds to a node, and a tree structure is formed between the plurality of nodes; the data operation request is a data movement request, and the updating of the permission database based on the target operation includes: Determine the target node where the target service data is located; Determine a parent node of the target node according to the position of the target node in the tree structure after the target node moves; Querying a target user ID having access rights to the parent node; The access permission for the target node is added to the access permission of the target user identifier.

6. The method according to claim 1, characterized in that The method further comprises: When the data query interface does not have an authority tag, the corresponding business data is queried in the business database; and the queried business data is returned to the user operation interface.

7. A tree structure data rights management device, characterized in that: The device comprises: A receiving module, used for receiving a user's access request to a business database, parsing the access request, and obtaining a user identifier, wherein the business database stores business data in a tree structure; A query module, used to call a data query interface of a business database and determine whether the data query interface has a permission tag; if the data query interface has a permission tag, query the permission database for the access rights of the user identifier through the data query interface, and query the business database for target business data within the permission according to the access rights; The return module is used to return the target business data to the user operation interface.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.