A method and device for allocating user rights

By obtaining the level information of users and devices, automatically calculating permission control values, realizing intelligent permission allocation, solving the problem of insufficient intelligence and flexibility in permission allocation in the existing technology, and improving efficiency and security.

CN116821946BActive Publication Date: 2024-09-27HUIZHIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211522571.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2024-09-27
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

The existing user permission allocation method is not intelligent enough, relies on manual management, is time-consuming and labor-intensive, and the permission adjustment is not flexible enough to make corresponding adjustments according to the actual situation.

Method used

By obtaining the user's personal information and the supervisory level of the target device, the user's viewing permissions for the target device are automatically determined, and the permission control value is calculated using formulas to achieve intelligent and flexible permission distribution.

Benefits of technology

It improves the efficiency of permission allocation and management, flexibly allocates permissions according to the actual needs and rights of users, enhances the security of equipment and data, and reduces the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116821946B
    Figure CN116821946B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method and device for allocating user rights, and relates to the technical field of device rights management. The method comprises: obtaining the personal information of the current user corresponding to the user account currently authorized to log in according to the correspondence between the pre-stored user account and the user personal information; obtaining the personnel level of the current user according to the personal information of the current user; obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the result of the supervisor corresponding to the target device's request to the current user to view the target device; determining the current user's viewing rights to the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request to the current user to view the target device. The present invention effectively improves the efficiency of user rights allocation and the security of device data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of device authority management, and in particular relates to a method and device for allocating user authority. Background Art

[0002] In order to ensure the security of the equipment and the data on it, different permissions will be assigned to the equipment users, that is, for users with different powers, permissions corresponding to their powers will be assigned, and accounts with this permission will be established, such as assigning viewing permissions, deletion permissions, insertion permissions, table creation permissions, etc. to users in the database, or assigning different device / function control permissions to users in the system. In the current user permission allocation method, user permissions are all allocated in advance by authorized management staff, which is not smart enough and wastes staff energy. In addition, permission adjustment is not flexible enough, and user role permissions are generally fixed and inflexible, and cannot be adjusted accordingly according to actual conditions. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method for allocating user rights, which is used to solve the problem that the current method for allocating user rights is not intelligent enough and can only allocate and manage user rights manually, which is time-consuming and labor-intensive. The present invention can intelligently and automatically determine the user's viewing rights for the target device according to the user's personnel level and the personnel level of the supervisor corresponding to the target device, effectively improving the efficiency of rights allocation and management.

[0004] In a first aspect, an embodiment of the present invention provides a method for allocating user rights, including:

[0005] According to the pre-stored correspondence between user accounts and user personal information, obtain the personal information of the current user corresponding to the user account currently authorized to log in;

[0006] Obtaining the personnel level of the current user according to the personal information of the current user;

[0007] Obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the result of the supervisor's request for the current user to view the target device; wherein the result of the request includes agreeing to view the device or not agreeing to view the device;

[0008] The viewing authority of the current user for the target device is determined according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request to the current user to view the target device.

[0009] In an optional embodiment, before obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the result of the supervisor corresponding to the target device's request to the current user to view the target device, the method further includes:

[0010] Determine the devices that the current user can apply to view based on the personnel level of the current user and the preset minimum personnel level for applying to view each device;

[0011] Provide the current user with a list of device identifiers that the current user can apply to view;

[0012] A selection of a device identifier in the device identifier list that the current user can apply to view is received, and a device corresponding to the currently selected device identifier is determined as a target device that the current user applies to view.

[0013] In an optional embodiment, obtaining the personnel level of the current user according to the personal information of the current user includes:

[0014] Obtaining the user's personnel level according to the user's personal information and the first formula;

[0015] Among them, the first formula is:

[0016] N={D 2 -{A 2 <<[len(D 2 )-len(A 2 )]}>>[Z+len(E 2 )]} 10

