Resource availability prediction method and system based on historical load and real-time state

By collecting and processing historical task data from CPUs and GPUs, and combining attention mechanisms and long-cycle characteristics, the available resource range is dynamically adjusted, solving the problem of task failure caused by insufficient resources in traditional scheduling systems, and achieving efficient resource scheduling and task processing.

CN121233296BActive Publication Date: 2026-04-17EXANDS INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EXANDS INFORMATION TECH CO LTD
Filing Date
2025-09-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional computing power scheduling systems cannot combine historical load data with the current state, resulting in large differences in computing power requirements for AI training tasks at different stages, which may lead to task failure due to insufficient resources.

Method used

By collecting historical task data from CPU and GPU, outliers are removed and feature encoding is performed. The CPU availability range is dynamically adjusted in conjunction with an attention mechanism, and long-term characteristics of GPU are captured to predict the resource availability range. A global resource matrix is ​​then constructed to determine whether a task needs to be migrated.

Benefits of technology

It improves the accuracy of resource availability prediction, optimizes resource scheduling processes, avoids task failures, and improves the utilization rate of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233296B_ABST
    Figure CN121233296B_ABST
Patent Text Reader

Abstract

The application discloses a resource available quantity prediction method and system based on historical load and real-time state, relates to the technical field of big data analysis, and collects data to form CPU data set and GPU data set; removes abnormal values and carries out feature coding to form a structured feature matrix; extracts CPU time sequence rules, introduces an attention mechanism to dynamically adjust a predicted CPU available interval; captures GPU long-period stage features, combines historical stage computing power demand rules to predict a GPU available interval; integrates both available intervals into a global resource matrix, matches new task resource demand to determine whether migration is needed. The system comprises data acquisition, feature processing, available prediction and task judgment modules, and the modules work cooperatively. The application combines historical load and real-time state, improves resource available quantity prediction accuracy, optimizes resource scheduling, avoids task failure due to insufficient resources, and improves computing power resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, specifically to a method and system for predicting resource availability based on historical load and real-time status. Background Technology

[0002] Against the backdrop of the explosive development of artificial intelligence technology, the demand for AI computing power is growing exponentially. From large-scale computing clusters with tens of thousands of kilowatts for training large models to edge computing nodes for real-time inference, the efficient scheduling of computing resources has become the core challenge for unleashing the potential of AI.

[0003] Traditional computing power scheduling systems rely on static resource allocation strategies, which cannot combine historical load data with the current state to estimate the resource availability range in the future. Furthermore, the computing power requirements of AI training tasks vary greatly at different stages, but traditional scheduling strategies cannot determine whether a task needs to be migrated. During task execution, insufficient available resources may cause the task to fail. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for predicting resource availability based on historical load and real-time status, so as to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a resource availability prediction method based on historical load and real-time status, the resource availability prediction method comprising the following steps:

[0006] Step S1: Collect historical CPU task types, utilization, task response time, and load fluctuation cycle to form a CPU dataset; collect historical GPU task stage labels, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU dataset.

[0007] Step S2: Remove outliers from the CPU dataset and GPU dataset, and perform feature encoding on the processed CPU dataset and GPU dataset to form a structured feature matrix;

[0008] Step S3: Extract the time series patterns of the CPU data set in the structured feature matrix, introduce an attention mechanism, use the real-time state as the attention weight, and dynamically adjust the predicted CPU availability range.

[0009] Step S4: Capture the long-term phase features of the GPU dataset in the structured feature matrix, determine the current task phase, and predict the GPU availability range for the next phase by combining the computing power demand patterns of the same historical phases.

[0010] Step S5: Integrate the CPU availability range and GPU availability range into a global resource matrix, obtain the resource requirement parameters of the new task, and determine whether task migration is required.

[0011] Furthermore, in step S1, the historical task types include computationally intensive, I / O intensive, and memory intensive tasks; the utilization rate and task response time are collected in real time through system performance monitoring tools; the stage labels of the historical tasks include data loading stage, model training stage, result verification stage, and inference output stage; the computing power utilization rate and GPU memory usage are collected in real time through the GPU driver interface; the task duration is calculated by recording the difference between the start and end timestamps of the stage, and the start and end timestamps are obtained through task logs.

[0012] Furthermore, the specific steps of step S2 are as follows:

[0013] Step S2-1: Extract the CPU data set, calculate the mean and standard deviation of utilization and task response time, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified CPU data subset.

[0014] Step S2-2: Extract the GPU dataset, calculate the mean and standard deviation of computing power utilization, video memory usage, and task duration, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified GPU data subset.

[0015] Steps S2-3: Assign unique integer codes to the historical task types of the CPU data subset, while keeping the original values ​​of the numerical features; assign unique integer codes to the stage labels of the GPU data subset, while keeping the original values ​​of the numerical features.

[0016] Step S2-4: The encoded CPU data subset is encoded by task type, utilization rate, response time, and load fluctuation cycle to form a row vector, which constitutes the CPU feature matrix; the encoded GPU data subset is encoded by stage label, computing power utilization, video memory usage, duration, and switching time point to form a row vector, which constitutes the GPU feature matrix; the CPU feature matrix and the GPU feature matrix are combined to form a structured feature matrix.

[0017] Furthermore, the specific steps of step S3 are as follows:

[0018] Step S3-1: Extract CPU time series data with load fluctuation cycle as the time granularity from the CPU feature matrix of the structured feature matrix, arrange them in ascending order of timestamp, and form a CPU load time series containing the utilization rate, task response time and corresponding task type code at each time.

[0019] Step S3-2: Collect real-time CPU status parameters, including current utilization rate, current task response time, and current running task type, as input features for the attention mechanism;

[0020] Step S3-3: Calculate the cosine similarity between the historical utilization rate and task response time of each time point in the CPU load time series and the current utilization rate and current task response time in the real-time status parameters to obtain the initial weights for each time point; normalize the initial weights so that the sum of the weights is 1 to obtain the final attention weights.

[0021] Step S3-4: Input the CPU load time series into the Long Short-Term Memory network to predict the initial CPU available interval, and sum it with the final attention weight at the corresponding time point to obtain the CPU available interval.

[0022] Furthermore, the specific steps of step S4 are as follows:

[0023] Step S4-1: Extract the stage label sequence of each task and the start and end timestamps of the corresponding stage from the GPU feature matrix of the structured feature matrix, calculate the interval between the switching time points of adjacent stages, divide the long-cycle stage units, and extract the feature curves of the computing power utilization and memory usage of each stage in each long cycle as a function of time to form the GPU long-cycle stage feature library.

[0024] Step S4-2: Collect real-time status parameters of the GPU, including the stage label of the currently running task, the duration of the run in the stage, and the current computing power utilization. Match the current stage label with the stage labels in the GPU long-cycle stage feature library. Combine the average duration of stages with the same historical label to determine the long-cycle position of the current task.

[0025] Step S4-3: From the GPU long-cycle phase feature library, select historical phase data that have the same label as the current phase and are in the same long-cycle position, calculate the peak computing power utilization, peak memory usage and their time distribution probability of the historical phase, and extract the computing power demand change pattern of the same phase in the long cycle.

[0026] Step S4-4: Based on the current task's stage sequence, combine the computing power demand pattern obtained in step S4-3 with the current real-time computing power remaining amount and video memory remaining amount. The real-time computing power remaining amount is the total computing power minus the current utilization rate, and the video memory remaining amount is the total video memory minus the current usage amount. Calculate the dynamic range of computing power utilization rate and video memory usage in the next stage using the sliding window prediction method, thereby determining the available GPU range.

[0027] Furthermore, the specific steps of step S5 are as follows:

[0028] Step S5-1: Spatiotemporally align the CPU available range obtained in step S3 and the GPU available range obtained in step S4, and merge them based on the timestamp to form a global resource matrix containing the CPU and GPU resource reserves at each time.

[0029] Step S5-2: Collect the resource requirement parameters of the newly submitted task. The resource requirement parameters include the required CPU task type, expected utilization rate, response time requirement, GPU stage label, computing power and memory requirements and stage switching time, and match them with the global resource matrix.

