Product distribution processing method, apparatus, device, and storage medium

By constructing an authorization model of 'user-role-permission-product', the problem of low product allocation efficiency in cloud customer service among different enterprises is solved, and efficient and accurate product allocation is achieved.

CN114004527BActive Publication Date: 2025-12-30CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111318095.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-12-30
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

When cloud-based customer service distributes products to different enterprises, there is a problem of repetitive development, resulting in low product distribution efficiency.

Method used

By constructing an authorization model of 'user-role-permission-product', the assignable products can be determined based on the user's role and permission mapping relationship, avoiding the need to develop separate products for each enterprise's business system and achieving efficient product allocation.

Benefits of technology

This improved product allocation efficiency, ensuring that allocated products could be used normally in the enterprise's business systems and avoiding the problem of repetitive development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004527B_ABST
    Figure CN114004527B_ABST
Patent Text Reader

Abstract

The application provides a product distribution processing method and device, equipment and a storage medium, and relates to the technical field of resource management. The method comprises the following steps: receiving a query request of a distributable product, wherein the query request comprises the identity of a first user and the identity of a second user, the first user is a target user to be queried for the distributable product, and the second user is a user logged into a business system; acquiring at least one menu corresponding to the first user according to the identity of the first user, a preset role table and a first mapping relationship table; acquiring at least one product to which the second user has access rights according to the identity of the second user, a preset product table, the first mapping relationship table, a second mapping relationship table and a third mapping relationship table, and each product corresponds to a menu; and for each product to which the second user has access rights, if it is determined that the at least one menu corresponding to the first user comprises a menu of the product, the product is determined as a distributable product of a user and product information of the distributable product is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of resource management technology, and in particular to a product allocation processing method, apparatus, device, and storage medium. Background Technology

[0002] Customer service is a crucial way for businesses to ensure service quality and enhance user experience. Call centers are an important function of customer service.

[0003] Most businesses rely on cloud-based customer service platforms. As call centers grow larger and business systems become more complex, their specific needs also vary. To address these diverse needs, the cloud customer service development center has developed numerous universal products suitable for various businesses. Companies (tenants) rent these products from the cloud customer service platform, enabling them to integrate product functionality into their business systems for their employees without requiring them to develop their own products. The cloud customer service platform can assign product permissions to companies, and companies can then assign product usage permissions to different employees based on the assigned products, thus achieving organized internal management. Currently, the cloud customer service platform develops products specifically for each company's business system, adding the product to the existing system, thereby granting the company access to that product.

[0004] However, if various enterprises have the same product needs, cloud customer service will undergo repetitive development, resulting in low product allocation efficiency. Summary of the Invention

[0005] This application provides a product allocation processing method, apparatus, device, and storage medium to solve the problem that if various enterprises have the same product needs during the product allocation process, cloud customer service will undergo repetitive development, resulting in low product allocation efficiency.

[0006] In a first aspect, this application provides a product allocation processing method applied to a server. The method includes: receiving a query request for allocatable products, the query request including the identifier of a first user and the identifier of a second user, the first user being the target user for whom an allocatable product is to be queried, the second user being a user logged into a business system, and the second user having greater permissions than the first user; obtaining at least one menu corresponding to the first user based on the identifier of the first user, a preset role table, and a first mapping relationship table, the role table including roles configured in the business system and at least one menu corresponding to each role, the first mapping relationship table including the identifier of each user and at least one role corresponding to each user, the role being a set of different permissions, and the menu being a command of the business system; obtaining at least one product for which the second user has permissions based on the identifier of the second user, a preset product table, the first mapping relationship table, a second mapping relationship table, and a third mapping relationship table, each product corresponding to a menu, the second mapping relationship table including the identifier of each role and at least one permission corresponding to each role, the third mapping relationship table including the identifier of each permission and at least one product corresponding to each permission; for each product for which the second user has permissions, if it is determined that at least one menu corresponding to the first user includes a menu of the product, then the product is determined as an allocatable product for the first user.

[0007] Secondly, this application provides a product allocation processing method applied to a terminal device. The method includes: sending a query request for allocable products, the query request including the identifier of a first user and the identifier of a second user, the first user being the target user to query for allocable products, the second user being a user logged into a business system, and the second user having greater permissions than the first user; and receiving an allocable product result, the allocable product result including information on at least one allocable product that can be allocated to the first user.

[0008] Thirdly, this application provides a product allocation processing apparatus applied to a server. The apparatus includes: a receiving module, configured to receive a query request for allocable products, the query request including the identifier of a first user and the identifier of a second user, wherein the first user is the target user for whom the allocable products are to be queried, and the second user is a user logged into the business system, and the second user has greater permissions than the first user; and an obtaining module, configured to obtain at least one menu corresponding to the first user based on the identifier of the first user, a preset role table, and a first mapping relationship table, wherein the role table includes roles configured in the business system and at least one menu corresponding to each role, and the first mapping relationship table includes the identifier of each user and at least one role corresponding to each user. The roles are a set of different permissions, and the menus are commands of the business system. The acquisition module is further configured to acquire at least one product for which the second user has permissions, based on the second user's identifier, a preset product table, the first mapping table, the second mapping table, and the third mapping table. Each product corresponds to a menu. The second mapping table includes the identifier of each role and at least one permission corresponding to each role. The third mapping table includes the identifier of each permission and at least one product corresponding to each permission. The determination module is configured to, for each product for which the second user has permissions, determine that if at least one menu corresponding to the first user includes a menu of the product, then determine the product as an assignable product for the first user.

