Data permission matching method and device

By determining the data permission identifier in the data permission tree and matching it with the user ID, the problem of slow matching process in traditional data permission management is solved, and the function of quickly judging user operation permissions is realized, improving the user experience.

CN118898077APending Publication Date: 2024-11-05ISOFTSTONE SMART DATA TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410902737.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In traditional data permission management, the matching process between user permission identification and data permission identification is slow, resulting in inefficient users when operating data.

Method used

Through the pre-constructed data permission tree, the data permission identification of the target data is determined, and the user's object identification is matched with the data permission identification. If the match is successful, the user is allowed to operate the data. The object identification is composed of the sub-authority identification, and each sub-authority identification is The number of identification bits is the same as the node permission identifier, and the number corresponds to the number of node permission identifiers.

Benefits of technology

It realizes the right to quickly determine whether the user has the right to operate the target data, and improves the user's user experience and operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898077A_ABST
    Figure CN118898077A_ABST
Patent Text Reader

Abstract

The invention discloses a data permission matching method and device. According to the technical scheme, the target data to be operated by the first object is determined, the data permission identifier of the target data is determined based on the pre-constructed data permission tree, the object identifier of the first object is matched with the data permission identifier of the target data, and if matching succeeds, the first object is allowed to operate the target data, so that the target data operation is completed. The object identifier is composed of sub-permission identifiers, the identifier digits of the sub-permission identifiers are the same, the identifier digits of the sub-permission identifiers are the same as the identifier digits of the node permission identifiers, and the number of the sub-permission identifiers corresponding to each object identifier is the same as the number of the node permission identifiers of the data permission identifier; when whether the first object can operate the target data or not is judged, whether the first object has the operation authority for the target data or not can be quickly judged, so that the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data permission matching method and device. Background Art

[0002] In traditional data permission management, each piece of data is often labeled with its data permission. However, when the same user has multiple permission units, the permission point identifiers of a large amount of data must be fully matched with the permission set identifier of the current individual before the user is allowed to use the data normally. This results in a slow matching process and difficulty in improving efficiency. Summary of the invention

[0003] The present invention provides a data permission matching method and device to solve the problem that when judging permissions, the matching process between user permission identifiers and data permission identifiers is slow and difficult to improve efficiency.

[0004] According to one aspect of the present invention, a data permission matching method is provided, the method comprising:

[0005] Determining target data to be operated by the first object;

[0006] Based on the pre-built data permission tree, determine the data permission identifier of the target data. Each node in the data permission tree contains a node permission identifier. The node permission identifiers in the same layer of nodes are different. The data permission identifier is composed of node permission identifiers. The data is associated with the nodes in the data permission tree.

[0007] The object identifier of the first object is matched with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, and the number of identification bits of each sub-permission identifier is the same. The number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

[0008] According to another aspect of the present invention, a data authority matching device is provided, the device comprising:

[0009] A target data determination module, used to determine the target data to be operated by the first object;

[0010] A data identification acquisition module is used to determine the data permission identification of the target data based on a pre-built data permission tree. Each node in the data permission tree contains a node permission identification. The node permission identifications in the same layer of nodes are different. The data permission identification is composed of the node permission identifications. The data is associated with the nodes in the data permission tree.

[0011] A permission determination module is used to match the object identifier of the first object with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, each sub-permission identifier has the same number of identification bits, the number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the data authority matching method of any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data permission matching method of any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention determines the target data to be operated by the first object, determines the data permission identifier of the target data based on a pre-built data permission tree, and matches the object identifier of the first object with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate the target data. The object identifier is composed of sub-permission identifiers, and the number of identification bits of each sub-permission identifier is the same. The number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier. When judging whether the first object can operate the target data, it is possible to quickly judge whether the first object has the permission to operate the target data, thereby improving the user experience.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a data authority matching method provided according to the first embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a data permission tree applicable to an embodiment of the present invention;

[0022] Figure 3 is a flow chart of another data authority matching method provided according to the second embodiment of the present invention;

[0023] Figure 4 A schematic diagram of an object organization tree applicable to an embodiment of the present invention;

[0024] Figure 5 is a flowchart of another data authority matching method provided according to Embodiment 3 of the present invention;

[0025] Figure 6 is a structural diagram of a data authority matching device provided according to a fourth embodiment of the present invention;