[0017] In the first formula, N represents the personnel level value of the user; D 2 The binary form of the user's personal information is divided into four parts. The first part is the preset frame header A. 2 The second part is the preset personnel level value of the personal information corresponding to the user, the third part is the identity information and the number of bits of the identity information data in the binary form of each personal information is Z, and the fourth part is the preset frame tail E 2 ; len() means to find the number of bits of the binary data in the brackets; << means left shift; >> means right shift; {} 10 Indicates converting the value in brackets to a decimal number;

[0018] The determining of the devices that the current user can apply to view according to the personnel level of the current user and the preset minimum personnel level for applying to view each device includes:

[0019] Determine the device that the current user can apply to view according to the second formula;

[0020] Wherein, the second formula is:

[0021] Q={k|k∈[1,K],B(k)≤N 0}

[0022] In the second formula, Q represents the array of device numbers that the current user can apply to view; B(k) represents the preset minimum level of personnel applying to view the kth device; k = 1, 2, ..., K; K represents the total number of all devices; {k|k∈[1, K], B(k)≤N 0} means changing the value of k from 1 to K to satisfy B(k)≤N 0 All k values ​​of the formula, and arrange all the obtained k values ​​from large to small to form an array; N 0 The personnel level value of the current user.

[0023] In an optional embodiment, determining the current user's permission to view the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request to the current user to view the target device includes:

[0024] Obtaining a pre-stored universal viewing threshold of the target device; wherein, if the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise, its universal viewing threshold is 0;

[0025] Calculate the current user's viewing permission control value for the target device based on a third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device's request for the current user to view the target device, and the universal viewing threshold of the target device;

[0026] Determine whether the viewing permission control value of the current user for the target device is equal to 1; if so, determine to release the viewing permission of the current user for the target device; otherwise, determine to close the viewing permission of the current user for the target device;

[0027] Wherein, the third formula is:

[0028]

[0029] In the third formula, N(i) represents the viewing permission control value of the current user for the target device corresponding to the i-th element in the array Q; N(i_a) represents the personnel level value of the a-th supervisor corresponding to the target device; Y(i) represents the universal viewing threshold of the target device; F(a) represents the request result of the a-th supervisor corresponding to the target device for the current user to view the target device, if the a-th supervisor agrees to the current user's application to view the target device, then F(a) = 1, otherwise F(a) = 0; a = 1, 2, ..., size(Q); size(Q) represents the number of all elements in the array Q; It means that the value of a is from 1 to size(Q) and is substituted into the brackets. If all the conditions in the brackets are met, the overall equation is established, otherwise the overall equation is not established; ELSE means Y(i) = 1 and And Y(i)=0 is not true for other states.

[0030] In a second aspect, an embodiment of the present invention further provides a user rights allocation device, including:

[0031] The personal information acquisition module is used to acquire the personal information of the current user corresponding to the currently authorized login user account according to the pre-stored correspondence between the user account and the user personal information;

[0032] A personnel level acquisition module, used to acquire the personnel level of the current user according to the personal information of the current user;

[0033] A request module, used to obtain the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device for the current user to view the target device; wherein the request result includes approval to view the device or disapproval to view the device;

[0034] The authority determination module is used to determine the current user's viewing authority for the target device based on the current user's personnel level, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor's request for the current user to view the target device.

[0035] In an optional embodiment, the user rights allocation device further includes:

[0036] The device initial screening module is used to determine the devices that the current user can apply to view based on the current user's personnel level and the preset minimum personnel level for applying to view each device;

[0037] The selection module is used to provide the current user with a list of device identifiers that the current user can apply to view, and is also used to receive the current user's selection of a device identifier in the list of device identifiers that the current user can apply to view, and determine the device corresponding to the currently selected device identifier as the target device that the current user applies to view.

[0038] In an optional embodiment, the personnel level acquisition module is specifically used to acquire the user's personnel level according to the user's personal information and the first formula;

[0039] Among them, the first formula is:

[0040] N={D 2 -{A 2 <<[len(D 2 )-len(A 2 )]}>>[Z+len(E 2 )]} 10

