Resource control method and device, electronic equipment and storage medium

By obtaining the resource occupation data and session status of domain users, the resources of the graphics fortress are accurately controlled, and the system instability caused by excessive resource occupation of the graphics fortress is solved, and efficient and automatic resource management is achieved.

CN119520043AActive Publication Date: 2025-02-25CHINA MOBILE GROUP ZHEJIANG +3
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411551241.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

When the graphics bastion handles a large number of user connections, hardware resources are occupied a lot, affecting the stability and performance of the system, and it is difficult for the existing technology to achieve refined resource management.

Method used

By obtaining the resource occupancy data and session status of the domain user, controlling or lifting the control of their resource applications from the granularity of the domain user, and using the preset resource occupancy threshold and session status for automatic and accurate resource management.

Benefits of technology

Automatic, accurate and efficient resource management of graphics fortresses is realized, system instability caused by excessive resource occupation is avoided, and system performance and user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520043A_ABST
    Figure CN119520043A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource management and control method and device, electronic equipment, a storage medium and a computer program product, and relates to the technical field of computers. Comprising the following steps: acquiring resource occupation data corresponding to a domain user and a session state of at least one session; and controlling or releasing the resource application of the domain user according to the resource occupation data, a preset resource occupation threshold value and the session state of the at least one session. By adopting the technical scheme, the resource occupation data and the session state corresponding to the domain user are obtained, and the resource application of the domain user is controlled or released from the granularity of the domain user, so that the automatic, accurate and efficient resource control of the graphic fortress is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device, storage medium and computer program product for resource management. Background Art

[0002] The 4A platform is a common unified security management platform solution for data centers. The platform implements centralized and unified management of IT resources including the data center's host, database, network equipment, security equipment and other infrastructure, and implements the so-called 4A, including account management (Account), authentication management (Authentication), authorization management (Authorization) and security audit (Audit). A common 4A architecture usually includes a front-end WEB portal, a graphic fortress, a protocol fortress, a target device group, etc.

[0003] As a security platform, the core function of the 4A platform is to prohibit terminal users from directly accessing the target device and ensure that any access is logged and traced for auditing. Among them, the graphic fortress records the user's operation behavior as a screen recording video by recording the user operation interface, while the protocol fortress analyzes the user's operation behavior through the protocol and records key log information including the user's specific operation content, operation object, and operation time.

[0004] During operation, Graphics Fortress responds to and records a large number of remote client accesses as a server. When there are a large number of user accesses, especially when users open a large number of tools unreasonably, Graphics Fortress's hardware resources will be occupied in large quantities, affecting the stability and performance of the system.

[0005] How to effectively manage and control the resources of the graphic fortress has become a technical problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of the embodiments of the present disclosure is to provide a method, device, electronic device, storage medium and computer program product for resource management.

[0007] To solve the above technical problems, the embodiments of the present disclosure are implemented through the following aspects.

[0008] According to a first aspect of an embodiment of the present disclosure, a method for resource control is provided, the method comprising: obtaining resource occupancy data corresponding to a domain user and a session status of at least one session; and controlling or releasing the control of the resource application of the domain user according to the resource occupancy data, a preset resource occupancy threshold, and the session status of the at least one session.

[0009] According to a second aspect of an embodiment of the present disclosure, a device for resource management and control is provided, the device comprising: an acquisition module, used to obtain resource occupancy data corresponding to a domain user and a session status of at least one session; a management and control module, used to manage or release the resource application of the domain user according to the resource occupancy data, a preset resource occupancy threshold and the session status of the at least one session.

[0010] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is used to execute the steps of the resource management method described in the first aspect above.

[0011] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the steps of the resource management method described in the first aspect.

[0012] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the resource management method described in the first aspect.

[0013] One of the above technical solutions has the following advantages or beneficial effects: by obtaining the resource occupancy data and session status corresponding to the domain user, the resource application of the domain user is controlled or released from the granularity of the domain user, thereby realizing automatic, accurate and efficient resource control of the graphic fortress.

