CN116643830A - Role display method and device and computer readable storage medium - Google Patents

Role display method and device and computer readable storage medium Download PDF

Info

Publication number
CN116643830A
CN116643830A CN202310665893.0A CN202310665893A CN116643830A CN 116643830 A CN116643830 A CN 116643830A CN 202310665893 A CN202310665893 A CN 202310665893A CN 116643830 A CN116643830 A CN 116643830A
Authority
CN
China
Prior art keywords
layer
role
authority
graph
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310665893.0A
Other languages
Chinese (zh)
Inventor
张洺棋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310665893.0A priority Critical patent/CN116643830A/en
Publication of CN116643830A publication Critical patent/CN116643830A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention provides a role display method, a role display device and a computer readable storage medium, wherein the method comprises the following steps: acquiring a plurality of authorities of a target system; drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right; for each role in the target system, the following steps are respectively executed: and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer. The method, the device and the computer readable storage medium can solve the problems that the prior art does not have readability and cannot intuitively display the association heat of the authority and the roles when the connection line is drawn on the plan to express the relationships among a plurality of roles and the authorities.

Description

Role display method and device and computer readable storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a role display method, a role display device, and a computer readable storage medium.
Background
Currently, a role-based access control model is often adopted for rights management in a software system, and the access control model comprises three types of subjects including a user, a role and rights, and binding relations among the three types of subjects. In order to facilitate the assignment of rights to users, a set of rights instances is often assigned to a Role instance, so that a Role of assigning rights to users is equivalent to the assigned rights, as shown in fig. 1, an RBAC (Role-Based Access Control ) relationship graph is implemented by using an ellipse and a rectangle to represent one instance of rights and roles, respectively, on a plan view, and using a connection line between graphs to represent the assigned rights relationship.
However, as a software system is popularized and used, the number of users, rights and role instances is increased, the number of roles and rights instances in the existing large-scale software system is thousands, and the number of relationships between instances is tens of thousands, so that a system operation and maintenance team faces rights management trouble, for example: how many rights instances, role instances, and how they are used in the system; how to quickly understand the rights structure of a user; whether the combination of some authority examples needs to establish a role assignment right or not, and the problems are that when a plurality of roles are expressed by drawing a connecting line on a plan view, the relationship between the authorities is not readable, and the association heat of the authorities and the roles cannot be visually displayed.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a role display method, a role display device and a computer readable storage medium aiming at the defects of the prior art, so as to solve the problems that the prior art has no readability and cannot intuitively display the association heat of the roles and the roles when a plurality of roles and rights are expressed by drawing a connecting line on a plan view.
In a first aspect, the present invention provides a role display method, including:
acquiring a plurality of authorities of a target system;
drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right;
for each role in the target system, the following steps are respectively executed:
and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer.
Further, the rights include menu rights and service type rights, and the drawing of the rights layer according to the rights of the target system specifically includes:
acquiring the authority layer, drawing graphs corresponding to a plurality of menu authorities and service type authorities on the authority layer through a tree structure according to the inclusion relation of the authorities, and adding authority codes to the graphs, wherein the authority codes are in one-to-one correspondence with the graphs;
and storing all the authority codes and the central points of the corresponding graphs in global variables.
Further, according to the authority layer, drawing the graph corresponding to the authority owned by the role on the role layer, specifically including:
searching a central point of a graph corresponding to the same authority code in the authority layer through a global variable according to the authority code owned by the role;
for the center point of each corresponding graph of the same authority codes in the authority layer, the following steps are respectively executed:
taking the center point of the graph corresponding to the role in the authority graph layer as the center point of the graph corresponding to the role, drawing the graph in the role graph layer through the center point of the graph corresponding to the role, and adding a role code and a graph layer ID to the role;
the role code and the layer ID are stored in a global variable.
Further, the method further comprises:
and sequencing the plurality of role layers according to a preset sequencing list.
Further, the sorting the plurality of role layers according to the preset sorting list specifically includes:
acquiring the sequencing list;
and sequentially modifying Z-index attribute values corresponding to each role layer according to the sequence of each role layer in the sequencing list.
Further, the method further comprises:
when the role corresponding to the target authority is required to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer with the target authority.
Further, when the role corresponding to the target authority needs to be searched, modifying the transparency attribute value of the corresponding layer, so that only the role layer with the target authority is displayed, and specifically including:
acquiring the target authority clicked by a user in the authority layer;
according to the target authority, searching an authority code of the target authority through the global variable, and acquiring a role code with the authority code;
according to the character codes, searching a character layer ID with target authority through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID without the target authority into invisible so as to display the character layer with the target authority in a distinguishing way.
Further, the method further comprises:
when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer possessed by the target user.
Further, when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer, so that only the role layer possessed by the target user is displayed, and specifically including:
acquiring the role code of the target user;
according to the role codes, searching a role layer ID of the target user through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID which is not possessed by the target user into invisible so as to display the character layer possessed by the target user in a distinguishing way.
In a second aspect, the present invention provides a character presentation apparatus comprising:
the acquisition module is used for acquiring a plurality of authorities of the target system;
the first drawing module is connected with the acquisition module and is used for drawing an authority layer according to a plurality of authorities of the target system;
and the second drawing module is connected with the first drawing module and is used for acquiring a role layer and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer.
In a third aspect, the present invention provides a character presentation apparatus comprising a memory in which a computer program is stored and a processor arranged to run the computer program to implement the character presentation method of the first aspect.
In a fourth aspect, the present invention provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements the character presentation method according to the first aspect.
The role display method, the role display device and the computer readable storage medium provided by the invention are characterized in that firstly, a plurality of authorities of a target system are acquired; then drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right; and for each role in the target system, respectively executing the following steps: and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer. According to the invention, a graphic layer is drawn through the authority drawing authority layer by utilizing the authority drawing means, the graph of the authority possessed by the role in the role layer is drawn according to the graph corresponding to the authority in the authority layer, the data of the RBAC model is converted into a three-dimensional layer structure, the connection problem in the RBAC model data visualization can be avoided, and the problems that the connection line is drawn on the plane graph in the prior art, the relationship between a plurality of roles and the authorities is not readable and the associated heat degree of the authorities and the roles cannot be intuitively displayed are solved.
Drawings
FIG. 1 is a schematic diagram of RBAC relationships according to an embodiment of the present invention;
fig. 2 is a flowchart of a role display method in embodiment 1 of the present invention;
FIG. 3 is a schematic diagram of a rights layer according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the ordering of character layers according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a character display device according to embodiment 2 of the present invention;
fig. 6 is a schematic structural diagram of a character display device according to embodiment 3 of the present invention.
Detailed Description
In order to make the technical scheme of the present invention better understood by those skilled in the art, the following detailed description of the embodiments of the present invention will be given with reference to the accompanying drawings.
It is to be understood that the specific embodiments and figures described herein are merely illustrative of the invention, and are not limiting of the invention.
It is to be understood that the various embodiments of the invention and the features of the embodiments may be combined with each other without conflict.
It is to be understood that only the portions relevant to the present invention are shown in the drawings for convenience of description, and the portions irrelevant to the present invention are not shown in the drawings.
It should be understood that each unit and module in the embodiments of the present invention may correspond to only one physical structure, may be formed by a plurality of physical structures, or may be integrated into one physical structure.
It will be appreciated that, without conflict, the functions and steps noted in the flowcharts and block diagrams of the present invention may occur out of the order noted in the figures.
It is to be understood that the flowcharts and block diagrams of the present invention illustrate the architecture, functionality, and operation of possible implementations of systems, apparatuses, devices, methods according to various embodiments of the present invention. Where each block in the flowchart or block diagrams may represent a unit, module, segment, code, or the like, which comprises executable instructions for implementing the specified functions. Moreover, each block or combination of blocks in the block diagrams and flowchart illustrations can be implemented by hardware-based systems that perform the specified functions, or by combinations of hardware and computer instructions.
It should be understood that the units and modules related in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, for example, the units and modules may be located in a processor.
Example 1:
the embodiment provides a role display method, as shown in fig. 2, including:
step S101: a plurality of permissions of a target system are acquired.
It should be noted that, the role display method provided in this embodiment is applied to the software system provided in this embodiment, where the rights in the software system include one or more menu rights, each menu right further includes one or more service type rights, and these 2 types of rights have a structural relationship, where the set of all rights in the software system forms a tree structure, the first level is a root node in the software system, corresponding to a first-level menu right, the second level is a menu directory under the root node in the software system, corresponding to a second-level menu right, the third level is a function page under the menu directory in the software system, corresponding to a third-level menu right, the fourth level is a service type under the function page in the software system, corresponding to a service type right, and the query condition of the menu interface includes a service type right option column. It should be noted that, according to different menu levels in the software system, the menu authority may be further subdivided into a first-level menu authority, a second-level menu authority, a third-level menu authority, and the like.
Specifically, all rights are queried and obtained in the software system database.
Step S102: and drawing a right layer according to the plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right.
Specifically, according to the structural relation between the menu authority and the service type authority, all the authorities acquired in the software system database are drawn on a layer 0 (namely, an authority layer) of the software system in a graphic form, wherein the layer 0 is positioned at the bottommost layer in the three-dimensional space.
In an optional embodiment, the rights include menu rights and service type rights, and the drawing of the rights layer according to the plurality of rights of the target system specifically includes:
acquiring the authority layer, drawing graphs corresponding to a plurality of menu authorities and service type authorities on the authority layer through a tree structure according to the inclusion relation of the authorities, and adding authority codes to the graphs, wherein the authority codes are in one-to-one correspondence with the graphs;
and storing all the authority codes and the central points of the corresponding graphs in global variables.
Specifically, as shown in fig. 3, a JavaScript language is used, a canvas element is instantiated in a webpage, the CSS (Cascading Style Sheets, cascading style sheet) style Z-index attribute value of the canvas is 0, the painting brush color is black, a dot with a radius of 20 pixels is drawn at the 0 point of the canvas element, the first level menu is represented, the text is added above the dot, the text content is the name and the code of the first level menu, the dot with a radius of 16 pixels is drawn vertically downwards in sequence on the canvas element, each dot represents a second level menu, the text is added above the dot, the text content is the name and the code of the second level menu, each dot on the canvas element represents the right lower part of the second level menu, the dot with a radius of 12 pixels is drawn vertically downwards in sequence, each dot represents a third level menu, the text content is the name and the code of the third level menu is added above the dot, the text content is the right lower part of the third level menu, the horizontal right is a rectangle with a radius of 8 pixels, each dot represents a rectangle above the rectangle is a service coordinate value, the global value is the name and the Map is the Map type, the Map is the Map type is displayed, and the Map is the Map type is displayed in sequence, and the Map is the Map type is displayed in the Map.
Step S103: for each role in the target system, the following steps are respectively executed:
and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer.
Specifically, all the authorities of the role are obtained from a software system database, and the authorities of the role are drawn on a layer 1 (i.e. a role layer) of the software system in a graphic form according to the graphic positions of the corresponding authorities on the layer 0.
It should be noted that, each character corresponds to a character layer, and the sequence of the sequence numbers of the character layers is the same as the sequence of the character layers for drawing the character.
In an optional embodiment, the drawing, according to the authority layer, a graph corresponding to the authority owned by the role on the role layer specifically includes:
searching a central point of a graph corresponding to the same authority code in the authority layer through a global variable according to the authority code owned by the role;
for the center point of each corresponding graph of the same authority codes in the authority layer, the following steps are respectively executed:
taking the center point of the graph corresponding to the role in the authority graph layer as the center point of the graph corresponding to the role, drawing the graph in the role graph layer through the center point of the graph corresponding to the role, and adding a role code and a graph layer ID to the role;
the role code and the layer ID are stored in a global variable.
Specifically, in the software system, a user that supports the assignment of a set of rights to a given role and then grants that role will acquire the set of rights. Taking the role of 'order delivery person' as an example, drawing the authority range of the order delivery person on a layer 1, wherein the layer 1 is positioned on a layer above the layer 0 in a three-dimensional space;
step 1: all rights for the role of "order deliverer" are queried in the software system database, as shown in Table 1:
table 1: all rights of "order deliverer" in software systems database
Character encoding Authority encoding
Role_Order_Delivery MENU000
Role_Order_Delivery MENU004
Role_Order_Delivery MENU005
Role_Order_Delivery ORDERYW
Step 2: using JavaScript language to instantiate a canvas element in the webpage, wherein the CSS style Z-index attribute value of the canvas is 1, the color of the painting brush is blue, and the transparency is 50%;
step 3: extracting coordinate values and radiuses corresponding to each authority code on the layer 0 from the global variable element position map according to all authority codes of the role of 'order delivery person' inquired in the step 1;
step 4: drawing a circle representing all rights of an order delivery person on the layer 1 according to the coordinate values extracted in the step 3 as a circle center and a radius;
step 5: storing a Role code of 'Order deliverer' in a global variable LayerMap, wherein the variable is of the Map type, the key name in the Map is the Role code, and the key value is the layer ID;
step 6: repeating the steps 1 to 5, drawing the authority of all roles on a new layer, and storing the authority into a global variable LayerMap.
In an alternative embodiment, the method further comprises:
and sequencing the plurality of role layers according to a preset sequencing list.
In an optional embodiment, the ranking the plurality of role layers according to the preset ranking list specifically includes:
acquiring the sequencing list;
and sequentially modifying Z-index attribute values corresponding to each role layer according to the sequence of each role layer in the sequencing list.
Specifically, as shown in fig. 4, in the software system, the method supports sorting according to character attributes, increases the attribute value of the layer Z-index corresponding to the characters according to the sorting order, thereby realizing the visualization of character sorting, and sorts by taking the creation time of the characters as an example, and specifically comprises the following steps:
step 1: ordering inquiry is carried out in a software system database according to the creation time of the roles, as shown in table 2:
table 2: roles in software System database ordered by creation time
Character encoding Creation time
Role_Order_Delivery 000000
Role_Order_Audit 000001
Role_Order_Read 000002
Step 2: acquiring a character layer ID set according to the character coding set in the step 1 in sequence in a global variable LayerMap;
step 3: modifying Z-index attributes of corresponding layers one by one in the ordered ID set in the step 2, wherein the Z-index of the layer corresponding to the first ID is an attribute value of 1, the Z-index of the layer corresponding to the second ID is an attribute value of 2, and the like.
In an alternative embodiment, the method further comprises:
when the role corresponding to the target authority is required to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer with the target authority.
In an optional embodiment, when the role corresponding to the target authority needs to be searched, modifying the transparency attribute value of the corresponding layer, so that only the role layer with the target authority is displayed, and specifically includes:
acquiring the target authority clicked by a user in the authority layer;
according to the target authority, searching an authority code of the target authority through the global variable, and acquiring a role code with the authority code;
according to the character codes, searching a character layer ID with target authority through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID without the target authority into invisible so as to display the character layer with the target authority in a distinguishing way.
Specifically, in the software system, the role is selected according to the authority instance selected by the user, the role without the assigned authority is removed, and the screening result is graphically displayed, and the specific steps are as follows:
step 1: as shown in fig. 3, when the user clicks a circle representing the authority instance "order taking" on the layer 0, extracting the authority instance code MENU005 corresponding to the clicked circle on the global variable elementposition according to the click coordinates;
step 2: inquiring a role code set with the authority according to the authority code in a system database;
step 3: acquiring a character layer ID set from the global variable LayerMap according to the character coding set in the step 2;
step 4: modifying the visual attribute of the color layer on the Web page, and if the graphic ID is not in the set of the step 3, setting the display attribute of the layer to none;
step 5: when the user clicks the circle corresponding to the other authority instance on the layer 0 again, the role layer is screened again according to the steps 1 to 4.
In an alternative embodiment, the method further comprises:
when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer possessed by the target user.
In an optional embodiment, when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer, so as to display only the role layer possessed by the target user, and specifically including:
acquiring the role code of the target user;
according to the role codes, searching a role layer ID of the target user through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID which is not possessed by the target user into invisible so as to display the character layer possessed by the target user in a distinguishing way.
Specifically, the software system supports the graphical display of the authority relationship of a designated job number, including the role owned by the job number and the authority instance owned by the role, and the specific implementation steps are as follows:
step 1: all role codes of the work number of Zhang San are inquired in a software system database, as shown in a table 3:
table 3: all character codes of Zhang Sans in software system database
Work number code Character encoding
Zhangsan Role_Order_Delivery
Zhangsan Role_Order_Audit
Step 2: acquiring a character layer ID set from the global variable LayerMap according to the character coding set in the step 1;
step 3: the visual attribute is modified for the graphic layer on the Web page, and if the graphic ID is in the set of step 2, the display attribute of the graphic layer is set to none.
The role display method provided by the embodiment of the invention comprises the steps of firstly acquiring a plurality of authorities of a target system; then drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right; and for each role in the target system, respectively executing the following steps: and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer. According to the invention, a graphic layer is drawn through the authority drawing authority layer by utilizing the authority drawing means, the graph of the authority possessed by the role in the role layer is drawn according to the graph corresponding to the authority in the authority layer, the data of the RBAC model is converted into a three-dimensional layer structure, the connection problem in the RBAC model data visualization can be avoided, and the problems that the connection line is drawn on the plane graph in the prior art, the relationship between a plurality of roles and the authorities is not readable and the associated heat degree of the authorities and the roles cannot be intuitively displayed are solved.
Example 2:
as shown in fig. 5, this embodiment provides a role display device, configured to execute the above role display method, including:
an acquisition module 11, configured to acquire a plurality of rights of a target system;
the first drawing module 12 is connected with the obtaining module 11 and is used for drawing a right layer according to a plurality of rights of the target system;
and the second drawing module 13 is connected with the first drawing module 12 and is used for obtaining a role layer and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer.
Further, the rights include menu rights and service type rights, and the first drawing module 12 specifically includes:
the drawing unit is used for obtaining the authority layer, drawing graphs corresponding to the menu authorities and the service type authorities on the authority layer through a tree structure according to the inclusion relation of the authorities, and adding authority codes to the graphs, wherein the authority codes are in one-to-one correspondence with the graphs;
and the first storage unit is used for storing all the authority codes and the central points of the corresponding graphs in global variables.
Further, the second drawing module 13 specifically includes:
the first searching unit is used for searching the center point of the graph corresponding to the same authority code in the authority layer through the global variable according to the authority code owned by the role;
the drawing adding unit is used for taking the center point of the corresponding graph of the role in the authority graph layer as the center point of the corresponding graph of the role, drawing the graph in the role graph layer through the center point of the corresponding graph of the role, and adding the role code and the graph layer ID to the role;
and the second storage unit is used for storing the role code and the layer ID in a global variable.
Further, the apparatus further comprises:
and a sequencing module: and the second drawing module 13 is connected to the second drawing module and is used for sorting the plurality of character layers according to a preset sorting list.
Further, the sorting module specifically includes:
a first obtaining unit, configured to obtain the ordered list;
and the first modification unit is used for sequentially modifying the Z-index attribute value corresponding to each role layer according to the sequence of each role layer in the sequencing list.
Further, the apparatus further comprises:
the first searching module is connected with the second drawing module 13, and is used for modifying the transparency attribute value of the corresponding layer when the role corresponding to the target authority needs to be searched, so that only the role layer with the target authority is displayed.
Further, the first search module specifically includes:
the second acquisition unit is used for acquiring the target authority clicked by the user in the authority layer;
the searching and acquiring unit is used for searching the authority code of the target authority through the global variable according to the target authority and acquiring the role code with the authority code;
the second searching unit is used for searching the role layer ID with the target authority through the global variable according to the role code;
and the second modification unit is used for modifying the transparency attribute value of the character layer corresponding to the character layer ID without the target authority into invisible so as to display the character layer with the target authority in a distinguishing way.
Further, the apparatus further comprises:
and the second searching module is connected with the second drawing module 13 and is used for modifying the transparency attribute value of the corresponding layer when the role corresponding to the target user needs to be searched, so that only the role layer possessed by the target user is displayed.
Further, the second search module specifically includes:
a third obtaining unit, configured to obtain a role code of the target user;
the third searching unit is used for searching the role layer ID of the target user through the global variable according to the role code;
and a third modifying unit, configured to modify the transparency attribute value of the role layer corresponding to the role layer ID that the target user does not have into invisible, so as to display the role layer that the target user has in a distinguishing manner.
Example 3:
referring to fig. 6, the present embodiment provides a character presentation apparatus comprising a memory 21 and a processor 22, the memory 21 having stored therein a computer program, the processor 22 being arranged to run the computer program to perform the character presentation method of embodiment 1.
The memory 21 is connected to the processor 22, the memory 21 may be a flash memory, a read-only memory, or other memories, and the processor 22 may be a central processing unit or a single chip microcomputer.
Example 4:
the present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the character presentation method in embodiment 1 described above.
Computer-readable storage media include volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media includes, but is not limited to, RAM (Random Access Memory ), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory, charged erasable programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact Disc Read-Only Memory), digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The role display method, apparatus and computer readable storage medium provided in embodiments 2 to 4 first acquire a plurality of rights of a target system; then drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right; and for each role in the target system, respectively executing the following steps: and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer. According to the invention, a graphic layer is drawn through the authority drawing authority layer by utilizing the authority drawing means, the graph of the authority possessed by the role in the role layer is drawn according to the graph corresponding to the authority in the authority layer, the data of the RBAC model is converted into a three-dimensional layer structure, the connection problem in the RBAC model data visualization can be avoided, and the problems that the connection line is drawn on the plane graph in the prior art, the relationship between a plurality of roles and the authorities is not readable and the associated heat degree of the authorities and the roles cannot be intuitively displayed are solved.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present invention, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the invention, and are also considered to be within the scope of the invention.