[0041] In the first formula, N represents the personnel level value of the user; D 2 The binary form of the user's personal information is divided into four parts. The first part is the preset frame header A. 2 The second part is the preset personnel level value of the personal information corresponding to the user, the third part is the identity information and the number of bits of the identity information data in the binary form of each personal information is Z, and the fourth part is the preset frame tail E 2 ; len() means to find the number of bits of the binary data in the brackets; << means left shift; >> means right shift; {} 10 Indicates converting the value in brackets to a decimal number;

[0042] The device initial screening module is specifically used to determine the devices that the current user can apply to view according to the second formula;

[0043] Wherein, the second formula is:

[0044] Q={k|k∈[1,K],B(k)≤N 0}

[0045] In the second formula, Q represents the array of device numbers that the current user can apply to view; B(k) represents the preset minimum level of personnel applying to view the kth device; k = 1, 2, ..., K; K represents the total number of all devices; {k|k∈[1, K], B(k)≤N 0} means changing the value of k from 1 to K to satisfy B(k)≤N 0 All k values ​​of the formula, and arrange all the obtained k values ​​from large to small to form an array; N 0The personnel level value of the current user.

[0046] In an optional embodiment, the authority determination module includes:

[0047] An acquisition unit, configured to acquire a pre-stored universal viewing threshold of the target device; wherein, if the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise, its universal viewing threshold is 0;

[0048] a control value calculation unit, configured to calculate a control value of the viewing permission of the current user to the target device based on a third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device requesting the current user to view the target device, and a universal viewing threshold of the target device;

[0049] a judgment unit, used to judge whether the viewing permission control value of the current user to the target device is equal to 1; if so, determine to release the viewing permission of the current user to the target device; otherwise, determine to close the viewing permission of the current user to the target device;

[0050] Wherein, the third formula is:

[0051]

[0052] In the third formula, M(i) represents the viewing permission control value of the current user for the target device corresponding to the i-th element in the array Q; N(i_a) represents the personnel level value of the a-th supervisor corresponding to the target device; Y(i) represents the universal viewing threshold of the target device; F(a) represents the request result of the a-th supervisor corresponding to the target device for the current user to view the target device, if the a-th supervisor agrees to the current user's application to view the target device, F(a) = 1, otherwise F(a) = 0; a = 1, 2, ..., size(Q); size(Q) represents the number of all elements in the array Q; It means that the value of a is from 1 to size(Q) and is substituted into the brackets. If all the conditions in the brackets are met, the overall equation is established, otherwise the overall equation is not established; ELSE means Y(i) = 1 and And Y(i)=0 is not true for other states.

[0053] The present invention provides a method and device for allocating user rights. First, the personal information of the current user is obtained according to the account information of the current logged-in user. Then, the personnel level of the current user is obtained according to the personal information. Then, the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device for the current user to view the target device are obtained. Finally, the viewing rights of the current user to the target device are determined according to the request result, the personnel level of the current user and the personnel level of the supervisor corresponding to the target device. The present invention can intelligently and automatically determine the viewing rights of the user to the target device according to the personnel level of the user and the personnel level of the supervisor corresponding to the target device. Therefore, the viewing rights of the device and data can be flexibly allocated to the user according to the actual needs and corresponding authority of the user, effectively improving the efficiency of rights allocation and management, making the opening of device data more targeted, and facilitating users to browse data in a targeted manner. At the same time, the security of data and devices is enhanced, and the risk of data leakage is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 A flow chart of a method for allocating user rights provided by an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of the structure of a user rights allocation device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0058] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Figure 1 A flowchart of a method for allocating user rights provided by an embodiment of the present invention. Figure 1 The method comprises the following steps S101-S104:

[0060] S101: According to the pre-stored correspondence between the user account and the user personal information, the personal information of the current user corresponding to the user account currently authorized for login is obtained.

[0061] S102: Acquire the personnel level of the current user according to the personal information of the current user.