[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

[0015] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present disclosure 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 recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0017] Figure 1 A schematic diagram of an application scenario architecture of resource management and control provided by an embodiment of the present disclosure is shown; Figure 2 A schematic diagram showing a flow chart of a method for resource management and control provided by an embodiment of the present disclosure; FIG. 3 (a) shows one of schematic diagrams of resource occupation data corresponding to domain users provided by an embodiment of the present disclosure; FIG3 (b) shows a second schematic diagram of resource occupation data corresponding to domain users provided by an embodiment of the present disclosure; Figure 4 Another schematic diagram showing a method for resource management and control provided by an embodiment of the present disclosure; Figure 5 Another schematic diagram showing a method for resource management and control provided by an embodiment of the present disclosure; Figure 6 Another schematic diagram showing a method for resource management and control provided by an embodiment of the present disclosure; Figure 7 A block diagram of a resource management device provided in an embodiment of the present application is shown; Figure 8 A schematic diagram of the hardware structure of an electronic device for executing the resource management method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0019] The resource control method in the related art is usually based on the total resource occupancy data of the graphic fortress. When the total resource occupancy data is greater than the first preset threshold (i.e., insufficient resources), new graphic fortress resources can be added through the expansion of the graphic fortress. When it is impossible to add new graphic fortress resources through expansion, some applications of some users are forced to be shut down to recycle resources to reduce resource occupancy data. When the total resource occupancy data is less than the second preset threshold (i.e., sufficient resources), manual adjustments can be made to recycle the graphic fortress.

[0020] The resource control method in the related art has the following technical problems: Problem 1: Resource control is performed based on the granularity of the graphic fortress. The granularity of resource control is coarse and it is impossible to identify whether the user's resource demand is reasonable. The relevant technology only focuses on whether the overall resource usage of the graphic fortress reaches the critical value, but cannot determine whether there are users who have established a large number of idle sessions.

[0021] Problem 2: Resource control based on the granularity of the graphic fortress cannot be refined, which has a significant impact on the business.

[0022] In order to solve the above technical problems, the present application provides a method for resource control. By obtaining the resource occupancy data and session status corresponding to the domain user, the resource application of the domain user is controlled or released from the granularity of the domain user, thereby realizing automatic, accurate and efficient resource control of the graphic fortress.

[0023] The following is an introduction to the professional terms involved in this application.

[0024] Domain user: The graphic fortress in this application is a Windows-based graphic fortress. All graphic fortresses join the Windows domain, become part of the domain, and are managed by the domain controller. Each user creates a domain user account, connects to the graphic fortress through relevant protocols, such as RDP (Remote Desktop Protocol), and logs in to the domain through the domain user account.

[0025] Session: Also called a connection, a user establishes a C / S session with the Graphics Fortress through the client and completes corresponding functions based on the session. Each session can correspond to a process, and the resource usage data of the session, such as CPU usage and memory usage, can be obtained at the session granularity through the process ID.

[0026] Figure 1 The following is a schematic diagram of an application scenario architecture of resource management provided by an embodiment of the present disclosure. Figure 1 As shown, a domain user can connect to the graphic fortress 2 through the client 1, and the graphic fortress 2 interacts with the domain control server 3 to authenticate the domain user. At the same time, the domain control policy corresponding to the domain user can be configured and\or issued on the domain control server 3, so as to implement control or release control on the resource application of the domain user based on the domain control policy. The graphic fortress 2 can also terminate one or more sessions of the domain user under the control of the domain control server 3 to release the resources of the session. The resource control server 4 is connected to the domain control server 3, the graphic fortress 2 and the protocol fortress 5 respectively, and is used to obtain the resource occupancy data corresponding to the domain user on the graphic fortress 2 through the graphic fortress 2, obtain the session status of at least one session corresponding to the domain user through the protocol fortress 5, and implement control or release control on the resource application of the domain user through the domain control server 3. After passing through the graphic fortress 2 and the protocol fortress 5, the domain user can access the target resource 6, such as host resources, database resources, network device resources or security device resources.

