Resource arrangement method, device, equipment, and storage medium

By constructing an experience curve on the threshold relationship between resources and historical running time and overhead, and detecting and adjusting resource configuration, the problems of low resource utilization and low orchestration efficiency in the existing technology are solved, and more efficient resource management is achieved.

CN114296913BActive Publication Date: 2024-12-06浙江太美医疗科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111573681.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-12-06
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The existing resource orchestration methods have low resource utilization and low orchestration efficiency, and cannot provide reasonable orchestration plans, resulting in vacant resources or failures caused by insufficient resources.

Method used

By pre-constructing the correspondence between the resource and historical running time and the threshold range of resource overhead, that is, the experience curve, it detects whether the orchestration update conditions are met based on the application identification and current resource overhead. If so, an orchestration plan will be generated based on the current node information and presets Retrieve time to adjust resource allocation.

Benefits of technology

It improves resource utilization and orchestration efficiency, avoids resource vacancy and failures caused by insufficient resources, and provides a more reasonable resource allocation plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296913B_ABST
    Figure CN114296913B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, equipment, and storage medium for resource orchestration. The method for resource orchestration includes: obtaining an application identifier; determining the current running time, resource overhead, and pre-built experience curve of the application based on the application identifier; the experience curve includes the correspondence between the historical running time and the threshold range of the resource overhead; detecting whether the resource overhead meets the first orchestration update condition based on the experience curve and the running time; the first orchestration update condition includes: the resource overhead is not within the threshold range corresponding to the running time in the experience curve; if the resource overhead meets the first orchestration update condition, generating a first orchestration plan based on the first preset orchestration generation rule. In this way, by combining the current resource usage and the historical resource consumption, the resource utilization rate and orchestration efficiency can be effectively improved, avoiding the occurrence of idle resources or a series of failures caused by insufficient resources, and providing users with a more reasonable orchestration plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment, and storage medium for resource orchestration. Background Art

[0002] At present, some continuous integration systems on the market can achieve one-click deployment, but when orchestrating, it is easy for resources to be idle or a series of failures caused by insufficient resources, resulting in low resource utilization and failure to better meet application needs. In addition, the resources consumed by the application can only be estimated manually, resulting in low orchestration efficiency and causing a lot of inconvenience to users. Summary of the invention

[0003] In view of this, the purpose of this application is to overcome the technical problems of low resource utilization, low orchestration efficiency and inability to provide a more reasonable orchestration solution in the existing resource orchestration methods, and to provide a resource orchestration method, device and equipment, and storage medium.

[0004] To achieve the above objectives, this application adopts the following technical solutions:

[0005] A first aspect of the present application provides a method for resource scheduling, comprising:

[0006] Get the application ID;

[0007] Determine the current running time, resource cost and pre-built experience curve of the application according to the application identifier; the experience curve includes the corresponding relationship between the historical running time and the threshold range of the resource cost;

[0008] According to the experience curve and the running time, detecting whether the resource overhead meets a first orchestration update condition; the first orchestration update condition includes: the resource overhead is not within a threshold range corresponding to the running time in the experience curve;

[0009] If the resource overhead meets the first orchestration update condition, a first orchestration plan is generated according to a first preset orchestration generation rule, wherein the first preset orchestration generation rule is used to generate a resource orchestration plan based on current node information and resource overhead corresponding to current and preset traceability times, respectively.

[0010] Optionally, the resource overhead is not within a threshold range corresponding to the running time in the experience curve, including:

[0011] The duration that the resource overhead is higher than the maximum threshold corresponding to the running time in the experience curve reaches a first preset time, or the duration that the resource overhead is lower than the minimum threshold corresponding to the running time in the experience curve reaches a second preset time.

[0012] Optionally, generating a first arrangement scheme according to a first preset arrangement generation rule includes:

[0013] Obtaining the current node information and the preset tracing time;

[0014] According to the preset tracing time, determining the tracing resource overhead corresponding to the preset tracing time;

[0015] The first orchestration scheme is obtained by performing calculation using the current node information, the traceable resource cost, and the current resource cost.

[0016] Optionally, the using the current node information, the traceable resource cost and the current resource cost to perform calculation to obtain the first orchestration solution includes:

[0017] Calculating a first resource floating ratio according to the traceable resource cost and the current resource cost;

[0018] Calculate and obtain a first scheduling result according to the first resource floating ratio and the current node information;

[0019] The first arrangement scheme is obtained according to the first arrangement result.

[0020] Optionally, the method for constructing the experience curve includes:

[0021] Based on the application identifier, obtaining historical resource overhead and offset information of various resources at each time point in history;

[0022] For each resource, according to the offset information and the historical resource expenditure at each time point, the threshold range of the historical resource expenditure at each time point is calculated to obtain the corresponding relationship between the time of various resources and the threshold range;

[0023] According to the correspondence between the time and the threshold range of various resources, the experience curve corresponding to the resource is constructed.

