Resource dynamic configuration method and device, equipment, medium and program product

By acquiring and filtering resource data, dynamically configuring resource usage upper limits and updating them in real time, the problems of low resource allocation efficiency and poor rationality in existing technologies are solved, and more efficient and accurate resource allocation is achieved.

CN120653442APending Publication Date: 2025-09-16PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510779305.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the existing technology, the Kubernetes resource quota method relies heavily on the cognitive ability of developers, resulting in low efficiency and poor rationality of dynamic resource configuration.

Method used

By obtaining resource data for target type resources, users whose resource usage is greater than the current average resource value are screened out, their resource usage upper limit is configured, and the average resource value is updated in each batch; when the average resource value is less than the resource lower limit, the resources of the remaining users are configured based on the resource lower limit and the total remaining collective resources; system events are monitored to update resource configurations in real time.

Benefits of technology

It improves the efficiency and accuracy of dynamic resource configuration, can meet the resource usage needs of more users, avoid meaningless resource configuration, support global updates after changes in resource usage, and improve resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653442A_ABST
    Figure CN120653442A_ABST
Patent Text Reader

Abstract

The invention discloses a resource dynamic configuration method and device, equipment, a medium and a program product, and relates to the technical field of resource configuration. The method comprises the following steps: acquiring resource data of a target type resource; the resource data comprises the total number of collective resources, the total number of users and the resource usage amount corresponding to each user; all users with the resource usage amount larger than the current average resource value are screened out, and the resource usage upper limit value of each user of the batch in the target type resources is configured to be the respective corresponding resource usage amount; wherein the initial average resource value is determined according to the total number of collective resources and the total number of users, and the average resource value is updated after resource configuration of each batch; and when the current average resource value is smaller than a resource lower limit value, performing resource configuration of the target type resource on the remaining users without resource configuration based on the resource lower limit value and the total number of the current remaining collective resources. The efficiency and accuracy of resource dynamic configuration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource configuration, and in particular to a resource dynamic configuration method, device, equipment, medium and program product. Background Art

[0002] With the advent of the Internet of Things era, technologies such as cloud computing and cloud-edge integrated collaborative computing are developing rapidly. In order to more effectively utilize idle resources and meet the computing and storage needs of users with different needs, how to reasonably allocate computing and storage resources is very critical.

[0003] In existing technologies, Kubernetes resource quota methods require participants to estimate and provide the most reasonable resource usage values ​​when planning resource quotas. The configuration of quota limit ranges and other native parameters heavily relies on the cognitive ability of developers, resulting in low efficiency and poor rationality in dynamic resource configuration. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, device, medium, and program product for dynamic resource configuration, which can improve the efficiency and accuracy of dynamic resource configuration. The specific solution is as follows:

[0005] In a first aspect, the present application discloses a method for dynamic resource configuration, comprising:

[0006] Obtain resource data of target type resources; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user;

[0007] Filter out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after each batch of resource allocation;

[0008] When the current average resource value is less than the resource lower limit, resource allocation of the target type of resources is performed on the remaining users who have not been resource allocated based on the resource lower limit and the current total remaining collective resources.

[0009] Optionally, before obtaining the resource data of the target type resource, the method further includes:

[0010] The resource lower limit value corresponding to a single user is configured for different target type resources; the resource lower limit value is the minimum value of the resource quota valid for the user.

[0011] Optionally, the resource dynamic configuration method further includes:

[0012] Monitor the system, and when a target event is detected, reacquire the latest resource data of the target resource type, and update the resource upper limit value of each user under the target resource type according to the latest resource data;

[0013] The target event includes any one of a new user event, a user resource release event, a capacity expansion event, a manual resource upper limit adjustment event, and a user resource usage change event.

[0014] Optionally, the resource dynamic configuration method further includes:

[0015] The total number of collective resources is configured as the resource upper limit of the collective administrator; the collective administrator is used to manage the collective resources.

[0016] Optionally, the resource dynamic configuration method further includes:

[0017] Obtaining a resource limit application sent by a target user; the resource limit application is a request initiated when the target user's resource usage reaches the user's resource usage limit and still cannot meet usage needs;

[0018] Presenting the resource cap application through an interactive interface and receiving an approval result of the collective administrator for the resource cap application;

[0019] If the approval result includes a manually assigned resource upper limit, the manually assigned resource upper limit is used as the resource upper limit of the target user.