[0009] Fourthly, this application provides a product allocation processing apparatus applied to a terminal device. The apparatus includes: a sending module for sending a query request for allocable products, the query request including the identifier of a first user and the identifier of a second user, the first user being the target user for whom an allocable product is to be queried, and the second user being a user logged into a business system, the second user having greater permissions than the first user; and a receiving module for receiving an allocable product result returned by the server, the allocable product result including information on at least one allocable product that can be allocated to the first user.

[0010] Fifthly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described in the first or second aspect.

[0011] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method described in the first or second aspect.

[0012] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first or second aspect.

[0013] The product allocation processing method, apparatus, device, and storage medium provided in this application, upon receiving a query request for allocatable products, obtains at least one menu corresponding to a first user based on the first user's identifier, a preset role table, and a first mapping relationship table; and obtains at least one product for which the second user has permissions based on the second user's identifier, a preset product table, a first mapping relationship table, a second mapping relationship table, and a third mapping relationship table, with each product corresponding to a menu; and for each product for which the second user has permissions, if it is determined that at least one menu corresponding to the first user includes the menu of that product, then the product is determined as an allocatable product for the first user, and the allocatable product result includes information on at least one allocatable product that can be allocated to the first user. By assigning roles to users and allocating products to users based on roles, the problem of low product allocation efficiency caused by repetitive development for different needs of various enterprises can be solved. Furthermore, since both the role table and the product table include menus, during the process of assigning products to users based on roles, the menus of each product that the second user has permissions to are compared with the menus corresponding to the first user's role. If at least one menu corresponding to the first user includes the menu of the product, then the product is determined to be an assignable product for the first user. This ensures that all products returned to the terminal device are assignable products, preventing the problem of assigning a product to a user but the product's menu not being included in the menus owned by the role, thus preventing the product from using the menu function. This further improves the efficiency of product assignment. Attached Figure Description

[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0015] Figure 1 Application scenario diagrams provided for embodiments of this application;

[0016] Figure 2 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 1 ;

[0017] Figure 3 This is a schematic diagram illustrating the relationship between users and products provided in an embodiment of this application.

[0018] Figure 4 A schematic diagram of the product allocation model provided in the embodiments of this application;

[0019] Figure 5 This is a schematic diagram illustrating the relationship between users, roles, and permissions provided in the embodiments of this application;

[0020] Figure 6 A schematic diagram illustrating the relationship between permissions, products, and functional operations provided in the embodiments of this application;

[0021] Figure 7 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 2 ;

[0022] Figure 8 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 3 ;

[0023] Figure 9 A schematic diagram of another product allocation model provided in an embodiment of this application;

[0024] Figure 10 For based on Figure 9 A diagram illustrating the relationships between data tables in the product allocation model;

[0025] Figure 11 A schematic diagram of the product dispensing processing apparatus provided in an embodiment of this application;

[0026] Figure 12 A schematic diagram of the product dispensing processing apparatus provided in an embodiment of this application;

[0027] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0028] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0030] Terminology Explanation:

[0031] User (Employee): An operator who has successfully authenticated and logged into the business system.

[0032] User groups: Grouping users can reduce duplicate authorizations for users.

[0033] Permissions: Permission to access the product.

[0034] Role: A collection of roles with different permissions.

[0035] Resources are the collection of all requests that a user can initiate, such as menus (including parent and child menus), buttons, fields, etc. in various business systems.

[0036] Products are a type of resource; reports, knowledge, and work orders in a business system all fall under the product category. Reports dynamically display data using tables, charts, and other formats, and can be expressed by the formula: Report = Diverse Formats + Dynamic Data. Knowledge, in customer service scenarios, assists customer service representatives in responding to customer inquiries and complaints. A work order is a simple repair or manufacturing plan consisting of one or more tasks; it serves as the basis for tasks assigned by higher-level departments and for tasks received by lower-level departments.

[0037] Tenant: A tenant is a customer who uses system or computer computing resources. In multi-tenant technology, a tenant includes all data in the system that can be identified as a specific user, including account and statistical data, various data created by the user in the system, and the user's own customized application environment, all of which fall under the scope of a tenant.

[0038] Figure 1 This is an application scenario diagram provided for embodiments of this application. For example... Figure 1 As shown, the application scenario includes: terminal device 1 and server 2.

[0039] Terminal device 1 can be the terminal device where the administrator is located, which can be a smartphone, computer, or tablet. The administrator can be the administrator of the cloud customer service system, i.e., the super administrator, or the administrator of the enterprise's business system, i.e., a regular administrator.

[0040] Server 2 can be a single cloud server or a cloud server cluster comprising multiple cloud servers. Server 2 runs a cloud customer service system, which offers a variety of products. These products are available for rent by businesses, thus eliminating the need for them to develop their own.

[0041] In cloud-based customer service, user needs are constantly changing; for example, users may need to add or remove products they own. To address these evolving needs, a product allocation function is required. Specifically, administrators assign products to users, including tenants and regular users. Tenants can be enterprises, and regular users can be employees within those enterprises. Super administrators can allocate products to different tenants. Similarly, regular administrators can allocate products to employees within an enterprise.

[0042] In related technologies, as the number of tenants in cloud customer service systems increases, and each tenant has different business needs, it is often necessary to develop separate systems for each tenant's business system to provide the product within that system, thus granting the tenant access to the product.

[0043] However, while each tenant's business needs differ, there are also many shared requirements, meaning that the same products exist across different tenants' business systems. In this situation, if the cloud customer service system continues to be developed separately, it will require development in each tenant's business system, resulting in redundant development and low product allocation efficiency.

