Computer resource allocation management system and method based on data analysis

Through data analysis methods, analyzing historical task data, calculating task complexity and priority, and dynamically allocating resources, the problem of inflexible resource allocation in the existing technology is solved, and more efficient resource utilization and task completion rate are achieved.

CN119201421BActive Publication Date: 2025-03-11上海市大数据中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410869901.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2025-03-11
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

Existing computer resource allocation technology is difficult to achieve dynamic real-time optimization, resulting in idle or overload of resources, unable to effectively improve system efficiency, and unable to comprehensively analyze user experience and task characteristics for resource allocation.

Method used

Through data analysis-based methods, historical task data is collected and analyzed, task complexity is calculated and tasks are classified, task types and resource requirements are detected in real time, task priority is calculated, resources are assigned dynamically, and potential error tasks are identified and warned in a timely manner to avoid resource waste.

Benefits of technology

It realizes dynamic real-time optimization and allocation of computer resources, improves system efficiency and user experience, avoids idleness and waste of resources, and enhances the completion rate of task execution and the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201421B_ABST
    Figure CN119201421B_ABST
Patent Text Reader

Abstract

The invention discloses a computer resource allocation management system and method based on data analysis, and belongs to the technical field of resource allocation. The invention analyzes task data, extracts task features, and classifies computer execution tasks; calculates the amount of resources required for each task to be executed at the fastest speed; calculates the total amount of resources required for all tasks being executed, and determines whether the computer can meet the total amount of resources required for all tasks being executed; collects the time data of users executing each task in the computer in history, calculates the time list of users using the computer, calculates the priority of all tasks being executed, obtains the priority of each task being executed, and performs dynamic resource allocation; extracts task error data, calculates the risk threshold, and when it is determined that there is an error risk in the real-time execution of the task, ends the abnormal task process to release computer resources and reallocates resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource allocation, and in particular to a computer resource allocation management system and method based on data analysis. Background Art

[0002] With the development of computer technology, resource allocation technology has been evolving to adapt to various application requirements and changes in hardware architecture. Computer resource allocation is a key area in operating systems and distributed systems, aiming to optimize the use efficiency of computing resources (such as CPU, memory, storage, network bandwidth) to ensure efficient, stable and fair operation of the system. In modern computer resource allocation, the main operating system uses scheduling algorithms (such as polling, priority scheduling, shortest job first) to allocate CPU time between processes; allocate and manage memory through paging, segmentation and other technologies; use elevator algorithm, shortest seek time priority and other methods to optimize disk I / O, etc. However, there are still many problems in the reasonable allocation of computer resources. Idle or overloaded resources affect system efficiency. It is impossible to achieve dynamic real-time optimization allocation of computer resources, and it is impossible to conduct a comprehensive analysis of the computer user experience and the task itself, and then allocate resources. In the execution of some tasks, there may be task errors, the computer cannot complete the task process, and the previously allocated resources are wasted and lost. How to conduct risk warnings for real-time tasks, terminate tasks that may have errors in advance, and avoid greater waste of resources is crucial. Summary of the invention

[0003] The purpose of the present invention is to provide a computer resource allocation management system and method based on data analysis to solve the problems raised in the above background technology.

[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0005] A computer resource allocation management method based on data analysis, the method comprising the following steps:

[0006] S100, collecting all task data executed by the computer in history, analyzing the task data, extracting task features, and classifying the tasks executed by the computer;

[0007] Furthermore, the specific steps for classifying the computer execution tasks are as follows:

[0008] S101, collect all the task data executed by the computer in the history as {S1, S2, S3, ..., S n}, S1, S2, S3, ..., S nIndicates the 1st, 2nd, 3rd, ..., nth task data executed by the computer in the collected history, where n is a positive integer; extracts the information volume and logical operation data of each task data executed by the computer in the history;

[0009] S102. Calculate the complexity of each task based on the amount of information and logical operation data of each task in the extracted history. The formula is:

[0010] F=X 1 +X 2 +X 3 +...+X L

[0011] In the formula, F represents the complexity of each task in the calculation history, X represents the amount of information of each task, and L represents the number of logical operations of each task during execution. The amount of information of each task is superimposed according to the number of logical operations, and the complexity of each task is calculated as {F1, F2, F3, ..., F n}, F1, F2, F3, ..., F n represents the complexity of the 1st, 2nd, 3rd, ..., nth task in the history;

[0012] S103, taking the calculated complexity of each task as the task feature, and calculating the classification threshold of all task complexities, the formula is:

[0013]

[0014] In the formula, F_y represents the classification threshold of all task complexities, n represents the number of calculated complexities, and F i Indicates the complexity of each task, F P Represents the average value of n complexities, i∈(1,n); after calculating the complexity classification threshold, calculate the complexity difference between every two tasks, the formula is:

[0015] F_c=|F the -F other |

[0016] In the formula, F_c represents the complexity difference between every two tasks, F the and F other Indicates the complexity of two tasks among the selected n tasks; the complexity difference of all tasks is calculated as Indicates the calculated The complexity difference;

[0017] S104, judging the calculated complexity difference, when F_c<F_y, judging that the two tasks corresponding to F_c are of the same task type, when F_c≥F_y, judging that the two tasks corresponding to F_c are not of the same task type; after judging, classifying all the tasks executed by the computer in the history into {H1, H2, H3, ..., H k}, H1, H2, H3, ..., H k Represents the 1st, 2nd, 3rd, ..., kth task executed by the computer in history, where k is a positive integer.

