Resource allocation method, apparatus, device, and readable medium

CN117130786BActive Publication Date: 2026-09-22MULTIPOINT LIFE (CHENGDU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311119192.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-09-22
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

[0004]第一,直接根据应用的重要性,人为地进行应用分配资源配额信息调整,存在一定的主观性,对于较为重要的应用,当分配的应用资源配额远远大于实际所需要的需求配额时,会存在应用资源配额过度分配的情况,导致资源利用率低,进而导致计算机的存储资源、网络资源以及计算资源的浪费

Benefits of technology

[0013]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的资源分配方法,减少了计算机的存储资源、网络资源以及计算资源的浪费。具体来说,造成计算机的存储资源、网络资源以及计算资源的浪费的原因在于:直接根据应用的重要性,人为地进行应用分配资源配额信息调整,存在一定的主观性,对于较为重要的应用,当分配的应用资源配额远远大于实际所需要的需求配额时,会存在应用资源配额过度分配的情况,导致资源利用率低,进而导致计算机的存储资源、网络资源以及计算资源的浪费。基于此,本公开的一些实施例的资源分配方法,首先,响应于通过资源监控工具检测到资源分配不平衡,确定预设数据库集群在单台实例的总资源信息。由此,可以确定总资源信息。然后,确定上述预设数据库集群在上述单台实例的使用资源信息。接着,基于上述总资源信息与上述使用资源信息,确定上述预设数据库集群对应上述单台实例的价值信息。由此,可以用于确定各个应用标识对应的应用分摊价值的价值信息。之后,将调用上述预设数据库集群的各个应用的应用标识确定为应用标识集合。由此,可以得到调用上述预设数据库集群的各个应用的应用标识。然后,基于上述价值信息与上述应用标识集合,确定上述应用标识集合中每个应用标识对应的应用分摊价值,得到应用分摊价值集合。由此,可以得到表征各个应用实际所需要的各个应用分摊价值的应用分摊价值集合。接着,将上述应用分摊价值集合中满足预设筛选条件的各个应用分摊价值确定为目标应用分摊价值集合。由此,可以得到目标应用分摊价值集合,上述目标应用分摊价值集合可以表征各个应用分摊价值较高的应用分摊价值。然后,将上述目标应用分摊价值集合中的每个目标应用分摊价值对应的应用标识确定为目标应用标识,得到目标应用标识集合。由此,可以得到表示各个应用分摊价值较高的应用对应的各个应用标识的目标应用标识集合。之后,将对应上述目标应用标识集合的各个应用分配资源配额信息确定为应用分配资源配额信息集,其中,上述目标应用标识集合中的目标应用标识对应上述应用分配资源配额信息集中的应用分配资源配额信息。由此,可以得到各个应用分摊价值较高的应用对应的应用分配资源配额信息集。最后,对于上述应用分配资源配额信息集中的每个应用分配资源配额信息,对上述应用分配资源配额信息进行调整,得到调整后的应用分配资源配额信息,以及,将与调整后的应用分配资源配额信息对应的资源分配给对应应用标识的应用。由此,可以对应用分摊价值较高的应用分配资源配额信息进行调整,得到调整后的应用分配资源配额信息且将对应调整后的应用分配资源配额信息的资源分配给对应应用标识的应用。也因为根据各个应用实际所需要资源的应用分摊价值集合,确定对应分摊价值较高的各个应用对应的各个应用分配资源配额信息。对所确定的各个应用分配资源配额信息进行调整,调整过程中不存在主观因素的影响,减少了应用资源配额过度分配的情况,提高了资源利用率。进而,减少了计算机的存储资源、网络资源以及计算资源的浪费。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130786B_ABST
    Figure CN117130786B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose resource allocation methods, devices, equipment and readable media. A specific implementation of the method comprises: determining total resource information of a preset database cluster; determining usage resource information of the preset database cluster; determining value information of the preset database cluster; determining a set of application identifiers; determining an application apportioned value of each application identifier in the set of application identifiers to obtain a set of application apportioned values; determining each application apportioned value that meets a first preset screening condition as a set of target application apportioned values; determining an application identifier corresponding to each target application apportioned value in the set of target application apportioned values as a target application identifier to obtain a set of target application identifiers; determining each application allocation resource quota information as a set of application allocation resource quota information; and adjusting the application allocation resource quota information. The implementation reduces the waste of computer storage resources, network resources and computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to resource allocation methods, apparatus, devices, and readable media. Background Technology

[0002] Application resource quota adjustment is a technology that adjusts the resource quotas allocated to applications. Currently, the common methods for adjusting resource quotas are: manually adjusting the application resource quota information directly based on the importance of the application, or adjusting the resource quotas of applications with high usage demand based on application usage needs.

[0003] However, when adjusting application resource allocation quotas using the above method, the following technical problems often arise:

[0004] First, directly adjusting application resource quotas based on the importance of the application introduces a degree of subjectivity. For important applications, when the allocated application resource quota is far greater than the actual required quota, there may be over-allocation of application resource quotas, resulting in low resource utilization and wasting computer storage, network, and computing resources.

[0005] Secondly, directly allocating resource quotas to applications with high usage demands based on application needs can lead to resource contention and conflicts when these applications simultaneously perform database operations, causing database access blockages and delays. Furthermore, high-concurrency database operations may result in data loss, increasing the number of database operation failures and requiring re-execution. Ultimately, this leads to a waste of computing resources.

[0006] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0008] Some embodiments of this disclosure provide resource allocation methods, apparatuses, electronic devices, and computer-readable media to address one or more of the technical problems mentioned in the background section above.

[0009] In a first aspect, some embodiments of this disclosure provide a resource allocation method, the method comprising: in response to detecting resource allocation imbalance through a resource monitoring tool, determining the total resource information of a preset database cluster on a single instance; determining the resource usage information of the preset database cluster on the single instance; determining the value information of the preset database cluster corresponding to the single instance based on the total resource information and the resource usage information; determining the application identifiers of each application calling the preset database cluster as an application identifier set; determining the application-shared value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, thereby obtaining an application-shared value set; and allocating the application-shared value set to each application that meets a first preset screening condition. The apportionment value is determined as the target application apportionment value set; the application identifier corresponding to each target application apportionment value in the target application apportionment value set is determined as the target application identifier, resulting in a target application identifier set; the resource allocation quota information of each application corresponding to the target application identifier set is determined as the application allocation resource quota information set, wherein the target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set; for each application allocation resource quota information in the application allocation resource quota information set, the application allocation resource quota information is adjusted to obtain the adjusted application allocation resource quota information, and the resources corresponding to the adjusted application allocation resource quota information are allocated to the application with the corresponding application identifier.

[0010] Secondly, some embodiments of this disclosure provide a resource allocation apparatus, comprising: a first determining unit configured to determine total resource information of a preset database cluster on a single instance in response to a resource allocation imbalance detected by a resource monitoring tool; a second determining unit configured to determine resource usage information of the preset database cluster on the single instance; a third determining unit configured to determine value information of the preset database cluster corresponding to the single instance based on the total resource information and the resource usage information; a fourth determining unit configured to determine application identifiers of each application calling the preset database cluster as an application identifier set; a fifth determining unit configured to determine the application-shared value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, thereby obtaining an application-shared value set; and a sixth determining unit configured to... The application allocation value that meets the first preset screening condition is determined as the target application allocation value set; the seventh determining unit is configured to determine the application identifier corresponding to each target application allocation value in the target application allocation value set as the target application identifier, thereby obtaining a target application identifier set; the eighth determining unit is configured to determine the application allocation resource quota information corresponding to each application in the target application identifier set as the application allocation resource quota information set, wherein the target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set; the adjustment unit is configured to adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set to obtain the adjusted application allocation resource quota information, and to allocate the resources corresponding to the adjusted application allocation resource quota information to the application with the corresponding application identifier.

[0011] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0012] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0013] The above embodiments of this disclosure have the following beneficial effects: the resource allocation methods of some embodiments of this disclosure reduce the waste of computer storage resources, network resources, and computing resources. Specifically, the waste of computer storage resources, network resources, and computing resources is caused by: directly adjusting the application resource quota information manually according to the importance of the application, which involves a certain degree of subjectivity. For more important applications, when the allocated application resource quota is much greater than the actual required quota, there will be an over-allocation of application resource quota, resulting in low resource utilization and thus waste of computer storage resources, network resources, and computing resources. Based on this, the resource allocation method of some embodiments of this disclosure firstly determines the total resource information of a preset database cluster on a single instance in response to the detection of resource allocation imbalance by a resource monitoring tool. Thus, the total resource information can be determined. Then, the resource usage information of the preset database cluster on the single instance is determined. Next, based on the total resource information and the resource usage information, the value information of the preset database cluster corresponding to the single instance is determined. Thus, it can be used to determine the value information of the application allocated value corresponding to each application identifier. Next, the application identifiers of each application calling the aforementioned preset database cluster are determined as an application identifier set. Thus, the application identifiers of each application calling the aforementioned preset database cluster can be obtained. Then, based on the aforementioned value information and the aforementioned application identifier set, the application allocation value corresponding to each application identifier in the aforementioned application identifier set is determined, resulting in an application allocation value set. Thus, an application allocation value set representing the actual application allocation value required by each application can be obtained. Next, the application allocation values ​​in the aforementioned application allocation value set that meet preset filtering conditions are determined as the target application allocation value set. Thus, the target application allocation value set can be obtained, which can represent the application allocation value with higher allocation value among various applications. Then, the application identifier corresponding to each target application allocation value in the aforementioned target application allocation value set is determined as the target application identifier, resulting in a target application identifier set. Thus, a target application identifier set representing the application identifiers corresponding to applications with higher allocation values ​​among various applications can be obtained. Next, the resource allocation quota information for each application corresponding to the aforementioned target application identifier set is determined as an application resource allocation quota information set, wherein the target application identifiers in the aforementioned target application identifier set correspond to the application resource allocation quota information in the aforementioned application resource allocation quota information set. Thus, the application resource allocation quota information set corresponding to applications with higher allocation value can be obtained. Finally, for each application resource allocation quota information in the aforementioned application resource allocation quota information set, the application resource allocation quota information is adjusted to obtain adjusted application resource allocation quota information, and the resources corresponding to the adjusted application resource allocation quota information are allocated to the application with the corresponding application identifier.Therefore, resource allocation quotas for applications with higher resource sharing value can be adjusted, resulting in adjusted application resource allocation quotas. Resources corresponding to these adjusted quotas are then allocated to the applications identified by their respective application identifiers. Furthermore, by determining the resource allocation quotas for each application based on its actual resource sharing value set, resource allocation quotas for each application with a higher sharing value are identified. Adjusting these quotas eliminates the influence of subjective factors, reducing over-allocation of application resource quotas and improving resource utilization. This, in turn, reduces waste of computer storage, network, and computing resources. Attached Figure Description

[0014] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0015] Figure 1 This is a flowchart of some embodiments of the resource allocation method according to this disclosure;

[0016] Figure 2 This is a schematic diagram of the structure of some embodiments of the resource allocation device according to the present disclosure;

[0017] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0019] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0022] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0023] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0024] Figure 1 A flow 100 of some embodiments of a resource allocation method according to the present disclosure is shown. The resource allocation method includes the following steps:

[0025] Step 101: In response to the detection of resource allocation imbalance by the resource monitoring tool, determine the total resource information of the preset database cluster on a single instance.

[0026] In some embodiments, the entity executing the resource allocation method (e.g., a computing device) can determine the total resource information in the database cluster information corresponding to the aforementioned preset database cluster provided by the user (database vendor) as the total resource information of the preset database cluster in a single instance. Here, the aforementioned single instance can refer to various database instances deployed and running in an independent computing environment. The aforementioned preset database cluster can be a pre-defined database cluster. The aforementioned database cluster information can represent the specifications of the database cluster configuration. The aforementioned database cluster information can include, but is not limited to, at least one of the following: total resource information and the number of nodes. The aforementioned total resource information can represent the computer resources allocated to the preset database cluster in a single instance. For example, the aforementioned total resource information can include, but is not limited to, at least one of the following: computing resources, storage resources, and network resources. The aforementioned computing resources can be represented by the number of processors, the aforementioned storage resources can be represented by storage capacity, and the aforementioned network resources can be represented by network bandwidth. For example, the aforementioned total resource information can be {computing resources: 5 processors, storage resources: 6TB, network resources: 280Mbps}. The aforementioned resource monitoring tool can be the Zabbix monitoring tool. The aforementioned resource imbalance refers to a situation where an application receives too many system resources relative to its actual needs, resulting in other applications not having enough resources to run. The aforementioned application can refer to a software program.

[0027] Step 102: Determine the resource usage information of the preset database cluster on a single instance.

[0028] In some embodiments, the execution entity can determine the resource usage information of the preset database cluster on the single instance. This resource usage information can characterize the computer resources consumed by the preset database cluster during runtime on the single instance. In practice, firstly, the execution entity can determine each node of the preset database cluster on the single instance. Then, the execution entity can determine the node resources used by each node on the single instance. Next, based on the determined node resources used by each node, the node resources used by each node are integrated to obtain integrated resources. The integrated resources include: the sum of the node computing resources of each corresponding node, the sum of the node storage resources of each corresponding node, and the sum of the node network resources of each corresponding node. Finally, the execution entity can determine the integrated resources as the resource usage information of the preset database cluster on the single instance. The nodes can be database nodes. The node resources used can be the computer resources consumed by the node when performing tasks or processing requests. The node resources used can include: node computing resources, node storage resources, and node network resources. As an example, each node of the single instance can be {node 1, node 2}. In the above {Node 1, Node 2}, the node resources used by Node 1 can be {Node computing resources: 1 processor, Node storage resources: 0.5TB, Node network resources: 80Mbps}, and the node resources used by Node 2 can be {Node computing resources: 2 processors, Node storage resources: 0.5TB, Node network resources: 60Mbps}. The default database cluster resource information for the above single instance can be {Computing resources: 3 processors, Storage resources: 1TB, Network resources: 140Mbps}.

[0029] Step 103: Based on the total resource information and the resource usage information, determine the value information of a single instance corresponding to the preset database cluster.

[0030] In some embodiments, the execution entity may determine the value information of a single instance corresponding to the preset database cluster based on the total resource information and the resource usage information. The value information may represent the value corresponding to the computing resources included in the resource usage information, the value corresponding to the storage resources included in the resource usage information, and the value corresponding to the network resources included in the resource usage information.

[0031] In some optional implementations of certain embodiments, the execution entity may determine the value information of a single instance corresponding to the preset database cluster based on the total resource information and the resource usage information through the following steps:

[0032] The first step is to identify the computing resources in the total resource information above as the first computing resource.

[0033] The second step is to identify the computing resources in the above-mentioned resource information as the second computing resources.

[0034] The third step is to determine the value of the computing resources based on the aforementioned first computing resource, the aforementioned second computing resource, and the first preset value corresponding to the aforementioned first computing resource. In practice, firstly, the executing entity can determine the ratio of the second computing resource to the first computing resource as the first target ratio. Then, the executing entity can determine the value of the computing resources by multiplying the first target ratio by the first preset value. As an example, the aforementioned first computing resource can be represented as 5 processors, the aforementioned second computing resource can be represented as 3 processors, and the aforementioned first preset value can be 1000. Then, the value of the computing resources can be 3 / 5 * 1000 = 600.

[0035] The fourth step is to identify the storage resources in the total resource information above as the first storage resource.

[0036] The fifth step is to identify the storage resources in the above-mentioned resource usage information as the second storage resources.

[0037] The sixth step is to determine the value of the storage resources based on the first storage resource, the second storage resource, and the second preset value corresponding to the first storage resource. In practice, firstly, the executing entity can determine the ratio of the second storage resource to the first storage resource as the second target ratio. Then, the executing entity can determine the storage resource value by multiplying the second target ratio by the second preset value. As an example, the first storage resource can be represented as 6TB, the second computing resource can be represented as 1TB, and the second preset value can be 600. Then, the value of the computing resource can be 1 / 6 * 600 = 100.

[0038] Step 7: Identify the network resources in the total resource information above as the first network resource.

[0039] Step 8: Identify the network resources in the above-mentioned resource information as the second network resource.

[0040] Step nine: Determine the value of the network resources based on the aforementioned first network resource, the aforementioned second network resource, and the third preset value corresponding to the aforementioned first network resource. In practice, firstly, the executing entity can determine the ratio of the second network resource to the first network resource as the third target ratio. Then, the executing entity can determine the storage resource value by multiplying the aforementioned third target ratio by the aforementioned third preset value. As an example, the aforementioned first storage resource can be represented as 280Mbps, the aforementioned second computing resource can be represented as 140Mbps, and the aforementioned third preset value can be 400. Then, the value of the computing resource can be 140 / 280*400 = 200.