Claims (12)

1. A character presentation method, the method comprising:
acquiring a plurality of authorities of a target system;
drawing a right layer according to a plurality of rights of the target system, wherein the right layer comprises a graph corresponding to each right;
for each role in the target system, the following steps are respectively executed:
and acquiring a role layer, and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer, wherein the center point of each graph of the role layer is the same as the center point of a corresponding graph in the authority layer.
2. The method according to claim 1, wherein the rights include menu rights and service type rights, and the drawing of the rights layer according to the plurality of rights of the target system specifically includes:
acquiring the authority layer, drawing graphs corresponding to a plurality of menu authorities and service type authorities on the authority layer through a tree structure according to the inclusion relation of the authorities, and adding authority codes to the graphs, wherein the authority codes are in one-to-one correspondence with the graphs;
and storing all the authority codes and the central points of the corresponding graphs in global variables.
3. The method according to claim 2, wherein the drawing, according to the rights layer, a graph corresponding to the rights owned by the character on the character layer specifically includes:
searching a central point of a graph corresponding to the same authority code in the authority layer through a global variable according to the authority code owned by the role;
for the center point of each corresponding graph of the same authority codes in the authority layer, the following steps are respectively executed:
taking the center point of the graph corresponding to the role in the authority graph layer as the center point of the graph corresponding to the role, drawing the graph in the role graph layer through the center point of the graph corresponding to the role, and adding a role code and a graph layer ID to the role;
the role code and the layer ID are stored in a global variable.
4. A method according to claim 3, characterized in that the method further comprises:
and sequencing the plurality of role layers according to a preset sequencing list.
5. The method of claim 4, wherein the ranking the plurality of character layers according to the preset ranking list specifically comprises:
acquiring the sequencing list;
and sequentially modifying Z-index attribute values corresponding to each role layer according to the sequence of each role layer in the sequencing list.
6. A method according to claim 3, characterized in that the method further comprises:
when the role corresponding to the target authority is required to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer with the target authority.
7. The method of claim 6, wherein when the role corresponding to the target authority needs to be searched, modifying the transparency attribute value of the corresponding layer so as to display only the role layer with the target authority, and specifically includes:
acquiring the target authority clicked by a user in the authority layer;
according to the target authority, searching an authority code of the target authority through the global variable, and acquiring a role code with the authority code;
according to the character codes, searching a character layer ID with target authority through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID without the target authority into invisible so as to display the character layer with the target authority in a distinguishing way.
8. A method according to claim 3, characterized in that the method further comprises:
when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer so as to only display the role layer possessed by the target user.
9. The method of claim 8, wherein when the role corresponding to the target user needs to be searched, modifying the transparency attribute value of the corresponding layer so as to display only the role layer possessed by the target user, specifically comprising:
acquiring the role code of the target user;
according to the role codes, searching a role layer ID of the target user through the global variable;
and modifying the transparency attribute value of the character layer corresponding to the character layer ID which is not possessed by the target user into invisible so as to display the character layer possessed by the target user in a distinguishing way.
10. A character presentation device, comprising:
the acquisition module is used for acquiring a plurality of authorities of the target system;
the first drawing module is connected with the acquisition module and is used for drawing an authority layer according to a plurality of authorities of the target system;
and the second drawing module is connected with the first drawing module and is used for acquiring a role layer and drawing a graph corresponding to the authority possessed by the role on the role layer according to the authority layer.
11. A character presentation device comprising a memory and a processor, the memory having stored therein a computer program, the processor being arranged to run the computer program to implement a character presentation method as claimed in any one of claims 1 to 9.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the character presentation method according to any of claims 1-9.
CN202310665893.0A 2023-06-06 2023-06-06 Role display method and device and computer readable storage medium Pending CN116643830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310665893.0A CN116643830A (en) 2023-06-06 2023-06-06 Role display method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310665893.0A CN116643830A (en) 2023-06-06 2023-06-06 Role display method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116643830A true CN116643830A (en) 2023-08-25