[0024] Optionally, after generating the first arrangement scheme, the method further includes:

[0025] The first arrangement plan is sent to a user, so that the user determines a first execution plan according to the first arrangement plan.

[0026] Optionally, after detecting whether the resource overhead meets the first orchestration update condition, the method further includes:

[0027] If the resource overhead does not satisfy the first orchestration update condition, determining a predicted time according to the application identifier and the running time;

[0028] According to the experience curve and the predicted time, detecting whether the resource overhead meets a second scheduling update condition; the second scheduling update condition includes: the resource overhead is not within a threshold range corresponding to the predicted time in the experience curve;

[0029] If the resource overhead meets the second orchestration update condition, a second orchestration plan is generated according to a second preset orchestration generation rule, wherein the second preset orchestration generation rule is used to generate a resource orchestration plan based on the current node information, the current prediction time, the experience curve and the current resource overhead.

[0030] Optionally, generating a second arrangement scheme according to a second preset arrangement generation rule includes:

[0031] Obtaining the current node information;

[0032] The second scheduling solution is obtained by performing calculation using the current node information, the predicted time, the current resource cost, and the experience curve.

[0033] Optionally, the using the current node information, the predicted time, the current resource cost and the experience curve to perform calculation to obtain the second scheduling solution includes:

[0034] Calculating a second resource floating ratio according to the predicted time, the current resource expenditure and the experience curve;

[0035] Calculating a second scheduling result according to the second resource floating ratio and the current node information;

[0036] The second arrangement scheme is obtained according to the second arrangement result.

[0037] Optionally, determining the predicted time according to the application identifier and the running time includes:

[0038] According to the application identifier, obtaining a prediction time threshold;

[0039] The predicted time is determined according to the predicted time threshold and the running time.

[0040] Optionally, after generating the second arrangement scheme, the method further includes:

[0041] The second arrangement plan is sent to a user, so that the user determines a second execution plan according to the second arrangement plan.

[0042] A second aspect of the present application provides a resource scheduling device, including:

[0043] An acquisition module, used to obtain an application identifier;

[0044] A determination module, configured to determine the current running time, resource cost and pre-built experience curve of the application according to the application identifier; the experience curve includes a correspondence between the historical running time and the threshold range of the resource cost;

[0045] a detection module, configured to detect whether the resource overhead satisfies a first orchestration update condition according to the experience curve and the running time; the first orchestration update condition comprising: the resource overhead is not within a threshold range corresponding to the running time in the experience curve;

[0046] A generation module is used to generate a first orchestration plan according to a first preset orchestration generation rule if the resource overhead meets the first orchestration update condition, wherein the first preset orchestration generation rule is used to generate a resource orchestration plan based on current node information and resource overhead corresponding to current and preset traceability times respectively.

[0047] A third aspect of the present application provides a resource scheduling device, including:

[0048] A processor, and a memory connected to the processor;

[0049] The memory is used to store computer programs;

[0050] The processor is used to call and execute the computer program in the memory to perform the method according to the first aspect of the present application.

[0051] A fourth aspect of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource orchestration method described in the first aspect of the present application are implemented.

[0052] The technical solution provided by this application may have the following beneficial effects:

[0053] In the scheme of the present application, an experience curve for each resource is pre-constructed, and the experience curve includes the correspondence between the historical running time and the threshold range of resource overhead. Based on this, after obtaining the application identifier, the current running time, resource overhead and experience curve corresponding to the resource of the application can be determined according to the application identifier, and then the resource overhead is detected according to the experience curve and the running time to determine whether the first orchestration update condition is met to determine whether the current resource overhead exceeds the historical resource overhead. Among them, the first orchestration update condition includes: the resource overhead is not in the threshold range corresponding to the running time in the experience curve. If the resource overhead meets the first orchestration update condition, it means that the resource overhead is not in the threshold range corresponding to the running time in the experience curve, that is, the current resource overhead exceeds the threshold range of the resource overhead at the corresponding time in history, then it is necessary to generate the first orchestration scheme according to the first preset orchestration generation rule, wherein the first orchestration generation rule is used to generate the resource orchestration scheme based on the current node information, the resource overhead corresponding to the current and preset traceability time, respectively. In this way, by combining the current resource usage with the historical resource consumption, we can effectively improve resource utilization and orchestration efficiency, avoid idle resources or a series of failures caused by insufficient resources, and provide users with a more reasonable orchestration plan. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 This is a flowchart of a resource orchestration method provided by an embodiment of the present application.

[0056] Figure 2 This is a flowchart of a resource orchestration device provided by another embodiment of the present application.

[0057] Figure 3 This is a flowchart of a resource scheduling device provided by another embodiment of the present application.

[0058] Figure 4 This is a flowchart of a resource orchestration device provided by another embodiment of the present application.