[0041] Step 10: Based on the aforementioned computing resource value, storage resource value, and network resource value, determine the value information of the single instance corresponding to the preset database cluster. In practice, the executing entity can determine the value information of the single instance by summing the aforementioned computing resource value, storage resource value, and network resource value. For example, the aforementioned value information could be a numerical value representing the value: 600 + 100 + 200 = 900.

[0042] Step 104: Determine the application identifiers of each application that calls the preset database cluster as a set of application identifiers.

[0043] In some embodiments, the executing entity may determine the application identifiers of each application calling the preset database cluster as a set of application identifiers. The application identifiers can be unique codes used to distinguish different applications. For example, the application identifiers of each application can be A and B, and the identifier set can be {A, B}. The applications in each application can be software programs designed and developed to implement specific functions or provide services.

[0044] Step 105: Based on the value information and the application identifier set, determine the application-shared value corresponding to each application identifier in the application identifier set, and obtain the application-shared value set.

[0045] In some embodiments, the execution entity may determine the application-allocated value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, thereby obtaining an application-allocated value set. The application-allocated value may represent the allocated value determined based on the total time spent by the application using the preset database cluster.

[0046] In some optional implementations of certain embodiments, the execution entity may determine the application-shared value corresponding to each application identifier in the application identifier set based on the aforementioned value information and the aforementioned application identifier set, thereby obtaining the application-shared value set:

[0047] The first step is to perform the following steps for each application corresponding to each application identifier in the above application identifier set:

[0048] Sub-step one: Determine the number of times the application calls the preset database cluster within a preset time period. The preset time period can be one day. The number of calls can be 10.

[0049] Sub-step two: Based on the aforementioned number of calls and the preset single call time, determine the total time consumed by the application using the preset database cluster within the preset time period. In practice, the executing entity can determine the total time by multiplying the aforementioned number of calls by the aforementioned single call time. As an example, if the aforementioned preset single call time can be 5 minutes, then the aforementioned total time can be 10 * 5 = 50 minutes.

[0050] The second step is to define the determined total time as a set of total time. This set of total time can be {50 minutes, 100 minutes}.

[0051] The third step is to determine the application-shared value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information mentioned above, thereby obtaining the application-shared value set.

[0052] In some optional implementations of certain embodiments, the execution entity may determine the application-allocated value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information, thereby obtaining the application-allocated value set:

[0053] The first step is to determine the first time value based on the total time set mentioned above. In practice, the executing entity can determine the first time value as the sum of the total times in the total time set. As an example, the first time value could be 50 + 100 = 150 minutes.

[0054] The second step involves performing the following processing steps for each total time in the total time set:

[0055] Sub-step one: Determine the application identifier corresponding to the total time consumption above as the target application identifier.

[0056] Sub-step two: Determine the time value corresponding to the total time consumption mentioned above as the second time consumption value.

[0057] Sub-step three: Based on the aforementioned first time consumption value, second time consumption value, and value information, generate the application-allocated value corresponding to the aforementioned target application identifier. In practice, firstly, the executing entity can determine the ratio of the aforementioned second time consumption value to the aforementioned first time consumption value as the target time consumption ratio. Then, the executing entity can determine the application-allocated value corresponding to the aforementioned target application identifier by multiplying the target time consumption ratio by the value value corresponding to the value information. As an example, the aforementioned target time consumption ratio can be 1 / 3, and the value value corresponding to the aforementioned value information can be 900, then the aforementioned application-allocated value can be 1 / 3 * 900 = 300.

[0058] The third step is to define the generated application-allocated values ​​as a set of application-allocated values. For example, the above application-allocated value set could be {300, 600}.

[0059] Step 106: Determine the application allocation value of each application that meets the first preset screening condition in the application allocation value set as the target application allocation value set.

[0060] In some embodiments, the executing entity may determine the application-allocated value set as the target application-allocated value set by identifying each application-allocated value in the application-allocated value set that satisfies a first preset filtering condition. The first preset filtering condition may be that the application-allocated value is greater than a preset threshold. The preset threshold may be 500. The target application-allocated value set may be {600}.

[0061] Step 107: Determine the application identifier corresponding to each target application allocated value in the target application allocated value set as the target application identifier, and obtain the target application identifier set.

[0062] In some embodiments, the executing entity may determine the application identifier corresponding to each target application allocated value in the target application allocated value set as the target application identifier, thereby obtaining a target application identifier set. The target application identifier may be B, and the target application identifier set may be {B}.

[0063] Step 108: Determine the resource allocation quota information of each application in the corresponding target application identifier set as the application resource allocation quota information set.

[0064] In some embodiments, the executing entity may determine the resource allocation quota information of each application corresponding to the target application identifier set as an application resource allocation quota information set. The target application identifiers in the target application identifier set correspond to the application resource allocation quota information in the application resource allocation quota information set. The application resource allocation quota information may be the maximum limit of resources that can be allocated to an application's program or service. For example, the resource allocation quota information corresponding to the application with application identifier B may be represented as {computing resources: 3 processors, storage resources: 3TB, network resources: 100Mbps}. The application resource allocation quota information set may be represented as {computing resources: 3 processors, storage resources: 3TB, network resources: 100Mbps}.

[0065] Step 109: Adjust the application resource allocation quota information to obtain the adjusted application resource allocation quota information, and allocate the resources corresponding to the adjusted application resource allocation quota information to the application with the corresponding application identifier.