[0027] It should be noted that although the present application is described using a bastion host as an example, resource management methods for similar scenarios with the following characteristics are all within the protection scope of the present application.

[0028] Feature 1: Users (domain users in this application, or users’ corresponding clients) and servers (graphic fortresses in this application) are connected through the C / S architecture to request and share server resources.

[0029] Feature 2: The same user can establish sessions with multiple servers, the same server can also establish sessions with multiple users, and a user can establish one or more sessions on a server.

[0030] Figure 2 A flow chart of a resource control method provided by an embodiment of the present disclosure is shown. The method can be executed by a resource control server. The resource control server can be an independent server or server cluster other than a graphic fortress, or can be set on a server corresponding to a 4A platform, such as Figure 2 As shown, the method may include the following steps: In step S101, resource occupancy data corresponding to a domain user and a session state of at least one session are obtained.

[0031] In some embodiments, the resource occupancy data corresponding to the domain users may include user-level statistics of the resource occupancy data corresponding to each domain user, and the resource occupancy data corresponding to the domain users may also include resource occupancy data corresponding to at least one session corresponding to each domain user. The resource occupancy data may also include relevant information of the resource occupancy data, such as information of the domain user, session information (such as process identifier, process name), and may also include graphic fortress information and acquisition time (collection time).

[0032] In some possible implementations, the resource usage data corresponding to the domain user can be obtained through an acquisition script deployed in the graphic bastion. The acquisition script can be developed based on Windows PowerShell's Get-Process (get running processes on the local computer) to monitor the performance of the graphic bastion. The above resource usage data can be regularly obtained based on a preset sampling period. Preferably, the sampling period can be set to 5 minutes, and can also be flexibly adjusted in response to user adjustment operations.

[0033] The resource occupancy data may be dimensioned absolute resource occupancy data, such as memory occupancy of 1M, or dimensionless relative resource occupancy data, such as CPU occupancy of 1%. Of course, the resource occupancy data may also be a combination of the two, which is not limited in this application.

[0034] FIG3 (a) and FIG3 (b) respectively show a schematic diagram of resource occupancy data corresponding to a domain user provided by an embodiment of the present disclosure. As shown in FIG3 (a), the resource occupancy data may include resource occupancy data corresponding to at least one session corresponding to each domain user. As shown in FIG3 (b), the resource occupancy data corresponding to the domain user may include user-level statistical values ​​of the resource occupancy data corresponding to each domain user. In some possible implementations, the user-level statistical values ​​of the resource occupancy data corresponding to each domain user shown in FIG3 (b) may be obtained by accumulating and summarizing the resource occupancy data corresponding to at least one session corresponding to each domain user shown in FIG3 (a).

[0035] The session state of a session may include the business state of the session, which business state includes an active state or an inactive state, which indicates whether the current session has interacted with business data within a preset connection idle time. If the business data of the current session has interacted within the preset connection idle time, the business state of the session is an active state; if the business data of the current session has interacted within the preset connection idle time, the business state of the session is an inactive state.

[0036] After obtaining the business status of at least one session corresponding to each domain user, the proportion of active sessions can also be counted according to the business status of at least one session, that is, the proportion of sessions with inactive business status to all sessions of each domain user on a certain graphic fortress, and the active session proportion is used as the session status of the domain user.

[0037] In some possible implementations, the network connection information corresponding to the PID process identifier can be obtained by executing "netstat -no | findPID" (where PID is the process identifier) ​​in the graphical fortress. The network connection information may specifically include the source IP address, the destination IP address, the source port number, and the destination port number. In the case of failure to obtain the network connection information (i.e., the network connection information is not obtained), it can be determined that the service status of the session is inactive. After successfully obtaining the network connection information, it is also possible to further obtain whether the session has interacted with service data within the preset connection idle time. If the service data has not been interacted within the connection idle time, it can also be determined that the service status of the session is inactive. Otherwise, it can be determined that the service status of the session is active. In a specific implementation, the 4A platform can obtain whether the session has interacted with service data within the preset connection idle time through the protocol fortress. Preferably, the connection idle time can be 10 minutes, and can also be flexibly adjusted in response to the user's adjustment operation.