Family

ID=87639772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310665893.0A Pending CN116643830A (en) 2023-06-06 2023-06-06 Role display method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116643830A (en)

Similar Documents

Publication Publication Date Title
US8250532B2 (en) Efficient development of configurable software systems in a large software development community
JP4571746B2 (en) System and method for selectively defining access to application functions
CN113434623B (en) Fusion method based on multi-source heterogeneous space planning data
CN113821777B (en) Authority control method and device, computer equipment and storage medium
JP2005519370A (en) Effective storage of indented threads in threaded discussion applications
US8949246B2 (en) System and method for importing NetCDF data
CN111694615B (en) Method, device, equipment and storage medium for data configuration
CN112307145A (en) Batch updating method, device, medium and equipment for historical map data
CN110442583B (en) Data processing method and device, electronic equipment and storage medium
US7233949B2 (en) System and method for controlling user authorities to access one or more databases
CN113129155B (en) Multi-type personnel information processing method, equipment and storage medium
CN114547077A (en) Intelligent processing system and method for basic government affair form data
CN116680278A (en) Data processing method, device, electronic equipment and storage medium
CN116643830A (en) Role display method and device and computer readable storage medium
CN116226108A (en) Data management method and system capable of realizing different management degrees
CN111274326A (en) Feature data importing method, feature data managing and controlling method, feature data importing device, feature data managing and controlling device and electronic equipment
CN111143356B (en) Report retrieval method and device
CN108846092B (en) Tree homepage system and homepage management method
CN113553458A (en) Data export method and device in graph database
JP4851872B2 (en) Layer editing system, server device, client device, and program
CN113055337B (en) Method, device, storage medium and terminal for setting authority based on user requirements
US20220358445A1 (en) Training assignment tool
CN116541382B (en) Data management method and system based on data security identification level
CN113691423B (en) Drawing method and device of data flow path, storage medium and electronic equipment
CN114996406A (en) Standing book generation method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination