User data processing method and device

By creating virtual users and automatically binding resources and interfaces in multi-user and multi-position permission control, the problem of high error rate in permission control is solved, the stability and efficiency of the system are improved, and the automated permission inspection and binding process is realized. .

CN112580000BActive Publication Date: 2024-10-25BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910945825.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-30
Publication Date
2024-10-25
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

The error rate of multi-user and multi-position permission control is high, and existing technology cannot effectively solve it. As a result, when employees access resources, they may access interfaces that are not bound by resources, causing the system to refuse to use this function.

Method used

When the tenant adds a target position, a virtual user is created, the resource and interface information is obtained through the virtual user, and sent to the server to determine whether to bind. If not, bind it, and delete the virtual user after all resources and interfaces are bound. .

Benefits of technology

It reduces the error rate of multi-user and multi-position permission control, improves the stability and service efficiency of the system, and avoids problems caused by the negligence of development and operation personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112580000B_ABST
    Figure CN112580000B_ABST
Patent Text Reader

Abstract

The present invention discloses a user data processing method and device. The method comprises: when a tenant adds a target position, a virtual user corresponding to the target position is created; the target position is used to obtain corresponding resources for the virtual user; for each resource obtained by the virtual user, the interface information corresponding to the resource is obtained; the resource and the interface information are sent to a server so that the server determines whether the resource and the interface corresponding to the interface information are bound; the judgment result returned by the server is received; if the judgment result is no, the resource and the interface are bound. Through the present invention, the effect of reducing the error rate of multi-user and multi-position authority control is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method and device for processing user data. Background Art

[0002] Permission control can better ensure the information security of the system, especially in a multi-tenant customized system. Not only does the website itself need to set up a set of permission management function modules, but it also builds applications based on the customized needs of different tenants. The application includes tenants, resources, interfaces, roles, navigation, etc. The permission control of different tenants is achieved by binding resources to interfaces, roles to resources, and finally tenants to roles.

[0003] Employee permissions are controlled by positions within the tenant. The tenant administrator can assign tenant roles to positions, which means that employees in a certain position have the permissions of the current position.

[0004] Since there are many system function modules, the number of resources and interfaces is considerable, and the binding relationship between resources and interfaces is also many-to-many. Services are provided for multiple tenants, so there will be different applications, so the relationship between resources and interfaces is becoming more and more troublesome to maintain. It is easy for employees to access interfaces that are not bound to resources when accessing resources, so that the employee actually has this function, but because the interface is not bound to a resource, the system will deny the employee from using this function.

[0005] There is currently no effective solution to the problem of high error rate in multi-user and multi-position authority control in related technologies. Summary of the invention

[0006] The main purpose of the present invention is to provide a user data processing method and device to solve the problem of high error rate in multi-user and multi-position authority control.