[0062] S103: Obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device to the current user's application to view the target device.

[0063] The request result includes agreeing to view the device or not agreeing to view the device.

[0064] S104: Determine the viewing authority of the current user for the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request to the current user to view the target device.

[0065] The beneficial effects of the above technical solution are as follows: a user authority allocation method provided by an embodiment of the present invention first obtains the corresponding personal information of the current user according to the current logged-in user account information, then obtains the personnel level of the current user according to this personal information, and then obtains the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device for the current user to view the target device, and finally determines the current user's viewing authority to the target device according to the request result, the personnel level of the current user and the personnel level of the supervisor corresponding to the target device. The present invention can intelligently and automatically determine the user's viewing authority to the target device according to the user's personnel level and the personnel level of the supervisor corresponding to the target device, so that the user can be flexibly allocated the viewing authority of the device and data according to the actual needs and corresponding authority of the user, effectively improving the efficiency of authority allocation and management, making the opening of device data more targeted, and facilitating users to browse data in a targeted manner, while strengthening the security of data and devices and reducing the risk of data leakage.

[0066] As an optional embodiment, before step S103, the following steps S201-S203 may also be included:

[0067] S201: Determine the devices that the current user can apply to view based on the personnel level of the current user and the preset minimum personnel level for applying to view each device;

[0068] S202: providing the current user with a list of device identifiers that the current user can apply to view;

[0069] S203: receiving a selection made by the current user for a device identifier in the device identifier list that the current user can apply to view, and determining a device corresponding to the currently selected device identifier as a target device that the current user applies to view.

[0070] The beneficial effect of the above technical solution is: according to the personnel level of the current user, the corresponding viewable devices are displayed to the current user for selection, and the devices that the user does not have permission to view are blocked, thereby ensuring the security of the device and the reliability of the system to the greatest extent.

[0071] As an optional embodiment, the step S102 may include: obtaining the personnel level of the user according to the user's personal information and the first formula;

[0072] Among them, the first formula is:

[0073] N={D 2 -{A 2 <<[len(D 2 )-len(A 2 )]}>>[Z+len(E 2 )]} 10 (1)

[0074] In the first formula, N represents the personnel level value of the user; D 2 The binary form of the user's personal information is divided into four parts. The first part is the preset frame header A. 2 The second part is the preset personnel level value of the personal information corresponding to the user, the third part is the identity information and the number of bits of the identity information data in the binary form of each personal information is Z, and the fourth part is the preset frame tail E 2 ; len() means to find the number of bits of the binary data in the brackets; << means left shift; >> means right shift; {} 10 Indicates converting the value in brackets to a decimal number.

[0075] In this embodiment, when a user registers, the personnel level of the registered user is determined, and then the personnel level value and personnel identity information of the registered user are added to the frame header A. 2 and frame end E 2 , generate the personal information of the current registered person, and then bind and store the registered account and personal information of the current registered user. Subsequently, each time the user uses the account to authorize login, the personal information corresponding to the account can be obtained, and then the corresponding personnel level value D can be restored according to the above formula (1) 2 , which has the advantage of being simple in implementation.

[0076] Preferably, the step S201 may include: determining the devices that the current user can apply to view according to the second formula;

[0077] Wherein, the second formula is:

[0078] Q={k|k∈[1,K],B(k)≤N 0} (2)

[0079] In the second formula, Q represents the array of device numbers that the current user can apply to view; B(k) represents the preset minimum level of personnel applying to view the kth device; k = 1, 2, ..., K; K represents the total number of all devices; {k|k∈[1, K], B(k)≤N 0} means changing the value of k from 1 to K to satisfy B(k)≤N 0 All k values ​​of the formula, and arrange all the obtained k values ​​from large to small to form an array; N 0 The personnel level value of the current user.

