CN116595047A - Rights management method, rights management device, electronic device and computer-readable storage medium - Google Patents

Rights management method, rights management device, electronic device and computer-readable storage medium Download PDF

Info

Publication number
CN116595047A
CN116595047A CN202310667306.1A CN202310667306A CN116595047A CN 116595047 A CN116595047 A CN 116595047A CN 202310667306 A CN202310667306 A CN 202310667306A CN 116595047 A CN116595047 A CN 116595047A
Authority
CN
China
Prior art keywords
directory
target
authority information
information
cache
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
CN202310667306.1A
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.)
Guangdong Hotata Smart Home Co Ltd
Original Assignee
Guangdong Hotata Smart Home 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 Guangdong Hotata Smart Home Co Ltd filed Critical Guangdong Hotata Smart Home Co Ltd
Priority to CN202310667306.1A priority Critical patent/CN116595047A/en
Publication of CN116595047A publication Critical patent/CN116595047A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • 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

Abstract

The embodiment of the application provides a rights management method, a device, electronic equipment and a computer readable storage medium, relating to the rights management field, comprising the following steps: the method comprises the steps that a reference directory of a current level of a service is displayed, the reference directory of the current level is matched with authority information, the authority information is used for indicating directory identifications of the reference directories of at least two levels, the number of the reference directories of each level is at least one, the reference directory is a directory with authority of a user in a service system, and each reference directory is used for displaying corresponding information when triggered; responding to the triggering operation of the target catalogue of the current level, and determining and displaying target information corresponding to the target catalogue from authority information pre-stored in the first storage area; the information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer, so that the processing pressure of the system is reduced, and the display speed is improved.

Description

