A method, device, electronic device and medium for rights management

By generating pipeline tasks in the permission server, using permission logic identification and data source identification to call personal permission logic objects and data sources, the problem of duplication of code in permission control between different management channels and business systems is solved, and the permission logic and data sources are realized Flexible combination and management reduces maintenance difficulty.

CN113032750BActive Publication Date: 2024-11-01BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110308953.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-23
Publication Date
2024-11-01
Estimated Expiration
2041-03-23

AI Technical Summary

Technical Problem

There is a lot of code duplication in the existing permission systems in the permission control between different management channels and business systems, which makes it difficult to maintain.

Method used

By generating pipeline tasks in the permission server, using permission logic identification and data source identification to call personal permission logic objects and data sources, a flexible combination of permission logic and data sources is achieved, avoiding writing code for each combination.

Benefits of technology

It effectively avoids code duplication, reduces maintenance difficulty, and realizes flexible combination and management of permission logic and data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113032750B_ABST
    Figure CN113032750B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, electronic device and medium for permission management, and relates to the field of computer technology. The method is applied to a permission server, and the method includes: receiving a permission processing request sent by a permission client, the permission processing request includes an authentication object parameter, a permission logic identifier and a permission data source identifier; generating a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template; by executing the pipeline task, calling the individual permission logic object corresponding to the permission logic identifier, and obtaining the permission data in the data source identified by the data source identifier; executing the permission logic included in the individual permission logic object based on the obtained permission data to authenticate the authentication object parameters, and feeding back the permission processing result to the permission client. A large amount of repeated code can be avoided, which is convenient for maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic equipment and medium for rights management. Background Art

[0002] At present, the permission system can uniformly control the permissions of various business systems, that is, the permission system can uniformly manage permission logic and permission data. The permission client is integrated into the business system in the form of a software development kit (SDK). When the business system receives a request, the permission client will intercept the request and request the permission system to authenticate it. The permission system authenticates the request based on the permission logic and permission data. Only after the authentication is passed can the business system process the request.

[0003] The permission system needs to support permission control for different management channels. Each management channel can correspond to a business system. Each business system has different permission logic and permission data, so it is necessary to write code for the permission logic and permission data corresponding to each business system. Because there are cross-combinations between permission processing logic and permission data, this way of writing code will result in a lot of code duplication, making maintenance difficult. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and medium for rights management to avoid a large amount of code duplication and reduce the difficulty of maintenance. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for rights management, the method being applied to a rights server, the method comprising:

[0006] Receive a permission processing request sent by a permission client, wherein the permission processing request includes an authentication object parameter, a permission logic identifier, and a permission data source identifier;

[0007] Generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template;

[0008] By executing the pipeline task, calling the individual permission logic object corresponding to the permission logic identifier, and obtaining the permission data in the data source identified by the data source identifier;

[0009] The permission logic included in the personalized permission logic object is executed based on the acquired permission data to authenticate the authentication object parameters, and the permission processing result is fed back to the permission client.

[0010] In a possible implementation, the method further includes:

[0011] When the permission server is started, based on the preset individual permission logic naming, each individual permission logic class is scanned, the scanned individual permission logic class is loaded into the memory, and the individual permission logic object corresponding to each individual permission logic class is created; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic when authenticating each business system;

[0012] Scan each permission data source, load the scanned permission data source into memory, and create a data source object corresponding to each data source.

[0013] In one possible implementation, the preset personal authority logic name includes: a system identifier, an object name and a suffix, wherein the system identifier is the identifier of the business system corresponding to the personal authority logic class, the object name is the name of the file where the personal authority logic class is located, and the suffix is ​​the file suffix of the file where the personal authority logic class is located.

[0014] In a possible implementation, the permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier;

[0015] The generating of the pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template includes:

[0016] Adding the permission logic identifier and the permission data source identifier to the pipeline task template to generate the pipeline task;

[0017] The pipeline task template includes:

[0018] Call the permission logic object identified by the high four bits of the received mask parameter;

[0019] Calling the permission data source object identified by the lower four bits of the received mask parameter, and obtaining the permission data based on the data address in the permission data source object;

[0020] The permission logic included in the permission logic object is executed based on the acquired permission data.

[0021] In a second aspect, an embodiment of the present application provides a rights management device, the device is applied to a rights server, and the device includes:

[0022] A receiving module, used to receive a permission processing request sent by a permission client, wherein the permission processing request includes an authentication object parameter, a permission logic identifier, and a permission data source identifier;

[0023] A generation module, used to generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template;