[0059] Figure 5 It is a schematic diagram of an experience curve provided in another embodiment of the present application.

[0060] Figure 6 This is a flowchart of a resource scheduling device provided by another embodiment of the present application.

[0061] Figure 7 This is a flowchart of a resource scheduling device provided by another embodiment of the present application.

[0062] Figure 8 This is a flowchart of a resource scheduling device provided by another embodiment of the present application.

[0063] Fig. 9 This is a flowchart of a resource scheduling device provided by another embodiment of the present application.

[0064] Fig.10 It is a structural diagram of a resource orchestration device provided by another embodiment of the present application.

[0065] Fig.11 It is a structural diagram of a resource orchestration device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other implementation methods obtained by ordinary technicians in the field without creative work belong to the scope of protection of the present application.

[0067] At present, the orchestration operations of some containers on the market are relatively independent and cannot be combined with the overall business architecture for orchestration operations. There is no clear understanding of information such as the available resources of the system and the resources to be consumed, resulting in low resource utilization and failure to provide a more reasonable orchestration solution based on the current resource usage. To this end, the embodiments of the present application provide a method for resource orchestration, such as Figure 1 As shown, the method may at least include the following steps:

[0068] Step 11: Get the application ID.

[0069] The application identifier is the identity information of the application. During implementation, the application identifier may be an identity code, and different identity codes represent different applications.

[0070] Step 12: Determine the current running time, resource cost and pre-built experience curve of the application according to the application identifier; the experience curve includes the corresponding relationship between the historical running time and the threshold range of the resource cost.

[0071] During implementation, each application has its unique application identifier. Based on the application identifier, the current running time, resource overhead and experience curve of the application can be determined. Among them, resource overhead is the consumption information of resources, such as the percentage of CPU usage, memory usage and other information. In order to ensure that the consumption of each resource is known, the correspondence between resources and historical experience curves is pre-constructed, so that each resource corresponds to an experience curve. In this way, while determining the resource overhead, the experience curve of the resource can also be determined. The experience curve corresponds to the application one-to-one, and the experience curve includes the correspondence between the historical running time of the application and the threshold range of resource overhead.

[0072] Step 13: Detect whether the resource overhead meets the first orchestration update condition based on the experience curve and the running time; the first orchestration update condition includes: the resource overhead is not within the threshold range corresponding to the running time in the experience curve.

[0073] Step 14: If the resource overhead meets the first orchestration update condition, generate a first orchestration plan according to a first preset orchestration generation rule, wherein the first preset orchestration generation rule is used to generate a resource orchestration plan based on the current node information and the resource overhead corresponding to the current and preset traceability times, respectively.

[0074] In this embodiment, an experience curve for each resource is pre-constructed, and the experience curve includes a correspondence between the historical running time and the threshold range of resource overhead. Based on this, after obtaining the application identifier, the current running time, resource overhead and experience curve corresponding to the resource of the application can be determined according to the application identifier, and then the resource overhead is detected according to the experience curve and the running time to determine whether the first orchestration update condition is met to determine whether the current resource overhead exceeds the historical resource overhead. Among them, the first orchestration update condition includes: the resource overhead is not in the threshold range corresponding to the running time in the experience curve. If the resource overhead meets the first orchestration update condition, it means that the resource overhead is not in the threshold range corresponding to the running time in the experience curve, that is, the current resource overhead exceeds the threshold range of the resource overhead at the corresponding time in history, then it is necessary to generate a first orchestration scheme according to the first preset orchestration generation rule, wherein the first orchestration generation rule is used to generate a resource orchestration scheme based on the current node information, the resource overhead corresponding to the current and preset traceability time, respectively. In this way, by combining the current resource usage with the historical resource consumption, we can effectively improve resource utilization and orchestration efficiency, avoid idle resources or a series of failures caused by insufficient resources, and provide users with a more reasonable orchestration plan.

[0075] In actual applications, when an application is released, users can choose to load conventional resource configurations according to their needs, such as the maximum 1G memory and the minimum 0.5G memory recommended for the application recorded in the Configuration Management Database (CMDB). Assume that during operation, the resource overhead at the current moment exceeds the threshold range corresponding to the current moment in the experience curve, indicating that the resource overhead at the current moment exceeds the corresponding historical resource overhead, that is, the current resource configuration can no longer meet the current resource overhead. In order to improve resource utilization, a new resource scheduling plan needs to be given. Based on this, a first scheduling plan can be given according to the first preset scheduling generation rule.

[0076] Similarly, if the resource overhead does not meet the first scheduling update condition, it means that the current resource overhead does not exceed the corresponding historical resource overhead, that is, the current resource configuration can meet the current resource consumption, and there is no need to give a new resource scheduling plan for the current resource configuration.