[0044] To address the aforementioned technical problems, the inventors of this application propose the following technical concept: Constructing a "user-role-permission-product" authorization model, which enables the allocation of products to users based on roles. In this model, a user has multiple roles, each role has several permissions, and each permission has multiple products. The role table aims to allow the cloud customer service system to adapt to a larger user base. If certain permissions need to be granted to a user, it is not necessary to directly grant the permissions to the user; instead, the role containing those permissions can be assigned to the user. This allows for providing products to all tenants through a single product development, avoiding the repetitive development and low product allocation efficiency caused by developing separate systems for each enterprise's business system. Furthermore, allocable products can be identified—that is, products that can be assigned to users—ensuring that when administrators assign products to users, all assigned products are allocable products, further improving product allocation efficiency.

[0045] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0046] Example 1:

[0047] Figure 2 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 1 .like Figure 2 As shown, the processing method for product allocation includes the following steps:

[0048] S200: The terminal device sends a query request for allocable products to the server. The query request includes the identifiers of the first user and the second user. The first user is the target user for the allocable products to be queried, and the second user is the user logged into the business system. The second user has greater privileges than the first user.

[0049] In this embodiment, there are at least two application scenarios:

[0050] Scenario 1: A regular administrator assigns products to a user. The second user is an administrator of the company's business system, and the first user can be an employee of the company. The second user can log into the company's business system and assign products to the first user.

[0051] The second scenario: The super administrator assigns products to tenants. The second user is the administrator of the cloud customer service system, and the first user can be a tenant of the cloud customer service system, i.e., a company. The second user can log in to the cloud customer service system and assign products to the first user.

[0052] In some examples, the second user's permissions are greater than the first user's permissions. This can be understood as the second user having access to more products than the first user, or the first user having access to a subset of the products the second user has access to.

[0053] The terminal device in this embodiment can be as follows: Figure 1 The terminal device 1 shown can be a server as follows: Figure 1 The server 2 shown is an example where, in this embodiment, terminal device 1 sends a query request for assignable products to server 2.

[0054] The terminal device 1 includes a graphical user interface, which includes a product allocation interface. The product allocation interface displays selection buttons with the identifiers of multiple users whose products are to be allocated.

[0055] In the first scenario, the super administrator can select the tenant from among multiple tenants from whom the product will be assigned as the target user. The target user can be one tenant or multiple tenants; this embodiment does not impose any restrictions on this.

[0056] In the second scenario, a regular administrator can select the user to be assigned the product as the target user from among multiple users. The target user can be one user or multiple users; this embodiment does not impose any restrictions. Here, "user" can be understood as an employee within the company.

[0057] The user identifier is information that identifies the user. Optionally, the user identifier can be the user's name.

[0058] Before step S200, the graphical user interface of terminal device 1 may also include a "product allocation" control. The super administrator or ordinary administrator can operate through the "product allocation" control to send a permission allocation request to the server. After receiving the permission allocation request, the server returns permission allocation information to terminal device 1. The permission allocation information includes the information of the tenant or user to be allocated products, as well as the roles that the tenant or user can be assigned. The super administrator or ordinary administrator can select the permission allocation information and generate a query request for assignable products based on the identifier of the selected user and the selected role, and send it to the server.

[0059] Corresponding to step S200, the server executes the following step S201.

[0060] S201. The server receives a query request for allocable products sent by the terminal device.

[0061] S202. The server obtains at least one menu corresponding to the first user based on the first user's identifier, the preset role table, and the first mapping relationship table. The role table includes the roles configured by the business system and at least one menu corresponding to each role. The first mapping relationship table includes the identifier of each user and at least one role corresponding to each user. Roles are a set of different permissions, and menus are commands of the business system.

[0062] In this embodiment, the menu may include a parent menu and / or sub-menus. The menu can provide users with functions such as adding, deleting, modifying, and querying products.

[0063] In some embodiments, step S202 specifically includes:

[0064] Step a1: Determine the role of the first user based on the first user's identifier and the first mapping table.

[0065] The structure of the first mapping table is shown in Table 1 below:

[0066] Table 1 First Mapping Relationship Table

[0067]

[0068] Based on Table 1, step a1 is to find the role corresponding to the first user's identifier in the first mapping table and use it as the first user's role.

[0069] Step a2: Based on the first user's role and the preset role table, determine at least one menu corresponding to the first user's role, and use it as at least one menu corresponding to the first user.

[0070] The structure of the character table is shown in Table 2 below:

[0071] Table 2 Character List

[0072] Field Item Name Chinese name Field attributes ..rlId Character Number NVARCHAR(20) ..rlNm Character Name NVARCHAR(200) ..rlDsc Character Description NVARCHAR(2000) ..vldInd Valid mark CHAR(1) ..menuInfo Menu information NVARCHAR(2000) ..modTm Operation time TIMESTAMP ..lglpsnId Legal Entity Number VARCHAR(100)

[0073] Based on Table 2, step a2 is to search for at least one menu corresponding to the first user's role in the role table.

[0074] S203. The server obtains at least one product that the second user has permission to use based on the second user's identifier, the preset product table, the first mapping table, the second mapping table, and the third mapping table. Each product has a corresponding menu. The second mapping table includes the identifier of each role and at least one permission corresponding to each role. The third mapping table includes the identifier of each permission and at least one product corresponding to each permission.

[0075] In some embodiments, step S203 specifically includes:

[0076] Step b1: Determine the role of the second user based on the second user's identifier and the first mapping table.

[0077] Specifically, the implementation of step b1 is similar to that of step a1, and you can refer to the implementation of step a1 for details.

[0078] Step b2: Based on the second user's role, the second mapping table, and the third mapping table, determine at least one product corresponding to the second user's role.

[0079] Specifically, step b2 includes:

[0080] Step b21: Determine at least one permission corresponding to the second user's role based on the second user's role and the second mapping relationship table.

[0081] The second mapping table includes multiple roles and at least one permission corresponding to each role.

[0082] Step b22: For each permission in at least one of the permissions corresponding to the role of the second user, determine at least one product corresponding to the permission based on the permission and the third mapping relationship table.

[0083] The third mapping table includes multiple permissions and at least one product corresponding to each permission.

[0084] Step b23: Identify all products corresponding to at least one permission as at least one product corresponding to the second user's role.

[0085] Step b24: Obtain the menu corresponding to each product in at least one of the specified products from the preset product table.

[0086] Step S203 will be explained below with reference to the accompanying drawings and some examples:

[0087] Figure 3 This is a schematic diagram illustrating the relationship between users and products provided in an embodiment of this application.

[0088] like Figure 3 As shown, users can assume multiple roles, such as regular agents and agent team leaders. Each role has specific access permissions to the business systems. For example, regular agents have access to work orders and can view their own work status; agent team leaders have access to reports and can view work report statistics for each agent. These work orders and reports belong to the product and are distributed within the business systems that involve that product.

[0089] It is worth noting that the relationships between users and roles, roles and permissions, and permissions and products are all many-to-many.

[0090] based on Figure 3 The relationship between users and products shown can be used to propose a product allocation model for assigning products to users.

[0091] Figure 4 This is a schematic diagram of the product allocation model provided in the embodiments of this application.

[0092] like Figure 4 As shown, the product allocation model includes a user table, a first mapping table, a role table, a second mapping table, a permission table, a third mapping table, and a product table. The first mapping table is a user-role mapping table, the second mapping table is a role-permission mapping table, and the third mapping table is a permission-product mapping table.

[0093] Figure 5 This is a schematic diagram illustrating the relationship between users, roles, and permissions provided in the embodiments of this application.

[0094] Figure 6 This is a schematic diagram illustrating the relationship between permissions, products, and functional operations provided in the embodiments of this application.

[0095] like Figure 5 As shown, users are associated with roles and permissions, and as... Figure 6 As shown, by associating permissions with products, different users can access different products.

[0096] For example, the structures of the user table, the second mapping table, the permission table, the third mapping table, and the product table are shown in the following tables:

[0097] Table 3 User Table

[0098] Field Item Name Chinese name Field attributes ..usrId User ID CHAR(8) ..usrNm Username NVARCHAR(200) ..usrSt User Status CHAR(2) ..blngInsid Organization Number CHAR(9) ..lglpsnId Legal Entity Number VARCHAR(100) ..moveTelno mobile phone number NVARCHAR(240) ..emailAdr Email address NVARCHAR(1500) ..vldInd Valid mark CHAR(1) ..modTm Operation time TIMESTAMP

[0099] Table 4 Second Mapping Relationship Table

[0100]

[0101] Table 5 Permissions Table

[0102] Field Item Name Chinese name Field attributes ..ahrId Permission ID NVARCHAR(20) ..ahrNm Permission Name NVARCHAR(200) ..ahrDsc Permission Description NVARCHAR(2000) ..lglpsnId Legal Entity Number VARCHAR(100) ..modTm Operation time TIMESTAMP

[0103] Table 6 Third Mapping Relationship Table

[0104]

[0105] Table 7 Product List

[0106] Field Item Name Chinese name Field attributes ..pro_Id Product Number NVARCHAR(10) ..pro_Nm Product Name NVARCHAR(20) ..pro_Route Product Routing NVARCHAR(20) ..relMenu Related menus NVARCHAR(200) ..stm_ID System Number VARCHAR(10) ..modTm Operation time TIMESTAMP

[0107] Based on Table 3, the menu corresponding to a product can be determined according to the associated menu in the product table.

[0108] Among them, the server is based on Figure 4 The product allocation model shown performs product allocation by first checking if the user exists in the user table based on the user's identifier. If the user exists, the model then checks the user's role based on the user's identifier and the user role mapping table. Next, it checks the user's permissions based on the user's role and the role permission table. Finally, it checks the user's allocatable products based on the user's permissions and the permission product mapping table. And then, it searches for the menu corresponding to the allocatable product in the product table.

[0109] In this embodiment, permissions can be understood as operations on functional modules (products), such as adding, deleting, and modifying products, accessing work order products, and accessing report products. Based on these permissions, functional operations can be categorized into one type, and products such as work orders and reports into another. When modeling the data table, both functional operations and products can be directly associated with the permission table, thereby improving the convenience of data table modeling and the scalability of permissions. The following is the structure of the functional operation table:

[0110] Table 8 Function Operation Table

[0111] Field Item Name Chinese name Field attributes ..opt_Id Operation number NVARCHAR(10) ..opt_Nm Operation Name NVARCHAR(20) ..opt_Code Operation Code NVARCHAR(20)

[0112] The structure of the permission table shows that it includes an Ahr_Type (permission type) field. In this embodiment, the permission type value distinguishes products from other resources; for example, PRO represents access permissions for products, and OPT represents operation permissions for functional modules. This allows access to both the product table and the function operation table in the same way. Furthermore, differentiating products from other resources facilitates product allocation to users.

