A computer hardware resource intelligent management method

By building structural correlation charts and using hybrid scheduling algorithms, dynamically managing computer hardware resources is solved, the problem of resource competition in a multi-task environment is solved, and efficient resource utilization and system performance optimization is achieved.

CN119356888BActive Publication Date: 2025-03-18SHENZHEN CHUANGYINGXIN IND CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411922647.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-18
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In a multitasking environment, multiple programs or users may compete for computer hardware resources at the same time, resulting in resource conflicts, performance degradation, task delays, or system crashes, and fair distribution may reduce overall efficiency.

Method used

The intelligent management method of computer hardware resources is adopted, and by collecting user task data and computer comprehensive monitoring data, building structural correlation charts, establishing resource pools, and using a hybrid scheduling algorithm to adapt to task priority and time slice length, dynamically adjusting resource allocation and task scheduling.

Benefits of technology

It realizes precise allocation between tasks and resources, reduces resource competition, optimizes system performance, ensures the response time of high-priority tasks and the execution of low-priority tasks, and improves resource utilization and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356888B_ABST
    Figure CN119356888B_ABST
Patent Text Reader

Abstract

The invention belongs to the field of computer hardware resource management, and discloses a computer hardware resource intelligent management method; the method comprises: collecting task data of users and comprehensive monitoring data of computers at the same time point, and constructing a structural association diagram; establishing a resource pool, allocating each user's task to the resource pool according to the structural association diagram, and dynamically updating the tasks in the resource pool; using a hybrid scheduling algorithm to adaptively update the task priority and time slice length of each user in the resource pool, and dynamically queuing the user's tasks; executing each user's task according to the dynamic queue, and realizing efficient and high-quality intelligent management of computer hardware resources through comprehensive processing and hybrid algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer hardware resource management, and more specifically, to a computer hardware resource intelligent management method. Background Art

[0002] Managing the computer's hardware resources is one of the important tasks of operating system and computer system design. The computer's hardware resources are limited, and the applications and users running on the computer may need to use these resources at the same time. Especially in a multi-tasking environment, multiple programs or users may compete for resources at the same time, generating resource conflicts, leading to device conflicts or system crashes.

[0003] In modern computer systems, multiple users or programs need to share limited hardware resources at the same time. In particular, multiple tasks running at the same time may compete for the same resources, which may lead to performance degradation, task delays or system crashes. Fair allocation may reduce overall efficiency, extend the response time of high-priority tasks, and some tasks occupy resources for a long time while other tasks are not processed, which will reduce efficiency. Therefore, in multi-user or multi-process systems, resource competition is a core issue.

[0004] In view of this, the present invention proposes a computer hardware resource intelligent management method to solve the above problem. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: A computer hardware resource intelligent management method, comprising: Step S1: collecting the task data of the user and the comprehensive monitoring data of the computer at the same time point, and constructing a structural association chart;

[0006] Step S2: Establish a resource pool, assign each user's task to the resource pool according to the structural association chart, and dynamically update the tasks in the resource pool;

[0007] Step S3: Adaptively update the task priority and time slice length of each user in the resource pool using a hybrid scheduling algorithm, and dynamically queue the user's tasks;

[0008] Step S4: Execute the tasks of each user according to the dynamic queue.

[0009] Preferably, the user's task data includes user ID, task ID, task priority, task resource occupancy, task life cycle and task status;

[0010] The computer's comprehensive monitoring data includes CPU data, memory data, disk I / O and network data.

[0011] Preferably, the method for constructing a structure association graph comprises:

[0012] Define the computer's comprehensive monitoring data as the central subject, the user's task data as the edge-related body, and there is an association relationship between the computer's comprehensive monitoring data and the user's task data, and between the user's task data and the user's task data, and the association relationship is represented by an edge, and the attribute of the edge is the weight, which is used to represent the degree of the association relationship;

[0013] The weight of the edge between the central body and the edge related body is calculated as , the weight of the edge between edge-related entities is ;

[0014] in, , , and is the proportion coefficient, The running time of the user's task, Indicates the user's task on the computer The amount of resources occupied, Indicates the computer The important proportion coefficient of each resource is It represents the absolute difference of task running time between edge-related entities and edge-related entities. Indicates the relationship between edge-related entities and edge-related entities. The absolute difference in resource usage, An index representing the resource type;

[0015] All central entities and edge-related entities, and edge-related entities and edge-related entities are connected through edges and weights are assigned to form a structural association graph.

[0016] Preferably, the method of allocating each user's task to a resource pool according to the structural association chart and dynamically updating the tasks in the resource pool includes:

[0017] Step A1: extract the weights of the edges between the central subject and the edge-related bodies in the structural association graph, and simulate each weight as a data point;

[0018] Step A2: Use the OPTICS algorithm to generate the sorting and reachable distance, and obtain the K value and initial cluster center of the K-Means algorithm from the sorted list;

[0019] Step A3: Use the K-Means algorithm to divide the edge weights into k groups, obtain the cumulative resource usage of all tasks in each group, and divide the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocate each user's tasks to the corresponding resource pool;

[0020] Step A4: Continuously calculate the task density of each resource pool, update the tasks in each resource pool according to the task density, and dynamically allocate the tasks in each resource pool.

[0021] Preferably, the OPTICS algorithm is used to generate the sorting and reachable distance, and the K value and initial cluster center of the K-Means algorithm are obtained from the ordered list. The specific method includes:

[0022] Define the neighborhood radius r_p and the minimum number of points u_p;

[0023] For any data point p, if the number of all data points within the neighborhood radius is greater than or equal to the minimum number of points, the data point p is determined to be a core point, otherwise, the data point p is determined not to be a core point;

[0024] If data point p is a core point, for any other data point o, the reachable distance between data point o and data point p is the maximum value between the first distance and the second distance, where the first distance represents the core distance of data point p, and the second distance represents the direct distance between data point o and data point p;

[0025] Initialize a blank ordered list, randomly select an unprocessed data point as the starting point, add the starting point to the blank ordered list, obtain all unprocessed data points within the neighborhood radius r_p of the starting point, calculate their reachable distance to the starting point, use a priority queue to store the data points in the neighborhood, and sort them by reachable distance;

[0026] Select the data point with the smallest reachable distance from the priority queue for processing until all data points are processed and then stop to obtain an ordered list containing all data points, as well as the core distance and reachable distance of each data point;

[0027] A two-dimensional graph is drawn with the order of the data points in the ordered list as the horizontal axis and the reachable distance as the vertical axis. The number of clusters in the two-dimensional graph is identified by visual inspection, which is recorded as the K value of the K-Means algorithm. For each cluster, the data point with the smallest reachable distance is selected as the initial clustering center of the cluster.

[0028] Preferably, the method of obtaining the accumulation of resource usage of all tasks in each group, dividing the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocating the tasks of each user to the corresponding resource pool includes:

[0029] For each group, extract the task resource occupancy of each edge corresponding to the user in the group, add them up to obtain the cumulative occupancy, and then obtain the cumulative occupancy of each group;

[0030] Arrange the accumulated occupancy in descending order, and divide the resource blocks equal to the accumulated occupancy u_i times from the computer resources in descending order, and record them as resource pools;

[0031] During the division process, if the computer resources do not meet the requirements of the remaining accumulated occupancy, a resource expansion request is issued to increase the computer resources. If the computer resources meet the requirements of the remaining accumulated occupancy, the computer resources are divided according to the accumulated occupancy, and the remaining undivided computer resources are recorded as a spare pool.

[0032] The task resource occupancy of users in the group corresponding to the accumulated occupancy is allocated to the corresponding divided resource pool, that is, the tasks of each user are initially allocated to the corresponding resource pool.

[0033] Preferably, the method of continuously calculating the task density of each resource pool, updating the tasks in each resource pool according to the task density, and dynamically allocating the tasks in each resource pool includes:

[0034] Perform time discrete refinement between the current time point and the next time point, and for each refinement moment, calculate the task density of each resource pool ,in, Indicates The task resource usage of each user, Indicates the total amount of resources in the resource pool. The index of the user;

[0035] Set a density threshold. When the task density of a resource pool is less than the density threshold, select the task resource occupation of the user in the resource pool with the largest task density and allocate it to the resource pool until the task density is not less than the density threshold.

[0036] Continue to select the task resource occupancy of the user in the resource pool with the largest task density and allocate it to the backup pool until the task density of the backup pool is not less than the density threshold;

[0037] Dynamically allocate tasks to users in each resource pool.

[0038] Preferably, for each resource pool, the task priority of the user is extracted, and the tasks with the same priority are taken as a queue, and the queues are arranged in descending order from high to low, and time discretization is performed between the current time point and the next time point, and the length of the highest time slice in the queue is calculated as , then according to the order of the queues, the time slice length of the remaining queues is calculated as , and then obtain the initial time slice length of each queue;

[0039] in, Indicates the time distance between the current time point and the next time point. Indicates the number of queues, Indicates the increase in difference, Indicates that the order is sorted from high to low. The length of the time slice corresponding to each queue, Indicates the index of the queue;

[0040] When the task density of the resource pool is greater than the limit threshold, the time slice length of each queue is adjusted. ,in, Indicates the new time slice length of the queue. Indicates the initial time slice length of the queue, represents the load factor, Indicates the average time slice length actually used in history, represents the hunger factor;

[0041] When a task waits in a queue for longer than the aging time, its priority is increased by one level and it is moved to a higher-level queue. The priority increase formula is: ,in, Indicates the new task priority, Indicates the current task priority. represents the aging factor, Indicates the waiting time. Indicates the highest task priority.

[0042] Preferably, the method of raising the priority by one level and moving it to a queue at a higher level comprises:

[0043] When a task re-enters the queue after its priority is updated, if the priority of the currently executing task is lower than that of the new task, it will immediately take over the position and start executing the new task, and the preempted task will be postponed to the next position.

[0044] Preferably, the specific method of executing tasks of each user according to the dynamic queue includes:

[0045] For each resource pool, the scheduler starts scanning from the highest task priority queue;

[0046] In the same priority queue, when the time slice length is used up, if the user's task has not been completely executed, the remaining user tasks will be released and reprocessed and executed at the next time point; if the execution is completed within the time slice length, it will be removed from the queue, indicating that the user's task processing is completed.

[0047] The technical effects and advantages of a computer hardware resource intelligent management method of the present invention are as follows:

[0048] 1. Through the construction of association charts, the weight relationship between tasks and resources is dynamically calculated to achieve accurate allocation of tasks to resource pools and improve resource utilization. Combined with the dynamic management of resource pools, resource competition between tasks is reduced and overall system performance is optimized. Through the OPTICS algorithm and K-Means clustering, task resource occupancy is grouped and matched to the resource pool to achieve efficient division and optimized allocation of resources. Dynamically adjust the resource pool through task density calculation to ensure even distribution of task loads and avoid resource waste or overload.

[0049] 2. Use a hybrid scheduling algorithm to achieve dynamic adjustment of task priority and time slice length, and optimize resource scheduling strategies in real time based on task density and load factor. Support task preemption and aging mechanisms to ensure flexibility and fairness in scheduling. Combined with real-time data collection and dynamic update mechanisms, it can quickly adjust resource allocation and task scheduling strategies based on changes in task requirements and resource status. Support resource expansion mechanisms to adapt to sudden task loads and improve the robustness and adaptability of the system. Through aging mechanisms and priority enhancement strategies, ensure that low-priority tasks can obtain resource allocation when waiting for a long time. Combined with dynamic time slice adjustment, ensure a balance between fairness and efficiency in task execution.

[0050] 3. Dynamic calculation of task density and resource pool management avoid resource overload or idleness, and maximize the utilization efficiency of computing resources. The response time of high-priority tasks is significantly shortened, and low-priority tasks can also be executed through the aging mechanism to ensure system throughput and task completion rate. Through dynamic adjustment of priority and time slice allocation strategy, the frequency of task preemption is reduced and the system overhead of context switching is reduced. When task preemption occurs, the preemption logic is simple and clear, and it can quickly switch to high-priority tasks. Combined with task lifecycle management and status monitoring, it is possible to grasp the progress of task execution in real time, dynamically adjust resource allocation and time slice length, and ensure the orderly execution of tasks. For tasks that fail or are delayed, they can be quickly restored or reallocated to improve the reliability of task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of the structure of a computer hardware resource intelligent management method of the present invention;

[0052] Figure 2 The figure is a schematic diagram of the steps of a computer hardware resource intelligent management method of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Example 1

[0055] See also Figure 1 and Figure 2 As shown, the computer hardware resource intelligent management method described in this embodiment includes:

[0056] Managing the computer's hardware resources is one of the important tasks in operating system and computer system design. The main reasons include the following:

[0057] 1. Limited hardware resources: The hardware resources of a computer (such as CPU, memory, disk, network bandwidth, I / O devices, etc.) are limited, and applications and users running on the computer may need to use these resources at the same time. In order to prevent resource conflicts or waste, resources need to be effectively allocated and managed, especially in a multi-tasking environment, where multiple programs or users may compete for resources at the same time, generating resource conflicts, leading to device conflicts or system crashes. Therefore, reasonable scheduling and allocation must be used to ensure the stability and efficiency of system operation, and to ensure that multiple users or programs can obtain resources fairly without affecting other tasks because some tasks occupy too many resources.

[0058] 2. Multi-user and multi-tasking: In modern computer systems, multiple users or programs need to share limited hardware resources at the same time. In order to ensure that all users can use resources fairly and efficiently, the system must manage resources. In particular, multiple tasks running at the same time may compete for the same resources. The management mechanism needs to solve concurrency problems, avoid deadlocks, resource preemption and other problems, maximize the utilization of hardware resources, allocate resources according to the importance or priority of tasks, and improve the execution efficiency of key tasks.

[0059] In short, the core purpose of managing computer hardware resources is to use resources efficiently, ensure system stability, security and fairness, and provide users with a good user experience. Through resource management, the computer system can run efficiently and stably in a multi-user, multi-tasking environment.

[0060] In a multi-user or multi-process system, multiple tasks or users require limited hardware resources (such as CPU, memory, disk, network bandwidth, etc.) at the same time, which may lead to resource competition, resulting in performance degradation, task delays or system crashes. Fair allocation may reduce overall efficiency, extend the response time of high-priority tasks, and some tasks occupy resources for a long time while other tasks are not processed, which will reduce efficiency. Therefore, in a multi-user or multi-process system, resource competition is a core issue, and the design of resource allocation strategies needs to find a balance between fairness and efficiency.

[0061] Step S1: collecting the user's task data and the computer's comprehensive monitoring data at the same time point, and constructing a structural correlation chart;

[0062] The user's task data includes user ID, task ID, task priority, task resource occupancy, task life cycle and task status;

[0063] User ID or task ID is used to identify the source of the task. Task priority is the scheduling priority of the task. Task resource usage is the type of resources (such as CPU, memory, disk I / O, network bandwidth, etc.) and the amount of resources occupied. Task life cycle is the life cycle information of the task, that is, the creation time and running time. Task status includes running, waiting, completed, blocked, etc.

[0064] The computer's comprehensive monitoring data includes CPU data, memory data, disk I / O and network data.

[0065] CPU data refers to core utilization, thread occupancy, and CPU temperature. Memory data includes total memory, used memory, free memory, and memory swap partition usage. Disk I / O includes read and write rates and queue length. Network data includes network traffic, network connection status, bandwidth usage, latency, and packet loss rate.

[0066] The above data collection method can be as follows:

[0067] Log file analysis: Regularly read and analyze relevant log files (e.g., audit logs) to extract required data.

[0068] Real-time monitoring: Use monitoring tools to collect data in real time, and use the system monitoring functions provided by the operating system (such as Linux system) or third-party tools.

[0069] API interface: Some systems or applications provide API interfaces (for example, accessing operating system resource information through Python and Shell scripts, using psutil (Python library) to obtain cross-platform system resource data, and using the API of virtualization tools such as libvirt to monitor the resource usage of virtual machines or containers), which can be used to obtain relevant data.

[0070] Methods for constructing structural association diagrams include:

[0071] Define the computer's comprehensive monitoring data as the central subject, the user's task data as the edge-related body, and there is an association relationship between the computer's comprehensive monitoring data (central subject) and the user's task data (edge-related body), and between the user's task data (edge-related body) and the user's task data (edge-related body), and the association relationship is represented by an edge, and the attribute of the edge is the weight, which is used to represent the degree of the association relationship (that is, the higher the association relationship, the greater the weight, and the lower the association relationship, the smaller the weight, and the association relationship can also be said to be an influence relationship);

[0072] The weight of the edge between the central body and the edge related body is calculated as , the weight of the edge between edge-related entities is ;

[0073] in, , , and is the proportion coefficient, The running time of the user's task, Indicates the user's task on the computer The amount of resources occupied, Indicates the computer The important proportion coefficient of each resource is It represents the absolute difference of task running time between edge-related entities. Indicates the relationship between edge-related entities and edge-related entities. The absolute difference in resource usage, An index representing the resource type;

[0074] All central entities and edge-related entities, and edge-related entities and edge-related entities are connected through edges and weights are assigned to form a structural association graph.

[0075] Because the user's task data and the computer's comprehensive monitoring data are two independent data acquisition packages at the same time point, the present invention needs to manage hardware resources according to the task. Therefore, it is necessary to combine the two independent data. Through the above method, the data is preliminarily combined and preprocessed (standardization, normalization and de-quantization).

[0076] Step S2: Establish a resource pool, assign each user's task to the resource pool according to the structural association chart, and dynamically update the tasks in the resource pool;

[0077] Assign each user's tasks to the resource pool according to the structural association chart, and dynamically update the tasks in the resource pool. The specific methods include:

[0078] Step A1: extract the weights of the edges between the central subject and the edge-related bodies in the structural association graph, and simulate each weight as a data point;

[0079] Step A2: Use the OPTICS algorithm to generate the sorting and reachable distance, and obtain the K value and initial cluster center of the K-Means algorithm from the sorted list;

[0080] Step A3: Use the K-Means algorithm to divide the edge weights into k groups, obtain the cumulative resource usage of all tasks in each group, and divide the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocate each user's tasks to the corresponding resource pool;

