Control permission determination method and device, electronic device, and storage medium

By using pre-configured quadruple information and target algorithms, control permissions are automatically determined, solving the problem in existing technologies where users need to modify form scripts when handling different businesses, thus improving the efficiency and accuracy of permission control.

CN115600225BActive Publication Date: 2026-07-21SHANGHAI SHUHUI SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SHUHUI SYST TECH CO LTD
Filing Date
2022-09-27
Publication Date
2026-07-21

Smart Images

  • Figure CN115600225B_ABST
    Figure CN115600225B_ABST
Patent Text Reader

Abstract

The application discloses a control permission determination method and device, electronic equipment and a storage medium. The method comprises the following steps: when a current user requests to display any control, the control is determined as a current resource; the permissions of each current four-tuple information corresponding to the current resource are determined from the information in each pre-configured four-tuple information; it is judged that the permissions of each current four-tuple information of the current resource exist to-be-determined permissions; if the to-be-determined permissions exist, the current resource is updated to a higher-level resource of the current resource, and the previous step is returned to be executed; if the to-be-determined permissions do not exist, and the current resource is not a control, the current permissions of the higher-level resource are determined as the to-be-determined permissions of each current four-tuple information corresponding to a lower-level resource from high to low; and the permissions of the control are screened out from the permissions of each current four-tuple corresponding to the control by using a target algorithm. Thus, the pre-configured four-tuple information can be used to effectively determine the permissions of the control of the user.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202210513319.9, filed on May 12, 2022, entitled "Method and Apparatus for Determining Control Permissions, Electronic Device, Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of access control technology, and in particular to a method and apparatus for determining control permissions, an electronic device, and a storage medium. Background Technology

[0003] In the field of natural resources business, people rely on forms to complete their transactions. To meet the diverse form data needs of different users in different business scenarios, it is necessary to control user permissions such as the ability to view and edit form controls, tailored to each specific business scenario.

[0004] In existing methods, in order to effectively meet the different users' access control requirements for form controls, a corresponding form script is written based on the business content handled by the user. By executing the form script, the user's access control for form controls can be achieved.

[0005] However, as users handle different business transactions, the corresponding form scripts need to be modified accordingly, which is obviously very tedious and prone to errors. Summary of the Invention

[0006] In view of the shortcomings of the prior art, this application provides a method, device, electronic device and storage medium for determining control permissions, so as to solve the problem that when the prior art is changed, the corresponding form script needs to be modified according to the changed business content, which is obviously very cumbersome.

[0007] To achieve the above objectives, this application provides the following technical solution:

[0008] The first aspect of this application provides a method for determining control permissions, including:

[0009] When a user requests to display any control, that control is identified as the current resource;

[0010] The permissions of each current four-tuple information corresponding to the current resource are determined from the information in the pre-configured four-tuple information; wherein, the four-tuple information includes resource name, role, status and operation; the current four-tuple information corresponding to the current resource refers to the four-tuple information in the current resource information that matches the user;

[0011] If there are permissions to be determined in the permissions of each of the current four-tuple information corresponding to the current resource, then the current resource is updated to the parent resource of the current resource, and the process of determining the permissions of the current four-tuple information corresponding to the current resource is returned from the information in the pre-configured four-tuple information.

[0012] If there are no permissions to be determined in the permissions of each current quadruple information corresponding to the current resource, and the current resource is not the control, then the current permissions of the previous level resource are determined as the permissions to be determined in each current quadruple information corresponding to the next level resource, from high to low; wherein, the current permissions of a resource are obtained by filtering from the permissions of each current quadruple information corresponding to the resource using a target algorithm.

[0013] The target algorithm is used to filter out the current permissions of the control from the permissions of each current quadruple corresponding to the control, and this current permission is used as the current user's permission for the control.

[0014] Optionally, in the above method for determining control permissions, determining the permissions of each current four-tuple information corresponding to the current resource from the information in the pre-configured four-tuple information includes:

[0015] Based on the resource name in each of the pre-set quadruple information, determine the corresponding quadruple information of the current resource;

[0016] For each of the four-tuples corresponding to the current resource, determine whether the role in the four-tuple matches the role of the current user;

[0017] If the role in the quadruple information matches the role of the current user, then determine whether the state in the quadruple information matches the state of the current user.

[0018] If the state in the quadruple information matches the state of the current user, then the quadruple information is determined as the current quadruple information corresponding to the current resource;

[0019] Based on the operations in the current quadruple information corresponding to the current resource, the permissions of the current quadruple information corresponding to the current resource are determined.

[0020] Optionally, in the above method for determining control permissions, determining the permissions of the current four-tuple information corresponding to the current resource based on the operations in the current four-tuple information corresponding to the current resource includes:

[0021] Determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as that of the parent;

[0022] If the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent, then the permission of the current quadruple information corresponding to the current resource is determined as a permission to be determined.

[0023] If the operation in the current quadruple information corresponding to the current resource is not empty and is not the same as the parent, then the operation in the current quadruple information corresponding to the current resource is determined as the permission of the current quadruple information corresponding to the current resource.

[0024] Optionally, in the above method for determining control permissions, the step of using the target algorithm to filter out the current permissions of the control from the permissions of each current four-tuple corresponding to the control includes:

[0025] The weights corresponding to the permissions of each current quadruple information associated with the control are determined.

[0026] From the weights corresponding to the permissions of each current quadruple information corresponding to the control, determine the permission of the current quadruple information corresponding to the highest weight;

[0027] The current permissions of the current quadruple information corresponding to the maximum weight are determined as the current permissions of the control.

[0028] Optionally, in the above method for determining control permissions, the resources include: the control, the block, and the form; wherein the block is the parent resource of the control; and the form is the parent resource of the block.

[0029] A second aspect of this application provides a device for determining control permissions, comprising:

[0030] The request unit is used to determine the control as the current resource when the current user requests to display any control;

[0031] The first determining unit is used to determine the permissions of each current four-tuple information corresponding to the current resource from the information in each pre-configured four-tuple information; wherein, the four-tuple information includes resource name, role, status and operation; the current four-tuple information corresponding to the current resource refers to the four-tuple information in the current resource that matches the user;

[0032] If the permissions of each of the current four-tuple information corresponding to the current resource contain permissions to be determined, the update unit updates the current resource to the parent resource of the current resource and returns to the first determination unit to execute the determination of the permissions of the current four-tuple information corresponding to the current resource from the information of each pre-configured four-tuple information.

[0033] The second determining unit is configured to, if there is no permission to be determined in the permissions of each current quadruple information corresponding to the current resource, and the current resource is not the control, determine the current permissions of the previous level resource as the permissions of the permissions to be determined in each current quadruple information corresponding to the next level resource in descending order; wherein, the current permissions of a resource are obtained by filtering from the permissions of each current quadruple corresponding to the resource using a target algorithm;

[0034] The filtering unit is used to filter out the current permissions of the control from the permissions of each current quadruple corresponding to the control using the target algorithm, and use it as the current user's permission for the control.

[0035] Optionally, in the above-described control permission determination device, the first determination unit includes:

[0036] The third determining unit is used to determine the corresponding quadruple information of the current resource based on the resource name in each of the pre-set quadruple information;

[0037] The first judgment unit is used to determine whether the role in each of the four-tuple information corresponding to the current resource matches the role of the current user.

[0038] The second judgment unit is used to determine whether the state in the four-tuple information matches the state of the current user if the role in the four-tuple information matches the role of the current user.

[0039] The fourth determining unit is used to determine the four-tuple information as the current four-tuple information corresponding to the current resource if the state in the four-tuple information matches the state of the current user.

[0040] The fifth determining unit is used to determine the permissions of the current quadruple information corresponding to the current resource based on the operations in the current quadruple information corresponding to the current resource.