[0026] Figure 7 It is a structural diagram of an electronic device for implementing the data authority matching method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1 A flowchart of a data authority matching method is provided for the first embodiment of the present invention. This embodiment can be applied to the case where when a user operates data, it is determined whether the user has the authority to operate the data. The method can be executed by a data authority matching device. The data authority matching device can be implemented in the form of hardware and / or software. The data authority matching device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0031] S110: Determine target data to be operated by the first object.

[0032] The first object may be an object that needs to operate on the target data. The data operations of the present application at least include data operation types such as adding, deleting, modifying and checking.

[0033] Traditional methods often assign a specific permission value to the first object in advance, and also assign a specific permission value to the target data. When the first object needs to operate the target data, the permission value pre-assigned to the first object is compared with the permission value of the target data to determine whether the first object has the permission to operate the target data.

[0034] However, during the comparison process, the permission values ​​are often compared completely, resulting in slow comparison results and delayed permission determination.

[0035] S120: Determine the data permission identifier of the target data based on the pre-built data permission tree.

[0036] Each node in the data permission tree contains a node permission identifier. The node permission identifiers in the same layer of nodes are different. The data permission identifier is composed of the node permission identifiers. The data is associated with the nodes in the data permission tree.

[0037] Figure 2A schematic diagram of a data permission tree applicable to an embodiment of the present invention. Figure 2 ,Since data is pre-bound to each node in the data permission book, the node bound to the target data can be found based on the pre-bound relationship, and the data permission identifier of the target data can be determined based on the node.

[0038] For example, see Figure 2 When the target data is node a1, the path from node a1 to the root node o can be determined as a1-Ao. Starting from the root node, the data permission identifier of the generated target data is 001 001 001, where the first OO1 is the node permission identifier of the root node, the second OO1 is the node permission identifier of node A, and the third 001 is the node permission identifier of node a1.

[0039] S130. Match the object identifier of the first object with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers. The number of identification digits of each sub-permission identifier is the same. The number of identification digits of the sub-permission identifier is the same as the number of identification digits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

[0040] After determining the object identifier of the first object and the data permission identifier of the target data, the two can be matched one by one to determine whether the object identifier of the first object can match the data permission identifier of the target data. If so, it indicates that the first object has the authority to operate the target data, and the first object will be allowed to operate the target data.

[0041] Optionally, the object identifier of the first object is matched with the data permission identifier of the target data one by one. If the object identifier of the first object is the same as the data permission identifier of the target data, the match is successful.

[0042] Exemplarily, the object identifier of the first object consists of 001 001 001, and the data permission identifier of the target data is also 001 001 001. At this time, the two can be matched one by one, and the matching is performed from left to right. It can be determined that the object identifier of the first object is the same as the data permission identifier of the target data. At this time, it is considered that the first object has the authority to operate the target data, and the first object can be allowed to operate the target data.

[0043] Optionally, the object identifier of the first object is matched with the data permission identifier of the target data one by one until the first preset sub-authority identifier in the object identifier is matched. If the object identifier of the first object and the data permission identifier of the target data are the same before the first preset sub-authority identifier, the match is successful.

[0044] Exemplarily, the object identifier of the first object is composed of 001 001 000 000, where 000 is a preset sub-authority identifier, and the data permission identifier of the target data is also 001 001 001 001. At this time, the two can be matched one by one, and the matching is performed from left to right. Since the first 001 and the second 001 in the object identifier of the first object are the same as the first 001 and the second 001 in the data permission identifier of the target data, and the object identifier of the first object from the third onwards are all preset sub-authority identifiers, the match will be successful at this time.

[0045] According to the technical solution of an embodiment of the present invention, by determining the target data to be operated by the first object, based on a pre-built data permission tree, the data permission identifier of the target data is determined, and the object identifier of the first object is matched with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, and the number of identification bits of each sub-permission identifier is the same. The number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier. When judging whether the first object can operate the target data, it is possible to quickly judge whether the first object has the authority to operate the target data, thereby improving the user experience.

[0046] Embodiment 2

[0047] Figure 3 This is a flowchart of another data permission matching method provided in the second embodiment of the present invention. This embodiment further optimizes the process after determining the data permission identifier of the target data based on the pre-built data permission tree in the above embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the data authority matching method of this embodiment may include the following steps:

[0048] S210: Determine target data to be operated by the first object.

[0049] S220: Determine the data permission identifier of the target data based on the pre-built data permission tree.

