Method, device, computer device and storage medium for predicting resource configuration value

CN117573350BActive Publication Date: 2026-10-27JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311549281.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2026-10-27
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提供了一种预测资源配置值的方法、装置、计算机设备及存储介质,以解决目标进程执行效率低的问题

Benefits of technology

[0012]实时资源利用率和历史资源利用率可以反应目标进程执行业务时占用资源的特点,因此,可以通过实时资源利用率和历史资源利用率,预测下一周期的资源利用率。实时资源空闲率和历史资源空闲率可以反应目标系统整体执行业务所占用资源的特点,因此,可以通过实时资源空闲率和历史资源空闲率,预测下一周期的资源空闲率。进一步,计算机设备可以根据预测出的资源利用率、资源空闲率、当前资源利用率配置值和资源利用率阈值,为目标进程预测一个资源配置值。通过上述方式预测出的资源利用率配置值,符合目标进程的实时需求。由于目标资源配置值是根据目标进程和目标系统的实时情况确定出的,以及,目标资源配置值每个周期都会变动,因此,目标进程可以在资源紧缺时,释放其占用的资源,也可以在资源大量空闲时,使用较多资源执行业务处理,提高效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117573350B_ABST
    Figure CN117573350B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of resource control, and discloses a method and device for predicting resource configuration value, computer equipment and storage medium.The present application obtains real-time resource utilization and historical resource utilization of a target process, real-time resource idle rate and historical resource idle rate of a target system, and a current resource utilization configuration value of the target process when reaching the trigger moment of the current period.The real-time resource utilization and the historical resource utilization are input into a first prediction model to obtain a resource utilization prediction value of the target process.The real-time resource idle rate and the historical resource idle rate are input into a second prediction model to obtain a resource idle rate prediction value of the target system.A target resource configuration value of the target process is predicted according to the resource utilization prediction value, the resource idle rate prediction value, the current resource utilization configuration value and a preconfigured resource utilization threshold value of the target process.The present application can improve the execution efficiency of the target process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of resource control technology, and more specifically to methods, apparatus, computer equipment, and storage media for predicting resource allocation values. Background Technology

[0002] In the field of resource control technology, control groups (Cgroups) are generally used to control the resources of individual processes in a system. Examples include Central Processing Unit (CPU) resources, memory resources, and network resources.

[0003] The control group contains several pre-stored fixed configurations, which specify the maximum resource utilization for a process. The Baseboard Management Controller (BMC) can bind any process to any fixed configuration. In this way, the process uses the specified fixed configuration to access the resources provided by the system.

[0004] However, when a large amount of system resources are idle, the maximum resources that the process can use are still limited by the maximum resource utilization rate specified by the fixed configuration, resulting in low execution efficiency of the process. Summary of the Invention

[0005] In view of this, the present invention provides a method, apparatus, computer device and storage medium for predicting resource allocation values ​​to solve the problem of low execution efficiency of target processes.

[0006] In a first aspect, the present invention provides a method for predicting resource allocation values, the method comprising:

[0007] When the trigger time of the current cycle is reached, obtain the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process.

[0008] The real-time resource utilization rate and the historical resource utilization rate are input into the first prediction model to obtain the predicted resource utilization rate of the target process;

[0009] The real-time resource idle rate and the historical resource idle rate are input into the second prediction model to obtain the predicted value of the resource idle rate of the target system;

[0010] Based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization rate configuration value, and the pre-configured resource utilization rate threshold of the target process, the target resource configuration value of the target process is predicted.

[0011] The method for predicting resource allocation values ​​provided by this invention has the following advantages:

[0012] Real-time and historical resource utilization rates reflect the resource consumption characteristics of a target process executing business operations. Therefore, resource utilization for the next period can be predicted using these rates. Similarly, real-time and historical resource idle rates reflect the resource consumption characteristics of the target system as a whole executing business operations. Thus, resource idle rates for the next period can be predicted using these rates. Furthermore, the computer equipment can predict a resource configuration value for the target process based on the predicted resource utilization rate, resource idle rate, current resource utilization configuration value, and resource utilization threshold. The resource utilization configuration value predicted in this way meets the real-time needs of the target process. Since the target resource configuration value is determined based on the real-time situation of the target process and the target system, and since the target resource configuration value changes every period, the target process can release its occupied resources when resources are scarce, and can also use more resources to perform business processing when resources are largely idle, thus improving efficiency.

[0013] In one optional implementation, the resource utilization threshold includes a minimum resource utilization rate, and predicting the target resource configuration value of the target process based on the predicted resource utilization value, the predicted resource idle rate value, the current resource utilization configuration value, and the pre-configured resource utilization threshold of the target process includes:

[0014] Determine whether the predicted resource idle rate is less than a first preset threshold;

[0015] When the predicted value of the resource idle rate is less than the first preset threshold, determine whether the predicted value of the resource utilization rate is greater than the current resource utilization rate configuration value.

[0016] When the predicted resource utilization rate is greater than the current resource utilization rate configuration value, a first resource utilization rate adjustment factor is determined based on the current resource utilization rate configuration value and the minimum resource utilization rate.

[0017] Based on the current resource utilization rate configuration value and the second preset threshold, a second resource utilization rate adjustment factor is determined;

[0018] A third resource utilization adjustment factor is determined based on the first preset threshold and the predicted resource idle rate.

[0019] The smallest adjustment factor among the first resource utilization adjustment factor, the second resource utilization adjustment factor, and the third resource utilization adjustment factor is determined as the first target resource utilization adjustment factor.

[0020] The target resource allocation value is determined based on the current resource utilization rate configuration value and the first target resource utilization rate adjustment factor.

[0021] Specifically, when the predicted resource utilization rate is greater than the current configured resource utilization rate, it indicates that the predicted resource utilization rate is high and the current resource idle rate is already relatively low. If the predicted resource utilization rate is directly set as the target resource configuration value, the resource idle rate will be even lower. Therefore, the computer equipment can adjust the current resource utilization rate configuration value according to the first resource utilization rate adjustment factor. This ensures that even if the target process's resource usage is limited by the target resource configuration value, the target process can still perform basic business processing. Since the actual resource usage of the target process and the target system may vary significantly in different periods, if the current resource utilization rate configuration value is adjusted by the maximum possible adjustment amount each time, it will have a significant impact on all processes of the target system. Therefore, a second resource utilization rate adjustment factor can be used to make the adjustment range smoother and achieve long-term stable adjustment. Since a large amount of idle resources in the target system will cause resource waste, a third resource utilization rate adjustment factor can be set to ensure that the target process can effectively utilize resources.