[0080] The beneficial effects of the above technical solution are as follows: the first formula (1) is used to determine the personnel level according to personal information, thereby locating the personnel level status, which is convenient for the subsequent allocation of equipment and the release of data permissions; then the second formula (2) is used to allocate the equipment that the user has applied to view according to the personnel level of the user authorized to log in to the system, so that the equipment that is not within the user's authority to view is not allocated, thereby ensuring the security of the equipment and the reliability of the system to the greatest extent.

[0081] As an optional embodiment, the step S104 may include the following steps S301-S305:

[0082] S301: Acquire a pre-stored universal viewing threshold of the target device;

[0083] If the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise its universal viewing threshold is 0;

[0084] S302: Calculate the current user's viewing permission control value for the target device based on a third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device's request for the current user to view the target device, and the universal viewing threshold of the target device;

[0085] S303: Determine whether the current user's viewing permission control value for the target device is equal to 1; if yes, execute step S304; otherwise, execute step S305;

[0086] S304: Determine to release the current user's viewing permission for the target device;

[0087] S305: Determine to close the current user's viewing permission for the target device;

[0088] Wherein, the third formula is:

[0089]

[0090] In the third formula, M(i) represents the viewing permission control value of the current user for the target device corresponding to the i-th element in the array Q, M(i)=1 represents releasing the current user's viewing permission for the target device corresponding to the i-th element in the array Q, and M(i)=0 represents closing the current user's viewing permission for the target device corresponding to the i-th element in the array Q; N(i_a) represents the personnel level value of the a-th supervisor corresponding to the target device; Y(i) represents the universal viewing threshold of the target device; F(a) represents the request result of the a-th supervisor corresponding to the target device for the current user to view the target device, if the a-th supervisor agrees to the current user's application to view the target device, F(a)=1, otherwise F(a)=0; a=1,2,...,size(Q); size(Q) represents the number of all elements in the array Q; It means that the value of a is from 1 to size(Q) and is substituted into the brackets. If all the conditions in the brackets are met, the overall equation is established, otherwise the overall equation is not established; ELSE means Y(i) = 1 and And Y(i)=0 is not true for other states.

[0091] The beneficial effect of the above technical solution is: using the third formula (3) to control the viewing permission of the data of the applied device (i.e., the target device) according to the device status (i.e., the universal viewing threshold) and the personnel information of the person who manages its device permissions, the data opening to the user is more targeted, which facilitates the user to browse the data in a targeted manner, and at the same time enhances the security of the device data and reduces the risk of data leakage.

[0092] It can be seen from the contents of the above embodiments that the embodiments of the present invention can flexibly assign viewing rights of devices and data to users according to the actual needs and corresponding powers of the users; specifically: after the user is authorized to log in to the system, the system will first determine the personnel level of the user based on the user's personal information, and then assign the device requested to be viewed to the user based on the user's personnel level. The user can then select the assigned device to apply to view its data. In the process of applying to view device data, the system will control the viewing rights of the device data applied for according to the device status of the device applied for and the personnel information of the person who manages its device permissions, thereby effectively ensuring the security of the device data.

[0093] Figure 2A schematic diagram of the structure of a user rights allocation device provided by an embodiment of the present invention. Figure 2 As shown, the device comprises:

[0094] The personal information acquisition module 1 is used to acquire the personal information of the current user corresponding to the user account currently authorized to log in according to the correspondence between the user account and the user personal information stored in advance;

[0095] A personnel level acquisition module 2 is used to acquire the personnel level of the current user according to the personal information of the current user; preferably, the personnel level acquisition module 2 is specifically used to acquire the personnel level of the user according to the personal information of the user and the above-mentioned first formula;

[0096] Request module 3, used to obtain the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device for the current user to view the target device; wherein the request result includes approval to view the device or disapproval to view the device;

[0097] The authority determination module 4 is used to determine the current user's viewing authority for the target device based on the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor's request for the current user to view the target device.

[0098] As an optional embodiment, the user rights allocation device may further include:

[0099] The device initial screening module is used to determine the devices that the current user can apply to view based on the personnel level of the current user and the preset minimum personnel level for applying to view each device. Preferably, the device initial screening module is specifically used to determine the devices that the current user can apply to view based on the second formula.