[0050] S230. According to the data permission identifier of the target data, determine in a pre-constructed object organization tree a second object corresponding to the data permission identifier of the target data.

[0051] The connection relationship between nodes in the data permission tree is the same as that in the object organization tree. The parent node in the object organization tree contains the operation permissions of the child nodes in the parent node. The data of the nodes in the data permission tree are the data that can be operated by the nodes at the same position in the object organization tree.

[0052] Figure 4 Schematic diagram of an object organization tree applicable to an embodiment of the present invention. Figure 4 Since the object is pre-bound in the object organization tree, and the connection relationship between the nodes in the data permission tree and the object organization tree is the same, the second object corresponding to the data permission identifier of the target data is found in the object organization tree, and the node position of the second object is determined.

[0053] Exemplarily, according to the data permission identifier 001 001 001 of the target data, starting from the root node o, it is possible to find that the node position where the second object corresponding to the identifier is located is node a1.

[0054] S240: If the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data.

[0055] Since the parent node in the object organization tree contains the operation permissions of the child nodes in the parent node, the parent node of any node has greater permissions than the node. Therefore, if the node where the second object is located is a descendant node of the node where the first object is located, it means that the permission to operate the target data is included in the permission of the first object. At this time, the first object will be allowed to operate on the target data.

[0056] After determining the above principle, when judging whether the first object can operate the target data, the data permission identifier of the target data can be directly obtained, and the object permission identifier of the first object in the object organization tree can be directly obtained and compared.

[0057] Exemplarily, when it is determined that the node where the first object is located is node A, it can be determined that the object permission identifier of the first object is 001 001, the data permission identifier of the target data is 001 001 001,

[0058] At this time, it is only necessary to compare the object permission identifier of the first object with the data at the same position in the data permission identifier of the target data to determine whether the first object has the permission to operate the target data.

[0059] The object permission identifier is 001 001 and the data permission identifier of the target data is 001 001 / 001. If they are the same at the same position, it is determined that the first object can operate the target data.

[0060] According to the technical solution of the embodiment of the present invention, the target data to be operated by the first object is determined; based on a pre-constructed data permission tree, the data permission identifier of the target data is determined; according to the data permission identifier of the target data, a second object corresponding to the data permission identifier of the target data is determined in the pre-constructed object organization tree; if the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data, so that when judging whether the first object can operate the target data, it is only necessary to judge whether the data permission identifier at the same position in the target data as that of the first object is the same, and the judgment can be completed, thereby speeding up the matching efficiency and improving the user experience.

[0061] Embodiment 3

[0062] Figure 5 This is a flowchart of another data permission matching method provided in the third embodiment of the present invention. Based on the above embodiment, this embodiment further optimizes the process after the first object is allowed to operate on the target data if the node where the second object is located is a descendant node of the node where the first object is located in the above embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 5 As shown, the data authority matching method of this embodiment may include the following steps:

[0063] S310: Determine target data to be operated by the first object.

[0064] In an optional solution, before determining the target data to be operated by the first object, the method further includes steps A1-A3:

[0065] Step A1: Establish an object organization tree and a first number of data permission trees to be filled according to business requirements. The object organization tree is established by business objects and / or business object groups according to business requirements. Business requirements include management requirements and functional requirements.

[0066] Step A2: establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled.

[0067] Step A3: Establish node authority identifiers for different nodes in the object organization tree according to the connection relationships between different nodes in the object organization tree.

[0068] The data permission tree to be filled may be a data permission tree in which a node permission identifier already exists in the node, but data is not bound to the node.

[0069] According to business needs, the authority size of each object is determined to establish an object organization tree, and based on the object organization tree, a first number of data authority trees to be filled with the same node connection relationship in the object organization tree are established.

[0070] According to the connection relationship between different nodes in the object organization tree, node authority labels are established for different nodes in the object organization tree. During the establishment process, the node authority labels of the child nodes under one node are different.

[0071] Similarly, based on the connection relationship between different nodes in the data permission tree to be filled, node permission identifiers are established for different nodes in the data permission tree to be filled.

[0072] In an optional solution, after establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled, the method further includes steps B1-B4:

[0073] Step B1: Divide the data related to the business demand according to the data type to obtain a second number of candidate data groups, where the second number is the number of data types, and the data type is used to describe the use of the data.