Rights management method, rights management device, electronic device and computer-readable storage medium
Technical Field
The present application relates to the technical field of rights management, and in particular, to a rights management method, a device, an electronic apparatus, and a computer readable storage medium.
Background
In some management systems, an administrator assigns rights to a common user, and different types of common users have different rights, and the operations that can be performed on the system are also quite different.
In the related authority management technology, pages displayed by all users are consistent, and authority verification is added on each button interface to ensure that only users with corresponding authorities can use the buttons, however, the users know whether the users currently have the authorities for executing the corresponding operations of the buttons or not only when clicking the buttons and returning operation failure or corresponding responses of the buttons, so that the operation time of the users is greatly wasted, and the processing pressure of a system is greatly increased by adding the authority verification on the interface of each button.
Disclosure of Invention
The embodiment of the application provides a rights management method, a device, electronic equipment and a computer readable storage medium, which can solve the problems of high system processing pressure and low system page display speed in the rights management technology.
According to a first aspect of an embodiment of the present application, there is provided a method of rights management, the method comprising:
displaying a reference directory of a current level of a preset service system, wherein the reference directory of the current level is matched with authority information of a user, the authority information is used for indicating directory identifications of reference directories of at least two levels, the number of the reference directories of each level is at least one, the reference directory is a directory of a user with operation authority in the preset service system, and each reference directory is used for displaying corresponding target information when triggered;
responding to triggering operation of a target directory in the reference directory of the current level, and determining and displaying target information corresponding to the target directory from the authority information pre-stored in a first storage area;
the target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
In one possible implementation, the response module of the rights management unit includes:
the first response unit is used for responding to the triggering operation of the target directory in the reference directory of the current level, and if the Redis cache is determined not to store the authority information; the method comprises the steps of carrying out a first treatment on the surface of the
The first display unit is used for determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing sub-authority information of the target directory into a Web cache;
the first storage area is the dis cache or database, and when the first storage area is the dis cache, before displaying the target information corresponding to the target directory, the method further includes: storing the authority information pre-stored in the database into a Redis cache;
when the first storage area is the database, the method further comprises: storing the authority information pre-stored in the database into a Redis cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
In another possible implementation manner, the response module of the rights management unit includes:
the second cache unit is used for responding to the triggering operation of a target directory in the reference directory of the current level, and if the fact that the Web cache does not store sub-authority information of the target directory and the Redis cache already stores the authority information is determined, the Redis cache is used as the first storage area;
The second display unit is used for determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing sub-authority information of the target directory to the Web cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
In yet another possible implementation manner, the rights management unit further includes:
the deleting module is used for deleting the authority information stored in the Redis cache when the authority information stored in the database is updated;
the updating module is used for updating the updating identification of the authority information, wherein the updating identification is used for representing the updating times of the authority information in the Redis cache;
the caching module is used for storing the sub-authority information of the target directory and the update identification of the authority information into the Web cache;
the first judging module is used for taking the Redis cache as the first storage area if the update identifier of the authority information stored in the Web cache is determined to be inconsistent with the update identifier of the authority information stored in the Redis cache; and determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and replacing sub-authority information of the target directory stored in the Web cache with sub-authority information of the target directory in the Redis cache.
If the update identification of the authority information stored in the Web cache is determined to be consistent with the update identification of the authority information stored in the Redis cache, the Web cache is used as the first storage area;
and determining and displaying target information corresponding to the target catalog from the authority information stored in the first storage area.
In yet another possible implementation manner, in response to a login operation of the user for the preset service system for the first time, acquiring authority information of the user from a database, and storing the authority information into a Redis cache; displaying the reference directory of the highest layer according to the authority information stored in the Redis cache, and storing the authority information of the reference directory of the highest layer into the web cache;
responding to the triggering operation of the user for the target directory in the reference directory for the first time, acquiring the sub-authority information of the target directory from the Redis cache, displaying the target information corresponding to the target directory according to the sub-authority information of the target directory, and storing the sub-authority information of the target directory into the Web cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
In yet another possible implementation manner, the directory identifier of the reference directory of the next layer corresponding to the target directory includes a directory identifier of the target directory;
and the control identification of the operation control corresponding to the target directory comprises the identification of the target directory.
In yet another possible implementation manner, the rights management unit further includes:
and the log-out module is used for logging out the user from the preset service system in response to modification of the authority information of the user under the condition that the user is using the preset service system.
According to a second aspect of an embodiment of the present application, there is provided a rights management unit including:
displaying a reference directory of a current level of a preset service system, wherein the reference directory of the current level is matched with authority information of a user, the authority information is used for indicating directory identifications of reference directories of at least two levels, the number of the reference directories of each level is at least one, the reference directory is a directory of a user with operation authority in the preset service system, and each reference directory is used for displaying corresponding target information when triggered;
Responding to triggering operation of a target directory in the reference directory of the current level, and determining and displaying target information corresponding to the target directory from the authority information pre-stored in a first storage area;
the target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
According to a third aspect of embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the steps of the rights management method as provided in the first aspect when the program is executed.
According to a fourth aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the rights management method as provided in the first aspect.
According to a fifth aspect of embodiments of the present application, there is provided a computer program product comprising computer instructions stored in a computer readable storage medium, which when read from the computer readable storage medium by a processor of a computer device, cause the computer device to perform the steps of implementing the rights management method as provided in the first aspect.
The technical scheme provided by the embodiment of the application has the beneficial effects that:
according to the authority management method provided by the embodiment of the application, the reference catalogue with the operation authority of the current hierarchy is displayed through the authority information of the user, the authority verification is not required to be added for each catalogue or control, the reference catalogue with the authority information and the operation control are displayed only in the preset service system, the condition that all system pages are displayed consistently and the user needs to execute triggering operation to determine whether the user has the operation authority of triggering objects is avoided, the operation time of the user in the preset service system is saved, the user experience is improved, meanwhile, the authority verification is not required to be added for each catalogue and control, the processing pressure of the system is greatly reduced, and in addition, when the user triggers the target catalogue, the authority information corresponding to the catalogue is only acquired from the first storage area, the acquisition of useless authority information is avoided, the query speed of the authority information is improved, the target information display speed of the service system is also improved, and the waiting time of the user is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic diagram of a system architecture for implementing a rights management method according to an embodiment of the present application;
FIG. 2 is a flow chart of a rights management method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a page of a preset service system after triggering a reference directory of a lowest layer according to an embodiment of the present application;
fig. 4 is a schematic diagram of a page of a preset service system after triggering a reference directory of a non-lowest layer according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a rights management unit according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this specification, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present specification. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, several terms related to the present application are described and explained:
redis: redis is a key-value store system. Like Memcached, it supports relatively more stored value types, including string, list, set, zset (sorted set-ordered set), and hash (hash type). These data types all support push/pop, add/remove, and pick intersection union and difference and richer operations, and these operations are all atomic. On this basis, redis supports a variety of different ways of ordering. Like memcached, data is cached in memory to ensure efficiency. Except that the dis will periodically write updated data to disk or modify operations to the appended record file, and master-slave synchronization is implemented on this basis.
Web caching: web caching (or HTTP caching) is an information technology for temporarily storing (caching) Web documents (such as HTML pages and images) to reduce server latency. The Web cache system will save a copy of the document that passed through the system; if certain conditions are met, then subsequent requests may be satisfied by the cache. The Web cache system may refer to both devices and computer programs.
The present application provides a rights management method, apparatus, electronic device, computer readable storage medium and computer program product, which aim to solve the above technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
Fig. 1 is a schematic diagram of a system architecture for implementing a rights management method according to an embodiment of the present application, where the system architecture includes: a terminal 120 and a server 140.
The terminal 120 installs and runs an application supporting the authority management method, and the terminal 120 is used for displaying a preset page of a preset service system according to the authority information of the user.
The terminal 120 is connected to the server 140 through a wireless network or a wired network.
Server 140 includes at least one of a cloud computing platform and a virtualization center. Illustratively, the server 140 includes a processor 144 and a memory 142, the memory 142 including a display module 1421, a control module 1422, and a receiving module 1423. The server 140 is used to provide background services for applications supporting the rights management method. Optionally, the server 140 takes on primary computing work and the terminal 120 takes on secondary computing work; alternatively, the server 140 takes on secondary computing work and the terminal 120 takes on primary computing work; alternatively, the server 140, the terminal 120, and the server are cooperatively computed using a distributed computing architecture.
Optionally, the device types of the terminal include: at least one of a POS terminal, a smart phone, a tablet, an electronic book reader, a dynamic video expert compression standard audio layer 3 (MovingPicture Experts Group Audio Layer III, MP 3) player, a dynamic video expert compression standard audio layer 4 (Moving Picture Experts Group Audio Layer IV, MP 4) player, a laptop portable computer, and a desktop computer.
Those skilled in the art will recognize that the number of terminals may be greater or lesser. Such as the above-mentioned terminals may be only one, or the above-mentioned terminals may be several tens or hundreds, or more. The embodiment of the application does not limit the number of terminals and the equipment type.
To overcome the above-mentioned problems of the prior art, an embodiment of the present application provides a rights management method applied to a terminal, which may be the terminal 120 in fig. 1, as shown in fig. 2, and the method includes:
s101, displaying a reference directory of a current level of a preset service system, wherein the reference directory of the current level is matched with authority information of a user, the authority information is used for indicating directory identifications of at least two levels of reference directories, the number of the reference directories of each level is at least one, the reference directory is a directory of the user with operation authority in the preset service system, and each reference directory is used for displaying corresponding target information when triggered.
In the embodiment of the application, the preset service system is a system with multi-user control authority, such as in the same system, and the functions and the viewable contents which can be used in the preset service system are different due to different authorities of users.
In the embodiment of the application, the preset service system comprises at least two levels of reference directories, each level is provided with at least one reference directory, and the reference directory refers to a directory with operation authority of a user in the preset service system, namely, the user can see and execute the triggering operation in the preset service system, and after executing the triggering operation on the reference directory, the user receives corresponding target information. The preset reference directory of the current hierarchy displayed by the service system can be any one or more reference directories of any hierarchy.
In the embodiment of the application, the authority information comprises directory identifications of at least two levels of reference directories, each reference directory has a corresponding directory identification, and the authority information consists of directory identifications of the reference directories of each level, so that the reference directory of a user with operation authority in each level of a preset service system can be known through the authority information, and the reference directory of the current level matched with the authority information can be displayed in the preset service system.
The reference catalogue with the operation permission is obtained through the permission information, permission verification is not required to be added for each catalogue in the service system, the processing pressure of the system in the process of operating the preset service system is greatly reduced, meanwhile, the situation that whether the currently triggered catalogue is the catalogue with the operation permission can be determined without triggering the catalogue by a user, the time waste caused by clicking the catalogue without the permission when the user uses the system is avoided, and the use experience of the user is greatly improved.
In one possible implementation manner, in response to a login operation of a user for a preset service system for the first time, acquiring authority information of the user from a database, and storing the authority information into a Redis cache; displaying the reference directory of the highest layer according to the authority information stored in the Redis cache, and storing the authority information of the reference directory of the highest layer into the web cache; responding to the triggering operation of a user for a target directory in a reference directory for the first time, acquiring sub-authority information of the target directory from a Redis cache, displaying target information corresponding to the target directory according to the sub-authority information of the target directory, and storing the sub-authority information of the target directory into a Web cache.
When the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at the at least one next layer.
In the embodiment of the application, the Redis cache is positioned at a background server of the system, and when a user inquires cache information, the inquiry speed is high; the web cache is located in the browser of the user, rendering of the page browsed by the user can be completed rapidly, page response time is shortened, and user experience is improved.
In the embodiment of the application, after the authority information of each user in the preset service system is distributed by an administrator through a management system, the system automatically stores the authority information associated with each user into a database, when the user logs in the preset service system for the first time, the authority information associated with the user is queried from the database according to the identity ID or the data of the identity identification class of the user, the authority information of the user is obtained, the authority information is stored into a Redis cache, the highest-level reference directory of the preset service system is displayed according to the authority information in the Redis cache, and meanwhile, the authority information of the highest-level reference directory is stored into a web cache, so that the user can directly obtain the authority information of the highest-level reference directory from the web cache to display the highest-level reference directory when logging in the preset service system next time. When a user logs in a preset service system for the first time, the user does not need to perform any judging operation, the authority information of the user is directly obtained from the database and stored in the Redis cache, the authority information of the highest-level reference directory is stored in the web cache, and the authority information is directly obtained from the web cache of the user browser when the user logs in next time, so that the processing pressure of the system is reduced.
In the embodiment of the application, when a user logs in the system for the first time, the reference catalogs of all the levels are in an untriggered state, so when the target catalogs of the reference catalogs of any one level are first triggered by the user, sub-authority information of the target catalogs is acquired from the Redis cache, and target information corresponding to the target catalogs is displayed according to the sub-authority information of the target catalogs. And the sub-authority information of the target directory is stored in the web cache of the user browser, so that when the user clicks the target directory next time, the corresponding target information can be directly displayed according to the sub-authority information of the target directory stored in the web cache without obtaining the target information from the Redis cache, the target information is displayed more rapidly, and the experience of the user is greatly improved.
In one possible implementation manner, the directory identifier of the reference directory of the next layer corresponding to the target directory includes the directory identifier of the target directory; the control identification of the operation control corresponding to the target directory comprises the identification of the target directory.
In the embodiment of the present application, because the reference directory of the next level has the corresponding reference directory of the previous level, the identification of the reference directory or the control of the next level is set based on the directory of the reference directory of the previous level.
In an example, a total of two levels of reference directories are preset in the service system, wherein a second level of reference directory corresponding to a first level of reference directory a is a reference directory A1, a reference directory A2 and a reference directory A3, operation controls corresponding to the reference directory A1 are an operation control A1 and A2, numbers within "1-99" are allocated to the first level of reference directory according to the sequence as unique directory identifications, directory identifications 10 are allocated to the reference directory a, reference directories A1, A2 and A3 are allocated 1001, 1002 and 1003 as directory identifications respectively based on the directory identifications 10 of the reference directory a, and corresponding operation controls A1 and A2 are allocated 100101 and 100102 as control identifications based on the directory identifications 1001 of the reference directory A1 respectively.
It should be noted that, the embodiment of the application does not specifically limit the catalog identification and the control identification, the control identification and the catalog identification can be digital or letter, and can also be character, and the specific setting of the control identification and the catalog identification is determined according to the specific application scenario and the actual situation.
The directory identifier and the control identifier are used for representing the object with the operation authority in the preset service system, and when the user needs to add, delete or update the authority information, the user can directly modify the authority information through the directory identifier and the control identifier, so that the development of the authority control is simpler and more convenient, and the workload and the cost of the authority management are saved.
S102, determining and displaying target information corresponding to the target directory from authority information pre-stored in a first storage area in response to triggering operation of the target directory in the reference directory of the current level.
The target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
In one example, at least one operation control corresponding to the reference catalog is displayed in response to the reference catalog aiming at the lowest triggered layer, wherein the operation control in the preset service system refers to a control with a specific function in a page of the preset service system, such as deleting, adding, modifying and the like. Referring to fig. 3, an exemplary illustration is shown, after triggering the reference directory of the lowest layer, a page schematic diagram of the preset service system is preset, for example, a next-stage reference directory a302 and a reference directory b303 corresponding to the reference directory a301 are the reference directory of the lowest layer, operation controls corresponding to the reference directory a302 are an operation control a304, an operation control b305 and an operation control c306, and in response to the user triggering the reference directory a302, the operation control a304, the operation control b305 and the operation control c306 are displayed in the page of the preset service system. It should be noted that, in the embodiment of the present application, the operation control in the preset service system is not specifically limited, and the operation control is determined based on the application scenario and the actual situation of the preset service system.
In yet another example, in response to triggering the reference directory of the non-lowest layer, at least one reference directory of a next layer corresponding to the reference directory is displayed, referring to fig. 4, which exemplarily illustrates a page schematic diagram of the preset service system after triggering the reference directory of the non-lowest layer, as shown in fig. 4, for example, reference directory a401, reference directory B402, and reference directory C403 are the reference directories of the non-lowest layer, reference directory a404 and reference directory B405 of the next layer corresponding to the reference directory B402 are the reference directory a404 and the reference directory B405, and in response to triggering the reference directory B402 by a user, the reference directory a404 and the reference directory B405 are displayed in the page of the preset service system.
The embodiment of the application provides a possible implementation mode, responds to the triggering operation of a target directory in a reference directory of a current level, and if the Redis cache is determined to not store the authority information;
determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing sub-authority information of the target directory into a Web cache; the first storage area is a dis cache or a database, and when the first storage area is the dis cache, before displaying the target information corresponding to the target directory, the method further comprises: storing authority information pre-stored in a database into a Redis cache; when the first storage area is a database, storing authority information pre-stored in the database into a Redis cache.
When the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at the at least one next layer.
In the embodiment of the application, under the condition that the permission information is not stored in the Redis cache, the permission information is required to be acquired from the database, so that the target information of the triggered target directory is displayed according to the permission information, and when the target information of the target directory is displayed by using the permission information, the permission information acquired from the database can be directly used, or the permission information of a user can be stored in the Redis cache, and the sub-permission information of the target directory is acquired from the Redis cache for displaying.
In one example, in response to a triggering operation of a user on a target directory in a reference directory of a current hierarchy, whether rights information exists in a Redis cache is first determined, and when rights information does not exist in the Redis cache, rights information corresponding to the user stored in advance in a database is stored in the Redis cache, that is, identifiers of all reference directories and identifiers of operation controls of which the user has operation rights are stored in the Redis cache. And taking the Redis cache as a first storage area, and acquiring authority information from the Redis cache to determine at least one reference directory of the next level or at least one corresponding operation control corresponding to the target directory, so that the reference directory or the operation control with the operation authority of the user is displayed in a preset service system.
In the embodiment of the application, after the reference directory or the corresponding operation control of the next level corresponding to the target directory is displayed in the preset service system, the directory identifier of the reference directory or the control identifier of the corresponding operation control of the next level corresponding to the target directory is stored in the Web cache as sub-authority information, that is, only the directory identifier of the reference directory or the control identifier of the corresponding operation control of the next level corresponding to the target directory is stored in the Web cache, all the authority information of the user is not stored at one time, that is, in the embodiment of the application, only the sub-authority information corresponding to the target directory is stored in the Web cache after the target directory is triggered, and the Web cache does not store the corresponding sub-authority information for the reference directory without triggering operation.
The Redis cache has no authority information, which indicates that a user presets a service system for logging in for the first time or indicates that the authority information in the database is changed, and the newly updated authority information in the database needs to be stored in the Redis cache, so that the old authority information is prevented from being used, and important data of the system are prevented from being revealed to users without authority.
In the embodiment of the application, the authority information of the user is queried in the database only when the authority information is not stored in the Redis cache, and the queried authority information is stored in the Redis cache, so that corresponding target information is acquired when the triggering operation on the reference directory occurs later, and the database is queried only once under the condition that the authority information in the database is unchanged, thereby reducing the query pressure of the database. And the permission information is cached in the Redis cache to be processed more rapidly, and when the permission information is acquired from the Redis cache, only the directory identifier of the reference directory of the next level corresponding to the target directory or the directory identifier of the corresponding operation control is acquired, so that the query pressure is reduced, the time spent on querying the permission information is reduced, and the queried content can be displayed to the user rapidly.
In another example, in response to a triggering operation of a target directory in a reference directory of a current level, when the permission information of a user is not stored in the Redis cache, the permission information of the user is acquired from the database, and the reference directory or an operation control of a next level corresponding to the target directory is displayed directly according to the acquired permission information of the user, so that the response time of system processing is reduced, a page of a preset service system is timely displayed, in addition, the acquired permission information of the user is required to be stored in the Redis cache for the next triggering operation, the pressure of system processing can be directly acquired from the Redis cache, the sub-permission information of the target directory is also required to be stored in the Web cache, and when the user triggers the target directory again, the corresponding target information can be displayed directly according to the sub-permission information of the target directory cached in the Web cache, so that the processing pressure of the system is reduced, and the response speed of the system is improved.
In the embodiment of the application, a possible implementation manner is provided, and in response to a triggering operation of a target directory in a reference directory of a current level, if it is determined that the Web cache does not store sub-authority information of the target directory and the Redis cache already stores the authority information, the Redis cache is used as a first storage area; and determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing the sub-authority information of the target directory into the Web cache.
In the embodiment of the application, under the condition that the Redis cache already stores the authority information of the user and the Web cache does not store the sub-authority information of the target directory, the directory identifier of the reference directory or the control identifier of the corresponding operation control of the next level corresponding to the target directory is directly obtained from the Redis cache, and the corresponding reference directory or the operation control is displayed in the preset service system based on the obtained at least one directory identifier or control identifier.
In one example, the rights information for user a includes: the directory identifications 10 and 20 of the reference directory a and the reference directory B of the first layer, the directory identifications 1001 and 1002 of the reference directories A1 and A2 of the second layer corresponding to the reference directory a, and the control identifications 100101 and 100102 of the operation control 1 and the operation control 2 corresponding to the reference directory A1.
And responding to the triggering operation of the user A on the reference catalog A, detecting that the authority information of the user A is not stored in the Redis cache, and storing the authority information of the user A stored in the database in advance into the Redis cache. The method comprises the steps of obtaining directory identifiers 1001 and 1002 of reference directories A1 and A2 corresponding to a reference directory A from a Redis cache, displaying the corresponding reference directory A1 and reference directory A2 in a preset service system according to the directory identifiers 1001 and 1002, and storing the directory identifiers 1001 and 1002 of the reference directories A1 and A2 into a Web cache, namely storing sub-authority information of the reference directory A into the Web cache.
In response to the triggering operation of the user A on the reference catalog A1, detecting that the permission information of the user A is stored in the Redis cache, and not storing the sub-permission information of the reference catalog A1 in the Web cache, therefore, acquiring control identifications 100101 and 100102 of the operation control 1 and the operation control 2 corresponding to the reference catalog A1 from the Redis cache, displaying the corresponding operation control 1 and the operation control 2 in a preset service system based on the control identifications 100101 and 100102, and storing the control identifications 100101 and 100102 of the operation control 1 and the operation control 2 in the Web cache.
The embodiment of the application provides a possible implementation mode, when the authority information stored in the database is updated, the authority information stored in the Redis cache is deleted; storing authority information pre-stored in a database into a Redis cache, and updating an update identifier of the authority information, wherein the update identifier is used for representing the update times of the authority information in the Redis cache; storing the sub-authority information of the target directory and the update identification of the authority information into a Web cache; if the update identification of the authority information stored in the Web cache is determined to be inconsistent with the update identification of the authority information stored in the Redis cache, the Redis cache is used as a first storage area; determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and replacing sub-authority information of the target directory stored in the Web cache with sub-authority information of the target directory in the Redis cache; if the update identification of the authority information stored in the Web cache is determined to be consistent with the update identification of the authority information stored in the Redis cache, the Web cache is used as a first storage area; and determining and displaying target information corresponding to the target catalogue from the authority information stored in the first storage area.
In the embodiment of the application, along with the change of the user authority, the authority information of the user stored in the database is changed, when the authority information of the user in the database is updated, the authority information of the user stored in the Redis cache is cleared, and when the user logs in the system next time, the updated authority information in the database is stored in the Redis cache, and the update identification for representing the update times of the authority information in the Redis cache is updated.
In the embodiment of the application, after sub-authority information of the reference directory is stored in the Web cache each time, the update identification in the Redis cache is stored in the Web cache, and the update identification is used for recording the authority information of which update the current authority information stored in the Web cache is.
In the embodiment of the application, whether the Redis cache stores the authority information of the user or not is judged in response to the triggering operation for the reference directory, whether the Web cache stores the sub-authority information of the reference directory or not is judged, if the Redis cache stores the authority information of the user and the Web cache stores the sub-authority information of the reference directory, whether the update identification in the Redis cache is consistent with the update identification in the Web cache is judged, and if the update identification is inconsistent, the condition that the update identification is not the latest authority information stored in the Web cache is explained, so that the authority information in the Web cache cannot be used for displaying the target information corresponding to the reference directory, the target information corresponding to the target directory is determined and displayed directly from the authority information in the Redis cache, the authority information in the Web cache is emptied, the directory identification or the corresponding control identification of the reference directory of the next level corresponding to the target directory in the Redis cache is stored, and the update identification in the Redis cache is stored in the Web cache.
By adding update identifications for the Redis cache and the web cache and inquiring whether the update identifications of the Redis cache and the web cache are consistent before using the web cache, the permission information before update is prevented from being used in the process of using the permission information in the web cache, so that important system pages display catalogues and controls which are not provided with permission by users, the problems of data leakage or privacy security and the like are caused, and the security of a preset service system is improved.
In the embodiment of the application, when the Redis cache stores the authority information of the user and the Web cache stores the sub-authority information of the target directory, and the update identifier in the Redis cache is consistent with the update identifier in the Web cache, the authority information of the target directory stored in the Web cache is the latest authority information, and the sub-authority information of the target directory in the Web cache is directly used to determine and display the target information corresponding to the target directory.
Under the condition that the updating identifications are consistent, the information in the web cache is directly used, the corresponding authority information is not required to be queried from the Redis cache again, and the display speed of the target information is improved under the condition that the safety of a service system is ensured.
In one example, the rights information for user a includes: the directory identifications 10 and 20 of the reference directory a and the reference directory B of the first layer, the directory identifications 1001 and 1002 of the reference directories A1 and A2 of the second layer corresponding to the reference directory a, and the control identifications 100101 and 100102 of the operation control 1 and the operation control 2 corresponding to the reference directory A1.
The administrator modifies the authority information of the user a through the terminal, and stores the updated authority information in the database, where the updated authority information is newly added with the authority identifier 1003 of the reference directory A3 of the second layer corresponding to the reference directory a. And deleting the authority information of the user A in the Redis cache when detecting that the authority information of the user A in the database is changed. When the user A logs in the preset service system again, the updated authority information in the database is stored in the Redis cache, and the update identification in the Redis cache is updated from 1 to 2.
The user A triggers the reference directory A, responds to the triggering operation of the user A on the reference directory A, determines that authority information and update identification 2 of the user are stored in the Redis cache at the moment, and sub-authority information and update identification 1 of the reference directory A are stored in the Web cache, and acquires directory identifications 1001, 1002 and 1003 of reference directories A1, A2 and A3 corresponding to the reference directory A from the Redis cache because the update identification in the Redis cache is inconsistent with the update identification in the Web cache, displays the corresponding reference directories A1, A2 and A3 in a preset service system based on the directory identifications 1001, 1002 and 1003, clears the authority information in the Web cache, and stores directory identifications 1001, 1002 and 1003 of the reference directories A1, A2 and A3 corresponding to the reference directory A in the Redis cache and 2 of the update identification in the Web cache.
The user A triggers the reference catalog A again, the triggering operation of the user A on the reference catalog A is responded, it is determined that the Redis cache stores the authority information of the user A at the moment, the Web cache stores the sub-authority information of the reference catalog A, and the update identifications in the Redis cache and the Web cache are 2, which indicates that the latest authority information is stored in the Web cache at the moment, therefore catalog identifications 1001, 1002 and 1003 of reference catalogues A1, A2 and A3 corresponding to A are directly obtained from the Web cache, and the corresponding reference catalogues A1, A2 and A3 are displayed in a preset service system based on the catalog identifications 1001, 1002 and 1003.
In the embodiment of the application, under the condition that the user is using the preset service system, the user logs out of the preset service system in response to modification of the authority information of the user.
In one example, when the user a is using the preset service system, the administrator updates the authority information of the user a through the terminal, and in response to the administrator modifying the authority information of the user a, the administrator logs the user a out of the preset service system, and after the user a manages to log in the preset service system again, the user a browses and operates the preset service system according to the updated authority information.
After the authority information of the user is updated, the user logged in the system is logged out of the system in time, so that the user is prevented from operating the catalogue and the control which do not have the operation authority, and the safety of a preset service system is improved.
According to the authority management method provided by the embodiment of the application, the reference catalogs with the operation authorities of the current hierarchy are displayed through the authority information of the user, the authority verification is not required to be added for each catalogue or control, the reference catalogs with the authority information and the operation control are only displayed in the preset service system, the condition that all system pages are displayed consistently and the user needs to execute triggering operation to determine whether the user has the operation authorities of triggering objects is avoided, the operation time of the user in the preset service system is saved, the user experience is improved, meanwhile, the processing pressure of the system is greatly reduced without adding the authority verification for each catalogue and control, and meanwhile, the authority information is updated through the catalogue identification and the control identification, so that the authority management is simpler and more convenient, and the workload and the cost of the authority management are saved; under the condition that the authority information in the database is unchanged, the database is queried only once, and the database query pressure is reduced. The system processing is quicker by caching the authority information into the Redis cache; when the permission information is acquired from the Redis cache, only the directory identifier of the reference directory of the next level corresponding to the target directory or the directory identifier of the corresponding operation control is acquired, so that the query pressure is reduced, the time spent on querying the permission information is reduced, and the queried content can be rapidly displayed to the user. By adding update identifications for the Redis cache and the web cache and inquiring whether the update identifications of the Redis cache and the web cache are consistent before using the web cache, the permission information before update is prevented from being used in the process of using the permission information in the web cache, so that important system pages display catalogues and controls which are not provided with permission by users, the problems of data leakage or privacy security and the like are caused, and the security of a preset service system is improved; under the condition that the updating identifications are consistent, the information in the web cache is directly used, the corresponding authority information is not required to be queried from the Redis cache again, and the display speed of the target information is improved under the condition that the safety of a service system is ensured.
An embodiment of the present application provides a rights management apparatus, as shown in fig. 5, the rights management apparatus 30 may include: a presentation module 501 and a response module 502.
The display module 501 is configured to display a reference directory of a current level of the preset service system, where the reference directory of the current level is matched with authority information of a user, the authority information is used to indicate directory identifiers of reference directories of at least two levels, the number of reference directories of each level is at least one, the reference directory is a directory of a user having operation authority in the preset service system, and each reference directory is used to display corresponding target information when triggered;
the response module 502 is configured to determine and display target information corresponding to a target directory from authority information stored in advance in the first storage area in response to a triggering operation for the target directory in the reference directory of the current hierarchy;
the target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
The device of the embodiment of the present application may perform the method provided by the embodiment of the present application, and its implementation principle is similar, and actions performed by each module in the device of the embodiment of the present application correspond to steps in the method of the embodiment of the present application, and detailed functional descriptions of each module of the device may be referred to the descriptions in the corresponding methods shown in the foregoing, which are not repeated herein.
Further, in one possible implementation manner, the response module of the rights management device includes:
the first response unit is used for responding to the triggering operation of the target directory in the reference directory of the current level, and if the Redis cache is determined to not store the authority information;
the first display unit is used for determining and displaying target information corresponding to the target catalogue from the authority information stored in the first storage area, and storing sub-authority information of the target catalogue into the Web cache;
the first storage area is a dis cache or a database, and when the first storage area is the dis cache, before displaying the target information corresponding to the target directory, the method further comprises: storing authority information pre-stored in a database into a Redis cache;
when the first storage area is a database, the method further comprises: storing authority information pre-stored in a database into a Redis cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at the at least one next layer.
And the target information is used for indicating the control identification of the corresponding at least one operation control when the target directory is the reference directory at the bottommost layer, and indicating the directory identification of the reference directory at the at least one next layer when the target directory is not the reference directory at the bottommost layer.
In another possible implementation manner, the response module of the rights management device includes:
the second caching unit is used for responding to the triggering operation of the target directory in the reference directory of the current level, and if the fact that the Web cache does not store the sub-authority information of the target directory and the Redis cache already stores the authority information is determined, the Redis cache is used as a first storage area;
the second display unit is used for determining and displaying target information corresponding to the target catalogue from the authority information stored in the first storage area and storing sub-authority information of the target catalogue into the Web cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at the at least one next layer.
In yet another possible implementation manner, the rights management unit further includes:
the deleting module is used for deleting the authority information stored in the Redis cache when the authority information stored in the database is updated;
the updating module is used for updating the updating identification of the authority information, wherein the updating identification is used for representing the updating times of the authority information in the Redis cache;
the caching module is used for storing the sub-authority information of the target directory and the update identification of the authority information into the Web cache;
the first judging module is used for judging whether the update identifier of the authority information stored in the Web cache is inconsistent with the update identifier of the authority information stored in the Redis cache or not, and if so, the Redis cache is used as a first storage area; determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and replacing sub-authority information of the target directory stored in the Web cache with sub-authority information of the target directory in the Redis cache;
if the update identification of the authority information stored in the Web cache is determined to be consistent with the update identification of the authority information stored in the Redis cache, the Web cache is used as a first storage area;
and determining and displaying target information corresponding to the target catalogue from the authority information stored in the first storage area.
In yet another possible implementation manner, in response to a login operation of a user for a preset service system for the first time, acquiring authority information of the user from a database, and storing the authority information into a dis cache; displaying the reference directory of the highest layer according to the authority information stored in the Redis cache, and storing the authority information of the reference directory of the highest layer into the web cache;
responding to the triggering operation of a user for a target directory in a reference directory for the first time, acquiring sub-authority information of the target directory from a Redis cache, displaying target information corresponding to the target directory according to the sub-authority information of the target directory, and storing the sub-authority information of the target directory into a Web cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at the at least one next layer.
In yet another possible implementation manner, the directory identifier of the reference directory of the next layer corresponding to the target directory includes a directory identifier of the target directory;
The control identification of the operation control corresponding to the target directory comprises the identification of the target directory.
In yet another possible implementation manner, the rights management unit further includes:
and the log-out module is used for logging out the user from the preset service system in response to modification of the authority information of the user under the condition that the user is using the preset service system.
An embodiment of the present application provides an electronic device (computer apparatus/device/system), including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement steps of a method … …, and compared with the related art, the method may be implemented:
according to the authority management method provided by the embodiment of the application, the reference catalogue with the operation authority of the current hierarchy is displayed through the authority information of the user, the authority verification is not required to be added for each catalogue or control, the reference catalogue with the authority information and the operation control are displayed only in the preset service system, the condition that all system pages are displayed consistently and the user needs to execute triggering operation to determine whether the user has the operation authority of triggering objects is avoided, the operation time of the user in the preset service system is saved, the user experience is improved, meanwhile, the authority verification is not required to be added for each catalogue and control, the processing pressure of the system is greatly reduced, and in addition, when the user triggers the target catalogue, the authority information corresponding to the catalogue is only acquired from the first storage area, the acquisition of useless authority information is avoided, the query speed of the authority information is improved, the target information display speed of the service system is also improved, and the waiting time of the user is reduced.
In an alternative embodiment, an electronic device is provided, as shown in fig. 6, the electronic device 4000 shown in fig. 6 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program for executing an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Among them, the electronic device package may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the foregoing method embodiments and corresponding content. Compared with the prior art, can realize:
according to the authority management method provided by the embodiment of the application, the reference catalogue with the operation authority of the current hierarchy is displayed through the authority information of the user, the authority verification is not required to be added for each catalogue or control, the reference catalogue with the authority information and the operation control are displayed only in the preset service system, the condition that all system pages are displayed consistently and the user needs to execute triggering operation to determine whether the user has the operation authority of triggering objects is avoided, the operation time of the user in the preset service system is saved, the user experience is improved, meanwhile, the authority verification is not required to be added for each catalogue and control, the processing pressure of the system is greatly reduced, and in addition, when the user triggers the target catalogue, the authority information corresponding to the catalogue is only acquired from the first storage area, the acquisition of useless authority information is avoided, the query speed of the authority information is improved, the target information display speed of the service system is also improved, and the waiting time of the user is reduced.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the steps and corresponding contents of the embodiment of the method when being executed by a processor. Compared with the prior art, can realize:
according to the authority management method provided by the embodiment of the application, the reference catalogue with the operation authority of the current hierarchy is displayed through the authority information of the user, the authority verification is not required to be added for each catalogue or control, the reference catalogue with the authority information and the operation control are displayed only in the preset service system, the condition that all system pages are displayed consistently and the user needs to execute triggering operation to determine whether the user has the operation authority of triggering objects is avoided, the operation time of the user in the preset service system is saved, the user experience is improved, meanwhile, the authority verification is not required to be added for each catalogue and control, the processing pressure of the system is greatly reduced, and in addition, when the user triggers the target catalogue, the authority information corresponding to the catalogue is only acquired from the first storage area, the acquisition of useless authority information is avoided, the query speed of the authority information is improved, the target information display speed of the service system is also improved, and the waiting time of the user is reduced.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such that the embodiments of the application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although various operation steps are indicated by arrows in the flowcharts of the embodiments of the present application, the order in which these steps are implemented is not limited to the order indicated by the arrows. In some implementations of embodiments of the application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages can be flexibly configured according to the requirement, which is not limited by the embodiment of the present application.
The foregoing is merely an optional implementation manner of some of the implementation scenarios of the present application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the present application are adopted without departing from the technical ideas of the scheme of the present application, and the implementation manner is also within the protection scope of the embodiments of the present application.