[0022] In an optional implementation, when the predicted resource utilization value is less than or equal to the current resource utilization configuration value, the method further includes:

[0023] A fourth resource utilization adjustment factor is determined based on the predicted resource utilization rate, the current resource utilization rate configuration value, and the third preset threshold.

[0024] The smallest adjustment factor among the first resource utilization rate adjustment factor, the third resource utilization rate adjustment factor, and the fourth resource utilization rate adjustment factor is determined as the second target resource utilization rate adjustment factor.

[0025] The target resource allocation value is determined based on the current resource utilization rate configuration value and the second target resource utilization rate adjustment factor.

[0026] Specifically, since the actual resource usage of the target process and system can vary significantly across different periods, adjusting the resource allocation by the maximum possible amount each time would have a substantial impact on all processes within the target system. Therefore, a fourth resource utilization adjustment factor can be used to ensure a smoother adjustment range and long-term stability.

[0027] In an optional implementation, when the predicted resource idle rate is greater than or equal to the first preset threshold, the method further includes:

[0028] Determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than or equal to a fourth preset threshold.

[0029] When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than or equal to the fourth preset threshold, a fifth resource utilization rate adjustment factor is determined based on the current resource utilization rate configuration value, the predicted resource utilization rate, and the fifth preset threshold.

[0030] The adjustment factor that is the smallest among the first resource utilization adjustment factor and the fifth resource utilization adjustment factor is determined as the third target resource utilization adjustment factor.

[0031] The target resource allocation value is determined based on the current resource utilization rate configuration value and the third target resource utilization rate adjustment factor.

[0032] Specifically, directly adjusting the current resource utilization rate to the predicted value might result in an excessively large adjustment. Therefore, the fifth resource utilization rate adjustment factor ensures a smoother adjustment range and allows for long-term stable adjustments.

[0033] In an optional implementation, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than a fourth preset threshold, the method further includes:

[0034] Determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than a sixth preset threshold.

[0035] When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than the sixth preset threshold, the current resource utilization rate configuration value is determined as the target resource configuration value.

[0036] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than the sixth preset threshold, it indicates that the current configured resource utilization rate is appropriate and no adjustment is needed. In this case, no processing is required, which can save processing resources.

[0037] In an optional implementation, the resource utilization threshold further includes a maximum resource utilization rate. When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than or equal to the sixth preset threshold, the method further includes:

[0038] The sixth resource utilization adjustment factor is determined based on the maximum resource utilization rate and the current resource utilization rate configuration value;

[0039] The seventh resource utilization adjustment factor is determined based on the predicted resource idle rate, the first preset threshold, and the fifth preset threshold.

[0040] The target resource allocation value is determined based on the current resource utilization rate configuration value, the sixth resource utilization rate adjustment factor, and the seventh resource utilization rate adjustment factor.

[0041] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than or equal to the sixth preset threshold, it indicates that the current configured resource utilization rate is too low and needs to be increased. Therefore, by using the sixth and seventh resource utilization rate adjustment factors, a suitable adjustment value can be determined, which ensures that the target process can use more resources to process business in the next cycle, thereby improving business processing efficiency, while also ensuring the smoothness of the adjustment.

[0042] In one optional implementation, determining the target resource allocation value based on the current resource utilization configuration value, the sixth resource utilization adjustment factor, and the seventh resource utilization adjustment factor includes:

[0043] Within the current polling period, an eighth resource utilization adjustment factor is determined based on the sixth resource utilization adjustment factor and the fifth preset threshold.

[0044] The product of the eighth resource utilization adjustment factor and the sixth preset threshold is rounded down to obtain the ninth resource utilization adjustment factor.

[0045] The ratio of the ninth resource utilization rate adjustment factor to the sixth preset threshold is determined as the tenth resource utilization rate adjustment factor;

[0046] Determine whether the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor;

[0047] When the tenth resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor, the target resource configuration value is determined based on the current resource utilization configuration value and the tenth resource utilization adjustment factor.

[0048] or,

[0049] When the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, the next round of querying begins. A new resource utilization adjustment factor is determined based on the resource utilization adjustment factor obtained in the current round, the fifth preset threshold, and the sixth preset threshold. This process continues until the new resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor. Then, the target resource configuration value is determined based on the new resource utilization adjustment factor and the current resource utilization configuration value.

[0050] Specifically, when the tenth resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor, it indicates that the adjustment amount indicated by the tenth resource utilization adjustment factor can make the adjustment relatively stable, and it can be used without further processing. When the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, it indicates that if the adjustment is made according to the adjustment amount indicated by the tenth resource utilization adjustment factor, it may lead to an excessively large adjustment range and unstable adjustment. Therefore, another round of processing is required. In this way, through iterative processing, the stability of the adjusted resource allocation value can be guaranteed.

[0051] In one optional implementation, when the predicted resource idle rate is less than the first preset threshold, the target resource configuration value of the target process is predicted based on the predicted resource utilization value, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured resource utilization threshold of the target process.

[0052] Use the following expression:

[0053]

[0054] Wherein, value is the target resource configuration value, cs is the current resource utilization configuration value, minV is the minimum resource utilization rate, idle is the predicted resource idle rate, and c is the predicted resource utilization rate.

[0055] Specifically, when the predicted resource utilization rate is greater than the current configured resource utilization rate, it indicates that the predicted resource utilization rate is relatively high, and the current resource idle rate is already relatively low. If the predicted resource utilization rate is directly set as the target resource configuration value, it will lead to an even lower resource idle rate. Therefore, predicting the target resource configuration value based on the above expression has the following advantages for computer equipment: First, it ensures that the target process can perform the most basic business processing (cs-minV). Second, the adjustment range is stable (0.1cs). Third, the target process can effectively utilize resources (0.2-idle).

[0056] In a second aspect, the present invention provides an apparatus for predicting resource allocation values, the apparatus comprising:

[0057] The acquisition module is used to acquire the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process when the trigger time of the current cycle is reached.

[0058] The prediction module is used to input the real-time resource utilization rate and the historical resource utilization rate into a first prediction model to obtain the predicted resource utilization rate of the target process; input the real-time resource idle rate and the historical resource idle rate into a second prediction model to obtain the predicted resource idle rate of the target system; and predict the target resource configuration value of the target process based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization rate configuration value, and the pre-configured resource utilization threshold of the target process.