[0100] The selection module is used to provide the current user with a list of device identifiers that the current user can apply to view, and is also used to receive the current user's selection of a device identifier in the list of device identifiers that the current user can apply to view, and determine the device corresponding to the currently selected device identifier as the target device that the current user applies to view.

[0101] As an optional embodiment, the authority determination module 4 includes:

[0102] An acquisition unit, configured to acquire a pre-stored universal viewing threshold of the target device; wherein, if the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise, its universal viewing threshold is 0;

[0103] a control value calculation unit, configured to calculate the current user's viewing permission control value for the target device based on the third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device's request for the current user to view the target device, and the universal viewing threshold of the target device;

[0104] The judging unit is used to judge whether the viewing permission control value of the current user to the target device is equal to 1; if so, determine to release the viewing permission of the current user to the target device; otherwise, determine to close the viewing permission of the current user to the target device.

[0105] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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 An apparatus for the method specified in one or more blocks.

[0106] 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 including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The method specified in one or more boxes.

[0107] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of a method specified in one or more boxes.

[0108] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these changes and variations. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for allocating user rights, characterized in that: include: According to the pre-stored correspondence between user accounts and user personal information, obtain the personal information of the current user corresponding to the user account currently authorized to log in; Obtaining the personnel level of the current user according to the personal information of the current user; Obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the result of the supervisor's request for the current user to view the target device; wherein the result of the request includes agreeing to view the device or not agreeing to view the device; Determine the current user's permission to view the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request for the current user to view the target device; Before obtaining the personnel level of the supervisor corresponding to the target device that the current user applies to view and the result of the supervisor corresponding to the target device's request to the current user for viewing the target device, the method further includes: Determine the devices that the current user can apply to view based on the personnel level of the current user and the preset minimum personnel level for applying to view each device; Provide the current user with a list of device identifiers that the current user can apply to view; Receive a selection by a current user of a device identifier in the device identifier list that the current user can apply to view, and determine a device corresponding to the currently selected device identifier as a target device that the current user applies to view; Wherein, obtaining the personnel level of the current user according to the personal information of the current user includes: Obtaining the user's personnel level according to the user's personal information and the first formula; Among them, the first formula is: In the first formula, Indicates the personnel level value of the user; Represents the binary form of the user's personal information. The binary form of the personal information is divided into four parts. The first part is the preset frame header. The second part is the personnel level value of the user corresponding to the personal information set in advance, and the third part is the identity information, and the number of bits of identity information data in the binary form of each personal information is , the fourth part is the preset frame end ; Indicates the number of bits of the binary data in brackets to be obtained; Indicates left shift; Indicates right shift; Indicates converting the value in brackets to a decimal number; The determining of the devices that the current user can apply to view according to the personnel level of the current user and the preset minimum personnel level for applying to view each device includes: Determine the device that the current user can apply to view according to the second formula; Wherein, the second formula is: In the second formula, Indicates the array of device numbers that the current user can apply to view; Indicates the preset The minimum level of personnel required to view the device; ; Indicates the total number of all devices; Indicates that The value ranges from 1 to Get Satisfied All the formulas value, and all the obtained The values ​​are arranged from large to small to form an array; The personnel level value of the current user.

2. The user rights allocation method according to claim 1, characterized in that: The determining the viewing authority of the current user to the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device requesting the current user to view the target device comprises: Obtaining a pre-stored universal viewing threshold of the target device; wherein, if the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise, its universal viewing threshold is 0; Calculate the current user's viewing permission control value for the target device based on a third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device's request for the current user to view the target device, and the universal viewing threshold of the target device; Determine whether the viewing permission control value of the current user for the target device is equal to 1; if so, determine to release the viewing permission of the current user for the target device; otherwise, determine to close the viewing permission of the current user for the target device; Wherein, the third formula is: In the third formula, Represents the current user's array Middle The viewing permission control value of the target device corresponding to each element; Indicates the target device's The personnel level value of each supervisor; Indicates the common viewing threshold of the target device; Indicates the target device's The supervisor requests the current user to view the target device. If a supervisor agrees to the current user's application to view the target device, ,on the contrary ; ; Represents the search for an array The number of all elements in ; Indicates that The value ranges from 1 to And substitute into the brackets. If all the conditions in the brackets are met, the overall equation is established. Otherwise, the overall equation is not established. express as well as Other states that are not true.