[0081] Step A4: Continuously calculate the task density of each resource pool, update the tasks in each resource pool according to the task density, and dynamically allocate the tasks in each resource pool.

[0082] Use the OPTICS algorithm to generate sorting and reachable distances, and obtain the K value and initial cluster center of the K-Means algorithm from the ordered list. The specific methods include:

[0083] Define the neighborhood radius r_p (used to define the neighborhood range of a data point) and the minimum number of points u_p (the minimum number of neighborhood points required to become a core point);

[0084] For any data point p, if the number of all data points within the neighborhood radius is greater than or equal to the minimum number of points, the data point p is determined to be a core point, otherwise, the data point p is determined not to be a core point;

[0085] If data point p is a core point, for any other data point o, the reachable distance between data point o and data point p is the maximum value between the first distance and the second distance, where the first distance represents the core distance of data point p, and the second distance represents the direct distance between data point o and data point p;

[0086] Initialize a blank ordered list (used to store the processing order of data points), randomly select an unprocessed data point as the starting point, add the starting point to the blank ordered list, obtain all unprocessed data points within the neighborhood radius r_p of the starting point, calculate the reachable distance to the starting point, use a priority queue (or use a list and sort it) to store the data points in the neighborhood, and sort them by reachable distance;

[0087] Select the data point with the smallest reachable distance from the priority queue for processing until all data points are processed and then stop to obtain an ordered list containing all data points, as well as the core distance and reachable distance of each data point;

[0088] Draw a two-dimensional graph with the order of data points in the ordered list as the horizontal axis and the reachable distance as the vertical axis. Identify the number of clusters in the two-dimensional graph by visual inspection (or algorithm), which is recorded as the K value of the K-Means algorithm. For each cluster, select the data point with the smallest reachable distance as the initial clustering center of the cluster.

[0089] Through the above method, the OPTIC algorithm is used to generate the order and reachable distance of data points, and the cluster structure is analyzed through the reachable distance graph. The number of clusters and the initial cluster center are determined according to the reachable distance graph. The K-Means algorithm is used to iteratively optimize based on the initial center to obtain the final clustering result.

[0090] OPTICS can help determine the appropriate number of clusters, avoiding the problem of K-Means requiring pre-specified k. The initial cluster centers provided by OPTICS are usually closer to the true cluster centers than the randomly selected initial centers, which can accelerate the convergence speed of K-Means and improve the clustering quality. OPTICS is relatively robust to noise and outliers.

[0091] Obtain the cumulative resource usage of all tasks in each group, and divide the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocate each user's tasks to the corresponding resource pool. The specific method includes:

[0092] For each group, extract the task resource occupancy of each edge corresponding to the user in the group, add them up to obtain the cumulative occupancy, and then obtain the cumulative occupancy of each group;

[0093] Arrange the accumulated occupancy in descending order, and divide the resource blocks equal to the accumulated occupancy u_i times from the computer resources in descending order, and record them as resource pools;

[0094] During the division process, if the computer resources do not meet the requirements of the remaining accumulated occupancy, a resource expansion request is issued to increase the computer resources. If the computer resources meet the requirements of the remaining accumulated occupancy, the computer resources are divided according to the accumulated occupancy, and the remaining undivided computer resources are recorded as a spare pool.

[0095] The task resource occupancy of users in the group corresponding to the accumulated occupancy is allocated to the corresponding divided resource pool, that is, the tasks of each user are initially allocated to the corresponding resource pool.

[0096] u_i times are preset based on experimental data analysis or historical data analysis and experience.

[0097] Continuously calculate the task density of each resource pool, update the tasks in each resource pool according to the task density, and dynamically allocate the tasks in each resource pool. The specific methods include:

[0098] Perform time discrete refinement between the current time point and the next time point, and for each refinement moment, calculate the task density of each resource pool ,in, Indicates The task resource usage of each user, Indicates the total amount of resources in the resource pool. The index of the user;

[0099] Set a density threshold. When the task density of a resource pool is less than the density threshold, select the task resource occupation of the user in the resource pool with the largest task density and allocate it to the resource pool until the task density is not less than the density threshold.

[0100] The density threshold is preset based on experimental data analysis or historical data analysis and experience.

[0101] Continue to select the task resource occupancy of the user in the resource pool with the largest task density and allocate it to the backup pool until the task density of the backup pool is not less than the density threshold;

[0102] Dynamically allocate tasks to users in each resource pool.

[0103] Divide resources into multiple independent "pools" so that tasks with different resource usage ranges can only use the corresponding resource pools, ensuring that low-resource tasks can also obtain certain resources without being ignored or squeezed out. Use container technology (such as Docker, Kubernetes) to limit the resource usage limit of each task or user, thereby preventing resources from being exhausted by a single task.