[0038] In step S102, resource applications of domain users are controlled or released according to resource occupation data, a preset resource occupation threshold, and a session state of at least one session.

[0039] In some embodiments, resource applications of domain users whose resource occupancy data is greater than or equal to a preset resource occupancy threshold may be controlled, and resource applications of domain users whose resource occupancy data is greater than or equal to a preset resource occupancy threshold and whose active session ratio is less than a preset active session ratio threshold may be controlled. Resource applications of domain users whose resource occupancy data is less than a preset resource occupancy threshold and who are in a resource application control state may be released from control.

[0040] In some possible implementations, the resource application of the domain user may be controlled or released through interaction with the domain control server. Specifically, the following steps may be included.

[0041] Step 11: Pre-set the corresponding domain control policy on the domain control server to set the applications that the domain users are not allowed to open.

[0042] Step 12: The domain control server may bind the domain user to the domain control policy in response to the message from the resource management and control server, thereby implementing management and control over the resource application of the domain user.

[0043] For example, the domain control server can bind the domain user to the domain control policy through the following command, "Set-GPPermissions -Guid '6a24f435-4148-4364-b139-9a148710cf0b' -TargetName 'd16\zhangsan' -TargetType User -PermissionLevel 'GpoApply'", which binds the domain user "zhangsan" to the domain control policy "GpoApply", which is effective within the scope of the dc16 domain. After binding the domain user to the domain control policy, it can be activated and effective through the "Invoke-GPUpdate" command. Thus, the domain user is denied to establish a new session, and the existing session cannot open a new application.

[0044] Step 13: The domain control server may unbind the domain user from the domain control policy in response to the message from the resource control server, thereby releasing the control over the domain user's resource application.

[0045] For example, the domain control server can unbind the domain user from the domain control policy through the following command: "Set-GPPermissions -Guid '6a24f435-4148-4364-b139-9a148710cf0b' -TargetName 'd16\zhangsan' -TargetType User -PermissionLevel 'None'". After unbinding the domain user from the domain control policy, it can be activated and take effect through the "Invoke-GPUpdate" command. This releases the control over the establishment of new sessions for domain users, and existing sessions can also open new applications normally.

[0046] By adopting the above technical solution, by obtaining the resource occupancy data and session status corresponding to the domain user, the resource application of the domain user is controlled or released from the granularity of the domain user, thereby realizing automatic, accurate and efficient resource control of the graphic fortress.

[0047] Considering that the resource occupancy data corresponding to the domain user and the session status of at least one session obtained in different sampling periods are constantly changing, in some embodiments, multiple resource occupancy thresholds can be set to avoid frequent fluctuations in the control status of the domain user between implementing control and releasing control.

[0048] In some embodiments, the resource occupancy threshold includes a first resource occupancy threshold, a second resource occupancy threshold and a third resource occupancy threshold, wherein the second resource occupancy threshold is greater than the first resource occupancy threshold, and the third resource occupancy threshold is greater than the second resource occupancy threshold.

[0049] Taking the absolute resource occupancy data of memory occupancy as an example, the second resource occupancy threshold can be set to 1G memory occupancy, the first resource occupancy threshold can be set to 800M, and the third resource occupancy threshold can be set to 1.2G. That is, the second resource occupancy threshold is used as the resource occupancy standard threshold, and the first resource occupancy threshold and the third resource occupancy threshold are used as the resource occupancy lower limit threshold and the resource occupancy upper limit threshold respectively. Through the resource occupancy standard threshold, the resource occupancy lower limit threshold and the resource occupancy upper limit threshold, the control status of the domain users can be prevented from frequently fluctuating between implementing control and releasing control.