[0074] Step B2: According to the data operation type, divide the first number of data permission trees to be filled into a third number of data permission tree groups to be filled, each data permission tree group to be filled has a second number of data permission trees to be filled, the multiplication of the second number and the third number is the first number, and the third number is the number of data operation types.

[0075] Step B3: Duplicate the second number of candidate data groups to generate a third number of candidate data sets, each candidate data set containing the same second number of candidate data groups.

[0076] Step B4: According to business requirements and data operation types, the candidate data groups are matched with the data permission trees to be filled, and a third number of data permission trees are generated.

[0077] The data type division is to divide the data related to the business needs according to the usage of the data, for example, to divide into personnel information, financial information, order information, etc. The second quantity is the number of data types divided when dividing the data types.

[0078] Since different data operation types require different permissions, it is necessary to divide the first number of data permission trees to be filled into a third number of data permission tree groups to be filled according to the data operation types, and each data permission tree group to be filled has a second number of data permission trees to be filled, thereby ensuring that each data type has a corresponding data permission tree to be filled under different data operation types.

[0079] In order to ensure that each data type has a corresponding data permission tree to be filled under different data operation types, the second number of candidate data groups need to be copied to generate a third number of candidate data sets.

[0080] For example, when the number of data operation types is 2, and they are view and modify respectively, and the data types are type A and type B, it is necessary to generate four types of type A-view, type A-modify, type B-view and type B-modify, each of which corresponds to a data permission tree to be filled, thereby generating four data permission trees.

[0081] In an optional solution, matching the candidate data group with the data permission tree to be filled according to the business requirements and the data operation type to generate a third number of data permission trees may include steps C1-C2:

[0082] Step C1: According to business requirements and data operation types, determine the matching relationship between candidate data groups under different data operation types and nodes in the data permission tree to be filled.

[0083] Step C2: Match the candidate data group with the data permission tree to be filled according to the matching relationship to generate a third number of data permission trees.

[0084] When matching candidate data groups with nodes in the data permission tree to be filled, it is necessary to determine the nodes of the data permission tree to be filled corresponding to each data to be filled. Therefore, with the help of business needs and data operation types, the matching relationship between candidate data groups and nodes in the data permission tree to be filled under different data operation types is determined, and based on the matching relationship, the candidate data groups are matched with the data permission tree to be filled to generate a third number of data permission trees.

[0085] S320: Determine the data permission identifier of the target data based on the pre-built data permission tree.

[0086] Each node in the data permission tree contains a node permission identifier. The node permission identifiers in the same layer of nodes are different. The data permission identifier is composed of the node permission identifiers. The data is associated with the nodes in the data permission tree.

[0087] In an optional solution, determining the data permission identifier of the target data may include steps D1-D4:

[0088] Step D1: Determine a target data operation of a first object.

[0089] Step D2: Determine the data operation type corresponding to the target data operation according to the target data operation.

[0090] Step D3: Determine the data permission tree corresponding to the target data according to the data operation type corresponding to the target data operation and the target data.

[0091] Step D4: Determine the data permission identifier of the target data according to the data permission tree.

[0092] As mentioned above, different data operations on the same data may require different permissions, so it is necessary to first determine the target data operation of the first object, and then determine the data operation type to which the target data operation belongs based on the target data operation.

[0093] According to the data operation type to which the target data operation belongs and the target data, a data permission tree identical to the target data operation is filtered out from multiple data permission trees corresponding to the target data.

[0094] And according to the data permission tree, determine the data permission identifier of the target data.

[0095] In an optional solution, determining the data permission identifier of the target data according to the data permission tree includes steps E1-E4:

[0096] Step E1: Determine the node position of the target data in the data permission tree.

[0097] Step E2: determine the node path from the node position of the target data in the candidate data permission tree to the root node in the candidate data permission tree based on the connection relationship between different nodes in the data permission tree and the node position of the target data in the candidate data permission tree.

[0098] Step E3: Determine the node authority identifier of each node in the node path.

[0099] Step E4: Sort the node permission identifiers of each node in the node path in the node order from the root node in the candidate data permission tree to the node position of the target data in the candidate data permission tree to obtain the data permission identifier of the target data.

[0100] To determine the node position of the target data in the data permission tree, the data id may be used and bound to the node in the data permission tree, thereby determining the node position of the target data in the data permission tree.