[0104] Step S3: Adaptively update the task priority and time slice length of each user in the resource pool using a hybrid scheduling algorithm, and dynamically queue the user's tasks;

[0105] The hybrid scheduling algorithm is a dynamic scheduling scheme based on time slice round-robin, multi-level feedback queues and preemptive scheduling to achieve a balance between fairness and efficiency.

[0106] The method of using a hybrid scheduling algorithm to adaptively update the task priority and time slice length of each user in the resource pool and dynamically queue the user's tasks includes:

[0107] For each resource pool, extract the user's task priority, treat the tasks of the same priority as a queue, and sort the queues in descending order from high to low. Perform time discretization and refinement between the current time point and the next time point, and calculate the length of the highest time slice in the queue as , then according to the order of the queues, the time slice length of the remaining queues is calculated as , and then obtain the initial time slice length of each queue;

[0108] in, Indicates the time distance between the current time point and the next time point. Indicates the number of queues, Indicates the increase in difference (which can be pre-set based on experience or algorithm analysis), Indicates that the order is sorted from high to low. The length of the time slice corresponding to each queue, Indicates the index of the queue;

[0109] When the task density of the resource pool is greater than the limit threshold, the time slice length of each queue is adjusted. ,in, Indicates the new time slice length of the queue. Indicates the initial time slice length of the queue, represents the load factor, Indicates the average time slice length actually used in history, represents the hunger factor;

[0110] The load factor, average time slice length and starvation factor can all be pre-set through historical data analysis.

[0111] Dynamically adjust the priority of the queue according to the system load and task behavior. For example, when too many resources are occupied, it is easy to cause resource congestion. The time slice length of the low-priority queue can be appropriately reduced to ensure the response speed of high-priority tasks.

[0112] When a task waits in a queue for longer than the aging time, its priority is increased by one level and it is moved to a higher-level queue (for example, from the second-highest priority queue Q2 to the highest priority queue Q1). The priority increase formula is: ,in, Indicates the new task priority, Indicates the current task priority. represents the aging factor, Indicates the waiting time. Indicates the highest task priority;

[0113] The aging time T can be adjusted or preset according to system requirements and task characteristics.

[0114] Ways to increase the priority level and move it to a higher-level queue include:

[0115] When a task re-enters the queue after its priority is updated, if the priority of the currently executing task is lower than that of the new task, it will immediately take over the position and start executing the new task, and the preempted task will be postponed to the next position.

[0116] Step S4: Execute the tasks of each user according to the dynamic queue;

[0117] Execute tasks for each user according to the dynamic queue. The specific methods include:

[0118] For each resource pool, the scheduler starts scanning from the highest task priority queue;

[0119] In the same priority queue, when the time slice length is used up, if the user's task has not been completely executed, the remaining user tasks will be released and reprocessed and executed at the next time point; if the execution is completed within the time slice length, it will be removed from the queue, indicating that the user's task processing is completed.

[0120] Example 2

[0121] See also Figure 1 As shown, the part not described in detail in this embodiment is described in Example 1, which provides a computer hardware resource intelligent management platform, including:

[0122] Data collection and integration module: used to collect user's task data and computer's comprehensive monitoring data, and build structural correlation charts;

[0123] Resource allocation module: allocates each user's tasks to the resource pool according to the structural association chart and updates it dynamically;

[0124] Dynamic adjustment module: used to adaptively update the task priority and time slice length of each user in the resource pool using a hybrid scheduling algorithm, and dynamically queue the user's tasks;

[0125] Execution output module: executes each user's tasks according to the dynamic queue.

[0126] Therefore, the present invention aims at the problem that traditional resource allocation and task scheduling methods usually use fixed strategies or simple priority queues, which are difficult to dynamically adapt to changes in task requirements and resource status, resulting in low resource utilization or task delays. A solution is designed by collecting real-time user task data and computer resource monitoring data, and combining structured association charts to model the relationship between tasks and resources, so as to achieve accurate resource allocation and dynamically adjust task priorities and time slices.

[0127] To address the problem that high competition among multiple user tasks for the same resources (such as CPU, memory, disk I / O, etc.) may lead to task delays or resource overload, we designed a solution: We use the weight relationship in the association chart to cluster and group task resource usage, and dynamically adjust resource allocation through optimized resource pool division and task density calculation to reduce resource competition and avoid bottlenecks.