[0020] Optionally, filtering out all users whose resource usage is greater than the current average resource value, and configuring the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage, includes:

[0021] Obtaining an initial average resource value according to a ratio of the total amount of collectively available resources to the total number of users, and using the initial average resource value as the current average resource value;

[0022] Screening out users whose resource usage is greater than the initial average resource value, and configuring the resource upper limit of the user as the resource usage of the user;

[0023] Determine a first remaining total amount of collectively available resources based on the total amount of collectively available resources and the amount of configured resources, and determine a first remaining total number of users based on the total number of users and the number of configured users;

[0024] Obtaining a second average resource value according to a ratio of the first remaining total collective available resources to the first total number of remaining users, and using the second average resource value as a current average resource value;

[0025] Filter out the user whose resource usage is greater than the second average resource value from the remaining users, and configure the resource upper limit of the user as the resource usage of the user;

[0026] Repeat the update operation of the remaining collective total available resources, the remaining total number of users and the average resource value, and loop the resource allocation operation until the Nth average resource value is less than the resource lower limit.

[0027] Optionally, the performing resource allocation of the target type resources on the remaining users to which resources have not been allocated based on the resource lower limit and the total number of currently remaining collective resources includes:

[0028] Comparing the resource usage of the remaining users with the resource lower limit;

[0029] If the resource usage of the remaining users is less than the resource lower limit, rounding the ratio of the total remaining collective resources to the resource lower limit to obtain a first target integer;

[0030] Filter out the first target integer number of users from the remaining users, and configure the resource usage upper limit of each user to be the resource lower limit;

[0031] If there are any remaining users whose resource usage is greater than or equal to the resource lower limit, then for the user whose resource usage is greater than the resource lower limit, configure the resource usage upper limit of the user to the corresponding resource usage;

[0032] rounding the ratio of the total remaining collective resources to the resource lower limit to obtain a second target integer;

[0033] The second target integer number of users is selected from the remaining users, and the resource usage upper limit value of each user is configured as the resource lower limit value.

[0034] In a second aspect, the present application discloses a resource dynamic configuration device, comprising:

[0035] A resource data acquisition module is used to acquire resource data of target type resources; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user;

[0036] A first resource configuration module is configured to screen out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after each batch of resource configuration;

[0037] The second resource configuration module is configured to perform resource configuration of the target type for the remaining users who have not been resource configured based on the resource lower limit and the total number of currently remaining collective resources when the current average resource value is less than the resource lower limit.

[0038] In a third aspect, the present application discloses an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] The processor is used to execute the computer program to implement the aforementioned resource dynamic configuration method.

[0041] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned resource dynamic configuration method when executed by a processor.

[0042] In a fifth aspect, the present application discloses a computer program product, including a computer program, wherein the computer program implements the aforementioned resource dynamic configuration method when executed by a processor.

[0043] In the present application, resource data of target type resources is obtained; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user; all users whose resource usage is greater than the current average resource value are screened out, and the resource usage upper limit value of each user in this batch is configured as the resource usage corresponding to each user of the target type resources; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after the resource configuration of each batch; when the current average resource value is less than the resource lower limit value, the resource configuration of the target type resources is performed on the remaining users who have not been resource configured based on the resource lower limit value and the current remaining total number of collective resources. It can be seen that by comparing the resource usage and the average resource value, if the user's resource usage is greater than the current average resource value, the user's resource usage upper limit is configured as the user's resource usage, and the average resource value is updated after the resources are configured, thereby meeting the resource usage needs of more users as much as possible; after the current average resource value is less than the resource lower limit, the target type resources are allocated to the remaining users who have not been resource-allocated according to the resource lower limit and the current total number of remaining collective resources, to avoid the situation where the configured resource amount is less than the resource lower limit, resulting in meaningless resources; by automatically calculating the resource upper limit and performing resource allocation, the efficiency and accuracy of dynamic resource configuration can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0045] Figure 1 A flow chart of a resource dynamic configuration method provided by this application;

[0046] Figure 2 A flow chart of a specific resource dynamic configuration method provided in this application;

[0047] Figure 3 A flowchart of another specific resource dynamic configuration method provided by this application;

[0048] Figure 4 A schematic diagram of the structure of a resource dynamic configuration system provided by this application;

