A method and system for controlling authority resources based on task scenarios
By introducing a task layer with expiration time attribute in permission control, the user's relationship with tasks is solved, and the problems of frequent user roles and permission resource reconfiguration in software testing are improved, and the convenience and accuracy of permission configuration are improved. Improves the comprehensiveness of software quality and testing coverage.
Patent Information
- Application Number
- CN202210958627.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-08-09
AI Technical Summary
During the software testing process, frequent user role changes and permission resource reconfiguration lead to confusion of permissions, resulting in increased time consumption, large workload, incomplete test coverage and inaccurate quality control.
The traditional three-layer permission control structure adds a task layer with expiration time attributes, and realizes dynamic management of permission resources through the association between users and tasks, and improves the convenience and accuracy of permission configuration.
Effectively solve the time consumption and workload caused by the reconfiguration of permission resources, improve the convenience and accuracy of permission configuration, reduce the problem of untimely or too low permission activation, and improve the comprehensiveness of software quality and test coverage. .
Smart Images

Figure CN115473682B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of authority control, and in particular relates to an authority resource control method and system based on task scenarios. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] At present, the quality control of software release or online is closely related to the comprehensiveness of software testing, and the comprehensiveness of testing requires a complete grasp of the user's usage scenarios and the applicability of the product. In the process of designing test cases for different products, the control and management of roles and access resources are essential. In the application process of the same product, different resources need to be accessed in different scenarios to access the product. Because of different access locations and access environments, different roles may need to be configured, but in fact, the user's roles are often divided into few categories, such as managers, auditors, ordinary users, temporary access users, etc.; however, in actual applications at the customer site, a work environment may be changed, and the resources that the user needs to access will change. In this case, the control resources of this user need to be reconfigured, because changing the role's resources will cause other users under the role to also have their permissions changed, causing confusion in permissions or even giving permissions that do not match the role, resulting in a decline in product quality.
[0004] The time consumption and workload of role conversion and reconfiguration of authority resources, the frequent changes in personnel authority control, untimely replacement, missed personnel, and inadequate authority testing will all lead to problems such as incomplete test coverage and inaccurate quality control. How to improve the efficiency of authority control on the test platform is a topic worthy of further study. Summary of the invention
[0005] In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a method and system for permission resource control based on task scenarios. In the traditional three-layer structure of permission control, a task layer with an expiration time attribute is added. By associating users with tasks, the time consumption and increased workload caused by the reconfiguration of permission resources are solved, thereby improving the convenience of permission configuration and the accuracy of permission control.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] The first aspect of the present invention provides a method for controlling authority resources based on task scenarios;
[0008] A method for controlling permission resources based on task scenarios, comprising:
[0009] Determine the resource system of the evaluation platform;
[0010] Create a new permission group and set the resources that the permission group has access to;
[0011] Create a new task and set the permission group associated with the task;
[0012] Set user-associated tasks and control user permissions and resources on the test platform based on tasks, permission groups, and resources.
[0013] Furthermore, the permission control of the test platform is abstracted into a four-layer structure, and the resource access rights of each user are determined based on the structure, wherein the four-layer structure is: user, task, permission group, and resource.
[0014] Furthermore, the resource system includes all resources that require permission control;
[0015] Determining the resource system of the evaluation platform is to establish a resource library of the test platform. The specific operations include adding resources, modifying resources, and deleting resources.
[0016] Furthermore, the permission group includes the name of the permission group and the resources that the permission group has the right to access;
[0017] The resources that the permission group has the right to access are set, multiple resources are selected from the resource system, and a one-to-many relationship between the permission group and the resources is established.
[0018] Furthermore, the task includes the name of the task, the expiration date of the task, and the permission group associated with the task;
[0019] The setting of the permission group associated with the task involves selecting a permission group from the permission group list to establish a one-to-one relationship between the task and the permission group.
[0020] Furthermore, the user includes a user name, a user ID, and tasks associated with the user;
[0021] The tasks associated with the user are set by selecting multiple tasks from the task list to establish a one-to-many relationship between the user and the tasks.
[0022] Furthermore, based on the four-layer structure, the resources that the user has the right to access are determined according to the tasks associated with the user, the permission groups associated with the tasks, and the resources associated with the permission groups, and the user's access to resources on the test platform is controlled.
[0023] A second aspect of the present invention provides a task scenario-based authority resource control system.
[0024] A task scenario-based permission resource control system, including a resource management module, a permission group management module, a task management module and a user permission control module;
[0025] The resource management module is configured to: determine the resource system of the evaluation platform;
[0026] The permission group management module is configured to: create a new permission group and set the resources that the permission group has access to;
[0027] The task management module is configured to: create new tasks and set the permission groups associated with the tasks;
[0028] The user authority control module is configured to: set user-associated tasks, and perform authority resource control on users on the test platform based on tasks, authority groups and resources.
[0029] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in a task scenario-based permission resource control method as described in the first aspect of the present invention.
[0030] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a task scenario-based permission resource control method as described in the first aspect of the present invention are implemented.
[0031] One or more of the above technical solutions have the following beneficial effects:
[0032] The present invention adds a task layer with an expiration time attribute to the traditional three-layer structure of authority control, solves the time consumption and workload increase caused by authority resource reconfiguration through the association between users and tasks, and improves the convenience of authority configuration and the accuracy of authority control.
[0033] Tasks have an expiration date. When a task expires, multiple users associated with the task simultaneously lose their permissions to operate the resources associated with the task. This can effectively deal with situations where resources have access deadlines, and improves the flexibility and convenience of resource permission control.
[0034] The task scenario-based permission resource control method proposed in the present invention improves the control of various user permissions, reduces the occurrence of problems such as untimely permission activation, too low or too high permission granting due to frequent permission changes such as department changes or temporary personnel transfers, and makes it easier for permission control personnel to use; testers can more clearly distinguish various permission usage scenarios in testing permission resources to avoid missed tests due to incomplete considerations and problems such as poor quality control. Various permission configurations are considered and made into test cases in the form of task scenarios to improve reusability, save the trial and error costs of testers in the test execution link, and improve software quality.
[0035] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0037] Figure 1 This is a flow chart of the method of the first embodiment.
[0038] Figure 2 It is a system structure diagram of the second embodiment. DETAILED DESCRIPTION
[0039] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0040] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0041] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0042] Explanation of the name:
[0043] Permission group: A collection of various permission resources, which can create permission resource roles, etc.
[0044] Permission resources: a collection of unit modules, function buttons, data resources, etc. in the system.
[0045] Task: A permission set set to complete a certain target task, used to grant users the permissions required for the task.
[0046] In the traditional three-tier structure of user-role-resource for permission control, the role of a user is a test engineer in the quality department. He has the permission to enter the project in the testing process and can carry out testing work. However, for some projects that are still in the bidding process, they need the support of test engineers, but have not entered the testing access process. At this time, the test engineers have no permission and cannot support the work. According to the existing configuration process, all test engineers who need to participate in the testing process should be granted permissions and resources should be configured. After the testing work is completed, there may be roles such as quality engineers, and permissions need to be configured one by one. After the work is completed, the existing permissions need to be cancelled one by one to ensure that permissions overflow.
[0047] It can be seen that the three-tier permission control requires resetting the relationship between users, roles and resources when switching roles and reconfiguring permissions, which is time-consuming and labor-intensive and inefficient. There are a large number of users, permission systems and permission resources, so it is very troublesome for users to match permission resources and associations, and there is no way to clearly identify the resources required for each time period.
[0048] Embodiment 1
[0049] This embodiment discloses a method for controlling authority resources based on task scenarios;
[0050] like Figure 1 As shown, a method for controlling permission resources based on task scenarios abstracts the permission control of the test platform into a four-layer structure, and determines the resource access rights of each user based on the structure, wherein the four-layer structure is: user, task, permission group, resource; specifically includes:
[0051] Step S1 determines the resource system of the evaluation platform;
[0052] The resource system includes all resources that require permission control, that is, all resources that require permission are included in the management. The resource system of the evaluation platform is to establish a resource library for the test platform. Specific operations include adding resources, modifying resources and deleting resources.
[0053] For the testing platform, resources can be divided according to functional modules, such as home page, data governance, task management, log management, etc.
[0054] Step S2: Create a new permission group and set the resources that the permission group has access to;
[0055] The permission group includes the name of the permission group and the resources that the permission group has access to;
[0056] The resources that the permission group has the right to access are set, multiple resources are selected from the resource system, and a one-to-many relationship between the permission group and the resources is established.
[0057] For example, create a new permission group called 'Bidding Test Support', and set the permission resources to include all functional modules involved in the bidding demonstration (home page, data governance, task management, log management, etc.) in preparation for the task.
[0058] Step S3 creates a new task and sets the permission group associated with the task;
[0059] The task includes the name of the task, the expiration date of the task, and the permission group associated with the task;
[0060] The setting of the permission group associated with the task involves selecting a permission group from the permission group list to establish a one-to-one relationship between the task and the permission group.
[0061] In the new configuration method of the present invention, the work is divided into tasks, a new task is added, and the task expiration time is set for the task, for example, a new task of "test support" is added; the newly created task is associated with a permission group and resources, and the task is now granted functional permissions for some applications, for example, the task "test support" is associated with the permission group "tender test support", and the functional modules that need to be tested this time are associated together.
[0062] Step S4 sets the tasks associated with the user, and performs permission resource control on the user on the test platform based on the tasks, permission groups and resources.
[0063] The user includes the user name, user ID, and tasks associated with the user;
[0064] The tasks associated with the user are set by selecting multiple tasks from the task list to establish a one-to-many relationship between the user and the tasks.
[0065] Based on the four-layer structure, the resources that the user has the right to access are determined according to the tasks associated with the user, the permission groups associated with the tasks, and the resources associated with the permission groups, and the user's access to resources on the test platform is controlled.
[0066] For example, all users who support the testing of the bidding project are associated with the task "Test Support". At this time, the associated users have all the permission resources for this task and can test functions such as "Home Page" and "Data Governance". When the task deadline expires, these users will lose the permission resources and the functions they can operate.
[0067] As the work progresses, test engineers may join or leave the project. At this time, there is no need to add, modify or delete the engineer's permissions. You only need to adjust the engineers associated with the task to join or leave the task. This can satisfy the personnel replacement and ensure the normal progress of the test task.
[0068] You can efficiently adjust the resources that users have access to through the users associated with tasks and the resources associated with permission groups. For example, if you need to add a new function to the test during the test, as long as you associate this function with the permission group, all users associated with the permission group will have the permission to this function.
[0069] The method provided by the present invention is to more comprehensively and conveniently grant the user the appropriate authority resources when configuring the user authority resources, specifically:
[0070] 1) It solves the problem that only permissions can be granted to individual users and permission resources can be provided when configuring users.
[0071] 2) By adding tasks, common task scenarios can be associated with related permission resources.
[0072] 3) By associating the user with the tasks related to him / her, he / she can be associated with the required permission group and corresponding resources.
[0073] 4) Users can clearly identify what task and scenario they are in, but cannot be particularly clear about what resources they need. By associating users with tasks, they can clearly, directly and efficiently obtain the required resource permissions.
[0074] 5) There are a large number of users, permission systems, and permission resources. It is very troublesome for users to match permission resources and make associations, and there is no way to clearly identify the resources needed in each time period. By associating tasks, users can more clearly associate with their own task scenarios.
[0075] 6) Reduce the frequency of direct changes between users and permission resources. Tasks are assigned to users, and users can perform functions based on the tasks. There will be no need to constantly adjust user personal permissions.
[0076] 7) User scenarios can be more comprehensively displayed, reducing missed tests and improving the comprehensiveness of the test.
[0077] Embodiment 2
[0078] This embodiment discloses a task scenario-based authority resource control system;
[0079] like Figure 2 As shown, a permission resource control system based on task scenarios includes a resource management module, a permission group management module, a task management module and a user permission control module;
[0080] The resource management module is configured to: determine the resource system of the evaluation platform;
[0081] The permission group management module is configured to: create a new permission group and set the resources that the permission group has access to;
[0082] The task management module is configured to: create new tasks and set the permission groups associated with the tasks;
[0083] The user authority control module is configured to: set user-associated tasks, and perform authority resource control on users on the test platform based on tasks, authority groups and resources.
[0084] Embodiment 3
[0085] The purpose of this embodiment is to provide a computer-readable storage medium.
[0086] A computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in a task scenario-based permission resource control method as described in Example 1 of the present disclosure.
[0087] Embodiment 4
[0088] The purpose of this embodiment is to provide an electronic device.
[0089] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a task scenario-based permission resource control method as described in Example 1 of the present disclosure are implemented.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for controlling authority resources based on task scenarios, characterized in that: include: Determine the resource system of the evaluation platform; Create a new permission group and set the resources that the permission group has access to; Create a new task and set the permission group associated with the task; Set user-associated tasks and control user permissions and resources on the test platform based on tasks, permission groups, and resources; Abstract the permission control of the test platform into a four-layer structure, and determine the resource access rights of each user based on the structure, wherein the four-layer structure is: user, task, permission group, resource; The task includes the name of the task, the expiration date of the task, and the permission group associated with the task; The permission group associated with the task is set, and a single permission group is selected from the permission group list to establish a one-to-one relationship between the task and the permission group; The permission control of the test platform is abstracted into a four-layer structure. Based on the four-layer structure, the resources that the user has the right to access are determined according to the tasks associated with the user, the permission groups associated with the tasks, and the resources associated with the permission groups, and the permission control of the user's access to resources on the test platform is performed; The permission group includes the name of the permission group and the resources that the permission group has access to; The resources that the permission group has the right to access are set, multiple resources are selected from the resource system, and a one-to-many relationship between the permission group and the resources is established.
2. A method for controlling authority resources based on task scenarios as claimed in claim 1, characterized in that: The resource system includes all resources that require permission control; Determining the resource system of the evaluation platform is to establish a resource library of the test platform. The specific operations include adding resources, modifying resources, and deleting resources.
3. A method for controlling authority resources based on task scenarios as claimed in claim 1, characterized in that: The user includes the user name, user ID, and tasks associated with the user; The tasks associated with the user are set by selecting multiple tasks from the task list to establish a one-to-many relationship between the user and the tasks.
4. A task scenario-based authority resource control system, characterized in that: Including resource management module, permission group management module, task management module and user permission control module; The resource management module is configured to: determine the resource system of the evaluation platform; The permission group management module is configured to: create a new permission group and set the resources that the permission group has access to; The task management module is configured to: create new tasks and set the permission groups associated with the tasks; The user authority control module is configured to: set user-associated tasks, and perform authority resource control on users on the test platform based on tasks, authority groups and resources; Abstract the permission control of the test platform into a four-layer structure, and determine the resource access rights of each user based on the structure, wherein the four-layer structure is: user, task, permission group, resource; The task includes the name of the task, the expiration date of the task, and the permission group associated with the task; The permission group associated with the task is set, and a single permission group is selected from the permission group list to establish a one-to-one relationship between the task and the permission group; The permission control of the test platform is abstracted into a four-layer structure. Based on the four-layer structure, the resources that the user has the right to access are determined according to the tasks associated with the user, the permission groups associated with the tasks, and the resources associated with the permission groups, and the permission control of the user's access to resources on the test platform is performed; The permission group includes the name of the permission group and the resources that the permission group has access to; The resources that the permission group has the right to access are set, multiple resources are selected from the resource system, and a one-to-many relationship between the permission group and the resources is established.
5. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the task scenario-based permission resource control method as described in any one of claims 1 to 3 are implemented.
6. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the task scenario-based permission resource control method as described in any one of claims 1 to 3 are implemented.