[0113] It should be understood that in Tables 1-5 above, CHAR is a fixed length, meaning that when the input characters are less than the specified number, null values ​​will be added at the end. When the input characters are greater than the specified number, the excess characters will be truncated.

[0114] NVARCHAR represents a Unicode variable-length encoding type, where the number in parentheses represents the encoding length. NVARCHAR(n) represents a variable-length encoding containing n characters, where the value of n is between 1 and 4000.

[0115] VARCHAR represents a non-Unicode variable-length data type. VARCHAR(n) represents variable-length, non-Unicode character data with a length of n bytes. n is a value between 1 and 8000.

[0116] TIMESTAMP represents a timestamp.

[0117] S204. For each product that the second user has permissions for, if the server determines that at least one menu corresponding to the first user includes the product, then the product is determined to be an assignable product for the first user.

[0118] Specifically, the server compares the menu retrieved in step S202 with the menu corresponding to the product obtained in step S204. If the menu corresponding to the product obtained in step S203 is the same as any menu in the retrieved menu, then the product is determined to be an allocatable product for the first user; otherwise, the product is determined to be an unallocable product for the first user.

[0119] S205. The server returns the allocatable product result to the terminal device, which includes information on at least one allocatable product that can be allocated to the first user.

[0120] Accordingly, terminal device 1 receives the allocatable product results returned by the server and displays them in the graphical user interface of terminal device 1. Furthermore, the super administrator can assign products to tenants based on the allocatable product results, or a regular administrator can assign products to users based on the allocatable product results.

[0121] This embodiment, upon receiving a query request for assignable products from a terminal device, retrieves at least one menu corresponding to the first user based on the first user's identifier, a preset role table, and a first mapping relationship table; and retrieves at least one product for which the second user has permissions based on the second user's identifier, a preset product table, a first mapping relationship table, a second mapping relationship table, and a third mapping relationship table, with each product corresponding to a menu. For each product for which the second user has permissions, if it is determined that at least one menu corresponding to the first user includes the product's menu, then the product is identified as an assignable product for the first user, and an assignable product result is returned to the terminal device, including information about at least one assignable product that can be assigned to the first user. By assigning roles to users and allocating products to users based on roles, the problem of repetitive development for different enterprise needs, leading to low product allocation efficiency, can be solved. Furthermore, since both the role table and the product table include menus, during the process of assigning products to users based on roles, the menus of each product that the second user has permissions to are compared with the menus corresponding to the first user's role. If at least one menu corresponding to the first user includes the menu of the product, then the product is determined to be an assignable product for the first user. This ensures that all products returned to the terminal device are assignable products, preventing the problem of assigning a product to a user but the product's menu not being included in the menus owned by the role, thus preventing the product from using the menu function. This further improves the efficiency of product assignment.

[0122] Based on the above embodiments, after the server returns the assignable product results to the terminal device, the super administrator or regular administrator on the terminal device side can assign products to the user. The specific product assignment operation is as follows:

[0123] Example 2:

[0124] Figure 7 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 2 .like Figure 7 As shown, the processing method for product allocation includes the following:

[0125] S701, The terminal device sends a product allocation request to the server, the product allocation request including information on at least one target product to be allocated to the target user.

[0126] In this embodiment, the product information of at least one allocatable product returned in step S205 can be displayed in the graphical user interface of terminal device 1. The administrator can perform a selection operation on these allocatable products. If the administrator selects an allocatable product and clicks the "OK" button, a product allocation request can be sent to the server. The product allocation request includes information on at least one allocatable product selected by the user, wherein the selected allocatable product is the target product.

[0127] Accordingly, the server can perform the following step S702.

[0128] S702, The server receives a product allocation request sent by the terminal device.

[0129] S703. The server assigns permissions for target products to the target user based on information about at least one target product to be assigned to the target user.

[0130] Assigning permissions for target products to target users can be understood as establishing and storing a mapping between users and target products. When a user logs in next time, this mapping can be used to determine whether the user has permission to use the target product. If the user has permission, the product will be displayed in the user's business system; otherwise, it will not be displayed.

[0131] S704. The server returns allocation result information to the terminal device, which includes a message indicating whether the allocation was successful or failed.

[0132] Example 3:

[0133] Figure 8 Interactive illustration of the product allocation processing method provided in the embodiments of this application Figure 3 .like Figure 8 As shown, the processing method for product allocation includes the following:

[0134] S801. The terminal device sends a query request for allocable products to the server. The query request includes the identifiers of the first user and the second user. The first user is the target user for the allocable products to be queried, and the second user is the user logged into the business system. The second user has greater privileges than the first user.

[0135] S802, The server receives a query request for allocable products sent by the terminal device.

[0136] S803. The server obtains at least one menu corresponding to the first user based on the first user's identifier, a preset role table, and a first mapping relationship table. The role table includes roles configured by the business system and at least one menu corresponding to each role. The first mapping relationship table includes the identifier of each user and at least one role corresponding to each user. The role is a set of different permissions, and the menu is a command of the business system.

[0137] S804. The server obtains at least one product that the second user has permission to use based on the second user's identifier, the preset product table, the first mapping table, the second mapping table, and the third mapping table. Each product has a corresponding menu. The second mapping table includes the identifier of each role and at least one permission corresponding to each role. The third mapping table includes the identifier of each permission and at least one product corresponding to each permission.

[0138] S805, The server returns at least one product to the terminal device that the second user has permission for.

[0139] S806. The terminal device receives and displays at least one product that the second user has permission to own.