[0049] Figure 5 A schematic diagram of the structure of a resource dynamic configuration device provided by this application;

[0050] Figure 6 This is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0052] Prior art resource quota methods require participants to estimate and provide the most reasonable resource usage values ​​when planning resource quotas. The configuration of quota limits and other native parameters relies heavily on the cognitive ability of developers, resulting in low efficiency and poor rationality in dynamic resource configuration. To overcome these technical issues, this application proposes a dynamic resource configuration method that can improve the efficiency and accuracy of dynamic resource configuration.

[0053] The present application discloses a method for dynamic resource configuration. Figure 1 As shown, the method may include the following steps:

[0054] Step S11: Obtain resource data of target type resources; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user.

[0055] Target type resources can be various types of computing and storage resources, such as virtual machines, containers, processors (CPUs), storage, and other computing and storage resources, and this application does not limit them. Resource data includes the total number of collective resources R, the total number of users U, and the resource usage corresponding to each user. The total number of collective resources refers to the total number of resources, and the total number of users refers to the total number of users sharing resources within the collective. It also includes the resource usage of each user for the target type resources, that is, the amount of resources already used.

[0056] In some embodiments, before obtaining resource data for target resources, the process may further include configuring a corresponding lower resource limit for each user for each target resource type; the lower resource limit being the minimum resource quota value valid for the user. It is understood that when the resource quantity is less than the lower resource limit, the resource quantity is meaningless. For example, when a user exclusively uses a virtual machine, the unit of resource allocated to the user's virtual machine is the number of virtual machines, and the lower limit can be set to 1. The lower limit will affect the exit mechanism for the upper limit calculation.

[0057] Step S12: Filter out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in this batch for the target type of resources to be their corresponding resource usage; wherein, the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after the resource configuration of each batch.

[0058] It's understandable that evenly distributing resources is the fairest approach, but this may not meet the resource usage needs of some users. Therefore, by comparing resource usage with the current average resource value, if a user's resource usage exceeds the current average resource value, the user's resource usage cap is configured to meet the needs of this user. The remaining collective resources are then calculated based on the difference between the total collective resources and all configured resource usage caps. This is combined with the total number of remaining users to update the average resource value, allowing resource allocation to be made after another comparison. If all resource usage is less than the current average resource value, the user's resource cap is set to the current average resource value.

[0059] Specifically, the filtering out of all users whose resource usage is greater than the current average resource value, and configuring the resource usage upper limit of each user in the batch for the target type of resources to be their respective corresponding resource usage, can include the following steps: obtaining an initial average resource value based on the ratio of the collective total available resource amount to the total number of users, and using the initial average resource value as the current average resource value; filtering out users whose resource usage is greater than the initial average resource value, and configuring the resource upper limit of the user as the resource usage of the user; determining a first remaining collective total available resource amount based on the collective total available resource amount and the configured resource amount, and determining a first remaining total number of users based on the total number of users and the configured number of users; obtaining a second average resource value based on the ratio of the first remaining collective total available resource amount to the first remaining total number of users, and using the second average resource value as the current average resource value; filtering out users whose resource usage is greater than the second average resource value from the remaining users, and configuring the resource upper limit of the user as the resource usage of the user; repeating the update operation of the remaining collective total available resource amount, the remaining total number of users and the average resource value, and looping the resource configuration operation until the Nth average resource value is less than the resource lower limit.

[0060] For example Figure 2 As shown, the total number of collective resources R, the total number of users U, and the initial average resource value If the resources used by users in the group are less than or equal to , then the quota limit for each of U users is , the quota limit calculation ends; if the used resources in the collective are greater than of users, then this The upper limit of a user's quota is the amount of resources used. The total resource usage corresponding to users is , update the average resource value and get the current average resource value It should be noted that for resource quotas that are integers, such as the number of resources, they can be rounded down. Rounding applies to non-integer resource quotas, such as storage space, and integer resource quotas, such as the number of virtual machines. If the remaining The amount of resources used by each user is less than or equal to , then the remaining The upper limit of the quota for each user is If the remaining Among users, there are users whose used resources are greater than of For ordinary users, this The upper limit of a user's quota is the number of resources used. The total number of resources used by users ,calculate .