[0101] In addition, the data may be directly stored in the form of a data permission tree to establish a relationship between the data and the node position in the data permission tree, and this application does not impose any restrictions on this.

[0102] When determining the data permission identifier of the target data, it is necessary to first determine the node path from the node position of the target data to the root node. To this end, the node path can be determined layer by layer from the node position of the target data to the root node based on the connection relationship between different nodes in the data permission tree, thereby obtaining the node path from the node position of the target data in the candidate data permission tree to the root node in the candidate data permission tree.

[0103] According to the node permission identifiers of the nodes passed in the node path, the node permission identifiers of each node in the node path are sorted in the node order from the root node in the candidate data permission tree to the node position of the target data in the candidate data permission tree, so as to obtain the data permission identifier of the target data.

[0104] See also Figure 4 When the node position of the target data is node a1, the node path is node a1-node A-root node o. At this time, it is determined that the data permission identifier of the target data will be composed of the node permission identifier of the root node o, the node permission identifier of node A and the node permission identifier of node a1. The data permission identifier of the target data is 001 001001, where the first 001 is the node permission identifier of the root node o, the second 001 is the node permission identifier of node A, and the last 001 is the node permission identifier of node a1.

[0105] S330. According to the data permission identifier of the target data, determine in a pre-constructed object organization tree a second object corresponding to the data permission identifier of the target data.

[0106] The connection relationship between nodes in the data permission tree is the same as that in the object organization tree. The parent node in the object organization tree contains the operation permissions of the child nodes in the parent node. The data of the nodes in the data permission tree are the data that can be operated by the nodes at the same position in the object organization tree.

[0107] S340: If the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data.

[0108] S350: If the node where the second object is located is the same as the node where the first object is located, the first object is allowed to operate on the target data.

[0109] S360: Deny the first object from operating the target data.

[0110] When the node where the second object is located is the same as the node where the first object is located, it indicates that the first object and the second object have the same permissions, and the first object is allowed to operate on the target data.

[0111] When neither S350 nor S360 is satisfied, it is determined that the first object does not have the authority to operate the target data, and the first object is denied to operate the target data.

[0112] For example, if the object permission identifier of the first object is 001 002 and the data permission identifier of the target data is 001 001 001, then 001 is matched successfully in the first segment of the matching process, but one is 002 and the other is 001. At this time, the two do not match, and the first object will be denied operations on the target data.

[0113] According to the technical solution of an embodiment of the present invention, by determining the target data to be operated by the first object; based on a pre-constructed data permission tree, determining the data permission identifier of the target data, each node in the data permission tree contains a node permission identifier, the node permission identifiers in the same layer of nodes are different, the data permission identifier is composed of the node permission identifiers, and the data is associated with the nodes in the data permission tree; according to the data permission identifier of the target data, determining the second object corresponding to the data permission identifier of the target data in the pre-constructed object organization tree, the connection relationship between the nodes in the data permission tree and the object organization tree is the same, and the parent node in the object organization tree contains the operation rights of the child nodes in the parent node The data of the node in the data permission tree is the data that can be operated by the node at the same position in the object organization tree; if the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data; if the node where the second object is located is the same as the node where the first object is located, the first object is allowed to operate on the target data; otherwise, the first object will be denied to operate on the target data; in the process of matching, it is possible to accurately determine how to determine that the first object's operation on the target data has exceeded the first object's authority when only determining whether the data permission identifier at the same position as the first object in the target data is the same, thereby improving the matching process.

[0114] Embodiment 4

[0115] Figure 6 The present invention provides a structural block diagram of a data authority matching device. This embodiment can be applied to the situation where when a user operates data, it is determined whether the user has the authority to operate the data. The data authority matching device can be implemented in the form of hardware and / or software, and the data authority matching device can be configured in an electronic device with data processing capabilities. Figure 6 As shown, the data authority matching device of this embodiment may include: a target data determination module 310, a data identification acquisition module 320 and an authority determination module 330. Among them:

[0116] The target data determination module 310 is used to determine the target data to be operated by the first object;

[0117] A data identification acquisition module 320 is used to determine the data permission identification of the target data based on a pre-built data permission tree. Each node in the data permission tree contains a node permission identification. The node permission identifications of nodes at the same level are different. The data permission identification is composed of the node permission identifications. The data is associated with the nodes in the data permission tree.

[0118] The permission determination module 330 is used to match the object identifier of the first object with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, each sub-permission identifier has the same number of identification bits, the number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