[0030] Step S5-3: If all the resource requirements of the task fall within the CPU availability range and GPU availability range, then lock the corresponding resources for the current time period. If not all the resource requirements of the task fall within the current CPU availability range and GPU availability range, then mark it as a task to be migrated.

[0031] Furthermore, a resource availability prediction system based on historical load and real-time status is provided, which includes a data acquisition module, a feature processing module, a CPU availability prediction module, a GPU availability prediction module, and a task judgment module.

[0032] The data acquisition module is used to collect historical load data of CPU and GPU, forming corresponding CPU data sets and GPU data sets; the feature processing module is used to remove outliers and encode features in the CPU and GPU data sets, forming a structured feature matrix; the CPU availability prediction module is used to extract CPU time series patterns and introduce an attention mechanism to dynamically adjust the predicted CPU availability range; the GPU availability prediction module is used to capture long-term GPU phase features and predict the GPU availability range for the next phase in combination with the current task phase; the task judgment module is used to integrate the CPU and GPU availability ranges into a global resource matrix to determine whether a new task needs to be migrated.

[0033] The output of the data acquisition module is electrically connected to the input of the feature processing module; the output of the feature processing module is electrically connected to the input of the CPU available prediction module; the output of the CPU available prediction module is electrically connected to the input of the task judgment module; and the output of the GPU available prediction module is electrically connected to the input of the task judgment module.

[0034] Furthermore, the data acquisition module includes a CPU data acquisition unit and a GPU data acquisition unit;

[0035] The CPU data acquisition unit is used to collect historical CPU task types, utilization rates, task response times, and load fluctuation cycles to form a CPU data set; the GPU data acquisition unit is used to collect historical GPU task stage labels, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU data set.

[0036] Furthermore, the feature processing module includes an outlier removal unit and a feature encoding unit;

[0037] The outlier removal unit is used to calculate the mean and standard deviation of numerical features in CPU and GPU data, mark and remove records containing outliers, and form a cleaned data subset; the feature encoding unit is used to assign unique integer codes to the task type of the CPU data subset and the stage label of the GPU data subset, construct CPU and GPU feature matrices and form a structured feature matrix.

[0038] The CPU availability prediction module includes a time series extraction unit and an attention weighting unit. The time series extraction unit is used to extract CPU load time series data with load fluctuation cycle as the time granularity from the CPU feature matrix. The attention weighting unit is used to calculate the attention weights of historical data and real-time status, and to obtain the CPU availability interval by summing the initial CPU availability interval predicted by LSTM with the weights.

[0039] Furthermore, the GPU availability prediction module includes a long-cycle feature construction unit and a stage prediction unit; the long-cycle feature construction unit is used to extract the sequence of each task stage from the GPU feature matrix, divide it into long-cycle units, and form a GPU long-cycle stage feature library; the stage prediction unit is used to match the current GPU task stage label, combine the historical stage patterns to determine the current long-cycle position, and predict the GPU availability range of the next stage.

[0040] The task determination module includes a global resource integration unit and a task migration determination unit. The global resource integration unit is used to align the CPU availability range and GPU availability range in time and space, and merge them to form a global resource matrix containing the resource reserves at each moment. The task migration determination unit is used to obtain the resource requirement parameters of a new task and determine whether it falls within the availability range to determine whether task migration is required.

[0041] Compared with the prior art, the beneficial effects of the present invention are:

[0042] 1. This invention collects historical CPU and GPU data, forms a structured matrix through outlier removal and feature encoding, and dynamically adjusts the CPU availability range prediction by combining an attention mechanism. It also captures long-term GPU features to predict the availability range for the next stage, thereby improving the accuracy of resource availability prediction and providing a reliable basis for resource scheduling.

[0043] 2. This invention integrates the CPU and GPU available ranges into a global resource matrix by constructing a collaborative working mechanism among various modules. This allows for rapid matching of new task requirements, efficient determination of whether migration is necessary, optimization of resource scheduling processes, and improvement of task processing efficiency.

[0044] 3. This invention dynamically adjusts the prediction of resource availability by integrating historical load patterns and real-time status, and judges the task to avoid task failure due to insufficient resources. It adapts to the dynamic changes in computing power required by the task and improves the utilization rate of computing power resources. Attached Figure Description

[0045] Figure 1 This is a flowchart illustrating the resource availability prediction method based on historical load and real-time status of the present invention.

[0046] Figure 2 This is a schematic diagram of the resource availability prediction system based on historical load and real-time status according to the present invention. Detailed Implementation

[0047] 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.

[0048] Example 1: As Figure 1 As shown, this invention provides a technical solution: a resource availability prediction method based on historical load and real-time status. The resource availability prediction method includes the following steps:

[0049] Step S1: Collect historical CPU task types, utilization, task response time, and load fluctuation cycle to form a CPU dataset; collect historical GPU task stage labels, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU dataset.

[0050] In step S1, the historical task types include computationally intensive, I / O intensive, and memory intensive tasks; the utilization rate and task response time are collected in real time through system performance monitoring tools; the stage labels of the historical tasks include data loading stage, model training stage, result verification stage, and inference output stage; the computing power utilization rate and GPU memory usage are collected in real time through the GPU driver interface; the task duration is calculated by recording the difference between the start and end timestamps of the stage, and the start and end timestamps are obtained from the task log.

[0051] Step S2: Remove outliers from the CPU dataset and GPU dataset, and perform feature encoding on the processed CPU dataset and GPU dataset to form a structured feature matrix;

[0052] The specific steps of step S2 are as follows:

[0053] Step S2-1: Extract the CPU data set, calculate the mean and standard deviation of utilization and task response time, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified CPU data subset.

[0054] Step S2-2: Extract the GPU dataset, calculate the mean and standard deviation of computing power utilization, video memory usage, and task duration, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified GPU data subset.

[0055] Steps S2-3: Assign unique integer codes to the historical task types of the CPU data subset, while keeping the original values ​​of the numerical features; assign unique integer codes to the stage labels of the GPU data subset, while keeping the original values ​​of the numerical features.

[0056] Step S2-4: The encoded CPU data subset is encoded by task type, utilization rate, response time, and load fluctuation cycle to form a row vector, which constitutes the CPU feature matrix; the encoded GPU data subset is encoded by stage label, computing power utilization, video memory usage, duration, and switching time point to form a row vector, which constitutes the GPU feature matrix; the CPU feature matrix and the GPU feature matrix are combined to form a structured feature matrix.

[0057] Step S3: Extract the time series patterns of the CPU data set in the structured feature matrix, introduce an attention mechanism, use the real-time state as the attention weight, and dynamically adjust the predicted CPU availability range.

[0058] The specific steps of step S3 are as follows:

[0059] Step S3-1: Extract CPU time series data with load fluctuation cycle as the time granularity from the CPU feature matrix of the structured feature matrix, arrange them in ascending order of timestamp, and form a CPU load time series containing the utilization rate, task response time and corresponding task type code at each time.

[0060] Step S3-2: Collect real-time CPU status parameters, including current utilization rate, current task response time, and current running task type, as input features for the attention mechanism;

[0061] Step S3-3: Calculate the cosine similarity between the historical utilization rate and task response time of each time point in the CPU load time series and the current utilization rate and current task response time in the real-time status parameters to obtain the initial weights for each time point; normalize the initial weights so that the sum of the weights is 1 to obtain the final attention weights.

[0062] Step S3-4: Input the CPU load time series into the Long Short-Term Memory network to predict the initial CPU available interval, and sum it with the final attention weight at the corresponding time point to obtain the CPU available interval.

[0063] Step S4: Capture the long-term phase features of the GPU dataset in the structured feature matrix, determine the current task phase, and predict the GPU availability range for the next phase by combining the computing power demand patterns of the same historical phases.

[0064] The specific steps of step S4 are as follows:

[0065] Step S4-1: Extract the stage label sequence of each task and the start and end timestamps of the corresponding stage from the GPU feature matrix of the structured feature matrix, calculate the interval between the switching time points of adjacent stages, divide the long-cycle stage units, and extract the feature curves of the computing power utilization and memory usage of each stage in each long cycle as a function of time to form the GPU long-cycle stage feature library.

[0066] Step S4-2: Collect real-time status parameters of the GPU, including the stage label of the currently running task, the duration of the run in the stage, and the current computing power utilization. Match the current stage label with the stage labels in the GPU long-cycle stage feature library. Combine the average duration of stages with the same historical label to determine the long-cycle position of the current task.

[0067] Step S4-3: From the GPU long-cycle phase feature library, select historical phase data that have the same label as the current phase and are in the same long-cycle position, calculate the peak computing power utilization, peak memory usage and their time distribution probability of the historical phase, and extract the computing power demand change pattern of the same phase in the long cycle.

[0068] Step S4-4: Based on the current task's stage sequence, combine the computing power demand pattern obtained in step S4-3 with the current real-time computing power remaining amount and video memory remaining amount. The real-time computing power remaining amount is the total computing power minus the current utilization rate, and the video memory remaining amount is the total video memory minus the current usage amount. Calculate the dynamic range of computing power utilization rate and video memory usage in the next stage using the sliding window prediction method, thereby determining the available GPU range.

[0069] Step S5: Integrate the CPU availability range and GPU availability range into a global resource matrix, obtain the resource requirement parameters of the new task, and determine whether task migration is required.

[0070] The specific steps of step S5 are as follows:

[0071] Step S5-1: Spatiotemporally align the CPU available range obtained in step S3 and the GPU available range obtained in step S4, and merge them based on the timestamp to form a global resource matrix containing the CPU and GPU resource reserves at each time.

[0072] Step S5-2: Collect the resource requirement parameters of the newly submitted task. The resource requirement parameters include the required CPU task type, expected utilization rate, response time requirement, GPU stage label, computing power and memory requirements and stage switching time, and match them with the global resource matrix.

[0073] Step S5-3: If all the resource requirements of the task fall within the CPU availability range and GPU availability range, then lock the corresponding resources for the current time period. If not all the resource requirements of the task fall within the current CPU availability range and GPU availability range, then mark it as a task to be migrated.

[0074] For example:

[0075] An AI lab's model training platform needs to predict the availability of CPU and GPU resources for the next hour in order to determine whether newly submitted image inference tasks need to be migrated.

[0076] Collect CPU and GPU parameters as a dataset to extract outliers.

[0077] CPU: The mean utilization rate is 51.7%, and the standard deviation is 10.4%. All data are within the mean ± 2 standard deviations, with no outliers, forming a subset of CPU data.

[0078] GPU: The average computing power utilization rate is 55%, and the standard deviation is 25%. The data are all within a reasonable range, forming a subset of GPU data.

[0079] CPU feature matrix row vectors: [1, 60%, 20ms, 30 minutes], [2, 40%, 30ms, 30 minutes], [1, 55%, 25ms, 30 minutes];

[0080] GPU feature matrix row vectors: [1, 30%, 4GB, 10 minutes, 10:10], [2, 80%, 10GB, 40 minutes, 10:50];

[0081] The CPU feature matrix and the GPU feature matrix are combined horizontally to form a structured feature matrix.

[0082] CPU availability range prediction:

[0083] CPU load sequence arranged in ascending order by period: [(1,60%,20ms),(2,40%,30ms),(1,55%,25ms)]; The current task is compute-intensive, with a utilization of 50% and a response time of 22ms;

[0084] Attention weight calculation: Cosine similarity between historical data and real-time state: 0.92, 0.65, 0.88.

[0085] Normalized weights: 0.4, 0.2, 0.4.

[0086] LSTM predicts the initial interval: [30%, 45%].

[0087] Weighted summation: CPU available range = 30% × 0.4 + 35% × 0.2 + 45% × 0.4 = [36%, 42%].

[0088] GPU-available range prediction:

[0089] Long-cycle feature library: Extracting historical patterns of model training phase: the average duration of the same phase is 40 minutes, the next phase is inference output, computing power utilization [15%, 25%], video memory [3GB, 5GB];

[0090] Real-time status: The current stage is model training, which has been running for 20 minutes, with a computing power utilization of 80% and 10GB of GPU memory.

[0091] Next phase prediction: GPU availability range: computing power [15%, 25%], video memory [3GB, 5GB].

[0092] Resource integration and task assessment:

[0093] Global resource matrix: CPU available [36%, 42%], GPU computing power [15%, 25%], video memory [3GB, 5GB];

[0094] New task requirements: The image inference task requires 35% CPU utilization, 28ms response time, 20% GPU computing power, and 4GB of video memory.

[0095] Judgment result: All task requirements are within the available range and no migration is required.

[0096] Example 2, as Figure 2 As shown, the present invention provides a resource availability prediction system based on historical load and real-time status. The resource availability prediction system includes a data acquisition module, a feature processing module, a CPU availability prediction module, a GPU availability prediction module, and a task judgment module.

[0097] The data acquisition module is used to collect historical load data of CPU and GPU, forming corresponding CPU data sets and GPU data sets; the feature processing module is used to remove outliers and encode features in the CPU and GPU data sets, forming a structured feature matrix; the CPU availability prediction module is used to extract CPU time series patterns and introduce an attention mechanism to dynamically adjust the predicted CPU availability range; the GPU availability prediction module is used to capture long-term GPU phase features and predict the GPU availability range for the next phase in combination with the current task phase; the task judgment module is used to integrate the CPU and GPU availability ranges into a global resource matrix to determine whether a new task needs to be migrated.

[0098] The output of the data acquisition module is electrically connected to the input of the feature processing module; the output of the feature processing module is electrically connected to the input of the CPU available prediction module; the output of the CPU available prediction module is electrically connected to the input of the task judgment module; and the output of the GPU available prediction module is electrically connected to the input of the task judgment module.

[0099] The data acquisition module includes a CPU data acquisition unit and a GPU data acquisition unit. The CPU data acquisition unit is used to collect historical CPU task types, utilization rates, task response times, and load fluctuation cycles to form a CPU data set. The GPU data acquisition unit is used to collect historical GPU task stage tags, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU data set.

[0100] The feature processing module includes an outlier removal unit and a feature encoding unit. The outlier removal unit is used to calculate the mean and standard deviation of numerical features in CPU and GPU data, mark and remove records containing outliers, and form a cleaned data subset. The feature encoding unit is used to assign unique integer codes to the task type of the CPU data subset and the stage label of the GPU data subset, construct CPU and GPU feature matrices and form a structured feature matrix.

[0101] The CPU availability prediction module includes a time series extraction unit and an attention weighting unit. The time series extraction unit is used to extract CPU load time series data with load fluctuation cycle as the time granularity from the CPU feature matrix. The attention weighting unit is used to calculate the attention weights of historical data and real-time status, and to obtain the CPU availability interval by summing the initial CPU availability interval predicted by LSTM with the weights.

[0102] The GPU availability prediction module includes a long-cycle feature construction unit and a stage prediction unit. The long-cycle feature construction unit is used to extract the sequence of each task stage from the GPU feature matrix, divide it into long-cycle units, and form a GPU long-cycle stage feature library. The stage prediction unit is used to match the current GPU task stage label, combine the historical stage patterns to determine the current long-cycle position, and predict the GPU availability range of the next stage.

[0103] The task judgment module includes a global resource integration unit and a task migration judgment unit. The global resource integration unit is used to align the CPU available range and the GPU available range in time and space, and merge them to form a global resource matrix containing the resource reserves at each time. The task migration judgment unit is used to obtain the resource requirement parameters of a new task and determine whether it falls within the available range to determine whether task migration is required.

