Business resource management method and storage medium based on resource type metadata
By establishing a resource type metadata model and an associated inheritance system, the management problem of a wide variety of resources in the new generation of control systems has been solved, continuous updating of resource types and differentiated attribute configuration have been achieved, and management efficiency and the accuracy of access rights have been improved.
Patent Information
- Application Number
- CN202011292884.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-18
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2040-11-18
AI Technical Summary
In the new generation of control systems, resources are numerous and differentiated, making it impossible to achieve unified management and differentiated access control, and the independence requirements of scene resource sets are not met.
By establishing a resource type metadata model, including resource type table, extended attribute table, instance table, extended attribute value table, scene resource table and scene information table, the scene resource tree is constructed using the associative inheritance system, and access rights are controlled based on the resource path to achieve resource management and permission configuration.
It realizes the continuous update of resource types and differentiated attribute configuration, improves management efficiency, meets the needs of independent collection of scene resources, and ensures the accuracy and security of access rights.
Smart Images

Figure CN114548616B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid dispatching automation, and in particular to a business resource management method and storage medium based on resource type metadata. Background Art
[0002] The new generation of control systems breaks the geographical limitations of previous smart grid dispatching and control systems, shifting from a single local system to a collaborative operation model involving multiple geographically distributed systems. Interactions between systems and the sharing of information resources have become more frequent, and the types of business resources subject to controlled access are numerous and cannot be fixed in advance. Known business resources include business functions, web resources, device records, and disk files. In addition to common attributes such as resource name and resource code, different types of business resources also possess independent attributes. For example, web resources have page path attributes, device records have table names and indexes at various levels, and disk files have file root directories and extensions. Access control methods for different resource types also differ. Web resources have two control modes: "allow" and "deny," while file resources have "file read," "file edit," and "file read prohibited." Device table records have three control modes: "read," "edit," and "read prohibited." Furthermore, building on the existing "state" and "application" concepts, the new generation of control systems introduces the "scenario" design concept, requiring each "scenario" in the system to have an independent set of business resources.
[0003] Therefore, it is necessary to propose a business resource management method based on resource type metadata to address the practical requirements of the new generation of control systems, such as the wide variety of resources that need unified management, differentiated attributes and access efficiency configurations between resources, and scenarios with independent resource collections. Summary of the Invention
[0004] To solve the above problems, the present invention proposes a business resource management method and storage medium based on resource type metadata, which improves resource management efficiency by abstractly modeling resource types, establishing a resource instance pool, constructing a scenario resource tree using an associative inheritance system, and controlling access rights based on resource paths.
[0005] The present invention adopts the following technical solution. The present invention provides a business resource management method based on resource type metadata, comprising the following steps: establishing a business resource management model, wherein the business resource management model includes an established resource type table, a resource type extended attribute table, a resource instance table, a resource instance extended attribute value table, a scenario resource table, and a scenario information table;
[0006] The resource type table is associated with the resource type extended attribute table and the resource instance table respectively through the resource type serial code; the resource instance table is associated with the resource instance extended attribute value table through the resource instance serial code; the resource instance extended attribute value table is associated with the resource type extended attribute table through the resource type extended attribute serial code; the scene resource table is associated with the resource instance table through the resource instance serial code; the scene resource table is associated with the scene information table through the scene serial code.
[0007] Business resources are managed through the established business resource management model.
[0008] Furthermore, the data stored in the resource type table include: resource type serial code, resource type code, resource type name, permission effect and the user permission effect table corresponding to the resource type. The data stored in the user permission effect table include user account, scene resource path and whether it has permission effect.
[0009] Furthermore, the data stored in the resource type extended attribute table include: resource type extended attribute sequence code, resource type sequence code, resource type extended attribute name, and data type of resource type extended attribute value.
[0010] Furthermore, the data stored in the resource instance table include: resource instance serial code, resource type serial code, resource instance name, resource instance code; the data stored in the resource instance extended attribute value table include: resource instance extended attribute serial code, resource instance serial code, resource type extended attribute serial code and resource instance extended attribute value.
[0011] Furthermore, the data stored in the scene resource table include: scene resource sequence code, associated resource instance sequence code, belonging scene sequence code, parent scene resource sequence code, and resource path; the data stored in the scene information table include: scene sequence code, scene name, and scene code.
[0012] Furthermore, scene resource codes within the same level of scene resources cannot be repeated. The resource path is formed by combining the resource type code and the resource instance codes associated with all parent resources. The resource path coding format is:
[0013] Scenario name: Resource type code: / First-level parent resource code / Second-level parent resource code / ... / Direct parent resource code / Own resource type code.
[0014] Furthermore, the business resource management method based on resource type metadata is characterized in that the management of business resources is achieved through the established business resource management model, including controlling the access rights of scene resources based on the resource path, specifically including: allocating specific access rights for scene resources to users before they access the scene resources, and saving them to the user access rights table; when the user accesses the scene resource with a certain access right, parsing the resource type code from the resource path, determining the resource type based on the obtained resource type code, retrieving the actual access rights from the user access rights table of the resource type based on the "user account" and the "scene resource path", and rejecting the access operation when the access rights do not match.
[0015] Furthermore, the business resource management model established is used to manage business resources, including newly added scene resources. Specifically, the following steps are performed: first, the parent node of the scene resource to be added is identified, and whether the scene resource type to be added already exists in the system;
[0016] If not, define the corresponding type metadata and save it to the resource type table and resource type extended attribute table;
[0017] If the system already has the resource type, check whether there is a resource instance corresponding to the scene resource to be added. If not, define the corresponding resource instance and save it to the resource instance table and resource instance attribute extension table;
[0018] If the system already has a resource instance, associate the resource type with the resource instance and inherit the attribute items, supplement the scene resource table information, and complete the addition of the scene resource.
[0019] The beneficial technical effects achieved by the present invention are:
[0020] The method of the present invention realizes continuous updating of resource types and configuration of differentiated attributes and access effectiveness through abstract modeling of resource types, introduces resource instances without scene attributes, and adopts an associative inheritance system to realize convenient construction of scene resource trees, thereby facilitating the management of scene resources, improving management efficiency, and meeting the requirements of scenes having independent resource sets; by controlling the access rights of scene resources based on resource paths through the established scene resource tree, effective management requirements for business resources of the new generation of control systems are realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 This is a prototype of the resource management table structure based on resource type metadata in a specific embodiment of the present invention;
[0023] Figure 2 This is the metadata definition of known resource types in the new generation control system according to a specific embodiment of the present invention;
[0024] Figure 3 This is a flowchart of the process of defining a resource tree for a business scenario in a specific embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the process of allocating scene resource authority to users in a specific embodiment of the present invention;
[0026] Figure 5 This is a specific embodiment of the present invention that controls the access permission process of scene resources based on resource paths. DETAILED DESCRIPTION
[0027] The present invention will be further described below with reference to the accompanying drawings.
[0028] Business resource management methods for local resource type metadata, such as Figure 1 Shown, including:
[0029] 1) Establish a business resource type table, clarify its authority and extended attributes, complete the abstract modeling of resource types, and save it to the resource type table and resource type extended attribute table. The resource type table is used to define the resource type name, resource type code, and the authority corresponding to the resource type. The resource type table is required to have four field elements: "resource type name", "resource type code", "authority", and "user authority table". The resource type extended attributes define the characteristic attributes of the resource type. For example, device record resources have table names and index attributes for each level of tables, and disk file resources have file root directory and extension attributes. The resource type extended attribute table is required to have three field elements: "resource type extended attribute name", "resource type extended attribute value data type", and "resource type serial code".
[0030] 2) Generate a corresponding user permission table for each resource type. The user permission table stores the user's specific access permissions for each scenario resource of this type. It must contain the following fields: "User Account," "Scene Resource Path," and a corresponding permission field for all permission values of the resource type. For example, a user permission table for a device record type may contain the following fields: "User Account," "Scene Resource Path," "Readable," "Editable," and "Read Prohibited."
[0031] 3) Introduce resource instances without scene attributes and establish a resource instance pool. Define instance objects of resource types and save them to the resource instance table and resource instance extended attribute value table to form a resource instance pool. Resource instances and resource instance extended attributes are used to describe a specific resource object, such as graphic file resources, report file resources, grounding switch table resources, etc. The resource instance table is required to have three field elements: "resource instance name", "resource instance code", and "resource type code". The resource instance extended attribute value table is required to have three field elements: "resource instance", "resource type extended attribute", and "extended attribute value". Resource instances do not belong to any scene and can only be associated with scene resources in step 4).
[0032] 4) The scenario uses an associative inheritance system to construct its own independent resource collection tree. This involves associating the required instance objects from the resource instance pool, inheriting all their basic and extended attributes, and appending scenario attributes to form a scenario resource object, which is then saved in the scenario resource table. The next-generation control system business scenarios often share a large number of resources with the same attributes. To avoid duplicate definitions across scenarios, these resources are first defined as scenario-independent resource instances in step 3). The scenarios are then associated and scenario attributes are appended to form scenario resources. The scenario resource table is required to have four fields: "Associated Resource Instance Serial Number," "Affiliated Scenario," "Parent Scenario Resource," and "Resource Path." When associating a resource instance, a scenario must specify its parent resource. The entire scenario resource collection is organized in a tree-like structure. Resource codes within the same level of a scenario resource node cannot be repeated. The "resource path" for a child scenario is formed by combining the resource type code and the "resource codes" of all resource instances associated with the parent scenario resource. The formation rule is: scenario name: resource type code: / first-level parent resource code / second-level parent resource code / ... / direct parent resource code / self-code. This resulting resource path is unique.
[0033] 5) Control access rights to scene resources based on the scene resource path. Before a user accesses a scene resource, specific access rights are assigned to the user, such as "file can be read", "file can be edited", and "file cannot be read" for file resources, and saved in the user permission table for that resource type. When a user accesses the scene resource with a certain permission, the resource type is parsed from the resource path, and the actual access rights are retrieved from the user permission table of the resource type based on the "user account" and "scene resource path". If the permission does not match, the access operation is denied to avoid unauthorized access.
[0034] Attachment Figure 1The prototype design of the resource management table structure is based on the resource type metadata. The metadata related to resource management includes resource types, resource type extended attributes, user authority effectiveness table of resource types, resource instances, resource instance extended attributes, and scenario resources. In the figure, PK indicates that the field is the primary key of the table, and FK indicates that the field is a foreign key. Resource types are used to define a resource type and its corresponding authority effectiveness; resource type extended attributes are used to describe the extended attributes of the resource type, such as device record resources with table names and index attributes of various levels of tables, and disk file resources with file root directories and extension attributes; user authority effectiveness describes the user's access effectiveness to specific scenario resources; resource instances and resource instance extended attributes are used to define specific resource objects, such as graphic file resources, report file resources, grounding switch table resources, etc.; scenario resources are formed by associating resource instances and have scenario attributes.
[0035] like Figure 1 The resource type table is associated with the resource type extended attribute table and the resource instance table through the resource type serial code; the resource instance table is associated with the resource instance extended attribute value table through the resource instance serial code; the resource instance extended attribute value table is associated with the resource type extended attribute table through the resource type extended attribute serial code; the scene resource table is associated with the resource instance table through the resource instance serial code; the scene resource table is associated with the scene information table through the scene serial code.
[0036] Attachment Figure 2 This section defines metadata for known resource types in the new generation control system. The known resource types for the new generation control system's scenario resources include: functional resource class, web resource class, permission object class, data record class, and disk file class. The functional resource type is coded as RESTYPE_OP, with a "function code" attribute and access permissions of "allow" or "deny"; the web resource type is coded as RESTYPE_URL, with a "URL path" attribute and access permissions of "allow" or "deny"; the data record resource type is coded as RESTYPE_DATA, with device table index-related attributes and access permissions of "readable," "editable," and "deny read"; the disk file resource type is coded as RESTYPE_FILE, with "file root directory" and "extension name" attributes and access permissions of "file readable," "file editable," and "file deny read."
[0037] Attachment Figure 3Flowchart of the business scenario resource definition process. First, clarify the parent node of the scenario resource to be added, and determine whether the system already has the scenario resource type RESTYPE to be added. If not, define the type metadata, including resource type code, authority validity, and extended attributes, and generate its user authority validity table RESTYPE_USER_AUTH. If the system already has the resource type RESTYPE, check whether there is a resource instance corresponding to the scenario resource to be added. If not, define the corresponding resource instance ResInstance, including resource name, resource code, and extended attribute value. If the system already has the resource instance ResInstance, associate the resource type RESTYPE with the resource instance ResInstance and inherit the attribute items, supplement the scenario attributes and scenario resource path, and complete the addition of the scenario resource.
[0038] Figure 4 、 Figure 5 To control the access rights of scene resources based on resource paths. Figure 4 When assigning scene resource permissions to users, the user account, resource path, and access permission are saved in the user permission table for the resource type. Figure 5 When determining whether a user has a specific permission for a scene resource, the corresponding user permission table is retrieved through the user account and resource path to obtain the access permission assigned to the user. If a match is successful, access is allowed to continue, otherwise it is denied.
[0039] The working principle of the present invention is:
[0040] This invention addresses the practical requirements of the new generation of control systems, such as the need for unified management of a wide variety of resources, differentiated attributes and access efficiency configuration between resources, and independent resource sets in scenarios. The design is carried out from the following aspects:
[0041] Establish business resource types, clarify their permissions and extended attributes, complete resource type metadata abstract modeling, save them to the resource type table and resource type extended attribute table, realize continuous updating of resource types, and configure differentiated attributes and access effectiveness.
[0042] Generate a corresponding user permission and effectiveness table for each resource type. The user permission and effectiveness table is used to store the user's specific access permissions for each scenario resource of this type. It requires the following mandatory fields: "user account", "scenario resource path", and effectiveness fields corresponding to all permission and effectiveness values of the resource type.
[0043] Introduce resource instances without scenario attributes and establish a resource instance pool. This pool is formed by defining instance objects of specific resource types and saving them to the resource instance table and the resource instance extended attribute value table. The next-generation control system has many resources with the same attributes across business scenarios. To avoid duplicate definitions, scenario-independent resource instances must be defined first, and then associated with each scenario as needed. Resource instances themselves do not have scenario attributes and do not belong to any scenario.
[0044] The scene uses an associative inheritance system to build its own independent resource collection tree. The scene associates the required resource instance objects from the resource instance pool, inherits all its resource properties, and appends scene properties to form a scene resource object. When associating a resource instance, the scene must clearly identify its parent resource, and the entire scene resource collection is presented in a tree-like state. The internal resource codes at the same level of the scene resource node cannot be repeated. The "resource path" of the child scene is formed by combining the resource type code and the "resource code" of the resource instances associated with all parent resources. The formation rule is: scene name: resource type code: / first-level parent resource code / second-level parent resource code / ... / direct parent resource code / self-code. The formed resource path is unique.
[0045] Control access rights to scene resources based on the resource path. Before a user accesses a scene resource, a specific access right is assigned to the user and saved in the user access right table. When a user accesses a scene resource with a certain access right, the resource type is parsed from the resource path. Based on the "user account" and "scene resource path," the user's actual access right is retrieved from the user access right table of the resource type. If the access right does not match, access is denied to prevent unauthorized access.
[0046] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0047] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0048] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0049] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0050] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.
Claims
1. A business resource management method based on resource type metadata, characterized in that: include: Establish a business resource management model, including establishing a resource type table, a resource type extended attribute table, a resource instance table, a resource instance extended attribute value table, a scenario resource table, and a scenario information table; The resource type table is associated with the resource type extended attribute table and the resource instance table through the resource type serial code; the resource instance table is associated with the resource instance extended attribute value table through the resource instance serial code; the resource instance extended attribute value table is associated with the resource type extended attribute table through the resource type extended attribute serial code; the scene resource table is associated with the resource instance table through the resource instance serial code; the scene resource table is associated with the scene information table through the scene serial code; The resource instance table stores the resource instance serial code, the resource type serial code, the resource instance name, and the resource instance code; the resource instance extended attribute value table stores the resource instance extended attribute serial code, the resource instance serial code, the resource type extended attribute serial code, and the resource instance extended attribute value; scene resource codes within the same level of scene resources are not repeated; Business resources are managed through the business resource management model, including: Control access rights to scene resources based on resource paths: Before a user accesses a scene resource, specific access rights are assigned to the user and saved in the user rights table. When a user accesses a scene resource with a certain rights, the resource type code is parsed from the resource path. The resource type is determined based on the obtained resource type code. The user's actual access rights are retrieved from the user rights table based on the user account and scene resource path. If the rights do not match, access is denied. Adding new scene resources: Identify the parent node of the scene resource to be added, and determine whether the system already has the scene resource type to be added; if not, define the corresponding type metadata and save it to the resource type table and resource type extension attribute table; if the system already has the resource type, check whether there is a resource instance corresponding to the scene resource to be added, if not, define the corresponding resource instance and save it to the resource instance table and resource instance attribute extension table; if the system already has a resource instance, associate the resource type with the resource instance and inherit the attribute items, supplement the scene resource table information, and complete the addition of the scene resource.
2. The business resource management method based on resource type metadata according to claim 1, characterized in that: The data stored in the resource type table include: resource type serial code, resource type code, resource type name, permission effect and the user permission effect table corresponding to the resource type. The data stored in the user permission effect table include user account, scene resource path and whether it has permission effect.
3. The business resource management method based on resource type metadata according to claim 1, characterized in that: The data stored in the resource type extended attribute table include: resource type extended attribute sequence code, resource type sequence code, resource type extended attribute name and data type of resource type extended attribute value.
4. The business resource management method based on resource type metadata according to claim 2, characterized in that: The data stored in the scene resource table include: scene resource sequence code, associated resource instance sequence code, belonging scene sequence code, parent scene resource sequence code and resource path; the data stored in the scene information table include: scene sequence code, scene name and scene resource code.
5. The business resource management method based on resource type metadata according to claim 1, characterized in that: The resource path is formed by combining the resource instance codes associated with all parent resources. The resource path coding format is: Scenario name: Resource type encoding: / 1st-level parent resource encoding / 2nd-level parent resource encoding / … / direct parent resource encoding / own resource type encoding.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.