[0128] In view of the problem that in the static priority model, low-priority tasks may not be executed for a long time, resulting in a "starvation" phenomenon and failing to meet task fairness, a solution is designed: by introducing an aging mechanism, when the task waiting time exceeds a certain threshold, the priority is dynamically increased; combined with the preemption mechanism, high-priority tasks are executed first, while ensuring that low-priority tasks obtain resources over time.

[0129] Resource pool division is usually static and cannot adapt to the dynamic changes in task requirements. When the task load suddenly increases or resources are insufficient, it may lead to task execution failure or system crash. The solution is designed: cluster analysis and task density calculation are used to dynamically adjust the resource pool. If resources are insufficient, the resource expansion mechanism is triggered to increase computing resources to ensure the continuity of task execution.

[0130] In order to solve the problem of how to improve the response efficiency of high-priority tasks while ensuring the fairness of low-priority tasks in task scheduling, a solution is designed: combining task priority queues and dynamic time slice adjustment strategies to ensure that high-priority tasks are executed first, and at the same time, dynamically adjusting time slices and aging mechanisms to avoid long-term blocking of low-priority tasks.

[0131] Example 3

[0132] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the computer hardware resource intelligent management method provided above is implemented.

[0133] Since the electronic device introduced in this embodiment is an electronic device used to implement a computer hardware resource intelligent management method in the embodiment of the present application, based on the computer hardware resource intelligent management method introduced in the embodiment of the present application, the technical personnel of the field can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as the technical personnel of the field implement the electronic device used in the computer hardware resource intelligent management method in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0134] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0135] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A computer hardware resource intelligent management method, characterized in that: include: Step S1: collecting the user's task data and the computer's comprehensive monitoring data at the same time point, and constructing a structural correlation chart; The method for constructing a structural association graph comprises: Define the computer's comprehensive monitoring data as the central subject, the user's task data as the edge-related body, and there is an association relationship between the computer's comprehensive monitoring data and the user's task data, and between the user's task data and the user's task data, and the association relationship is represented by an edge, and the attribute of the edge is the weight, which is used to represent the degree of the association relationship; The weight of the edge between the central body and the edge related body is calculated as , the weight of the edge between edge-related entities is ; in, , , and is the proportion coefficient, The running time of the user's task, Indicates the user's task on the computer The amount of resources occupied, Indicates the computer The important proportion coefficient of each resource is It represents the absolute difference of task running time between edge-related entities. Indicates the relationship between edge-related entities and edge-related entities. The absolute difference in resource usage, An index representing the resource type; All central entities and edge-related entities, and edge-related entities and edge-related entities are connected through edges and weights are assigned to form a structural association graph; Step S2: Establish a resource pool, assign each user's task to the resource pool according to the structural association chart, and dynamically update the tasks in the resource pool; Step S3: Adaptively update the task priority and time slice length of each user in the resource pool using a hybrid scheduling algorithm, and dynamically queue the user's tasks; Step S4: Execute the tasks of each user according to the dynamic queue.

2. A computer hardware resource intelligent management method according to claim 1, characterized in that: The user's task data includes user ID, task ID, task priority, task resource occupancy, task life cycle and task status; The computer's comprehensive monitoring data includes CPU data, memory data, disk I / O and network data.

3. A computer hardware resource intelligent management method according to claim 2, characterized in that: The method of allocating each user's task to a resource pool according to the structural association chart and dynamically updating the tasks in the resource pool includes: Step A1: extract the weights of the edges between the central subject and the edge-related bodies in the structural association graph, and simulate each weight as a data point; Step A2: Use the OPTICS algorithm to generate the sorting and reachable distance, and obtain the K value and initial cluster center of the K-Means algorithm from the sorted list; Step A3: Use the K-Means algorithm to divide the edge weights into k groups, obtain the cumulative resource usage of all tasks in each group, and divide the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocate each user's tasks to the corresponding resource pool; Step A4: Continuously calculate the task density of each resource pool, update the tasks in each resource pool according to the task density, and dynamically allocate the tasks in each resource pool.

4. A computer hardware resource intelligent management method according to claim 3, characterized in that: The OPTICS algorithm is used to generate the sorting and reachable distance, and the K value and initial cluster center of the K-Means algorithm are obtained from the ordered list. The specific method includes: Define the neighborhood radius r_p and the minimum number of points u_p; For any data point p, if the number of all data points within the neighborhood radius is greater than or equal to the minimum number of points, the data point p is determined to be a core point, otherwise, the data point p is determined not to be a core point; If data point p is a core point, for any other data point o, the reachable distance between data point o and data point p is the maximum value between the first distance and the second distance, where the first distance represents the core distance of data point p, and the second distance represents the direct distance between data point o and data point p; Initialize a blank ordered list, randomly select an unprocessed data point as the starting point, add the starting point to the blank ordered list, obtain all unprocessed data points within the neighborhood radius r_p of the starting point, calculate their reachable distance to the starting point, use a priority queue to store the data points in the neighborhood, and sort them by reachable distance; Select the data point with the smallest reachable distance from the priority queue for processing until all data points are processed and then stop to obtain an ordered list containing all data points, as well as the core distance and reachable distance of each data point; A two-dimensional graph is drawn with the order of the data points in the ordered list as the horizontal axis and the reachable distance as the vertical axis. The number of clusters in the two-dimensional graph is identified by visual inspection, which is recorded as the K value of the K-Means algorithm. For each cluster, the data point with the smallest reachable distance is selected as the initial clustering center of the cluster.