Claims (10)

1. A rights management method, comprising:
displaying a reference catalog of a current level of a preset service system, wherein the reference catalog of the current level is matched with authority information of a user; the authority information is used for indicating directory identifiers of reference directories of at least two levels, the number of the reference directories of each level is at least one, the reference directories are directories with operation authority of a user in the preset service system, and each reference directory is used for displaying corresponding target information when triggered;
responding to triggering operation of a target directory in the reference directory of the current level, and determining and displaying target information corresponding to the target directory from the authority information pre-stored in a first storage area;
the target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
2. The rights management method according to claim 1, wherein determining and displaying target information corresponding to a target directory from the rights information stored in advance in a first storage area in response to a trigger operation for the target directory in the reference directory of the current hierarchy, includes:
responding to a triggering operation aiming at a target directory in the reference directory of the current level, and if the Redis cache is determined not to store the permission information;
determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing sub-authority information of the target directory into a Web cache;
the first storage area is the dis cache or database, and before the target information corresponding to the target directory is displayed when the first storage area is the dis cache, the method further includes: storing the authority information pre-stored in the database into the Redis cache;
when the first storage area is the database, the method further comprises: storing the authority information pre-stored in the database into the Redis cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
3. The rights management method according to claim 1, wherein determining and displaying target information corresponding to a target directory from the rights information stored in advance in a first storage area in response to a trigger operation for the target directory in the reference directory of the current hierarchy, includes:
responding to a triggering operation aiming at a target directory in the reference directory of the current level, and if the fact that the Web cache does not store sub-authority information of the target directory and the Redis cache already stores the authority information is determined, taking the Redis cache as the first storage area;
determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and storing sub-authority information of the target directory to the Web cache;
when the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
4. The rights management method of claim 2, wherein the method further comprises: deleting the authority information stored in the Redis cache when the authority information stored in the database is updated;
the storing the authority information pre-stored in the database in the dis cache further includes: updating an update identifier of the authority information, wherein the update identifier is used for representing the update times of the authority information in the Redis cache;
storing the sub-right information of the target directory to a Web cache, wherein the method comprises the following steps: storing sub-authority information of the target directory and an update identification of the authority information into the Web cache;
the responding to the triggering operation for the target directory in the reference directory of the current hierarchy further comprises the following steps:
if the update identification of the authority information stored in the Web cache is determined to be inconsistent with the update identification of the authority information stored in the Redis cache, the Redis cache is used as the first storage area;
determining and displaying target information corresponding to the target directory from the authority information stored in the first storage area, and replacing sub-authority information of the target directory stored in the Web cache with sub-authority information of the target directory in the Redis cache;
If the update identification of the authority information stored in the Web cache is determined to be consistent with the update identification of the authority information stored in the Redis cache, the Web cache is used as the first storage area;
and determining and displaying target information corresponding to the target catalog from the authority information stored in the first storage area.
5. The rights management method of claim 1, wherein the method further comprises:
responding to the login operation of the user for the preset service system for the first time, acquiring the authority information of the user from a database, and storing the authority information into a Redis cache; displaying the reference directory of the highest layer according to the authority information stored in the Redis cache, and storing the authority information of the reference directory of the highest layer into the web cache;
responding to the triggering operation of the user for the target directory in the reference directory for the first time, acquiring the sub-authority information of the target directory from the Redis cache, displaying the target information corresponding to the target directory according to the sub-authority information of the target directory, and storing the sub-authority information of the target directory into the Web cache;
When the target directory is not the reference directory at the bottommost layer, the sub-authority information of the target directory is used for indicating the directory identifier of the reference directory at least at the next layer.
6. The rights management method according to any of claims 1-5, characterized in that,
the directory identifier of the reference directory of the next layer corresponding to the target directory comprises the directory identifier of the target directory;
and the control identification of the operation control corresponding to the target directory comprises the identification of the target directory.
7. The rights management method according to any one of claims 1 to 5, further comprising:
and in the case that the user is using the preset service system, logging the user out of the preset service system in response to modification of the authority information of the user.
8. A rights management unit, comprising:
the display module is used for displaying a reference directory of a current level of a preset service system, the reference directory of the current level is matched with authority information of a user, the authority information is used for indicating directory identifications of the reference directories of at least two levels, the number of the reference directories of each level is at least one, the reference directory is a directory of a user with operation authority in the preset service system, and each reference directory is used for displaying corresponding target information when triggered;
The response module is used for responding to the triggering operation of the target catalogue in the reference catalogue of the current level, and determining and displaying target information corresponding to the target catalogue from the authority information pre-stored in the first storage area;
the target information corresponding to the reference catalogs of the lowest layer comprises at least one corresponding operation control, and the target information corresponding to the reference catalogs of other layers except the lowest layer comprises at least one corresponding reference catalogs of the next layer.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the method according to any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-7.
CN202310667306.1A 2023-06-06 2023-06-06 Rights management method, rights management device, electronic device and computer-readable storage medium Pending CN116595047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310667306.1A CN116595047A (en) 2023-06-06 2023-06-06 Rights management method, rights management device, electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310667306.1A CN116595047A (en) 2023-06-06 2023-06-06 Rights management method, rights management device, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN116595047A true CN116595047A (en) 2023-08-15