[0041] Optionally, in the above-described control permission determination device, the fifth determination unit includes:

[0042] The third judgment unit is used to determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent;

[0043] The sixth determining unit is used to determine the permission of the current quadruple information corresponding to the current resource as a permission to be determined if the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent;

[0044] The seventh determining unit is used to determine the operation in the current quadruple information corresponding to the current resource as the permission of the current quadruple information corresponding to the current resource if the operation in the current quadruple information corresponding to the current resource is not empty or the same as the parent.

[0045] Optionally, in the above-described control permission determination device, the filtering unit includes:

[0046] The acquisition unit is used to acquire the weights corresponding to the permissions of each current quadruple information of the control.

[0047] The eighth determining unit is used to determine the permission of the current quadruple information with the largest weight from the weights corresponding to the permissions of each current quadruple information corresponding to the control.

[0048] The ninth determining unit is used to determine the current permission of the current quadruple information corresponding to the maximum weight as the current permission of the control.

[0049] Optionally, in the above-described control permission determination device, the resources include: the control, the block, and the form; wherein the block is the parent resource of the control; and the form is the parent resource of the block.

[0050] A third aspect of this application provides an electronic device, comprising:

[0051] Memory and processor;

[0052] The memory is used to store programs;

[0053] The processor is used to execute the program, which, when executed, is specifically used to implement the control permission determination method as described in any of the above.

[0054] A fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed, implements the method for determining control permissions as described in any of the preceding claims.

[0055] This application provides a method for determining control permissions, which uses information from pre-configured four-tuple information to determine control permissions. When a user requests to display any control, the control is identified as the current resource. Next, the permissions of the current resource's corresponding current four-tuple information are determined from the pre-configured four-tuple information. Then, it is checked whether there are any permissions to be determined among the current resource's current four-tuple permissions. If so, the current resource is updated to its parent resource, and the process returns to determine the permissions of the current resource's corresponding current four-tuple information from the pre-configured four-tuple information. If not, and the current resource is not a control, the current permissions of the parent resource are used as the permissions of the next-level resource's corresponding current four-tuple information, from highest to lowest. Finally, a target algorithm is used to filter out the control's current permissions from the permissions of its corresponding current four-tuples, and this is used as the current user's permissions for the control. This eliminates the need to modify the script according to different user transactions to determine user permissions for controls; instead, it effectively determines user permissions for controls using pre-configured four-tuple information. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0057] Figure 1 A flowchart illustrating a method for determining control permissions provided in an embodiment of this application;

[0058] Figure 2 A flowchart illustrating a method for determining the permissions of a control's quadruple set, provided in an embodiment of this application;

[0059] Figure 3 A flowchart illustrating a method for determining permissions to be determined, as provided in an embodiment of this application;

[0060] Figure 4 A flowchart illustrating a method for determining the current permissions of a control, as provided in an embodiment of this application;

[0061] Figure 5 A schematic diagram of a device for determining control permissions provided in another embodiment of this application;

[0062] Figure 6 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

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

[0065] This application provides a method for determining control permissions, such as... Figure 1 As shown, the specific steps include:

[0066] S101. When the current user requests to display any control, the control is identified as the current resource.

[0067] Specifically, when a user opens any project, only any one form in that project needs to be displayed. This form is composed of multiple controls, and only one control in the form needs to be displayed. Therefore, when a user requests to display any one control, the control needs to be identified as the current resource.

[0068] S102. Determine the permissions of each current four-tuple information corresponding to the current resource from the information in the pre-configured four-tuple information.

[0069] The four-tuple information includes resource name, role, status, and operation. It's important to note that the resource name can be used to identify the corresponding four-tuple information for any control. Role refers to the current user's role within each four-tuple. Status refers to the current user's current state under that role. For example, if the current user's role is "Director," then in the leave request state, the Director's leave request status is "Approving leave requests from ordinary users." Operation refers to the actions the current user can perform under their corresponding role and status within each four-tuple, such as read-only, editable, or required.