[0140] S807. In response to the first user's operation of selecting the target product from all the displayed products, the terminal device sends a product allocation request to the server, which includes information about the target product.

[0141] S808. The server determines whether the menu corresponding to the target product is included in the menu corresponding to the second user's role.

[0142] S809. If it is determined that the menu corresponding to the second user's role includes the menu corresponding to the target product, then return a message to the terminal device that the product allocation was successful.

[0143] S810. If it is determined that the menu corresponding to the target product is not included in the menu corresponding to the second user's role, a product allocation failure message is returned to the terminal device.

[0144] In this embodiment, the specific implementation details of each step can be found in the description of similar steps in Embodiment 1. The difference between this embodiment and Embodiment 1 is that in this embodiment, the products returned to the terminal device are all products for which the second user has permissions, while in Embodiment 1, the products returned to the terminal device are those whose menus match those of the first user. Embodiment 1, compared to Embodiment 3, does not suffer from product allocation failure issues.

[0145] Figure 9 This is a schematic diagram of another product allocation model provided in an embodiment of this application.

[0146] like Figure 9 As shown, in Figure 4 Based on the product allocation model Figure 9 The product allocation model shown also includes an organization table, a fourth mapping table, and a fifth mapping table. The fourth mapping table is the user-organization mapping table, which maps users to organizations, including the identifier of each user and the organization corresponding to each user. The fifth mapping table is the role-organization mapping table, which maps organizations to roles, including the identifier of each role and the organization corresponding to each role.

[0147] The product allocation model in this embodiment is based on the "user-role-permission-product" model described above, and introduces a model for product allocation formed by user groups. Compared to Figure 4 The product allocation model shown presents a complex and labor-intensive task when assigning roles (i.e., granting authorization) to each user individually when the user base is quite large. Therefore, user groups are introduced, with each organization forming a user group (user cluster), and each user group containing multiple users. In this way, the cloud customer service system can not only grant authorization to individual users but also to organizations. Thus, a user's permissions are the sum of the permissions held by the individual user and the permissions held by their organization.

[0148] Figure 10 For based on Figure 9 A diagram illustrating the relationships between data tables in the product allocation model.

[0149] like Figure 10 As shown, organizations are associated with user information tables through user organization mapping tables, and with role information tables through role organization mapping tables. The relationships between organizations and users, and between organizations and roles, are many-to-many.

[0150] In some optional embodiments, the above method steps may also involve the server obtaining at least one menu corresponding to the first user and at least one product that the second user has permission to, and returning the obtained at least one menu corresponding to the first user and at least one product that the second user has permission to the terminal device, and the terminal device performing the following steps: for each product that the second user has permission to, if it is determined that at least one menu corresponding to the first user includes the product, then the product is determined as an allocatable product of the first user, and the allocatable product is displayed.

[0151] Based on the above method embodiments, Figure 11 A schematic diagram of the product dispensing processing apparatus provided in an embodiment of this application. Figure 11 As shown, the product allocation processing device includes: a first receiving module 111, an acquisition module 112, a determination module 113, and a first sending module 114;

[0152] The first receiving module 111 is used to receive a query request for allocable products. The query request includes the identifier of a first user and the identifier of a second user. The first user is the target user to query the allocable products, and the second user is the user who is logged into the business system. The second user has greater permissions than the first user.

[0153] The acquisition module 112 is used to acquire at least one menu corresponding to the first user based on the identifier of the first user, a preset role table and a first mapping relationship table. The role table includes roles configured by the business system and at least one menu corresponding to each role. The first mapping relationship table includes the identifier of each user and at least one role corresponding to each user. The role is a set of different permissions, and the menu is a command of the business system.

[0154] The acquisition module 112 is further configured to acquire at least one product that the second user has permission to use based on the identifier of the second user, a preset product table, the first mapping relationship table, the second mapping relationship table and the third mapping relationship table. Each product corresponds to a menu. The second mapping relationship table includes the identifier of each role and at least one permission corresponding to each role. The third mapping relationship table includes the identifier of each permission and at least one product corresponding to each permission.

[0155] The determination module 113 is used to determine, for each product that the second user has permission for, if it is determined that at least one menu corresponding to the first user includes a menu of the product, then the product is determined to be an assignable product of the first user.

[0156] In some embodiments, the apparatus may further include: a first sending module 114, configured to return an allocatable product result, the allocatable product result including information on at least one allocatable product that can be allocated to the first user.

[0157] In some embodiments, the acquisition module 112 acquires at least one menu corresponding to the first user based on the first user's identifier, a preset role table, and a first mapping relationship table. Specifically, this includes: determining the first user's role based on the first user's identifier and the first mapping relationship table; and determining at least one menu corresponding to the first user's role based on the first user's role and the preset role table, and using it as at least one menu corresponding to the first user.

[0158] In some embodiments, the acquisition module 112 acquires at least one product for which the second user has permission based on the second user's identifier, a preset product table, the first mapping table, the second mapping table, and the third mapping table. Specifically, this includes: determining the second user's role based on the second user's identifier and the first mapping table; and determining at least one product corresponding to the second user's role based on the second user's role, the second mapping table, and the third mapping table. The second mapping table includes multiple roles and at least one permission corresponding to each role, and the third mapping table includes multiple permissions and at least one product corresponding to each permission.