[0050] Figure 4 Another flow chart of the resource management method provided by the embodiment of the present disclosure is shown as follows: Figure 4 As shown, step S102 may specifically include the following steps.

[0051] In step 100, it is compared whether the resource occupancy data is greater than or equal to a second resource occupancy threshold.

[0052] In step 101, when the resource occupancy data is less than the second resource occupancy threshold, it is compared whether the resource occupancy data is less than the first resource occupancy threshold.

[0053] In step 102, when the resource occupancy data is less than a first resource occupancy threshold, the resource application of the domain user is released from control.

[0054] In some embodiments, when the resource occupancy data is less than the first resource occupancy threshold and the control state of the domain user's resource application is to implement control, the resource application of the domain user can be released from control. When the resource occupancy data is less than the first resource occupancy threshold and the control state of the domain user is not to implement control, the current sampling period can be ignored, and the counter of the number of consecutive periods of the sampling period that satisfies whether the resource occupancy data is greater than or equal to the second resource occupancy threshold can be cleared.

[0055] In step 103, when the resource occupancy data is greater than or equal to the second resource occupancy threshold, it is determined whether the number of consecutive sampling periods that meet the condition is greater than a preset number threshold.

[0056] Preferably, the preset quantity threshold may be 3, or may be flexibly set as required.

[0057] In step 104, when the resource occupancy data is greater than or equal to the second resource occupancy threshold, and the number of consecutive periods in which the resource occupancy data is greater than or equal to the second resource occupancy threshold is greater than a preset number threshold, the resource application of the domain user can be managed and controlled based on the resource occupancy data, the third resource occupancy threshold and the session status of at least one session.

[0058] Specifically, when implementing management and control on the resource application of domain users based on resource occupancy data, a third resource occupancy threshold and the session status of at least one session, it is possible to first determine whether the active session ratio is less than a preset active session ratio threshold. If the active session ratio is less than the preset active session ratio threshold, the resource application of the domain users is managed and controlled.

[0059] Preferably, the active session ratio threshold may be 90%, or may be flexibly set as required.

[0060] If the resource occupancy data is greater than or equal to the second resource occupancy threshold, and the number of consecutive periods in which the resource occupancy data is greater than or equal to the second resource occupancy threshold is less than or equal to the preset number threshold, the judgment of the next sampling period can be continued.

[0061] In step 105, when the active session ratio is greater than or equal to the active session ratio threshold, it is further determined whether the resource occupation data is greater than a third resource occupation threshold.

[0062] In step 106, when the active session ratio is greater than or equal to the preset active session ratio threshold and the resource occupancy data is greater than the third resource occupancy threshold, resource applications of domain users are controlled.

[0063] When the active session ratio is greater than or equal to a preset active session ratio threshold, and the resource occupancy data is less than or equal to a third resource occupancy threshold, the sampling period may be ignored.

[0064] By adopting the above technical solution, it is possible to implement control or release control on the resource application of domain users at the granularity of domain users. At the same time, by setting multiple resource occupancy thresholds, it is possible to avoid frequent fluctuations in the control status of the domain user between implementing control and releasing control, thereby further improving the stability of resource control.

[0065] Figure 5 Another flow chart of the resource management method provided by the embodiment of the present disclosure is shown as follows: Figure 5 As shown, the method may further include the following steps.

[0066] In step S103, the resource occupancy data is saved as resource occupancy baseline data.

[0067] In some embodiments, the resource occupancy data collected by all graphic fortresses can be saved as resource occupancy baseline data, so that the administrator can set or modify preset parameters based on the resource occupancy baseline data corresponding to all graphic fortresses. For example, the administrator can set or modify one or more of the resource occupancy threshold, active session ratio threshold, connection idle time, and sampling period based on the resource occupancy baseline data.