[0077] In some embodiments, in order to avoid interference of short-term changes in resource overhead with judgment of resource usage, the above-mentioned first orchestration update condition may specifically include: the duration of resource overhead being higher than the maximum threshold of the corresponding running time in the experience curve reaches a first preset time, or the duration of resource overhead being lower than the minimum threshold of the corresponding running time in the experience curve reaches a second preset time.

[0078] During implementation, if the resource overhead continues to be higher than the maximum threshold of the corresponding running time in the experience curve for the first preset time, or the resource overhead continues to be lower than the minimum threshold of the corresponding running time in the experience curve for the second preset time, it means that the time when the resource overhead is not within the threshold range of the corresponding running time in the experience curve is continuous and is not an instantaneous interference, then a new resource scheduling plan should be given.

[0079] Among them, the first preset time and the second preset time can be set according to actual needs and are not limited here.

[0080] Figure 2 The flowchart of a resource scheduling method provided by another embodiment of the present application is shown. Figure 1 The present application is extended based on the embodiment shown Figure 2 The embodiment shown is described below in detail. Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0081] like Figure 2As shown, in an embodiment of the present application, in order to enable the obtained first orchestration scheme to meet the current resource overhead requirements and maximize resource utilization, when generating the first orchestration scheme according to the first preset orchestration generation rule, at least the following implementation steps may be included:

[0082] Step 201: Obtain current node information and preset tracing time.

[0083] Step 202: According to the preset tracing time, determine the tracing resource overhead corresponding to the preset tracing time.

[0084] Step 203: Calculate using current node information, traced resource overhead, and current resource overhead to obtain a first scheduling solution.

[0085] Among them, the preset tracing time can be set according to actual usage requirements and is not limited here.

[0086] Figure 3 The flowchart of a resource scheduling method provided by another embodiment of the present application is shown. Figure 2 The present application is extended based on the embodiment shown Figure 3 The embodiment shown is described below in detail. Figure 3 The differences and similarities of the illustrated embodiments are not described in detail.

[0087] like Figure 3 As shown, in an embodiment of the present application, the step of obtaining a first orchestration scheme by calculating using current node information, traceable resource overhead, and current resource overhead may at least include the following implementation steps:

[0088] Step 301: Calculate a first resource floating ratio according to the traceable resource cost and the resource cost.

[0089] Step 302: Calculate and obtain a first scheduling result according to the first resource floating ratio and current node information.

[0090] Step 303: Obtain a first arrangement plan according to the first arrangement result.

[0091] In specific implementation, after determining that the resource overhead meets the first scheduling update condition, the preset tracing time can be obtained, and the tracing resource overhead corresponding to the preset tracing time can be determined according to the preset tracing time. For example, the preset tracing time can be set to 30 minutes ago. If the current time is 10 o'clock in the morning, the resource overhead at 9:30 in the morning is the tracing resource overhead. Then, the first resource floating ratio can be calculated based on the tracing resource overhead and the current resource overhead, where the first resource floating ratio = (current resource overhead - tracing resource overhead) / tracing resource overhead. The first resource floating ratio reflects the floating situation of the current resource overhead.

[0092] After obtaining the first resource floating ratio, the first orchestration result can be determined based on the first resource floating ratio and the current node information. Among them, the current node information can be the current number of nodes, and the first orchestration result = the current number of nodes * (1 + the first resource floating ratio), that is, the first orchestration result is the adjusted optimal number of nodes. In this way, the first orchestration plan can be obtained based on the first orchestration result. For example, if the tracing resource overhead is 2G memory usage and the resource overhead is 3G memory usage, then the first resource floating ratio is calculated to be 0.5. If the current number of nodes is 10, it can be determined that the first orchestration result = 10*(1+0.5) = 15. The first orchestration plan can be to adjust the current number of nodes to 15. In other words, from the preset tracing overhead to the current resource overhead, the memory usage has increased by 1G, and may be in a state of continuous increase. In order to make the adjusted number of nodes meet the memory usage requirements, the current number of nodes needs to be expanded, and the number of nodes after expansion should be 15.

[0093] By calculating the current resource overhead fluctuation, and determining the resource scheduling plan according to the current resource overhead fluctuation, a more reasonable resource allocation can be provided for the current resource overhead, and resource utilization can be further improved.

[0094] It should be noted that when calculating the number of nodes, the number of nodes must be a positive integer, and to ensure the accuracy of the first scheduling solution, when the first resource floating ratio is a positive number, the first scheduling result can be obtained by rounding up; when the first floating ratio is a negative number, the first scheduling result can be obtained by rounding down. In this way, when the current node information is the current number of nodes, the number of nodes obtained by the first scheduling result is a positive integer.

[0095] In some embodiments, after obtaining the first orchestration plan, in order to ensure that the adjustment of resource orchestration meets user requirements, the first orchestration plan may be sent to the user so that the user determines the first execution plan according to the first orchestration plan.

[0096] In specific implementation, the first arrangement plan can be provided to the user as a suggested execution plan. Whether to execute it in the end and whether the plan needs to be further adjusted are determined by the user and the execution instruction is issued, so that the user can fully understand the current status of the application.