[0070] It should be noted that in this embodiment, there are multiple levels of resources. For example, the parent level of a control is the block to which the control belongs, and a block can include multiple controls, meaning that a block can have multiple sub-level resources. Furthermore, it should be noted that, generally without specific settings, the permissions of sub-level resources are consistent with the permissions of parent level resources.

[0071] Therefore, the corresponding four-tuple information can be pre-set for each resource at each level to facilitate the determination of resource permissions later. For example, select any control among the various controls to set the four-tuple information. First, select the resource name and enter the name of the control. Second, select the role and enter the role that can operate on the control. Then, select the status. The status needs to be entered according to the actual business scenario. It can be set according to the needs of the role and used as a dynamic parameter. Finally, select the operations that the role can perform on the control in this status. Specifically, it can be writable, same as parent, required, read-only, hidden, etc. If not set, it will be empty. In the case of emptiness, the default is the same as the parent, that is, the same permissions as the previous level resource.

[0072] The current quaternion information corresponding to the current resource refers to the quaternion information that matches the user in the current resource quaternion information.

[0073] It should also be noted that in this embodiment, a control can correspond to multiple four-tuple information, so it is no longer necessary to modify the corresponding business logic script according to changes in business logic to realize the user's control over the control permissions. It is only necessary to determine the permissions of each four-tuple information corresponding to the control based on the information in the pre-configured four-tuple information when the user requests to display the control.

[0074] Alternatively, in another embodiment of this application, another specific implementation of step S102 is as follows: Figure 2 As shown, it includes the following steps:

[0075] S201. Based on the resource name in each pre-set quadruple information, determine the corresponding quadruple information of the current resource.

[0076] Specifically, in this embodiment, the resource name in the quadruple information refers to the name of the current resource. Therefore, correspondingly, the quadruple information that matches the name of the current resource can be found from the resource names in the pre-set quadruple information.

[0077] S202. For each quadruple of information corresponding to the current resource, determine whether the role in the quadruple information matches the role of the current user.

[0078] It should be noted that if the role in the four-tuple information matches the current user's role, then step S203 is executed. If the role in the four-tuple information does not match the current user's role, then the process continues to determine whether the role in the next four-tuple information matches the current user's role.

[0079] S203. Determine whether the state in the quadruple information matches the current user's state.

[0080] Specifically, if the state in the four-tuple information matches the current user's state, then the four-tuple information is determined as the current four-tuple information corresponding to the current resource, i.e., step S204. If the state in the four-tuple information does not match the current user's state, then it continues to determine whether the state in the next set of four-tuple information matches the current user's state.

[0081] S204. Determine the quadruple information as the current quadruple information corresponding to the current resource.

[0082] S205. Based on the operations in the current four-tuple information corresponding to the current resource, determine the permissions of the current four-tuple information corresponding to the current resource.

[0083] Alternatively, in another embodiment of this application, another specific implementation of step S205 is as follows: Figure 3 As shown, it includes the following steps:

[0084] S301. Determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as that of the parent.

[0085] It should be noted that "same as parent" means "same as the next higher level resource," where "same as the next higher level resource" means having the same permissions as the next higher level resource.

[0086] It should also be noted that if the operation in the current four-tuple information corresponding to the current resource is empty, that is, no corresponding operation has been set for the operation in the current four-tuple information corresponding to the current resource, and the operation in the current four-tuple information corresponding to the current resource will be assumed to be the same as the parent. Therefore, in this embodiment, when the operation in the current four-tuple information corresponding to the current resource is empty or the same as the parent, the permission corresponding to the current four-tuple information needs to be determined through the permission of the parent resource. Therefore, the operation in the current four-tuple information cannot be determined yet, and the operation in the current four-tuple information needs to be temporarily determined as a permission to be determined, i.e., step S302. If the operation in the current four-tuple information corresponding to the current resource is not empty and is not the same as the parent, it means that the permission corresponding to the four-tuple information has been determined, and then step S303 is executed.

