Task Resource Scheduling Method, Device, Equipment and Storage Medium
By comprehensively considering the load index and task frequency of performance resources and dynamically selecting the scheduling mode, the problem of inefficient resource scheduling in the existing technology is solved, and the balance between resource consumption and task response is achieved.
Patent Information
- Application Number
- CN202510615945.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-14
AI Technical Summary
The existing task resource scheduling methods rely only on a single performance indicator, resulting in inefficient scheduling and difficulty in balancing resource consumption and task response time.
By obtaining the current and historical resource utilization rate of performance resources, determining the resource comprehensive load index, and dynamically selecting active polling, passive perception or hybrid scheduling modes to achieve accurate determination of resource scheduling modes.
It improves the efficiency and accuracy of task resource scheduling, realizes the balance between resource consumption and task response, and adapts to the actual situation of different time periods.
Smart Images

Figure CN120144262B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a task resource scheduling method, apparatus, device and storage medium. Background Art
[0002] With the development of informatization and the wide application of computing resources, various task execution systems deployed on the server side need to process a large number of system task requests every day. Therefore, how to achieve reasonable resource scheduling in the process of system task processing has become an urgent problem to be solved at present.
[0003] In the selection process of existing task resource scheduling methods, usually only a single performance index of the server is considered, such as the CPU (Central Processing Unit) usage rate, memory occupancy or network status, etc. However, determining the resource scheduling method only relying on the combination of one or more performance indexes has a low accuracy, and it is difficult to balance resource consumption and task response time, which further leads to low scheduling efficiency of task resource scheduling. Summary of the Invention
[0004] The present invention provides a task resource scheduling method, apparatus, device and storage medium to improve the determination accuracy of task resource scheduling methods, thereby improving the task resource scheduling efficiency and achieving a balance between resource consumption and task response.
[0005] According to one aspect of the present invention, a task resource scheduling method is provided, the method comprising:
[0006] Obtaining the current resource usage rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, and obtaining the historical resource usage rate of each of the performance resources in the historical scheduling time period, and obtaining the task execution request volume of the application system to be scheduled in the current scheduling time period;
[0007] Determining a resource comprehensive load index according to the current resource usage rate and the historical resource usage rate of each of the performance resources; and,
[0008] Determining a task scheduling frequency according to the task execution request volume;
[0009] Determining a first resource scheduling mode according to the resource comprehensive load index; and,
[0010] Determining a second resource scheduling mode according to the task scheduling frequency;
[0011] Determine a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0012] According to another aspect of the present invention, there is provided a task resource scheduling device, the device comprising:
[0013] A resource utilization rate acquisition module, configured to acquire the current resource utilization rate of at least one performance resource of a target server to which an application system to be scheduled belongs in a current scheduling time period, and acquire the historical resource utilization rate of each of the performance resources in a historical scheduling time period, and acquire the task execution request volume of the application system to be scheduled in the current scheduling time period;
[0014] A comprehensive index determination module, configured to determine a resource comprehensive load index according to the current resource utilization rate and the historical resource utilization rate of each of the performance resources; and,
[0015] A task frequency determination module, configured to determine a task scheduling frequency according to the task execution request volume;
[0016] A first scheduling mode determination module, configured to determine a first resource scheduling mode according to the resource comprehensive load index; and,
[0017] A second scheduling mode determination module, configured to determine a second resource scheduling mode according to the task scheduling frequency;
[0018] A task resource scheduling module, configured to determine a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0019] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0020] At least one processor; and,
[0021] A memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the task resource scheduling method according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, there is provided a computer-readable storage medium, the computer-readable storage medium storing computer instructions for enabling a processor to execute the task resource scheduling method according to any embodiment of the present invention when executed.
[0024] In the technical solution of the embodiment of the present invention, the comprehensive resource load index is determined according to the current resource utilization rate and the historical resource utilization rate of each performance resource; and, the task scheduling frequency is determined according to the task execution request volume; the first resource scheduling mode is determined according to the comprehensive resource load index; and, the second resource scheduling mode is determined according to the task scheduling frequency; the target resource scheduling mode is determined according to the first resource scheduling mode and the second resource scheduling mode, and the system task resources of the application system to be scheduled are scheduled based on the target resource scheduling mode. The above technical solution comprehensively considers the resource load dimension and the task frequency dimension when selecting the task scheduling mode, and combines the task request volume and the comprehensive resource load index when selecting the resource scheduling mode, improves the accuracy of determining the task resource scheduling mode, thereby improving the task resource scheduling efficiency, and dynamically selects the task resource scheduling mode according to the actual situation in different time periods, realizing the balance between resource consumption and task response.
[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0027] Figure 1 is a flowchart of a task resource scheduling method provided in Embodiment 1 of the present invention;
[0028] Figure 2A is a flowchart of a task resource scheduling method provided in Embodiment 2 of the present invention;
[0029] Figure 2B is a schematic diagram of a resource utilization rate acquisition node for a scheduling time period provided in Embodiment 2 of the present invention;
[0030] Figure 3 is a flowchart of a task resource scheduling method provided in Embodiment 3 of the present invention;
[0031] Figure 4 is a flowchart of a task resource scheduling method provided in Embodiment 4 of the present invention;
[0032] Figure 5It is a flowchart of a task resource scheduling method provided in Embodiment 5 of the present invention;
[0033] Figure 6 It is a schematic structural diagram of a task resource scheduling device provided in Embodiment 6 of the present invention;
[0034] Figure 7 It is a schematic structural diagram of an electronic device for implementing the task resource scheduling method of the embodiments of the present invention. Detailed implementation manners
[0035] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0037] Embodiment 1
[0038] Figure 1 It is a flowchart of a task resource scheduling method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of reasonably selecting a resource scheduling method during the task execution process and performing task resource scheduling based on the selected resource scheduling method. This method can be executed by a task resource scheduling device, and the task resource scheduling device can be implemented in the form of hardware and / or software. The task resource scheduling device can be configured in an electronic device. As Figure 1 shown, the method includes:
[0039] S110. Obtain the current resource utilization rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, obtain the historical resource utilization rate of each performance resource in the historical scheduling time period, and obtain the task execution request volume of the application system to be scheduled in the current scheduling time period.
[0040] S120. Determine the comprehensive resource load index according to the current resource utilization rate and the historical resource utilization rate of each performance resource.
[0041] S130. Determine the task scheduling frequency according to the task execution request volume.
[0042] S140. Determine the first resource scheduling mode according to the comprehensive resource load index.
[0043] S150. Determine the second resource scheduling mode according to the task scheduling frequency.
[0044] S160. Determine the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0045] Among them, this embodiment does not limit the execution order of the steps between S120 and S130, and the execution order of the steps between S140 and S150. For example, they can be executed in parallel, such as S120 and S130 are executed simultaneously, and S140 and S150 are executed simultaneously; or, they can also be executed in a sequential order, such as S120 is executed before S130, and S140 is executed before S150.
[0046] Among them, the application system to be scheduled can be an application system to be scheduled for task resources, such as a synchronization application system, etc. The target server is the server on which the application system to be scheduled is deployed. The performance resources can be CPU resources, memory resources, network resources, etc. The historical scheduling time period can be the previous scheduling time period relative to the current scheduling time period. The task execution request volume can be the total number of task execution requests received by the application system to be scheduled in the current scheduling time period. The comprehensive resource load index is used to evaluate the load level of the target server, such as whether it is overloaded, normal, or idle.
[0047] Specifically, for any performance resource, based on the current usage rate and historical resource usage rate of the performance resource, a resource load prediction index of the performance resource can be obtained based on a pre-trained load index prediction model. And based on the resource load prediction index corresponding to each performance resource and the resource weight parameters of each performance resource preset in advance, a comprehensive resource load index is calculated by weighted calculation. Among them, the load index prediction model can be pre-trained by relevant technical personnel. For example, the resource usage rates corresponding to each performance metric in the historical task scheduling time period are obtained and used as a sample training data set for model training of the load index prediction model.
[0048] Based on the current scheduling time period and the task execution request volume, the task scheduling frequency is determined. For example, if the task execution request volume is M and the current scheduling time period is △T, then the task scheduling frequency is M / △T.
[0049] Based on the comprehensive resource load index, a first resource scheduling mode is determined, and based on the task scheduling frequency, a second resource scheduling mode is determined. It should be noted that in this embodiment, multiple reference resource scheduling modes for processing different task scheduling scenarios can be preset in advance. For example, the reference resource scheduling modes can include an active polling scheduling mode, a passive sensing scheduling mode, and a hybrid scheduling mode.
[0050] Among them, the active polling scheduling mode is that the application system periodically checks the status of task resources and takes corresponding scheduling actions; its advantage is saving resource overhead, and its disadvantage is that there may be response delays and it is unable to adjust task resources in a timely manner, which is applicable to scenarios with frequent task requests and low requirements for task scheduling real-time performance. The passive sensing scheduling mode means that the task resource status change actively triggers scheduling; its advantage is high real-time performance, and its disadvantage is that frequent triggering will increase system overhead and affect the overall performance of the server, which is applicable to scenarios with sparse task requests and high requirements for task scheduling real-time performance. The hybrid scheduling mode is a scheduling mode that combines the active polling scheduling mode and the passive sensing scheduling mode. Specifically, it can be that the passive sensing scheduling mode obtains the tasks to be executed, processes the tasks to be executed with higher priorities based on its own scheduling mode, and the active polling scheduling mode processes the tasks to be executed with lower priorities.
[0051] It should be noted that from the dimension of resource usage rate, the active polling scheduling mode can actively query the tasks to be processed at regular intervals and process them, which can effectively reduce resource consumption and is applicable to scenarios with high resource loads. The hybrid scheduling mode can balance task response speed and resource utilization rate and is applicable to scenarios with moderate resource loads. The passive sensing scheduling mode can add tasks to the queue and trigger a response when it is monitored that there are tasks in the queue to ensure the fast response of tasks, which is applicable to scenarios with low resource loads.
[0052] From the dimension of task scheduling frequency, the active polling scheduling mode is applicable to scenarios with a high frequency of task requests; the hybrid scheduling mode is applicable to scenarios with a moderate frequency of task requests; the passive sensing scheduling mode is applicable to scenarios with a low frequency of task requests.
[0053] Exemplarily, relevant technical personnel can preset the dynamic threshold range of resource load according to actual experience values or experimental values and in combination with their own actual needs. This dynamic threshold range of resource load includes an upper limit of the threshold range and a lower limit of the threshold range. When the comprehensive resource load index is less than the lower limit of the threshold range, the passive sensing scheduling mode is used as the first resource scheduling mode; when the comprehensive resource load index is greater than the upper limit of the threshold range, the active polling scheduling mode is used as the first resource scheduling mode; when the comprehensive resource load index is not less than the lower limit of the threshold range and not greater than the upper limit of the threshold range, the hybrid scheduling mode is used as the first resource scheduling mode.
[0054] Exemplarily, relevant technical personnel can preset the dynamic threshold range of task frequency according to actual experience values or experimental values and in combination with their own actual needs. This dynamic threshold range of resource load includes an upper limit of the threshold range and a lower limit of the threshold range. When the amount of task execution requests is less than the lower limit of the threshold range, the passive sensing scheduling mode is used as the second resource scheduling mode; when the amount of task execution requests is greater than the upper limit of the threshold range, the active polling scheduling mode is used as the second resource scheduling mode; when the amount of task execution requests is not less than the lower limit of the threshold range and not greater than the upper limit of the threshold range, the hybrid scheduling mode is used as the second resource scheduling mode.
[0055] If the modes of the first resource scheduling mode and the second resource scheduling mode are the same, then the mode of the first resource scheduling mode or the second resource scheduling mode is determined as the target resource scheduling mode. If the modes of the first resource scheduling mode and the second resource scheduling mode are different, then based on the preset reference dimension priority, the resource scheduling mode with the highest priority is selected from the first resource scheduling mode and the second resource scheduling mode as the target resource scheduling mode. Among them, the preset reference dimension priority can be preset by relevant technical personnel according to actual needs. For example, the priority of the scheduling mode determined based on the comprehensive resource load index dimension can be higher than the scheduling mode determined based on the task scheduling frequency dimension.
[0056] Based on the target resource scheduling mode, task resource scheduling is performed on the system tasks of the application system to be scheduled in the current scheduling time period.
[0057] In the technical solution of the embodiment of the present invention, the comprehensive resource load index is determined according to the current resource utilization rate and the historical resource utilization rate of each performance resource; and, the task scheduling frequency is determined according to the task execution request volume; the first resource scheduling mode is determined according to the comprehensive resource load index; and, the second resource scheduling mode is determined according to the task scheduling frequency; the target resource scheduling mode is determined according to the first resource scheduling mode and the second resource scheduling mode, and the system task resources of the application system to be scheduled are scheduled based on the target resource scheduling mode. The above technical solution comprehensively considers the resource load dimension and the task frequency dimension when selecting the task scheduling mode, and combines the task request volume and the comprehensive resource load index when selecting the resource scheduling mode, improving the accuracy of determining the task resource scheduling mode, thereby improving the task resource scheduling efficiency, and dynamically selecting the task resource scheduling mode according to the actual situation in different time periods, achieving the balance between resource consumption and task response.
[0058] Embodiment 2
[0059] Figure 2A It is a flowchart of a task resource scheduling method provided by Embodiment 2 of the present invention. Based on the above technical solutions, this embodiment is optimized and improved.
[0060] Further, the historical resource utilization rate includes the historical resource start utilization rate and the historical resource intermediate utilization rate; correspondingly, the step of "determining the comprehensive resource load index according to the current resource utilization rate and the historical resource utilization rate of each performance resource" is refined to "determining the utilization rate trend evaluation parameter corresponding to each performance resource according to the current resource utilization rate and the historical resource intermediate utilization rate of the corresponding performance resource; and, determining the utilization rate fluctuation evaluation parameter corresponding to each performance resource according to the current resource utilization rate, the historical resource start utilization rate and the historical resource intermediate utilization rate of the corresponding performance resource; determining the resource load evaluation index corresponding to each performance resource according to the current resource utilization rate, the utilization rate trend evaluation parameter and the utilization rate fluctuation evaluation parameter of the corresponding performance resource; determining the comprehensive resource load index according to the resource load evaluation index of each performance resource." to improve the determination method of the comprehensive resource load index.
[0061] It should be noted that for the parts not detailed in the embodiment of the present invention, reference can be made to the descriptions of other embodiments. As Figure 2A shown, the method includes the following specific steps:
[0062] S210. Obtain the current resource utilization rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, and obtain the historical resource utilization rate of each performance resource in the historical scheduling time period, and obtain the task execution request volume of the application system to be scheduled in the current scheduling time period.
[0063] S220. Determine the usage rate trend evaluation parameters corresponding to each performance resource according to the current resource usage rate and the historical resource intermediate usage rate of the corresponding performance resource.
[0064] S230. Determine the usage rate fluctuation evaluation parameters corresponding to each performance resource according to the current resource usage rate, the historical resource start usage rate, and the historical resource intermediate usage rate of the corresponding performance resource.
[0065] S240. Determine the resource load evaluation index corresponding to each performance resource according to the current resource usage rate, the usage rate trend evaluation parameter, and the usage rate fluctuation evaluation parameter of the corresponding performance resource.
[0066] S250. Determine the comprehensive resource load index according to the resource load evaluation index of each performance resource.
[0067] S260. Determine the task scheduling frequency according to the task execution request volume.
[0068] S270. Determine the first resource scheduling mode according to the comprehensive resource load index.
[0069] S280. Determine the second resource scheduling mode according to the task scheduling frequency.
[0070] S290. Determine the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0071] Among them, the historical resource usage rate includes the historical resource start usage rate and the historical resource intermediate usage rate. As Figure 2B shown in a schematic diagram of the resource usage rate acquisition node of a scheduling time period. If scheduling time period 2 is the current scheduling time period, then scheduling time period 1 is the historical scheduling time period of scheduling time period 2. The acquisition node of the end resource usage rate of scheduling time period 1 is the acquisition node of the start resource usage rate of scheduling time period 2. If scheduling time period 1 is the current scheduling time period, then the current resource usage rate is the start resource usage rate of scheduling time period 1.
[0072] Among them, the performance resources are CPU resources, memory resources, and network resources. For different performance resources, the usage rate trend evaluation parameters corresponding to each performance resource are determined respectively. Among them, the usage rate trend evaluation parameter can describe the usage characteristics of resources from the long-term evolution direction of resource usage.
[0073] Exemplarily, the determination method of the usage rate trend evaluation parameter of performance resource i is as follows:
[0074]
[0075] Among them, represents the utilization rate trend evaluation parameter of performance resource i; represents the current resource utilization rate of performance resource i; represents the historical resource intermediate utilization rate of performance resource i; represents the time interval between the acquisition time point of the current resource utilization rate of performance resource i and the acquisition time point of the historical resource intermediate utilization rate; Performance resource i is CPU resource, memory resource and network resource.
[0076] Among them, the utilization rate fluctuation evaluation parameter can characterize the usage characteristics of resources from the short-term stability direction of resource usage or the resource fluctuation situation. Exemplarily, the utilization rate fluctuation evaluation parameter of performance resource i is determined as follows:
[0077]
[0078] Among them, represents the utilization rate fluctuation evaluation parameter of performance resource i; represents the current resource utilization rate of performance resource i; represents the historical resource intermediate utilization rate of performance resource i; represents the historical resource starting utilization rate of performance resource i.
[0079] Among them, the resource load evaluation parameter can be used to evaluate the usage status and performance of a certain performance resource, so as to quantify the resource pressure. The resource load evaluation parameter of performance resource i is determined as follows:
[0080]
[0081] Among them, represents the current resource utilization rate of performance resource i; represents the utilization rate fluctuation evaluation parameter of performance resource i; represents the utilization rate trend evaluation parameter of performance resource i; and respectively represent the weight coefficients corresponding to the utilization rate trend evaluation parameter and the utilization rate fluctuation evaluation parameter, which can be specifically preset by relevant technical personnel according to actual needs.
[0082] According to the resource load evaluation index of each performance resource, determine the resource comprehensive load index. Exemplarily, the resource comprehensive load index is determined as follows:
[0083]
[0084] Among them, represents the preset CPU resource weight parameter; represents the preset memory resource weight parameter; represents the preset network resource weight parameter; among them, the weight parameters of the three types of performance resources satisfy . represents the resource load evaluation index of CPU resources; represents the resource load evaluation index of memory resources; represents the resource load evaluation index of network resources.
[0085] It should be noted that there are interactions and correlations among CPU resources, memory resources, and network resources. To further improve the accuracy of determining the comprehensive resource load index, the mutual exclusivity among the three resources can also be considered during the process of determining the comprehensive resource load index.
[0086] In an alternative embodiment, according to the resource load evaluation indices of each performance resource, determining the comprehensive resource load index includes: determining the resource mutual exclusivity coefficient according to the resource load evaluation indices of each performance resource; and determining the comprehensive resource load index based on the resource mutual exclusivity coefficient according to the resource load evaluation indices of each performance resource.
[0087] Among them, the resource mutual exclusivity coefficient is used to quantify the cooperative relationship and mutual exclusivity relationship among different resources during the system operation, and can reflect the influence degree of the resource utilization rate among different performance resources.
[0088] Exemplarily, the resource mutual exclusivity coefficient is determined as follows:
[0089]
[0090] Among them, represents the resource load evaluation index of CPU resources; represents the resource load evaluation index of memory resources; represents the resource load evaluation index of network resources; represents the resource mutual exclusivity adjustment coefficient, which is used to quantify the dependency relationship among resources and can be specifically preset by relevant technical personnel according to actual requirements.
[0091] Exemplarily, based on the resource mutual exclusivity coefficient the method for determining the comprehensive resource load index is as follows:
[0092]
[0093] Among them, represents the comprehensive resource load index.
[0094] In the technical solution of this embodiment, by determining the usage rate trend evaluation parameters corresponding to each performance resource according to the current resource usage rate and the historical resource intermediate usage rate of the corresponding performance resources, determining the usage rate fluctuation evaluation parameters corresponding to each performance resource according to the current resource usage rate, the historical resource start usage rate, and the historical resource intermediate usage rate of the corresponding performance resources, determining the resource load evaluation index corresponding to each performance resource according to the current resource usage rate, the usage rate trend evaluation parameter, and the usage rate fluctuation evaluation parameter of the corresponding performance resource, and determining the comprehensive resource load index according to the resource load evaluation index of each performance resource. In the above technical solution, by comprehensively considering the fluctuation evaluation parameter and the usage rate trend evaluation parameter of each performance resource during the determination process of the comprehensive resource load index, the influence of different factors on the resource load is considered from multiple directions and multiple dimensions, thereby further improving the determination accuracy of the comprehensive resource load index.
[0095] Embodiment III
[0096] Figure 3 FIG. is a flowchart of a task resource scheduling method provided in Embodiment III of the present invention. On the basis of the above technical solutions, this embodiment is optimized and improved.
[0097] Furthermore, the step of "determining the first resource scheduling mode according to the comprehensive resource load index" is refined to "determining the load threshold adjustment parameter; based on the preset initial resource threshold range and the load threshold adjustment parameter, determining the dynamic resource load threshold range; if the comprehensive resource load index is greater than the upper limit value of the dynamic resource load threshold range, then using the active polling scheduling mode as the first resource scheduling mode; or, if the comprehensive resource load index is less than the lower limit value of the dynamic resource load threshold range, then using the passive sensing scheduling mode as the first resource scheduling mode; or, if the comprehensive resource load index is not greater than the upper limit value of the dynamic resource load threshold range and not less than the lower limit value of the dynamic resource load threshold range, then using the hybrid scheduling mode as the first resource scheduling mode; where the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode." to improve the determination method of the first resource scheduling mode.
[0098] It should be noted that for the parts not detailed in the embodiments of the present invention, reference may be made to the descriptions of other embodiments. As Figure 3 shown, the method includes the following specific steps:
[0099] S310. Obtain the current resource usage rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, obtain the historical resource usage rate of each performance resource in the historical scheduling time period, and obtain the task execution request volume of the application system to be scheduled in the current scheduling time period.
[0100] S320. Determine the comprehensive resource load index according to the current resource utilization rate and historical resource utilization rate of each performance resource.
[0101] S330. Determine the task scheduling frequency according to the task execution request volume.
[0102] S340. Determine the load threshold adjustment parameter.
[0103] S350. Based on the preset initial resource threshold range and the load threshold adjustment parameter, determine the dynamic resource load threshold range.
[0104] S360A. If the comprehensive resource load index is greater than the upper limit of the dynamic resource load threshold range, then use the active polling scheduling mode as the first resource scheduling mode.
[0105] S360B. If the comprehensive resource load index is less than the lower limit of the dynamic resource load threshold range, then use the passive sensing scheduling mode as the first resource scheduling mode.
[0106] S360C. If the comprehensive resource load index is not greater than the upper limit of the dynamic resource load threshold range and not less than the lower limit of the dynamic resource load threshold range, then use the hybrid scheduling mode as the first resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode.
[0107] S370. Determine the second resource scheduling mode according to the task scheduling frequency.
[0108] S380. According to the first resource scheduling mode and the second resource scheduling mode, determine the target resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0109] Among them, the load threshold adjustment parameter can be preset by relevant technical personnel according to actual needs. The dynamic resource load threshold range can be determined based on the load threshold adjustment parameter, or can be directly set by relevant technical personnel according to actual needs, including the upper limit value and the lower limit value of the range.
[0110] Exemplarily, the upper limit value and the lower limit value of the dynamic resource load threshold range are determined as follows:
[0111]
[0112]
[0113] Among them, Represents the lower limit value of the initial resource threshold range; Represents the upper limit value of the initial resource threshold range; Represents the load threshold adjustment parameter.
[0114] To further improve the determination accuracy of the dynamic threshold range of resource load, this embodiment also provides a specific implementation method for dynamically determining the load threshold adjustment parameter. In an alternative embodiment, determining the load threshold adjustment parameter includes: determining the comprehensive resource trend change rate according to the usage rate trend evaluation parameters respectively corresponding to each performance resource; and determining the comprehensive resource fluctuation degree according to the usage rate fluctuation evaluation parameters respectively corresponding to each performance resource; determining the load threshold adjustment parameter according to the comprehensive resource trend change rate and the comprehensive resource fluctuation degree.
[0115] Exemplarily, the comprehensive resource trend change rate is determined as follows:
[0116]
[0117] Among them, represents the preset CPU resource weight parameter; represents the preset memory resource weight parameter; represents the preset network resource weight parameter; among them, the weight parameters of the three types of performance resources satisfy . represents the usage rate trend evaluation parameter of the CPU resource; represents the usage rate trend evaluation parameter of the memory resource; represents the usage rate trend evaluation parameter of the network resource.
[0118] Exemplarily, the comprehensive resource fluctuation degree is determined as follows:
[0119]
[0120] Among them, represents the preset CPU resource weight parameter; represents the preset memory resource weight parameter; represents the preset network resource weight parameter; among them, the weight parameters of the three types of performance resources satisfy . represents the usage rate fluctuation evaluation parameter of the CPU resource; represents the usage rate fluctuation evaluation parameter of the memory resource; represents the usage rate fluctuation evaluation parameter of the network resource.
[0121] According to the comprehensive resource trend change rate and the comprehensive resource fluctuation degree , determine the load threshold adjustment parameter The specific implementation method is as follows:
[0122]
[0123] Among them, represents the basic adjustment coefficient, which can be specifically preset by relevant technical personnel in advance; and respectively represent the weight coefficients of the comprehensive resource fluctuation degree and the comprehensive resource trend change rate, which are adjustable static values and can be preset in advance; for example, and are respectively set to 0.5 and 0.3.
[0124] The above technical solution realizes the dynamic determination of the load threshold adjustment coefficient by determining the load threshold adjustment parameter based on the comprehensive resource trend change rate and the comprehensive resource fluctuation degree, improves the flexibility of determining the load threshold adjustment coefficient, and comprehensively considers the resource trend change rate and the resource fluctuation degree during the determination process, thereby improving the accuracy of determining the load threshold adjustment coefficient.
[0125] If the comprehensive resource load index is greater than the upper limit value of the resource load dynamic threshold range, then the active polling scheduling mode is used as the first resource scheduling mode to batch customize processing tasks and execute tasks in a staggered manner, thereby reducing resource consumption. If the comprehensive resource load index is less than the lower limit value of the resource load dynamic threshold range, then the passive sensing scheduling mode is used as the first resource scheduling mode to realize triggering scheduling only when the resource status changes, reducing the system resource overhead. If the comprehensive resource load index is not greater than the upper limit value of the resource load dynamic threshold range and not less than the lower limit value of the resource load dynamic threshold range, then the hybrid scheduling mode is used as the first resource scheduling mode to balance the task response speed and resource utilization rate. Among them, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode. Specifically, it can be to obtain the tasks to be executed by the passive sensing scheduling mode, and according to the preset priority order, use its own scheduling mode to process the tasks with higher priority, and use the active polling scheduling mode to process the tasks with lower priority. It is equivalent to downgrading the passive sensing and quickly processing the high-priority tasks.
[0126] The technical solution of this embodiment determines the load threshold adjustment parameter. According to the preset initial resource threshold range, based on the load threshold adjustment parameter, it determines the dynamic threshold range of resource load. By comparing the comprehensive resource load index with the upper limit value and the lower limit value of the dynamic threshold range of resource load respectively, it realizes the dynamic and precise adjustment of the first resource scheduling mode, improves the adjustment flexibility and determination accuracy of the first resource scheduling mode, and thus ensures the determination accuracy and efficiency of the subsequent target resource scheduling mode.
[0127] Embodiment 4
[0128] Figure 4 It is a flowchart of a task resource scheduling method provided by Embodiment 4 of the present invention. On the basis of the above technical solutions, this embodiment has been optimized and improved.
[0129] Further, the step of "determining the second resource scheduling mode according to the task scheduling frequency" is refined to "determining the dynamic threshold range of task frequency; if the task scheduling frequency is greater than the upper limit value of the dynamic threshold range of task frequency, then taking the active polling scheduling mode as the second resource scheduling mode; or, if the task scheduling frequency is less than the lower limit value of the dynamic threshold range of task frequency, then taking the passive sensing scheduling mode as the second resource scheduling mode; or, if the task scheduling frequency is not greater than the upper limit value of the dynamic threshold range of task frequency and not less than the lower limit value of the dynamic threshold range of task frequency, then taking the hybrid scheduling mode as the second resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode." to improve the determination method of the second resource scheduling mode.
[0130] It should be noted that for the parts not detailed in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. As Figure 4 shown, the method includes the following specific steps:
[0131] S410. Obtain the current resource usage rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, and obtain the historical resource usage rate of each performance resource in the historical scheduling time period, and obtain the task execution request volume of the application system to be scheduled in the current scheduling time period.
[0132] S420. Determine the comprehensive resource load index according to the current resource usage rate and the historical resource usage rate of each performance resource.
[0133] S430. Determine the task scheduling frequency according to the task execution request volume.
[0134] S440. Determine the first resource scheduling mode according to the comprehensive resource load index.
[0135] S450. Determine the dynamic threshold range of task frequencies.
[0136] S460A. If the task scheduling frequency is greater than the upper limit value of the dynamic threshold range of task frequencies, then use the active polling scheduling mode as the second resource scheduling mode.
[0137] S460B. If the task scheduling frequency is less than the lower limit value of the dynamic threshold range of task frequencies, then use the passive sensing scheduling mode as the second resource scheduling mode.
[0138] S460C. If the task scheduling frequency is not greater than the upper limit value of the dynamic threshold range of task frequencies and not less than the lower limit value of the dynamic threshold range of task frequencies, then use the hybrid scheduling mode as the second resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode.
[0139] S470. Determine the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode.
[0140] Among them, the dynamic threshold range of task frequencies can be preset by relevant technical personnel according to actual needs, including the upper limit value and the lower limit value of the range.
[0141] To further achieve the dynamic determination of the dynamic threshold range of task frequencies and improve the accuracy of determining the dynamic threshold range of task frequencies, in an alternative embodiment, determining the dynamic threshold range of task frequencies includes: determining the historical scheduling frequencies under a preset scheduling time period; determining the task frequency mean and the task frequency standard deviation according to the historical scheduling frequencies; determining the dynamic threshold range of task frequencies according to the task frequency mean and the task frequency standard deviation.
[0142] Among them, the preset scheduling time period can be preset by relevant technical personnel, for example, it can be N time periods within a historical time range.
[0143] Specifically, take the mean of each historical scheduling frequency as the task frequency mean, and determine the task frequency standard deviation according to each historical scheduling frequency and the task frequency mean. Among them, the task frequency standard deviation can reflect the volatility of the task frequency and is continuously updated as the task scheduling frequency changes. When the scheduling frequency fluctuates greatly, the task frequency standard deviation becomes larger, and the upper limit value of the range rises, thereby reducing the sensitivity to enter the active polling scheduling mode to avoid excessive switching; when the scheduling frequency is relatively stable, the task frequency standard deviation becomes smaller, and the lower limit value of the range drops, thereby making it easier to switch to the active polling scheduling mode to adapt to the situation of low scheduling frequency fluctuations.
[0144] Based on the above theoretical basis, the upper limit value of the dynamic threshold range of the task frequency is determined according to the average value of the task frequency and the standard deviation of the task frequency and the lower limit value The specific implementation method is as follows:
[0145]
[0146]
[0147] Among them, represents the average value of the task frequency; represents the standard deviation of the task frequency; k represents an adjustment coefficient, which is used to control the frequency sensitivity and can be specifically preset by relevant technical personnel according to actual needs.
[0148] The above technical solution realizes the dynamic determination of the dynamic threshold range of the task frequency. Moreover, in the process of determining the dynamic threshold range of the task frequency, the average value of the task frequency and the standard deviation of the task frequency are comprehensively considered, improving the determination accuracy of the dynamic threshold range of the task frequency.
[0149] If the task scheduling frequency is greater than the upper limit value of the dynamic threshold range of the task frequency, the active polling scheduling mode is used as the second resource scheduling mode to batch customize and process tasks, and the tasks are executed at off-peak times, thereby reducing resource consumption. If the task scheduling frequency is less than the lower limit value of the dynamic threshold range of the task frequency, the passive sensing scheduling mode is used as the second resource scheduling mode to trigger scheduling only when the resource status changes, reducing the system resource overhead. If the task scheduling frequency is not greater than the upper limit value of the dynamic threshold range of the task frequency and not less than the lower limit value of the dynamic threshold range of the task frequency, the hybrid scheduling mode is used as the second resource scheduling mode, taking into account the task response speed and resource utilization rate. Among them, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode. Specifically, the tasks to be executed can be obtained by the passive sensing scheduling mode, and according to the preset priority order, the tasks with higher priority are processed using its own scheduling mode, and the tasks with lower priority are processed using the active polling scheduling mode. It is equivalent to downgrading the passive sensing and quickly processing the high-priority tasks.
[0150] The technical solution of this embodiment realizes the dynamic and accurate adjustment of the second resource scheduling mode by determining the dynamic threshold range of the task frequency and comparing the task scheduling frequency with the upper limit value and the lower limit value of the dynamic threshold range of the task frequency respectively, improving the adjustment flexibility and determination accuracy of the second resource scheduling mode, thereby ensuring the determination accuracy and efficiency of the subsequent target resource scheduling mode.
[0151] Embodiment Five
[0152] Figure 5 The figure is a flowchart of a task resource scheduling method provided in the fifth embodiment of the present invention. This embodiment is optimized and improved on the basis of the above technical solutions.
[0153] Further, the step of "determining the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and performing system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode" is refined into "if the modes of the first resource scheduling mode and the second resource scheduling mode are the same, then determine the first resource scheduling mode or the second resource scheduling mode as the target resource scheduling mode; if the modes of the first resource scheduling mode and the second resource scheduling mode are different, then obtain the historical task scheduling frequency in the historical scheduling time period, and determine the task frequency trend evaluation parameter according to the task scheduling frequency and the historical task scheduling frequency; determine the target resource scheduling mode according to the resource comprehensive load index, the task scheduling frequency, the usage rate trend evaluation parameter, the usage rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter." to improve the determination method of the target resource scheduling mode.
[0154] It should be noted that for the parts not detailed in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. As Figure 5 shown, the method includes the following specific steps:
[0155] S510. Obtain the current resource usage rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, obtain the historical resource usage rate of each performance resource in the historical scheduling time period, and obtain the task execution request volume of the application system to be scheduled in the current scheduling time period.
[0156] S520. Determine the resource comprehensive load index according to the current resource usage rate and the historical resource usage rate of each performance resource.
[0157] S530. Determine the task scheduling frequency according to the task execution request volume.
[0158] S540. Determine the first resource scheduling mode according to the resource comprehensive load index.
[0159] S550. Determine the second resource scheduling mode according to the task scheduling frequency.
[0160] S560. If the modes of the first resource scheduling mode and the second resource scheduling mode are the same, then execute S570A; if the modes of the first resource scheduling mode and the second resource scheduling mode are different, then execute S570B - S570C.
[0161] S570A. Determine the first resource scheduling mode or the second resource scheduling mode as the target resource scheduling mode.
[0162] S570B. Obtain the historical task scheduling frequency in the historical scheduling time period, and determine the task frequency trend evaluation parameter according to the task scheduling frequency and the historical task scheduling frequency.
[0163] S570C. Determine the target resource scheduling mode according to the comprehensive resource load index, task scheduling frequency, usage rate trend evaluation parameter, usage rate fluctuation evaluation parameter, and task frequency trend evaluation parameter.
[0164] Exemplarily, the task frequency trend evaluation parameter is determined as follows:
[0165]
[0166] where represents the task scheduling frequency; represents the historical task scheduling frequency; represents the time interval between the acquisition time point of the task scheduling frequency and the acquisition time point of the historical task scheduling frequency.
[0167] Exemplarily, according to the comprehensive resource load index, task scheduling frequency, usage rate trend evaluation parameter, usage rate fluctuation evaluation parameter, and task frequency trend evaluation parameter, a linear regression prediction model can be used to determine the target resource scheduling mode. Specifically, the five groups of features of the comprehensive resource load index, task scheduling frequency, usage rate trend evaluation parameter, usage rate fluctuation evaluation parameter, and task frequency trend evaluation parameter are used as inputs, and the target output is the optimal scheduling mode; among them, the sample data with the above five feature inputs are labeled, where 0 represents the passive perception scheduling mode, 1 represents the active polling scheduling mode, and 2 represents the hybrid scheduling mode. The labeled samples are used for model training of the linear regression prediction model to obtain the target prediction model for predicting the resource scheduling mode.
[0168] Optionally, the target scheduling score can also be determined according to the comprehensive resource load index, task scheduling frequency, usage rate trend evaluation parameter, usage rate fluctuation evaluation parameter, and task frequency trend evaluation parameter, based on the preset weight parameters corresponding to the five features. Set the score evaluation range. If the target scheduling score is within the score evaluation range A, the active polling scheduling mode is adopted; if the target scheduling score is within the score evaluation range B, the passive perception scheduling mode is adopted; if the target scheduling score is within the score evaluation range C, the hybrid scheduling mode is adopted.
[0169] To further improve the accuracy of determining the target scheduling mode, in this embodiment, a pre-trained resource scheduling prediction model is used to evaluate the target resource scheduling mode.
[0170] In an alternative embodiment, a target resource scheduling mode is determined based on a comprehensive resource load index, a task scheduling frequency, a usage rate trend evaluation parameter, a usage rate fluctuation evaluation parameter, and a task frequency trend evaluation parameter, including: determining the target resource scheduling mode based on the comprehensive resource load index, the task scheduling frequency, the usage rate trend evaluation parameter, the usage rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter, by means of a pre-trained resource scheduling prediction model.
[0171] Among them, the resource scheduling prediction model is obtained by pre-training on pre-constructed sample training data; the sample training data is generated based on the historical comprehensive resource load index, the historical task scheduling frequency, the historical usage rate trend evaluation parameter, the historical usage rate fluctuation evaluation parameter, the historical task frequency trend evaluation parameter, and the historical resource scheduling mode obtained in a historical scheduling time period.
[0172] Exemplarily, sample training data including the historical comprehensive resource load index, the historical task scheduling frequency, the historical usage rate trend evaluation parameter, the historical usage rate fluctuation evaluation parameter, and the historical task frequency trend evaluation parameter is constructed, and the historical resource scheduling mode is used as the sample label value of the corresponding sample training data, including a passive perception scheduling mode, an active polling scheduling mode, and a hybrid scheduling mode.
[0173] Specifically, the sample training data and its corresponding sample label value are input into a pre-constructed classification network model to obtain the predicted resource scheduling mode output by the model. According to the historical resource scheduling mode and the predicted resource scheduling mode of the sample training data, the current loss value in the current iteration period is determined; according to the current loss value, the classification network model is trained until a preset model training end condition is satisfied, and a resource scheduling prediction model is obtained. Among them, the classification network model can be a CNN (Convolutional Neural Network) model, a GAN (Generative Adversarial Network) model, a DBN (Deep Belief Network) model, etc. The model training end condition can be that the current loss value reaches a preset loss threshold, or the current loss value tends to be stable, or the number of model iterations reaches a preset iteration number threshold, etc., and this embodiment does not limit this.
[0174] In the technical solution of this embodiment, when it is determined that the first resource scheduling mode and the second resource scheduling mode are different, a joint decision is made based on the resource comprehensive load index, task scheduling frequency, usage rate trend evaluation parameter, usage rate fluctuation evaluation parameter, and task frequency trend evaluation parameter, so as to determine the target resource scheduling mode. The third decision-making method combines the resource load dimension and the task frequency dimension, and performs a fusion analysis on the important features of the two dimensions to obtain the final resource scheduling mode, realizing the accurate determination of the target resource scheduling mode, thereby further improving the resource scheduling efficiency, resource scheduling flexibility, and reliability.
[0175] Embodiment Six
[0176] Figure 6 FIG. 6 is a schematic structural diagram of a task resource scheduling device provided in Embodiment Six of the present invention. A task resource scheduling device provided in an embodiment of the present invention is applicable to a situation where a reasonable selection is made for a resource scheduling method during the task execution process and task resource scheduling is performed based on the selected resource scheduling method. The task resource scheduling device can be implemented in the form of hardware and / or software, such as Figure 6 As shown, the device specifically includes: a resource usage rate acquisition module 601, a comprehensive index determination module 602, a task frequency determination module 603, a first scheduling mode determination module 604, a second scheduling mode determination module 605, and a task resource scheduling module 606. Among them,
[0177] The resource usage rate acquisition module 601 is configured to acquire the current resource usage rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, and acquire the historical resource usage rate of each of the performance resources in the historical scheduling time period, and acquire the task execution request volume of the application system to be scheduled in the current scheduling time period;
[0178] The comprehensive index determination module 602 is configured to determine a resource comprehensive load index according to the current resource usage rate and the historical resource usage rate of each of the performance resources; and,
[0179] The task frequency determination module 603 is configured to determine a task scheduling frequency according to the task execution request volume;
[0180] The first scheduling mode determination module 604 is configured to determine a first resource scheduling mode according to the resource comprehensive load index; and,
[0181] The second scheduling mode determination module 605 is configured to determine a second resource scheduling mode according to the task scheduling frequency;
[0182] A task resource scheduling module 606 is configured to determine a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the to-be-scheduled application system based on the target resource scheduling mode.
[0183] In the technical solution of the embodiment of the present invention, a resource comprehensive load index is determined according to the current resource utilization rate and the historical resource utilization rate of each performance resource; and, a task scheduling frequency is determined according to the task execution request volume; a first resource scheduling mode is determined according to the resource comprehensive load index; and, a second resource scheduling mode is determined according to the task scheduling frequency; a target resource scheduling mode is determined according to the first resource scheduling mode and the second resource scheduling mode, and system task resource scheduling is performed on the to-be-scheduled application system based on the target resource scheduling mode. The above technical solution comprehensively considers the resource load dimension and the task frequency dimension when selecting the task scheduling mode, and combines the task request volume and the resource comprehensive load index when selecting the resource scheduling mode, improves the determination accuracy of the task resource scheduling mode, thereby improving the task resource scheduling efficiency, and dynamically selects the task resource scheduling mode according to the actual situation in different time periods, realizing the balance between resource consumption and task response.
[0184] Optionally, the historical resource utilization rate includes a historical resource start utilization rate and a historical resource intermediate utilization rate; correspondingly, the comprehensive index determination module 602 includes:
[0185] A usage trend evaluation parameter determination unit is configured to determine a usage trend evaluation parameter corresponding to each performance resource according to the current resource utilization rate and the historical resource intermediate utilization rate of the corresponding performance resource;
[0186] A usage fluctuation evaluation parameter determination unit is configured to determine a usage fluctuation evaluation parameter corresponding to each performance resource according to the current resource utilization rate, the historical resource start utilization rate, and the historical resource intermediate utilization rate of the corresponding performance resource;
[0187] A load evaluation parameter determination unit is configured to determine a resource load evaluation index corresponding to each performance resource according to the current resource utilization rate, the usage trend evaluation parameter, and the usage fluctuation evaluation parameter of the corresponding performance resource;
[0188] A comprehensive load index determination unit is configured to determine a resource comprehensive load index according to the resource load evaluation indexes of each performance resource.
[0189] Optionally, the comprehensive load index determination unit is specifically configured to:
[0190] Determine a resource mutual exclusion coefficient according to the resource load evaluation indexes of each performance resource;
[0191] Based on the resource load evaluation index of each of the performance resources, determine the comprehensive resource load index based on the resource mutual exclusion coefficient.
[0192] Optionally, the first scheduling mode determination module 604 includes:
[0193] A load adjustment parameter determination unit, configured to determine a load threshold adjustment parameter;
[0194] A load dynamic range determination unit, configured to determine a resource load dynamic threshold range based on a preset initial resource threshold range and based on the load threshold adjustment parameter;
[0195] A first scheduling mode determination first module, configured to use the active polling scheduling mode as the first resource scheduling mode if the comprehensive resource load index is greater than the upper limit value of the resource load dynamic threshold range; or,
[0196] A first scheduling mode determination second module, configured to use the passive sensing scheduling mode as the first resource scheduling mode if the comprehensive resource load index is less than the lower limit value of the resource load dynamic threshold range; or,
[0197] A first scheduling mode determination third module, configured to use the hybrid scheduling mode as the first resource scheduling mode if the comprehensive resource load index is not greater than the upper limit value of the resource load dynamic threshold range and not less than the lower limit value of the resource load dynamic threshold range; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive sensing scheduling mode.
[0198] Optionally, the load adjustment parameter determination unit is specifically configured to:
[0199] Determine a comprehensive resource trend change rate according to the usage rate trend evaluation parameters corresponding to each of the performance resources; and,
[0200] Determine the comprehensive resource fluctuation degree according to the usage rate fluctuation evaluation parameters corresponding to each of the performance resources;
[0201] Determine the load threshold adjustment parameter according to the comprehensive resource trend change rate and the comprehensive resource fluctuation degree.
[0202] Optionally, the second scheduling mode determination module 605 includes:
[0203] A frequency threshold range determination unit, configured to determine a task frequency dynamic threshold range;
[0204] A second scheduling mode determination first module, configured to use the active polling scheduling mode as the second resource scheduling mode if the task scheduling frequency is greater than the upper limit value of the task frequency dynamic threshold range; or,
[0205] The second scheduling mode determines a second module, which is used to, if the task scheduling frequency is less than the lower limit value of the dynamic threshold range of the task frequency, take the passive perception scheduling mode as the second resource scheduling mode; or,
[0206] The second scheduling mode determines a third module, which is used to, if the task scheduling frequency is not greater than the upper limit value of the dynamic threshold range of the task frequency and not less than the lower limit value of the dynamic threshold range of the task frequency, take the hybrid scheduling mode as the second resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive perception scheduling mode.
[0207] Optionally, the frequency threshold range determination unit is specifically used for:
[0208] Determine the historical scheduling frequency under the preset scheduling time period;
[0209] According to the historical scheduling frequency, determine the task frequency mean and the task frequency standard deviation;
[0210] According to the task frequency mean and the task frequency standard deviation, determine the dynamic threshold range of the task frequency.
[0211] Optionally, the task resource scheduling module 606 includes:
[0212] The first task resource scheduling unit is used to, if the modes of the first resource scheduling mode and the second resource scheduling mode are the same, determine the first resource scheduling mode or the second resource scheduling mode as the target resource scheduling mode;
[0213] The task frequency evaluation parameter determination unit is used to, if the modes of the first resource scheduling mode and the second resource scheduling mode are different, obtain the historical task scheduling frequency under the historical scheduling time period, and determine the task frequency trend evaluation parameter according to the task scheduling frequency and the historical task scheduling frequency;
[0214] The second task resource scheduling unit is used to determine the target resource scheduling mode according to the resource comprehensive load index, the task scheduling frequency, the usage rate trend evaluation parameter, the usage rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter.
[0215] Optionally, the second task resource scheduling unit is specifically used for:
[0216] According to the resource comprehensive load index, the task scheduling frequency, the usage rate trend evaluation parameter, the usage rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter, determine the target resource scheduling mode based on a pre-trained resource scheduling prediction model;
[0217] Among them, the resource scheduling prediction model is obtained by pre-training the pre-constructed sample training data; the sample training data is generated based on the historical resource comprehensive load index, historical task scheduling frequency, historical usage rate trend evaluation parameter, historical usage rate fluctuation evaluation parameter, historical task frequency trend evaluation parameter, and historical resource scheduling mode obtained under the historical scheduling time period.
[0218] The task resource scheduling device provided by the embodiments of the present invention can execute the task resource scheduling method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0219] Embodiment Seven
[0220] Figure 7 FIG. shows a schematic structural diagram of an electronic device 70 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0221] As Figure 7 shown, the electronic device 70 includes at least one processor 71, and a memory communicatively connected to the at least one processor 71, such as a read-only memory (ROM) 72, a random access memory (RAM) 73, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 71 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 72 or the computer program loaded from the storage unit 78 into the random access memory (RAM) 73. In the RAM 73, various programs and data required for the operation of the electronic device 70 can also be stored. The processor 71, the ROM 72, and the RAM 73 are connected to each other through a bus 74. The input / output (I / O) interface 75 is also connected to the bus 74.
[0222] Multiple components in the electronic device 70 are connected to the I / O interface 75, including: an input unit 76, such as a keyboard, a mouse, etc.; an output unit 77, such as various types of displays, speakers, etc.; a storage unit 78, such as a magnetic disk, an optical disc, etc.; and a communication unit 79, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 79 allows the electronic device 70 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0223] The processor 71 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 71 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 71 executes the various methods and processes described above, such as the task resource scheduling method.
[0224] In some embodiments, the task resource scheduling method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 78. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 70 via the ROM 72 and / or the communication unit 79. When the computer program is loaded into the RAM 73 and executed by the processor 71, one or more steps of the task resource scheduling method described above can be executed. Alternatively, in other embodiments, the processor 71 can be configured to execute the task resource scheduling method by any other suitable means (e.g., by means of firmware).
[0225] The various embodiments of the systems and technologies described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a special or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0226] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0227] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0228] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0229] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0230] A computing system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0231] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0232] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A task resource scheduling method, characterized in that, Including: Obtaining the current resource utilization rate of at least one performance resource of the target server to which the application system to be scheduled belongs in the current scheduling time period, obtaining the historical resource utilization rate of each of the performance resources in the historical scheduling time period, and obtaining the task execution request volume of the application system to be scheduled in the current scheduling time period; Determining a comprehensive resource load index according to the current resource utilization rate and the historical resource utilization rate of each of the performance resources; And, Determining the task scheduling frequency according to the task execution request volume; Determining a first resource scheduling mode according to the comprehensive resource load index; and, Determining a second resource scheduling mode according to the task scheduling frequency; Determining a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and performing system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode; The determining the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode includes: If the modes of the first resource scheduling mode and the second resource scheduling mode are different, determining the target resource scheduling mode based on a resource scheduling prediction model obtained by pre-training according to the comprehensive resource load index, the task scheduling frequency, a utilization rate trend evaluation parameter, a utilization rate fluctuation evaluation parameter, and a task frequency trend evaluation parameter.
2. The method according to claim 1, characterized in that, The historical resource utilization rate includes a historical resource start utilization rate and a historical resource intermediate utilization rate; correspondingly, the determining the comprehensive resource load index according to the current resource utilization rate and the historical resource utilization rate of each of the performance resources includes: Determining a utilization rate trend evaluation parameter corresponding to each of the performance resources according to the current resource utilization rate and the historical resource intermediate utilization rate of the corresponding performance resource; and, Determining a utilization rate fluctuation evaluation parameter corresponding to each of the performance resources according to the current resource utilization rate, the historical resource start utilization rate, and the historical resource intermediate utilization rate of the corresponding performance resource; Determining a resource load evaluation index corresponding to each of the performance resources according to the current resource utilization rate, the utilization rate trend evaluation parameter, and the utilization rate fluctuation evaluation parameter of the corresponding performance resource; Determining the comprehensive resource load index according to the resource load evaluation indexes of each of the performance resources.
3. The method according to claim 2, wherein The determining the comprehensive resource load index according to the resource load evaluation indexes of each of the performance resources includes: Determining a resource mutual exclusion coefficient according to the resource load evaluation indexes of each of the performance resources; Determining the comprehensive resource load index based on the resource mutual exclusion coefficient according to the resource load evaluation indexes of each of the performance resources.
4. The method according to claim 2, wherein The determining the first resource scheduling mode according to the comprehensive resource load index includes: Determining a load threshold adjustment parameter; Determining a dynamic resource load threshold range based on the load threshold adjustment parameter according to a preset initial resource threshold range; If the comprehensive resource load index is greater than the upper limit value of the dynamic resource load threshold range, then using the active polling scheduling mode as the first resource scheduling mode; or, If the comprehensive resource load index is less than the lower limit of the resource load dynamic threshold range, then the passive perception scheduling mode is taken as the first resource scheduling mode; or, If the comprehensive resource load index is not greater than the upper limit of the resource load dynamic threshold range and not less than the lower limit of the resource load dynamic threshold range, then the hybrid scheduling mode is taken as the first resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive perception scheduling mode.
5. The method according to claim 4, characterized in that The determining of the load threshold adjustment parameter includes: Determining a comprehensive resource trend change rate according to the usage rate trend evaluation parameters respectively corresponding to each of the performance resources; and, Determining a comprehensive resource fluctuation degree according to the usage rate fluctuation evaluation parameters respectively corresponding to each of the performance resources; Determining the load threshold adjustment parameter according to the comprehensive resource trend change rate and the comprehensive resource fluctuation degree.
6. The method according to claim 1, wherein The determining of the second resource scheduling mode according to the task scheduling frequency includes: Determining a dynamic threshold range of the task frequency; If the task scheduling frequency is greater than the upper limit of the dynamic threshold range of the task frequency, then the active polling scheduling mode is taken as the second resource scheduling mode; or, If the task scheduling frequency is less than the lower limit of the dynamic threshold range of the task frequency, then the passive perception scheduling mode is taken as the second resource scheduling mode; or, If the task scheduling frequency is not greater than the upper limit of the dynamic threshold range of the task frequency and not less than the lower limit of the dynamic threshold range of the task frequency, then the hybrid scheduling mode is taken as the second resource scheduling mode; wherein, the hybrid scheduling mode is a task scheduling mode obtained by combining the active polling scheduling mode and the passive perception scheduling mode.
7. The method according to claim 6, characterized in that, The determining of the dynamic threshold range of the task frequency includes: Determining the historical scheduling frequency in a preset scheduling time period; Determining the average task frequency and the standard deviation of the task frequency according to the historical scheduling frequency; Determining the dynamic threshold range of the task frequency according to the average task frequency and the standard deviation of the task frequency.
8. The method according to claim 5, wherein The determining of the target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and performing system task resource scheduling on the application system to be scheduled based on the target resource scheduling mode includes: If the modes of the first resource scheduling mode and the second resource scheduling mode are the same, then the first resource scheduling mode or the second resource scheduling mode is determined as the target resource scheduling mode; If the modes of the first resource scheduling mode and the second resource scheduling mode are different, then obtaining the historical task scheduling frequency in the historical scheduling time period, and determining the task frequency trend evaluation parameter according to the task scheduling frequency and the historical task scheduling frequency; Determining the target resource scheduling mode according to the comprehensive resource load index, the task scheduling frequency, the usage rate trend evaluation parameter, the usage rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter.
9. The method according to claim 8, wherein Determining a target resource scheduling mode according to the resource comprehensive load index, the task scheduling frequency, the utilization rate trend evaluation parameter, the utilization rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter includes: Determining a target resource scheduling mode based on a pre-trained resource scheduling prediction model according to the resource comprehensive load index, the task scheduling frequency, the utilization rate trend evaluation parameter, the utilization rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter; wherein, the resource scheduling prediction model is pre-trained with sample training data pre-constructed; the sample training data is generated based on the historical resource comprehensive load index, the historical task scheduling frequency, the historical utilization rate trend evaluation parameter, the historical utilization rate fluctuation evaluation parameter, the historical task frequency trend evaluation parameter, and the historical resource scheduling mode obtained in the historical scheduling time period.
10. A task resource scheduling device, characterized in that, Including: A resource utilization rate acquisition module, configured to acquire the current resource utilization rate of at least one performance resource of a target server to which a to-be-scheduled application system belongs in the current scheduling time period, acquire the historical resource utilization rate of each of the performance resources in the historical scheduling time period, and acquire the task execution request volume of the to-be-scheduled application system in the current scheduling time period; A comprehensive index determination module, configured to determine a resource comprehensive load index according to the current resource utilization rate and the historical resource utilization rate of each of the performance resources; and, A task frequency determination module, configured to determine a task scheduling frequency according to the task execution request volume; A first scheduling mode determination module, configured to determine a first resource scheduling mode according to the resource comprehensive load index; and, A second scheduling mode determination module, configured to determine a second resource scheduling mode according to the task scheduling frequency; A task resource scheduling module, configured to determine a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode, and perform system task resource scheduling on the to-be-scheduled application system based on the target resource scheduling mode; Determining a target resource scheduling mode according to the first resource scheduling mode and the second resource scheduling mode includes: If the modes of the first resource scheduling mode and the second resource scheduling mode are different, then determine a target resource scheduling mode based on a pre-trained resource scheduling prediction model according to the resource comprehensive load index, the task scheduling frequency, the utilization rate trend evaluation parameter, the utilization rate fluctuation evaluation parameter, and the task frequency trend evaluation parameter.
11. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task resource scheduling method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to execute the task resource scheduling method according to any one of claims 1-9 when executed.
Citation Information
Patent Citations
Resource scheduling method and device, scheduling equipment and readable storage medium
CN119179559A
Dynamic computing power resource scheduling method, system and device and storage medium
CN119201411A