[0018] By using the data of each task executed by the computer in history, after analysis, the tasks are classified by computational complexity. When performing various data analyses on the tasks, the types of tasks can be used to conduct extensive analysis based on the characteristics of the task types. There is no need to analyze each task in turn, which speeds up the efficiency of the system.

[0019] S200, analyzing the resource data of each task executed by the computer in history, and calculating the amount of resources required for each task to be executed at the fastest speed;

[0020] Furthermore, the specific steps for calculating the amount of resources required for each task to be executed at the fastest speed are:

[0021] S201, extract the amount of resources required for each task type in the computer center task in the collected history as {Z1, Z2, Z3, ..., Z j}, Z1, Z2, Z3, ..., Z j Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., jth tasks in each extracted task type, and extracts the amount of resources required for each task in the k task types obtained by classification;

[0022] S202, using the amount of resources required for each task in each task type in history to calculate the required amount of resources for each task type, the formula is:

[0023]

[0024] In the formula, Z_h represents the amount of resources required for each task type, and Z represents the amount of resources required for each task in each task type. After calculation, the amount of resources required for each task type is {Z_h1, Z_h2, Z_h3, ..., Z_h k}, Z_h1, Z_h2, Z_h3,..., Z_h k Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., kth task types.

[0025] S300, detecting the types and numbers of tasks being executed in the computer in real time, calculating the total amount of resources required for executing all tasks, and determining whether the computer can meet the total amount of resources required for executing all tasks;

[0026] Furthermore, the specific steps for determining whether the computer can meet the resource requirements of executing all tasks at the fastest speed are as follows:

[0027] S301, extracting the tasks executed by the computer in real time, and using the classified task type set to judge the task types executed by the computer in real time, and obtaining the task types executed by the computer in real time {E_h1, E_h2, E_h3, ..., E_h u}, E_h1, E_h2, E_h3,..., E_h u represents the task type of the first, second, third, ..., uth task executed by the computer in real time; according to the task type of each task, the amount of resources required for each task executed by the computer in real time is extracted as {E_z1, E_z2, E_z3, ..., E_z u}, E_z1, E_z2, E_z3,..., E_z u represents the amount of resources for the 1st, 2nd, 3rd, ..., uth tasks executed by the computer in real time;

[0028] S302, calculating the total amount of resources required for all tasks executed by the computer in real time, the formula is:

[0029]

[0030] In the formula, E_zz represents the total amount of resources required for all tasks executed in real time by the computer, and E_z represents the amount of resources required for each task executed in real time by the computer. The total amount of resources of the computer itself is extracted as E_Q, and the total amount of resources of all tasks executed in real time is judged. When E_zz>E_Q, it is judged that the computer cannot allocate the resources required for all tasks executed in real time. When E_zz≤E_Q, it means that the computer can allocate the resources required for all tasks executed in real time.

[0031] S400, when it is determined that the computer cannot meet the total amount of resources required by all the tasks being executed, collect the time data of the user executing each task on the computer in history, calculate the time list of the user using the computer, calculate the priority of all the tasks being executed, and obtain the priority of each task being executed;

[0032] Furthermore, the specific steps for calculating the priority of all tasks being executed are:

[0033] S401, collecting the execution time of each task type when the user uses the computer in the history {T1, T2, T3, ..., T d}, T1, T2, T3, ..., T d represents the 1st, 2nd, 3rd, ..., dth time of each task type execution in the history, calculates the number of the same time, and selects the time with the largest number as the execution time of the corresponding task type; the time of each task type is collected and analyzed to obtain the execution time of each task type as {T_e1, T_e2, T_e3, ..., T_e k}, T_e1, T_e2, T_e3,..., T_e k represents the execution time of the 1st, 2nd, 3rd, ..., kth task type;

[0034] S402, using the calculated execution time and complexity of each task type to calculate the priority of all tasks executed in real time, the formula is:

[0035] Pr=T_S-T_e+F_c

[0036] In the formula, Pr represents the priority of each task executed in real time, T_S represents the extracted real-time execution time, T_e represents the execution time of each task type executed in real time, and F_c represents the complexity of each task executed in real time; the priorities of u tasks executed in real time are calculated and sorted from small to large as {Pr1, Pr2, Pr3, ..., Pr u}, Pr1, Pr2, Pr3,..., Pr u Indicates the calculated priorities of the 1st, 2nd, 3rd, ..., uth tasks;

[0037] S403, according to the task priorities sorted from small to large, extract the real-time execution tasks corresponding to the priorities, and sort the priorities of all the real-time execution tasks into H_p1→H_p2→H_p3→...H_p u , where H_p1 represents the highest priority task to be executed in real time, H_p u Represents the lowest priority task that executes in real time.

[0038] The priority calculated by using the time and complexity of real-time execution of tasks can take into account the priority of the task itself and the user's usage habits. When allocating resources to tasks according to the priority, it not only meets the user's computer usage habits and enhances the user experience, but also allows tasks with lower complexity to be executed first, so that subsequent tasks can obtain resources faster, increasing the completion rate of computer task execution;

[0039] S500, dynamically allocating resources to all tasks being executed according to the priority of each task;

[0040] Furthermore, the specific steps of dynamically allocating resources to all tasks being executed according to the priority of each task are as follows:

[0041] S501. Based on the judgment, the priority of all tasks to be executed in real time is obtained, and the resources required for the tasks are allocated. The amount of resources required for the high-priority tasks is extracted as E_z, and the E_z resources in the computer are allocated to the high-priority tasks. The remaining resources of the computer are calculated using the formula: E_sh=E_Q-E_z, where E_sh represents the remaining resources of the computer after resource allocation. After classifying the resources according to the priority of the real-time execution tasks, when it is determined that E_sh≤0, the resource allocation ends.

[0042] Using task priorities to allocate resources to tasks can prevent system administrators from allocating too many resources, resulting in a large number of resources being idle and having low utilization rates.

[0043] S600, collect the historical records of task errors when the computer executes tasks, extract the task error data in the records, and calculate the threshold of each task error; make abnormal judgments on the tasks executed in real time, and when it is judged that there is a risk of error in the real-time execution of the tasks, end the abnormal task process to release computer resources and reallocate resources.

[0044] Furthermore, the specific steps for abnormal judgment of tasks executed in real time are as follows:

[0045] S601, collect task data of errors that occurred when the computer executed tasks in the history, and assume that the types of task data of errors that were extracted are {R1, R2, R3, ..., R g}, R1, R2, R3, ..., R g Indicates the 1st, 2nd, 3rd, ..., gth data in the extracted task where an error occurs, and calculates the difference of each data before and after the task error occurs. The formula is: SR_C = |SR_b-SR_a|. The difference of g data is calculated, and the data type corresponding to the largest difference is selected as the characteristic data of the task error.

[0046] S602, collecting feature data of errors that occurred when the computer executed tasks in the past, and calculating the risk threshold of errors that occurred when the tasks were executed, the formula is:

[0047]

[0048] In the formula, Ris represents the calculated risk threshold for task errors, SR_t represents the feature data of task errors, A represents the number of feature data collected when task errors occurred in the history, and st_sr represents the standard deviation of the A feature data collected;

[0049] S603, extracting feature data of each task executed in real time as {SR_ts1, SR_ts2, SR_ts3, ..., SR_ts u}, SR_ts1, SR_ts2, SR_ts3,..., SR_ts u Indicates the extracted feature data of the 1st, 2nd, 3rd, ...uth tasks executed in real time. When SR_ts>Ris, the corresponding task is judged to have an error risk and is an abnormal task, and an abnormal warning is issued in the computer; when SR_ts≤Ris, the corresponding task is judged to have no error risk and is a normal task;

[0050] S604: When the task is determined to be an abnormal task and a warning is issued, the computer immediately ends the abnormal task execution process and deletes the abnormal task execution instruction; and reallocates resources for the remaining tasks using the method described in S500.

[0051] Analyze whether the task can be executed normally when the computer executes the task, avoid continuously allocating resources to tasks that may cause errors, which will eventually lead to a waste of time and resources and fail to obtain ideal results. Make early judgments and warnings, end abnormal task processes, and reallocate resources to ensure the rational use of resources, enhance the efficiency of system work, and the completion of computer execution tasks;

[0052] A computer resource allocation management system based on data analysis, which includes a data collection module, a classification module, a resource judgment module, a priority calculation module, a resource allocation module and an abnormal warning module;

[0053] The data collection module is used to collect various task data when the computer performs tasks in the history;

[0054] The classification module is used to calculate the complexity of each task executed by the computer in history, and classify the tasks executed by the computer in history according to the complexity;

[0055] The resource determination module is used to calculate the total amount of resources required for the tasks to be executed in real time, and determine whether the computer can meet the total amount of resources for all real-time tasks;

[0056] The priority calculation module is used to calculate the priority of each task according to the execution time and complexity of the task executed in real time;

[0057] The resource allocation module is used to allocate resources to tasks executed in real time according to their priorities;

[0058] The abnormal warning module is used to collect task data with historical errors to calculate and extract feature data, calculate risk thresholds, determine whether there is a risk of errors in tasks executed in real time, and issue warnings.

[0059] The classification module includes a complexity calculation unit, a classification threshold calculation unit and a classification unit;

[0060] The complexity calculation unit is used to extract the amount of information and the number of logical operations of the tasks executed in the history, and calculate the complexity of each task when it is executed;

[0061] The classification threshold calculation unit is used to uniformly analyze and calculate the complexity of each calculated task to obtain a classification threshold for determining whether the tasks are of the same type;

[0062] The classification unit is used to calculate the complexity difference between every two tasks, judge the difference using a classification threshold, and classify tasks with a difference smaller than the classification threshold into the same task type.

[0063] The abnormal warning module includes a feature data search unit, a risk threshold calculation unit and a task elimination unit;

[0064] The characteristic data search unit is used to analyze the task data that has errors in history, and select the data type with the largest difference as the characteristic data of the task error;

[0065] The risk threshold calculation unit is used to collect feature data of tasks that have errors in history, and use the feature data in history to calculate a risk threshold for determining whether an error has occurred in a task;

[0066] The task elimination unit is used to make risk assessments on tasks executed in real time, issue warnings when there is a risk of errors in tasks executed in real time, stop the execution process of abnormal tasks, eliminate abnormal task execution instructions, and reallocate resources.

[0067] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0068] 1. The present invention analyzes the data of the computer executing tasks in the history and classifies the tasks. When performing various data analyses on the tasks by using the types of tasks, a comprehensive analysis can be performed based on the characteristics of the task types, without the need to analyze each task in turn, thereby speeding up the efficiency of the system.