[0087] S302. Determine the permissions of the current four-tuple information corresponding to the current resource as permissions to be determined.

[0088] S303. Determine the operation in the current four-tuple information corresponding to the current resource as the permission of the current four-tuple information corresponding to the current resource.

[0089] S103. Determine whether there are any pending permissions in the permissions of each current four-tuple information corresponding to the current resource.

[0090] It should be noted that since the permissions to be determined need to be determined based on the permissions of the higher-level resource, if it is determined that there are permissions to be determined in the permissions of each current four-tuple information corresponding to the current resource, it means that the permissions of the higher-level resource of the current resource need to be determined. The method for determining the permissions of the higher-level resource is the same as the method for determining the permissions of the current resource. That is, the method for determining the permissions of all resources is the same, so step S105 is executed at this time.

[0091] If it is determined that there are no pending permissions in the current four-tuple information corresponding to the current resource, it is necessary to determine whether the current resource is a control, i.e., step S104, because the current resource may be a control or a parent resource. When the current resource is a control, the permissions of all current four-tuple information in the space have been determined, so step S107 can be executed directly. However, when the current resource is a parent resource, the permissions of the control's current four-tuple information are still pending, so step S106 must be executed first before the control's permissions can be determined.

[0092] The resources may include multi-level resources. Optionally, in this embodiment, the resources may include controls, blocks, and forms.

[0093] In this context, a block can be the parent resource of a control, and a form is the parent resource of a block. Accordingly, the specific implementation of step S103 is to determine whether there are any pending permissions in the permissions of each current four-tuple of the control. If there are pending permissions in the permissions of each current four-tuple of the control, then the parent resource of the control is updated, that is, updated to a block. If there are no pending permissions in the permissions of each current four-tuple of the control, and the control is not a first-level resource, then the current permissions of the form are determined as the pending permissions of each current four-tuple of the block according to the hierarchy from high to low.

[0094] S104. Determine if the current resource is a control.

[0095] It should be noted that if the current resource is a control, then step S107 is executed. If the current resource is not a control, then step S106 is executed.

[0096] S105. Update the current resource to the resource of the previous level.

[0097] If there are permissions to be determined in the current four-tuple information of the current resource, it is necessary to return to the execution step S102.

[0098] It should be noted that, under normal circumstances, the permissions of the current four-tuple information corresponding to the highest-level resource are determined, meaning there are no pending permissions. This ensures that for each user, when looping to the highest-level resource, there are no pending permissions among the current four-tuple information of the current resource, thus ultimately determining the permissions of the control.

[0099] S106. Starting from the highest level and working down, determine the current permissions of the previous level resource as the permissions to be determined for each current quadruple information of the next level resource.

[0100] The current permissions of a resource are obtained by filtering from the permissions of each current quadruple corresponding to the resource using the target algorithm.

[0101] It should be noted that the step-by-step processing of resources from high to low in step S106 refers to starting the processing from the highest-level resource among the resources whose permissions for each current four-tuple have been determined, rather than starting the processing from the highest-level resource among all resources.

[0102] Since the pending permissions of the current four-tuple corresponding to the next-level resource are consistent with the current permissions of the previous-level resource, it is necessary to first determine the current permissions of the previous-level resource based on the permissions of each current four-tuple corresponding to the previous-level resource. Then, assign it to the pending permissions of the current four-tuple corresponding to the next-level resource, so that the current four-tuple corresponding to the next-level resource no longer has pending permissions, and its current permissions can be determined. Then, the same process is performed on the next-level resources until the lowest level, that is, the permissions of all current four-tuples of the control are determined, and then step S107 can be executed.

[0103] S107. Use the target algorithm to filter out the current permissions of the control from the permissions of each current four-tuple corresponding to the control, and use it as the current user's permission to the control.

[0104] Optionally, the target algorithm can adopt the quadruple weight priority algorithm, which can filter out the permissions that meet the system requirements from the permissions corresponding to each quadruple information. Of course, other calculation methods can also be used, and the specific settings can be made according to the requirements.