[0024] An authentication module is used to call the individual permission logic object corresponding to the permission logic identifier by executing the pipeline task, and obtain the permission data in the data source identified by the data source identifier; based on the obtained permission data, execute the permission logic included in the individual permission logic object to authenticate the authentication object parameters, and feedback the permission processing result to the permission client.

[0025] In a possible implementation, the device further includes

[0026] A loading module, used for scanning each individual permission logic class based on a preset individual permission logic name when the permission server is started, loading the scanned individual permission logic class into the memory, and creating individual permission logic objects corresponding to each individual permission logic class; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic used when authenticating each business system;

[0027] The loading module is further used to scan each authority data source, load the scanned authority data source into the memory, and create a data source object corresponding to each data source.

[0028] In one possible implementation, the preset personal authority logic name includes: a system identifier, an object name and a suffix, wherein the system identifier is the identifier of the business system corresponding to the personal authority logic class, the object name is the name of the file where the personal authority logic class is located, and the suffix is ​​the file suffix of the file where the personal authority logic class is located.

[0029] In a possible implementation, the permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier;

[0030] The generating module is specifically used for:

[0031] Adding the permission logic identifier and the permission data source identifier to the pipeline task template to generate the pipeline task;

[0032] The pipeline task template includes:

[0033] Call the permission logic object identified by the high four bits of the received mask parameter;

[0034] Calling the permission data source object identified by the lower four bits of the received mask parameter, and obtaining the permission data based on the data address in the permission data source object;

[0035] The permission logic included in the permission logic object is executed based on the acquired permission data.

[0036] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0037] Memory, used to store computer programs;

[0038] The processor is used to implement any of the above-mentioned permission management method steps when executing the program stored in the memory.