[0059] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for predicting resource allocation values ​​as described in the first aspect or any corresponding embodiment thereof.

[0060] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method for predicting resource allocation values ​​as described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0061] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0062] Figure 1 This is a flowchart illustrating a method for predicting resource allocation values ​​according to an embodiment of the present invention;

[0063] Figure 2 This is a flowchart illustrating another method for predicting resource allocation values ​​according to an embodiment of the present invention;

[0064] Figure 3 This is a flowchart illustrating another method for predicting resource allocation values ​​according to an embodiment of the present invention;

[0065] Figure 4 This is a flowchart illustrating another method for predicting resource allocation values ​​according to an embodiment of the present invention;

[0066] Figure 5 This is a schematic diagram of the structure of an operating system according to an embodiment of the present invention;

[0067] Figure 6 This is a schematic diagram of the operating system predicting resource configuration values ​​according to an embodiment of the present invention;

[0068] Figure 7 This is a structural block diagram of an apparatus for predicting resource allocation values ​​according to an embodiment of the present invention;

[0069] Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0071] After developing a new project, it is necessary to add a new process on the BMC environment to provide related services. To prevent this process from overusing system resources and affecting existing services, and to ensure that the process runs with optimal performance without affecting other business operations, the resource configuration value of this process can be adjusted according to the real-time system resource usage.

[0072] This invention provides a method for predicting resource configuration values, which improves the execution efficiency of a target process by adjusting resource configuration values ​​in real time without affecting the execution of other processes.

[0073] According to an embodiment of the present invention, a method embodiment for predicting resource configuration values ​​is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0074] This embodiment provides a method for predicting resource configuration values, which can be used in computer devices, such as computers, servers, server clusters, etc. Figure 1 This is a flowchart of a method for predicting resource allocation values ​​according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0075] Step S101: When the trigger time of the current cycle is reached, obtain the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process.

[0076] The resources can be CPU resources, memory resources, network resources, etc.

[0077] The target process can be the lowest priority process among multiple processes in the target system. In a target system, if the target process has the lowest priority, the system will forcibly release the resources it occupies when resources are scarce, preventing the target process from performing even the most basic business logic. This solution, however, allows the target process to utilize more resources for business logic when resources are largely idle, and to maintain basic business logic with fewer resources even when resources are scarce.

[0078] Real-time resource utilization can be the average resource utilization of the target process at multiple points in the current period, the maximum resource utilization actually achieved by the target process in the current period, or the resource allocation value predicted for the target process in the previous period. The real-time resource utilization of the current period can be used as the historical resource utilization for the next period. Historical resource utilization can include the resource utilization of the target process in multiple historical periods prior to the current period (e.g., 15 historical periods).

[0079] The real-time resource idle rate can be the average of the resource idle rates of the target system at multiple points in the current period, or it can be the predicted value of the resource idle rate of the target system in the previous period. The real-time resource idle rate of the current period can be used as the historical resource idle rate for the next period. The historical resource idle rate can include the resource idle rate of the target system in multiple historical periods prior to the current period.

[0080] For the current resource utilization rate configuration value, if the current period is the first period, the current resource utilization rate configuration value can be determined by statistical data of resource utilization rate at multiple moments of the target process, or it can be an empirical value. If the current period is not the first period, the current resource utilization rate configuration value can be the target resource configuration value predicted in the previous period.

[0081] Specifically, at each periodic trigger, the computer device can retrieve the historical resource utilization rate of the target process from its stored database, based on the target process's identification information. It can also retrieve the historical resource idle rate of the target system from its stored database, based on the target system's identification information. Furthermore, the computer device can retrieve the current resource utilization configuration value of the target process from the control group (CGroup) configuration, based on the target process's identification information.

[0082] Step S102: Input the real-time resource utilization rate and historical resource utilization rate into the first prediction model to obtain the predicted value of the resource utilization rate of the target process.

[0083] The first prediction model can be an Autoregressive Integrated Moving Average (ARIMA) model, or it can be a machine learning model, etc.

[0084] Step S103: Input the real-time resource idle rate and the historical resource idle rate into the second prediction model to obtain the predicted value of the resource idle rate of the target system.

[0085] The second prediction model can be the same as or different from the first prediction model. The second prediction model can be an Autoregressive Integrated Moving Average (ARIMA) model, or it can be a machine learning model, etc.

[0086] Step S104: Based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization rate configuration value, and the pre-configured resource utilization rate threshold of the target process, predict the target resource configuration value of the target process.

[0087] The target resource configuration value is used to indicate the maximum resources that the target process can use in the next cycle.

[0088] Specifically, the computer equipment inputs the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured resource utilization threshold for the target process into the third prediction model to obtain the target resource configuration value. The third prediction model can be a pre-configured mathematical model or a pre-trained neural network model, etc.

[0089] The method for predicting resource allocation values ​​provided in this embodiment utilizes real-time and historical resource utilization rates to reflect the resource usage characteristics of a target process executing business operations. Therefore, the resource utilization rate for the next period can be predicted using these rates. Similarly, real-time and historical resource idle rates reflect the resource usage characteristics of the target system as a whole executing business operations. Therefore, the resource idle rate for the next period can be predicted using these rates. Furthermore, the computer device can predict a resource allocation value for the target process based on the predicted resource utilization rate, resource idle rate, current resource utilization allocation value, and resource utilization threshold. The resource utilization allocation value predicted in this way meets the real-time needs of the target process. Since the target resource allocation value is determined based on the real-time situation of the target process and the target system, and since the target resource allocation value changes every period, the target process can release its occupied resources when resources are scarce, and can also use more resources to perform business processing when resources are largely idle, thus improving efficiency.

[0090] This embodiment provides a method for predicting resource allocation values, which can be used in computer devices, such as computers, servers, server clusters, etc. When the resource utilization threshold includes the minimum resource utilization, the method of this embodiment can be used to predict the resource allocation values. Figure 2 This is a flowchart of a method for predicting resource allocation values ​​according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0091] Step S201: Determine whether the predicted resource idle rate is less than the first preset threshold.

[0092] The first preset threshold indicates that the target system has a low percentage of remaining resources during the current cycle. If these resources are not released in time during the next cycle, it may cause problems for the target system. The first preset threshold can be 0.2.