[0068] By adopting the above technical solution, by saving the resource occupancy data as resource occupancy baseline data, a basis is provided for the administrator to set or modify the preset parameters, thereby further improving the accuracy of resource management and control.

[0069] In some embodiments, the domain users may be users of the same or different types, and different types of domain users may correspond to different resource occupation thresholds.

[0070] For example, based on different user roles, domain users can be divided into lightweight users (such as host administrators, network administrators), mixed users (ordinary operation users), and heavy users (developers, database administrators). The actual hardware resources occupied by different users in the graphics fortress are significantly different.

[0071] Taking the Windows-based graphic fortress as an example, since the CPU usage of each application client is very small (generally less than 1%), the main hardware resource occupied by domain users is memory. You can set different resource usage thresholds for different types of domain users through the following table 1.

[0072] Table 1

[0073] By adopting the above technical solution, by setting different resource occupation thresholds for different types of domain users, it is possible to implement more accurate control or release of control over domain users, and further improve the accuracy of resource control.

[0074] It should be noted that when implementing control or releasing control on the resource application of domain users based on resource occupancy data, a preset resource occupancy threshold and the session status of at least one session, judgment can be made based on one or more resource occupancy data and the corresponding resource occupancy threshold.

[0075] In some embodiments, when making a judgment based on multiple resource occupancy data and the corresponding resource occupancy thresholds, the multiple resource occupancy data can be converted into the representation form of the same resource occupancy data, and then the weighted resource occupancy data of the multiple resource occupancy data can be calculated by using a preset weight, and compared with the comprehensive resource occupancy threshold for judgment. For example, if the multiple resource occupancy data are respectively CPU occupancy rate (dimensionless relative value) and memory occupancy absolute value (dimensioned absolute value), the ratio of the actual memory occupancy absolute value to the second resource occupancy threshold corresponding to the memory occupancy absolute value can be used as the memory occupancy rate, and then the weighted resource occupancy data can be calculated based on the weighted average of the CPU occupancy rate and the memory occupancy rate, and compared with the corresponding weighted resource occupancy threshold, and the resource application of the domain user can be controlled or released.

[0076] In the related art, when resources are insufficient and it is impossible to expand the capacity of the graphic fortress urgently, the operation and maintenance personnel are usually required to manually collect the resource occupancy information of the graphic fortress, determine the target graphic fortress to be processed and the target domain user to release the resources, and reclaim resources by terminating one or more sessions of the target domain user, or even for the graphic fortress with serious resource shortage, forcibly restart to release the resource occupancy. The above manual resource recovery method is blind and inefficient, and the measures of terminating sessions or forcibly restarting are relatively arbitrary, which seriously affects the user's perception.

[0077] In order to solve the above technical problems, Figure 6 Another flow chart of the resource management method provided by the embodiment of the present disclosure is shown as follows: Figure 6 As shown, the method may further include the following steps.

[0078] In step S104, when the total resource occupation data of the multiple domain users is greater than a preset fourth resource occupation threshold, a target domain user for which resources are to be released is determined from the multiple domain users.

[0079] It is understandable that, when the total resource occupancy data of multiple domain users is greater than the preset fourth resource occupancy threshold, if the graphic fortress can be expanded, the graphic fortress can be expanded first, and the overall resource occupancy can be reduced by the expanded graphic fortress. In the case where the graphic fortress cannot be expanded, the method shown in this embodiment is used to recycle resources.

[0080] In some embodiments, the target domain user may be any one of the following: Domain users with the highest resource usage ratio; The domain user with the smallest active session ratio among multiple domain users with the same and highest resource usage ratio.

[0081] In some embodiments, the user-level statistical value of the resource occupation data corresponding to each domain user shown in FIG. 3( b ) may be used as the total resource occupation data of the domain users.

[0082] When the total resource occupancy data is greater than the preset fourth resource occupancy threshold, the domain user with the highest resource occupancy ratio can be selected as the target domain user. When there are multiple domain users with the highest resource occupancy ratio, the domain user with the smallest active session ratio among the multiple domain users with the same and highest resource occupancy ratio can be selected as the target domain user.