[0104] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for predicting resource availability based on historical load and real-time state, characterized in that: The resource availability prediction method includes the following steps: Step S1: Collect historical CPU task types, utilization, task response time, and load fluctuation cycle to form a CPU dataset; collect historical GPU task stage labels, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU dataset. Step S2: Remove outliers from the CPU dataset and GPU dataset, and perform feature encoding on the processed CPU dataset and GPU dataset to form a structured feature matrix; Step S3: Extract the time series patterns of the CPU data set in the structured feature matrix, introduce an attention mechanism, use the real-time state as the attention weight, and dynamically adjust the predicted CPU availability range. Step S4: Capture the long-term phase features of the GPU dataset in the structured feature matrix, determine the current task phase, and predict the GPU availability range for the next phase by combining the computing power demand patterns of the same historical phases. The specific steps of step S4 are as follows: Step S4-1: Extract the stage label sequence of each task and the start and end timestamps of the corresponding stage from the GPU feature matrix of the structured feature matrix, calculate the interval between the switching time points of adjacent stages, divide the long-cycle stage units, and extract the feature curves of the computing power utilization and memory usage of each stage in each long cycle as a function of time to form the GPU long-cycle stage feature library. Step S4-2: Collect real-time status parameters of the GPU, including the stage label of the currently running task, the duration of the run in the stage, and the current computing power utilization. Match the current stage label with the stage labels in the GPU long-cycle stage feature library. Combine the average duration of stages with the same historical label to determine the long-cycle position of the current task. Step S4-3: From the GPU long-cycle phase feature library, select historical phase data that have the same label as the current phase and are in the same long-cycle position, calculate the peak computing power utilization, peak memory usage and their time distribution probability of the historical phase, and extract the computing power demand change pattern of the same phase in the long cycle. Step S4-4: Based on the current task's stage sequence, combine the computing power demand pattern obtained in step S4-3 with the current real-time computing power remaining amount and video memory remaining amount. The real-time computing power remaining amount is the total computing power minus the current utilization rate, and the video memory remaining amount is the total video memory minus the current usage amount. Calculate the dynamic range of computing power utilization rate and video memory usage in the next stage using the sliding window prediction method, thereby determining the available GPU range. Step S5: Integrate the CPU availability range and GPU availability range into a global resource matrix, obtain the resource requirement parameters of the new task, and determine whether task migration is required. 2.The method of claim 1, wherein: In step S1, the historical task types include computationally intensive, I / O intensive, and memory intensive tasks; the utilization rate and task response time are collected in real time through system performance monitoring tools; the stage labels of the historical tasks include data loading stage, model training stage, result verification stage, and inference output stage; the computing power utilization rate and GPU memory usage are collected in real time through the GPU driver interface; the task duration is calculated by recording the difference between the start and end timestamps of the stage, and the start and end timestamps are obtained from the task log. 3.The method of claim 1, wherein: The specific steps of step S2 are as follows: Step S2-1: Extract the CPU data set, calculate the mean and standard deviation of utilization and task response time, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified CPU data subset. Step S2-2: Extract the GPU dataset, calculate the mean and standard deviation of computing power utilization, video memory usage, and task duration, mark values ​​that exceed the mean threshold as outliers, remove records containing outliers, and form a purified GPU data subset. Step S2-3: Assign unique integer codes to the historical task types of the CPU data subset, while keeping the original values ​​of the numerical features; assign unique integer codes to the stage labels of the GPU data subset, while keeping the original values ​​of the numerical features. Step S2-4: The encoded CPU data subset is encoded by task type, utilization rate, response time, and load fluctuation cycle to form a row vector, which constitutes the CPU feature matrix; the encoded GPU data subset is encoded by stage label, computing power utilization, video memory usage, duration, and switching time point to form a row vector, which constitutes the GPU feature matrix; the CPU feature matrix and the GPU feature matrix are combined to form a structured feature matrix. 4.The method of claim 1, wherein: The specific steps of step S3 are as follows: Step S3-1: Extract CPU time series data with load fluctuation cycle as the time granularity from the CPU feature matrix of the structured feature matrix, arrange them in ascending order of timestamp, and form a CPU load time series containing the utilization rate, task response time and corresponding task type code at each time. Step S3-2: Collect real-time CPU status parameters, including current utilization rate, current task response time, and current running task type, as input features for the attention mechanism; Step S3-3: Calculate the cosine similarity between the historical utilization rate and task response time of each time point in the CPU load time series and the current utilization rate and current task response time in the real-time status parameters to obtain the initial weight of each time point. The initial weights are normalized so that the sum of the weights is 1, thus obtaining the final attention weights. Step S3-4: Input the CPU load time series into the Long Short-Term Memory network to predict the initial CPU available interval, and sum it with the final attention weight at the corresponding time point to obtain the CPU available interval.