[0093] Step S202: When the predicted value of resource idle rate is less than the first preset threshold, determine whether the predicted value of resource utilization rate is greater than the current resource utilization rate configuration value.

[0094] Specifically, when the resource idle rate is less than a first preset threshold, it indicates that the target system's current resource idle rate is low, requiring the target process to release the resources it occupies. In other words, the target process's current resource utilization configuration value needs to be reduced. The amount to be reduced varies depending on the situation. Therefore, the computer device can determine whether the predicted resource utilization value is greater than the current resource utilization configuration value, and further determine the amount to be reduced based on the method corresponding to the determination result.

[0095] Step S203: When the predicted resource utilization rate is greater than the current resource utilization rate configuration value, determine the first resource utilization rate adjustment factor based on the current resource utilization rate configuration value and the minimum resource utilization rate.

[0096] Specifically, when the predicted resource utilization rate is greater than the current configured resource utilization rate, it indicates that the predicted resource utilization rate is relatively high, and the current resource idle rate is already relatively low. If the predicted resource utilization rate is directly set as the target resource configuration value, it will lead to an even lower resource idle rate. Therefore, the computer equipment can determine the first resource utilization rate adjustment factor by using the difference between the current configured resource utilization rate and the minimum resource utilization rate. The first resource utilization rate adjustment factor is used to ensure that the predicted target resource configuration value is greater than or equal to the minimum resource utilization rate. That is, it can be guaranteed that even if the target process's resource usage is limited by the target resource configuration value, the target process can still perform the most basic business processing (first condition).

[0097] Step S204: Determine the second resource utilization adjustment factor based on the current resource utilization configuration value and the second preset threshold.

[0098] Specifically, the computer equipment can determine the second resource utilization adjustment factor by multiplying the current resource utilization configuration value by the second preset threshold. The second preset threshold can be 0.1. Since the actual resource usage of the target process and the target system can vary significantly across different periods, adjusting the current resource utilization configuration value by the maximum possible adjustment amount each time would have a substantial impact on all processes in the target system. Therefore, the second resource utilization adjustment factor allows for a smoother adjustment range and long-term stable adjustments (the second condition).

[0099] Step S205: Determine the third resource utilization adjustment factor based on the first preset threshold and the predicted resource idle rate.

[0100] Specifically, the computer device can determine the difference between the first preset threshold and the predicted resource idle rate as the third resource utilization adjustment factor. Since a large amount of idle resources in the target system would result in resource waste, a third resource utilization adjustment factor can be set. This third resource utilization adjustment factor ensures that after adjusting the current resource utilization configuration value, the resource idle rate does not exceed the first preset threshold. That is, although it is desirable for the target process to reduce the maximum resources it can utilize in the next cycle, it does not need to reduce them too much; ensuring that the resource idle rate of the target system is less than or equal to the first preset threshold is sufficient (the third condition).

[0101] Step S206: The smallest adjustment factor among the first resource utilization rate adjustment factor, the second resource utilization rate adjustment factor, and the third resource utilization rate adjustment factor is determined as the first target resource utilization rate adjustment factor.

[0102] Specifically, the computer equipment can compare the first resource utilization rate adjustment factor, the second resource utilization rate adjustment factor, and the third resource utilization rate adjustment factor, and determine the smallest adjustment factor. Furthermore, the smallest adjustment factor is determined as the first target resource utilization rate adjustment factor.

[0103] Step S207: Determine the target resource allocation value based on the current resource utilization rate configuration value and the first target resource utilization rate adjustment factor.

[0104] Specifically, the computer device can determine the target resource allocation value as the difference between the current resource utilization configuration value and the first target resource utilization adjustment factor. Thus, by adjusting the current resource utilization configuration value using the first target resource utilization adjustment factor, the target resource allocation value of the target process can satisfy the first, second, and third conditions mentioned above.

[0105] Step S208: When the predicted resource utilization rate is less than or equal to the current resource utilization rate configuration value, a fourth resource utilization rate adjustment factor is determined based on the predicted resource utilization rate, the current resource utilization rate configuration value, and the third preset threshold.

[0106] Specifically, when the predicted resource utilization rate is less than or equal to the current configured resource utilization rate, directly setting the predicted resource utilization rate as the target configured resource utilization rate cannot guarantee that the predicted resource utilization rate meets the above three conditions. Furthermore, since the actual resource usage of the target process and the target system may vary significantly across different periods, adjusting the resource configuration value by the maximum adjustable amount each time would have a substantial impact on all processes of the target system. Therefore, the computer equipment can first determine the product of the third preset threshold and the predicted resource utilization rate, and then determine the difference between the current configured resource utilization rate and this product as the fourth resource utilization rate adjustment factor. The third preset threshold can be 0.9.

[0107] Step S209: The smallest adjustment factor among the first resource utilization rate adjustment factor, the third resource utilization rate adjustment factor, and the fourth resource utilization rate adjustment factor is determined as the second target resource utilization rate adjustment factor.

[0108] Specifically, the computer equipment can compare the first resource utilization rate adjustment factor, the third resource utilization rate adjustment factor, and the fourth resource utilization rate adjustment factor, and determine the smallest adjustment factor. Furthermore, the smallest adjustment factor is determined as the first target resource utilization rate adjustment factor.

[0109] Step S210: Determine the target resource allocation value based on the current resource utilization rate configuration value and the second target resource utilization rate adjustment factor.

[0110] Specifically, the computer device can determine the target resource allocation value as the difference between the current resource utilization configuration value and the second target resource utilization adjustment factor. In this way, by adjusting the current resource utilization configuration value through the second target resource utilization adjustment factor, the target resource allocation value of the target process can satisfy the first, second, and third conditions mentioned above.

[0111] The above process can be expressed as follows:

[0112]

[0113] Where value is the target resource configuration value, cs is the current resource utilization configuration value, minV is the minimum resource utilization, idle is the predicted resource idle rate, and c is the predicted resource utilization.

[0114] The method for predicting resource allocation values ​​provided in this embodiment determines a first target resource utilization adjustment factor through a first resource utilization adjustment factor, a second resource utilization adjustment factor, and a third resource utilization adjustment factor. It then determines a second target resource utilization adjustment factor through the first, third, and fourth resource utilization adjustment factors. This ensures that, under different circumstances, either the first or second target resource utilization adjustment factor can be used to ensure that when the computer equipment allocates resources to the target process at the target resource allocation value within a cycle, the target process can perform its most basic business processing, preventing excessive idle resources in the target system. Furthermore, the determination of multiple adjustment factors ensures a smoother adjustment process. In summary, predicting target resource allocation values ​​using this method can improve the effectiveness of resource utilization in the target system, increase the efficiency of business processing by the target process, and reduce the impact of each adjustment on all processes in the target system.