5. A computer hardware resource intelligent management method according to claim 4, characterized in that: The method of obtaining the accumulation of resource usage of all tasks in each group and dividing the computer resources into K_O discrete blocks, recorded as resource pools, and preliminarily allocating tasks of each user to the corresponding resource pool includes: For each group, extract the task resource occupancy of each edge corresponding to the user in the group, add them up to obtain the cumulative occupancy, and then obtain the cumulative occupancy of each group; Arrange the accumulated occupancy in descending order, and divide the resource blocks equal to the accumulated occupancy u_i times from the computer resources in descending order, and record them as resource pools; During the division process, if the computer resources do not meet the requirements of the remaining accumulated occupancy, a resource expansion request is issued to increase the computer resources. If the computer resources meet the requirements of the remaining accumulated occupancy, the computer resources are divided according to the accumulated occupancy, and the remaining undivided computer resources are recorded as a spare pool. The task resource occupancy of users in the group corresponding to the accumulated occupancy is allocated to the corresponding divided resource pool, that is, the tasks of each user are initially allocated to the corresponding resource pool.

6. A computer hardware resource intelligent management method according to claim 5, characterized in that: The method of continuously calculating the task density of each resource pool, updating the tasks in each resource pool according to the task density, and dynamically allocating the tasks in each resource pool includes: Perform time discrete refinement between the current time point and the next time point, and for each refinement moment, calculate the task density of each resource pool ,in, Indicates The task resource usage of each user, Indicates the total amount of resources in the resource pool. The index of the user; Set a density threshold. When the task density of a resource pool is less than the density threshold, select the task resource occupation of the user in the resource pool with the largest task density and allocate it to the resource pool until the task density is not less than the density threshold. Continue to select the task resource occupancy of the user in the resource pool with the largest task density and allocate it to the backup pool until the task density of the backup pool is not less than the density threshold; Dynamically allocate tasks to users in various resource pools.

7. A computer hardware resource intelligent management method according to claim 6, characterized in that: For each resource pool, the user's task priority is extracted, and tasks with the same priority are taken as a queue. The queues are arranged in descending order from high to low, and time discretization is performed between the current time point and the next time point. The length of the highest time slice in the queue is calculated as , then according to the order of the queues, the time slice length of the remaining queues is calculated as , and then obtain the initial time slice length of each queue; in, Indicates the time distance between the current time point and the next time point. Indicates the number of queues, Indicates the increase in difference, Indicates that the order is sorted in descending order from high to low. The length of the time slice corresponding to each queue, Indicates the index of the queue; When the task density of the resource pool is greater than the limit threshold, the time slice length of each queue is adjusted. ,in, Indicates the new time slice length of the queue. Indicates the initial time slice length of the queue, represents the load factor, Indicates the average time slice length actually used in history, represents the hunger factor; When a task waits in a queue for longer than the aging time, its priority is increased by one level and it is moved to a higher-level queue. The priority increase formula is: ,in, Indicates the new task priority, Indicates the current task priority. represents the aging factor, Indicates the waiting time. Indicates the highest task priority.

8. A computer hardware resource intelligent management method according to claim 7, characterized in that: The method of raising the priority by one level and moving it to a queue at a higher level includes: When a task re-enters the queue after its priority is updated, if the priority of the currently executing task is lower than that of the new task, it will immediately take over the position and start executing the new task, and the preempted task will be postponed to the next position.

9. A computer hardware resource intelligent management method according to claim 8, characterized in that: The specific method of executing tasks of each user according to the dynamic queue includes: For each resource pool, the scheduler starts scanning from the highest task priority queue; In the same priority queue, when the time slice length is used up, if the user's task has not been completely executed, the remaining user tasks will be released and reprocessed and executed at the next time point; if the execution is completed within the time slice length, it will be removed from the queue, indicating that the user's task processing is completed.

Citation Information

Patent Citations

  • Multitask scheduling method and device based on heterogeneous distributed cluster

    CN118227291A