5. The method of claim 1, wherein: The specific steps of step S5 are as follows: Step S5-1: Spatiotemporally align the CPU available range obtained in step S3 and the GPU available range obtained in step S4, and merge them based on the timestamp to form a global resource matrix containing the CPU and GPU resource reserves at each time. Step S5-2: Collect the resource requirement parameters of the newly submitted task. The resource requirement parameters include the required CPU task type, expected utilization rate, response time requirement, GPU stage label, computing power and memory requirements and stage switching time, and match them with the global resource matrix. Step S5-3: If all the resource requirements of the task fall within the CPU availability range and GPU availability range, then lock the corresponding resources for the current time period. If not all the resource requirements of the task fall within the current CPU availability range and GPU availability range, then mark it as a task to be migrated.

6. The resource availability prediction system based on historical load and real-time state, applied to the resource availability prediction method based on historical load and real-time state according to any one of claims 1-5, characterized in that: The resource availability prediction system includes a data acquisition module, a feature processing module, a CPU availability prediction module, a GPU availability prediction module, and a task judgment module. The data acquisition module is used to collect historical load data of CPU and GPU, forming corresponding CPU data sets and GPU data sets; the feature processing module is used to remove outliers and encode features in the CPU and GPU data sets, forming a structured feature matrix; the CPU availability prediction module is used to extract CPU time series patterns and introduce an attention mechanism to dynamically adjust the predicted CPU availability range; the GPU availability prediction module is used to capture long-term GPU phase features and predict the GPU availability range for the next phase in combination with the current task phase; the task judgment module is used to integrate the CPU and GPU availability ranges into a global resource matrix to determine whether a new task needs to be migrated. The output of the data acquisition module is electrically connected to the input of the feature processing module; the output of the feature processing module is electrically connected to the input of the CPU available prediction module; the output of the CPU available prediction module is electrically connected to the input of the task judgment module; and the output of the GPU available prediction module is electrically connected to the input of the task judgment module.

7. The system for predicting available resource quantity based on historical load and real-time status according to claim 6, characterized in that: The data acquisition module includes a CPU data acquisition unit and a GPU data acquisition unit. The CPU data acquisition unit is used to collect historical CPU task types, utilization rates, task response times, and load fluctuation cycles to form a CPU data set. The GPU data acquisition unit is used to collect historical GPU task stage tags, computing power utilization, video memory usage, task duration, and stage switching time points to form a GPU data set.

8. The system for predicting available resource quantity based on historical load and real-time status of claim 6, wherein: The feature processing module includes an outlier removal unit and a feature encoding unit. The outlier removal unit is used to calculate the mean and standard deviation of numerical features in CPU and GPU data, mark and remove records containing outliers, and form a cleaned data subset. The feature encoding unit is used to assign unique integer codes to the task type of the CPU data subset and the stage label of the GPU data subset, construct CPU and GPU feature matrices and form a structured feature matrix. The CPU availability prediction module includes a time series extraction unit and an attention weighting unit. The time series extraction unit is used to extract CPU load time series data with load fluctuation cycle as the time granularity from the CPU feature matrix. The attention weighting unit is used to calculate the attention weights of historical data and real-time status, and to obtain the CPU availability interval by summing the initial CPU availability interval predicted by LSTM with the weights.

9. The system for predicting available resource quantity based on historical load and real-time status of claim 6, wherein: The GPU availability prediction module includes a long-cycle feature construction unit and a stage prediction unit. The long-cycle feature construction unit is used to extract the sequence of each task stage from the GPU feature matrix, divide it into long-cycle units, and form a GPU long-cycle stage feature library. The stage prediction unit is used to match the current GPU task stage label, combine the historical stage patterns to determine the current long-cycle position, and predict the GPU availability range of the next stage. The task judgment module includes a global resource integration unit and a task migration judgment unit. The global resource integration unit is used to align the CPU available range and the GPU available range in time and space, and merge them to form a global resource matrix containing the resource reserves at each time. The task migration judgment unit is used to obtain the resource requirement parameters of a new task and determine whether it falls within the available range to determine whether task migration is required.

Citation Information

Patent Citations

  • Computing power resource processing method

    CN118069380A

  • Network resource allocation method and system based on network load

    CN120342973A