[0105] Alternatively, in another embodiment of this application, another specific implementation of step S107 is as follows: Figure 4 As shown, it includes the following steps:

[0106] S401. Obtain the weight corresponding to the permission of each current quadruple information of the control.

[0107] Optionally, the weights corresponding to the permissions of each current quadruple information of the control can be calculated in advance using the target algorithm, and then the weights corresponding to the permissions of each current quadruple information can be sorted in descending order, so that the permissions of the current quadruple information corresponding to the maximum permission can be effectively determined later.

[0108] S402. Determine the permission of the current quadruple information with the highest weight from the weights corresponding to the permissions of each current quadruple information corresponding to the control.

[0109] S403. Determine the current permission of the control as the permission of the current quadruple information corresponding to the maximum weight.

[0110] It should be noted that a control can only correspond to one permission. Therefore, in this embodiment, the permission corresponding to the current four-tuple information with the highest weight needs to be used as the permission for the control requested by the current user.

[0111] This application provides a method for determining control permissions, which uses information from pre-configured four-tuple information to determine control permissions. When a user requests to display any control, the control is identified as the current resource. Next, the permissions of the current resource's corresponding current four-tuple information are determined from the pre-configured four-tuple information. Then, it is checked whether there are any permissions to be determined among the current resource's current four-tuple permissions. If so, the current resource is updated to its parent resource, and the process returns to determine the permissions of the current resource's corresponding current four-tuple information from the pre-configured four-tuple information. If not, and the current resource is not a control, the current permissions of the parent resource are used as the permissions of the next-level resource's corresponding current four-tuple information, from highest to lowest. Finally, a target algorithm is used to filter out the control's current permissions from the permissions of its corresponding current four-tuples, and this is used as the current user's permissions for the control. This eliminates the need to modify the script according to different user transactions to determine user permissions for controls; instead, it effectively determines user permissions for controls using pre-configured four-tuple information.

[0112] Another embodiment of this application provides a device for determining control permissions, such as... Figure 5 As shown, it includes:

[0113] Request unit 501 is used to determine the control as the current resource when the current user requests to display any control.

[0114] The first determining unit 502 is used to determine the permissions of each current four-tuple information corresponding to the current resource from the information in the pre-configured four-tuple information.

[0115] The four-tuple information includes resource name, role, status, and operation. The current four-tuple information corresponding to the current resource refers to the four-tuple information that matches the user in the current four-tuple information.

[0116] Update unit 503: If there are permissions to be determined in the permissions of each current four-tuple information corresponding to the current resource, then update the current resource to the parent resource of the current resource, and return to the first determination unit to determine the permissions of the current four-tuple information corresponding to the current resource from the information of each pre-configured four-tuple information.

[0117] The second determining unit 504 is used to determine the current permissions of the previous level resource as the permissions of the current four-tuple information corresponding to the next level resource if there are no permissions to be determined in the permissions of each current four-tuple information corresponding to the current resource, and the current resource is not a control.

[0118] The current permissions of a resource are obtained by filtering from the permissions of each current quadruple corresponding to the resource using the target algorithm.

[0119] The filtering unit 505 is used to filter out the current permissions of the control from the permissions of each current four-tuple corresponding to the control using the target algorithm, and use it as the current user's permission to the control.

[0120] It should be noted that the specific working process of the above-mentioned units in the embodiments of this application can be referred to steps S101 to S107 in the above method embodiments, and will not be repeated here.

[0121] Optionally, in another embodiment of this application, the first determining unit 502 includes:

[0122] The third determining unit is used to determine the corresponding quadruple information of the current resource based on the resource name in the pre-set quadruple information.

[0123] The first judgment unit is used to determine whether the role in each quadruple information corresponding to the current resource matches the role of the current user.

[0124] The second judgment unit is used to determine whether the state in the four-tuple information matches the current user's state if the role in the four-tuple information matches the current user's role.