[0097] In some embodiments, in order to monitor the current resource consumption in real time, a more reasonable scheduling solution can be provided in time when the current configuration does not meet the resource demand, such as Figure 4 As shown, the method for constructing the experience curve may include the following steps:

[0098] Step 401: Based on the application identifier, obtain historical resource overhead and offset information of various resources at each historical time point.

[0099] Step 402: For each resource, based on the offset information and the historical resource overhead at each time point, calculate the threshold range of the historical resource overhead at each time point, and obtain the corresponding relationship between the time of various resources and the threshold range.

[0100] Step 403: construct an experience curve corresponding to the resource according to the correspondence between the time of various resources and the threshold range.

[0101] The offset information can be set according to actual needs and is not limited here.

[0102] In specific implementation, the experience curve records the historical resource overhead at each time point in history. The offset information can be manually adjustable. For example, if the offset information is ±5%, the historical resource overhead at each time point plus the offset information can be used to obtain the maximum and minimum values ​​of the historical resource overhead at that time point, and thus determine the threshold range of the historical resource overhead at that time point. If the data per minute is aggregated into threshold ranges of multiple dimensions such as every 15 minutes / 30 minutes / 60 minutes / 120 minutes, these threshold ranges are the resource limit ranges orchestrated by the application in the cluster.

[0103] When the resource configuration values ​​currently applied are not scattered within the range of the corresponding historical resource configuration values, a first scheduling solution needs to be given to ensure the timeliness of resource scheduling. Figure 5 The figure shows an experience curve. The black line represents the historical resource overhead at a specific moment. The gray area is the threshold range after the historical resource overhead is added with the offset information. The x-axis is the time within the cycle. The time dimension of the cycle can be a few days, a few months, or a year. The specific setting can be based on actual needs and is not limited here.

[0104] The experience curve constructed in this way takes into account the possible fluctuation range of resource overhead, so that when the experience curve is subsequently used to detect the current resource usage, some interference is eliminated and a more accurate detection result is provided.

[0105] In practical applications, the experience curve is obtained through the accumulation of persistent daily monitoring data. Therefore, the experience curve can be continuously updated with the passage of time to ensure the reliability and accuracy of the experience curve.

[0106] In actual business, some application services start very slowly. It is possible that when the application startup is not completed, external requests will cause the application service to be unable to bear and crash. Therefore, in some embodiments, after the above step 13, if Figure 6 As shown, the resource arrangement method may further include the following steps:

[0107] Step 601: If the resource cost does not meet the first orchestration update condition, determine the prediction time according to the application identifier and the running time.

[0108] Step 602: Detect whether the resource overhead meets the second orchestration update condition according to the experience curve and the predicted time; the second orchestration update condition includes: the resource overhead is not within the threshold range corresponding to the predicted time in the experience curve.

[0109] The resource overhead is not within the threshold range of the corresponding prediction time in the experience curve, including: the resource overhead is higher than the maximum threshold of the corresponding prediction time in the experience curve, or the resource overhead is lower than the minimum threshold of the corresponding prediction time in the experience curve.

[0110] Step 603: If the resource cost satisfies the second orchestration update condition, generate a second orchestration plan according to a second preset orchestration generation rule, wherein the second preset orchestration generation rule is used to generate a resource orchestration plan based on current node information, predicted time, experience curve and current resource cost.

[0111] In this way, data (experience curve) can be accumulated based on historical observations of the business, and capacity expansion actions can be taken in advance for possible resource peaks, greatly avoiding service abnormalities caused by a large number of requests at an instant, or capacity reduction actions can be taken in advance for possible troughs to ensure resource utilization.

[0112] Figure 7 The flowchart of a resource scheduling method provided by another embodiment of the present application is shown. Figure 6 The present application is extended based on the embodiment shown Figure 7 The embodiment shown is described below in detail. Figure 7 The differences and similarities of the illustrated embodiments are not described in detail.

[0113] like Figure 7 As shown, in the embodiment of the present application, the step of determining the predicted time according to the application identifier and the running time may at least include the following implementation steps:

[0114] Step 701: Obtain a prediction time threshold according to an application identifier.

[0115] Step 702: Determine the prediction time according to the prediction time threshold and the running time.

[0116] During implementation, the prediction time may be the running time plus the prediction time threshold. For example, if the prediction time threshold is 1 hour and the running time is 8 a.m., the prediction time may be determined to be 9 a.m. based on the prediction time threshold and the current running time. The prediction time threshold may be a time threshold given manually. By setting the prediction time threshold, the current prediction time may be determined based on the current running time, so as to ensure real-time detection of resource overhead in different time periods.

[0117] Specifically, the prediction time threshold can be set according to actual needs and is not limited here.