[0061] And so on, if the remaining The resources used by users are less than or equal to , then the remaining The upper limit of the quota for each user is If the remaining Among users, there are users whose used resources are greater than of users, then this The upper limit of a user's quota is the number of resources used. The total number of resources used by users ,calculate , continue the cycle m (m ≥ 0) times until Less than .

[0062] Step S13: when the current average resource value is less than the resource lower limit, performing resource allocation of the target type resources on the remaining users who have not been resource allocated based on the resource lower limit and the current total remaining collective resources.

[0063] If the current average resource value is less than the resource lower limit, it means that if the remaining resources are evenly distributed to each user who has not been allocated resources, the amount of resources obtained by each user is meaningless. At this time, this embodiment analyzes how many users' resource usage lower limits can be met by the remaining resources, provides resources to these users, and does not allocate resources to the remaining users.

[0064] Specifically, the resource allocation of the target type of resources for the remaining users who have not been resource-allocated based on the resource lower limit and the current total number of remaining collective resources may include: comparing the resource usage of the remaining users with the resource lower limit; if the resource usage of the remaining users is less than the resource lower limit, rounding the ratio of the total number of remaining collective resources to the resource lower limit to obtain a first target integer; screening out the first target integer number of users from the remaining users, and configuring the resource usage upper limit of the user to the resource lower limit; if there are remaining users whose resource usage is greater than or equal to the resource lower limit, then for the user whose resource usage is greater than the resource lower limit, configuring the resource usage upper limit of the user to its corresponding resource usage; rounding out the ratio of the total number of remaining collective resources to the resource lower limit to obtain a second target integer; screening out the second target integer number of users from the remaining users, and configuring the resource usage upper limit of the user to the resource lower limit.

[0065] If the remaining The resources used by users are less than ,but Round down to get the first target integer, and the remaining The first target integer number of users are assigned The unit's quota limit. If the remaining Among users, there are users whose used resources are greater than or equal to of users, then this The upper limit of a user's quota is the number of resources used, and the remaining Round down the number of users to be assigned The quota cap calculation for the unit ends. The remaining users can be selected to allocate resources according to the lower resource limit by evaluating them based on historical resource usage and utilization rates. For example, resources can be allocated preferentially to users with high historical resource utilization rates.

[0066] Furthermore, collective resources can be placed under the name of a collective administrator, who is responsible for managing the collective resources. That is, the collective administrator allocates resources by configuring the total number of collective resources as the resource upper limit of the collective administrator.

[0067] In some embodiments, the above-mentioned dynamic resource configuration method further includes: monitoring the system, and when a target event is detected, re-acquiring the latest resource data of the target resource type, and updating the resource upper limit value of each user under the target resource type according to the latest resource data; the target event includes any one of a new user event, a user resource release event, a capacity expansion event, a manual resource upper limit value adjustment event, and a user resource usage change event. It is understandable that the user's demand for resources is not static. In order to more reasonably utilize resources and meet the user's usage needs, it is necessary to dynamically adjust the resource upper limit value of each user according to real-time resource data; in actual applications, events such as adding users, user resource release events, capacity expansion events, manual resource upper limit value adjustment events, and changes in user resource usage will cause changes in resource usage, so timely resource adjustments are made by monitoring such events.

[0068] In some embodiments, the resource dynamic configuration method further includes: obtaining a resource limit application sent by a target user; the resource limit application is a request initiated when the target user's resource usage reaches the user's resource usage limit and still cannot meet the usage demand; displaying the resource limit application through an interactive interface, and receiving the collective administrator's approval result for the resource limit application; if the approval result includes a manually assigned resource limit value, then the manually assigned resource limit value is used as the resource limit value of the target user. For example Figure 3As shown, for special business scenarios of special users, when the resource limit does not meet the user's needs, the user submits a quota limit application, and the collective administrator approves it at his discretion through the visual interaction module.

[0069] In response to the problems of the existing collective resource allocation method where a single user excessively seizes collective resources when no quota cap is set, and the manual configuration method when setting a resource quota cap is inefficient, unreasonable, and affects the long-term planning of the system, this application proposes a resource cap and dynamic adjustment method for the reasonable allocation of collective computing and storage resources among users. Based on the current total number of collective resources, the total number of users in the collective, and a lower limit that is easy for the system administrator to evaluate, the resource cap is automatically defined for each user. The calculation method does not affect the normal operation of existing businesses and is more efficient and reasonable than manual planning and configuration of resource quota caps. It supports global updates after changes in resource usage, supports resource expansion, and is conducive to improving the real-time nature of quota planning and resource utilization. It also adds a resource quota cap application and approval mechanism for special circumstances to ensure the normal operation of businesses for users and scenarios with special needs.