[0115] This embodiment provides a method for predicting resource allocation values, which can be used in computer devices, such as computers, servers, server clusters, etc. When the resource utilization threshold includes minimum and maximum resource utilization, the method of this embodiment can be used to predict resource allocation values. Figure 3 This is a flowchart of a method for predicting resource allocation values ​​according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:

[0116] Step S301: Determine whether the predicted resource idle rate is less than the first preset threshold.

[0117] Please see details Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0118] Step S302: When the predicted value of resource idle rate is greater than or equal to the first preset threshold, determine whether the ratio of the predicted value of resource utilization rate to the current resource utilization rate configuration value is less than or equal to the fourth preset threshold.

[0119] Specifically, when the predicted resource idle rate is greater than or equal to the first preset threshold, it indicates that the current resource idle rate of the target system is not low. Whether to adjust the current resource utilization configuration value and the amount of adjustment need to be determined based on the ratio of the predicted resource utilization value to the current resource utilization configuration value. Therefore, the computer equipment can first determine whether the ratio of the predicted resource utilization value to the current resource utilization configuration value is less than or equal to the fourth preset threshold. The fourth preset threshold can be 0.66.

[0120] Step S303: When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than or equal to the fourth preset threshold, the fifth resource utilization rate adjustment factor is determined based on the current resource utilization rate configuration value, the predicted resource utilization rate value, and the fifth preset threshold.

[0121] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than or equal to the fourth preset threshold, it indicates that the current configured resource utilization rate is too high and needs to be lowered. The computer equipment can adjust based on the difference between the predicted and current configured resource utilization rates. However, directly adjusting the current configured resource utilization rate to the predicted rate might result in an excessively large adjustment. Therefore, the computer equipment can determine the absolute value of the difference between the current configured and predicted resource utilization rates, then determine the ratio of this absolute value to the fifth preset threshold, and finally determine this ratio as the fifth resource utilization rate adjustment factor. The fifth preset threshold can be 2. This fifth resource utilization rate adjustment factor allows for smooth adjustment.

[0122] Step S304: The smallest adjustment factor among the first resource utilization rate adjustment factor and the fifth resource utilization rate adjustment factor is determined as the third target resource utilization rate adjustment factor.

[0123] Specifically, the computer equipment can compare the first resource utilization rate adjustment factor and the fifth resource utilization rate adjustment factor, determine the minimum adjustment factor, and further determine the minimum adjustment factor as the third target resource utilization rate adjustment factor.

[0124] Step S305: Determine the target resource allocation value based on the current resource utilization rate configuration value and the third target resource utilization rate adjustment factor.

[0125] Specifically, the computer device can determine the target resource allocation value as the difference between the current resource utilization configuration value and the third target resource utilization adjustment factor. Thus, by adjusting the current resource utilization configuration value using the third target resource utilization adjustment factor, the target resource allocation value of the target process can satisfy the first and second conditions mentioned above.

[0126] Step S306: When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than the fourth preset threshold, determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than the sixth preset threshold.

[0127] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than the fourth preset threshold, it indicates that the current configured resource utilization rate is not high, and further determination is needed to determine whether the current configured resource utilization rate should be adjusted. Therefore, the computer equipment can determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than the sixth preset threshold. The sixth preset threshold can be 0.8.

[0128] Step S307: When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than the sixth preset threshold, the current resource utilization rate configuration value is determined as the target resource configuration value.

[0129] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than the sixth preset threshold, it indicates that the current configured resource utilization rate is appropriate and no adjustment is needed.

[0130] Step S308: When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is greater than or equal to the sixth preset threshold, the sixth resource utilization rate adjustment factor is determined based on the maximum resource utilization rate and the current resource utilization rate configuration value.

[0131] Specifically, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than or equal to the sixth preset threshold, it indicates that the current configured resource utilization rate is low and needs to be increased. Therefore, the computer equipment can determine the absolute value of the first difference between the maximum resource utilization rate and the current configured resource utilization rate, and define this first absolute value as the sixth resource utilization rate adjustment factor. Here, the absolute value of this first difference represents the maximum adjustable amount.

[0132] Step S309: Determine the seventh resource utilization adjustment factor based on the predicted resource idle rate, the first preset threshold, and the fifth preset threshold.

[0133] Specifically, since the actual resource usage of the target process and the target system can vary significantly across different periods, adjusting the current resource utilization configuration value by the maximum adjustment amount each time would have a substantial impact on all processes within the target system. Therefore, the computer equipment can first determine the absolute value of the second difference between the predicted resource idle rate and the first preset threshold. Then, it determines the ratio of the absolute value of the second difference to the fifth preset threshold. Finally, this ratio is determined as the seventh resource utilization adjustment factor. The absolute value of the second difference represents the maximum amount of resources that the target system can allocate to the target process. This ratio indicates a more suitable amount of resources that the target system can allocate to the target process; as long as the adjusted resource amount is less than this ratio, the smoothness of the adjustment can be guaranteed.

[0134] Step S310: Determine the target resource allocation value based on the current resource utilization rate allocation value, the sixth resource utilization rate adjustment factor, and the seventh resource utilization rate adjustment factor.

[0135] Step S310 above may include, as shown in the flowchart above. Figure 4 As shown:

[0136] Step S3101: Within the current polling period, determine the eighth resource utilization adjustment factor based on the sixth resource utilization adjustment factor and the fifth preset threshold.

[0137] Specifically, the computer equipment can determine the ratio of the sixth resource utilization adjustment factor to the fifth preset threshold as the eighth resource utilization adjustment factor.

[0138] Step S3102: Round down the product of the eighth resource utilization adjustment factor and the sixth preset threshold to obtain the ninth resource utilization adjustment factor.

[0139] Specifically, the computer equipment can first determine the product of the eighth resource utilization adjustment factor and the sixth preset threshold, and then round down the product. The sixth preset threshold can be 100.

[0140] Step S3103: The ratio of the ninth resource utilization rate adjustment factor to the sixth preset threshold is determined as the tenth resource utilization rate adjustment factor.