3. A user rights allocation device, characterized in that: include: The personal information acquisition module is used to acquire the personal information of the current user corresponding to the currently authorized login user account according to the pre-stored correspondence between the user account and the user personal information; A personnel level acquisition module, used to acquire the personnel level of the current user according to the personal information of the current user; A request module, used to obtain the personnel level of the supervisor corresponding to the target device that the current user applies to view and the request result of the supervisor corresponding to the target device for the current user to view the target device; wherein the request result includes approval to view the device or disapproval to view the device; The authority determination module is used to determine the viewing authority of the current user to the target device according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, and the result of the supervisor corresponding to the target device's request for the current user to view the target device; Wherein, the device further comprises: The device initial screening module is used to determine the devices that the current user can apply to view based on the current user's personnel level and the preset minimum personnel level for applying to view each device; A selection module, used to provide the current user with a list of device identifiers that the current user can apply to view, and also used to receive the current user's selection of a device identifier in the list of device identifiers that the current user can apply to view, and determine the device corresponding to the currently selected device identifier as the target device that the current user applies to view; The personnel level acquisition module is specifically used to acquire the user's personnel level according to the user's personal information and the first formula; Among them, the first formula is: In the first formula, Indicates the personnel level value of the user; Represents the binary form of the user's personal information. The binary form of the personal information is divided into four parts. The first part is the preset frame header. The second part is the personnel level value of the user corresponding to the personal information set in advance, and the third part is the identity information, and the number of bits of identity information data in the binary form of each personal information is , the fourth part is the preset frame end ; Indicates the number of bits of the binary data in brackets to be obtained; Indicates left shift; Indicates right shift; Indicates converting the value in brackets to a decimal number; The device initial screening module is specifically used to determine the devices that the current user can apply to view according to the second formula; Wherein, the second formula is: In the second formula, Indicates the array of device numbers that the current user can apply to view; Indicates the preset The minimum level of personnel required to view the device; ; Indicates the total number of all devices; Indicates that The value ranges from 1 to Get Satisfied All the formulas value, and all the obtained The values ​​are arranged from large to small to form an array; The personnel level value of the current user.

4. The user rights allocation device according to claim 3, characterized in that: The authority determination module includes: An acquisition unit, configured to acquire a pre-stored universal viewing threshold of the target device; wherein, if the target device is an open device with no viewing restrictions, its universal viewing threshold is 1, otherwise, its universal viewing threshold is 0; a control value calculation unit, configured to calculate a control value of the viewing permission of the current user to the target device based on a third formula according to the personnel level of the current user, the personnel level of the supervisor corresponding to the target device, the result of the supervisor corresponding to the target device requesting the current user to view the target device, and a universal viewing threshold of the target device; a judgment unit, used to judge whether the viewing permission control value of the current user to the target device is equal to 1; if so, determine to release the viewing permission of the current user to the target device; otherwise, determine to close the viewing permission of the current user to the target device; Wherein, the third formula is: In the third formula, Represents the current user's array Middle The viewing permission control value of the target device corresponding to each element; Indicates the target device's The personnel level value of each supervisor; Indicates the common viewing threshold of the target device; Indicates the target device's The supervisor requests the current user to view the target device. If a supervisor agrees to the current user's application to view the target device, ,on the contrary ; ; Represents the search for an array The number of all elements in ; Indicates that The value ranges from 1 to And substitute into the brackets. If all the conditions in the brackets are met, the overall equation is established. Otherwise, the overall equation is not established. express as well as Other states that are not true.