Family

ID=87604466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310667306.1A Pending CN116595047A (en) 2023-06-06 2023-06-06 Rights management method, rights management device, electronic device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN116595047A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196544A (en) * 2023-11-07 2023-12-08 恒实建设管理股份有限公司 Intelligent management method and system for engineering information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196544A (en) * 2023-11-07 2023-12-08 恒实建设管理股份有限公司 Intelligent management method and system for engineering information
CN117196544B (en) * 2023-11-07 2024-01-30 恒实建设管理股份有限公司 Intelligent management method and system for engineering information

Similar Documents

Publication Publication Date Title
EP3213210B1 (en) Continuing an application session on a different device
US10642904B2 (en) Infrastructure enabling intelligent execution and crawling of a web application
US8868637B2 (en) Page rendering for dynamic web pages
RU2629448C2 (en) System and method of controlling and organizing web-browser cash
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN106598972B (en) Information display method and device and intelligent terminal
CN110096660B (en) Method and device for loading page pictures and electronic equipment
KR102045602B1 (en) Live tiles without application-code execution
US20130227085A1 (en) Terminal and method for using cloud services
JP2016527603A (en) Light installer
CN116595047A (en) Rights management method, rights management device, electronic device and computer-readable storage medium
CN111400625A (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112183045A (en) Online document processing method and device and electronic equipment
US20160269446A1 (en) Template representation of security resources
CN112486552A (en) Server hot update method, device, equipment and storage medium
JP6779307B2 (en) Method and device for page display
US20160253708A1 (en) Method and system for efficiently serving upsell content based on complex user archetypes
US20160004850A1 (en) Secure download from internet marketplace
EP2686791B1 (en) Variants of files in a file system
US9805177B1 (en) Processing large data sets from heterogeneous data sources using federated computing resources
CN110674426A (en) Webpage behavior reporting method and device
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
CN113918659A (en) Data operation method and device, storage medium and electronic equipment
US9098228B2 (en) Determining content rendering capabilities for web browser optimization
CN114065068A (en) Page access control method and device, equipment and storage medium

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