[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the permission management method described in the first aspect is implemented.

[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the rights management method described in the first aspect above.

[0041] With the above technical solution, the permission processing request received by the permission server includes the authentication object parameters, the permission logic identifier and the permission data source identifier. The permission server can generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline template. By executing the pipeline task, the permission logic included in the individual permission logic object can be executed based on the obtained permission data to complete the authentication of the authentication object parameters. It can be seen that this application can realize a flexible combination of permission processing logic and permission data source based on the permission processing logic identifier and permission data source identifier carried by the permission processing request by generating pipeline tasks, without having to write code for each combination of permission processing logic and permission data source, thus avoiding a large amount of code duplication and reducing the difficulty of maintenance.

[0042] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A schematic diagram of the structure of a rights management system provided in an embodiment of the present application;

[0045] Figure 2 A flowchart of a rights management method provided in an embodiment of the present application;

[0046] Figure 3 An exemplary schematic diagram of a method for selecting a personalized permission logic class and selecting a permission data source provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the inheritance relationship between the general permission logic and the individual permission logic provided in the embodiment of the present application;

[0048] Figure 5 A schematic diagram of the structure of a rights management device provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] The present application provides a method for rights management, which can be applied to Figure 1 In the rights management system shown in FIG. , the rights management system includes a rights server, multiple business systems and terminals.

[0052] Among them, each business system is integrated with an authorization client. After the terminal sends an access request to the business system, the authorization client can intercept the access request received by the business system and send an authorization processing request to the authorization server based on the access request, so that the authorization server can authenticate the access request.

[0053] Figure 1Three business systems and one terminal are exemplarily shown in the figure, but in fact the number of devices included in the authority management system is not limited thereto.

[0054] Combination Figure 1 The rights management system shown in the embodiment of the present application provides a rights management method, which is applied to a rights server, such as Figure 2 As shown, the method includes:

[0055] S201: Receive a permission processing request sent by a permission client.

[0056] The permission processing request includes authentication object parameters, permission logic identifier, and permission data source identifier. The authentication object parameters include information that needs to be authenticated, such as user information.

[0057] In an embodiment of the present application, the terminal may send an access request to the business system. For example, when a user accesses the business system through the terminal, the permission client in the business system may intercept the access request and generate a permission processing request based on the access request. The authentication object parameter of the permission processing request may include the user name of the user, or may also include the IP address of the terminal.

[0058] S202: Generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template.

[0059] S203: Call the individual permission logic object corresponding to the permission logic identifier by executing the pipeline task, and obtain the permission data in the data source identified by the data source identifier.

[0060] Among them, the permission server includes multiple personalized permission logic objects and multiple permission data source objects. After the permission server generates a pipeline task based on the above-mentioned permission logic identifier and permission data source identifier, it can call the personalized permission logic object and permission data source object applicable to the current business system that needs to be authenticated by executing the pipeline task.

[0061] The permission data source object includes information such as the address of the permission data source. By calling the permission data source object, you can access the address corresponding to the permission data source and then obtain the data stored in the permission data source.

[0062] The permission data source includes permission data required for authentication. As an example, the permission data source may include roles corresponding to each registered user name and permissions possessed by each role.

[0063] For example, the role corresponding to user name 1 is administrator, and the administrator has 10 management permissions.

[0064] The role corresponding to Username 2 is Guest, and Guest has 2 access permissions.

[0065] S204: Execute the permission logic included in the personalized permission logic object based on the acquired permission data to authenticate the authentication object parameters, and feed back the permission processing result to the permission client.

[0066] With the above technical solution, the permission processing request received by the permission server includes the authentication object parameters, the permission logic identifier and the permission data source identifier. The permission server can generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline template. By executing the pipeline task, the permission logic included in the individual permission logic object can be executed based on the obtained permission data to complete the authentication of the authentication object parameters. It can be seen that this application can realize a flexible combination of permission processing logic and permission data source based on the permission processing logic identifier and permission data source identifier carried by the permission processing request by generating pipeline tasks, without having to write code for each combination of permission processing logic and permission data source, thus avoiding a large amount of code duplication and reducing the difficulty of maintenance.

[0067] In one embodiment of the present application, the permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier. On this basis, the above S202, generating a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template, can be implemented as follows:

[0068] Add the permission logic identifier and permission data source identifier to the pipeline task template to generate a pipeline task;

[0069] The pipeline task template includes:

[0070] Call the permission logic object identified by the high four bits of the received mask parameter;

[0071] Call the permission data source object identified by the lower four bits of the received mask parameter, and obtain the permission data based on the data address in the permission data source object;

[0072] The permission logic included in the permission logic object is executed based on the obtained permission data.

[0073] The following Figure 3 Take the pipeline task as an example to introduce it. Figure 3As shown, the mask parameter carried in the permission processing request sent by the permission client is 00010011. The pipeline task generated by the permission server based on the mask parameter is: call the permission logic object identified by 0001, call the permission data source object identified by 0011, and obtain the permission data based on the data address of the permission data source object; execute the permission logic included in the permission logic object based on the obtained permission data.

[0074] The authority server can send the pipeline task to the logic selector and data source selector. Figure 3 , then sends 0001 to the logic selector in the authority server, sends 0011 to the data source selector in the authority server, and then the logic selector selects the personalized authority logic A corresponding to 0001. The data source selector selects the data source C corresponding to 0011 and reads data from the data source C. Then, the authority server can execute the personalized authority logic A based on the data in the data source C to complete the authentication.

[0075] As an example, suppose Figure 3 The personalized permission logic A in the example is: find the IP address range to which the terminal's IP address belongs, and determine whether the IP address range to which the IP address belongs has access rights. The identifier of personalized permission logic B is 0001.

[0076] Personalized permission logic B is: determine whether the user name is in the blacklist. The identifier of personalized permission logic B is 0010.

[0077] The personalized permission logic C is: to determine whether the user name is in the whitelist. The identifier of the personalized permission logic C is: 0100.

[0078] The data stored in the data source A includes: the user names in the blacklist. The identifier of the data source A is 1111.

[0079] The data stored in the data source B includes: the user names in the whitelist. The identifier of the data source B is 1000.

[0080] The data stored in data source C is: the access rights of each IP address range. The identifier of data source C is 0011.

[0081] The user requests access to the business system. After the business system receives the access request sent by the terminal, the business client intercepts the access request and then sends a permission processing request to the permission server. Because the above-mentioned individual permission logic A and data source C are required to authenticate the access request, the mask parameter carried in the permission processing request is 00010011.

[0082] For another example, if system A and system B each have their own corresponding permission data. System B has the function of adjusting the permissions of system A. When system B performs access control on the functions within its own system, the permission client of system B sends the permission data source identifier of system B to the permission server. When system B operates and manages the permissions of system A, the permission client of system B sends the permission data source identifier of system A to the permission server.

[0083] It can be seen that by adopting this method, the permission server can generate a pipeline task by adding the permission logic identifier and permission data source identifier carried in the permission processing request to the pipeline task template, and then obtain the authentication result by executing the pipeline. There is no need to write code for each combination of individual permission logic and data source, which realizes code decoupling and facilitates maintenance.

[0084] In order to select the individual permission logic class, the embodiment of the present application pre-establishes the general permission logic in the permission server, and creates each individual permission logic in a different class by inheriting the general permission logic. For example, the general permission logic searches for the permissions that the user has based on the user role, and the individual permission logic can be used to query whether the user's IP address is in the IP address blacklist.

[0085] For example, Figure 4 As shown, personalized permission logic A, personalized permission logic B and personalized permission logic C can all inherit the general permission logic.

[0086] After creating each permission logic class, you can also name each permission logic class according to the preset naming convention.

[0087] In the application embodiment, the naming of the preset personalized permission logic class may include a system identifier, an object name, and a suffix. The system identifier is the identifier of the business system corresponding to the personalized permission logic class, the object name is the name of the file where the personalized permission logic class is located, and the suffix is ​​the file suffix of the file where the personalized permission logic class is located.

[0088] Furthermore, when the permission server is started, based on the preset individual permission logic naming, each individual permission logic class is scanned, the scanned individual permission logic class is loaded into the memory, and the individual permission logic object corresponding to the individual permission logic class is created; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic when authenticating each business system;

[0089] Scan each permission data source, load the scanned permission data source into memory, and create a data source object corresponding to each data source.

[0090] After creating the individual permission logic object corresponding to the individual permission logic class and the data source object corresponding to the data source, the created individual permission logic object and data source object can be called by the permission server. Because the data source object includes information such as the address of the data source, the storage space corresponding to the data source object can be accessed by calling the data source object and data can be obtained from it.

[0091] Corresponding to the above method embodiment, the present application embodiment also provides a rights management device, which is applied to a rights server, such as Figure 5 As shown, the device comprises:

[0092] The receiving module 501 is used to receive a permission processing request sent by the permission client, where the permission processing request includes an authentication object parameter, a permission logic identifier and a permission data source identifier;

[0093] A generation module 502, used to generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template;

[0094] The authentication module 503 is used to call the individual permission logic object corresponding to the permission logic identifier by executing the pipeline task, and obtain the permission data in the data source identified by the data source identifier; based on the obtained permission data, execute the permission logic included in the individual permission logic object to authenticate the authentication object parameters, and feedback the permission processing results to the permission client.

[0095] Optionally, the device further comprises:

[0096] The loading module is used to scan each individual permission logic class based on the preset individual permission logic naming when the permission server is started, load the scanned individual permission logic class into the memory, and create individual permission logic objects corresponding to each individual permission logic class; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic used when authenticating each business system;

[0097] The loading module is also used to scan each permission data source, load the scanned permission data source into the memory, and create a data source object corresponding to each data source.

[0098] Optionally, the preset personalized permission logic naming includes: system identifier, object name and suffix, the system identifier is the identifier of the business system corresponding to the personalized permission logic class, the object name is the name of the file where the personalized permission logic class is located, and the suffix is ​​the file suffix of the file where the personalized permission logic class is located.

[0099] Optionally, the permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier;

[0100] The generating module 502 is specifically used for:

[0101] Add the permission logic identifier and permission data source identifier to the pipeline task template to generate a pipeline task;

[0102] The pipeline task template includes:

[0103] Call the permission logic object identified by the high four bits of the received mask parameter;

[0104] Call the permission data source object identified by the lower four bits of the received mask parameter, and obtain the permission data based on the data address in the permission data source object;

[0105] The permission logic included in the permission logic object is executed based on the obtained permission data.

[0106] With the above technical solution, the permission processing request received by the permission server includes the authentication object parameters, the permission logic identifier and the permission data source identifier. The permission server can generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline template. By executing the pipeline task, the permission logic included in the individual permission logic object can be executed based on the obtained permission data to complete the authentication of the authentication object parameters. It can be seen that this application can realize a flexible combination of permission processing logic and permission data source based on the permission processing logic identifier and permission data source identifier carried by the permission processing request by generating pipeline tasks, without having to write code for each combination of permission processing logic and permission data source, thus avoiding a large amount of code duplication and reducing the difficulty of maintenance.

[0107] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0108] Memory 603, used for storing computer programs;