[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present invention, a user data processing method is provided, which includes: when a tenant adds a target position, creating a virtual user corresponding to the target position; obtaining corresponding resources for the virtual user through the target position; for each resource obtained by the virtual user, obtaining interface information corresponding to the resource; sending the resource and the interface information to a server so that the server determines whether the resource and the interface corresponding to the interface information are bound; receiving the judgment result returned by the server; if the judgment result is no, binding the resource and the interface.

[0008] Furthermore, after binding the resource and the interface, the method further comprises: judging whether all resources acquired by the virtual user have been completely bound to the corresponding interface; if the judgment result is yes, deleting the virtual user.

[0009] Furthermore, obtaining corresponding resources for the virtual user through the target position includes: obtaining at least one role having authority over the target position; obtaining resources corresponding to the at least one role; and using the obtained resources as resources corresponding to the virtual user.

[0010] Furthermore, for each resource acquired by the virtual user, obtaining the interface information corresponding to the resource includes: initiating an interface request to the server for each acquired resource, the interface request carrying the corresponding interface information; intercepting the interface request to obtain the interface information in the interface request.

[0011] Furthermore, obtaining the interface information in the interface request includes: obtaining the interface information in the interface request by way of XMLHttpRequest.

[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a user data processing device is further provided, which includes: a creation unit, used to create a virtual user corresponding to the target position when a tenant adds a target position; a first acquisition unit, used to acquire corresponding resources for the virtual user through the target position; a second acquisition unit, used to acquire interface information corresponding to each resource acquired by the virtual user; a sending unit, used to send the resource and the interface information to a server, so that the server determines whether the resource and the interface corresponding to the interface information are bound; a receiving unit, used to receive the judgment result returned by the server; and a binding unit, used to bind the resource and the interface when the judgment result is no.

[0013] Furthermore, the device also includes: a judgment unit, which is used to judge whether all resources acquired by the virtual user are completely bound to the corresponding interface after binding the resource and the interface; and a deletion unit, which is used to delete the virtual user when the judgment result is yes.

[0014] Furthermore, the first acquisition unit includes: a first acquisition module, used to acquire at least one role having authority over the target position; a second acquisition module, used to acquire resources corresponding to the at least one role; and a processing module, used to use the acquired resources as resources corresponding to the virtual user.

[0015] In order to achieve the above object, according to another aspect of the present invention, a storage medium is further provided, comprising a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the user data processing method of the present invention.

[0016] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a device is also provided, comprising at least one processor, and at least one memory and a bus connected to the processor, wherein the processor and the memory communicate with each other through the bus, and the processor is used to call program instructions in the memory to execute the user data processing method described in the present invention.

[0017] The present invention solves the problem of high error rate of multi-user and multi-position authority control by creating a virtual user corresponding to the target position when the tenant adds the target position; obtains corresponding resources for the virtual user through the target position; obtains interface information corresponding to each resource obtained by the virtual user; sends the resource and interface information to the server so that the server determines whether the resource is bound to the interface corresponding to the interface information; receives the judgment result returned by the server; if the judgment result is no, binds the resource and the interface, thereby achieving the effect of reducing the error rate of multi-user and multi-position authority control. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a flowchart of a method for processing user data according to an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of the interaction process of an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of a user data processing device according to an embodiment of the present invention; and

[0022] Figure 4 is a block diagram of a device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] For ease of description, several terms involved in the embodiments of the present application are explained below:

[0027] Resource: It is a plain text file containing HTML tags. It is the basic element of a website, also known as a web page.

[0028] Role: A collection of resources that are combined into a collection of modules with certain meanings or functions.

[0029] Tenant: An enterprise, organization or institution that uses certain functions or modules of the system.

[0030] Application: Integrate customized functional modules to form a complete permission system.

[0031] Inspection: Check the resources and interface relationships of the position.

[0032] An embodiment of the present invention provides a method for processing user data.

[0033] Figure 1 is a flowchart of a method for processing user data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0034] Step S101: when a tenant adds a target position, a virtual user corresponding to the target position is created;

[0035] Step S102: Obtain corresponding resources for the virtual user through the target position;

[0036] Step S103: for each resource acquired by the virtual user, obtain the interface information corresponding to the resource;

[0037] Step S104: sending the resource and interface information to the server so that the server can determine whether the resource and the interface corresponding to the interface information are bound;

[0038] Step S105: receiving the judgment result returned by the server;

[0039] Step S106: If the judgment result is no, the resource and the interface are bound.

[0040] This embodiment creates a virtual user corresponding to the target position when the tenant adds the target position; obtains corresponding resources for the virtual user through the target position; obtains interface information corresponding to each resource obtained by the virtual user; sends the resource and interface information to the server so that the server determines whether the resource is bound to the interface corresponding to the interface information; receives the judgment result returned by the server; if the judgment result is no, binds the resource and the interface, thereby solving the problem of high error rate of multi-user and multi-position permission control, and thus achieving the effect of reducing the error rate of multi-user and multi-position permission control.

[0041] The technical solution of the embodiment of the present invention can be applied as a multi-tenant and multi-position permission inspection method to the permission control of tenants. When the tenant adds a target position, a virtual user corresponding to the target position can be created through the inspection function, and the corresponding resources are obtained for the virtual user through the target position, and the interface information corresponding to each resource is obtained, and the resources and interface information are sent to the server. The server determines whether the interface corresponding to the resource and the interface information is bound, and then sends back the result. The judgment result returned by the server is received. If the judgment result is no, it means that the binding is not completed. At this time, the resources and the interface are bound.

[0042] It should be noted that in this embodiment, the interface corresponding to the resource (the application refers to the page) will be stored in a separate location, and the corresponding interface can be directly found according to the resource; after configuration, the browser can automatically find the corresponding interface according to the interface request initiated by the resource and carry the interface information in the interface request, and the interface information will also be carried in the generated interface request, or it can be obtained by initiating an interface request interception, preferably by sending a request interception. If the permissions are configured, but the server has not yet been bound, there will be a problem of having permissions but being unable to access.