[0069] 2. The present invention calculates the priority by using the usage time and complexity of the task and allocates resources to the task according to the priority, which not only meets the user's computer usage habits and enhances the user experience, but also allows the execution of tasks with lower complexity to be given priority, so that subsequent tasks can obtain resources faster, thereby increasing the completion rate of computer task execution; it avoids the system administrator from allocating too many resources, resulting in a large number of resources being idle and having low utilization.

[0070] 3. The present invention calculates the risk threshold of task errors, issues advance warnings for real-time task risks, and terminates abnormal task processes; avoids continuously allocating resources to tasks that may cause errors, which ultimately leads to a waste of time and resources and fails to achieve ideal results. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0072] In the attached picture:

[0073] Figure 1 It is a module flow chart of the computer resource allocation management system based on data analysis of the present invention;

[0074] Figure 2 It is a schematic diagram of the steps of the computer resource allocation management method based on data analysis of the present invention. DETAILED DESCRIPTION

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

[0076] See also Figure 1-Figure 2 , the present invention provides a technical solution:

[0077] A computer resource allocation management method based on data analysis, the method comprising the following steps:

[0078] S100, collecting all task data executed by the computer in history, analyzing the task data, extracting task features, and classifying the tasks executed by the computer;

[0079] The specific steps to classify computer tasks are:

[0080] S101, collect all the task data executed by the computer in the history as {S1, S2, S3, ..., Sn}, S1, S2, S3, ..., S n Indicates the 1st, 2nd, 3rd, ..., nth task data executed by the computer in the collected history, where n is a positive integer; extracts the information volume and logical operation data of each task data executed by the computer in the history;

[0081] S102. Calculate the complexity of each task based on the amount of information and logical operation data of each task in the extracted history. The formula is:

[0082] F=X 1 +X 2 +X 3 +...+X L

[0083] In the formula, F represents the complexity of each task in the calculation history, X represents the amount of information of each task, and L represents the number of logical operations of each task during execution. The amount of information of each task is superimposed according to the number of logical operations, and the complexity of each task is calculated as {F1, F2, F3, ..., F n}, F1, F2, F3, ..., F n represents the complexity of the 1st, 2nd, 3rd, ..., nth task in the history;

[0084] S103, taking the calculated complexity of each task as the task feature, and calculating the classification threshold of all task complexities, the formula is:

[0085]

[0086] In the formula, F_y represents the classification threshold of all task complexities, n represents the number of calculated complexities, and F i Indicates the complexity of each task, F P Represents the average value of n complexities, i∈(1,n); after calculating the complexity classification threshold, calculate the complexity difference between every two tasks, the formula is:

[0087] F_c=|F the -F other |

[0088] In the formula, F_c represents the complexity difference between every two tasks, F the and F other Indicates the complexity of two tasks among the selected n tasks; the complexity difference of all tasks is calculated as Indicates the calculated The complexity difference;

[0089] S104, judging the calculated complexity difference, when F_c<F_y, judging that the two tasks corresponding to F_c are of the same task type, when F_c≥F_y, judging that the two tasks corresponding to F_c are not of the same task type; after judging, classifying all the tasks executed by the computer in the history into {H1, H2, H3, ..., H k}, H1, H2, H3, ..., H k Represents the 1st, 2nd, 3rd, ..., kth task executed by the computer in history, where k is a positive integer.

[0090] By using the data of each task executed by the computer in history, after analysis, the tasks are classified by computational complexity. When performing various data analyses on the tasks, the types of tasks can be used to conduct extensive analysis based on the characteristics of the task types. There is no need to analyze each task in turn, which speeds up the efficiency of the system.

[0091] S200, analyzing the resource data of each task executed by the computer in history, and calculating the amount of resources required for each task to be executed at the fastest speed;

[0092] The specific steps to calculate the amount of resources required for each task to execute at the fastest speed are:

[0093] S201, extract the amount of resources required for each task type in the computer center task in the collected history as {Z1, Z2, Z3, ..., Z j}, Z1, Z2, Z3, ..., Z j Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., jth tasks in each extracted task type, and extracts the amount of resources required for each task in the k task types obtained by classification;

[0094] S202, using the amount of resources required for each task in each task type in history to calculate the required amount of resources for each task type, the formula is:

[0095]

[0096] In the formula, Z_h represents the amount of resources required for each task type, and Z represents the amount of resources required for each task in each task type. After calculation, the amount of resources required for each task type is {Z_h1, Z_h2, Z_h3, ..., Z_h k}, Z_h1, Z_h2, Z_h3,..., Z_h k Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., kth task types.

[0097] S300, detecting the types and numbers of tasks being executed in the computer in real time, calculating the total amount of resources required for executing all tasks, and determining whether the computer can meet the total amount of resources required for executing all tasks;

[0098] The specific steps to determine whether the computer can meet the resources required to execute all tasks at the fastest speed are:

[0099] S301, extracting the tasks executed by the computer in real time, and using the classified task type set to judge the task types executed by the computer in real time, and obtaining the task types executed by the computer in real time {E_h1, E_h2, E_h3, ..., E_h u}, E_h1, E_h2, E_h3,..., E_h u represents the task type of the first, second, third, ..., uth task executed by the computer in real time; according to the task type of each task, the amount of resources required for each task executed by the computer in real time is extracted as {E_z1, E_z2, E_z3, ..., E_z u}, E_z1, E_z2, E_z3,..., E_z u represents the amount of resources for the 1st, 2nd, 3rd, ..., uth tasks executed by the computer in real time;

