Resource scheduling method, system and device for AI training tasks on cloud and medium
By using multi-dimensional resource monitoring and a long short-term memory network prediction model, resource allocation is dynamically adjusted, solving the problems of low resource utilization and high cost in cloud resource scheduling, and achieving efficient and adaptive resource management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-21
AI Technical Summary
Existing cloud resource scheduling methods cannot adapt to the dynamic needs of AI training tasks, resulting in low resource utilization, increased costs, and performance bottlenecks, and lack of comprehensive consideration of multi-dimensional resource characteristics.
By using multi-dimensional resource monitoring and feature extraction, a time series prediction model is constructed using a long short-term memory network to achieve accurate prediction of resource demand. Based on the prediction results, an elastic scheduling strategy is implemented to dynamically adjust resource allocation.
Improve resource utilization, reduce training task completion time, lower operating costs, and enhance system adaptability and robustness.
Smart Images

Figure CN121900951A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of cloud computing and artificial intelligence technology, and specifically to a resource scheduling method, system, device, and medium for cloud-based AI training tasks. Background Technology
[0002] With the rapid development of artificial intelligence technology, cloud-based AI training tasks (such as deep learning model training) are becoming increasingly common. These tasks typically require a large amount of computing resources (such as GPUs and CPUs), storage resources (such as memory and disks), and network resources (such as bandwidth), and the resource requirements are dynamic.
[0003] Existing cloud resource scheduling methods mostly employ static allocation or dynamic scheduling based on simple rules (such as automatic scaling based on thresholds), which have the following limitations: First, static resource allocation cannot adapt to the fluctuating needs of AI training tasks, resulting in low resource utilization, resource waste, and increased costs; Second, simple rule scheduling lacks comprehensive consideration of multi-dimensional resource characteristics, such as focusing only on CPU utilization while ignoring memory or I / O bottlenecks, which can easily lead to performance bottlenecks or task delays.
[0004] Therefore, there is an urgent need for an intelligent and flexible scheduling scheme that can achieve efficient and adaptive resource management through multi-dimensional resource utilization feature prediction. Summary of the Invention
[0005] The purpose of this invention is to provide a resource scheduling method, system, device, and medium for cloud-based AI training tasks. By monitoring resources from multiple dimensions and extracting features, the dynamic requirements of AI training tasks can be fully captured. Predictive models can be used to accurately predict resource requirements. Based on the prediction results, elastic scheduling strategies can be implemented to dynamically adjust resource allocation, thereby improving resource utilization, reducing training task completion time, reducing cloud environment operating costs, and enhancing the system's adaptability and robustness.
[0006] To achieve the above objectives, embodiments of the present invention provide a resource scheduling method for cloud-based AI training tasks, including: Deploy a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time; The multi-dimensional resource utilization features are input into a pre-built time series prediction model, which outputs short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks. The time series prediction model is built based on a long short-term memory network. Based on the short-term resource demand forecast results, the long-term resource demand forecast results, and the current resource status, a scheduling strategy is formulated and a scheduling instruction is generated, wherein the scheduling strategy includes resource scaling up and down and task migration. Based on the scheduling instructions, resource scaling and task migration operations are performed.
[0007] Optionally, the multi-dimensional resource utilization characteristics include dynamic usage indicators for computing resources, storage resources, and network resources. The computing resource dimension includes at least CPU utilization, GPU utilization, and floating-point operation capability; the storage resource dimension includes at least memory occupancy, disk I / O throughput, and storage latency; and the network resource dimension includes at least bandwidth utilization, network latency, and packet loss rate.
[0008] Optionally, after deploying a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time, the following may also be included: Data cleaning is performed on the multi-dimensional resource utilization features of the collected AI training tasks to remove outliers and noisy data; The cleaned data is normalized to map resource utilization feature values of different dimensions to a unified numerical range. Based on the normalized data, statistical features and time-series features of the multi-dimensional resource utilization characteristics are extracted, wherein the statistical features include at least the mean, variance, and peak value; and the time-series features include at least the trend features and periodic features calculated based on a sliding window.
[0009] Optionally, the process of constructing the time series prediction model based on the Long Short-Term Memory network includes: The feature sequence of multi-dimensional resources collected in history is divided into several fixed-length historical time windows in chronological order. The feature vector sequence within each historical time window is used as the input sample of the time series prediction model, and the resource utilization feature vector sequences corresponding to the continuous future short-term time steps and future long-term time steps after the time window are used as the short-term prediction label and long-term prediction label of the sample, respectively, thus forming a complete supervised learning training dataset. Construct a long short-term memory neural network with an encoder-decoder architecture; The encoder consists of at least one bidirectional long short-term memory network layer, which is used to encode the input historical multi-dimensional resource using feature sequences, extract its temporal dependent features, and output the encoded context vector and the final hidden state. The decoder consists of two structurally independent subnetworks that do not share parameters: a short-term prediction decoder and a long-term prediction decoder. The short-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its initial hidden state is obtained by linear transformation of the final hidden state of the encoder. It is responsible for receiving the context vector output by the encoder and recursively generating the resource demand prediction sequence within the future short-term time range. The long-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its network parameters are independent of the short-term prediction decoder, the initial hidden state is generated independently, and it is responsible for receiving the context vector output by the encoder to extract the context vector of the long-term trend and recursively generating the resource demand prediction sequence in the future long-term time range.
[0010] Optionally, the training and validation process of the time series prediction model includes: The constructed encoder-decoder long short-term memory neural network was trained using the training dataset; During training, a composite loss function is defined that includes short-term prediction loss and long-term prediction loss; wherein, the short-term prediction loss uses the mean squared error function to calculate the difference between the short-term prediction output of the time series prediction model and the short-term prediction label, and the long-term prediction loss uses the mean absolute error function to calculate the difference between the long-term prediction output of the time series prediction model and the long-term prediction label. The training process of the time series prediction model is monitored using time series cross-validation. The parameters of the time series prediction model are iteratively updated using the backpropagation algorithm and gradient descent optimizer, and early stopping is used to prevent overfitting. After training, the predictive performance metrics of the time series prediction model are evaluated using a test set.
[0011] Optionally, a scheduling strategy is formulated based on short-term resource demand forecasts, long-term resource demand forecasts, and the current resource status, including: Based on the short-term resource demand forecast results, the long-term resource demand forecast results, and the current real-time resource status of the cloud environment, a scheduling strategy is generated through a multi-objective optimization function. The multi-objective optimization function aims to minimize resource waste and maximize task completion rate, and uses total resources, task dependencies, and service quality protocol as constraints. The resource scaling instructions in the scheduling strategy are used to dynamically adjust the number of virtual machine instances or container resource quotas allocated to AI training tasks; the task migration instructions are used to reallocate tasks from nodes with insufficient resources to nodes with sufficient resources.
[0012] Optionally, after performing resource scaling and task migration operations based on the scheduling instructions, the method further includes: The actual resource usage is monitored through a feedback control mechanism, the error between the actual usage and the corresponding predicted value is calculated, and the parameters of the time series prediction model and the strategy parameters of the multi-objective optimization decision model are dynamically adjusted using the error feedback signal to achieve closed-loop optimization.
[0013] Secondly, the present invention also provides a resource scheduling system for cloud-based AI training tasks, comprising: The data acquisition module is used to deploy monitoring agents in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time. The prediction module is used to input the multi-dimensional resource utilization features into a pre-built time series prediction model and output short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks. The time series prediction model is built based on a long short-term memory network. The generation module is used to formulate scheduling strategies and generate scheduling instructions based on short-term resource demand forecast results, long-term resource demand forecast results and current resource status. The scheduling strategies include resource scaling up and down and task migration. The scheduling module is used to perform resource scaling and task migration operations based on the scheduling instructions.
[0014] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the resource scheduling method for the cloud AI training task described above.
[0015] Fourthly, the present invention also provides a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the resource scheduling method for the cloud-based AI training task described above.
[0016] Through the above technical solutions, the dynamic requirements of AI training tasks can be fully captured by multi-dimensional resource monitoring and feature extraction; accurate prediction of resource requirements can be achieved by using predictive models; and elastic scheduling strategies can be implemented based on the prediction results to dynamically adjust resource allocation, thereby improving resource utilization, reducing training task completion time, reducing cloud environment operation costs, and enhancing the system's adaptability and robustness.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a resource scheduling method for cloud-based AI training tasks provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a resource scheduling system for cloud-based AI training tasks provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the operation process of a resource scheduling system for cloud-based AI training tasks provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] Various embodiments of this disclosure will be described more fully in the following detailed description. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0020] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions or operations and do not limit the addition of one or more functions or operations. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, or combination of the foregoing and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, or combinations of the foregoing, or the possibility of adding one or more features, numbers, steps, operations, or combinations of the foregoing.
[0021] In various embodiments of this disclosure, the expression "or" or "at least one of A and / or B" includes any combination or all combinations of the words listed simultaneously. For example, the expression "A or B" or "at least one of A and / or B" may include A, may include B, or may include both A and B.
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] See Figure 1 The diagram shows a flowchart of a resource scheduling method for a cloud-based AI training task in a specific embodiment, including the following execution steps: Step 100: Deploy a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time.
[0024] Specifically, the multi-dimensional resource utilization characteristics include dynamic usage indicators for computing resources, storage resources, and network resources; wherein, the computing resources dimension includes at least CPU utilization, GPU utilization, and floating-point operation capability; the storage resources dimension includes at least memory occupancy, disk I / O throughput, and storage latency; and the network resources dimension includes at least bandwidth utilization, network latency, and packet loss rate.
[0025] In one specific embodiment, the monitoring data is stored in time-series format, and the sampling frequency can be dynamically adjusted according to the task load (e.g., once per second for high-load tasks and once per minute for low-load tasks). The acquisition process is non-intrusive to avoid interfering with the execution of training tasks.
[0026] In one specific embodiment, after performing step 100, the following steps are also performed: S1: Perform data cleaning on the multi-dimensional resource utilization features of the collected AI training tasks to remove outliers and noisy data.
[0027] S2: Normalize the cleaned data to map resource utilization feature values of different dimensions to a unified numerical range.
[0028] S3: Based on the normalized data, extract the statistical and temporal features of the multi-dimensional resource utilization characteristics. The statistical features include at least the mean, variance, and peak value; the temporal features include at least the trend and periodic features calculated based on a sliding window.
[0029] Step 101: Input the multi-dimensional resource utilization features into the pre-built time series prediction model and output short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks.
[0030] The time series prediction model is constructed based on a long short-term memory network.
[0031] Specifically, the process of constructing the time series prediction model based on the Long Short-Term Memory network includes the following steps: S1010: The multi-dimensional resource utilization feature sequence collected in history is divided into several fixed-length historical time windows in chronological order.
[0032] S1011: The feature vector sequence within each historical time window is used as the input sample of the time series prediction model, and the resource utilization feature vector sequences corresponding to the continuous future short-term time steps and future long-term time steps after the time window are used as the short-term prediction label and long-term prediction label of the sample, respectively, thus forming a complete supervised learning training dataset.
[0033] S1012: Construct a long short-term memory neural network with an encoder-decoder architecture.
[0034] The encoder consists of at least one bidirectional long short-term memory network layer, which is used to encode the historical multi-dimensional resources of the input using feature sequences, extract their temporal dependent features, and output the encoded context vector and the final hidden state; the decoder contains two structurally independent sub-networks with non-shared parameters, namely the short-term prediction decoder and the long-term prediction decoder.
[0035] The short-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its initial hidden state is obtained by linear transformation of the encoder's final hidden state. It is responsible for receiving the context vector output by the encoder and recursively generating resource demand prediction sequences for the future short-term time range. The long-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its network parameters are independent of the short-term prediction decoder, and its initial hidden state is generated independently. It is responsible for receiving the context vector output by the encoder to extract the long-term trend context vector and recursively generating resource demand prediction sequences for the future long-term time range.
[0036] In one specific implementation, after constructing the time series prediction model, the time series prediction model is trained and validated, and the process is as follows: The constructed encoder-decoder long short-term memory neural network is trained using a training dataset. During training, a composite loss function is defined, comprising short-term prediction loss and long-term prediction loss. The short-term prediction loss uses the mean squared error function to calculate the difference between the short-term prediction output of the time series prediction model and the short-term prediction label, while the long-term prediction loss uses the mean absolute error function to calculate the difference between the long-term prediction output of the time series prediction model and the long-term prediction label. The training process of the time series prediction model is monitored using time series cross-validation. The parameters of the time series prediction model are iteratively updated using the backpropagation algorithm and gradient descent optimizer, and early stopping is used to prevent overfitting. After training, the prediction performance metrics of the time series prediction model are evaluated using a test set.
[0037] In one specific embodiment, the composite loss function, which includes short-term prediction loss and long-term prediction loss, is as follows:
[0038] In the formula, For short-term prediction loss function, For long-term prediction loss function, , These are the weighting coefficients. This is a regularization term.
[0039] The short-term prediction loss function is as follows:
[0040] In the formula, The number of future time steps the model needs to predict. This represents the model's prediction of the k-th feature at the next i-th time step. Let d represent the true observation value of the k-th feature at the next i-th time step, and d represent the number of types of multi-dimensional resource utilization features in the input and output.
[0041] The long-term prediction loss function is as follows:
[0042] In the formula, This indicates the number of forward time steps the model needs to predict. This represents the model's prediction of the k-th feature at the j-th time step in the long-term view. d represents the true observation value of the k-th feature at the j-th time step in the long-term view, and d represents the number of types of multi-dimensional resource utilization features in the input and output.
[0043] Regularization term:
[0044] In the formula, Represents all learnable parameters A set of.
[0045] Step 102: Based on the short-term resource demand forecast results, the long-term resource demand forecast results, and the current resource status, formulate a scheduling strategy and generate scheduling instructions, wherein the scheduling strategy includes resource scaling up and down and task migration.
[0046] Specifically, when executing step 102, the following steps can be performed: Based on the short-term resource demand forecast results, long-term resource demand forecast results, and the current real-time resource status of the cloud environment, a scheduling strategy is generated through a multi-objective optimization function.
[0047] The multi-objective optimization function aims to minimize resource waste and maximize task completion rate, with total resources, task dependencies, and quality of service protocols as constraints. The resource scaling instructions in the scheduling strategy are used to dynamically adjust the number of virtual machine instances or container resource quotas allocated to AI training tasks. The task migration instructions are used to reallocate tasks from nodes with insufficient resources to nodes with sufficient resources.
[0048] In one specific embodiment, the multi-objective optimization function is as follows: Minimize resource waste function :
[0049] In the formula, X represents the set of scheduling decision variables, and K represents the number of resource dimensions. Let be the weight coefficient of the k-th dimension resource. This represents the amount of resource in the k-th dimension allocated to node j in the scheduling scheme. This represents the predicted total demand of the task for the k-th dimension resource over a future period, as output by the prediction module.
[0050] Maximize task completion rate function :
[0051] In the formula, N represents the total number of tasks. As an indicator function, when the estimated completion time of task i... No later than its deadline The value is 1 if it is true, and 0 otherwise.
[0052] Constraints: Total resource constraints: The resource allocation for each physical node or virtual machine must not exceed its available resource limit.
[0053] In the formula, This represents the set of tasks assigned to node j. This represents the upper limit of the capacity of the k-th dimension resource of node j.
[0054] Task dependency constraints: For task pairs that have sequential dependencies... ,satisfy:
[0055] In the formula, Indicates task The start time, For safety time intervals.
[0056] Service Quality Agreement (SQA) constraints: Resource allocation for each task must meet its minimum SQA requirements.
[0057] In the formula, This represents the minimum resource requirement of task i for the k-th dimension.
[0058] Step 103: Based on the scheduling instructions, perform resource scaling up / down and task migration operations.
[0059] In one specific implementation, after step 103 is executed, the following steps are also performed: monitoring the actual resource usage through a feedback control mechanism, calculating the error between the actual usage and the corresponding predicted value, and using the error feedback signal to dynamically adjust the parameters of the time series prediction model and the strategy parameters of the multi-objective optimization decision model to achieve closed-loop optimization.
[0060] In this embodiment, significant benefits are achieved through multi-dimensional resource utilization feature prediction and elastic scheduling: First, resource utilization is improved by more than 20%, avoiding resource idleness and over-configuration through prediction-driven scheduling; second, the average completion time of AI training tasks is reduced by 15%-30%, as resource allocation is more aligned with dynamic needs; third, operating costs are reduced, due to resource optimization reducing unnecessary cloud service overhead; fourth, the system has strong adaptability, adapting to load changes through a feedback mechanism, improving robustness and reliability; finally, this method can be extended to various cloud environments and AI task types, demonstrating broad applicability.
[0061] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0062] like Figure 2 As shown, the following are embodiments of the resource scheduling system for cloud AI training tasks provided in this disclosure. The resource scheduling methods for cloud AI training tasks in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the resource scheduling system for cloud AI training tasks, please refer to the embodiments of the resource scheduling methods for cloud AI training tasks described above.
[0063] The resource scheduling system for cloud-based AI training tasks includes: The data acquisition module is used to deploy monitoring agents in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time. The prediction module is used to input the multi-dimensional resource utilization features into a pre-built time series prediction model and output short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks. The time series prediction model is built based on a long short-term memory network. The generation module is used to formulate scheduling strategies and generate scheduling instructions based on short-term resource demand forecast results, long-term resource demand forecast results and current resource status. The scheduling strategies include resource scaling up and down and task migration. The scheduling module is used to perform resource scaling and task migration operations based on the scheduling instructions.
[0064] The system is deployed in a cloud environment using a microservice architecture, with each module capable of independent expansion, ensuring high availability and scalability. By combining the above methods with the system, precise and elastic scheduling of AI training tasks in the cloud is achieved.
[0065] In one specific embodiment, see Figure 3 The diagram illustrates the operation of a resource scheduling system for cloud-based AI training tasks according to an embodiment of the present invention. In the data acquisition and processing layer, a resource monitoring module is used to collect raw monitoring data in real time, i.e., multi-dimensional resource utilization characteristics. A feature extraction module, connected to the resource monitoring module, is used to preprocess the data and extract features to obtain structured feature vectors. In the intelligent prediction and decision-making layer, a prediction module, connected to the feature extraction module, is used to run a prediction model to generate resource demand prediction results. A scheduling decision module, connected to the prediction module, is used to formulate flexible scheduling strategies and generate scheduling instructions. In the scheduling execution layer, a scheduling execution module, connected to the scheduling decision module, is used to execute resource adjustment operations (such as between the cloud platform and AI training tasks). In the feedback optimization layer, a feedback control module, connected to the resource monitoring module and the prediction module, is used to achieve system adaptive optimization (including model optimization signals and strategy adjustment signals).
[0066] Figure 4 This is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.
[0067] The resource scheduling method for cloud-based AI training tasks provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0068] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.
[0069] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0070] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0071] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0072] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.
[0073] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.
[0074] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0075] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.
[0076] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0077] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0078] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0079] Electronic devices can achieve display functions through GPUs, displays, and application processors.
[0080] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0081] A display screen is used to display images, videos, etc. A display screen includes a display panel.
[0082] The storage medium provided in this application stores a program product that enables a resource scheduling method for implementing AI training tasks in the cloud.
[0083] The resource scheduling method for cloud-based AI training tasks includes: deploying a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of the AI training task in real time; inputting the multi-dimensional resource utilization characteristics into a pre-built time series prediction model to output short-term resource demand prediction results and long-term resource demand prediction results to cover the entire lifecycle of the AI training task, wherein the time series prediction model is built based on a long short-term memory network; formulating a scheduling strategy and generating scheduling instructions based on the short-term resource demand prediction results, the long-term resource demand prediction results, and the current resource status, wherein the scheduling strategy includes resource scaling and task migration; and performing resource scaling and task migration operations based on the scheduling instructions.
[0084] In some possible implementations, the subject matter of this disclosure, namely, "Resource Scheduling Method and System for Cloud AI Training Tasks," can be implemented as a program product comprising program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0085] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0086] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource scheduling method for cloud-based AI training tasks, characterized in that, include: Deploy a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time; The multi-dimensional resource utilization features are input into a pre-built time series prediction model, which outputs short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks. The time series prediction model is built based on a long short-term memory network. Based on the short-term resource demand forecast results, the long-term resource demand forecast results, and the current resource status, a scheduling strategy is formulated and a scheduling instruction is generated, wherein the scheduling strategy includes resource scaling up and down and task migration. Based on the scheduling instructions, resource scaling and task migration operations are performed.
2. The resource scheduling method for cloud-based AI training tasks according to claim 1, characterized in that, The multi-dimensional resource utilization characteristics include dynamic usage indicators for computing resources, storage resources, and network resources. The computing resource dimension includes at least CPU utilization, GPU utilization, and floating-point operation capability; the storage resource dimension includes at least memory occupancy, disk I / O throughput, and storage latency; and the network resource dimension includes at least bandwidth utilization, network latency, and packet loss rate.
3. The resource scheduling method for cloud-based AI training tasks according to claim 1, characterized in that, After deploying a monitoring agent in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time, the following steps are also included: Data cleaning is performed on the multi-dimensional resource utilization features of the collected AI training tasks to remove outliers and noisy data; The cleaned data is normalized to map resource utilization feature values of different dimensions to a unified numerical range. Based on the normalized data, statistical features and time-series features of the multi-dimensional resource utilization characteristics are extracted, wherein the statistical features include at least the mean, variance, and peak value; and the time-series features include at least the trend features and periodic features calculated based on a sliding window.
4. The resource scheduling method for cloud-based AI training tasks according to claim 1, characterized in that, The process of constructing the time series prediction model based on the Long Short-Term Memory network includes: The feature sequence of multi-dimensional resources collected in history is divided into several fixed-length historical time windows in chronological order. The feature vector sequence within each historical time window is used as the input sample of the time series prediction model, and the resource utilization feature vector sequences corresponding to the continuous future short-term time steps and future long-term time steps after the time window are used as the short-term prediction label and long-term prediction label of the sample, respectively, thus forming a complete supervised learning training dataset. Construct a long short-term memory neural network with an encoder-decoder architecture; The encoder consists of at least one bidirectional long short-term memory network layer, which is used to encode the input historical multi-dimensional resource using feature sequences, extract its temporal dependent features, and output the encoded context vector and the final hidden state. The decoder consists of two structurally independent subnetworks that do not share parameters: a short-term prediction decoder and a long-term prediction decoder. The short-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its initial hidden state is obtained by linear transformation of the final hidden state of the encoder. It is responsible for receiving the context vector output by the encoder and recursively generating the resource demand prediction sequence within the future short-term time range. The long-term prediction decoder consists of at least one unidirectional long short-term memory network layer and a fully connected output layer. Its network parameters are independent of the short-term prediction decoder, the initial hidden state is generated independently, and it is responsible for receiving the context vector output by the encoder to extract the context vector of the long-term trend and recursively generate the resource demand prediction sequence in the future long-term time range.
5. The resource scheduling method for cloud-based AI training tasks according to claim 4, characterized in that, The training and validation process of the time series prediction model includes: The constructed encoder-decoder long short-term memory neural network was trained using the training dataset; During training, a composite loss function is defined that includes short-term prediction loss and long-term prediction loss; wherein, the short-term prediction loss uses the mean squared error function to calculate the difference between the short-term prediction output of the time series prediction model and the short-term prediction label, and the long-term prediction loss uses the mean absolute error function to calculate the difference between the long-term prediction output of the time series prediction model and the long-term prediction label. The training process of the time series prediction model is monitored using time series cross-validation. The parameters of the time series prediction model are iteratively updated using the backpropagation algorithm and gradient descent optimizer, and early stopping is used to prevent overfitting. After training is complete, the predictive performance metrics of the time series prediction model are evaluated using a test set.
6. The resource scheduling method for cloud-based AI training tasks according to claim 1, characterized in that, Based on short-term resource demand forecasts, long-term resource demand forecasts, and the current resource status, a scheduling strategy is formulated, including: Based on the short-term resource demand forecast results, the long-term resource demand forecast results, and the current real-time resource status of the cloud environment, a scheduling strategy is generated through a multi-objective optimization function. The multi-objective optimization function aims to minimize resource waste and maximize task completion rate, and uses total resources, task dependencies, and service quality protocol as constraints. The resource scaling in the scheduling strategy is used to dynamically adjust the number of virtual machine instances or container resource quotas allocated to AI training tasks; the task migration is used to reallocate tasks from nodes with insufficient resources to nodes with sufficient resources.
7. The resource scheduling method for cloud-based AI training tasks according to claim 6, characterized in that, After performing resource scaling and task migration operations based on the scheduling instructions, the process further includes: The actual resource usage is monitored through a feedback control mechanism, the error between the actual usage and the corresponding predicted value is calculated, and the parameters of the time series prediction model and the strategy parameters of the multi-objective optimization decision model are dynamically adjusted using the error feedback signal to achieve closed-loop optimization.
8. A resource scheduling system for cloud-based AI training tasks, characterized in that, include: The data acquisition module is used to deploy monitoring agents in the cloud environment to collect multi-dimensional resource utilization characteristics of AI training tasks in real time. The prediction module is used to input the multi-dimensional resource utilization features into a pre-built time series prediction model and output short-term resource demand prediction results and long-term resource demand prediction results to cover the entire life cycle of AI training tasks. The time series prediction model is built based on a long short-term memory network. The generation module is used to formulate scheduling strategies and generate scheduling instructions based on short-term resource demand forecast results, long-term resource demand forecast results and current resource status. The scheduling strategies include resource scaling up and down and task migration. The scheduling module is used to perform resource scaling and task migration operations based on the scheduling instructions.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the resource scheduling method for cloud AI training tasks as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the resource scheduling method for the cloud AI training task as described in any one of claims 1 to 7.