[0119] Based on the above embodiment, optionally, after the data identification acquisition module 320, the device further includes:

[0120] According to the data permission identifier of the target data, a second object corresponding to the data permission identifier of the target data is determined in a pre-constructed object organization tree, the connection relationship between the nodes in the data permission tree and the object organization tree is the same, the parent node in the object organization tree contains the operation permissions of the child nodes in the parent node, and the data of the nodes in the data permission tree are the data that can be operated by the nodes at the same position in the object organization tree;

[0121] If the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data.

[0122] Based on the above embodiment, optionally, after allowing the first object to operate on the target data, the method further includes:

[0123] If the node where the second object is located is the same as the node where the first object is located, allowing the first object to operate on the target data;

[0124] Otherwise, the first object will be denied from operating the target data.

[0125] Based on the above embodiment, optionally, before determining the target data to be operated by the first object, the method further includes:

[0126] According to business requirements, an object organization tree and a first number of data permission trees to be filled are established, wherein the object organization tree is established by business objects and / or business object groups according to business requirements, wherein the business requirements include management requirements and functional requirements;

[0127] Establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled;

[0128] According to the connection relationship between different nodes in the object organization tree, node authority identifiers are established for different nodes in the object organization tree.

[0129] Based on the above embodiment, optionally, after establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled, the method further includes:

[0130] Dividing the data related to the business requirement according to the data type to obtain a second number of candidate data groups, where the second number is the number of data types, and the data type is used to describe the use of the data;

[0131] According to the data operation type, the first number of data permission trees to be filled are divided into a third number of data permission tree groups to be filled, each of which has a second number of data permission trees to be filled, the multiplication of the second number and the third number is the first number, and the third number is the number of data operation types;

[0132] Copying the second number of candidate data groups to generate a third number of candidate data sets, each candidate data set containing the same second number of candidate data groups;

[0133] According to the business requirements and data operation types, the candidate data groups are matched with the data permission trees to be filled to generate a third number of data permission trees.

[0134] On the basis of the above embodiment, optionally, according to the business requirements and the data operation type, the candidate data group is matched with the data permission tree to be filled to generate a third number of data permission trees, including:

[0135] According to the business requirements and data operation types, determining the matching relationship between the candidate data groups under different data operation types and the nodes in the data permission tree to be filled;

[0136] According to the matching relationship, the candidate data group is matched with the data permission tree to be filled to generate a third number of data permission trees.

[0137] Based on the above embodiment, optionally, determining the data permission identifier of the target data includes:

[0138] determining a target data operation for the first object;

[0139] Determining, according to the target data operation, a data operation type corresponding to the target data operation;

[0140] Determining a data permission tree corresponding to the target data according to the data operation type corresponding to the target data operation and the target data;

[0141] According to the data permission tree, a data permission identifier of the target data is determined.

[0142] Based on the above embodiment, optionally, determining the data permission identifier of the target data according to the data permission tree includes:

[0143] Determine the node position of the target data in the data permission tree;

[0144] Determine a node path from the node position of the target data in the candidate data permission tree to the root node in the candidate data permission tree according to the connection relationship between different nodes in the data permission tree and the node position of the target data in the candidate data permission tree;

[0145] Determine the node authority identifier of each node in the node path;

[0146] The node permission identifiers of the nodes in the node path are sorted according to the node order from the root node in the candidate data permission tree to the node position of the target data in the candidate data permission tree to obtain the data permission identifier of the target data.

[0147] The data permission matching device provided in the embodiment of the present invention can execute the data permission matching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0148] Embodiment 5

[0149] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0150] like Figure 7As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0151] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0152] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a data authority matching method.

[0153] In some embodiments, the data authority matching method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data authority matching method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data authority matching method in any other appropriate manner (e.g., by means of firmware).

[0154] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0155] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0156] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0157] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0158] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0159] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0160] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0161] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data authority matching method, It is characterized in that include: Determining target data to be operated by the first object; Based on a pre-constructed data permission tree, determine the data permission identifier of the target data, each node in the data permission tree includes a node permission identifier, the node permission identifiers in the same layer of nodes are different, the data permission identifier is composed of the node permission identifiers, and the data is associated with the nodes in the data permission tree; The object identifier of the first object is matched with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, and the number of identification bits of each sub-permission identifier is the same. The number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