[0100] S302, calculating the total amount of resources required for all tasks executed by the computer in real time, the formula is:

[0101]

[0102] In the formula, E_zz represents the total amount of resources required for all tasks executed in real time by the computer, and E_z represents the amount of resources required for each task executed in real time by the computer. The total amount of resources of the computer itself is extracted as E_Q, and the total amount of resources of all tasks executed in real time is judged. When E_zz>E_Q, it is judged that the computer cannot allocate the resources required for all tasks executed in real time. When E_zz≤E_Q, it means that the computer can allocate the resources required for all tasks executed in real time.

[0103] S400, when it is determined that the computer cannot meet the total amount of resources required by all the tasks being executed, collect the time data of the user executing each task on the computer in history, calculate the time list of the user using the computer, calculate the priority of all the tasks being executed, and obtain the priority of each task being executed;

[0104] The specific steps for calculating the priority of all tasks being executed are:

[0105] S401, collecting the execution time of each task type when the user uses the computer in the history {T1, T2, T3, ..., T d}, T1, T2, T3, ..., T d represents the 1st, 2nd, 3rd, ..., dth time of each task type execution in the history, calculates the number of the same time, and selects the time with the largest number as the execution time of the corresponding task type; the time of each task type is collected and analyzed to obtain the execution time of each task type as {T_e1, T_e2, T_e3, ..., T_e k}, T_e1, T_e2, T_e3,..., T_e k represents the execution time of the 1st, 2nd, 3rd, ..., kth task type;

[0106] S402, using the calculated execution time and complexity of each task type to calculate the priority of all tasks executed in real time, the formula is:

[0107] Pr=T_S-T_e+F_c

[0108] In the formula, Pr represents the priority of each task executed in real time, T_S represents the extracted real-time execution time, T_e represents the execution time of each task type executed in real time, and F_c represents the complexity of each task executed in real time; the priorities of u tasks executed in real time are calculated and sorted from small to large as {Pr1, Pr2, Pr3, ..., Pr u}, Pr1, Pr2, Pr3,..., Pr u Indicates the calculated priorities of the 1st, 2nd, 3rd, ..., uth tasks;

[0109] S403, according to the task priorities sorted from small to large, extract the real-time execution tasks corresponding to the priorities, and sort the priorities of all the real-time execution tasks into H_p1→H_p2→H_p3→...H_p u , where H_p1 represents the highest priority task to be executed in real time, H_p u Represents the lowest priority task that executes in real time.

[0110] The priority calculated by using the time and complexity of real-time execution of tasks can take into account the priority of the task itself and the user's usage habits. When allocating resources to tasks according to the priority, it not only meets the user's computer usage habits and enhances the user experience, but also allows tasks with lower complexity to be executed first, so that subsequent tasks can obtain resources faster, increasing the completion rate of computer task execution;

[0111] S500, dynamically allocating resources to all tasks being executed according to the priority of each task;

[0112] The specific steps for dynamically allocating resources to all tasks being executed according to the priority of each task are:

[0113] S501. Based on the judgment, the priority of all tasks to be executed in real time is obtained, and the resources required for the tasks are allocated. The amount of resources required for the high-priority tasks is extracted as E_z, and the E_z resources in the computer are allocated to the high-priority tasks. The remaining resources of the computer are calculated using the formula: E_sh=E_Q-E_z, where E_sh represents the remaining resources of the computer after resource allocation. After classifying the resources according to the priority of the real-time execution tasks, when it is determined that E_sh≤0, the resource allocation ends.

[0114] Using task priorities to allocate resources to tasks can prevent system administrators from allocating too many resources, resulting in a large number of resources being idle and having low utilization rates.

[0115] S600, collect the historical records of task errors when the computer executes tasks, extract the task error data in the records, and calculate the threshold of each task error; make abnormal judgments on the tasks executed in real time, and when it is judged that there is a risk of error in the real-time execution of the tasks, end the abnormal task process to release computer resources and reallocate resources.

[0116] The specific steps for abnormal judgment of real-time execution tasks are as follows:

[0117] S601, collect task data of errors that occurred when the computer executed tasks in the history, and assume that the types of task data of errors that were extracted are {R1, R2, R3, ..., R g}, R1, R2, R3, ..., R g Indicates the 1st, 2nd, 3rd, ..., gth data in the extracted task where an error occurs, and calculates the difference of each data before and after the task error occurs. The formula is: SR_C = |SR_b-SR_a|. The difference of g data is calculated, and the data type corresponding to the largest difference is selected as the characteristic data of the task error.

[0118] S602, collecting feature data of errors that occurred when the computer executed tasks in the past, and calculating the risk threshold of errors that occurred when the tasks were executed, the formula is:

[0119]

[0120] In the formula, Ris represents the calculated risk threshold for task errors, SR_t represents the feature data of task errors, A represents the number of feature data collected when task errors occurred in the history, and st_sr represents the standard deviation of the A feature data collected;

[0121] S603: Extract feature data of each task executed in real time.

[0122] {SR_ts1, SR_ts2, SR_ts3, ..., SR_ts u}, SR_ts1, SR_ts2, SR_ts3,..., SR_ts u Indicates the extracted feature data of the 1st, 2nd, 3rd, ...uth tasks executed in real time. When SR_ts>Ris, the corresponding task is judged to have an error risk and is an abnormal task, and an abnormal warning is issued in the computer; when SR_ts≤Ris, the corresponding task is judged to have no error risk and is a normal task;