[0141] Step S3104: Determine whether the tenth resource utilization rate adjustment factor is greater than the seventh resource utilization rate adjustment factor.

[0142] Specifically, computer equipment can determine whether the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, thereby determining whether the adjustment amount can ensure the stability of the adjustment.

[0143] Step S3105: When the tenth resource utilization rate adjustment factor is less than or equal to the seventh resource utilization rate adjustment factor, determine the target resource allocation value based on the current resource utilization rate allocation value and the tenth resource utilization rate adjustment factor.

[0144] Specifically, when the tenth resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor, it indicates that the adjustment amount indicated by the tenth resource utilization adjustment factor can make the adjustment relatively stable, and it can be used without further processing. Furthermore, the computer equipment can determine the target resource configuration value by subtracting the tenth resource utilization adjustment factor from the current resource utilization configuration value.

[0145] Step S3106: When the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, proceed to the next round of querying. Re-determine the new resource utilization adjustment factor based on the resource utilization adjustment factor obtained in the current round of querying, the fifth preset threshold, and the sixth preset threshold, until the new resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor. Then, determine the target resource configuration value based on the new resource utilization adjustment factor and the current resource utilization configuration value.

[0146] Specifically, when the tenth resource utilization rate adjustment factor is greater than the seventh resource utilization rate adjustment factor, it means that if the adjustment is made according to the adjustment amount indicated by the tenth resource utilization rate adjustment factor, it may lead to an excessively large adjustment range and an unstable adjustment. Therefore, another round of processing is required until the determined adjustment amount meets the requirements for a stable adjustment.

[0147] The above process can be expressed as follows:

[0148] tmp1 = max - cs……(2)

[0149]

[0150]

[0151]

[0152]

[0153] result = cs + tmp4……(7)

[0154]

[0155] Where tmp1 is the sixth resource utilization adjustment factor, target is the seventh resource utilization adjustment factor, tmp2 is the eighth resource utilization adjustment factor, tmp3 is the ninth resource utilization adjustment factor, tmp4 is the tenth resource utilization adjustment factor, and result is the target resource allocation value.

[0156] The method for predicting resource allocation values ​​provided in this embodiment determines whether to adjust the current resource utilization allocation value by comparing the ratio of the predicted resource utilization value to the current resource utilization allocation value with a fourth preset threshold and a sixth preset threshold. This allows for appropriate adjustments to the current resource utilization allocation value based on the actual situation of the target process. Furthermore, adjusting the current resource utilization allocation value according to different adjustment factors under different circumstances ensures a smoother adjustment process. Moreover, it can guarantee the target process's basic business needs even when resources are scarce, and allow the target process to utilize more resources for business processing even when resources are largely idle, thereby improving business processing efficiency.

[0157] This embodiment provides a method for predicting resource configuration values, which can be used in computer devices, such as computers, servers, server clusters, etc. The computer device may be configured with a Baseboard Management Controller (BMC) operating system, which can be configured to... Figure 5 The scheduling module, configuration value calculation module, parameter prediction module, data acquisition module, and configuration module shown in the figure work together to implement this method. Figure 6 This is a flowchart of the process for each module to predict resource configuration values. The specific processing is as follows:

[0158] At each periodic interval, the scheduling module sends an execution command to the configuration value calculation module. The execution command instructs the configuration value calculation module to predict the target resource configuration value.

[0159] After receiving the execution instruction, the configuration value calculation module sends a first acquisition instruction to the parameter prediction module. This first acquisition instruction instructs the parameter prediction module to determine the predicted resource utilization rate and the predicted resource idle rate. Upon receiving the first acquisition instruction, the parameter prediction module sends a second acquisition instruction to the data acquisition module. Upon receiving the second acquisition instruction, the data acquisition module retrieves the historical resource utilization rate of the target process and the historical resource idle rate of the target system from its stored data, and retrieves the real-time resource utilization rate of the target process and the real-time resource idle rate of the target system from the target system. The data acquisition module sends the historical resource utilization rate, real-time resource utilization rate, historical resource idle rate, and real-time resource idle rate to the parameter prediction module. The parameter prediction module inputs the historical and real-time resource utilization rates into the first prediction model to obtain the predicted resource utilization rate, and inputs the historical and real-time resource idle rates into the first prediction model to obtain the predicted resource idle rate, and then sends this predicted value to the configuration value calculation module.

[0160] After receiving the execution command, the configuration value calculation module sends a third retrieval command to the configuration module. Upon receiving the third retrieval command, the configuration module retrieves the current resource rate configuration value and resource utilization threshold of the target process from the control group and sends them to the configuration value calculation module.

[0161] After receiving the predicted resource utilization rate, predicted resource idle rate, current resource rate configuration value, and resource utilization threshold, the configuration value calculation module determines the target resource configuration value based on these values ​​and sends it to the scheduling module.

[0162] After receiving the target resource configuration value, the scheduling module determines to complete the task of the current cycle and sends the target resource configuration value to the configuration module. In the next cycle, the configuration module updates the current resource utilization configuration value to the target resource configuration value.

[0163] The method for predicting resource allocation values ​​provided in this embodiment involves various modules working together to determine the target resource allocation value based on the real-time status of the target process and the target system. This allows the control group to allocate resources to the target process based on the target resource allocation value. In situations where resources are scarce, the method ensures the target process can perform basic business operations. Conversely, when resources are largely idle, the target process can utilize more resources to perform business processing, improving business processing efficiency.

[0164] This embodiment also provides an apparatus for predicting resource allocation values, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0165] This embodiment provides an apparatus for predicting resource allocation values, such as... Figure 7 As shown, it includes:

[0166] The acquisition module 701 is used to acquire the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process when the trigger time of the current cycle is reached.

[0167] The prediction module 702 inputs real-time resource utilization and historical resource utilization into the first prediction model to obtain the predicted value of resource utilization of the target process; it inputs real-time resource idle rate and historical resource idle rate into the second prediction model to obtain the predicted value of resource idle rate of the target system; and it predicts the target resource configuration value of the target process based on the predicted value of resource utilization, the predicted value of resource idle rate, the current resource utilization configuration value, and the pre-configured resource utilization threshold of the target process.

[0168] In one alternative implementation, the resource utilization threshold includes a minimum resource utilization rate, and the prediction module 702 is used to:

[0169] Determine whether the predicted resource idle rate is less than a first preset threshold;