[0083] In some other embodiments, the target domain users may also be multiple domain users with the highest resource occupancy ratio.

[0084] In step S105, a target session whose resources are to be released is determined from multiple sessions corresponding to the target domain user, and the target session is terminated to release the resources of the target session.

[0085] In some embodiments, the target session is one or more sessions with the highest resource occupancy ratio among the sessions whose service status is in an inactive state.

[0086] In some possible implementations, the target session may be terminated by the domain control server to release the resources of the target session. Specifically, the domain control server may terminate the target session by issuing the following command.

[0087] "Invoke-Command -ComputerName Graphics Bastion Machine Name -ScriptBlock {Stop-Process -Id Target Session's Process ID -Force}".

[0088] By adopting the above technical solution, the target session of the target domain user can be closed in a targeted manner according to the resource occupancy data, the resource occupancy threshold and the session activity with the user, thereby realizing automatic, accurate and efficient resource recovery. At the same time, the closed target session is a session with an inactive business status, which can also reduce or avoid affecting the user experience of the target domain user.

[0089] Figure 7 A block diagram of a resource management device provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the resource control device 200 includes: An acquisition module 210, configured to acquire resource occupancy data corresponding to a domain user and a session state of at least one session; The control module 220 is used to control or release the resource application of the domain user according to the resource occupation data, the preset resource occupation threshold and the session state of at least one session.

[0090] Optionally, the resource occupation threshold includes a first resource occupation threshold, a second resource occupation threshold and a third resource occupation threshold, wherein the second resource occupation threshold is greater than the first resource occupation threshold, and the third resource occupation threshold is greater than the second resource occupation threshold, and the control module 220 is further used to release the control of the resource application of the domain user when the resource occupation data is less than the first resource occupation threshold; or, When the resource occupancy data is greater than or equal to the second resource occupancy threshold, and the number of consecutive periods in which the resource occupancy data is greater than or equal to the second resource occupancy threshold is greater than a preset number threshold, the resource application of the domain user is managed and controlled based on the resource occupancy data, the third resource occupancy threshold and the session status of at least one session.

[0091] Optionally, the session status includes an active session ratio, and the control module 220 is further configured to control resource applications of domain users when the active session ratio is less than a preset active session ratio threshold; or, When the active session ratio is greater than or equal to a preset active session ratio threshold, and the resource occupancy data is greater than the third resource occupancy threshold, resource applications of domain users are controlled.

[0092] Optionally, the management and control module 220 is further configured to save the resource occupancy data as resource occupancy baseline data.

[0093] Optionally, the management and control module 220 is further configured to determine a target domain user to release resources from the multiple domain users when the total resource occupation data of the multiple domain users is greater than a preset fourth resource occupation threshold; A target session for which resources are to be released is determined from multiple sessions corresponding to the target domain user, and the target session is terminated to release the resources of the target session.

[0094] The target session is a session with the highest resource usage ratio among the sessions whose service status is inactive; The target domain user is any of the following: Domain users with the highest resource usage ratio; The domain user with the smallest active session ratio among multiple domain users with the same and highest resource usage ratio.

[0095] The device 200 provided in the embodiment of the present application can execute each method in the foregoing method embodiment and realize the functions and beneficial effects of each method in the foregoing method embodiment, which will not be repeated here.

[0096] Figure 7 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure is shown. Figure 7 As shown, at the hardware level, the electronic device includes at least one processor, and optionally includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0097] The processor, network interface and memory can be interconnected through an internal bus, which can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0098] The memory stores the program. Specifically, the program may include a program code, and the program code includes at least one computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0099] At least one processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a device for locating the target user at the logical level. At least one processor executes the program stored in the memory and specifically performs: the method disclosed in the embodiment shown in the first aspect and realizes the functions and beneficial effects of each method described in the method embodiment above, which will not be repeated here.