[0123] S604: When the task is determined to be an abnormal task and a warning is issued, the computer immediately ends the abnormal task execution process and deletes the abnormal task execution instruction; and reallocates resources for the remaining tasks using the method described in S500.

[0124] Analyze whether the task can be executed normally when the computer executes the task, avoid continuously allocating resources to tasks that may cause errors, which will eventually lead to a waste of time and resources and fail to obtain ideal results. Make early judgments and warnings, end abnormal task processes, and reallocate resources to ensure the rational use of resources, enhance the efficiency of system work, and the completion of computer execution tasks;

[0125] A computer resource allocation management system based on data analysis, which includes a data collection module, a classification module, a resource judgment module, a priority calculation module, a resource allocation module and an abnormal warning module;

[0126] The data collection module is used to collect various task data when the computer performs tasks in the history;

[0127] The classification module is used to calculate the complexity of each task executed by the computer in history, and classify the tasks executed by the computer in history according to the complexity;

[0128] The resource determination module is used to calculate the total amount of resources required for the tasks to be executed in real time, and determine whether the computer can meet the total amount of resources for all real-time tasks;

[0129] The priority calculation module is used to calculate the priority of each task according to the execution time and complexity of the task executed in real time;

[0130] The resource allocation module is used to allocate resources to tasks executed in real time according to their priorities;

[0131] The abnormal warning module is used to collect task data with historical errors to calculate and extract feature data, calculate risk thresholds, determine whether there is a risk of errors in tasks executed in real time, and issue warnings.

[0132] The classification module includes a complexity calculation unit, a classification threshold calculation unit and a classification unit;

[0133] The complexity calculation unit is used to extract the amount of information and the number of logical operations of the tasks executed in the history, and calculate the complexity of each task when it is executed;

[0134] The classification threshold calculation unit is used to uniformly analyze and calculate the complexity of each calculated task to obtain a classification threshold for determining whether the tasks are of the same type;

[0135] The classification unit is used to calculate the complexity difference between every two tasks, judge the difference using a classification threshold, and classify tasks with a difference smaller than the classification threshold into the same task type.

[0136] The abnormal warning module includes a feature data search unit, a risk threshold calculation unit and a task elimination unit;

[0137] The characteristic data search unit is used to analyze the task data that has errors in history, and select the data type with the largest difference as the characteristic data of the task error;

[0138] The risk threshold calculation unit is used to collect feature data of tasks that have errors in history, and use the feature data in history to calculate a risk threshold for determining whether an error has occurred in a task;

[0139] The task elimination unit is used to make risk assessments on tasks executed in real time, issue warnings when there is a risk of errors in tasks executed in real time, stop the execution process of abnormal tasks, eliminate abnormal task execution instructions, and reallocate resources.

[0140] Embodiment 1: Collect data on tasks executed in the history of a certain computer, extract the amount of information and the number of logical operations of each task, and calculate the complexity of each task. The formula is:

[0141] F=X 1 +X 2 +X 3 +...+X L

[0142] The complexity of the nine tasks in the collected history is calculated to be 110, 89, 3, 41, 17, 120, 4, 23, and 67 respectively; the classification threshold is calculated using the formula:

[0143]

[0144] The classification threshold is calculated to be 42.6; the complexity difference between every two tasks is calculated, and the tasks are classified into three types: (110, 89, 120), (3, 4, 17, 41, 23), and (67);

[0145] Extract three tasks A1, A2, A3 for real-time execution; the first type (110, 89, 120) is A1, A2, the second type (3, 4, 17, 41, 23) is A3; extract the required resources of the three tasks as 30, 50, 10; calculate the total required resources as 90; the computer's own resources are 50; judge that the required resources of all real-time tasks cannot be met;

[0146] Calculate the priorities of the three tasks, and get A1-10 points, A2-18 points, and A3-22 points based on the historical time data used by the user;

[0147] The real-time execution time is 13 o'clock. The priority is calculated and the average complexity of the corresponding task type is selected as the complexity of the real-time task. The formula is:

[0148] Pr=T_S-T_e+F_c

[0149] The calculated priorities are A1=109.3, A2=114.3, and A3=27.6. According to the priorities, A1 is first allocated 30 resource bits, A2 is only allocated 20, and A3 waits.

[0150] The risk threshold calculated based on historical data is 25, and the characteristic data of the three real-time tasks are extracted as 30, 20, and 10. After judging that A1 has the risk of error, while A2 and A3 do not have the risk, the A1 task process is terminated, and resources are reallocated to A2 with 50, while A3 waits.