[0109] The processor 601 is used to execute the program stored in the memory 603 to implement the following steps:

[0110] Receive a permission processing request sent by a permission client, the permission processing request including an authentication object parameter, a permission logic identifier, and a permission data source identifier;

[0111] Generate pipeline tasks based on permission logic identifier, permission data source identifier and pipeline task template;

[0112] By executing the pipeline task, the individual permission logic object corresponding to the permission logic identifier is called, and the permission data in the data source identified by the data source identifier is obtained;

[0113] The permission logic included in the personalized permission logic object is executed based on the obtained permission data to authenticate the authentication object parameters, and the permission processing result is fed back to the permission client.

[0114] The processor may also be used to implement other method steps in the above method embodiment.

[0115] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0116] The communication interface is used for communication between the above electronic device and other devices.

[0117] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0118] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0119] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned rights management methods are implemented.

[0120] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any of the rights management methods in the above embodiments.

[0121] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0122] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0123] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for rights management, It is characterized in that The method is applied to an authority server, and the method comprises: Receive a permission processing request sent by a permission client, wherein the permission processing request includes an authentication object parameter, a permission logic identifier, and a permission data source identifier; Generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template; By executing the pipeline task, calling the individual permission logic object corresponding to the permission logic identifier, and obtaining the permission data in the data source identified by the data source identifier; Executing the permission logic included in the personalized permission logic object based on the acquired permission data to authenticate the authentication object parameters, and feeding back the permission processing result to the permission client; The permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier; The generating of the pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template includes: Adding the permission logic identifier and the permission data source identifier to the pipeline task template to generate the pipeline task; The pipeline task template includes: Call the permission logic object identified by the high four bits of the received mask parameter; Calling the permission data source object identified by the lower four bits of the received mask parameter, and obtaining the permission data based on the data address in the permission data source object; The permission logic included in the permission logic object is executed based on the acquired permission data.