[0043] Optionally, after the resources and interfaces are bound, it is determined whether all resources acquired by the virtual user are completely bound to the corresponding interfaces; if the determination result is yes, the virtual user is deleted.

[0044] A virtual user can obtain multiple resources. The binding relationship between each resource and interface is determined separately. After all resources obtained by the virtual user are bound to the corresponding interfaces, the virtual user is no longer needed. At this time, the virtual user can be deleted to release resources.

[0045] Optionally, obtaining corresponding resources for the virtual user through the target position includes: obtaining at least one role with authority for the target position; obtaining resources corresponding to the at least one role; and using the obtained resources as resources corresponding to the virtual user.

[0046] When obtaining corresponding resources for a virtual user through a target position, at least one role having authority over the target position may be obtained, and corresponding resources may be obtained through the role, and then the resources corresponding to the role are used as resources corresponding to the virtual user.

[0047] Optionally, for each resource acquired by the virtual user, acquiring interface information corresponding to the resource includes: initiating an interface request to the server for each acquired resource, the interface request carrying corresponding interface information; intercepting the interface request to obtain the interface information in the interface request.

[0048] Optionally, obtaining the interface information in the interface request includes: obtaining the interface information in the interface request by way of XMLHttpRequest.

[0049] Interface information can be obtained by intercepting interface requests. The interface information in the interface request can be obtained by intercepting the interface request initiated by each resource to the server. For example, the interface information in the interface request can be obtained through XMLHttpRequest, and it can be judged and automatically bound with the current resource to increase system stability and improve service efficiency.

[0050] The present solution is described below in conjunction with preferred implementation modes.

[0051] Figure 2 Schematic diagram of the interaction process of an embodiment of the present invention, including a user end, a B end and an Admin end, and the process includes:

[0052] 1. When a tenant employee adds a position, the inspection function will automatically create a virtual user for the current position.

[0053] 2. Obtain a role with permissions based on the virtual user's position, and then request the permission management through the role to obtain resources.

[0054] 3. Then access each resource automatically obtained and intercept the interface request initiated by the resource to the server.

[0055] 4. Initiate a request to the server with the URL of the obtained resource and interface to determine whether there is a binding relationship.

[0056] 5. If it exists, it will pass; if it does not exist, it will be bound.

[0057] 6. After all resources have been accessed and the inspection is completed, the virtual user is deleted.

[0058] This embodiment can create virtual accounts according to different tenants and different positions, simulate the current position employees to access each resource of the system, and automatically delete the account after the access is completed. The process is simple and saves manpower. It can automatically bind resources and interface relationships, improve the reliability and stability of the system, and effectively prevent problems caused by negligence of developers and operators.

[0059] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0060] An embodiment of the present invention provides a user data processing device, which can be used to execute the user data processing method of the embodiment of the present invention.

[0061] Figure 3 is a schematic diagram of a user data processing device according to an embodiment of the present invention. Figure 3 As shown, the device comprises:

[0062] A creation unit 10, used to create a virtual user corresponding to the target position when the tenant adds the target position;

[0063] A first acquisition unit 20 is used to acquire corresponding resources for the virtual user through the target position;

[0064] The second acquisition unit 30 is used to acquire interface information corresponding to each resource acquired by the virtual user;

[0065] A sending unit 40 is used to send the resource and interface information to the server so that the server determines whether the resource and the interface corresponding to the interface information are bound;

[0066] The receiving unit 50 is used to receive the judgment result returned by the server;

[0067] The binding unit 60 is used to bind the resource and the interface when the judgment result is no.

[0068] This embodiment adopts a creation unit 10, which is used to create a virtual user corresponding to the target position when the tenant adds a target position; a first acquisition unit 20, which is used to obtain corresponding resources for the virtual user through the target position; a second acquisition unit 30, which is used to obtain interface information corresponding to each resource obtained by the virtual user; a sending unit 40, which is used to send the resource and interface information to the server, so that the server determines whether the resource is bound to the interface corresponding to the interface information; a receiving unit 50, which is used to receive the judgment result returned by the server; a binding unit 60, which is used to bind the resource and the interface when the judgment result is no, thereby solving the problem of high error rate of multi-user and multi-position authority control, and further achieving the effect of reducing the error rate of multi-user and multi-position authority control.