[0151] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0152] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A computer resource allocation management method based on data analysis, characterized in that: The method comprises the following steps: S100, collecting all task data executed by the computer in history, analyzing the task data, extracting task features, and classifying the tasks executed by the computer; The specific steps to classify computer tasks are: S101, collect all the task data executed by the computer in the history as {S1, S2, S3, ..., S n }, S1, S2, S3, ..., S n Indicates the 1st, 2nd, 3rd, ..., nth task data executed by the computer in the collected history, where n is a positive integer; extracts the information volume and logical operation data of each task data executed by the computer in the history; S102. Calculate the complexity of each task based on the amount of information and logical operation data of each task in the extracted history. The formula is: F=X 1 +X 2 +X 3 +...+X L In the formula, F represents the complexity of each task in the calculation history, X represents the amount of information of each task, and L represents the number of logical operations of each task during execution. The amount of information of each task is superimposed according to the number of logical operations, and the complexity of each task is calculated as {F1, F2, F3, ..., F n }, F1, F2, F3, ..., F n represents the complexity of the 1st, 2nd, 3rd, ..., nth task in the history; S103, taking the calculated complexity of each task as the task feature, and calculating the classification threshold of all task complexities, the formula is: In the formula, F_y represents the classification threshold of all task complexities, n represents the number of calculated complexities, and F i Indicates the complexity of each task, F P Represents the average value of n complexities, i∈(1,n); after calculating the complexity classification threshold, calculate the complexity difference between every two tasks, the formula is: F_c=|F the -F other | In the formula, F_c represents the complexity difference between every two tasks, F the and F other Indicates the complexity of two tasks among the selected n tasks; the complexity difference of all tasks is calculated as F_c1, F_c2, F_c3, ..., Indicates the calculated 1st, 2nd, 3rd, ..., The complexity difference; S104, judging the calculated complexity difference, when F_c<F_y, judging that the two tasks corresponding to F_c are of the same task type, when F_c≥F_y, judging that the two tasks corresponding to F_c are not of the same task type; after judging, classifying all the tasks executed by the computer in the history into {H1, H2, H3, ..., H k }, H1, H2, H3, ..., H k represents the 1st, 2nd, 3rd, ..., kth task executed by the computer in history, where k is a positive integer; S200, analyzing the resource data of each task executed by the computer in history, and calculating the amount of resources required for each task to be executed at the fastest speed; S300, detecting the types and numbers of tasks being executed in the computer in real time, calculating the total amount of resources required for executing all tasks, and determining whether the computer can meet the total amount of resources required for executing all tasks; S400, when it is determined that the computer cannot meet the total amount of resources required by all the tasks being executed, collect the time data of the user executing each task on the computer in history, calculate the time list of the user using the computer, calculate the priority of all the tasks being executed, and obtain the priority of each task being executed; S500, dynamically allocating resources to all tasks being executed according to the priority of each task; S600, collecting historical records of task errors when the computer executes tasks, extracting task error data in the records, and calculating risk thresholds; making abnormal judgments on tasks executed in real time, and when it is judged that there is a risk of error in the real-time execution of tasks, terminating the abnormal task process to release computer resources and reallocate resources.

2. The computer resource allocation management method based on data analysis according to claim 1, characterized in that: The specific steps of calculating the amount of resources required for each task to be executed at the fastest speed in S200 are: S201, extract the amount of resources required for each task type in the computer center task in the collected history as {Z1, Z2, Z3, ..., Z j }, Z1, Z2, Z3, ..., Z j Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., jth tasks in each extracted task type, and extracts the amount of resources required for each task in the k task types obtained by classification; S202, using the amount of resources required for each task in each task type in history to calculate the required amount of resources for each task type, the formula is: In the formula, Z_h represents the amount of resources required for each task type, and Z represents the amount of resources required for each task in each task type. After calculation, the amount of resources required for each task type is {Z_h1, Z_h2, Z_h3, ..., Z_h k }, Z_h1, Z_h2, Z_h3,..., Z_h k Indicates the amount of resources required for the 1st, 2nd, 3rd, ..., kth task types.

3. The computer resource allocation management method based on data analysis according to claim 1, characterized in that: The specific steps of determining whether the computer can meet the resource requirements of executing all tasks at the fastest speed in S300 are: S301, extracting the tasks executed by the computer in real time, and using the classified task type set to judge the task types executed by the computer in real time, and obtaining the task types executed by the computer in real time {E_h1, E_h2, E_h3, ..., E_h u }, E_h1, E_h2, E_h3,..., E_h u represents the task type of the first, second, third, ..., uth task executed by the computer in real time; according to the task type of each task, the amount of resources required for each task executed by the computer in real time is extracted as {E_z1, E_z2, E_z3, ..., E_z u }, E_z1, E_z2, E_z3,..., E_z u represents the amount of resources for the 1st, 2nd, 3rd, ..., uth tasks executed by the computer in real time; S302, calculating the total amount of resources required for all tasks executed by the computer in real time, the formula is: In the formula, E_zz represents the total amount of resources required for all tasks executed in real time by the computer, and E_z represents the amount of resources required for each task executed in real time by the computer. The total amount of resources of the computer itself is extracted as E_Q, and the total amount of resources of all tasks executed in real time is judged. When E_zz>E_Q, it is judged that the computer cannot allocate the resources required for all tasks executed in real time. When E_zz≤E_Q, it means that the computer can allocate the resources required for all tasks executed in real time.

4. The computer resource allocation management method based on data analysis according to claim 1, characterized in that: The specific steps of calculating the priority of all tasks being executed in S400 are: S401, collecting the execution time of each task type when the user uses the computer in the history {T1, T2, T3, ..., T d }, T1, T2, T3, ..., T d represents the 1st, 2nd, 3rd, ..., dth time of each task type execution in the history, calculates the number of the same time, and selects the time with the largest number as the execution time of the corresponding task type; the time of each task type is collected and analyzed to obtain the execution time of each task type as {T_e1, T_e2, T_e3, ..., T_e k }, T_e1, T_e2, T_e3,..., T_e k represents the execution time of the 1st, 2nd, 3rd, ..., kth task type; S402, using the calculated execution time and complexity of each task type to calculate the priority of all tasks executed in real time, the formula is: Pr=T_S-T_e+F_c In the formula, Pr represents the priority of each task executed in real time, T_S represents the extracted real-time execution time, T_e represents the execution time of each task type executed in real time, and F_c represents the complexity of each task executed in real time; the priorities of u tasks executed in real time are calculated and sorted from small to large as {Pr1, Pr2, Pr3, ..., Pr u }, Pr1, Pr2, Pr3,..., Pr u Indicates the calculated priorities of the 1st, 2nd, 3rd, ..., uth tasks; S403, according to the task priorities sorted from small to large, extract the real-time execution tasks corresponding to the priorities, and sort the priorities of all the real-time execution tasks into H_p1→H_p2→H_p3→...H_p u , where H_p1 represents the highest priority task to be executed in real time, H_p u Represents the lowest priority task that is executed in real time.