[0159] In some embodiments, the acquisition module 112 determines at least one product corresponding to the role of the second user based on the role of the second user, the second mapping table, and the third mapping table. Specifically, this includes: determining at least one permission corresponding to the role of the second user based on the role of the second user and the second mapping table; for each permission corresponding to the at least one permission of the second user's role, determining at least one product corresponding to the permission based on the permission and the third mapping table; and determining all products corresponding to the at least one permission as at least one product corresponding to the role of the second user.

[0160] Based on the above method embodiments, Figure 12 A schematic diagram of the product dispensing processing apparatus provided in an embodiment of this application. Figure 12 As shown, the product distribution processing device includes: a second sending module 121 and a second receiving module 122;

[0161] The second sending module 121 is used to send a query request for allocable products. The query request includes the identifier of a first user and the identifier of a second user. The first user is the target user for querying the allocable products, and the second user is the user logged into the business system. The second user has greater permissions than the first user.

[0162] The second receiving module 122 is used to receive the allocatable product result, which includes information on at least one allocatable product that can be allocated to the first user.

[0163] In some embodiments, the allocatable products are obtained by acquiring at least one menu corresponding to the first user based on the first user's identifier, a preset role table, and a first mapping relationship table, and by acquiring at least one product that the second user has permission to access based on the second user's identifier, a preset product table, the first mapping relationship table, a second mapping relationship table, and a third mapping relationship table. Each product corresponds to a menu, and for each product that the second user has permission to access, if it is determined that at least one menu corresponding to the first user includes a menu of the product, then the product is determined as an allocatable product of the first user. The role is a set of different permissions, and the menu is a command of the business system. The role table includes roles configured by the business system and at least one menu corresponding to each role. The first mapping relationship table includes the identifier of each user and at least one role corresponding to each user. The second mapping relationship table includes the identifier of each role and at least one permission corresponding to each role. The third mapping relationship table includes the identifier of each permission and at least one product corresponding to each permission.

[0164] In some embodiments, the product allocation processing apparatus further includes a display module 123 for displaying the allocateable product results.

[0165] The product allocation processing apparatus provided in this application embodiment can be used to execute the technical solution of the product allocation processing method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0166] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented in software via processing element calls, while others are implemented in hardware. For example, module 113 can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its function can be called and executed by a processing element of the above device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0167] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 13 As shown, the electronic device may include: a transceiver 131, a processor 132, and a memory 133.

[0168] Processor 132 executes computer execution instructions stored in memory, causing processor 132 to perform the scheme in the above embodiments. Processor 132 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may 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, or discrete hardware components.

[0169] The memory 133 is connected to the processor 132 via the system bus and completes communication between them. The memory 133 is used to store computer program instructions.

[0170] Transceiver 131 can be used to receive query requests for assignable products.

[0171] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0172] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.

[0173] This application also provides a chip for executing instructions, which is used to execute the technical solution of the product allocation processing method in the above embodiments.

[0174] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the processing method for product allocation described in the above embodiments.

[0175] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the processing method of the product allocation in the above embodiments.

[0176] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0177] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

[0178] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0179] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method of processing product dispensing, characterized by, The method applied to a server comprises: receiving a query request of allocable products, the query request comprising an identification of a first user and an identification of a second user, the first user being a target user to query the allocable products, the second user being a user logged in a business system, and the second user having a larger authority than the first user; wherein the second user having a larger authority than the first user means that the second user has a larger number of products with a use authority than the first user, or the first user has a subset of products with a use authority of the second user; determining a role of the first user according to the identification of the first user and a first mapping relationship table; determining at least one menu corresponding to the role of the first user according to the role of the first user and a preset role table, and taking the at least one menu as at least one menu corresponding to the first user; the role table comprising roles configured by the business system and at least one menu corresponding to each role, the first mapping relationship table comprising an identification of each user and at least one role corresponding to each user, the role being a set of different authorities, and the menu being a command of the business system; determining a role of the second user according to the identification of the second user and the first mapping relationship table; determining at least one authority corresponding to the role of the second user according to the role of the second user and a second mapping relationship table; determining at least one product corresponding to each authority in the at least one authority corresponding to the role of the second user according to the authority and a third mapping relationship table; determining all products corresponding to the at least one authority as at least one product corresponding to the role of the second user; the second mapping relationship table comprising a plurality of roles and at least one authority corresponding to each role, the third mapping relationship table comprising a plurality of authorities and at least one product corresponding to each authority; each product corresponding to a menu, the second mapping relationship table comprising an identification of each role and at least one authority corresponding to each role, and the third mapping relationship table comprising an identification of each authority and at least one product corresponding to each authority; for each product with an authority possessed by the second user, if it is determined that the at least one menu corresponding to the first user comprises a menu of the product, the product is determined as an allocable product of the first user.

2. The method of claim 1, wherein, After the product is determined as the allocable product of the first user, the method further comprises: returning an allocable product result, the allocable product result comprising information of at least one allocable product allocable to the first user.