[0125] The fourth determining unit is used to determine the quadruple information as the current quadruple information corresponding to the current resource if the state in the quadruple information matches the state of the current user.

[0126] The fifth determining unit is used to determine the permissions of the current four-tuple information corresponding to the current resource based on the operations in the current four-tuple information corresponding to the current resource.

[0127] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the corresponding steps in the above method embodiments, and will not be repeated here.

[0128] Optionally, in another embodiment of this application, the fifth determining unit includes:

[0129] The third judgment unit is used to determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as that of the parent.

[0130] The sixth determining unit is used to determine the permissions of the current quadruple information corresponding to the current resource as permissions to be determined if the operation in the current quadruple information corresponding to the current resource is empty or the same as that in the parent.

[0131] The seventh determining unit is used to determine the operation in the current quadruple information corresponding to the current resource as the permission of the current quadruple information corresponding to the current resource if the operation in the current quadruple information corresponding to the current resource is not empty and is not the same as the parent.

[0132] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the corresponding steps in the above method embodiments, and will not be repeated here.

[0133] Optionally, in another embodiment of this application, the screening unit 505 includes:

[0134] The acquisition unit is used to obtain the weights corresponding to the permissions of each current four-tuple information of the control.

[0135] The eighth determining unit is used to determine the permission of the current quadruple information with the largest weight from the weights corresponding to the permissions of each current quadruple information corresponding to the control.

[0136] The ninth determining unit is used to determine the current permission of the control by setting the permission of the current quadruple information corresponding to the maximum weight.

[0137] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the corresponding steps in the above method embodiments, and will not be repeated here.

[0138] Optionally, in another embodiment of this application, the resources include: controls, blocks, and forms.

[0139] In this context, the block is the parent resource of the control, and the form is the parent resource of the block.

[0140] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the corresponding steps in the above method embodiments, and will not be repeated here.

[0141] Another embodiment of this application provides an electronic device, such as... Figure 6 As shown, it includes:

[0142] Memory 601 and processor 602.

[0143] The memory 601 is used to store the program.

[0144] The processor 602 is used to execute a program, which, when executed, is specifically used to implement the control permission determination method provided in any of the above embodiments.

[0145] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed, implements the control permission determination method provided in any of the above embodiments.

[0146] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0147] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0148] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining control permissions, characterized in that, include: When a user requests to display any control, that control is identified as the current resource; The permissions of each current four-tuple information corresponding to the current resource are determined from the information in the pre-configured four-tuple information; wherein, the four-tuple information includes resource name, role, status and operation; the current four-tuple information corresponding to the current resource refers to the four-tuple information in the current resource information that matches the user; If there are permissions to be determined in the permissions of each of the current four-tuple information corresponding to the current resource, then the current resource is updated to the parent resource of the current resource, and the process of determining the permissions of the current four-tuple information corresponding to the current resource is returned from the information in the pre-configured four-tuple information. If there are no permissions to be determined in the permissions of each current quadruple information corresponding to the current resource, and the current resource is not the control, then the current permissions of the previous level resource are determined as the permissions to be determined in each current quadruple information corresponding to the next level resource, from high to low; wherein, the current permissions of a resource are obtained by filtering from the permissions of each current quadruple information corresponding to the resource using a target algorithm. The target algorithm is used to filter out the current permissions of the control from the permissions of each current quadruple corresponding to the control, and this current permission is used as the current user's permission for the control.

2. The method according to claim 1, characterized in that, The step of determining the permissions of each current four-tuple information corresponding to the current resource from the information in the pre-configured four-tuple information includes: Based on the resource name in each of the pre-set quadruple information, determine the corresponding quadruple information of the current resource; For each of the four-tuples corresponding to the current resource, determine whether the role in the four-tuple matches the role of the current user; If the role in the quadruple information matches the role of the current user, then determine whether the state in the quadruple information matches the state of the current user. If the state in the quadruple information matches the state of the current user, then the quadruple information is determined as the current quadruple information corresponding to the current resource; Based on the operations in the current quadruple information corresponding to the current resource, the permissions of the current quadruple information corresponding to the current resource are determined.