5. The computer resource allocation management method based on data analysis according to claim 1, characterized in that: The specific steps of dynamically allocating resources to all tasks being executed according to the priority of each task in S500 are: S501. Based on the judgment, the priority of all tasks to be executed in real time is obtained, and the resources required for the tasks are allocated. The amount of resources required for the high-priority tasks is extracted as E_z, and the E_z resources in the computer are allocated to the high-priority tasks. The remaining resources of the computer are calculated using the formula: E_sh=E_Q-E_z, where E_sh represents the remaining resources of the computer after resource allocation. After classifying the resources according to the priority of the real-time execution tasks, when it is determined that E_sh≤0, the resource allocation ends.

6. The computer resource allocation management method based on data analysis according to claim 1, characterized in that: The specific steps of performing abnormality judgment on the task executed in real time in S600 are: S601, collect task data of errors that occurred when the computer executed tasks in the history, and assume that the types of task data of errors that were extracted are {R1, R2, R3, ..., R g }, R1, R2, R3, ..., R g Indicates the 1st, 2nd, 3rd, ..., gth data in the extracted task where an error occurs, and calculates the difference of each data before and after the task error occurs. The formula is: SR_C = |SR_b-SR_a|. The difference of g data is calculated, and the data type corresponding to the largest difference is selected as the characteristic data of the task error. S602, collecting feature data of errors that occurred when the computer executed tasks in the past, and calculating the risk threshold of errors that occurred when the tasks were executed, the formula is: In the formula, Ris represents the calculated risk threshold for task errors, SR_t represents the feature data of task errors, A represents the number of feature data collected when task errors occurred in the history, and st_sr represents the standard deviation of the A feature data collected; S603, extracting feature data of each task executed in real time as {SR_ts1, SR_ts2, SR_ts3, ..., SR_ts u }, SR_ts1, SR_ts2, SR_ts3,..., SR_ts u Indicates the extracted feature data of the 1st, 2nd, 3rd, ...uth tasks executed in real time. When SR_ts>Ris, the corresponding task is judged to have an error risk and is an abnormal task, and an abnormal warning is issued in the computer; when SR_ts≤Ris, the corresponding task is judged to have no error risk and is a normal task; S604: When the task is determined to be an abnormal task and a warning is issued, the computer immediately ends the abnormal task execution process and deletes the abnormal task execution instruction; and reallocates resources for the remaining tasks using the method described in S500.

7. A computer resource allocation management system based on data analysis using the computer resource allocation management method based on data analysis according to any one of claims 1 to 6, characterized in that: The computer resource allocation management system includes a data collection module, a classification module, a resource judgment module, a priority calculation module, a resource allocation module and an abnormal warning module; The data collection module is used to collect various task data when the computer performs tasks in the history; The classification module is used to calculate the complexity of each task executed by the computer in history, and classify the tasks executed by the computer in history according to the complexity; The resource determination module is used to calculate the total amount of resources required for the tasks to be executed in real time, and determine whether the computer can meet the total amount of resources for all real-time tasks; The priority calculation module is used to calculate the priority of each task according to the execution time and complexity of the task executed in real time; The resource allocation module is used to allocate resources to tasks executed in real time according to their priorities; The abnormal warning module is used to collect task data with historical errors to calculate and extract feature data, calculate risk thresholds, determine whether there is a risk of errors in tasks executed in real time, and issue warnings.

8. The computer resource allocation and management system based on data analysis according to claim 7, characterized in that: The classification module includes a complexity calculation unit, a classification threshold calculation unit and a classification unit; The complexity calculation unit is used to extract the amount of information and the number of logical operations of the tasks executed in the history, and calculate the complexity of each task when it is executed; The classification threshold calculation unit is used to uniformly analyze and calculate the complexity of each calculated task to obtain a classification threshold for determining whether the tasks are of the same type; The classification unit is used to calculate the complexity difference between every two tasks, judge the difference using a classification threshold, and classify tasks with a difference smaller than the classification threshold into the same task type.

9. The computer resource allocation and management system based on data analysis according to claim 7, characterized in that: The abnormal warning module includes a feature data search unit, a risk threshold calculation unit and a task elimination unit; The characteristic data search unit is used to analyze the task data that has errors in history, and select the data type with the largest difference as the characteristic data of the task error; The risk threshold calculation unit is used to collect feature data of tasks that have errors in history, and use the feature data in history to calculate a risk threshold for determining whether an error has occurred in a task; The task elimination unit is used to make risk assessments on tasks executed in real time, issue warnings when there is a risk of errors in tasks executed in real time, stop the execution process of abnormal tasks, eliminate abnormal task execution instructions, and reallocate resources.

Citation Information

Patent Citations

  • Computer resource allocation method based on big data analysis

    CN111966499A

  • Data center computing resource allocation management system

    CN117785481A