[0070] As can be seen from the above, in this embodiment, resource data of target type resources is obtained; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user; all users whose resource usage is greater than the current average resource value are screened out, and the resource usage upper limit value of each user in this batch is configured for the target type resources to be their respective corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after the resource configuration of each batch; when the current average resource value is less than the resource lower limit value, the resource configuration of the target type resources is performed on the remaining users who have not been resource configured based on the resource lower limit value and the current remaining total number of collective resources. It can be seen that by comparing the resource usage and the average resource value, if the user's resource usage is greater than the current average resource value, the user's resource usage upper limit is configured as the user's resource usage, and the average resource value is updated after the resources are configured, thereby meeting the resource usage needs of more users as much as possible; after the current average resource value is less than the resource lower limit, the target type resources are configured for the remaining users who have not been resource-allocated according to the resource lower limit and the current total number of remaining collective resources, to avoid the situation where the configured resource amount is less than the resource lower limit, resulting in no resources; by automatically calculating the resource upper limit and performing resource configuration, the efficiency and accuracy of dynamic resource configuration can be improved.

[0071] The present application also discloses a resource dynamic configuration system, such as Figure 4As shown, it includes quota upper limit calculation and allocation module, user management module, visual interaction module and resource statistics module. Among them, the resource statistics module automatically counts the collective resource usage, including the total number of available collective resources R, the total number of users in the collective U, and the details of the resources currently used by each user; the collective administrator configures the user resource lower limit uniformly through the visual interaction module. The quota upper limit calculation and allocation module automatically calculates the resource upper limit value of each ordinary user except the collective administrator. The resource statistics module is used to update the user and resource usage and synchronize it to other modules of the system.

[0072] Correspondingly, the embodiment of the present application also discloses a resource dynamic configuration device, see Figure 5 As shown, the device includes:

[0073] Resource data acquisition module 11, used to obtain resource data of target type resources; the resource data includes the total number of collective resources, the total number of users and the resource usage corresponding to each user;

[0074] The first resource configuration module 12 is configured to screen out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after each batch of resource configuration;

[0075] The second resource configuration module 13 is configured to perform resource configuration of the target type for the remaining users who have not been resource configured based on the resource lower limit and the total number of currently remaining collective resources when the current average resource value is less than the resource lower limit.

[0076] As can be seen from the above, in this embodiment, resource data of target type resources is obtained; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user; all users whose resource usage is greater than the current average resource value are screened out, and the resource usage upper limit value of each user in this batch is configured for the target type resources to be their respective corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after the resource configuration of each batch; when the current average resource value is less than the resource lower limit value, the resource configuration of the target type resources is performed on the remaining users who have not been resource configured based on the resource lower limit value and the current remaining total number of collective resources. It can be seen that by comparing the resource usage and the average resource value, if the user's resource usage is greater than the current average resource value, the user's resource usage upper limit is configured as the user's resource usage, and the average resource value is updated after the resources are configured, thereby meeting the resource usage needs of more users as much as possible; after the current average resource value is less than the resource lower limit, the target type resources are configured for the remaining users who have not been resource-allocated according to the resource lower limit and the current total number of remaining collective resources, to avoid the situation where the configured resource amount is less than the resource lower limit, resulting in no resources; by automatically calculating the resource upper limit and performing resource configuration, the efficiency and accuracy of dynamic resource configuration can be improved.

[0077] In some specific embodiments, the resource dynamic configuration device may specifically include:

[0078] The resource lower limit configuration unit is used to configure the corresponding resource lower limit value of a single user for different target type resources before obtaining the resource data of the target type resource; the resource lower limit value is the minimum value of the resource quota valid for the user.

[0079] In some specific embodiments, the resource dynamic configuration device may specifically include:

[0080] The monitoring unit is used to monitor the system. When a target event is detected, the monitoring unit re-acquires the latest resource data of the target resource type and updates the resource upper limit value of each user under the target resource type according to the latest resource data; the target event includes any one of the following events: new user event, user resource release event, capacity expansion event, manual adjustment of resource upper limit value event, and user resource usage change event.