3. The method according to claim 2, characterized in that, The step of determining the permissions of the current four-tuple information corresponding to the current resource based on the operations in the current four-tuple information corresponding to the current resource includes: Determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as that of the parent; If the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent, then the permission of the current quadruple information corresponding to the current resource is determined as a permission to be determined. If the operation in the quadruple is not empty and is not the same as the parent, then the operation in the current quadruple information corresponding to the current resource is determined as the permission of the current quadruple information corresponding to the current resource.

4. The method according to claim 1, characterized in that, The step of using the target algorithm to filter the current permissions of the control from the permissions of each current four-tuple corresponding to the control includes: The weights corresponding to the permissions of each current quadruple information associated with the control are determined. From the weights corresponding to the permissions of each current quadruple information corresponding to the control, determine the permission of the current quadruple information corresponding to the highest weight; The current permissions of the current quadruple information corresponding to the maximum weight are determined as the current permissions of the control.

5. The method according to claim 1, characterized in that, The resources include: the control, the block, and the form; wherein the block is the parent resource of the control; and the form is the parent resource of the block.

6. A device for determining control permissions, characterized in that, include: The request unit is used to determine the control as the current resource when the current user requests to display any control; The first determining unit is used to determine the permissions of each current four-tuple information corresponding to the current resource from the information in each pre-configured four-tuple information; wherein, the four-tuple information includes resource name, role, status and operation; the current four-tuple information corresponding to the current resource refers to the four-tuple information in the current resource that matches the user; The update unit is used to update the current resource to the parent resource of the current resource if there are permissions to be determined in the permissions of each of the current four-tuple information corresponding to the current resource, and return to execute the information from the pre-configured four-tuple information to determine the permissions of the current four-tuple information corresponding to the current resource. The second determining unit is configured to, if there is no permission to be determined in the permissions of each current quadruple information corresponding to the current resource, and the current resource is not the control, determine the current permissions of the previous level resource as the permissions of the permissions to be determined in each current quadruple information corresponding to the next level resource in descending order; wherein, the current permissions of a resource are obtained by filtering from the permissions of each current quadruple corresponding to the resource using a target algorithm; The filtering unit is used to filter out the current permissions of the control from the permissions of each current quadruple corresponding to the control using the target algorithm, and use it as the current user's permission for the control.

7. The apparatus according to claim 6, characterized in that, The first determining unit includes: The third determining unit is used to determine the corresponding quadruple information of the current resource based on the resource name in each of the pre-set quadruple information; The first judgment unit is used to determine whether the role in each of the four-tuple information corresponding to the current resource matches the role of the current user. The second judgment unit is used to determine whether the state in the four-tuple information matches the state of the current user if the role in the four-tuple information matches the role of the current user. The fourth determining unit is used to determine the four-tuple information as the current four-tuple information corresponding to the current resource if the state in the four-tuple information matches the state of the current user. The fifth determining unit is used to determine the permissions of the current quadruple information corresponding to the current resource based on the operations in the current quadruple information corresponding to the current resource.

8. The apparatus according to claim 7, characterized in that, The fifth determining unit includes: The third judgment unit is used to determine whether the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent; The sixth determining unit is used to determine the permission of the current quadruple information corresponding to the current resource as a permission to be determined if the operation in the current quadruple information corresponding to the current resource is empty or the same as the parent; The seventh determining unit is used to determine the operation in the current quadruple information corresponding to the current resource as the permission of the current quadruple information corresponding to the current resource if the operation in the current quadruple information corresponding to the current resource is not empty or the same as the parent.

9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program, which, when executed, is specifically used to implement the method for determining control permissions as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that, Used to store computer programs, which, when executed, implement the method for determining control permissions as described in any one of claims 1 to 5.