2. The method according to claim 1, It is characterized in that The method further comprises: When the permission server is started, based on the preset individual permission logic naming, each individual permission logic class is scanned, the scanned individual permission logic class is loaded into the memory, and the individual permission logic object corresponding to each individual permission logic class is created; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic when authenticating each business system; Scan each permission data source, load the scanned permission data source into memory, and create a data source object corresponding to each data source.

3. The method according to claim 2, It is characterized in that The preset personalized permission logic naming includes: a system identifier, an object name and a suffix, wherein the system identifier is an identifier of a business system corresponding to the personalized permission logic class, the object name is the name of the file where the personalized permission logic class is located, and the suffix is ​​the file suffix of the file where the personalized permission logic class is located.

4. A device for rights management, It is characterized in that The device is applied to a rights server, and the device comprises: A receiving module, used to receive a permission processing request sent by a permission client, wherein the permission processing request includes an authentication object parameter, a permission logic identifier, and a permission data source identifier; A generation module, used to generate a pipeline task based on the permission logic identifier, the permission data source identifier and the pipeline task template; An authentication module is used to call the individual permission logic object corresponding to the permission logic identifier by executing the pipeline task, and obtain the permission data in the data source identified by the data source identifier; execute the permission logic included in the individual permission logic object based on the obtained permission data to authenticate the authentication object parameters, and feedback the permission processing result to the permission client; The permission processing request includes a mask parameter, the upper four bits of the mask parameter are the permission logic identifier, and the lower four bits of the mask parameter are the permission data source identifier; The generating module is specifically used for: Adding the permission logic identifier and the permission data source identifier to the pipeline task template to generate the pipeline task; The pipeline task template includes: Call the permission logic object identified by the high four bits of the received mask parameter; Calling the permission data source object identified by the lower four bits of the received mask parameter, and obtaining the permission data based on the data address in the permission data source object; The permission logic included in the permission logic object is executed based on the acquired permission data.

5. The device according to claim 4, It is characterized in that The device also includes A loading module, used for scanning each individual permission logic class based on a preset individual permission logic name when the permission server is started, loading the scanned individual permission logic class into the memory, and creating individual permission logic objects corresponding to each individual permission logic class; wherein each individual permission logic class inherits the general permission logic, and the general permission logic is the general permission logic used when authenticating each business system; The loading module is further used to scan each authority data source, load the scanned authority data source into the memory, and create a data source object corresponding to each data source.

6. The device according to claim 5, It is characterized in that The preset personalized permission logic naming includes: a system identifier, an object name and a suffix, wherein the system identifier is an identifier of a business system corresponding to the personalized permission logic class, the object name is the name of the file where the personalized permission logic class is located, and the suffix is ​​the file suffix of the file where the personalized permission logic class is located.

7. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 3 when executing a program stored in a memory.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Method and system for managing authority

    CN101414253A

  • Device and method for defining data access right and behavior right

    CN103646218A

  • Authority management method, device and system, equipment and readable storage medium

    CN109711122A

  • Data processing method and device, server and storage medium

    CN112184196A

  • Security descriptor verifier

    US20050119902A1