[0170] When the predicted value of resource idle rate is less than the first preset threshold, determine whether the predicted value of resource utilization is greater than the current resource utilization configuration value.

[0171] When the predicted resource utilization rate is greater than the current resource utilization rate configuration value, the first resource utilization rate adjustment factor is determined based on the current resource utilization rate configuration value and the minimum resource utilization rate.

[0172] The second resource utilization adjustment factor is determined based on the current resource utilization rate configuration value and the second preset threshold.

[0173] The third resource utilization adjustment factor is determined based on the first preset threshold and the predicted resource idle rate.

[0174] The smallest adjustment factor among the first resource utilization rate adjustment factor, the second resource utilization rate adjustment factor, and the third resource utilization rate adjustment factor is determined as the first target resource utilization rate adjustment factor.

[0175] The target resource allocation value is determined based on the current resource utilization rate and the first target resource utilization rate adjustment factor.

[0176] In an optional implementation, when the predicted resource utilization value is less than or equal to the current configured resource utilization value, the prediction module 702 is further configured to:

[0177] The fourth resource utilization adjustment factor is determined based on the predicted resource utilization rate, the current resource utilization rate configuration value, and the third preset threshold.

[0178] The smallest adjustment factor among the first, third, and fourth resource utilization rate adjustment factors is determined as the second target resource utilization rate adjustment factor.

[0179] The target resource allocation value is determined based on the current resource utilization rate allocation value and the second target resource utilization rate adjustment factor.

[0180] In an optional implementation, when the predicted resource idle rate is greater than or equal to a first preset threshold, the prediction module 702 is further configured to:

[0181] Determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than or equal to the fourth preset threshold.

[0182] When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than or equal to the fourth preset threshold, the fifth resource utilization rate adjustment factor is determined based on the current configured resource utilization rate, the predicted resource utilization rate, and the fifth preset threshold.

[0183] The smallest adjustment factor among the first and fifth resource utilization rate adjustment factors is determined as the third target resource utilization rate adjustment factor.

[0184] The target resource allocation value is determined based on the current resource utilization rate allocation value and the third target resource utilization rate adjustment factor.

[0185] In an optional implementation, when the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than a fourth preset threshold, the prediction module 702 is further configured to:

[0186] Determine whether the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than the sixth preset threshold;

[0187] When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than the sixth preset threshold, the current resource utilization rate configuration value is determined as the target resource configuration value.

[0188] In an optional implementation, the resource utilization threshold further includes a maximum resource utilization rate. When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than or equal to a sixth preset threshold, the prediction module 702 is further configured to:

[0189] The sixth resource utilization adjustment factor is determined based on the maximum resource utilization rate and the current resource utilization rate configuration value;

[0190] The seventh resource utilization adjustment factor is determined based on the predicted resource idle rate, the first preset threshold, and the fifth preset threshold.

[0191] The target resource allocation value is determined based on the current resource utilization rate allocation value, the sixth resource utilization rate adjustment factor, and the seventh resource utilization rate adjustment factor.

[0192] In one alternative implementation, the prediction module 702 is configured to:

[0193] Within the current polling period, the eighth resource utilization adjustment factor is determined based on the sixth resource utilization adjustment factor and the fifth preset threshold.

[0194] The product of the eighth resource utilization adjustment factor and the sixth preset threshold is rounded down to obtain the ninth resource utilization adjustment factor.

[0195] The ratio of the ninth resource utilization rate adjustment factor to the sixth preset threshold is determined as the tenth resource utilization rate adjustment factor;

[0196] Determine whether the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor;

[0197] When the tenth resource utilization rate adjustment factor is less than or equal to the seventh resource utilization rate adjustment factor, the target resource allocation value is determined based on the current resource utilization rate allocation value and the tenth resource utilization rate adjustment factor.

[0198] or,

[0199] When the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, the next round of query is initiated. A new resource utilization adjustment factor is determined based on the resource utilization adjustment factor obtained in the current round, the fifth preset threshold, and the sixth preset threshold. This process continues until the new resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor. Then, the target resource allocation value is determined based on the new resource utilization adjustment factor and the current resource utilization configuration value.

[0200] In one optional implementation, when the predicted resource idle rate is less than the first preset threshold, the target resource configuration value of the target process is predicted based on the predicted resource utilization value, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured resource utilization threshold of the target process.

[0201] Use the following expression:

[0202]

[0203] Wherein, value is the target resource configuration value, cs is the current resource utilization configuration value, minV is the minimum resource utilization rate, idle is the predicted resource idle rate, and c is the predicted resource utilization rate.

[0204] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0205] In this embodiment, the device for predicting resource allocation values ​​is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0206] This invention also provides a computer device having the above-described features. Figure 7 The apparatus shown is for predicting resource allocation values.

[0207] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 8 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.

[0208] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0209] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0210] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0211] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0212] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0213] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0214] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for predicting resource allocation values, characterized in that, The method includes: When the trigger time of the current cycle is reached, the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process are obtained, wherein the target process is the process with the lowest priority among the multiple processes of the target system. The real-time resource utilization rate and the historical resource utilization rate are input into the first prediction model to obtain the predicted resource utilization rate of the target process; The real-time resource idle rate and the historical resource idle rate are input into the second prediction model to obtain the predicted value of the resource idle rate of the target system; Based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization rate configuration value, and the pre-configured resource utilization rate threshold of the target process, predict the target resource configuration value of the target process; The resource utilization threshold includes a minimum resource utilization rate. Predicting the target resource configuration value of the target process based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured target process resource utilization threshold includes: Determine whether the predicted resource idle rate is less than a first preset threshold; When the predicted value of the resource idle rate is less than the first preset threshold, determine whether the predicted value of the resource utilization rate is greater than the current resource utilization rate configuration value. When the predicted resource utilization rate is greater than the current resource utilization rate configuration value, the difference between the current resource utilization rate configuration value and the minimum resource utilization rate is determined as the first resource utilization rate adjustment factor. The product between the current resource utilization rate configuration value and the second preset threshold is determined as the second resource utilization rate adjustment factor; The difference between the first preset threshold and the predicted resource idle rate is determined as the third resource utilization adjustment factor; The smallest adjustment factor among the first resource utilization adjustment factor, the second resource utilization adjustment factor, and the third resource utilization adjustment factor is determined as the first target resource utilization adjustment factor. The target resource configuration value is determined based on the current resource utilization configuration value and the first target resource utilization adjustment factor, wherein the target resource configuration value is used to indicate the maximum resources used by the target process in the next cycle.

