Resource authority allocation method, device and electronic equipment
By displaying the organizational structure of IoT resources and receiving operation instructions to select target related information and determine the target role's permissions on IoT resources, it solves the problem of low efficiency in allocating massive IoT resource permissions in traditional solutions and achieves more efficient resource permissions. manage.
Patent Information
- Application Number
- CN202010494919.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-06-03
AI Technical Summary
The traditional resource permission allocation scheme is too inefficient in scenarios with massive IoT resources, and permissions need to be allocated to each IoT resource separately.
By displaying the organizational structure of IoT resources, receiving operation instructions to select target related information, and determining the permissions of the target role on the IoT resources associated with the related information, it avoids assigning permissions to each IoT resource separately.
It improves the efficiency of resource permission allocation, reduces the amount of data stored in permission information, and simplifies the maintenance of permission information.
Smart Images

Figure CN113761545B
Abstract
Description
Technical Field
[0001] The present application relates to the field of security, and in particular to a resource authority allocation method, device and electronic equipment. Background Art
[0002] With the development of IoT platforms, the number of IoT resources has increased dramatically. In the future, there may be scenarios where tens of millions of IoT resources are connected to one IoT platform. How to allocate permissions to the massive IoT resources connected to the IoT platform has become a hot research direction.
[0003] At present, the mainstream resource permission allocation scheme is implemented based on the RBAC (Role-Based Access Control) model. In the RBAC model, permissions are associated with roles, and resource permission allocation is achieved by assigning permissions to roles and then assigning roles to users.
[0004] However, practice has found that in the traditional resource authority allocation scheme, resource authority needs to be allocated for each IoT resource separately. When there are massive IoT resources, its implementation efficiency is too low. Summary of the invention
[0005] In view of this, the present application provides a resource authority allocation method, device and electronic device.
[0006] According to a first aspect of an embodiment of the present application, a resource authority allocation method is provided, comprising:
[0007] When resource permissions are assigned to a target role, an IoT resource organization structure is displayed, the IoT resource organization structure at least including IoT resources and association information associated with the IoT resources, the IoT resources associated with the association information including existing associated IoT resources and newly added associated IoT resources;
[0008] Receive a first operation instruction, where the first operation instruction is an instruction to select target association information in an IoT resource organization structure;
[0009] According to the first operation instruction, the authority of the target role to the Internet of Things resource associated with the target association information is determined.
[0010] According to a second aspect of an embodiment of the present application, a resource authority allocation device is provided, including:
[0011] A display unit is configured to display an IoT resource organization structure when allocating resource permissions to a target role, the IoT resource organization structure comprising at least IoT resources and association information associated with the IoT resources, wherein the IoT resources associated with the association information include existing associated IoT resources and newly added associated IoT resources;
[0012] A receiving unit is configured to receive a first operation instruction, where the first operation instruction is an instruction to select target association information in an IoT resource organization structure;
[0013] The allocation unit is configured to determine the authority of the target role to the Internet of Things resources associated with the target association information according to the first operation instruction.
[0014] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0015] Memory, used to store computer programs;
[0016] The processor is used to implement the resource authority allocation method of the first aspect when executing the program stored in the memory.
[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the resource authority allocation method of the first aspect is implemented.
[0018] According to a fifth aspect of an embodiment of the present application, a computer program is provided. The computer program is stored in a machine-readable storage medium, and when a processor executes the computer program, the processor is prompted to execute the resource authority allocation method of the first aspect.
[0019] The resource authority allocation method of the embodiment of the present application displays the IoT resource organization structure when allocating resource authority to the target role, and when receiving a first operation instruction for selecting target association information in the IoT resource organization structure, determines the authority of the target role to the IoT resource associated with the target association information based on the first operation instruction. It is no longer necessary to allocate resource authority to each IoT resource separately. Compared with the implementation method of allocating resource authority to each IoT resource separately in the traditional solution, the resource allocation efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flowchart of a resource authority allocation method shown in an exemplary embodiment of the present application;
[0021] Figure 2A is a schematic diagram of an organizational structure of IoT resources and their capabilities shown in an exemplary embodiment of the present application;
[0022] Figure 2B It is a schematic diagram of a selection process in a resource authority allocation process shown in an exemplary embodiment of the present application;
[0023] Figure 3AIt is a schematic diagram of an authentication process for newly added IoT resources shown in an exemplary embodiment of the present application;
[0024] Figure 3B This is a schematic diagram of an authentication process for a role shown in an exemplary embodiment of the present application;
[0025] Figure 4 It is a structural diagram of a resource authority allocation device shown in an exemplary embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of the hardware structure of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0029] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0030] See also Figure 1 , is a flow chart of a resource authority allocation method provided in an embodiment of the present application, such as Figure 1 As shown, the resource authority allocation method may include the following steps:
[0031] It should be noted that the execution entity of steps S100 to S110 may be an IoT platform.
[0032] In addition, the serial numbers of the steps in the embodiments of the present application do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0033] Step S100: When resource permissions are assigned to a target role, an IoT resource organization structure is displayed. The IoT resource organization structure includes at least IoT resources and associated information related to the IoT resources. The IoT resources associated with the associated information include existing associated IoT resources and newly added associated IoT resources.
[0034] In the embodiment of the present application, the target role does not specifically refer to a fixed role, but can refer to any role supported in the resource authority allocation system, and the embodiment of the present application will not be repeated later.
[0035] Assigning resource permissions to target roles may include adding permissions or modifying permissions.
[0036] In order to improve the efficiency of resource allocation, an IoT resource organization structure can be constructed, which may include but is not limited to IoT resources and associated information related to the IoT resources. By selecting the associated information in the IoT resource organization structure, it is possible to jointly allocate permissions for IoT resources associated with specified associated information without having to allocate permissions to each IoT resource separately.
[0037] Exemplarily, the IoT resources associated with the association information may include existing associated IoT resources and newly added associated IoT resources.
[0038] Exemplarily, IoT resources may include, but are not limited to, cameras, alarms, video walls, checkpoint devices, cloud computing memory, cloud storage pools, etc.
[0039] The associated information associated with the IoT resources may include, but is not limited to, one or more of a variety of different types of information such as resource capabilities, resource types, and regions.
[0040] When the associated information is resource capability, the IoT resources associated with the associated information are IoT resources with corresponding resource capabilities; when the associated information is an area, the associated IoT resources are IoT resources within the area.
[0041] For example, taking the associated information as a region, the IoT resources associated with the region include existing associated IoT resources, that is, the IoT resources already existing within the region, and newly added associated IoT resources, that is, the IoT resources newly connected to the region.
[0042] It should be noted that any kind of association information associated with an IoT resource may be in a hierarchical structure, such as a tree structure, that is, a certain kind of association information associated with an IoT resource may have lower-level association information.
[0043] For example, taking the associated information as a region, a region may have subordinate regions (or sub-regions). For example, for the region Zhejiang, its subordinate regions may include Hangzhou, Huzhou, and Ningbo.
[0044] For any association information, the IoT resources associated with the association information include the IoT resources mounted by the association information and the IoT resources mounted by subordinate association information (if any) of the association information.
[0045] The IoT resource mounted by the associated information refers to the IoT resource that belongs to the associated information but does not belong to the subordinate associated information of the associated information.
[0046] For example, still taking the associated information as region, assuming that the number of subordinate regions of region Zhejiang is 2, namely Hangzhou and Ningbo, and Hangzhou and Ningbo do not have subordinate regions, then the IoT resources mounted in Zhejiang include IoT resources that belong to Zhejiang but not to any subordinate region of Zhejiang, the IoT resources mounted in Hangzhou include IoT resources that belong to Hangzhou, and the same is true for Ningbo; IoT resources associated with Zhejiang include IoT resources mounted in Zhejiang, IoT resources mounted in Hangzhou, and IoT resources mounted in Ningbo.
[0047] When allocating resource permissions for a target role, the IoT resource organization structure may be displayed so that an administrator who performs resource permission allocation operations may allocate resource permissions for the target role through operation instructions for the IoT resource organization structure.
[0048] It should be noted that the IoT resources to which different administrator users can be assigned permissions may be different.
[0049] For example, for an administrator user in the Zhejiang region, the IoT resources to which he can assign permissions may include the IoT resources of the entire Zhejiang province; while for an administrator user in the Hangzhou region, the IoT resources to which he can assign permissions may only include the IoT resources of Hangzhou city.
[0050] Therefore, when allocating resource permissions for a target role, the displayed IoT resource organizational structure is the IoT resource organizational structure to which the administrator user currently allocating permissions has permissions (ie, has the allocation permissions).
[0051] Step S110: receiving a first operation instruction, where the first operation instruction is an instruction for selecting target association information in an IoT resource organization structure.
[0052] Step S120: Determine the authority of the target role to the IoT resource associated with the target association information according to the first operation instruction.
[0053] In the embodiment of the present application, the authority of the Internet of Things resources associated with the selected association information can be allocated by selecting the association information in the displayed Internet of Things resource organization structure.
[0054] Accordingly, when the IoT platform receives an instruction (referred to as the first operation instruction in this article) to select associated information (the selected associated information is referred to as target associated information in this article) in the IoT resource organization structure, the target role's authority over the IoT resources associated with the target associated information can be determined based on the first operation instruction.
[0055] For example, the IoT platform may determine the authority of the target role to the IoT resource associated with the target association information according to the operation type or operation sequence of the first operation instruction.
[0056] Exemplarily, operation instructions of different operation types may include, but are not limited to, operation instructions for displaying and selecting all IoT resources associated with target association information, or operation instructions for displaying all IoT resources mounted with target association information, etc.
[0057] The operation sequence is the sequence of operation instructions for different types of associated information.
[0058] It should be noted that when the IoT platform receives an instruction to save permission information, such as an instruction to click the "Save" button in the resource permission allocation interface, it can be determined that a permission allocation process has ended, and the IoT platform can save the permission information of the target role determined in the above manner to the IoT resources associated with the target association information.
[0059] It can be seen that in Figure 1 In the method flow shown, by constructing an IoT resource organization structure, when resource permissions are allocated to a target role, the target role's permissions to the IoT resources associated with the selected associated information can be determined based on the received instruction to select associated information in the IoT resource organization structure. It is no longer necessary to allocate resource permissions to each IoT resource separately, thereby improving resource allocation efficiency.
[0060] As a possible embodiment, in step S110, the first operation instruction is used to display and select all IoT resources associated with the target association information; for example, the first operation instruction is a check instruction for the target association information.
[0061] In step S120, determining the authority of the target role to the IoT resource associated with the target association information according to the first operation instruction may include:
[0062] If the IoT resource selection operation instruction is not obtained, it is determined that the target role has authority over all IoT resources associated with the target association information; the IoT resource selection operation instruction is used to select from all displayed IoT resources;
[0063] If the IoT resource selection operation instruction is obtained, the authority of the target role to the IoT resource associated with the target association information is determined according to the IoT resource selection operation instruction.
[0064] Exemplarily, when the IoT platform responds to a received first operation instruction and displays and selects all IoT resources associated with the target association information, since the first operation instruction has automatically selected all IoT resources associated with the target association information, there is no need to select IoT resources after the first operation instruction. Therefore, the IoT platform can determine whether an IoT resource selection operation instruction is obtained after the first operation instruction, and the IoT resource selection operation instruction is used to select from all displayed IoT resources.
[0065] It should be noted that the above-mentioned determination of whether the IoT resource selection operation instruction is obtained after the first operation instruction refers to whether there is an IoT resource selection operation instruction after the first operation instruction in the same resource authority allocation process. For example, after receiving the first operation instruction and before receiving the permission information saving instruction, it is determined whether the IoT resource selection operation instruction is obtained.
[0066] If the IoT resource selection operation instruction is not obtained, it can be determined that the target role has authority over all IoT resources associated with the target association information.
[0067] If the IoT resource selection operation instruction is obtained, the authority of the target role to the IoT resource associated with the target association information can be determined according to the obtained IoT resource selection operation instruction.
[0068] In one example, determining the IoT resource authority of the target role for the IoT resource associated with the target association information according to the IoT resource selection operation instruction may include:
[0069] When the IoT resource selection instruction is to deselect all IoT resources, it is determined that the target role has no authority over all IoT resources associated with the target association information;
[0070] When the IoT resource selection instruction is to deselect some IoT resources, it is determined that the target role has authority over all IoT resources associated with the target association information except for the deselected IoT resources.
[0071] Exemplarily, when there is an IoT resource selection instruction after the first operation instruction, the IoT platform may determine a specific operation corresponding to the acquired IoT resource selection instruction.
[0072] When the IoT resource selection instruction is to deselect all IoT resources, the IoT platform can determine that the target role has no authority over all IoT resources associated with the target association information.
[0073] When the IoT resource selection instruction is to deselect some IoT resources, the IoT platform can determine that the target role has authority over all IoT resources associated with the target association information except for the deselected IoT resources.
[0074] As another possible embodiment, the first operation instruction may be used to display all IoT resources mounted by the target-related information; for example, the first operation instruction is a click instruction for the target-related information.
[0075] The above-mentioned determining the authority of the target role to the IoT resource associated with the target association information according to the first operation instruction may include:
[0076] Obtaining an Internet of Things resource selection instruction following the first operation instruction, where the Internet of Things resource selection operation instruction is used to select from all displayed Internet of Things resources;
[0077] When the IoT resource selection instruction is to select all IoT resources, it is determined that the target role has permissions for all IoT resources mounted with the target association information;
[0078] When the IoT resource selection instruction is to select some IoT resources, it is determined that the target role has authority over the selected some IoT resources among all IoT resources mounted by the target association information.
[0079] Exemplarily, when the IoT platform responds to the received first operation instruction and displays all IoT resources mounted by the target associated information, since the first operation instruction does not select any IoT resource, the IoT platform can obtain the IoT resource selection instruction after the first operation instruction.
[0080] When the obtained IoT resource selection instruction is to select all IoT resources, it is determined that the target role has authority over all IoT resources mounted by the target association information.
[0081] When the obtained IoT resource selection instruction is to select some IoT resources, it is determined that the target role has authority over the selected some IoT resources among all IoT resources mounted by the target association information.
[0082] It should be noted that in the embodiments of the present application, the above-mentioned IoT resource selection instruction can be implemented through a single operation or through multiple operations.
[0083] For example, deselecting all IoT resources associated with the target association information may be a single "deselect all" operation instruction, or may be multiple operations of sequentially "deselecting" each IoT resource associated with the target association information.
[0084] For another example, selecting all IoT resources mounted by the target association information may be a single "select all" operation instruction, or may be multiple operations of sequentially "selecting" each IoT resource mounted by the target association information.
[0085] In addition, if the IoT platform responds to the first operation instruction received and displays all IoT resources mounted with the target associated information (not automatically selected), and no instruction to select IoT resources is detected, the IoT platform can determine that the permission resource allocation process is an invalid process. In this case, the target role's permission information for the IoT resources remains unchanged, that is, no change occurs.
[0086] As a possible embodiment, the association information associated with the IoT resource may include regional organization information, and the regional organization information is composed of regions of different hierarchical structures;
[0087] Receiving a first operation instruction may include: receiving a target area selection operation instruction, the target area selection operation instruction is used to select a target area in the regional organization information, the target association information is the target area, and the Internet of Things resources associated with the target association information may include existing Internet of Things resources within the target area and Internet of Things resources newly added to the target area.
[0088] Exemplarily, the association information associated with the IoT resources may include regional organization information, and the regional organization information may be composed of regions of different hierarchical structures, that is, one region may have one or more subordinate regions, and one subordinate region may have one or more further subordinate regions.
[0089] The selection of the region associated with the IoT resource to be assigned permissions can be achieved by inputting an operation instruction to select a region in the regional organization information.
[0090] The IoT platform may determine the authority of the target role to the IoT resources associated with the target area according to the received first operation instruction to select an area in the regional organization information (the selected area is referred to as the target area in this document).
[0091] In one example, the association information associated with the IoT resource may further include: IoT resource type organization information, the IoT resource type organization information being composed of IoT resource types of different hierarchical structures;
[0092] Before receiving the first operation instruction, the method further includes: receiving a second operation instruction, where the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information, and the target area is at least one area in the area organization information corresponding to the target IoT resource type;
[0093] or,
[0094] After receiving the first operation instruction, it further includes: receiving a second operation instruction, the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information, and the target IoT resource type is at least one IoT resource type in the IoT resource type organization information corresponding to the target area.
[0095] Exemplarily, the association information associated with the IoT resource may further include IoT resource type organization information, and the IoT resource type organization information may be composed of IoT resource types of different hierarchical structures.
[0096] When assigning resource permissions to a target role, you can select the target region and target IoT resource type associated with the IoT resource to which permissions are to be assigned in turn, or select the target IoT resource type and target region associated with the IoT resource to which permissions are to be assigned in turn, to determine the target role's permissions to the IoT resources of the target IoT resource type in the target region.
[0097] It should be noted that, when there is an IoT resource selection instruction in the permission allocation process, the first operation instruction and the second operation instruction are both before the IoT resource selection instruction.
[0098] In one example, the association information associated with the IoT resource may further include: IoT resource capability organization information; the IoT resource capability organization information is composed of IoT resource capability information of different hierarchical structures;
[0099] Before receiving the first operation instruction, the method further includes: receiving a third operation instruction, where the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource capability;
[0100] or,
[0101] After receiving the first operation instruction, it further includes: receiving a third operation instruction, the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information, and the target IoT resource capability is at least one IoT resource capability information in the IoT resource capability information corresponding to the target area.
[0102] For example, in order to refine the granularity of resource authority allocation, when allocating resource authority, resource authority allocation may no longer be performed based on IoT resources as the minimum object, but resource authority allocation may be performed based on resource capabilities of IoT resources as the minimum object.
[0103] The association information associated with the IoT resource may further include IoT resource capability organization information, and the IoT resource capability organization information may be composed of IoT resource capabilities of different hierarchical structures.
[0104] When assigning resource permissions to a target role, you can select the target region and target IoT resource capabilities associated with the IoT resource to which permissions are to be assigned in turn, or select the target IoT resource capabilities and target region associated with the IoT resource to which permissions are to be assigned in turn, to determine the target role's permissions to the IoT resources with the target IoT resource capabilities in the target region.
[0105] It should be noted that, when there is an Internet of Things resource selection instruction in the permission allocation process, the first operation instruction and the third operation instruction are both before the Internet of Things resource selection instruction.
[0106] In the embodiment of the present application, after the authority of the target role to the IoT resources associated with the target association information is determined, the authority information of the target role to the IoT resources associated with the target association information may also be saved.
[0107] For example, when receiving the permission information saving instruction, the IoT platform saves the permission information of the target role to the IoT resources associated with the target association information.
[0108] Taking into account the existing IoT resource allocation permission scheme, resource permissions need to be allocated for each IoT resource separately. When saving permission information, it is also necessary to save information about each IoT resource to which the role has permissions, such as the identification information of the IoT resources. The amount of information saved is large, especially when the role has permissions for a large number of IoT resources. Moreover, every time a role adds a new IoT resource to which it has permissions or reduces a new IoT resource to which it has permissions, the saved permission information needs to be updated.
[0109] Since in the resource authority allocation scheme provided in the embodiment of the present application, authority allocation to the Internet of Things resources associated with the selected association information is achieved by selecting the association information of the association information associated with the Internet of Things resources, and the Internet of Things resources to which authority is allocated include existing associated Internet of Things resources and newly added associated Internet of Things resources, different authority allocation rules can be set according to the operation type or operation sequence of the first operation instruction, and when resource authority is allocated to the target role, the matching authority allocation rule can be determined according to the received first operation instruction, and the authority of the target role to the Internet of Things resources associated with the target association information can be determined based on the authority allocation rule.
[0110] Accordingly, when saving the permission information of the target role, it can be achieved by saving the target association information and the permission allocation rules, without the need to separately save the information of each IoT resource to which the target role has permission, thereby reducing the amount of data that needs to be saved; in addition, since the permission allocation rules can represent the permission information of the target role to all IoT resources associated with the target association information, when the IoT resources associated with the target association information are updated, there is no need to update the saved permission information, thereby simplifying the maintenance of the permission information. The specific implementation can be explained in conjunction with specific examples below.
[0111] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application are described below with reference to specific examples.
[0112] The following is an explanation of the organizational structure of IoT resources and their capabilities.
[0113] See also Figure 2A In this embodiment, the organizational structure of IoT resources and their capabilities can be as follows Figure 2A As shown, where:
[0114] A region is an organization or region to which IoT resources belong. It is a hierarchical model that is created based on user-defined dimensions from a business perspective, such as administrative regions, such as Haidian District in Beijing, or specific physical address areas, such as the Hangzhou G20 Summit venue.
[0115] IoT resources refer to hardware devices or computing resources in the security field, including but not limited to cameras, alarms, video walls, checkpoint devices, cloud computing memory, cloud storage pools, etc.
[0116] IoT resources can be divided into specific areas according to their deployment locations.
[0117] Resource capability refers to the ability (or function) of IoT resources. For example, a camera has the ability to view and capture videos; a pan / tilt device has the ability to rotate in different directions; and an access control device has the ability to open and close doors.
[0118] like Figure 2A As shown in the figure, regions can be mounted under regions. The former is called the parent region and the latter is called the child region. IoT resources can be mounted under regions, and each IoT resource has corresponding capabilities. Capabilities can be one-to-one or many-to-one subordinate relationships to IoT resources, and IoT resources can be one-to-one or many-to-one subordinate relationships to regions, child regions, and parent regions.
[0119] It should be noted that a region may not have sub-regions or mounted IoT resources.
[0120] In addition, for a region, the IoT resources associated with the region include the IoT resources mounted in the region (if any), and the IoT resources mounted in the sub-region (if any) of the region (if any).
[0121] For a region, the IoT resources mounted in the region include IoT resources whose deployment locations belong to the region and are not divided into sub-regions of the region.
[0122] See also Figure 2B In this embodiment, the IoT resource organization structure can be as follows: Figure 2B As shown, in the process of allocating resource permissions, the resource type, resource capability, region and IoT resources for resource allocation can be selected in turn.
[0123] In this embodiment, the IoT platform determines the target IoT resource type, target IoT resource capability and target area for resource authority allocation based on the IoT resource type selection instruction (i.e., the second operation instruction in the above text), IoT resource capability selection instruction (i.e., the third operation instruction in the above text) and area selection instruction (i.e., the first operation instruction in the above text) received in sequence. Then, based on the operation type of the area selection instruction, whether there is an IoT resource selection instruction after the area selection instruction, and the operation type of the IoT resource selection instruction, the permissions assigned to the current role for the IoT resource are divided into the following five categories (taking the IoT resource type as a monitoring point and the IoT resource capability as a video preview as an example, and the corresponding IoT resource is a camera):
[0124] 1. Regional Node Association (can be called the first permission type)
[0125] Operation sequence: Received at Figure 2B The first operation instruction for selecting the target area in the IoT resource organization structure shown is used to display and select all IoT resources associated with the target area (hereinafter, the first operation instruction is taken as an example of a check instruction for the target area), and no IoT resource selection operation instruction is received afterwards.
[0126] For example, when the IoT platform detects a check instruction for a target area, it can automatically check the camera mounted in the area (if any), the subordinate areas of the area, such as the sub-area (if any) and the sub-area of the sub-area (if any), and the IoT resources mounted in each subordinate area (if any).
[0127] In this case, the IoT platform determines that the current role has permission to the video preview capability of all cameras associated with the target area.
[0128] The permission information of the current role for the camera associated with the target area saved by the IoT platform includes: the area identifier (assumed to be Area1) of the selected area (i.e., the target area, assumed to be Area 1), the resource type identifier (assumed to be MP) of the selected IoT resource type (i.e., the target IoT resource type), the capability identifier (assumed to be PV) of the selected IoT resource capability (i.e., the target IoT resource capability), and the permission allocation rule information matched with the regional node association (i.e., the first permission type). Taking the rule code as an example, it is assumed that the rule code of the permission allocation rule matched with the regional node association is T1.
[0129] Among them, the permission allocation rule with rule code T1 is: the current role has permission to the video preview capability of all cameras associated with the selected area (including cameras associated with area 1 added later).
[0130] 2. Regional node narrowing association (can be called the second permission type)
[0131] Operation sequence: a check instruction for a target area is received, and then an IoT resource selection instruction for deselecting all IoT resources is received.
[0132] In this case, the IoT platform determines that the current role does not have permission to preview the videos of all cameras associated with the target area.
[0133] The permission information of the current role for the camera associated with the target area saved by the IoT platform includes: Area1, MP, PV and the permission allocation rule information associated with the area node reduction (i.e., the second permission type). Taking the rule code as an example, it is assumed that the rule code of the permission allocation rule associated with the area node reduction is T2.
[0134] Among them, the permission allocation rule with rule code T2 is: the current role has no permission to the video preview capability of all cameras associated with the selected area (including cameras associated with area 1 added later).
[0135] 3. Resource point narrowing association (can be called the third permission type)
[0136] Operation sequence: a check instruction for a target area is received, and then an IoT resource selection instruction for deselecting some IoT resources is received.
[0137] In this case, the IoT platform determines that the current role has the permission to preview the video of all cameras associated with the target area except for the deselected cameras.
[0138] The permission information of the camera in the target area corresponding to the current role saved by the IoT platform includes: Area1, MP, PV, the identification of the deselected camera, and the permission allocation rule information associated with the resource point reduction (i.e., the third permission type). Taking the rule code as an example, it is assumed that the rule code of the permission allocation rule associated with the resource point reduction is T3.
[0139] Among them, the permission allocation rule with rule code T3 is: the current role has permission to the video preview capability of all cameras associated with the selected area, except the camera corresponding to the camera identifier included in the permission information (including the cameras associated with the subsequently added area 1).
[0140] 4. Regional node amplification association (can be called the fourth permission type)
[0141] Operation sequence: Received at Figure 2B The first operation instruction for selecting the target area in the IoT resource organization structure shown is used to display all IoT resources mounted in the target area (hereinafter, the first operation instruction is taken as an example of a click instruction for the target area), and then an IoT resource selection instruction for selecting all target resources is received.
[0142] For example, when the IoT platform detects a click selection command for a target area, a list of cameras mounted in the target area may be automatically displayed, but any camera may not be automatically selected.
[0143] In this case, the IoT platform determines that the current role has permission to the video preview capability of all cameras mounted in the target area.
[0144] The permission information of the current role for the camera associated with the target area saved by the IoT platform includes: Area1, MP, PV and the permission allocation rule information matching the regional node zoom association (i.e., the fourth permission type). Taking the rule code as an example, it is assumed that the rule code of the permission allocation rule matching the regional node zoom association is T4.
[0145] Among them, the permission allocation rule with rule code T4 is: the current role has permission to the video preview capability of all cameras mounted in the selected area (including cameras mounted in area 1 added later).
[0146] 5. Resource point magnification association (can be called the fifth permission type)
[0147] Operation sequence: a click instruction for a target area is received, and then an IoT resource selection instruction for selecting some IoT resources is received.
[0148] In this case, the permission information of the current role for the camera associated with the target area saved by the IoT platform includes: Area1, MP, PV, the identifier of the selected camera, and the permission allocation rule information matching the resource point magnification association (ie, the fifth permission type). Taking the rule code as an example, it is assumed that the rule code of the permission allocation rule matching the resource point magnification association is T5.
[0149] Among them, the permission allocation rule with rule code T5 is: the current role has permission to the video preview capability of the camera corresponding to the camera identifier included in the permission information among all cameras mounted in the selected area, and does not have permission to the video preview capability of the remaining cameras (including cameras mounted in area 1 subsequently added).
[0150] See also Figure 3A In this embodiment, when a new camera (assuming it is camera N) is added to area 1, that is, a new camera N is mounted in area 1, for role A, the permission authentication process of the IoT platform for camera N can be as follows: Figure 3A As shown, where:
[0151] The IoT platform can query the saved permission information of role A to determine whether there is permission information including Area1 and MP. If so, the corresponding permission allocation rule is determined according to the rule code in the permission information, and the permission of role A to camera N is determined based on the permission allocation rule.
[0152] If there is no permission information including Area1 and MP, determine whether there is an area identifier of the parent area including area 1 and permission information of MP. If so, determine the corresponding permission allocation rule according to the rule code in the permission information, and determine the permission of role A to camera N based on the permission allocation rule.
[0153] If there is no area identifier of the upper-level area including area 1 and the authority information of the MP, it is determined that role A has no authority over camera N.
[0154] See also Figure 3B In this embodiment, when user User1 logs in to the IoT platform, the IoT platform can authenticate the rights of User1 as follows: Figure 3B As shown, where:
[0155] The IoT platform can determine the role of User1 (assuming it is role B) based on User1's user information, query the saved permission information of role B to determine the area where the IoT resources for which role B has permission exist, and display the area where the IoT resources for which role B has permission exist in the display interface.
[0156] When the IoT platform detects a selection instruction for any area displayed in the display interface, the IoT platform can display the IoT resources to which role B has authority in the selected area in the display interface.
[0157] When the IoT platform detects a selection instruction for any IoT resource displayed in the display interface, the IoT platform can enable the IoT resource capabilities to which role B has authority under the IoT resource selected in the display interface. Furthermore, User1 can operate the specified IoT resource capabilities of the specified IoT resource in the selected specified area as required.
[0158] In an embodiment of the present application, when resource permissions are assigned to a target role, the IoT resource organization structure corresponding to the target role's current permissions is displayed. When a first operation instruction is received to select target association information in the IoT resource organization structure, the target role's permissions to the IoT resources associated with the target association information are determined based on the first operation instruction. It is no longer necessary to assign resource permissions to each IoT resource separately. Compared with the implementation method of assigning resource permissions to each IoT resource separately in traditional solutions, the resource allocation efficiency is improved.
[0159] The method provided by the present application is described above. The device provided by the present application is described below:
[0160] See also Figure 4 , is a schematic diagram of the structure of a resource authority allocation device provided in an embodiment of the present application, such as Figure 4 As shown, the resource authority allocation device may include:
[0161] The display unit 410 is configured to display an IoT resource organization structure when allocating resource permissions to a target role, the IoT resource organization structure comprising at least IoT resources and associated information associated with the IoT resources, the IoT resources associated with the associated information comprising existing associated IoT resources and newly added associated IoT resources;
[0162] The receiving unit 420 is configured to receive a first operation instruction, where the first operation instruction is an instruction to select target association information in the IoT resource organization structure;
[0163] The allocation unit 430 is configured to determine the authority of the target role to the IoT resource associated with the target association information according to the first operation instruction.
[0164] In a possible embodiment, the first operation instruction is used to display and select all IoT resources associated with the target association information;
[0165] The allocation unit 430 is specifically configured to determine that the target role has authority over all the IoT resources associated with the target association information if the IoT resource selection operation instruction is not obtained; the IoT resource selection operation instruction is used to select from all the displayed IoT resources;
[0166] If the IoT resource selection operation instruction is obtained, the authority of the target role to the IoT resource associated with the target association information is determined according to the IoT resource selection operation instruction.
[0167] In a possible embodiment, the allocation unit 430 is specifically configured to, when the IoT resource selection instruction is to cancel the selection of all IoT resources, determine that the target role has no authority over all IoT resources associated with the target association information;
[0168] When the IoT resource selection instruction is to deselect some IoT resources, it is determined that the target role has authority over all IoT resources associated with the target association information except for the deselected IoT resources.
[0169] In a possible embodiment, the first operation instruction is used to display all IoT resources mounted with the target association information;
[0170] The allocation unit 430 is specifically configured to obtain an IoT resource selection instruction after the first operation instruction; the IoT resource selection operation instruction is used to select from all displayed IoT resources;
[0171] When the IoT resource selection instruction is to select all IoT resources, it is determined that the target role has permissions for all IoT resources mounted with the target association information;
[0172] When the IoT resource selection instruction is to select some IoT resources, it is determined that the target role has authority over the selected some IoT resources among all IoT resources mounted by the target association information.
[0173] In a possible embodiment, the association information associated with the IoT resource includes regional organization information, and the regional organization information is composed of regions of different hierarchical structures;
[0174] The receiving unit 420 is specifically configured to receive a target area selection operation instruction, which is used to select a target area in the regional organization information; the target association information is the target area, and the Internet of Things resources associated with the target association information include the existing Internet of Things resources within the target area and the Internet of Things resources newly added to the target area.
[0175] In a possible embodiment, the association information associated with the IoT resource further includes: IoT resource type organization information; the IoT resource type organization information is composed of IoT resource types of different hierarchical structures;
[0176] The receiving unit 420 is further configured to receive a second operation instruction before receiving the first operation instruction, wherein the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource type;
[0177] or,
[0178] The receiving unit 420 is also configured to receive a second operation instruction after receiving the first operation instruction, and the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information; the target IoT resource type is at least one IoT resource type in the IoT resource type organization information corresponding to the target area.
[0179] In a possible embodiment, the association information associated with the IoT resource further includes: IoT resource capability organization information; the IoT resource capability organization information is composed of IoT resource capability information of different hierarchical structures;
[0180] The receiving unit 420 is further configured to receive a third operation instruction before receiving the first operation instruction, wherein the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource capability;
[0181] or,
[0182] The receiving unit 420 is also configured to receive a third operation instruction after receiving the first operation instruction, and the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information, and the target IoT resource capability is at least one IoT resource capability information in the IoT resource capability information corresponding to the target area.
[0183] See also Figure 5 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 501, a communication interface 502, a memory 503 and a communication bus 504. The processor 501, the communication interface 502 and the memory 503 communicate with each other via the communication bus 504. Among them, the memory 503 stores a computer program; the processor 501 can execute the resource authority allocation method described above by executing the program stored in the memory 503.
[0184] The memory 503 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the memory 502 may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage media, or a combination thereof.
[0185] The present application also provides a machine-readable storage medium storing a computer program, such as Figure 5 The computer program may be stored in the memory 503. Figure 5 The processor 501 in the electronic device is executed to implement the resource authority allocation method described above.
[0186] The present application also provides a computer program stored in a machine-readable storage medium, such as Figure 5 The memory 503 in the memory, and when the processor executes the computer program, it prompts the processor 501 to execute the resource authority allocation method described above.
[0187] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0188] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A resource authority allocation method, characterized in that: include: When resource permissions are assigned to a target role, an IoT resource organization structure is displayed, wherein the IoT resource organization structure includes at least IoT resources and associated information associated with the IoT resources, wherein the IoT resources associated with the associated information include existing associated IoT resources and newly added associated IoT resources; Receive a first operation instruction, where the first operation instruction is an instruction to select target association information in the IoT resource organization structure; Determining, according to the first operation instruction, the authority of the target role to the IoT resource associated with the target association information; The association information associated with the IoT resource includes regional organization information, and the regional organization information is composed of regions of different hierarchical structures; The receiving of the first operation instruction includes: receiving a target area selection operation instruction, the target area selection operation instruction is used to select a target area in the area organization information; the target association information is the target area, and the IoT resources associated with the target association information include the IoT resources already in the target area and the IoT resources newly added to the target area; The association information associated with the IoT resource further includes: IoT resource capability organization information; the IoT resource capability organization information is composed of IoT resource capability information of different hierarchical structures; wherein resource capability refers to the capability possessed by the IoT resource; The receiving of the first operation instruction further includes: receiving a third operation instruction, wherein the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource capability; or, After receiving the first operation instruction, it further includes: receiving a third operation instruction, wherein the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information, and the target IoT resource capability is at least one IoT resource capability information in the IoT resource capability information corresponding to the target area.
2. The method according to claim 1, characterized in that The first operation instruction is used to display and select all IoT resources associated with the target association information; The step of determining, according to the first operation instruction, the authority of the target role to the IoT resource associated with the target association information includes: If the IoT resource selection operation instruction is not obtained, it is determined that the target role has authority over all IoT resources associated with the target association information; the IoT resource selection operation instruction is used to select from all the displayed IoT resources; If an IoT resource selection operation instruction is obtained, the authority of the target role to the IoT resource associated with the target association information is determined according to the IoT resource selection operation instruction.
3. The method according to claim 2, characterized in that The step of determining the authority of the target role to the IoT resource associated with the target association information according to the IoT resource selection operation instruction includes: When the IoT resource selection instruction is to cancel the selection of all IoT resources, determining that the target role has no authority over all IoT resources associated with the target association information; When the IoT resource selection instruction is to deselect some IoT resources, it is determined that the target role has authority over all IoT resources associated with the target association information except for the deselected IoT resources.
4. The method according to claim 1, characterized in that: The first operation instruction is used to display all IoT resources mounted by the target association information; The step of determining, according to the first operation instruction, the authority of the target role to the IoT resource associated with the target association information includes: Obtaining an Internet of Things resource selection instruction following the first operation instruction; the Internet of Things resource selection operation instruction is used to select from all the displayed Internet of Things resources; When the IoT resource selection instruction is to select all IoT resources, determining that the target role has authority over all IoT resources mounted by the target association information; When the IoT resource selection instruction is to select some IoT resources, it is determined that the target role has authority over the selected some IoT resources among all IoT resources mounted by the target association information.
5. The method according to claim 1, characterized in that The association information associated with the IoT resource further includes: IoT resource type organization information; the IoT resource type organization information is composed of IoT resource types of different hierarchical structures; The receiving of the first operation instruction further includes: receiving a second operation instruction, wherein the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource type; or, After receiving the first operation instruction, it further includes: receiving a second operation instruction, wherein the second operation instruction is used to select a target IoT resource type in the IoT resource type organization information; the target IoT resource type is at least one IoT resource type in the IoT resource type organization information corresponding to the target area.
6. A resource authority allocation device, characterized in that: include: A display unit is configured to display an IoT resource organization structure when allocating resource permissions to a target role, wherein the IoT resource organization structure includes at least IoT resources and association information associated with the IoT resources, wherein the IoT resources associated with the association information include existing associated IoT resources and newly added associated IoT resources; A receiving unit is configured to receive a first operation instruction, where the first operation instruction is an instruction to select target association information in the IoT resource organization structure; an allocating unit, configured to determine, according to the first operation instruction, the authority of the target role to the IoT resource associated with the target association information; The associated information associated with the IoT resource includes regional organization information, which is composed of regions of different hierarchical structures; The receiving unit is specifically configured to receive a target area selection operation instruction, the target area selection operation instruction is used to select a target area in the regional organization information; the target association information is the target area, and the IoT resources associated with the target association information include the IoT resources already in the target area and the IoT resources newly added to the target area; The associated information associated with the IoT resource further includes: IoT resource capability organization information; the IoT resource capability organization information is composed of IoT resource capability information of different hierarchical structures; wherein the resource capability refers to the capability possessed by the IoT resource; The receiving unit is further configured to receive a third operation instruction before receiving the first operation instruction, wherein the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information; the target area is at least one area in the area organization information corresponding to the target IoT resource capability; or, The receiving unit is also configured to receive a third operation instruction after receiving the first operation instruction, and the third operation instruction is used to select a target IoT resource capability in the IoT resource capability organization information, and the target IoT resource capability is at least one IoT resource capability information in the IoT resource capability information corresponding to the target area.
7. The device according to claim 6, characterized in that The first operation instruction is used to display and select all IoT resources associated with the target association information; The step of determining, according to the first operation instruction, the authority of the target role to the IoT resource associated with the target association information includes: If the IoT resource selection operation instruction is not obtained, it is determined that the target role has authority over all IoT resources associated with the target association information; the IoT resource selection operation instruction is used to select from all the displayed IoT resources; If an IoT resource selection operation instruction is obtained, the authority of the target role to the IoT resource associated with the target association information is determined according to the IoT resource selection operation instruction.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 5 when executing a program stored in a memory.
Citation Information
Patent Citations
Authority management method, device and system
CN107204964A
Monitoring resource allocation method and device and readable storage medium
CN111193905A
Resource-centric authorization schemes
US20120311672A1
Systems and methods for resource management
US20180285588A1
