A loosely coupled permission setting method and system
Through the examples, the loosely coupled permission setting method and system realize precise permission allocation and serialization based on user parameters and visual operations, improving the flexibility and accuracy of permission management and adapting to the permission requirements of different systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies lack support for dynamic analysis and visualization of users, resulting in inflexible permission allocation. Existing permission management systems have technical problems with permission management, and existing technologies cannot effectively solve these problems.
By responding to permission setting requests to obtain administrator's available permission information, identifying target users and parameters, and generating permission text data based on visual selection operations and data serialization language, precise permission allocation and serialization are achieved, solving the technical problems of existing permission management.
The loosely coupled permission text adapts to the permission requirements of different systems and has strong scalability.
Smart Images

Figure CN120724419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for setting permissions based on loose coupling. Background Technology
[0002] With the increasing demand for access control in information systems, enterprises and organizations are placing greater emphasis on improving system security and management efficiency through flexible access control. Existing technologies typically obtain administrator access information by responding to access control requests, assign permissions to users using fixed templates or manual methods, and store the access control data in a pre-defined format to meet system access control requirements. However, existing solutions lack intuitive support for dynamic analysis of user parameters and visual operations, making it difficult to achieve accurate access control and generate serialized access control data compatible with multiple systems. Commonly used static access control methods cannot meet the needs of complex system scenarios and cross-platform requirements, resulting in insufficient flexibility in access control, susceptibility to mis-assignment of permissions or poor system adaptability, and limitations on the accuracy and scalability of access control. Therefore, existing technologies have shortcomings that urgently need to be addressed. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a loosely coupled permission setting method and system, which can realize accurate permission allocation and serialization based on user parameters and visual operations, improve the flexibility and accuracy of permission management, adapt to the permission requirements of different systems through loosely coupled permission text, and has strong scalability.
[0004] To address the aforementioned technical problems, the first aspect of this invention discloses a permission setting method based on loose coupling, the method comprising:
[0005] In response to a permission setting request, obtain the available permission information for the administrator user;
[0006] Determine the target user for whom permission settings are to be applied and the corresponding user parameters;
[0007] Based on a visual selection operation, select the user permissions corresponding to the target user from the optional permission information;
[0008] Based on the user parameters and user permissions, permission text data corresponding to the target user is generated using a data serialization language; the permission text data includes the permissions of the target user under multiple item types.
[0009] As an optional implementation, in the first aspect of the present invention, the permission text data is text data in YAML format, JSON format, or XML format.
[0010] As an optional implementation, in the first aspect of the present invention, the step of selecting the user permission corresponding to the target user from the optional permission information based on the visual selection operation includes:
[0011] All optional permission items in the optional permission information are displayed in the first window;
[0012] The permissions corresponding to the target user are displayed in the second window;
[0013] Based on the user's selection of any of the optional permission items in the first window and dragging them to the second window, the selected and dragged optional permission item is determined as the user permission corresponding to the target user.
[0014] As an optional implementation, in the first aspect of the present invention, the user parameters include at least one of user name, user level, user history, and user type.
[0015] As an optional implementation, in the first aspect of the present invention, generating permission text data corresponding to the target user based on the user parameters and the user permissions, using a data serialization language, includes:
[0016] Determine the parameter identifier corresponding to the user parameter in the preset database;
[0017] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the user permissions, permission text data corresponding to the target user is generated; the data serialization language is YAML, JSON or XML.
[0018] As an optional implementation, in the first aspect of the present invention, generating permission text data corresponding to the target user based on the parameter identifier and the user permissions according to the serialization rules corresponding to the preset data serialization language includes:
[0019] Obtain the first permission text corresponding to the administrator user;
[0020] Obtain the second permission text of multiple similar users corresponding to the target user; the similarity between the user parameters of the similar users and the user parameters of the target user is greater than a preset similarity threshold;
[0021] Based on the first permission text and the second permission text, determine the specific setting permissions corresponding to the user permissions;
[0022] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the specific setting permissions corresponding to the user permissions, the permission text data corresponding to the target user is generated.
[0023] As an optional implementation, in the first aspect of the present invention, determining the specific setting permission corresponding to the user permission based on the first permission text and the second permission text includes:
[0024] For each permission item in the user permissions, a first text description corresponding to that permission item is determined in the first permission text;
[0025] In each of the second permission texts, determine multiple second text descriptions corresponding to the permission item;
[0026] Determine whether all the second text descriptions are within the first text description to obtain the first determination result;
[0027] If the first determination result is negative, the first text description is determined as the permission setting description corresponding to the permission item;
[0028] When the first judgment result is yes, calculate the average value of the text similarity between any two second text descriptions in all second text descriptions to obtain the similarity parameter;
[0029] Determine whether the similarity parameter is greater than a preset parameter threshold to obtain a second determination result;
[0030] When the second judgment result is yes, calculate the intersection of all the second text descriptions to obtain the permission setting description corresponding to the permission item;
[0031] When the second judgment result is negative, filter out multiple similar text descriptions in all the second text descriptions, and calculate the intersection of all the similar text descriptions to obtain the permission setting description corresponding to the permission item;
[0032] Determine the permission settings descriptions corresponding to all the aforementioned permission items as the specific setting permissions corresponding to the user permissions.
[0033] As an optional implementation, in the first aspect of the invention, the step of filtering out multiple similar text descriptions from all the second text descriptions includes:
[0034] Calculate the average of the text similarity between each second text description and all other second text descriptions to obtain the similarity index corresponding to each second text description;
[0035] Filter out all text descriptions in the second text description whose similarity index is greater than a preset index threshold to obtain multiple similar text descriptions.
[0036] A second aspect of this invention discloses a loosely coupled permission setting system, the system comprising:
[0037] The acquisition module is used to retrieve the available permission information for the administrator user in response to permission setting requests.
[0038] The determination module is used to determine the target user for whom permission settings are to be applied and the corresponding user parameters.
[0039] The selection module is used to select the user permissions corresponding to the target user from the optional permission information based on a visual selection operation.
[0040] The generation module is used to generate permission text data corresponding to the target user based on the user parameters and the user permissions, using a data serialization language; the permission text data includes the permissions of the target user under multiple item types.
[0041] As an optional implementation, in the second aspect of the invention, the permission text data is text data in YAML, JSON, or XML format.
[0042] As an optional implementation, in a second aspect of the invention, the selection module selects the user permissions corresponding to the target user from the optional permission information based on a visual selection operation, including:
[0043] All optional permission items in the optional permission information are displayed in the first window;
[0044] The permissions corresponding to the target user are displayed in the second window;
[0045] Based on the user's selection of any of the optional permission items in the first window and dragging them to the second window, the selected and dragged optional permission item is determined as the user permission corresponding to the target user.
[0046] As an optional implementation, in a second aspect of the invention, the user parameters include at least one of user name, user level, user history, and user type.
[0047] As an optional implementation, in a second aspect of the invention, the specific method by which the generation module generates permission text data corresponding to the target user based on the user parameters and the user permissions, using a data serialization language, includes:
[0048] Determine the parameter identifier corresponding to the user parameter in the preset database;
[0049] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the user permissions, permission text data corresponding to the target user is generated; the data serialization language is YAML, JSON or XML.
[0050] As an optional implementation, in the second aspect of the present invention, the specific method by which the generation module generates permission text data corresponding to the target user based on the parameter identifier and the user permissions, according to the serialization rules corresponding to a preset data serialization language, includes:
[0051] Obtain the first permission text corresponding to the administrator user;
[0052] Obtain the second permission text of multiple similar users corresponding to the target user; the similarity between the user parameters of the similar users and the user parameters of the target user is greater than a preset similarity threshold;
[0053] Based on the first permission text and the second permission text, determine the specific setting permissions corresponding to the user permissions;
[0054] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the specific setting permissions corresponding to the user permissions, the permission text data corresponding to the target user is generated.
[0055] As an optional implementation, in a second aspect of the invention, the generation module determines the specific method of setting the specific permissions corresponding to the user permissions based on the first permission text and the second permission text, including:
[0056] For each permission item in the user permissions, a first text description corresponding to that permission item is determined in the first permission text;
[0057] In each of the second permission texts, determine multiple second text descriptions corresponding to the permission item;
[0058] Determine whether all the second text descriptions are within the first text description to obtain the first determination result;
[0059] If the first determination result is negative, the first text description is determined as the permission setting description corresponding to the permission item;
[0060] When the first judgment result is yes, calculate the average value of the text similarity between any two second text descriptions in all second text descriptions to obtain the similarity parameter;
[0061] Determine whether the similarity parameter is greater than a preset parameter threshold to obtain a second determination result;
[0062] When the second judgment result is yes, calculate the intersection of all the second text descriptions to obtain the permission setting description corresponding to the permission item;
[0063] When the second judgment result is negative, filter out multiple similar text descriptions in all the second text descriptions, and calculate the intersection of all the similar text descriptions to obtain the permission setting description corresponding to the permission item;
[0064] Determine the permission settings descriptions corresponding to all the aforementioned permission items as the specific setting permissions corresponding to the user permissions.
[0065] As an optional implementation, in a second aspect of the invention, the specific method by which the generation module filters out multiple similar text descriptions in all the second text descriptions includes:
[0066] Calculate the average of the text similarity between each second text description and all other second text descriptions to obtain the similarity index corresponding to each second text description;
[0067] Filter out all text descriptions in the second text description whose similarity index is greater than a preset index threshold to obtain multiple similar text descriptions.
[0068] A third aspect of the present invention discloses another permission setting system based on loose coupling, the system comprising:
[0069] Memory containing executable program code;
[0070] A processor coupled to the memory;
[0071] The processor calls the executable program code stored in the memory to execute some or all of the steps in the loosely coupled permission setting method disclosed in the first aspect of the present invention.
[0072] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in the loosely coupled permission setting method disclosed in the first aspect of the present invention.
[0073] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0074] This invention obtains administrator-selectable permission information and determines target users and parameters by responding to permission setting requests. It allocates user permissions based on visual selection operations and generates permission text data using a data serialization language. This enables precise permission allocation and serialization based on user parameters and visual operations, improving the flexibility and accuracy of permission management. The loosely coupled permission text adapts to the permission requirements of different systems and has strong scalability. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a flowchart illustrating a loosely coupled permission setting method disclosed in an embodiment of the present invention.
[0077] Figure 2 This is a schematic diagram of a loosely coupled permission setting system disclosed in an embodiment of the present invention.
[0078] Figure 3 This is a schematic diagram of another loosely coupled permission setting system disclosed in an embodiment of the present invention. Detailed Implementation
[0079] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0081] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0082] This invention discloses a loosely coupled permission setting method and system. By responding to permission setting requests, it obtains the administrator's available permission information and determines the target user and parameters. User permissions are assigned based on a visual selection operation, and permission text data is generated using a data serialization language. This enables precise permission allocation and serialization based on user parameters and visual operations, improving the flexibility and accuracy of permission management. The loosely coupled permission text adapts to the permission requirements of different systems, exhibiting strong scalability. Detailed explanations follow.
[0083] Example 1
[0084] Please see Figure 1 , Figure 1 This is a flowchart illustrating a loosely coupled permission setting method disclosed in an embodiment of the present invention. Wherein, Figure 1 The described loosely coupled permission setting method can be applied to data processing systems / data processing devices / data processing servers (wherein, the server includes local processing servers or cloud processing servers). For example... Figure 1 As shown, this loosely coupled permission setting method may include the following operations:
[0085] 101. In response to a permission setting request, obtain the available permission information for the administrator user.
[0086] Optionally, the permission setting request can be triggered by user interface input, API call, or configuration file; this invention does not impose any limitations.
[0087] Optionally, the optional permission information may include a list of permission items, permission level, or permission scope, which is not limited in this invention.
[0088] Optionally, the process of obtaining the optional permission information can be implemented based on database queries, configuration file reading, or permission management system calls, and this invention does not limit it.
[0089] 102. Determine the target user for whom permission settings are to be applied and the corresponding user parameters.
[0090] Optionally, the target user can be a single user, a user group, or a role category; this invention does not impose any limitations.
[0091] Optionally, the user parameters may include user ID, role information, department affiliation, or historical operation records; this invention does not impose any limitations.
[0092] Optionally, the process of determining the target user can be based on user selection, automatic allocation, or rule matching, and this invention does not limit it.
[0093] 103. Based on the visual selection operation, select the user permissions corresponding to the target user from the optional permission information.
[0094] Optionally, the visual selection operation can be a drag-and-drop operation, a click-to-select operation, or a multi-select box operation; this invention does not limit the scope of the operation.
[0095] 104. Based on user parameters and user permissions, generate permission text data corresponding to the target user using a data serialization language.
[0096] Optionally, the permission text data may include the permissions of the target user across multiple project types.
[0097] As can be seen, the above-described embodiments of the invention obtain the administrator's selectable permission information and determine the target user and parameters by responding to permission setting requests, allocate user permissions based on visual selection operations, and generate permission text data using data serialization language. This enables precise permission allocation and serialization based on user parameters and visual operations, improves the flexibility and accuracy of permission management, and adapts to the permission requirements of different systems through loosely coupled permission text, thus exhibiting strong scalability.
[0098] As an optional embodiment, the permission text data in the above steps is text data in YAML, JSON, or XML format.
[0099] In one specific implementation plan, permissions are divided into page-level permissions and menu-level permissions. The permission text data is XML text, and its text format is shown below:
[0100] <right>
[0101] <!--Page-level permissions-->
[0102] <rightitem>
[0103] <name> Page Button 1< / name>
[0104] <action> Operation 1< / action>
[0105] < / rightitem>
[0106] <rightitem>
[0107] <name> Page Button 2< / name>
[0108] <action> Operation 2< / action>
[0109] < / rightitem>
[0110] <rightitem> ..................
[0111] < / rightitem>
[0112] <rightitem>
[0113] <name> Page button n< / name>
[0114] <action> Operation n< / action>
[0115] < / rightitem>
[0116] <!--Menu-level permissions-->
[0117] <rightitem>
[0118] <name> First-level menu 1< / name>
[0119] <subright>
[0120] <rightitem>
[0121] <name> Secondary menu 1-1< / name>
[0122] <subright>
[0123] <rightitem>
[0124] <name> Level 3 Menu 1-1-1< / name>
[0125] <action> Operation 1-1-1< / action>
[0126] < / rightitem>
[0127] <rightitem>
[0128] <name> Level 3 Menu 1-1-2< / name>
[0129] <action> Operation 1-1-2< / action>
[0130] < / rightitem>
[0131] <rightitem> ..................
[0132] < / rightitem>
[0133] <rightitem>
[0134] <name> Level 3 Menu 1-1-i< / name>
[0135] <action> Operation 1-1-i< / action>
[0136] < / rightitem>
[0137] < / subright>
[0138] < / rightitem>
[0139] <rightitem>
[0140] <name> Secondary menu 1-2< / name>
[0141] <subright>
[0142] <rightitem>
[0143] <name> Level 3 Menu 1-2-1< / name>
[0144] <action> Operation 1-2-1< / action>
[0145] < / rightitem>
[0146] <rightitem>
[0147] <name> Level 3 Menu 1-2-2< / name>
[0148] <action> Operation 1-2-2< / action>
[0149] < / rightitem>
[0150] <rightitem>
[0151] <name> Level 3 Menu 1-2-3< / name>
[0152] <action> Operation 1-2-3< / action>
[0153] < / rightitem>
[0154] < / subright>
[0155] < / rightitem>
[0156] <rightitem> ..................
[0157] < / rightitem>
[0158] <rightitem>
[0159] <name> Second-level menu 1-s< / name>
[0160] <subright>
[0161] <rightitem>
[0162] <name> Level 3 menu 1-s-1< / name>
[0163] <action> Operation 1-s-1< / action>
[0164] < / rightitem>
[0165] <rightitem>
[0166] <name> Level 3 menu 1-s-2< / name>
[0167] <action> Operation 1-s-2< / action>
[0168] < / rightitem>
[0169] < / subright>
[0170] < / rightitem>
[0171] < / subright>
[0172] < / rightitem>
[0173] < / right>
[0174] In one specific implementation, the permission text data is JSON text, and its text format is shown below:
[0175] {
[0176] "Right":
[0177] / / Page-level permissions
[0178] {
[0179] "RightItem": [
[0180] {
[0181] Name: "Page Button 1",
[0182] "action": "Operation 1"
[0183] },
[0184] {
[0185] Name: "Page Button 2",
[0186] "action": "Operation 2"
[0187] },
[0188] "\n..................\n",
[0189] {
[0190] Name: "Page Button n",
[0191] "action": "Operation n"
[0192] },
[0193] / / Menu permissions
[0194] {
[0195] "Name": "Top-level menu 1",
[0196] "SubRight": {
[0197] "RightItem": [
[0198] {
[0199] "Name": "Secondary Menu 1-1",
[0200] "SubRight": {
[0201] "RightItem": [
[0202] {
[0203] "Name": "Level 3 Menu 1-1-1",
[0204] "action": "Operation 1-1-1"
[0205] },
[0206] {
[0207] "Name": "Level 3 Menu 1-1-2",
[0208] "action": "Operation 1-1-2"
[0209] },
[0210] "\n..................\n",
[0211] {
[0212] "Name": "Level 3 Menu 1-1-i",
[0213] "action": "Operation 1-1-i"
[0214] } ]
[0216] }
[0217] },
[0218] {
[0219] "Name": "Secondary Menu 1-2",
[0220] "SubRight": {
[0221] "RightItem": [
[0222] {
[0223] "Name": "Level 3 Menu 1-2-1",
[0224] "action": "Operation 1-2-1"
[0225] },
[0226] {
[0227] "Name": "Level 3 Menu 1-2-2",
[0228] "action": "Operation 1-2-2"
[0229] },
[0230] {
[0231] "Name": "Level 3 Menu 1-2-3",
[0232] "action": "Operation 1-2-3"
[0233] } ]
[0235] }
[0236] },
[0237] "\n ..................\n ",
[0238] {
[0239] "Name": "Secondary Menu 1-s",
[0240] "SubRight": {
[0241] "RightItem": [
[0242] {
[0243] "Name": "Level 3 Menu 1-s-1",
[0244] "action": "Operation 1-s-1"
[0245] },
[0246] {
[0247] "Name": "Level 3 Menu 1-s-2",
[0248] "action": "Operation 1-s-2"
[0249] } ]
[0251] }
[0252] } ]
[0254] }
[0255] } ]
[0257] }
[0258] }
[0259] In one specific implementation, the permission text data is YAML text, and its text format is shown below:
[0260] Right:
[0261] RightItem:
[0262] # Page-level permissions
[0263] - Name: Page Button 1
[0264] action: Operation 1
[0265] - Name: Page Button 2
[0266] action: Operation 2
[0267] - .................
[0268] - Name: Page Button n
[0269] action: operation n
[0270] # Menu permissions
[0271] - Name: First-level menu 1
[0272] SubRight:
[0273] RightItem:
[0274] - Name: Second-level menu 1-1
[0275] SubRight:
[0276] RightItem:
[0277] - Name: Level 3 Menu 1-1-1
[0278] action: Operation 1-1-1
[0279] - Name: Level 3 Menu 1-1-2
[0280] Action: Operation 1-1-2
[0281] - .................
[0282] - Name: Level 3 Menu 1-1-i
[0283] action: Operation 1-1-i
[0284] - Name: Second-level menu 1-2
[0285] SubRight:
[0286] RightItem:
[0287] - Name: Level 3 Menu 1-2-1
[0288] Action: Operation 1-2-1
[0289] - Name: Level 3 Menu 1-2-2
[0290] Action: Operation 1-2-2
[0291] - Name: Level 3 Menu 1-2-3
[0292] Action: Operation 1-2-3
[0293] - .................
[0294] - Name: Second-level menu 1-s
[0295] SubRight:
[0296] RightItem:
[0297] - Name: Level 3 Menu 1-s-1
[0298] action: Operation 1-s-1
[0299] - Name: Level 3 Menu 1-s-2
[0300] action: Operation 1-s-2
[0301] As can be seen, the above optional embodiments limit the type of permission text data, so that the permission text data can achieve higher scalability and applicability through a highly standardized serialization format, which helps to realize accurate permission allocation and serialization based on user parameters and visual operations, improves the flexibility and accuracy of permission management, and adapts to the permission requirements of different systems through loosely coupled permission text, with strong scalability.
[0302] As an optional embodiment, the step above, selecting the user permissions corresponding to the target user from the optional permission information based on the visual selection operation, includes:
[0303] The first window displays all optional permission items in the optional permission information;
[0304] The permissions corresponding to the target user are displayed in the second window;
[0305] Based on the user's selection of any optional permission item in the first window and dragging it to the second window, the selected and dragged optional permission item is determined as the user permission corresponding to the target user.
[0306] Optionally, the first window can be a graphical user interface window, a web page interface, or a command-line interface; the present invention does not limit this.
[0307] Optionally, the optional permission items can be displayed in the form of a list, tree structure, or tags, and this invention does not limit them.
[0308] Optionally, the second window can be an independent window, a sub-window, or a dynamic panel; the present invention does not limit this.
[0309] Optionally, the permission display can be presented in the form of text, icons, or visual charts, and this invention does not impose any limitations.
[0310] Optionally, the selection and dragging operations can be implemented based on mouse interaction, touch screen operation, or keyboard shortcuts, and this invention does not limit them.
[0311] Optionally, the determination process for this operation can be based on event listening, interaction records, or rule verification, and this invention does not limit it.
[0312] As can be seen, through the above optional embodiments, by displaying optional permission items in the first window and target user permissions in the second window, user permissions are determined based on the user's operation of selecting and dragging from the first window to the second window, thereby realizing intuitive permission allocation based on visual interaction, improving the convenience of permission settings and user operation efficiency, and reducing the risk of misoperation in permission allocation.
[0313] As an optional embodiment, the user parameters in the above steps include at least one of user name, user level, user history, and user type.
[0314] As can be seen, the above optional embodiments limit the content of user parameters to comprehensively represent the characteristics of user parameters, assist in the accurate allocation and serialization of permissions based on user parameters and visual operations, improve the flexibility and accuracy of permission management, and adapt to the permission requirements of different systems through loosely coupled permission text, with strong scalability.
[0315] As an optional embodiment, the step described above, generating permission text data corresponding to the target user based on user parameters and user permissions using a data serialization language, includes:
[0316] Determine the parameter identifier corresponding to the user parameter in the preset database;
[0317] Based on the serialization rules corresponding to the preset data serialization language, and based on parameter identifiers and user permissions, the system generates permission text data corresponding to the target user; the data serialization language can be YAML, JSON, or XML.
[0318] Optionally, the database can be a relational database, a NoSQL database, or a distributed database; this invention does not impose any limitations.
[0319] Optionally, the parameter identifier can be a user ID, role code, or parameter hash value; this invention does not impose any limitations.
[0320] As can be seen, through the above optional embodiments, by determining the parameter identifier corresponding to the user parameter in the preset database, and generating permission text data based on YAML, JSON or XML serialization rules, accurate permission data generation based on parameter identifier and standard serialization language can be achieved, thereby improving the standardization and system compatibility of permission management and reducing the risk of inconsistent data formats.
[0321] As an optional embodiment, the step above, generating permission text data corresponding to the target user based on parameter identifiers and user permissions according to the serialization rules corresponding to the preset data serialization language, includes:
[0322] Retrieve the first-level permission text corresponding to the administrator user;
[0323] Obtain the second permission text of multiple similar users corresponding to the target user; optionally, the similarity between the user parameters of the similar users and the user parameters of the target user is greater than a preset similarity threshold.
[0324] Based on the first permission text and the second permission text, determine the specific setting permissions corresponding to the user's permissions;
[0325] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the specific setting permissions corresponding to the user permissions, the permission text data corresponding to the target user is generated.
[0326] Optionally, the first permission text can be a complete permission description of the administrator, a permission configuration file, or a permission record; this invention does not impose any limitations on this.
[0327] Optionally, the similarity threshold can be a fixed threshold, a dynamic threshold, or a threshold adjusted based on the distribution of user parameters; this invention does not impose any limitations.
[0328] Optionally, the similar users can be users with the same role, users in the same department, or users with similar behaviors; this invention does not impose any limitations.
[0329] Optionally, the process of determining similar users can be based on cluster analysis, similarity calculation, or user matching algorithms, and this invention does not limit the scope of the determination.
[0330] As can be seen, through the above optional embodiments, by obtaining the administrator's first permission text and the second permission text of similar users of the target user, the specific permission settings are determined and permission text data is generated based on serialization rules, thereby achieving accurate permission settings based on administrator permissions and similar user permissions, improving the pertinence and consistency of permission allocation, and reducing the risk of permission configuration deviation.
[0331] As an optional embodiment, the step above, determining the specific setting permissions corresponding to user permissions based on the first permission text and the second permission text, includes:
[0332] For each permission item in the user permissions, determine the first text description corresponding to that permission item in the first permission text;
[0333] In each second permission text, determine multiple second text descriptions corresponding to the permission item;
[0334] Determine whether all second text descriptions are within the first text description to obtain the first determination result;
[0335] If the first judgment result is negative, the first text description is determined as the permission setting description corresponding to the permission item;
[0336] When the first judgment result is yes, calculate the average text similarity between any two second text descriptions in all second text descriptions to obtain the similarity parameter;
[0337] Determine whether the similarity parameter is greater than a preset parameter threshold to obtain a second determination result;
[0338] When the second judgment result is yes, calculate the intersection of all second text descriptions to obtain the permission setting description corresponding to the permission item;
[0339] If the second judgment result is negative, filter out multiple similar text descriptions in all second text descriptions, and calculate the intersection of all similar text descriptions to obtain the permission setting description corresponding to the permission item;
[0340] Determine the specific setting permissions corresponding to all permission items as user permissions.
[0341] Optionally, the text similarity can be cosine similarity, Jaccard coefficient, or edit distance; this invention does not impose any limitation.
[0342] As can be seen, through the above optional embodiments, by comparing the text descriptions of permission items in the first permission text and the second permission text, the permission setting description is determined based on text similarity and intersection analysis, thereby achieving accurate permission content optimization based on multi-source permission text comparison, improving the accuracy and consistency of permission settings, and reducing the risk of ambiguity in permission descriptions.
[0343] As an optional embodiment, the step described above, filtering out multiple similar text descriptions from all second text descriptions, includes:
[0344] Calculate the average text similarity between each second text description and all other second text descriptions to obtain the similarity index corresponding to each second text description;
[0345] Filter out all text descriptions in the second text description whose similarity index is greater than the preset index threshold to obtain multiple similar text descriptions.
[0346] As can be seen, through the above optional embodiments, a similarity index is obtained by calculating the average text similarity between the second text descriptions, and similar text descriptions that exceed the threshold are filtered out and their intersection is taken to generate permission setting descriptions. This achieves accurate permission text filtering based on similarity analysis, improves the standardization and reliability of permission descriptions, and reduces the risk of redundancy or inconsistency in permission settings.
[0347] In one specific implementation scheme, a permission setting method was implemented, and the steps are as follows:
[0348] Initialize the system and add system users (including administrator users and regular users) to the user table.
[0349] Store all described system permission text as administrator permissions in the defined permission field, and start the system permission setting function.
[0350] Log in to the system using an administrator account, open the permission settings page, and perform the following steps to set permissions for a specific user.
[0351] On the same page, set up two data display boxes to read the administrator's and the user's permissions respectively; the left side displays all system permissions, and the right side displays the user's permissions.
[0352] When you need to grant a user a certain permission, add that permission from the left to the user permissions on the right, and repeat this process until the permissions for that user are set.
[0353] Read the user's permissions displayed in the right pane and generate the corresponding YAML / JSON / XML permission text.
[0354] Store the user's new permission text in the user's permission field.
[0355] Close the permissions page and end the permission settings for this user.
[0356] This solution employs YAML, JSON, XML technologies and single-item data storage technology for user data objects (database tables) to construct a loosely coupled permission setting method. This makes it applicable to permission management in various systems, solving problems such as storage redundancy, load, slow response speed, and poor user experience in traditional permission settings, and enhancing system flexibility and versatility.
[0357] Example 2
[0358] Please see Figure 2 , Figure 2This is a schematic diagram of a loosely coupled permission setting system disclosed in an embodiment of the present invention. Figure 2 The described loosely coupled permission setting system can be applied to data processing systems / data processing devices / data processing servers (wherein, the server includes local processing servers or cloud processing servers). For example... Figure 2 As shown, this loosely coupled permission setting system may include:
[0359] The acquisition module 201 is used to obtain the optional permission information corresponding to the administrator user in response to the permission setting request.
[0360] The determination module 202 is used to determine the target user for whom permission settings are to be applied and the corresponding user parameters.
[0361] Selection module 203 is used to select the user permissions corresponding to the target user from the optional permission information based on a visual selection operation.
[0362] The generation module 204 is used to generate permission text data corresponding to the target user based on user parameters and user permissions, using a data serialization language.
[0363] Optionally, the permission text data may include the permissions of the target user across multiple project types.
[0364] As can be seen, the above-described embodiments of the invention obtain the administrator's selectable permission information and determine the target user and parameters by responding to permission setting requests, allocate user permissions based on visual selection operations, and generate permission text data using data serialization language. This enables precise permission allocation and serialization based on user parameters and visual operations, improves the flexibility and accuracy of permission management, and adapts to the permission requirements of different systems through loosely coupled permission text, thus exhibiting strong scalability.
[0365] As an optional embodiment, the permission text data can be text data in YAML, JSON, or XML format.
[0366] As can be seen, the above optional embodiments limit the type of permission text data, so that the permission text data can achieve higher scalability and applicability through a highly standardized serialization format, which helps to realize accurate permission allocation and serialization based on user parameters and visual operations, improves the flexibility and accuracy of permission management, and adapts to the permission requirements of different systems through loosely coupled permission text, with strong scalability.
[0367] As an optional embodiment, the selection module selects the specific method of user permissions corresponding to the target user from optional permission information based on visual selection operations, including:
[0368] The first window displays all optional permission items in the optional permission information;
[0369] The permissions corresponding to the target user are displayed in the second window;
[0370] Based on the user's selection of any optional permission item in the first window and dragging it to the second window, the selected and dragged optional permission item is determined as the user permission corresponding to the target user.
[0371] As can be seen, through the above optional embodiments, by displaying optional permission items in the first window and target user permissions in the second window, user permissions are determined based on the user's operation of selecting and dragging from the first window to the second window, thereby realizing intuitive permission allocation based on visual interaction, improving the convenience of permission settings and user operation efficiency, and reducing the risk of misoperation in permission allocation.
[0372] As an optional embodiment, user parameters include at least one of user name, user level, user history, and user type.
[0373] As can be seen, the above optional embodiments limit the content of user parameters to comprehensively represent the characteristics of user parameters, assist in the accurate allocation and serialization of permissions based on user parameters and visual operations, improve the flexibility and accuracy of permission management, and adapt to the permission requirements of different systems through loosely coupled permission text, with strong scalability.
[0374] As an optional embodiment, the generation module generates the permission text data corresponding to the target user based on user parameters and user permissions, using a data serialization language, in the following specific ways:
[0375] Determine the parameter identifier corresponding to the user parameter in the preset database;
[0376] Based on the serialization rules corresponding to the preset data serialization language, and based on parameter identifiers and user permissions, the system generates permission text data corresponding to the target user; the data serialization language can be YAML, JSON, or XML.
[0377] As can be seen, through the above optional embodiments, by determining the parameter identifier corresponding to the user parameter in the preset database, and generating permission text data based on YAML, JSON or XML serialization rules, accurate permission data generation based on parameter identifier and standard serialization language can be achieved, thereby improving the standardization and system compatibility of permission management and reducing the risk of inconsistent data formats.
[0378] As an optional embodiment, the generation module generates permission text data corresponding to the target user based on the serialization rules of a preset data serialization language, parameter identifiers, and user permissions in the following specific ways:
[0379] Retrieve the first-level permission text corresponding to the administrator user;
[0380] Obtain the second permission text of multiple similar users corresponding to the target user; optionally, the similarity between the user parameters of the similar users and the user parameters of the target user is greater than a preset similarity threshold.
[0381] Based on the first permission text and the second permission text, determine the specific setting permissions corresponding to the user's permissions;
[0382] Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the specific setting permissions corresponding to the user permissions, the permission text data corresponding to the target user is generated.
[0383] As can be seen, through the above optional embodiments, by obtaining the administrator's first permission text and the second permission text of similar users of the target user, the specific permission settings are determined and permission text data is generated based on serialization rules, thereby achieving accurate permission settings based on administrator permissions and similar user permissions, improving the pertinence and consistency of permission allocation, and reducing the risk of permission configuration deviation.
[0384] As an optional embodiment, the generation module determines the specific method of setting permissions corresponding to user permissions based on the first permission text and the second permission text, including:
[0385] For each permission item in the user permissions, determine the first text description corresponding to that permission item in the first permission text;
[0386] In each second permission text, determine multiple second text descriptions corresponding to the permission item;
[0387] Determine whether all second text descriptions are within the first text description to obtain the first determination result;
[0388] If the first judgment result is negative, the first text description is determined as the permission setting description corresponding to the permission item;
[0389] When the first judgment result is yes, calculate the average text similarity between any two second text descriptions in all second text descriptions to obtain the similarity parameter;
[0390] Determine whether the similarity parameter is greater than a preset parameter threshold to obtain a second determination result;
[0391] When the second judgment result is yes, calculate the intersection of all second text descriptions to obtain the permission setting description corresponding to the permission item;
[0392] If the second judgment result is negative, filter out multiple similar text descriptions in all second text descriptions, and calculate the intersection of all similar text descriptions to obtain the permission setting description corresponding to the permission item;
[0393] Determine the specific setting permissions corresponding to all permission items as user permissions.
[0394] As can be seen, through the above optional embodiments, by comparing the text descriptions of permission items in the first permission text and the second permission text, the permission setting description is determined based on text similarity and intersection analysis, thereby achieving accurate permission content optimization based on multi-source permission text comparison, improving the accuracy and consistency of permission settings, and reducing the risk of ambiguity in permission descriptions.
[0395] As an optional embodiment, the specific method by which the generation module filters out multiple similar text descriptions from all second text descriptions includes:
[0396] Calculate the average text similarity between each second text description and all other second text descriptions to obtain the similarity index corresponding to each second text description;
[0397] Filter out all text descriptions in the second text description whose similarity index is greater than the preset index threshold to obtain multiple similar text descriptions.
[0398] As can be seen, through the above optional embodiments, a similarity index is obtained by calculating the average text similarity between the second text descriptions, and similar text descriptions that exceed the threshold are filtered out and their intersection is taken to generate permission setting descriptions. This achieves accurate permission text filtering based on similarity analysis, improves the standardization and reliability of permission descriptions, and reduces the risk of redundancy or inconsistency in permission settings.
[0399] Example 3
[0400] Please see Figure 3 , Figure 3 This is another permission setting system based on loose coupling disclosed in the embodiments of the present invention. Figure 3 The described loosely coupled permission setting system is applied in data processing systems / data processing devices / data processing servers (wherein, the server includes a local processing server or a cloud processing server). For example... Figure 3 As shown, this loosely coupled permission setting system may include:
[0401] Memory 301 storing executable program code;
[0402] Processor 302 coupled to memory 301;
[0403] The processor 302 calls the executable program code stored in the memory 301 to execute the steps of the loosely coupled permission setting method described in Embodiment 1.
[0404] Example 4
[0405] This invention discloses a computer read storage medium that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the steps of the loosely coupled permission setting method described in Embodiment 1.
[0406] Example 5
[0407] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps of the loosely coupled permission setting method described in Embodiment 1.
[0408] The foregoing has described specific embodiments of this specification; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0409] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0410] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0411] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0412] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0413] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0414] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0415] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0416] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0417] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0418] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0419] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0420] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0421] Finally, it should be noted that the permission setting method and system based on loose coupling disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A permission setting method based on loose coupling, characterized in that, The method includes: In response to a permission setting request, obtain the available permission information for the administrator user; Determine the target user for whom permission settings are to be applied and the corresponding user parameters; Based on a visual selection operation, select the user permissions corresponding to the target user from the optional permission information; Based on the user parameters and user permissions, and using a data serialization language, permission text data corresponding to the target user is generated, including: Determine the parameter identifier corresponding to the user parameter in the preset database; Obtain the first permission text corresponding to the administrator user; Obtain the second permission text of multiple similar users corresponding to the target user; the similarity between the user parameters of the similar users and the user parameters of the target user is greater than a preset similarity threshold; For each permission item in the user permissions, a first text description corresponding to that permission item is determined in the first permission text; In each of the second permission texts, determine a plurality of second text descriptions corresponding to the permission item; Determine whether all the second text descriptions are within the first text description to obtain the first determination result; If the first determination result is negative, the first text description is determined as the permission setting description corresponding to the permission item; When the first judgment result is yes, calculate the average value of the text similarity between any two second text descriptions in all second text descriptions to obtain the similarity parameter; Determine whether the similarity parameter is greater than a preset parameter threshold to obtain a second determination result; When the second judgment result is yes, calculate the intersection of all the second text descriptions to obtain the permission setting description corresponding to the permission item; When the second judgment result is negative, filter out multiple similar text descriptions in all the second text descriptions, and calculate the intersection of all the similar text descriptions to obtain the permission setting description corresponding to the permission item; Determine the permission setting descriptions corresponding to all the aforementioned permission items as the specific setting permissions corresponding to the user permissions; Based on the serialization rules corresponding to the preset data serialization language, and based on the parameter identifier and the specific setting permissions corresponding to the user permissions, permission text data corresponding to the target user is generated; the data serialization language is YAML, JSON, or XML; the permission text data includes the permissions of the target user under multiple project types.
2. The permission setting method based on loose coupling according to claim 1, characterized in that, The permission text data is in YAML, JSON, or XML format.
3. The permission setting method based on loose coupling according to claim 1, characterized in that, The step of selecting user permissions corresponding to the target user from the optional permission information based on visual selection includes: All optional permission items in the optional permission information are displayed in the first window; The permissions corresponding to the target user are displayed in the second window; Based on the user's selection of any of the optional permission items in the first window and dragging them to the second window, the selected and dragged optional permission item is determined as the user permission corresponding to the target user.
4. The permission setting method based on loose coupling according to claim 1, characterized in that, The user parameters include at least one of the following: user name, user level, user history, and user type.
5. The permission setting method based on loose coupling according to claim 1, characterized in that, The step of filtering out multiple similar text descriptions from all the second text descriptions includes: Calculate the average of the text similarity between each second text description and all other second text descriptions to obtain the similarity index corresponding to each second text description; Filter out all text descriptions in the second text description whose similarity index is greater than a preset index threshold to obtain multiple similar text descriptions.
6. A permission setting system based on loose coupling, characterized in that, The system is used to execute the loosely coupled permission setting method as described in any one of claims 1-5, the system comprising: The acquisition module is used to retrieve the available permission information for the administrator user in response to permission setting requests. The determination module is used to determine the target user for whom permission settings are to be applied and the corresponding user parameters. The selection module is used to select the user permissions corresponding to the target user from the optional permission information based on a visual selection operation. The generation module is used to generate permission text data corresponding to the target user based on the user parameters and the user permissions, using a data serialization language; the permission text data includes the permissions of the target user under multiple item types.
7. A permission setting system based on loose coupling, characterized in that, The system includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the permission setting method based on loose coupling as described in any one of claims 1-5.
Citation Information
Patent Citations
Permission data recommendation method and system, permission setting method and system, electronic equipment and medium
CN112818377A
Authority control method and device and storage medium
CN112883390A
Permission processing method, device and equipment and readable storage medium
CN118133316A