[0066] In some embodiments, the execution entity can adjust the application resource allocation quota information for each application in the application resource allocation quota information set to obtain adjusted application resource allocation quota information, and allocate the resources corresponding to the adjusted application resource allocation quota information to the application with the corresponding application identifier. In practice, the execution entity can allocate the resources corresponding to the adjusted application resource allocation quota information to the running application through a process scheduler. In some optional implementations of some embodiments, the execution entity can adjust the application resource allocation quota information for each application in the application resource allocation quota information set to obtain adjusted application resource allocation quota information, and allocate the resources corresponding to the adjusted application resource allocation quota information to the application with the corresponding application identifier through the following steps:

[0067] The first step is to reduce the computing resource quota in the application's resource allocation quota information by a first preset value to update the computing resource quota. The computing resource quota can be the number of processors allocated to the application's programs or services. For example, if the computing resource quota is 3 and the first preset value is 1, then the updated computing resource quota can be 3 - 1 = 2.

[0068] The second step is to reduce the storage resource quota in the application's allocated resource quota information by a second preset value to update the storage resource quota. The storage resource quota can be the amount of memory allocated to the application's program or service. For example, if the storage resource quota is 3TB and the second preset value is 1TB, then the updated storage resource quota would be 3TB - 1TB = 2TB.

[0069] The third step is to reduce the network resource quota in the application's allocated resource quota information by a third preset value to update the network resource quota. The aforementioned network resource quota can be the network bandwidth allocated to the application's program or service. For example, if the aforementioned network resource quota is 100Mbps and the aforementioned third preset value is 50Mbps, then the updated network resource quota would be 100Mbps - 50Mbps = 50Mbps.

[0070] The fourth step is to determine the updated application resource allocation information by identifying the updated computing resource quota, updated storage resource quota, updated network resource quota, and the application identifier of the corresponding application allocation resource quota information.

[0071] Optionally, the above method further includes:

[0072] The first step is to obtain the reach rate set corresponding to the aforementioned set of application identifiers. The reach rate in this reach rate set corresponds to the application identifier in the application identifier set. The reach rate represents the probability that a user will use the application within a preset time period. For example, if an application has 1000 target users, and 600 users use the application within a preset time period, then the reach rate is 60% (or 0.6%). The preset time period could be July 2023. The reach rate set could be {60%, 40%}.

[0073] The second step is to obtain the preset rating set corresponding to the aforementioned application identifier set. The preset ratings in this set can be user-preset ratings based on the relevance of the application to its core business functions. In practice, the executing entity can obtain the preset rating set from the client. For example, the application could be a software program for an online learning platform, the core business function could be providing online courses and learning resources, and the preset rating could be 8. The preset rating set could be {7, 8}.

[0074] The third step involves inputting the aforementioned application-allocated value set, reach rate set, and preset score set into a pre-trained value return on investment (ROI) scoring model to obtain a value ROI score set. This value ROI scoring model can be a Multi-Layer Perceptron (MLP) model. The value ROI scores in this set represent the reasonableness of the relationship between the effectiveness generated by the application and its allocated value. The value ROI scores in this set can be {7, 4}.

[0075] The fourth step is to determine the set of value return rate scores that meet the second preset screening condition from the above value return rate score set as the selected value return rate score set. The second preset screening condition can be that the value return rate score is less than a preset score. The preset score can be 5. The selected value return rate score set can be {4}.

[0076] The fifth step is to determine the application identifiers corresponding to each screening value return rate score in the above-mentioned screening value return rate score set as the screening application identifier set. The application identifier corresponding to the above-mentioned screening value return rate score 4 can be B, and the above-mentioned screening application identifier set can be {B}.

[0077] Step 6: Obtain the system time as the current time.

[0078] Step 7: In response to determining that the current time meets the start condition of the periodic timer, for each filter application identifier in the above set of filter application identifiers, perform the following asynchronous triggering processing steps:

[0079] In the first sub-step, in response to the detected request information from the application terminal corresponding to the aforementioned filtered application identifier, triggering a preset database operation, the request information is encapsulated into information to be processed. The starting condition can be that the current time is after the start time of the periodic timer. In practice, the executing entity can use serialization technology to encapsulate the request information into a data string of a specific format as information to be processed. This specific format can be JSON or XML. The request information triggering the preset database operation can represent text information used to query, select, insert, update, or delete data in the database. For example, the request information to select all records with an age greater than 18 from a table named "customers" in the database could be "SELECT * FROM customers WHERE age>18".

[0080] Sub-step two: Store the above-mentioned information to be processed into a message queue in order to update the message queue.

[0081] Sub-step three involves determining the individual messages to be processed in the updated message queue as a sequence of messages to be processed. This sequence can be arranged in the order in which the messages left the message queue.

[0082] Sub-step four: For the first piece of information to be processed in the sequence of information to be processed, execute the following triggering step:

[0083] The first sub-step involves parsing the first piece of information to be processed to obtain the request information for the corresponding preset database operation. In practice, the executing entity can use deserialization technology to parse the information to be processed into the request information for the corresponding preset database operation.

[0084] The second sub-step involves connecting to the aforementioned preset database. In practice, the executing entity can establish a connection to the database using methods or functions provided by the database driver.

[0085] The third sub-step involves performing database operations corresponding to the aforementioned request information on the pre-defined database. These database operations include, but are not limited to, at least one of the following: insert operation, query operation, update operation, and delete operation.

[0086] The fourth sub-step involves deleting the first piece of information to be processed from the sequence of information to be processed, in order to update the sequence of information to be processed.

[0087] The fifth sub-step is to execute the above triggering step again based on the updated sequence of information to be processed, in response to the updated sequence of information to be processed being non-empty.

[0088] The sixth sub-step, in response to the updated sequence of information to be processed being empty, determines the time corresponding to the empty sequence of information to be processed as the first target time, and performs the following acquisition steps:

[0089] Sub-step one: Obtain the system time as the second target time.

[0090] Sub-step two: Determine the time interval between the second target time and the first target time as the target time interval.

