Resource available amount 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 insufficient resources in traditional scheduling systems and achieving efficient resource scheduling and task processing.

CN121233296AActive Publication Date: 2025-12-30EXANDS INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511315210.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-30
Estimated Expiration
2045-09-15

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 by combining an attention mechanism, long-term characteristics of GPU are captured, resource availability range is predicted, and integrated into a global resource matrix 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 CN121233296A_ABST
    Figure CN121233296A_ABST
Patent Text Reader

Abstract

The invention discloses a historical load and real-time state-based resource available amount prediction method and system, and relates to the technical field of big data analysis, and the method comprises the steps: collecting data to form a CPU data set and a GPU data set; removing abnormal values and carrying out feature coding to form a structured feature matrix; extracting a CPU time sequence rule, and introducing an attention mechanism to dynamically adjust and predict a CPU available interval; capturing GPU long-period stage features, and predicting a GPU available interval in combination with a historical stage computing power demand rule; and integrating the available intervals of the two into a global resource matrix, and matching new task resource requirements to judge whether migration is needed or not. The system comprises a data acquisition module, a feature processing module, an available prediction module and a task judgment module which work cooperatively. According to the method, the historical load and the real-time state are fused, the prediction accuracy of the available resource amount is improved, resource scheduling is optimized, failure of tasks due to insufficient resources is avoided, and the computing power resource utilization rate is increased.
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 task type includes 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 the time distribution probability of the two in the historical phase, and extract the computing power demand change pattern in the long cycle of the same phase.

[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, lock the corresponding resources for that time period. If not all the resource requirements of the task fall within the current CPU availability range and GPU availability range, 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; 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 purified 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.

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

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

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

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

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

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

[0043] 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

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

[0045] 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

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

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

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

[0049] In step S1, the 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.

[0050] 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;

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

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

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

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

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

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

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

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

[0059] 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;

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

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

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

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

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

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

[0066] 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 the time distribution probability of the two in the historical phase, and extract the computing power demand change pattern in the long cycle of the same phase.

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

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

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

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

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

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

[0073] For example:

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

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

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

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

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

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

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

[0081] CPU availability range prediction:

[0082] 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;

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

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

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

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

[0087] GPU-available range prediction:

[0088] 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];

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

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

[0091] Resource integration and task assessment:

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

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

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

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

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

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

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

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

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

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

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

[0103] 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 available amount prediction method comprises the following steps: Step S1, collect CPU historical task type, usage rate, task response time, load fluctuation period, form CPU data set, collect GPU historical task stage label, computing power utilization rate, video memory usage, task duration and stage switching time point, form GPU data set; Step S2, remove the abnormal values of the CPU data set and the GPU data set, and perform feature coding on the processed CPU data set and the GPU data set to form a structured feature matrix; Step S3, extract the time sequence rule of the CPU data set in the structured feature matrix, introduce the attention mechanism, take the real-time state as the attention weight, and dynamically adjust the prediction CPU available interval; Step S4, capture the long-period stage characteristics of the GPU data set in the structured feature matrix, and judge the current task stage, combine the computing power demand rule of the same historical stage, and predict the GPU available interval of the next stage; Step S5, integrate the CPU available interval and the GPU available interval into a global resource matrix, obtain the resource demand parameters of a new task, and judge whether task migration is needed. 2.The method of claim 1, wherein: In step S1, the task type includes compute-intensive, IO-intensive and memory-intensive; the usage rate and task response time are collected in real time through a system performance monitoring tool; the historical task stage label includes data loading stage, model training stage, result verification stage and inference output stage; the computing power utilization rate and video memory usage are collected in real time through a GPU driver program interface; the task duration is calculated by recording the difference between the start timestamp and the end timestamp, and the start timestamp and the end timestamp are obtained through a 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 the usage rate and task response time, mark the values exceeding the mean threshold as abnormal values, remove the records containing abnormal values, and form a purified CPU data subset; Step S2-2, extract the GPU data set, calculate the mean and standard deviation of the computing power utilization rate, video memory usage and task duration, mark the values exceeding the mean threshold as abnormal values, remove the records containing abnormal values, and form a purified GPU data subset; Step S2-3, assign a unique integer code to the historical task type of the CPU data subset, and the numerical feature remains the original value; assign a unique integer code to the stage label of the GPU data subset, and the numerical feature remains the original value; Step S2-4, form a row vector according to the combination of task type code, usage rate, response time and load fluctuation period of the coded CPU data subset, and form a CPU feature matrix; form a row vector according to the combination of stage label code, computing power utilization rate, video memory usage, duration and switching time point of the coded GPU data subset, and form a GPU feature matrix; and combine the CPU feature matrix and the GPU feature matrix 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, from the CPU feature matrix of the structured feature matrix, extract the CPU time series data with the load fluctuation period as the time granularity, arrange in ascending order of timestamp, form the CPU load time series containing the usage rate, task response time and corresponding task type code at each time; Step S3-2, collect the real-time state parameters of the CPU, including the current usage rate, current task response time and current running task type, as the input features of the attention mechanism; Step S3-3, calculate the cosine similarity between the historical usage rate and task response time at each time point in the CPU load time series and the current usage rate and current task response time in the real-time state parameters to obtain the initial weight of each time point; The initial weight is normalized to make the total weight 1 to obtain the final attention weight; Step S3-4, input the CPU load time series into the long short-term memory network to predict the CPU available initial interval, and weight and sum 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 S4 are as follows: Step S4-1, from the GPU feature matrix of the structured feature matrix, extract the phase label sequence of each task and the start and end timestamps of the corresponding phase, calculate the interval length of the adjacent phase switching points, divide the long period phase unit, extract the feature curve of the change of the GPU utilization rate and the memory usage with time in each phase in each long period, and form the GPU long period phase feature library; Step S4-2, collect the real-time state parameters of the GPU, including the phase label of the current running task, the running time in the phase and the current GPU utilization rate, match the current phase label with the phase label in the GPU long period phase feature library, combine the average duration of the same historical label phase, and determine the long period position of the current task; Step S4-3, filter out the historical phase data with the same phase label and in the same long period position from the GPU long period phase feature library, calculate the peak value of the GPU utilization rate, the peak value of the memory usage and the time distribution probability of the two, and extract the GPU demand change rule in the same phase in the long period; Step S4-4, according to the phase sequence order of the current task, combine the same phase GPU demand rule obtained in step S4-3 with the current real-time GPU remaining amount and the memory remaining amount, the real-time GPU remaining amount is the total GPU minus the current utilization rate, and the memory remaining amount is the total memory minus the current usage, calculate the dynamic range of the GPU utilization rate and the memory usage in the next phase by the sliding window prediction method, and then determine the GPU available interval.

6. The method of claim 1, wherein: The specific steps of step S5 are as follows: Step S5-1, time and space align the CPU available interval obtained in step S3 and the GPU available interval obtained in step S4, take the timestamp as the reference, and combine to form a global resource matrix containing the CPU and GPU resource surplus at each time; Step S5-2, collect the resource requirement parameters of the newly submitted task, including the required CPU task type, the expected usage rate, the response time requirement, the GPU phase label, the computing power and the video memory requirement, and the phase switching time, and match them with the global resource matrix; Step S5-3, if the resource requirement parameters of the task all fall within the CPU available interval and the GPU available interval, and the corresponding resources in this time period are locked, if the resource requirement parameters of the task do not all fall within the current CPU available interval and the GPU available interval, mark it as a task to be migrated.

7. A system for predicting resource availability based on historical load and real-time state, applied to the method for predicting resource availability based on historical load and real-time state according to any one of claims 1-6, characterized in that: The resource available amount prediction system comprises a data collection module, a feature processing module, a CPU available prediction module, a GPU available prediction module and a task judgment module; The data collection module is used to collect the historical load data of CPU and GPU to form corresponding CPU data set and GPU data set; the feature processing module is used to perform outlier rejection and feature coding on the CPU and GPU data set to form a structured feature matrix; the CPU available prediction module is used to extract the CPU time series rule and introduce the attention mechanism to dynamically adjust the prediction CPU available interval; the GPU available prediction module is used to capture the GPU long-period phase feature and combine the current task phase to predict the GPU available interval of the next phase; the task judgment module is used to integrate the CPU and GPU available intervals into a global resource matrix to judge whether the new task needs to be migrated; The output end of the data collection module is electrically connected to the input end of the feature processing module; the output end of the feature processing module is electrically connected to the input end of the CPU available prediction module; the output end of the CPU available prediction module is electrically connected to the input end of the task judgment module; the output end of the GPU available prediction module is electrically connected to the input end of the task judgment module.

8. The system for predicting available resource quantity based on historical load and real-time status according to claim 7, characterized in that: The data collection module comprises a CPU data collection unit and a GPU data collection unit; the CPU data collection unit is used to collect the CPU historical task type, usage rate, task response time and load fluctuation period to form a CPU data set; the GPU data collection unit is used to collect the GPU historical task phase label, computing power utilization rate, video memory usage, task duration and phase switching time point to form a GPU data set.

9. The system for predicting available resource quantity based on historical load and real-time status of claim 7, wherein: The feature processing module comprises an outlier rejection unit and a feature coding unit; the outlier rejection unit is used to calculate the mean and standard deviation of the numerical features in the CPU and GPU data, mark and remove the records containing outliers to form a purified data subset; the feature coding unit is used to assign unique integer coding to the task type of the CPU data subset and the phase label of the GPU data subset, construct the CPU and GPU feature matrix and form a structured feature matrix; The CPU available prediction module comprises a time series extraction unit and an attention weighting unit; the time series extraction unit is configured to extract CPU load time series data with a load fluctuation period as a time granularity from a CPU feature matrix; and the attention weighting unit is configured to calculate an attention weight of historical data and real-time state, and to obtain a CPU available interval by weighted summation of an initial interval of CPU available prediction and the weight.

10. The system for predicting available resource quantity based on historical load and real-time status of claim 7, wherein: The GPU available prediction module comprises a long-period feature construction unit and a stage prediction unit; the long-period feature construction unit is configured to extract each task stage sequence from a GPU feature matrix, divide long-period units, and form a GPU long-period stage feature library; and the stage prediction unit is configured to match a current GPU task stage label, judge a current long-period position in combination with a historical stage rule, and predict a GPU available interval of a next stage. The task judgment module comprises a global resource integration unit and a task migration judgment unit; the global resource integration unit is configured to time-space align the CPU available interval and the GPU available interval, and to merge to form a global resource matrix comprising resource margins at each time; and the task migration judgment unit is configured to obtain resource demand parameters of a new task, and to determine whether the new task needs task migration by judging whether the new task falls within the available interval.

Citation Information

Patent Citations

  • Computing power resource processing method

    CN118069380A

  • PCFarm resource scheduling method and system based on dynamic load prediction

    CN120104355A

  • Network resource allocation method and system based on network load

    CN120342973A

  • Automobile manufacturing industrial data distributed processing method and system based on digital twinning

    CN120596237A