2. The method according to claim 1, It is characterized in that After determining the data permission identifier of the target data based on the pre-built data permission tree, the method further includes: According to the data permission identifier of the target data, a second object corresponding to the data permission identifier of the target data is determined in a pre-constructed object organization tree, the connection relationship between the nodes in the data permission tree and the object organization tree is the same, the parent node in the object organization tree contains the operation permissions of the child nodes in the parent node, and the data of the nodes in the data permission tree are the data that can be operated by the nodes at the same position in the object organization tree; If the node where the second object is located is a descendant node of the node where the first object is located, the first object is allowed to operate on the target data.

3. The method according to claim 2, It is characterized in that If the node where the second object is located is a descendant node of the node where the first object is located, after allowing the first object to operate on the target data, the method further includes: If the node where the second object is located is the same as the node where the first object is located, allowing the first object to operate on the target data; Otherwise, the first object will be denied from operating the target data.

4. The method according to claim 3, It is characterized in that Before determining the target data to be operated by the first object, the method further includes: According to business requirements, an object organization tree and a first number of data permission trees to be filled are established, wherein the object organization tree is established by business objects and / or business object groups according to business requirements, wherein the business requirements include management requirements and functional requirements; Establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled; According to the connection relationship between different nodes in the object organization tree, node authority identifiers are established for different nodes in the object organization tree.

5. The method according to claim 4, It is characterized in that After establishing node permission identifiers for different nodes in the data permission tree to be filled according to the connection relationship between different nodes in the data permission tree to be filled, the method further includes: Dividing the data related to the business requirement according to the data type to obtain a second number of candidate data groups, where the second number is the number of data types, and the data type is used to describe the use of the data; According to the data operation type, the first number of data permission trees to be filled are divided into a third number of data permission tree groups to be filled, each of which has a second number of data permission trees to be filled, the multiplication of the second number and the third number is the first number, and the third number is the number of data operation types; Copying the second number of candidate data groups to generate a third number of candidate data sets, each candidate data set containing the same second number of candidate data groups; According to the business requirements and data operation types, the candidate data groups are matched with the data permission trees to be filled to generate a third number of data permission trees.

6. The method according to claim 5, It is characterized in that According to the business requirements and data operation types, the candidate data groups are matched with the data permission trees to be filled, and a third number of data permission trees are generated, including: According to the business requirements and data operation types, determining the matching relationship between the candidate data groups under different data operation types and the nodes in the data permission tree to be filled; According to the matching relationship, the candidate data group is matched with the data permission tree to be filled to generate a third number of data permission trees.

7. The method according to claim 6, It is characterized in that Determining the data permission identifier of the target data includes: determining a target data operation for the first object; Determining, according to the target data operation, a data operation type corresponding to the target data operation; Determining a data permission tree corresponding to the target data according to the data operation type corresponding to the target data operation and the target data; According to the data permission tree, a data permission identifier of the target data is determined.

8. The method according to claim 7, It is characterized in that Determining the data permission identifier of the target data according to the data permission tree includes: Determine the node position of the target data in the data permission tree; Determine a node path from the node position of the target data in the candidate data permission tree to the root node in the candidate data permission tree according to the connection relationship between different nodes in the data permission tree and the node position of the target data in the candidate data permission tree; Determine the node authority identifier of each node in the node path; The node permission identifiers of the nodes in the node path are sorted according to the node order from the root node in the candidate data permission tree to the node position of the target data in the candidate data permission tree to obtain the data permission identifier of the target data.

9. A data authority matching device, It is characterized in that include: A target data determination module, used to determine the target data to be operated by the first object; A data identification acquisition module is used to determine the data permission identification of the target data based on a pre-built data permission tree, each node in the data permission tree contains a node permission identification, the node permission identifications in the same layer of nodes are different, the data permission identification is composed of the node permission identifications, and the data is associated with the nodes in the data permission tree; A permission determination module is used to match the object identifier of the first object with the data permission identifier of the target data. If the match is successful, the first object is allowed to operate on the target data. The object identifier is composed of sub-permission identifiers, each sub-permission identifier has the same number of identification bits, the number of identification bits of the sub-permission identifier is the same as the number of identification bits of the node permission identifier, and the number of sub-permission identifiers corresponding to each object identifier is the same as the number of node permission identifiers of the data permission identifier.

10. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data authority matching method described in any one of claims 1-8.