[0118] Figure 8 The flowchart of a resource scheduling method provided by another embodiment of the present application is shown. Figure 7 The present application is extended based on the embodiment shown Figure 8 The embodiment shown is described below in detail. Figure 8 The differences and similarities of the illustrated embodiments are not described in detail.

[0119] like Figure 8 As shown, in the embodiment of the present application, in order to enable the obtained second orchestration scheme to meet the current resource overhead requirements and maximize resource utilization, the step of generating the second orchestration scheme according to the second preset orchestration generation rule may at least include the following implementation steps:

[0120] Step 801: Get current node information.

[0121] Step 802: Calculate using current node information, predicted time, current resource cost and experience curve to obtain a second scheduling solution.

[0122] Through the current resource expenditure, predicted time and experience curve, the resource expenditure trend from the current time to the predicted time can be inferred. Combining the current node information and the inferred resource expenditure trend, a second scheduling plan can be obtained to provide more reasonable scheduling suggestions.

[0123] Fig. 9 The flowchart of a resource scheduling method provided by another embodiment of the present application is shown. Figure 8 The present application is extended based on the embodiment shown Fig. 9 The embodiment shown is described below in detail. Fig. 9 The differences and similarities of the illustrated embodiments are not described in detail.

[0124] like Fig. 9 As shown, in an embodiment of the present application, the current node information, the predicted time, the current resource cost and the experience curve are calculated to obtain the step of obtaining the second scheduling solution, which may at least include the following implementation steps:

[0125] Step 901: Calculate a second resource floating ratio according to the predicted time, current resource cost and experience curve.

[0126] Step 902: Calculate and obtain a second scheduling result according to the second resource floating ratio and current node information.

[0127] Step 903: Obtain a second arrangement plan according to the second arrangement result.

[0128] In specific implementation, after determining that the resource overhead meets the second scheduling update condition, the time point at which the current resource overhead is first met after the predicted time can be determined from the experience curve as the deadline time point according to the predicted time and the current resource overhead, and the maximum / minimum threshold value between the predicted time and the deadline time point can be determined from the experience curve as the limit value. For example, the current running time is 10 o'clock in the morning, the resource overhead is 6G memory usage, the predicted time is 12 o'clock noon, and the historical resource overhead at 12 o'clock noon is 7G memory usage from the experience curve, then the current resource overhead meets the second scheduling update condition, at this time, the current resource overhead can be compared with the threshold range after 12 o'clock noon in the experience curve, and the time point at which the current resource overhead first meets the threshold range after 12 o'clock noon in the experience curve is determined as the deadline time point, if there is a peak between 12 o'clock noon and the deadline time point, the historical resource overhead corresponding to the maximum threshold during this period is determined as the limit value; if there is a trough between 12 o'clock noon and the deadline time point, the historical resource overhead corresponding to the minimum threshold during this period is determined as the limit value.

[0129] After obtaining the limit value, the second resource floating ratio can be calculated based on the limit value and the current resource overhead, where the second resource floating ratio = (limit value - current resource overhead) / current resource overhead. After obtaining the second resource floating ratio, the second scheduling result can be determined based on the second resource floating ratio and the current node information. Wherein, the current node information can be the current number of nodes, then the second scheduling result = the current number of nodes * (1 + second resource floating ratio), that is, the second scheduling result is the adjusted optimal number of nodes. In this way, the second scheduling plan can be obtained based on the second scheduling result, and the early warning of cluster resources can be realized. In the absence of emergencies, the adjusted resource configuration can meet the resource overhead in the time period from the current time to the predicted time.

[0130] Similarly, when calculating the number of nodes, the number of nodes must be a positive integer, and, to ensure the accuracy of the second scheduling solution, when the second resource floating ratio is a positive number, the second scheduling result can be obtained by rounding up; when the second floating ratio is a negative number, the second scheduling result can be obtained by rounding down. In this way, when the current node information is the current number of nodes, the number of nodes obtained by the second scheduling result is a positive integer.

[0131] After obtaining the second orchestration plan, in order to ensure that the adjustment of resource orchestration meets the user's requirements, the second orchestration plan can be sent to the user so that the user can determine the second execution plan according to the second orchestration plan. In this way, the second orchestration plan can be provided to the user as a suggested execution plan. Whether to execute it in the end and whether to make further adjustments to the plan are determined by the user and an execution instruction is issued, so that the user can fully understand the current application status.

[0132] Based on the same technical concept, the embodiment of the present application provides a resource scheduling device, such as Fig.10 As shown, the device may include: an acquisition module 1001, used to acquire an application identifier; a determination module 1002, used to determine, based on the application identifier, the running time, resource overhead and a pre-built experience curve corresponding to the application identifier; a detection module 1003, used to detect whether the resource overhead meets a first orchestration update condition based on the experience curve and the running time; the first orchestration update condition includes: the duration of the resource overhead being higher than the maximum threshold of the corresponding running time in the experience curve reaches a preset time, or the duration of the resource overhead being lower than the minimum threshold of the corresponding running time in the experience curve reaches a preset time; a generation module 1004, used to generate a first orchestration plan according to a first preset orchestration generation rule if the resource overhead meets the first orchestration update condition.