[0100] The method disclosed in the embodiment shown in the first aspect of the present disclosure can be applied to at least one processor or implemented by at least one processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in at least one processor. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0101] The electronic device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0102] Of course, in addition to software implementation, the electronic device disclosed in the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0103] The embodiments of the present disclosure also propose a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by at least one processor, they implement the method disclosed in the embodiment shown in the first aspect and realize the functions and beneficial effects of the various methods described in the previous method embodiments, which will not be repeated here.

[0104] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0105] Furthermore, the embodiments of the present disclosure also provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method disclosed in the embodiment shown in the first aspect and realizes the functions and beneficial effects of the various methods described in the previous method embodiments, which will not be repeated here.

[0106] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the various processes of the method disclosed in the embodiment shown in the first aspect and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0107] In short, the above is only a preferred embodiment of the present disclosure and does not limit the protection scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

[0108] The systems, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0109] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

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

[0111] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for resource management and control, characterized in that: The method comprises: Obtain resource usage data corresponding to the domain user and the session status of at least one session; The resource application of the domain user is controlled or released according to the resource occupation data, a preset resource occupation threshold and the session state of the at least one session.

2. The method according to claim 1, characterized in that The resource occupation threshold includes a first resource occupation threshold, a second resource occupation threshold and a third resource occupation threshold, wherein the second resource occupation threshold is greater than the first resource occupation threshold, and the third resource occupation threshold is greater than the second resource occupation threshold; the controlling or releasing the control of the resources occupied by the domain user according to the resource occupation data, the preset resource occupation threshold and the session state of the at least one session includes: When the resource occupancy data is less than the first resource occupancy threshold, releasing the control of the resource application of the domain user; or When the resource occupancy data is greater than or equal to the second resource occupancy threshold, and the number of consecutive periods in which the resource occupancy data is greater than or equal to the second resource occupancy threshold is greater than a preset number threshold, the resource application of the domain user is managed and controlled according to the resource occupancy data, the third resource occupancy threshold and the session status of the at least one session.

3. The method according to claim 2, characterized in that The session state includes an active session ratio, and the controlling the resource application of the domain user according to the resource occupancy data, the third resource occupancy threshold, and the session state of the at least one session includes: When the active session ratio is less than a preset active session ratio threshold, control is implemented on the resource application of the domain user; or, When the active session ratio is greater than or equal to a preset active session ratio threshold, and the resource occupancy data is greater than the third resource occupancy threshold, resource application of the domain user is controlled.

4. The method according to claim 1, characterized in that: The method further comprises: The resource occupancy data is saved as resource occupancy baseline data.

5. The method according to claim 1, characterized in that The domain users may be users of the same or different types, and different types of domain users may correspond to different resource occupation thresholds.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the total resource occupation data of the multiple domain users is greater than a preset fourth resource occupation threshold, determining a target domain user for which resources are to be released from the multiple domain users; A target session whose resources are to be released is determined from a plurality of sessions corresponding to the target domain user, and the target session is terminated to release the resources of the target session.

7. The method according to claim 6, characterized in that The target session is a session with the highest resource occupancy ratio among the sessions whose service status is inactive; the target domain user is any one of the following: Domain users with the highest resource usage ratio; The domain user with the smallest active session ratio among multiple domain users with the same and highest resource usage ratio.

8. A resource management device, characterized in that: The device comprises: An acquisition module, used to acquire resource occupancy data corresponding to a domain user and a session state of at least one session; The control module is used to control or release the resource application of the domain user according to the resource occupation data, a preset resource occupation threshold and the session state of the at least one session.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the resource management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for resource management and control according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to execute the resource management method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Session resource management method and apparatus

    CN106230649A

  • Fault processing method and device for business system

    CN107729205A

  • Method and device for controlling number of online consulting users

    CN110661823A

  • Resource allocation method and computer equipment

    CN112052084A

  • Session desktop management method and device, equipment and computer readable storage medium

    CN116107678A