[0091] Sub-step three: In response to the fact that the target time interval does not meet the preset time interval of the periodic timer, the above acquisition steps are executed again.

[0092] Sub-step four: In response to determining that the target time interval meets the preset time interval of the periodic timer, for each filter application identifier in the above filter application identifier set, the above asynchronous triggering processing steps are executed again.

[0093] The above-mentioned technical solution and its related content, as an inventive point of this disclosure, solve the second technical problem mentioned in the background: "The method of adjusting resource quotas for applications with high usage demand directly based on application usage needs may lead to resource contention and conflicts when these applications simultaneously perform database operations, resulting in database access blocking and delays. Simultaneously, high-concurrency database operations may cause data loss, increasing the number of database operation failures and requiring re-execution of database operations. This, in turn, leads to a waste of computer computing resources." Factors leading to the waste of computer computing resources often include: the method of adjusting resource quotas for applications with high usage demand directly based on application usage needs; the possibility of resource contention and conflicts when these applications simultaneously perform database operations, leading to database access blocking and delays; the possibility of data loss when these applications simultaneously perform database operations, increasing the number of database operation failures and requiring re-execution of database operations; and the waste of computer computing resources. Solving these factors can reduce the waste of computer computing resources. To achieve this effect, this disclosure uses the following steps: First, obtain the reach rate set corresponding to the above-mentioned application identifier set. Therefore, a set of reach rates representing the probability of user use of each application within a preset time period can be obtained. The second step is to obtain a preset score set corresponding to the aforementioned application identifier set. This yields a preset score set used to generate a value return rate score set. The third step involves inputting the aforementioned application-allocated value set, the aforementioned reach rate set, and the aforementioned preset score set into a pre-trained value return rate scoring model to obtain a value return rate score set. Thus, a value return rate score set can be obtained through the value return rate scoring model. The fourth step involves determining each value return rate score in the aforementioned value return rate score set that meets the second preset filtering condition as a filtered value return rate score set. The fifth step involves determining each application identifier corresponding to each filtered value return rate score in the aforementioned filtered value return rate score set as a filtered application identifier set. The sixth step involves obtaining the system time as the current time. Step 7: In response to determining that the current time meets the start condition of the periodic timer, for each filter application identifier in the above set of filter application identifiers, the following asynchronous triggering processing steps are executed: Sub-step 1: In response to detecting a request message sent by the application terminal corresponding to the above filter application identifier to trigger a preset database operation, the request message is encapsulated as pending information. Sub-step 2: The pending information is stored in a message queue to update the message queue. Thus, pending information can be stored in the message queue. Sub-step 3: The pending information in the updated message queue is determined as a sequence of pending information.Therefore, a sequence of pending information for execution triggering can be obtained. When applications with high usage demand simultaneously perform database operations, each request information can be encapsulated into pending information and stored in a message queue. Then, the sequence of pending information is obtained from the message queue. Sub-step four: For the first pending information in the pending information sequence, the following triggering steps are executed: First sub-step: Parse the first pending information to obtain the request information for the corresponding preset database operation. Thus, the pending information can be parsed into the request information for the corresponding preset database operation. Second sub-step: Connect to the preset database. Third sub-step: Execute the database operation corresponding to the above request information on the preset database. Thus, the database operation corresponding to the first pending information can be executed. Fourth sub-step: Delete the first pending information from the pending information sequence to update the pending information sequence. Thus, the first pending information can be deleted from the pending information sequence to avoid affecting the database operations corresponding to other pending information. Fifth sub-step: In response to the updated pending information sequence being non-empty, the above triggering steps are executed again based on the updated pending information sequence. Therefore, database operations corresponding to the information to be processed in the sequence of information to be processed can be executed one by one, reducing high-concurrency database operations and the probability of resource contention, conflicts, and data loss. The sixth sub-step, in response to the updated sequence of information to be processed being empty, determines the time corresponding to the empty sequence as the first target time and executes the following acquisition steps: Sub-step one, acquires the system time as the second target time. Sub-step two, determines the time interval between the second target time and the first target time as the target time interval. Sub-step three, in response to the target time interval not meeting the preset time interval of the periodic timer, executes the above acquisition steps again. Sub-step four, in response to the determination that the target time interval meets the preset time interval of the periodic timer, executes the above asynchronous triggering processing steps again for each filter application identifier in the above set of filter application identifiers. This is also because the request information of each application is encapsulated into information to be processed, stored in a message queue, and then the sequence of information to be processed is obtained from the message queue. When applications with high usage demands perform database operations simultaneously, the database operations are performed sequentially based on the sequence of information to be processed. This reduces high-concurrency database operations, decreasing the probability of resource contention, conflicts, and data loss. Consequently, it reduces the number of database operation failures and minimizes the waste of computing resources.