[0081] In some specific embodiments, the resource dynamic configuration device may specifically include:

[0082] The collective administrator resource upper limit configuration unit is used to configure the total number of collective resources as the resource upper limit of the collective administrator; the collective administrator is used to manage collective resources.

[0083] In some specific embodiments, the resource dynamic configuration device may specifically include:

[0084] An application acquisition unit, configured to acquire a resource limit application sent by a target user; the resource limit application is a request initiated when the target user's resource usage reaches the user's resource usage limit and still cannot meet the usage demand;

[0085] an approval obtaining unit, configured to display the resource upper limit application through an interactive interface and receive an approval result of the collective administrator for the resource upper limit application;

[0086] A configuration unit is configured to use the manually assigned resource upper limit as the resource upper limit of the target user if the approval result includes the manually assigned resource upper limit.

[0087] In some specific embodiments, the first resource configuration module 12 may specifically include:

[0088] an initial average resource value determining unit, configured to obtain an initial average resource value according to a ratio of the total amount of collectively available resources to the total number of users, and use the initial average resource value as the current average resource value;

[0089] a configuration unit, configured to screen out users whose resource usage is greater than the initial average resource value, and configure the resource upper limit of the user as the resource usage of the user;

[0090] a first remaining total number of users determining unit, configured to determine a first remaining total number of collectively available resources based on the total number of collectively available resources and the amount of configured resources, and to determine a first remaining total number of users based on the total number of users and the number of configured users;

[0091] a second average resource value determining unit, configured to obtain a second average resource value according to a ratio of the first remaining total amount of collective available resources to the first total number of remaining users, and use the second average resource value as a current average resource value;

[0092] a configuration unit, configured to filter out a user whose resource usage is greater than the second average resource value from the remaining users, and configure the resource upper limit of the user as the resource usage of the user;

[0093] The loop unit is used to repeat the updating operation of the remaining total amount of collective available resources, the total number of remaining users and the average resource value, and loop the resource configuration operation until the Nth average resource value is less than the resource lower limit value.

[0094] In some specific embodiments, the second resource configuration module 13 may specifically include:

[0095] a comparing unit, configured to compare the resource usage of the remaining users with the resource lower limit;

[0096] a first target integer determining unit, configured to round the ratio of the total remaining collective resources to the resource lower limit to obtain a first target integer if the resource usage of the remaining users is less than the resource lower limit;

[0097] a first screening unit, configured to screen out the first target integer number of users from the remaining users, and configure the upper limit of resource usage of the users as the lower limit of resource usage;

[0098] a configuration unit configured to configure, for a user whose resource usage is greater than the resource lower limit, an upper resource usage limit of the user to the corresponding resource usage limit if the resource usage of any remaining user is greater than or equal to the resource lower limit;

[0099] a second target integer determining unit, configured to round the ratio of the total number of remaining collective resources to the resource lower limit to obtain a second target integer;

[0100] The second screening unit is configured to screen out the second target integer number of users from the remaining users, and configure the upper limit of resource usage of the users as the lower limit of resource usage.

[0101] Furthermore, the present application also discloses an electronic device, see Figure 6 The contents in the drawings should not be considered as any limitation on the scope of use of the present application.

[0102] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the dynamic resource configuration method disclosed in any of the aforementioned embodiments.

[0103] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0104] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223 including resource data, etc. The storage method can be temporary storage or permanent storage.

[0105] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to enable the processor 21 to calculate and process the massive data 223 in the memory 22. The operating system 221 can be Windows Server, NetWare, Unix, Linux, etc. In addition to including computer programs capable of implementing the resource dynamic configuration method disclosed in any of the aforementioned embodiments and executed by the electronic device 20, the computer programs 222 can further include computer programs capable of performing other specific tasks.

[0106] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the resource dynamic configuration method disclosed in any of the aforementioned embodiments are implemented.

[0107] Furthermore, an embodiment of the present application also discloses a computer program product, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the resource dynamic configuration method disclosed in any of the aforementioned embodiments are implemented.

[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0109] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0110] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0111] The above is a detailed introduction to the resource dynamic configuration method, device, equipment, medium and program product provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for general technical personnel in this field, according to the ideas of the present invention, 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 invention.

Claims