2. The method according to claim 1, characterized in that, When the predicted resource utilization rate is less than or equal to the current configured resource utilization rate, the method further includes: A fourth resource utilization adjustment factor is determined based on the predicted resource utilization rate, the current resource utilization rate configuration value, and the third preset threshold. The smallest adjustment factor among the first resource utilization rate adjustment factor, the third resource utilization rate adjustment factor, and the fourth resource utilization rate adjustment factor is determined as the second target resource utilization rate adjustment factor. The target resource allocation value is determined based on the current resource utilization rate configuration value and the second target resource utilization rate adjustment factor.

3. The method according to claim 1 or 2, characterized in that, When the predicted resource idle rate is greater than or equal to the first preset threshold, the method further includes: Determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than or equal to a fourth preset threshold. When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than or equal to the fourth preset threshold, a fifth resource utilization rate adjustment factor is determined based on the current resource utilization rate configuration value, the predicted resource utilization rate, and the fifth preset threshold. The adjustment factor that is the smallest among the first resource utilization adjustment factor and the fifth resource utilization adjustment factor is determined as the third target resource utilization adjustment factor. The target resource allocation value is determined based on the current resource utilization rate configuration value and the third target resource utilization rate adjustment factor.

4. The method according to claim 3, characterized in that, When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than a fourth preset threshold, the method further includes: Determine whether the ratio of the predicted resource utilization rate to the current configured resource utilization rate is less than a sixth preset threshold. When the ratio of the predicted resource utilization rate to the current resource utilization rate configuration value is less than the sixth preset threshold, the current resource utilization rate configuration value is determined as the target resource configuration value.

5. The method according to claim 4, characterized in that, The resource utilization threshold also includes a maximum resource utilization rate. When the ratio of the predicted resource utilization rate to the current configured resource utilization rate is greater than or equal to the sixth preset threshold, the method further includes: The sixth resource utilization adjustment factor is determined based on the maximum resource utilization rate and the current resource utilization rate configuration value; The seventh resource utilization adjustment factor is determined based on the predicted resource idle rate, the first preset threshold, and the fifth preset threshold. The target resource allocation value is determined based on the current resource utilization rate configuration value, the sixth resource utilization rate adjustment factor, and the seventh resource utilization rate adjustment factor.

6. The method according to claim 5, characterized in that, The step of determining the target resource allocation value based on the current resource utilization rate configuration value, the sixth resource utilization rate adjustment factor, and the seventh resource utilization rate adjustment factor includes: Within the current polling period, an eighth resource utilization adjustment factor is determined based on the sixth resource utilization adjustment factor and the fifth preset threshold. The product of the eighth resource utilization adjustment factor and the sixth preset threshold is rounded down to obtain the ninth resource utilization adjustment factor. The ratio of the ninth resource utilization rate adjustment factor to the sixth preset threshold is determined as the tenth resource utilization rate adjustment factor; Determine whether the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor; When the tenth resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor, the target resource configuration value is determined based on the current resource utilization configuration value and the tenth resource utilization adjustment factor. or, When the tenth resource utilization adjustment factor is greater than the seventh resource utilization adjustment factor, the next round of querying begins. A new resource utilization adjustment factor is determined based on the resource utilization adjustment factor obtained in the current round, the fifth preset threshold, and the sixth preset threshold. This process continues until the new resource utilization adjustment factor is less than or equal to the seventh resource utilization adjustment factor. Then, the target resource configuration value is determined based on the new resource utilization adjustment factor and the current resource utilization configuration value.

7. The method according to claim 1 or 2, characterized in that, When the predicted resource idle rate is less than the first preset threshold, the target resource configuration value of the target process is predicted based on the predicted resource utilization value, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured resource utilization threshold of the target process. Use the following expression: Wherein, value is the target resource configuration value, cs is the current resource utilization configuration value, minV is the minimum resource utilization rate, idle is the predicted resource idle rate, and c is the predicted resource utilization rate.

8. An apparatus for predicting resource allocation values, characterized in that, The device includes: The acquisition module is used to acquire the real-time resource utilization rate and historical resource utilization rate of the target process, the real-time resource idle rate and historical resource idle rate of the target system, and the current resource utilization rate configuration value of the target process when the trigger time of the current cycle is reached. The target process is the process with the lowest priority among the multiple processes of the target system. The prediction module is used to input the real-time resource utilization rate and the historical resource utilization rate into a first prediction model to obtain a predicted value of the resource utilization rate of the target process; input the real-time resource idle rate and the historical resource idle rate into a second prediction model to obtain a predicted value of the resource idle rate of the target system; and predict the target resource configuration value of the target process based on the predicted value of the resource utilization rate, the predicted value of the resource idle rate, the current resource utilization rate configuration value, and the pre-configured resource utilization threshold of the target process. The resource utilization threshold includes a minimum resource utilization rate. Predicting the target resource configuration value of the target process based on the predicted resource utilization rate, the predicted resource idle rate, the current resource utilization configuration value, and the pre-configured target process resource utilization threshold includes: Determine whether the predicted resource idle rate is less than a first preset threshold; When the predicted value of the resource idle rate is less than the first preset threshold, determine whether the predicted value of the resource utilization rate is greater than the current resource utilization rate configuration value. When the predicted resource utilization rate is greater than the current resource utilization rate configuration value, the difference between the current resource utilization rate configuration value and the minimum resource utilization rate is determined as the first resource utilization rate adjustment factor. The product between the current resource utilization rate configuration value and the second preset threshold is determined as the second resource utilization rate adjustment factor; The difference between the first preset threshold and the predicted resource idle rate is determined as the third resource utilization adjustment factor; The smallest adjustment factor among the first resource utilization adjustment factor, the second resource utilization adjustment factor, and the third resource utilization adjustment factor is determined as the first target resource utilization adjustment factor. The target resource configuration value is determined based on the current resource utilization configuration value and the first target resource utilization adjustment factor, wherein the target resource configuration value is used to indicate the maximum resources used by the target process in the next cycle.

9. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method for predicting resource allocation values ​​as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of predicting resource allocation values ​​as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cloud platform container quota reduction method, device and system and storage medium

    CN112162827A

  • Kubernetes cluster resource dynamic adjustment method and electronic equipment

    CN113971066A