A permission control method, system, device and electronic equipment
By dynamically allocating master and slave user identities, the problem of multi-user KVM access control conflicts is solved, efficient and secure permission management is achieved, and multi-user concurrent operations and flexible permission adjustments are supported.
Patent Information
- Application Number
- CN202411045369.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-07-31
AI Technical Summary
When multiple users access a server through KVM, control conflicts and low efficiency may occur, especially when new users require the consent of all online primary users.
By determining whether there is a master user in the target service, the user identity is dynamically assigned as a master user or a slave user to ensure that only one user has control permissions and other users have viewing permissions. It also supports slave users to apply for control permissions from the master user. The master user adjusts permissions based on the response and automatically releases or assigns control permissions.
It effectively avoids control conflicts, improves the orderliness and security of operations, reduces waiting time, improves user access efficiency and satisfaction, and supports multi-user concurrent operations and flexible permission management.
Smart Images

Figure CN119089417B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a permission control method, system, device, and electronic device. Background Art
[0002] KVM (Keyboard Video Mouse) is a common interface for users to access servers using a keyboard, mouse, and video. KVM connects to a server via a network. Network services generally allow multiple users to access the server simultaneously. When multiple users simultaneously control a server through KVM, control conflicts may occur, leading to control anomalies or failures. Furthermore, in related technologies, if a user needs to access or control a server through KVM, consent is required from all users with control permissions in the KVM, which is inefficient. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a permission control method, system, device and electronic device. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a permission control method, including:
[0005] In response to a connection establishment request sent by a logged-in user, determining whether there is a primary user in the target service; if there is no primary user in the target service, allocating control authority to the logged-in user and determining the logged-in user as the primary user;
[0006] In a case where there is a master user in the target service, viewing authority is allocated to the logged-in user, and the logged-in user is determined as a slave user.
[0007] Optionally, it also includes:
[0008] One or more of the slave users apply for control authority from the master user;
[0009] The current primary user is determined according to the operation response of the primary user, where the operation response includes: agreeing to the application operation, disagreeing to the application operation, and not performing the operation within a preset time.
[0010] Optionally, determining the current primary user according to the operation response of the primary user includes:
[0011] When the master user performs the consent application operation, releasing the control authority of the master user, allocating the control authority to a target slave user designated by the master user, and determining the target slave user as the current master user;
[0012] In a case where the primary user performs the operation of not agreeing to the application, determining the primary user as the current primary user;
[0013] If the main user does not perform any operation within the preset time, the control authority of the main user is automatically released, and according to the time when the application for control authority is initiated, the target slave user who obtains the control authority is confirmed from the one or more slave users, and the target slave user is determined as the current main user.
[0014] Optionally, it also includes:
[0015] When the primary user logs out of the target service, the control authority of the primary user is released; and a release reminder is sent to the secondary user.
[0016] Optionally, after receiving the release reminder from the user, the method further includes:
[0017] In the case where multiple slave users apply for control authority, identifying a target slave user who obtains the control authority from the multiple slave users according to the time of initiating the application, and determining the target slave user as the current master user;
[0018] In the case that there is only one slave user in the target service, or only one slave user applies for control authority, the control authority is automatically assigned to the slave user, and the slave user is determined as the current master user.
[0019] Optionally, in the case where a logged-in user logs into the target service, the method further includes:
[0020] In the case where one or more of the slave users and the logged-in user both apply for control authority, identifying a target user who is to obtain the control authority from among the one or more slave users and the logged-in user according to the time of initiation of the application, and determining the target user as the current primary user;
[0021] When there is no primary user in the target service, allocating the control authority to the logged-in user and determining the logged-in user as the primary user includes:
[0022] If the time when the logged-in user applies for the control authority is earlier than the time when other slave users apply for the control authority, the control authority is allocated to the logged-in user to obtain the control authority, and the logged-in user is determined as the current primary user; or
[0023] In the case that one or more of the slave users do not apply for the control authority, or in the case that the slave user does not exist, the control authority is automatically assigned to the logged-in user, and the logged-in user is determined as the current master user.
[0024] Optionally, it also includes:
[0025] In the case that the slave user does not apply for control authority after receiving the release reminder, and there is no logged-in user logging into the target service, or in the case that there is no slave user and no logged-in user logging into the target service, the control authority is vacant, and there is no user who is the master user in the current target service.
[0026] According to a second aspect of an embodiment of the present disclosure, there is provided an authority control system, including:
[0027] A target processor, a target controller and a plurality of user clients; the target controller includes a network module and a target service;
[0028] The target processor is connected to the target controller via a target bus; the user client is connected via the network module;
[0029] The target service is configured to implement functions related to access control of the target processor and execute the steps of the permission control method described in the first aspect;
[0030] The network module is configured to implement data communication between the plurality of user clients and the target controller; and the user client is configured to send a user request.
[0031] According to a third aspect of an embodiment of the present disclosure, there is provided a permission control device, including:
[0032] A response module, configured to respond to a connection establishment request sent by a logged-in user and determine whether a primary user exists for the target service;
[0033] A first determining module is configured to allocate the control authority to the logged-in user and determine the logged-in user as the primary user when there is no primary user in the target service;
[0034] The second determining module is configured to allocate viewing rights to the logged-in user and determine the logged-in user as a slave user if there is a master user in the target service.
[0035] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the permission control method described in the first aspect are implemented.
[0036] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the permission control method described in the first aspect are implemented.
[0037] According to a sixth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the permission control method described in the first aspect are implemented.
[0038] The present disclosure confirms the identity of the logged-in user based on whether there is a master user for the target service when the user logs in to the target service. If there is a master user for the target service, the logged-in user is a slave user with only viewing permissions. If there is no master user for the target service, the logged-in user is a slave user with control permissions. This implements a one-master-multiple-slave management strategy for the target service, allowing only one user to have full control permissions, while other users can only have limited viewing permissions as slave users. This effectively avoids conflicts and confusion that may be caused by multiple users trying to control the server at the same time, ensuring the orderliness and security of system operations. When a user logs in to the target service, if there is a master user, the user automatically becomes a slave user with viewing permissions without waiting for the consent of other users, avoiding the problem of a user's access failure due to the untimely response of other online users. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 This is a schematic diagram of the steps of a permission control method shown in an embodiment of the present disclosure;
[0041] Figure 2 is a flow chart of allocating control rights shown in an embodiment of the present disclosure;
[0042] Figure 3 This is a flowchart of applying for control authority shown in an embodiment of the present disclosure;
[0043] Figure 4 This is a flowchart of a process flow for releasing control authority shown in an embodiment of the present disclosure;
[0044] Figure 5 is a schematic diagram of an authority control system shown in an embodiment of the present disclosure;
[0045] Figure 6 is a block diagram of a permission control device shown in an embodiment of the present disclosure;
[0046] Figure 7 is a schematic diagram of an electronic device shown in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0048] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects related to each other are in an "or" relationship.
[0049] KVM is a common interface for users to access servers through keyboard, mouse, and video. In the related art, a method is proposed to alleviate the problem of access and control conflicts that may occur when multiple users access and control the server through KVM at the same time. It allows multiple main users to access and control the server system at the same time. When a new user logs in, all online main users are required to approve whether to obtain control authority or viewing authority. If the viewing authority is approved, the new user becomes a slave user, and if the control authority is approved, the new user becomes a master user. However, the solution proposed in the related art allows the existence of multiple main users, which still leads to access control conflicts, and when a newly logged-in user wants to watch or control KVM, the consent of all online main users is required, which is inefficient and logically complex.
[0050] In order to solve the above technical problems, the present disclosure proposes a permission control method, which can effectively solve the problem of conflicts that may occur when users access and control servers through KVM.
[0051] Figure 1 This is a schematic diagram of the steps of a permission control method shown in an embodiment of the present disclosure. Figure 1 As shown, the permission control method may specifically include the following steps:
[0052] Step S11: In response to a connection establishment request sent by a logged-in user, determining whether there is a primary user for the target service;
[0053] The user enters authentication information such as a username and password to initiate a connection establishment request, which is used to log in to the target service. In the target service, the administrator can configure different user roles and permissions to control different users' access to computer devices and the scope of operations, including control permissions and viewing permissions. Among them, control permissions refer to the permissions that users or administrators have to actually operate and configure the target service and the computer or server it is connected to, allowing users to perform tasks such as starting, stopping, restarting, installing software, and modifying configurations. Viewing permissions refer to the permissions that users or administrators have to view the screen display content of the connected computer or server through the target service, allowing users to monitor the operating status of the server, but not to perform actual operations or configuration changes.
[0054] The default permissions of the public user are set to viewing permissions. Only when the user becomes the main user will he have control permissions and be able to control the server.
[0055] To ensure that there is only one primary user, a check is performed to see if there is already a primary user. The primary user is the user currently controlling the server and has full control permissions. Based on the result of this check, the logged-in user is assigned a corresponding identity, with different identities having different permissions.
[0056] The target service may be a KVM server configured on a BMC (Baseboard Management Controller), which can implement KVM access control related functions. Step S12: If there is no primary user in the target service, assign control permissions to the logged-in user and determine the logged-in user as the primary user;
[0057] If there is no master user in the target service, the user logs in to the target service and assigns control authority to the logged-in user, who is then determined to be the master user. After becoming the master user, the logged-in user obtains full control authority and can operate the server's keyboard, video, mouse and other interfaces.
[0058] Step S13: When there is a master user in the target service, the viewing authority is allocated to the logged-in user, and the logged-in user is determined as a slave user.
[0059] If the target service already has a master user controlling the server, the newly logged-in user will be identified as a slave user. Slave users only have viewing permissions and can view the server's operation interface, but cannot directly operate the server's input and output devices.
[0060] By adopting the embodiments of the present disclosure, the role and authority of the logged-in user are dynamically determined according to whether there is a master user in the target service, ensuring that control conflicts and confusion can be avoided when multiple users access the service. By distinguishing between master users and slave users, the target service can control the operating scope and restrictions of different users, avoiding authority conflicts and misunderstandings. In the case where the target service currently has a master user, directly setting the newly logged-in user as a slave user can avoid control conflicts. The user's login does not require the permission of other users, and all users have access rights, which can avoid the problem of user access failure.
[0061] Figure 2 This is a flow chart of allocating control rights shown in an embodiment of the present disclosure. Figure 2 As shown: user login; determine whether there is a master user; if there is a master user, the newly logged in user becomes a slave user; if there is no master user, the newly logged in user becomes the master user.
[0062] Among them, in an optional embodiment, it also includes: one or more of the slave users apply for control authority to the main user; determine the current main user based on the operation response of the main user, and the operation response status includes: agreeing to the application operation, disagreeing to the application operation and not performing the operation within the preset time.
[0063] If the target service has a master user and one or more slave users, and one or more slave users need to control the server, these slave users can apply for control permissions from the master user. These requests can include the slave user's identifier. The master user receives these requests from each slave user and, based on the master user's response to the requests, re-determines the master user for the target service. The master user may change. If this happens, the original master user becomes a slave user, and only one slave user becomes the master user.
[0064] The primary user's response to the requested operation can be: approval, disapproval, or failure to perform the operation within a preset time. Approval or disapproval is determined by the primary user. If the primary user does not approve or disapprove the request within the preset time, the target service responds to the control permission request sent by the secondary user on the primary user's behalf.
[0065] By adopting the embodiments of the present disclosure, slave users can apply for permissions from the master user based on actual needs, and the master user can decide whether to grant permissions based on the specific circumstances. This makes permission management more flexible and can better adapt to changing work environments and task requirements. For slave users, being able to proactively apply for the required control permissions reduces operational obstacles caused by insufficient permissions and improves work efficiency and satisfaction. It supports multiple slave users applying for permissions from the master user, and dynamically adjusts permission allocation based on the master user's decision, thereby supporting multi-user concurrent operations and improving overall work efficiency.
[0066] Among them, in an optional embodiment, the current main user is determined according to the operation response of the main user, including: when the main user performs the application approval operation, the control authority of the main user is released, and the control authority is assigned to the target slave user specified by the main user, and the target slave user is determined as the current main user; when the main user performs the application disapproval operation, the main user is determined as the current main user; when the main user does not perform any operation within a preset time, the control authority of the main user is automatically released, and according to the time of initiating the application for control authority, the target slave user who obtains the control authority is confirmed from the one or more slave users, and the target slave user is determined as the current main user.
[0067] When a slave user applies for control authority to another slave user, each application may carry the slave user's identification and clear request content, which may include a reason for the application.
[0068] The target service notifies the current primary user of the received permission request, either through an interface prompt or a push notification. By controlling the permission request, the primary user can understand the information contained in the request, as well as the user who sent the request and the reason for the request.
[0069] When multiple slave users apply for control permissions from the master user, the master user can choose which slave user's application to approve. The master user can also reject all slave users' applications.
[0070] If the master user agrees to the application of a slave user, the master user's control authority will be released, and the control authority will be assigned to the slave user selected by the master user. The user identity information will be updated, and the original master user's identity will become the current slave user, and the original slave user's identity will become the current master user.
[0071] If the master user rejects all slave user applications, the target service retains the master user's control permissions. The master user remains the same as the original master user, and the slave users remain the same as the original slave users. The slave users who submitted the application can be notified of the rejection and the reason for the rejection.
[0072] The primary user's operating time is limited. If the primary user does not perform any operation within the preset time, the timeout processing logic is automatically triggered, releasing the current primary user's control rights. Based on the time sequence of the secondary users' applications, the target secondary user who will receive control rights is identified from one or more secondary users who initiated the application and designated as the current primary user. The identity information of each user is updated within the target service.
[0073] By adopting the embodiments of the present disclosure, users can more clearly understand the allocation and changes of permissions through a clear permission application and approval process. The automated timeout processing mechanism reduces the problem of suspended permissions due to negligence of the primary user, and improves the responsiveness and availability of the target service. It can support multi-user concurrent operations and multi-level permission management. The target service can dynamically adjust permission allocation based on the primary user's operational response to adapt to changing needs in different scenarios.
[0074] Figure 3 This is a flowchart of applying for control authority shown in the embodiment of the present disclosure. Figure 3 As shown: the slave user applies for control authority from the master user, and determines whether the master user agrees to the slave user's application. If the master user agrees to the application, the master user's control authority is released, and the slave user who applied for control authority is assigned control authority, and changes from a slave user to a master user; if the master user disagrees with the application, the identities of the current master user and the slave user remain unchanged; if the master user does not perform any operation within the preset time, that is, if there is no response after the timeout, the target service agrees to the slave user's application by default, releases the master user's control authority, and the slave user who applied for control authority is assigned control authority, and changes from a slave user to a master user.
[0075] In an optional embodiment, the method further includes: releasing the control authority of the primary user when the primary user logs out of the target service; and sending a release reminder to the secondary user.
[0076] The target service monitors the user's login status in real time, including detecting whether the user has logged out. If the primary user is detected to have logged out, the control permissions held by the user are automatically released. The target service currently has no primary user.
[0077] After releasing the control authority of the master user, a release reminder is sent to the logged-in user, which indicates that there is no master user in the current target service. If a slave user needs to be assigned control authority, he or she can apply for control authority.
[0078] According to the embodiment of the present disclosure, when the main user logs out, releasing his / her permissions in time can ensure that these resources can be effectively utilized by other users or processes that need them. By sending a release reminder to the slave user, the slave user can understand the current permission allocation situation and adjust his / her own workflow and plan as needed. In an optional embodiment, after the slave user receives the release reminder, it also includes: in the case where multiple slave users apply for control permission, according to the time of initiating the application, confirming the slave target user who obtains the control permission from the multiple slave users, and determining the target slave user as the current main user; in the case where there is only one slave user in the target service, or only one slave user applies for control permission, automatically assigning the control permission to the slave user, and determining the slave user as the current main user.
[0079] After receiving the release reminder of the main user's logout, the slave user can obtain control permissions based on his or her own business needs and when the conditions are met.
[0080] If there are multiple slave users in the current target service, if a slave user needs control permissions, then it is necessary to apply for control permissions. For example, after the master user logs out, there are slave users A, B, and C. If only slave user A needs control permissions, then slave user A must also apply for control permissions before it can be assigned control permissions.
[0081] When multiple slave users need to obtain control authority, determine the time when each slave user applies for control authority, sort the time when each slave user applies for control authority, and determine the slave user who first initiates the application among all the total users as the target slave user to obtain control authority, and determine the target slave user as the current main user.
[0082] After the master user logs out, if there is only one slave user, the released control permissions will be automatically assigned to the slave user, regardless of whether the slave user needs control permissions or not, and the slave user will be determined as the current master user. For example, if the master user logs out and there is a slave user A, even if the slave user A does not need control permissions, the control permissions will be automatically assigned to the slave user A, and the slave user A does not need to apply for control permissions.
[0083] After the control authority allocation is completed, all applicants may be notified, including the target slave user who successfully obtains the authority and other slave users who do not obtain the authority.
[0084] The disclosed embodiments reduce manual intervention and accelerate the collaboration process through an automated permissions allocation mechanism. A time-based permissions allocation strategy ensures that all applicants have equal access to control rights, avoiding bias or disputes. The target service can handle a variety of scenarios, from single-user to multi-user applications, ensuring flexibility and adaptability in different collaboration scenarios.
[0085] Among them, in an optional embodiment, when there is a logged-in user logging in to the target service, it also includes: when one or more of the slave users and the logged-in user apply for control authority, according to the time of initiating the application, confirm the target user who obtains the control authority from one or more of the slave users and the logged-in user, and determine the target user as the current main user; when there is no main user in the target service, the control authority is allocated to the logged-in user, and the logged-in user is determined as the main user, including: when the time when the logged-in user applies for control authority is earlier than the time when other slave users apply for control authority, or, the control authority is allocated to the logged-in user to obtain control authority, and the logged-in user is determined as the current main user; or; when one or more of the slave users do not apply for control authority, or, when no slave user exists, the control authority is automatically allocated to the logged-in user, and the logged-in user is determined as the current main user.
[0086] After the original user logs out, it can be detected whether there is another user logging in.
[0087] If after the original main user logs out, there is currently a slave user, and the slave user needs to be assigned control authority, the logged-in user will not automatically obtain control authority, but will need to apply for control authority. Receive applications for authority control from slave users and logged-in users. Each application is accompanied by a timestamp to record the exact time it was initiated. The target service determines which user applied for control authority first based on the time sequence of application for control authority, and identifies it as the current main user. For example, there are currently slave user a, slave user b, and logged-in user c, and all three users need control authority. All three users apply for control authority. According to the time of application, the target user is determined, and control authority is assigned to the target user. The target user can be any one of the three users.
[0088] If the logged-in user initiates a permission control request earlier than other subordinate users, the control permission is assigned to the logged-in user and the logged-in user is designated as the master user. For example, if there are subordinate users A, B, and C, and all three require control permission and apply for it, if user C applies first, user C is designated as the target user and the control permission is assigned to each user.
[0089] If there is no slave user after the original master user logs out, then if there is a logged-in user, the control authority is directly assigned to the logged-in user, and the logged-in user is determined as the current master user.
[0090] If there are currently slave users after the original master user logs out, but none of them require control permissions, that is, none of them have applied for control permissions, then if there is a logged-in user, control permissions will be directly assigned to the logged-in user and the logged-in user will be determined as the current master user. For example, if there are currently slave users A, B, and C, and none of them require control permissions, C will be automatically determined as the target user and control permissions will be assigned to each of them.
[0091] The target service can send notifications to all relevant users, including those who have successfully obtained permissions and those who have not, through interface notifications, push messages, or emails. The target service status is updated, recording the current primary user information and any related permission changes.
[0092] By adopting the embodiments of the present disclosure, conflicts and waiting times between users are reduced through a clear and automated permission allocation mechanism, thereby improving overall user satisfaction with the target service. Timestamp-based permission allocation ensures that all users have equal opportunities to obtain control permissions, avoiding human intervention and bias. In the absence of a user or when a user has not applied for control permissions, control permissions are automatically assigned to the logged-in user, thereby improving efficiency. The automated processing flow reduces the need for manual intervention and improves the efficiency and response speed of the target service in handling multi-user applications.
[0093] Among them, in an optional embodiment, when the slave user does not apply for control authority after receiving the release reminder, and there is no logged-in user logging into the target service, or when there is no slave user and no logged-in user logging into the target service, the control authority is vacant, and there is no user with the identity of the main user in the current target service.
[0094] Control permissions may be vacant, which means that the current target service may not have a primary user.
[0095] When the master user logs out, if there are multiple slave users, the target service sets a reasonable waiting time window to monitor whether the slave users respond to the release reminder and submit a control permission application. During the waiting time, the target service continuously checks whether any slave users have submitted applications. If no slave users have applied for control permissions and no user is logged in, the control permissions are vacant and there is currently no master user.
[0096] The target service can also confirm whether there are any slave users. When the master user logs out, if the current target service has no slave users and no logged-in users, the control permission will also be vacant, and there is currently no master user or slave user.
[0097] The target service updates its internal status, marking that there is no primary user in the target service and treating the control permission as unassigned. The target service can send a notification to the administrator or specific users to inform them that the control permission is currently vacant.
[0098] The disclosed embodiments allow control permissions to remain vacant under specific conditions, increasing the adaptability of the target service to different usage scenarios. Through a clear process for releasing and vacating permissions, potential conflicts and errors caused by unclear permission status are reduced. When no user requires control permissions, permissions remain vacant, reducing the risk of unauthorized access and improving the security of the target service.
[0099] Figure 4 This is a flowchart of a process flow for releasing control authority shown in an embodiment of the present disclosure. Figure 4 As shown: the master user logs out; the master user's control authority is released; a reminder is sent to all slave users; it is determined whether there is an online user applying for control authority or a new user logged in; if the judgment is yes, the slave user who applied for control authority or the new user logged in becomes the master user; if the judgment is no, the control authority is vacant.
[0100] In an optional embodiment, the target service can integrate machine learning algorithms to analyze user behavior and automatically adjust their permission levels based on their operational habits and historical security performance. For example, if a user frequently performs high-risk operations and rarely makes mistakes, the target service can propose increasing their permission level. The target service can also establish an emergency access protocol. When the target service detects a critical operation or security risk, it automatically transfers control permissions from the primary user and assigns them to a pre-defined emergency contact or administrator.
[0101] Figure 5 This is a schematic diagram of an authority control system shown in an embodiment of the present disclosure. Figure 5 As shown: the authority control system includes:
[0102] A target processor, a target controller and a plurality of user clients; the target controller includes a network module and a target service;
[0103] The target processor is connected to the target controller via a target bus; the user client is connected via the network module;
[0104] The target service is configured to implement functions related to access control of the target processor; and execute the steps of the permission control method;
[0105] The network module is configured to implement data communication between the plurality of user clients and the target controller; and the user client is configured to send a user request.
[0106] The target processor can be a CPU, the target controller can be a BMC, the target service can be a KVM server, and the target bus can be a USB bus. A user sends a connection establishment request to the network module on the BMC through a client. The client communicates with the BMC, enabling the user to log in to the KVM server through the client. The KVM server assigns corresponding permissions to the newly logged-in user based on the identity of the currently logged-in user. The newly logged-in user performs an operation on the client, and the KVM server determines whether the operation is allowed. It then accesses the CPU through the USB bus to obtain the corresponding service.
[0107] Figure 6 This is a block diagram of a permission control device shown in an embodiment of the present disclosure. Figure 6 As shown: the device includes:
[0108] A response module 610 is configured to determine whether a primary user exists for the target service in response to a connection establishment request sent by a logged-in user;
[0109] A first determining module 620 is configured to assign control authority to the logged-in user and determine the logged-in user as the primary user when there is no primary user in the target service;
[0110] The second determining module 630 is configured to allocate viewing rights to the logged-in user and determine the logged-in user as a slave user if there is a master user in the target service.
[0111] Optionally, the device further includes:
[0112] An application module, configured for one or more slave users to apply for control authority from the master user;
[0113] The operation module is used to determine the current primary user based on the operation response of the primary user, where the operation response includes: agreeing to the application operation, disagreeing to the application operation, and not performing the operation within a preset time. Optionally, the operation module is specifically used to perform:
[0114] When the master user performs the consent application operation, releasing the control authority of the master user, allocating the control authority to a target slave user designated by the master user, and determining the target slave user as the current master user;
[0115] In a case where the primary user performs the operation of not agreeing to the application, determining the primary user as the current primary user;
[0116] If the main user does not perform any operation within the preset time, the control authority of the main user is automatically released, and according to the time when the application for control authority is initiated, the target slave user who obtains the control authority is confirmed from the one or more slave users, and the target slave user is determined as the current main user.
[0117] Optionally, the device further includes:
[0118] A release module, configured to release the control authority of the primary user when the primary user logs out of the target service;
[0119] The reminder module is used to send a release reminder to the slave user.
[0120] Optionally, the device further includes:
[0121] a third determining module configured to, when multiple slave users apply for control authority, identify a target slave user who obtains the control authority from the multiple slave users according to the time of initiating the application, and determine the target slave user as the current master user;
[0122] The fourth determining module is configured to automatically assign the control authority to the slave user and determine the slave user as the current master user when there is only one slave user in the target service or only one slave user applies for the control authority.
[0123] Optionally, when a logged-in user logs into the target service, the apparatus further includes:
[0124] a fifth determining module, configured to, when one or more of the slave users and the login user both apply for control authority, determine, based on the time of initiation of the application, a target user who is to obtain the control authority from among the one or more slave users and the login user, and determine the target user as the current primary user;
[0125] The second determining module is specifically configured to execute:
[0126] If the time when the logged-in user applies for the control authority is earlier than the time when other slave users apply for the control authority, the control authority is allocated to the logged-in user to obtain the control authority, and the logged-in user is determined as the current primary user; or
[0127] In the case that one or more of the slave users do not apply for the control authority, or in the case that the slave user does not exist, the control authority is automatically assigned to the logged-in user, and the logged-in user is determined as the current master user.
[0128] Optionally, the device further includes:
[0129] A control module is used to: when the slave user does not apply for control authority after receiving the release reminder, and there is no logged-in user logging into the target service, or when there is no slave user and no logged-in user logging into the target service, the control authority is vacant, and there is no user who is the main user in the current target service.
[0130] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the method embodiment.
[0131] The present disclosure also provides an electronic device, Figure 7 , Figure 7 FIG is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Figure 7 As shown, the electronic device 700 includes: a memory 710 and a processor 720. The memory 710 and the processor 720 are connected via a bus communication. A computer program is stored in the memory 710. The computer program can be run on the processor 720 to implement the steps in the permission control method disclosed in the embodiment of the present disclosure.
[0132] The embodiments of the present disclosure further provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the permission control method disclosed in the embodiments of the present disclosure are implemented.
[0133] The embodiments of the present disclosure further provide a computer program product, including a computer program. When the computer program is executed by a processor, the computer program implements the steps in the permission control method disclosed in the embodiments of the present disclosure.
[0134] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0135] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.
[0137] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1The steps of the functions specified in a box or multiple boxes. Although some embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present disclosure. The above is a detailed introduction to a permission control method, system, device and electronic device provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
Claims
1. A permission control method, characterized in that: The method is used to implement a one-master-multiple-slave management strategy for the target service, allowing only one user to have full control permissions, including: In response to a connection establishment request sent by a logged-in user, determining whether a primary user exists for the target service; In the case that there is no primary user in the target service, the control authority is allocated to the logged-in user, and the logged-in user is determined as the primary user; If there is a master user in the target service, the viewing authority is assigned to the logged-in user and the logged-in user is determined as a slave user. When the primary user logs out of the target service, releasing the control authority of the primary user; and sending a release reminder to the slave user; In the case where multiple slave users apply for control authority, identifying a target slave user who obtains the control authority from the multiple slave users according to the time of initiating the application, and determining the target slave user as the current master user; In the case that there is only one slave user in the target service, or only one slave user applies for control authority, the control authority is automatically assigned to the slave user, and the slave user is determined as the current master user.
2. The method according to claim 1, characterized in that Also includes: One or more of the slave users apply for control authority from the master user; The current primary user is determined according to the operation response of the primary user, where the operation response includes: agreeing to the application operation, disagreeing to the application operation, and not performing the operation within a preset time.
3. The method according to claim 2, characterized in that Determining the current primary user based on the primary user's operational response includes: When the master user performs the consent application operation, releasing the control authority of the master user, allocating the control authority to a target slave user designated by the master user, and determining the target slave user as the current master user; In a case where the primary user performs the operation of not agreeing to the application, determining the primary user as the current primary user; If the main user does not perform any operation within the preset time, the control authority of the main user is automatically released, and according to the time when the application for control authority is initiated, the target slave user who obtains the control authority is confirmed from the one or more slave users, and the target slave user is determined as the current main user.
4. The method according to claim 1, wherein In the case where a logged-in user logs in to the target service, the method further includes: In the case where one or more of the slave users and the logged-in user both apply for control authority, identifying a target user who is to obtain the control authority from among the one or more slave users and the logged-in user according to the time of initiation of the application, and determining the target user as the current primary user; When there is no primary user in the target service, allocating the control authority to the logged-in user and determining the logged-in user as the primary user includes: If the time when the logged-in user applies for the control authority is earlier than the time when other slave users apply for the control authority, the control authority is allocated to the logged-in user to obtain the control authority, and the logged-in user is determined as the current primary user; or In the case that one or more of the slave users do not apply for the control authority, or in the case that the slave user does not exist, the control authority is automatically assigned to the logged-in user, and the logged-in user is determined as the current master user.
5. The method according to claim 1, wherein Also includes: In the case that the slave user does not apply for control authority after receiving the release reminder, and there is no logged-in user logging into the target service, or in the case that there is no slave user and no logged-in user logging into the target service, the control authority is vacant, and there is no user who is the master user in the current target service.
6. A permission control system, characterized in that: include: A target processor, a target controller and a plurality of user clients; the target controller includes a network module and a target service; The target processor is connected to the target controller via a target bus; the user client is connected via the network module; The target service is configured to implement functions related to access control of the target processor and execute the permission control method according to any one of claims 1 to 5; The network module is configured to implement data communication between the plurality of user clients and the target controller; The user client is configured to send a user request.
7. A permission control device, characterized in that: include: A response module, configured to respond to a connection establishment request sent by a logged-in user and determine whether a primary user exists in the target service; A first determining module is configured to allocate the control authority to the logged-in user and determine the logged-in user as the primary user when there is no primary user in the target service; a second determining module, configured to, if there is a primary user in the target service, assign viewing rights to the logged-in user and determine the logged-in user as a secondary user; When the primary user logs out of the target service, releasing the control authority of the primary user; and sending a release reminder to the slave user; In the case where multiple slave users apply for control authority, identifying a target slave user who obtains the control authority from the multiple slave users according to the time of initiating the application, and determining the target slave user as the current master user; In the case that there is only one slave user in the target service, or only one slave user applies for control authority, the control authority is automatically assigned to the slave user, and the slave user is determined as the current master user.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the permission control method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Article anti-lost control method and anti-lost device based on cloud technology
CN104219332A
Keyboard, video and mouse right control method and apparatus
CN105630186A