1. A method for dynamic resource configuration, characterized in that: include: Obtain resource data of target type resources; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user; Filter out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after each batch of resource allocation; When the current average resource value is less than the resource lower limit, resource allocation of the target type of resources is performed on the remaining users who have not been resource allocated based on the resource lower limit and the current total remaining collective resources.

2. The resource dynamic configuration method according to claim 1, characterized in that: Before obtaining the resource data of the target type resource, the method further includes: The resource lower limit value corresponding to a single user is configured for different target type resources; the resource lower limit value is the minimum value of the resource quota valid for the user.

3. The resource dynamic configuration method according to claim 1, characterized in that: Also includes: Monitor the system, and when a target event is detected, reacquire the latest resource data of the target resource type, and update the resource upper limit value of each user under the target resource type according to the latest resource data; The target event includes any one of a new user event, a user resource release event, a capacity expansion event, a manual resource upper limit adjustment event, and a user resource usage change event.

4. The resource dynamic configuration method according to claim 1, characterized in that: Also includes: The total number of collective resources is configured as the resource upper limit of the collective administrator; the collective administrator is used to manage the collective resources.

5. The resource dynamic configuration method according to claim 1, characterized in that: Also includes: Obtain resource limit requests sent by target users; The resource limit application is a request initiated when the target user's resource usage reaches the user's resource usage limit and still cannot meet the usage demand; Presenting the resource cap application through an interactive interface and receiving an approval result of the collective administrator for the resource cap application; If the approval result includes a manually assigned resource upper limit, the manually assigned resource upper limit is used as the resource upper limit of the target user.

6. The resource dynamic configuration method according to claim 1, characterized in that: The method of screening out all users whose resource usage is greater than the current average resource value and configuring the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage includes: Obtaining an initial average resource value according to a ratio of the total amount of collectively available resources to the total number of users, and using the initial average resource value as the current average resource value; Screening out users whose resource usage is greater than the initial average resource value, and configuring the resource upper limit of the user as the resource usage of the user; Determine a first remaining total amount of collectively available resources based on the total amount of collectively available resources and the amount of configured resources, and determine a first remaining total number of users based on the total number of users and the number of configured users; Obtaining a second average resource value according to a ratio of the first remaining total collective available resources to the first total number of remaining users, and using the second average resource value as a current average resource value; Filter out the user whose resource usage is greater than the second average resource value from the remaining users, and configure the resource upper limit of the user as the resource usage of the user; Repeat the update operation of the remaining collective total available resources, the remaining total number of users and the average resource value, and loop the resource allocation operation until the Nth average resource value is less than the resource lower limit.

7. The resource dynamic configuration method according to any one of claims 1 to 6, characterized in that: The performing resource allocation of the target type resources on the remaining users to which resources have not been allocated based on the resource lower limit and the total number of currently remaining collective resources includes: Comparing the resource usage of the remaining users with the resource lower limit; If the resource usage of the remaining users is less than the resource lower limit, rounding the ratio of the total remaining collective resources to the resource lower limit to obtain a first target integer; Filter out the first target integer number of users from the remaining users, and configure the resource usage upper limit of each user to be the resource lower limit; If there are any remaining users whose resource usage is greater than or equal to the resource lower limit, then for the user whose resource usage is greater than the resource lower limit, configure the resource usage upper limit of the user to the corresponding resource usage; rounding the ratio of the total remaining collective resources to the resource lower limit to obtain a second target integer; The second target integer number of users is selected from the remaining users, and the resource usage upper limit value of each user is configured as the resource lower limit value.

8. A resource dynamic configuration device, characterized in that: include: A resource data acquisition module is used to acquire resource data of target type resources; the resource data includes the total number of collective resources, the total number of users, and the resource usage corresponding to each user; A first resource configuration module is configured to screen out all users whose resource usage is greater than the current average resource value, and configure the resource usage upper limit of each user in the batch for the target type of resource to be the corresponding resource usage; wherein the initial average resource value is determined based on the total number of collective resources and the total number of users, and the average resource value is updated after each batch of resource configuration; The second resource configuration module is configured to perform resource configuration of the target type for the remaining users who have not been resource configured based on the resource lower limit and the total number of currently remaining collective resources when the current average resource value is less than the resource lower limit.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the resource dynamic configuration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store computer programs; wherein when the computer programs are executed by a processor, the resource dynamic configuration method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the method for dynamic resource configuration according to any one of claims 1 to 7 is implemented.