3. A method of processing product dispensing, characterized by, The method applied to a terminal device comprises: sending a query request for the allocable product, the query request including an identification of a first user and an identification of a second user, the first user being a target user to be queried for the allocable product, the second user being a user logged into a business system, the second user having a larger authority than the first user; wherein the second user having a larger authority than the first user means that the second user has a larger number of products with a use authority than the first user, or the first user has a subset of products with a use authority of the second user; receiving an allocable product result including information of at least one allocable product for the first user; determining a role of the first user according to the identification of the first user and a first mapping relationship table, determining at least one menu corresponding to the role of the first user according to the role of the first user and a preset role table, and taking the at least one menu as at least one menu corresponding to the first user; determining a role of the second user according to the identification of the second user and the first mapping relationship table, and determining at least one authority corresponding to the role of the second user according to the role of the second user and a second mapping relationship table; determining at least one product corresponding to each authority in the at least one authority corresponding to the role of the second user according to the authority and a third mapping relationship table; determining all products corresponding to the at least one authority as at least one product corresponding to the role of the second user, the second mapping relationship table including a plurality of roles and at least one authority corresponding to each role, the third mapping relationship table including a plurality of authorities and at least one product corresponding to each authority; each product corresponding to a menu, and for each product that the second user has an authority, if it is determined that the at least one menu corresponding to the first user includes a menu of the product, the product is determined as an allocable product of the first user, the role being a set of different authorities, the menu being a command of the business system; the role table including roles configured by the business system and at least one menu corresponding to each role, the first mapping relationship table including an identification of each user and at least one role corresponding to each user, the second mapping relationship table including an identification of each role and at least one authority corresponding to each role, and the third mapping relationship table including an identification of each authority and at least one product corresponding to each authority.

4. The method of claim 3, wherein, after receiving the allocable product result, the method further includes: displaying the allocable product result.

5. A processing device for product dispensing, characterized by application to a server, the device including: The first receiving module is configured to receive a query request for an allocable product, the query request comprising an identifier of a first user and an identifier of a second user, the first user being a target user to query the allocable product, and the second user being a user logged in a business system, the second user having a larger authority than the first user; wherein the second user having a larger authority than the first user means that the second user has a larger number of products with a use authority than the first user, or the first user has a subset of products with a use authority of the second user; The obtaining module is configured to obtain at least one menu corresponding to the first user according to the identifier of the first user, a preset role table, and a first mapping relationship table, the role table comprising roles configured by the business system and at least one menu corresponding to each role, and the first mapping relationship table comprising an identifier of each user and at least one role corresponding to each user, the role being a set of different authorities, and the menu being a command of the business system; The obtaining module is further configured to obtain at least one product with an authority of the second user according to the identifier of the second user, a preset product table, the first mapping relationship table, a second mapping relationship table, and a third mapping relationship table, each product corresponding to a menu, the second mapping relationship table comprising an identifier of each role and at least one authority corresponding to each role, and the third mapping relationship table comprising an identifier of each authority and at least one product corresponding to each authority; The determining module is configured to, for each product with an authority of the second user, determine the product as an allocable product of the first user if it is determined that the at least one menu corresponding to the first user comprises a menu of the product; The obtaining module is specifically configured to determine a role of the second user according to the identifier of the second user and the first mapping relationship table; determine at least one product corresponding to the role of the second user according to the role of the second user, the second mapping relationship table, and the third mapping relationship table; the second mapping relationship table comprising a plurality of roles and at least one authority corresponding to each role, the third mapping relationship table comprising a plurality of authorities and at least one product corresponding to each authority; The obtaining module is specifically configured to determine a role of the first user according to the identifier of the first user and the first mapping relationship table; determine at least one menu corresponding to the role of the first user according to the role of the first user and the preset role table, and take the at least one menu as the at least one menu corresponding to the first user; determine at least one authority corresponding to the role of the second user according to the role of the second user and the second mapping relationship table; for each authority in the at least one authority corresponding to the role of the second user, determine at least one product corresponding to the authority according to the authority and the third mapping relationship table; determine all products corresponding to the at least one authority as the at least one product corresponding to the role of the second user.

6. A processing device for product dispensing, characterized by The device is applied to a terminal device, and the device comprises: The second sending module is configured to send a query request for the allocable product, the query request comprising an identifier of the first user and an identifier of the second user, the first user being a target user to be queried for the allocable product, and the second user being a user logged in the business system, the second user having a higher authority than the first user; wherein the second user having a higher authority than the first user means that the second user has a larger number of products with a use authority than the first user, or the first user has a subset of products with a use authority of the second user; The second receiving module is configured to receive an allocable product result, the allocable product result comprising information of at least one allocable product allocable to the first user; The allocable product is determined according to the identifier of the first user and a first mapping relationship table, a role of the first user is determined according to the role of the first user and a preset role table, at least one menu corresponding to the role of the first user is determined as at least one menu corresponding to the first user; A role of the second user is determined according to the identifier of the second user and the first mapping relationship table, and at least one authority corresponding to the role of the second user is determined according to the role of the second user and a second mapping relationship table; For each authority in the at least one authority corresponding to the role of the second user, at least one product corresponding to the authority is determined according to the authority and a third mapping relationship table; All products corresponding to the at least one authority are determined as at least one product corresponding to the role of the second user; the second mapping relationship table comprises a plurality of roles and at least one authority corresponding to each role, The third mapping relationship table comprises a plurality of authorities and at least one product corresponding to each authority; Each product corresponds to a menu, and for each product that the second user has an authority, if it is determined that the at least one menu corresponding to the first user comprises a menu of the product, the product is determined as an allocable product of the first user, the role is a set of different authorities, and the menu is a command of the business system; The role table comprises roles configured by the business system and at least one menu corresponding to each role, the first mapping relationship table comprises an identifier of each user and at least one role corresponding to each user, the second mapping relationship table comprises an identifier of each role and at least one authority corresponding to each role, and the third mapping relationship table comprises an identifier of each authority and at least one product corresponding to each authority.

7. An electronic device, comprising: It comprises: a processor and a memory in communication connection with the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-4.

9. A computer program product, characterised in that, A computer program comprising computer program elements which, when executed by a processor, perform the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Authority configuration method based on user role, electronic device and storage medium

    CN111460496A