[0133] Among them, the resource overhead is not within the threshold range of the corresponding running time in the experience curve, which may specifically include: the duration of the resource overhead being higher than the maximum threshold of the corresponding running time in the experience curve reaches a first preset time, or the duration of the resource overhead being lower than the minimum threshold of the corresponding running time in the experience curve reaches a second preset time.

[0134] Optionally, when generating the first orchestration plan according to the first preset orchestration generation rule, the generation module 1004 can be specifically used to: obtain current node information and a preset traceability time; determine the traceability resource overhead corresponding to the preset traceability time according to the preset traceability time; and calculate using the current node information, the traceability resource overhead and the resource overhead to obtain the first orchestration plan.

[0135] Optionally, when the current node information, the traced resource overhead and the resource overhead are used to calculate and obtain the first orchestration plan, the generation module 1004 can be specifically used to: calculate a first resource floating ratio based on the traced resource overhead and the resource overhead; calculate a first orchestration result based on the first resource floating ratio and the current node information; and obtain a first orchestration plan based on the first orchestration result.

[0136] Optionally, the resource orchestration device may further include a construction module, which may be used to: obtain historical resource overhead and offset information of various resources at each time point in history based on an application identifier; for each resource, calculate a threshold range of the historical resource overhead at each time point based on the offset information and the historical resource overhead at each time point, and obtain a correspondence between the time of various resources and the threshold range; and construct an experience curve corresponding to the resource based on the correspondence between the time of various resources and the threshold range.

[0137] Optionally, the resource scheduling device may further include a first sending module, configured to send the first scheduling solution to a user, so that the user determines a first execution solution according to the first scheduling solution.

[0138] Optionally, after detecting whether the resource overhead meets the first orchestration update condition, generation module 1004 can also be used to: if the resource overhead does not meet the first orchestration update condition, determine the prediction time according to the application identifier and the running time; based on the experience curve and the prediction time, detect whether the resource overhead meets the second orchestration update condition; the second orchestration update condition includes: the resource overhead is not within the threshold range corresponding to the prediction time in the experience curve; if the resource overhead meets the second orchestration update condition, generate a second orchestration plan according to a second preset orchestration generation rule.

[0139] Optionally, when generating the second orchestration plan according to the second preset orchestration generation rule, the generation module 1004 can be specifically used to: obtain current node information; and calculate using the current node information, predicted time, resource overhead and experience curve to obtain the second orchestration plan.

[0140] Optionally, when the second orchestration plan is obtained by calculating using the current node information, predicted time, resource overhead and experience curve, the generation module 1004 can be specifically used to: calculate a second resource floating ratio based on the predicted time, resource overhead and experience curve; calculate a second orchestration result based on the second resource floating ratio and the current node information; and obtain a second orchestration plan based on the second orchestration result.

[0141] Optionally, when the prediction time is determined according to the application identifier and the running time, the generation module 1004 can be specifically used to: obtain a prediction time threshold according to the application identifier; and determine the prediction time according to the prediction time threshold and the running time.

[0142] Optionally, the resource scheduling device may further include a second sending module, and the second sending module may be configured to send the second scheduling solution to the user, so that the user determines the second execution solution according to the second scheduling solution.

[0143] During implementation, the specific implementation of the resource orchestration device provided in the embodiments of the present application can refer to the specific implementation of the resource orchestration method described in any of the above embodiments, which will not be repeated here.

[0144] The embodiment of the present application also provides a resource scheduling device, such as Fig.11 As shown, the device may include: a processor 1101, and a memory 1102 connected to the processor 1101; the memory 1102 is used to store computer programs; the processor 1101 is used to call and execute the computer program in the memory 1102 to perform the resource orchestration method as described in any of the above embodiments.

[0145] During implementation, the specific implementation of the resource orchestration device provided in the embodiments of the present application can refer to the specific implementation of the resource orchestration method described in any of the above embodiments, which will not be repeated here.

[0146] An embodiment of the present application further provides a storage medium, wherein the storage medium stores a computer program. When the computer program is executed by a processor, each step of the resource orchestration method described in any of the above embodiments is implemented.

[0147] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0148] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0149] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0150] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0151] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0152] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0153] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0154] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0155] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for resource scheduling, characterized in that: include: Get the application ID; Determine the current running time, resource cost and pre-built experience curve of the application according to the application identifier; the experience curve includes the corresponding relationship between the historical running time and the threshold range of the resource cost; detecting, according to the experience curve and the running time, whether the resource overhead satisfies a first orchestration update condition; The first orchestration update condition includes: the duration of the resource cost being higher than the maximum threshold of the corresponding running time in the experience curve reaches a first preset time, or the duration of the resource cost being lower than the minimum threshold of the corresponding running time in the experience curve reaches a second preset time; If the resource overhead meets the first orchestration update condition, the current node information and the preset traceability time are obtained; according to the preset traceability time, the traceability resource overhead corresponding to the preset traceability time is determined; and the current node information, the traceability resource overhead and the current resource overhead are used to perform calculations to obtain a first orchestration plan.