[0069] Optionally, the device further comprises: a judging unit, configured to judge whether all resources acquired by the virtual user are completely bound to corresponding interfaces after the resources and interfaces are bound; and a deleting unit, configured to delete the virtual user when the judging result is yes.

[0070] Optionally, the first acquisition unit includes: a first acquisition module, used to acquire at least one role with authority for the target position; a second acquisition module, used to acquire resources corresponding to at least one role; and a processing module, used to use the acquired resources as resources corresponding to the virtual user.

[0071] The user data processing device includes a processor and a memory. The creation unit, the first acquisition unit, the second acquisition unit, etc. are all stored in the memory as program units. The processor executes the program units stored in the memory to implement corresponding functions.

[0072] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the error rate of multi-user and multi-position permission control can be reduced by adjusting kernel parameters.

[0073] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0074] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the user data processing method is implemented.

[0075] An embodiment of the present invention provides a processor, which is used to run a program, wherein the user data processing method is executed when the program is running.

[0076] An embodiment of the present invention provides a device, such as Figure 4 As shown, an embodiment of the present invention provides a device, the device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the above-mentioned user data processing method. The device in this article can be a server, PC, PAD, mobile phone, etc.

[0077] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: when a tenant adds a target position, creating a virtual user corresponding to the target position; obtaining corresponding resources for the virtual user through the target position; for each resource obtained by the virtual user, obtaining interface information corresponding to the resource; sending the resource and interface information to a server so that the server determines whether the resource and the interface corresponding to the interface information are bound; receiving the judgment result returned by the server; if the judgment result is no, binding the resource and the interface.

[0078] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0079] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0080] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0082] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0083] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0084] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0085] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0086] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.) that contain computer-usable program code.

[0087] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A user data processing method, characterized in that: include: When a tenant adds a target position, a virtual user corresponding to the target position is created; Obtaining corresponding resources for the virtual user through the target position, wherein obtaining corresponding resources for the virtual user through the target position includes: obtaining at least one role with authority of the target position; obtaining resources corresponding to the at least one role; using the obtained resources as resources corresponding to the virtual user; For each resource acquired by the virtual user, acquiring interface information corresponding to the resource; Sending the resource and the interface information to a server so that the server determines whether the resource is bound to the interface corresponding to the interface information; Receive the judgment result returned by the server; If the judgment result is no, the resource and the interface are bound.

2. The method according to claim 1, characterized in that: After binding the resource and the interface, the method further includes: Determine whether all resources acquired by the virtual user are completely bound to the corresponding interface; If the judgment result is yes, the virtual user is deleted.

3. The method according to claim 1, characterized in that For each resource acquired by the virtual user, acquiring interface information corresponding to the resource includes: Initiate an interface request to the server for each acquired resource, wherein the interface request carries corresponding interface information; The interface request is intercepted to obtain the interface information in the interface request.

4. The method according to claim 3, characterized in that Obtaining the interface information in the interface request includes: The interface information in the interface request is obtained by way of XMLHttpRequest.

5. A user data processing device, characterized in that: include: A creation unit, used to create a virtual user corresponding to a target position when a tenant adds the target position; A first acquisition unit, configured to acquire corresponding resources for the virtual user through the target position; A second acquisition unit, configured to acquire, for each resource acquired by the virtual user, interface information corresponding to the resource; A sending unit, used to send the resource and the interface information to a server, so that the server determines whether the resource is bound to the interface corresponding to the interface information; A receiving unit, used for receiving the judgment result returned by the server; A binding unit, used for binding the resource and the interface when the judgment result is no; The first acquisition unit includes: a first acquisition module, used to acquire at least one role with authority for the target position; a second acquisition module, used to acquire resources corresponding to the at least one role; and a processing module, used to use the acquired resources as resources corresponding to the virtual user.

6. The device according to claim 5, characterized in that The device also includes: A judging unit, configured to judge whether all resources acquired by the virtual user have been completely bound to corresponding interfaces after the resources and the interfaces are bound; The deleting unit is used to delete the virtual user when the judgment result is yes.

7. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the user data processing method according to any one of claims 1 to 4.

8. A device, characterized in that The device includes at least one processor, and at least one memory and bus connected to the processor, wherein the processor and the memory communicate with each other through the bus, and the processor is used to call program instructions in the memory to execute the user data processing method described in any one of claims 1 to 4.