[0094] The above embodiments of this disclosure have the following beneficial effects: the resource allocation methods of some embodiments of this disclosure reduce the waste of computer storage resources, network resources, and computing resources. Specifically, the waste of computer storage resources, network resources, and computing resources is caused by: directly adjusting the application resource quota information manually according to the importance of the application, which involves a certain degree of subjectivity. For more important applications, when the allocated application resource quota is much greater than the actual required quota, there will be an over-allocation of application resource quota, resulting in low resource utilization and thus waste of computer storage resources, network resources, and computing resources. Based on this, the resource allocation method of some embodiments of this disclosure firstly determines the total resource information of a preset database cluster on a single instance in response to the detection of resource allocation imbalance by a resource monitoring tool. Thus, total resource information used to determine value information can be obtained. Then, the resource usage information of the preset database cluster on the single instance is determined. Next, based on the total resource information and the resource usage information, the value information of the preset database cluster corresponding to the single instance is determined. Thus, value information can be used to determine the application-shared value corresponding to each application identifier. Next, the application identifiers of each application calling the aforementioned preset database cluster are determined as an application identifier set. Thus, the application identifiers of each application calling the aforementioned preset database cluster can be obtained. Then, based on the aforementioned value information and the aforementioned application identifier set, the application allocation value corresponding to each application identifier in the aforementioned application identifier set is determined, resulting in an application allocation value set. Thus, an application allocation value set representing the actual application allocation value required by each application can be obtained. Next, the application allocation values ​​in the aforementioned application allocation value set that meet preset filtering conditions are determined as the target application allocation value set. Thus, the target application allocation value set can be obtained, which can represent the application allocation value with higher allocation value among various applications. Then, the application identifier corresponding to each target application allocation value in the aforementioned target application allocation value set is determined as the target application identifier, resulting in a target application identifier set. Thus, a target application identifier set representing the application identifiers corresponding to applications with higher allocation values ​​among various applications can be obtained. Subsequently, the resource allocation quota information for each application corresponding to the aforementioned target application identifier set is determined as the application resource allocation quota information set, wherein the target application identifiers in the aforementioned target application identifier set correspond to the application resource allocation quota information in the aforementioned application resource allocation quota information set. Thus, the application resource allocation quota information set corresponding to the application with the highest application allocation value can be obtained.Finally, for each application resource allocation quota in the aforementioned application resource allocation quota information set, the application resource allocation quota information is adjusted to obtain adjusted application resource allocation quota information. The resources corresponding to the adjusted application resource allocation quota information are then allocated to the application with the corresponding application identifier. This allows for the adjustment of application resource allocation quota information with higher allocation value, resulting in adjusted application resource allocation quota information, and the resources corresponding to the adjusted allocation quota information are allocated to the application with the corresponding application identifier. Furthermore, because the application resource allocation quota information for each application with higher allocation value is determined based on the application allocation value set of resources actually needed by each application, the adjustment of the determined application resource allocation quota information is free from subjective influence, reducing the over-allocation of application resource quotas and improving resource utilization. This, in turn, reduces the waste of computer storage, network, and computing resources.

[0095] Further reference Figure 2 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of a resource allocation apparatus, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0096] like Figure 2As shown, the task information association device 200 in some embodiments includes: a first determining unit 201, a second determining unit 202, a third determining unit 203, a fourth determining unit 204, a fifth determining unit 205, a sixth determining unit 206, a seventh determining unit 207, an eighth determining unit 208, and an adjustment unit 209. Specifically, the first determining unit 201 is configured to determine the total resource information of the preset database cluster on a single instance in response to the detection of resource allocation imbalance by a resource monitoring tool; the second determining unit 202 is configured to determine the resource usage information of the preset database cluster on the single instance; the third determining unit 203 is configured to determine the value information of the preset database cluster corresponding to the single instance based on the total resource information and the resource usage information; the fourth determining unit 204 is configured to determine the application identifiers of each application calling the preset database cluster as an application identifier set; the fifth determining unit 205 is configured to determine the application-shared value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, thereby obtaining an application-shared value set; and the sixth determining unit 206 is configured to select the application-shared value set that meets the first preset filtering condition. The apportioned value of each application is determined as the target application apportioned value set; the seventh determining unit 207 is configured to determine the application identifier corresponding to each target application apportioned value in the target application apportioned value set as the target application identifier, thereby obtaining a target application identifier set; the eighth determining unit 208 is configured to determine the application allocation resource quota information corresponding to each application in the target application identifier set as the application allocation resource quota information set, wherein the target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set; the adjusting unit 209 is configured to adjust the application allocation resource quota information for each application allocation resource quota information in the application allocation resource quota information set, thereby obtaining the adjusted application allocation resource quota information, and to allocate the resources corresponding to the adjusted application allocation resource quota information to the application with the corresponding application identifier.

[0097] It is understandable that the units described in the device 200 are related to the reference. Figure 1 The steps in the method described above correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.

[0098] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0099] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0100] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.

[0101] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.

[0102] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0103] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0104] The computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: determine the total resource information of a preset database cluster on a single instance in response to detecting resource allocation imbalance through a resource monitoring tool; determine the resource usage information of the preset database cluster on the single instance; determine the value information of the preset database cluster corresponding to the single instance based on the total resource information and the resource usage information; determine the application identifiers of each application calling the preset database cluster as an application identifier set; determine the application-allocated value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, obtaining an application-allocated value set; and select the application-allocated value set that satisfies a first preset sieve... The allocated value of each application under the selected conditions is determined as the target application allocated value set; the application identifier corresponding to each target application allocated value in the target application allocated value set is determined as the target application identifier, thus obtaining the target application identifier set; the resource allocation quota information of each application corresponding to the target application identifier set is determined as the application allocation resource quota information set, wherein the target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set; for each application allocation resource quota information in the application allocation resource quota information set, the application allocation resource quota information is adjusted to obtain the adjusted application allocation resource quota information, and the resources corresponding to the adjusted application allocation resource quota information are allocated to the application with the corresponding application identifier.

[0105] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0107] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, a fifth determining unit, a sixth determining unit, a seventh determining unit, an eighth determining unit, and an adjusting unit. The names of these units do not necessarily limit the specific unit itself; for example, adjusting may also be described as "a unit that adjusts the application resource allocation quota information for each application resource allocation quota information in the above application resource allocation quota information set to obtain adjusted application resource allocation quota information."