2. The method for resource arrangement according to claim 1, characterized in that: The resource overhead is not within a threshold range corresponding to the running time in the experience curve, including: The duration that the resource overhead is higher than the maximum threshold corresponding to the running time in the experience curve reaches a first preset time, or the duration that the resource overhead is lower than the minimum threshold corresponding to the running time in the experience curve reaches a second preset time.

3. The resource scheduling method according to claim 1, characterized in that: The calculating by using the current node information, the traceable resource cost and the current resource cost to obtain the first arrangement scheme includes: Calculating a first resource floating ratio according to the traceable resource cost and the current resource cost; Calculate and obtain a first scheduling result according to the first resource floating ratio and the current node information; The first arrangement scheme is obtained according to the first arrangement result.

4. The method for resource arrangement according to claim 1, characterized in that: The method for constructing the experience curve includes: Based on the application identifier, obtaining historical resource overhead and offset information of various resources at each time point in history; For each resource, according to the offset information and the historical resource expenditure at each time point, the threshold range of the historical resource expenditure at each time point is calculated to obtain the corresponding relationship between the time of various resources and the threshold range; According to the correspondence between the time and the threshold range of various resources, the experience curve corresponding to the resource is constructed.

5. The method for resource arrangement according to claim 1, characterized in that: After obtaining the first arrangement scheme, the method further includes: The first arrangement plan is sent to a user, so that the user determines a first execution plan according to the first arrangement plan.

6. The method for resource arrangement according to claim 1, characterized in that: After detecting whether the resource overhead meets the first orchestration update condition, the method further includes: If the resource overhead does not satisfy the first orchestration update condition, determining a predicted time according to the application identifier and the running time; According to the experience curve and the predicted time, detecting whether the resource overhead meets a second scheduling update condition; the second scheduling update condition includes: the resource overhead is not within a threshold range corresponding to the predicted time in the experience curve; If the resource overhead meets the second orchestration update condition, a second orchestration plan is generated according to a second preset orchestration generation rule, wherein the second preset orchestration generation rule is used to generate a resource orchestration plan based on the current node information, the current prediction time, the experience curve and the current resource overhead.

7. The method for resource arrangement according to claim 6, characterized in that: The step of generating a second arrangement scheme according to a second preset arrangement generation rule includes: Obtaining the current node information; The second scheduling solution is obtained by performing calculation using the current node information, the predicted time, the current resource cost, and the experience curve.

8. The method for resource arrangement according to claim 7, characterized in that: The calculating by using the current node information, the predicted time, the current resource cost and the experience curve to obtain the second scheduling solution includes: Calculating a second resource floating ratio according to the predicted time, the current resource expenditure and the experience curve; Calculating a second scheduling result according to the second resource floating ratio and the current node information; The second arrangement scheme is obtained according to the second arrangement result.

9. The method for resource arrangement according to claim 6, characterized in that: The determining the predicted time according to the application identifier and the running time includes: According to the application identifier, obtaining a prediction time threshold; The predicted time is determined according to the predicted time threshold and the running time.

10. The method for resource arrangement according to claim 6, characterized in that: After generating the second arrangement scheme, the method further includes: The second arrangement plan is sent to a user, so that the user determines a second execution plan according to the second arrangement plan.

11. A device for resource scheduling, characterized in that: include: An acquisition module, used to acquire an application identifier; A determination module, configured to determine the current running time, resource cost and pre-built experience curve of the application according to the application identifier; the experience curve includes a correspondence between the historical running time and the threshold range of the resource cost; A detection module, configured to detect whether the resource overhead satisfies a first orchestration update condition according to the experience curve and the running time; The first orchestration update condition includes: the duration of the resource cost being higher than the maximum threshold of the corresponding running time in the experience curve reaches a first preset time, or the duration of the resource cost being lower than the minimum threshold of the corresponding running time in the experience curve reaches a second preset time; A generation module is used to obtain current node information and a preset traceback time if the resource overhead meets the first orchestration update condition; determine the traceback resource overhead corresponding to the preset traceback time according to the preset traceback time; and calculate using the current node information, the traceback resource overhead and the current resource overhead to obtain a first orchestration plan.

12. A resource scheduling device, characterized in that: include: A processor, and a memory connected to the processor; The memory is used to store computer programs; The processor is configured to call and execute the computer program in the memory to perform the method according to any one of claims 1 to 10.

13. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, each step of the resource orchestration method according to any one of claims 1 to 10 is implemented.