[0108] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0109] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A resource allocation method, comprising: In response to the detection of resource allocation imbalance by resource monitoring tools, determine the total resource information of the preset database cluster on a single instance; Determine the resource usage information of the preset database cluster on the single instance; Based on the total resource information and the resource usage information, the value information of the single instance corresponding to the preset database cluster is determined; The application identifiers of each application that calls the preset database cluster are determined as a set of application identifiers; Based on the value information and the application identifier set, the application-allocated value corresponding to each application identifier in the application identifier set is determined, resulting in an application-allocated value set, including: For each application corresponding to an application identifier in the application identifier set, perform the following steps: Determine the number of times the application calls the preset database cluster within a preset time period; Based on the number of calls and the preset single call time, the total time consumed by the application in using the preset database cluster within the preset time period is determined; The determined total time is set as a total time set; Based on the total time consumption set and the value information, the application-allocated value corresponding to each application identifier in the application identifier set is determined, and the application-allocated value set is obtained. The application-allocated value that meets the first preset screening condition in the application-allocated value set is determined as the target application-allocated value set; The application identifier corresponding to each target application allocated value in the target application allocated value set is determined as the target application identifier, thus obtaining the target application identifier set; The resource allocation quota information of each application corresponding to the target application identifier set is determined as the application resource allocation quota information set, wherein the target application identifier in the target application identifier set corresponds to the application resource allocation quota information in the application resource allocation quota information set. For each application resource allocation quota in the application resource allocation quota information set, the application resource allocation quota information is adjusted to obtain the adjusted application resource allocation quota information, and the resources corresponding to the adjusted application resource allocation quota information are allocated to the application with the corresponding application identifier.

2. The method according to claim 1, wherein, The step of determining the value information of a single instance corresponding to the preset database cluster based on the total resource information and the resource usage information includes: The computing resources in the total resource information are identified as the first computing resources; The computing resources in the resource usage information are identified as the second computing resources; The value of the computing resources is determined based on the first computing resource, the second computing resource, and the first preset value corresponding to the first computing resource. The storage resource in the total resource information is identified as the first storage resource; The storage resource in the resource usage information is identified as the second storage resource; The value of the storage resources is determined based on the first storage resource, the second storage resource, and the second preset value corresponding to the first storage resource. The network resource in the total resource information is identified as the first network resource; The network resource in the resource usage information is identified as the second network resource; The value of the network resources is determined based on the first network resource, the second network resource, and the third preset value corresponding to the first network resource. Based on the value of computing resources, storage resources, and network resources, the value information of a single instance corresponding to the preset database cluster is determined.

3. The method according to claim 1, wherein, The step of determining the application-allocated value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information, to obtain the application-allocated value set, includes: Based on the total time consumption set, determine the first time consumption value; For each total elapsed time in the total elapsed time set, perform the following processing steps: The application identifier corresponding to the total time consumption is determined as the current application identifier; The time value corresponding to the total time consumption is determined as the second time consumption value; Based on the first time consumption value, the second time consumption value, and the value information, an application-shared value corresponding to the current application identifier is generated; The generated application-allocated values ​​are defined as the application-allocated value set.

4. The method according to claim 1, wherein, The step of adjusting the application resource allocation quota information to obtain adjusted application resource allocation quota information, and allocating the resources corresponding to the adjusted application resource allocation quota information to the application with the corresponding application identifier, includes: The computing resource quota in the application's allocated resource quota information is reduced by a first preset value to update the computing resource quota; The storage resource quota in the application's allocated resource quota information is reduced by a second preset value to update the storage resource quota; The network resource quota in the application's allocated resource quota information is reduced by a third preset value to update the network resource quota; The updated computing resource quota, updated storage resource quota, updated network resource quota, and application identifier of the corresponding application allocation resource quota information are identified as the adjusted application allocation resource quota information. The resources corresponding to the adjusted application allocation resource quota information are allocated to the application with the corresponding application identifier.

5. A resource allocation device, comprising: The first determining unit is configured to determine the total resource information of a preset database cluster on a single instance in response to the detection of resource allocation imbalance by a resource monitoring tool. The second determining unit is configured to determine the resource usage information of the preset database cluster on the single instance; The third determining unit is configured to determine the value information of the single instance corresponding to the preset database cluster based on the total resource information and the resource usage information; The fourth determining unit is configured to determine the application identifiers of each application that calls the preset database cluster as a set of application identifiers; The fifth determining unit is configured to determine the application-allocated value corresponding to each application identifier in the application identifier set based on the value information and the application identifier set, thereby obtaining an application-allocated value set. This includes: for each application identifier in the application identifier set, performing the following steps: determining the number of times the application calls the preset database cluster within a preset time period; determining the total time consumed by the application using the preset database cluster within the preset time period based on the number of calls and a preset single call time; determining each determined total time consumption as a total time consumption set; and determining the application-allocated value corresponding to each application identifier in the application identifier set based on the total time consumption set and the value information, thereby obtaining an application-allocated value set. The sixth determining unit is configured to determine each application allocation value in the application allocation value set that satisfies the first preset screening condition as the target application allocation value set. The seventh determining unit is configured to determine the application identifier corresponding to each target application allocated value in the target application allocated value set as the target application identifier, thereby obtaining a target application identifier set; The eighth determining unit is configured to determine the resource allocation quota information of each application corresponding to the target application identifier set as an application allocation resource quota information set, wherein the target application identifier in the target application identifier set corresponds to the application allocation resource quota information in the application allocation resource quota information set. The adjustment unit is configured to adjust the application resource allocation quota information for each application in the application resource allocation quota information set to obtain the adjusted application resource allocation quota information, and to allocate the resources corresponding to the adjusted application resource allocation quota information to the application with the corresponding application identifier.

6. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1 to 4.

7. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Engineering cost automatic allocation method and system based on engineering whole-process management

    CN114154862A

  • Data storage resource division method and device, electronic equipment and computer medium

    CN116433388A