Cluster data collection method, system, device and medium based on computing power optimization

By dividing the data collection task into subtasks and utilizing the preloader and historical data analysis, the resource allocation algorithm is optimized, which solves the problem of poor load distribution in the existing technology and improves the efficiency and load balance of cluster data collection.

CN118567865BActive Publication Date: 2024-10-08北京英沣特能源技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411034417.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-08
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing cluster data collection technology cannot achieve optimal load distribution, resulting in a decrease in data collection efficiency and requiring multiple adjustments to achieve load balancing.

Method used

Divide the data collection task into multiple subtasks, obtain resource requirements through preloading simulation operations, analyze resource change functions based on dynamic resource allocation algorithms and historical data, and optimize resource allocation algorithms to achieve optimal load distribution.

Benefits of technology

It improves the effectiveness and efficiency of cluster load balancing, reduces the number of data interactions, and achieves the best load solution in one step during distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567865B_ABST
    Figure CN118567865B_ABST
Patent Text Reader

Abstract

The present invention discloses a cluster data collection method, system, device and medium based on computing power optimization, relates to the technical field of cluster data collection, and comprises the following steps: dividing the entire data collection task into a plurality of collection subtasks; obtaining the resources required for preloading of the collection subtask at the preloading end; obtaining the resources required for processing of the collection subtask at the processing end; analyzing the resource change functions of different processing ends through historical data; and allocating the collection tasks of the cluster according to a dynamic resource allocation optimization algorithm. The present invention is used to solve the problem that the existing cluster data collection technology still has a poor load balancing algorithm for the cluster, can only ensure that the load of the cluster is roughly balanced but cannot reach the optimal level, and needs to request real-time data from the processing end multiple times, resulting in a decrease in the efficiency of the collection task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cluster data collection, and specifically to a cluster data collection method, system, device and medium based on computing power optimization. Background Art

[0002] Cluster data collection technology refers to the technology of collecting and obtaining data information of each node or component in a distributed cluster environment. It involves collecting and aggregating data from different nodes, services or components in a distributed system in order to monitor, analyze and manage the status and performance of the entire cluster.

[0003] The existing cluster data collection technology usually divides the collection task into multiple collection subtasks, and distributes the collection subtasks to each processing end of the cluster through load balancing algorithms and dynamic resources. However, the existing cluster data collection technology cannot distribute all the collection subtasks at the same time, and usually can only distribute one or part of the collection subtasks at the same time, which greatly reduces the efficiency of data collection. In addition, when the existing cluster data collection technology distributes the collection subtasks through load balancing technology, it usually requires multiple adjustments, and cannot be done in one step. It also requires multiple collections of the load information of the processing end. At the same time, due to the different performance of the processing end, different collection subtasks add different loads on different processing ends. The existing cluster data collection technology is difficult to achieve load balancing. The optimal distribution of load often requires multiple adjustments to achieve the best effect. For example, in the Chinese patent application publication number: CN115981834A, a cluster load balancing method and a cluster of service units are disclosed. This solution is to allocate tasks to the service unit with the smallest CPU occupancy, which is equivalent to allocating them to the service unit with the smallest current load. Different tasks require different amounts of resources in different service units. Therefore, this method cannot achieve the best load balancing of the cluster. The existing cluster data collection technology also has the problem that the load balancing algorithm for the cluster is not good enough, which can only ensure that the cluster load is roughly balanced but cannot achieve the best, and it is necessary to request real-time data from the processing end multiple times, resulting in a decrease in the efficiency of the collection task. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by dividing the entire data collection task into a plurality of collection subtasks, each collection subtask is responsible for collecting a part of the data, and then a preloading end is set, each collection subtask is simulated and run through the preloading end, and the preloading required resources of the collection subtask at the preloading end are obtained, and then the collection subtasks are allocated to each processing end of the cluster based on a dynamic resource allocation algorithm, and the amount of resources required by the collection subtask at the processing end is obtained, which are marked as the processing required resources, and the resource change range of the processing required resources of different processing ends relative to the preloading required resources is analyzed through historical data to obtain the resource change function for different processing ends, and then the estimated required resources of the collection subtask on different processing ends are estimated based on the resource change function, and then the dynamic resource allocation algorithm is optimized based on the estimated required resources to obtain the dynamic resource allocation optimization algorithm, and finally the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm, so as to solve the problem that the existing cluster data collection technology still has the problem that the load balancing algorithm for the cluster is not good enough, and can only ensure that the load of the cluster is roughly balanced but cannot reach the best, and it is necessary to request real-time data from the processing end multiple times, resulting in a decrease in the efficiency of the collection task.

[0005] To achieve the above objectives, in a first aspect, the present application provides a cluster data collection method based on computing power optimization, comprising the following steps:

[0006] Divide the entire data collection task into multiple collection subtasks, each of which is responsible for collecting a part of the data;

[0007] Set up a preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark them as the resources required for preloading;

[0008] Based on the dynamic resource allocation algorithm, the collection subtasks are allocated to each processing end of the cluster, and the amount of resources required by the collection subtasks on the processing end is obtained and marked as the resources required for processing;

[0009] By analyzing the resource change range of the resources required for processing of different processing ends relative to the resources required for preloading through historical data, a resource change function for different processing ends is obtained;

[0010] The estimated required resources of the collection subtask on different processing ends are estimated based on the resource change function, and the dynamic resource allocation algorithm is optimized based on the estimated required resources to obtain a dynamic resource allocation optimization algorithm, and then the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm.

[0011] Furthermore, the entire data collection task is divided into multiple collection subtasks, each of which is responsible for collecting a portion of data and includes the following sub-steps:

[0012] Divide the data collection task into multiple collection subtasks based on the data source type;

[0013] The data source types include relational databases, NoSQL databases, file systems, log files, web data, and sensor data;

[0014] Number the collection subtasks, using the symbol C n Represents, where n is a positive integer and n is the sequence number of C.

[0015] Furthermore, a preloading end is set, and each acquisition subtask is simulated and run through the preloading end to obtain the amount of resources required by the acquisition subtask on the preloading end, and marking the required resources for preloading includes the following sub-steps:

[0016] A preloading end is set, and each acquisition subtask is simulated and run through the preloading end; the simulation operation includes assigning the acquisition subtask to the preloading end for execution, and the acquisition subtask will apply to the preloading end for calling computing resources at the beginning of execution. The size of the computing resources applied for calling is the resources required for preloading. After the required resources for preloading are obtained, the acquisition subtask is stopped, and the requested resources required for preloading are released at the same time;

[0017] The amount of resources required by the acquisition subtask at the preloading end is obtained and marked as the resources required for preloading. The resources required for preloading include the CPU occupancy required for preloading, the memory occupancy required for preloading, and the disk IO occupancy required for preloading.

[0018] Furthermore, based on the dynamic resource allocation algorithm, the collection subtask is allocated to each processing end of the cluster, and the amount of resources required by the collection subtask on the processing end is obtained, and marked as the required resources for processing, including the following sub-steps:

[0019] The processing ends in the cluster are numbered and represented by P m Represents, where m is a positive integer and m is the serial number of P;

[0020] For P m , get P m CPU utilization, memory usage, and disk IO load;

[0021] The CPU utilization, memory usage, and disk IO load are calculated through the dynamic resource allocation algorithm to obtain P m Load indicator;

[0022] The dynamic resource allocation algorithm is configured as follows: Among them, L m P m Load index, UR1 m P m CPU utilization, UR2m P m Memory utilization of UR3 m P m The disk IO load of K1 is the CPU load weight, K2 is the memory load weight, and K3 is the disk load weight. K1+K2+K3=1, and K1, K2, and K3 are all greater than zero.

[0023] Calculate all P m Based on the load indicator, the collection subtasks are allocated to each processing end of the cluster and the resources required for processing are obtained.

[0024] Furthermore, allocating the collection subtasks to the various processing terminals of the cluster based on the load index and obtaining the resources required for processing includes the following sub-steps:

[0025] Calculate all P m load index, find the minimum value among the load indexes, and mark the corresponding processing end as the minimum load end;

[0026] According to the preset collection queue, the collection queue is recorded as C n , assign the first acquisition subtask in the acquisition queue to the minimum load end, and remove it from the acquisition queue;

[0027] Recalculate all P m The load indicator is used to cyclically allocate the collection subtasks until all the collection subtasks are allocated to the processing end of the cluster;

[0028] Get the collection subtask in P m The amount of resources required in the processing is marked as the resources required for processing, and the resources required for processing include the CPU occupancy required for processing, the memory occupancy required for processing, and the disk IO occupancy required for processing;

[0029] All resources required for preloading and corresponding processing are recorded through the historical resource change database.

[0030] Furthermore, by analyzing the resource change range of the resources required for processing of different processing terminals relative to the resources required for preloading through historical data, obtaining the resource change function for different processing terminals includes the following sub-steps:

[0031] Read the historical resource change database to obtain the resources required for preloading and the corresponding resources required for processing;

[0032] A plane rectangular coordinate system is established with the CPU usage required for preloading as the X-axis and the CPU usage required for processing as the Y-axis, and the system is named as a CPU usage change trend scatter plot. The CPU usage required for preloading and the corresponding CPU usage required for processing are entered into the CPU usage change trend scatter plot.

[0033] Perform power regression on the CPU occupancy change trend scatter plot, and name the obtained regression function as the CPU occupancy change function. Each processing end corresponds to a CPU occupancy change function, which is marked as P m CPU usage change function;

[0034] A plane rectangular coordinate system is established with the memory usage required for preloading as the X-axis and the memory usage required for processing as the Y-axis, and the system is named as a memory usage change trend scatter plot. The memory usage required for preloading and the corresponding memory usage required for processing are entered into the memory usage change trend scatter plot.

[0035] Perform power regression on the memory usage change trend scatter plot, and name the obtained regression function as the memory usage change function. Each processing end corresponds to a memory usage change function, marked as P m Memory usage change function;

[0036] A plane rectangular coordinate system is established with the disk IO occupancy required for preloading as the X-axis and the disk IO occupancy required for processing as the Y-axis, and the system is named as a disk IO occupancy change trend scatter plot. The disk IO occupancy required for preloading and the corresponding disk IO occupancy required for processing are entered into the disk IO occupancy change trend scatter plot.

[0037] Perform power regression on the disk IO occupancy change trend scatter plot, and name the obtained regression function as the disk IO occupancy change function. Each processing end corresponds to a disk IO occupancy change function, marked as P m Disk IO occupancy change function;

[0038] The CPU occupancy change function, the memory occupancy change function and the disk IO occupancy change function are collectively referred to as resource change functions.

[0039] Furthermore, the estimated required resources of the collection subtask on different processing ends are estimated based on the resource change function, and the dynamic resource allocation algorithm is optimized based on the estimated required resources to obtain a dynamic resource allocation optimization algorithm. Then, the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm, including the following sub-steps:

[0040] After calculating and analyzing the resource change function, when cluster data is collected again, the data collection task is divided into multiple collection subtasks based on the data source type;

[0041] Run the acquisition subtask C through the pre-loading end simulation n , and obtain the collection subtask C at the same time n The preloaded resources are substituted into each P mThe CPU usage change function is used to calculate several estimated CPU usages, named nm estimated CPU usages. The memory usage required for preloading is substituted into each P m The memory usage change function calculates several estimated memory usages, named nm estimated memory usages; the disk IO usage required for preloading is substituted into each P m The disk IO occupancy change function calculates several estimated disk IO occupancy requirements and names them as nm estimated disk IO occupancy requirements.

[0042] The dynamic resource allocation algorithm is optimized to obtain a dynamic resource allocation optimization algorithm, and the nm load optimization index is calculated by the dynamic resource allocation optimization algorithm. The nm load optimization index represents the acquisition subtask C. n Assign to processing end P m Post-P m The load index of nm is represented by the symbol R(n,m);

[0043] The dynamic resource allocation optimization algorithm is configured as follows: ; Among them, R(n,m) is the nm load optimization index, PO1 (n,m) Estimate the CPU usage required for nm, PO2 (n,m) Estimate the memory usage required for nm, PO3 (n,m) Estimate the required disk IO usage for nm;

[0044] Calculate P through dynamic resource allocation algorithm m The current load index, marked as the pre-allocation index, is indicated by the symbol B m express;

[0045] Find the minimum value in R(n,m), mark it as the best allocation index, mark n corresponding to the best allocation index as i, and mark m as j; n Assign to P m , where n=i, m=j;

[0046] After the allocation is completed, all R(n,m) with n=i will be removed, and at the same time, all R(n,j) in the remaining R(n,m) will be increased by (R(i,j)-B j ), R(n,j) is R(n,m) with m=j, B j That is, B with m=j m ;

[0047] After the increase is completed, re-find the best allocation index, redefine i and j, and execute the loop until C n After all allocations are completed, the loop stops; the collection subtasks are executed according to the allocated processing ends.

[0048] In a second aspect, the present application provides a cluster data acquisition system based on computing power optimization, including a data partitioning module, a preloading module, an initial task allocation module, a resource change analysis module and an optimized task allocation module; the data partitioning module, the preloading module, the initial task allocation module and the optimized task allocation module are respectively connected to the resource change analysis module data;

[0049] The data partitioning module is used to divide the entire data collection task into multiple collection subtasks, each collection subtask is responsible for collecting a part of the data;

[0050] The preloading module is used to set a preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark them as preloading required resources;

[0051] The initial task allocation module is used to allocate the acquisition subtasks to each processing end of the cluster based on the dynamic resource allocation algorithm, obtain the amount of resources required by the acquisition subtasks on the processing end, and mark them as the resources required for processing;

[0052] The resource change analysis module is used to analyze the resource change range of the processing resources required by different processing terminals relative to the pre-loaded resources through historical data, and obtain resource change functions for different processing terminals;

[0053] The optimization task allocation module is used to estimate the estimated required resources of the collection subtask on different processing ends based on the resource change function, optimize the dynamic resource allocation algorithm based on the estimated required resources, obtain the dynamic resource allocation optimization algorithm, and then allocate the collection tasks of the cluster according to the dynamic resource allocation optimization algorithm.

[0054] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the above method are performed.

[0055] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.

[0056] Beneficial effects of the present invention: The present invention divides the entire data collection task into multiple collection subtasks, each collection subtask is responsible for collecting a part of the data, and then sets a preloading end, simulates and runs each collection subtask through the preloading end, and obtains the resources required for preloading of the collection subtask on the preloading end. The advantage is that in order to predict the amount of resources consumed by different collection subtasks on different processing ends, a preloading end is required as a reference standard to analyze them, so that when considering load balancing, the load after distribution can be considered instead of the load before distribution, so as to prevent the need for multiple adjustments to optimize the load of the cluster, thereby improving the effectiveness and rationality of cluster load balancing;

[0057] The present invention allocates the collection subtask to each processing end of the cluster based on a dynamic resource allocation algorithm, obtains the amount of resources required by the collection subtask on the processing end, marks it as the resources required for processing, and obtains the resource change function for different processing ends by analyzing the resource change range of the resources required for processing of different processing ends relative to the resources required for preloading through historical data. The advantage is that different server ends have different configurations and different server end performances, so the load increase brought by the collection subtask running in different server ends is also different. The existing load balancing algorithm usually needs to be adjusted multiple times after the allocation is completed, while the present invention can be in place at one step during allocation, providing the best load solution for the cluster, and improving the effectiveness of cluster load balancing.

[0058] The present invention estimates the required resources of collection subtasks on different processing ends based on the resource change function, and then optimizes the dynamic resource allocation algorithm based on the estimated required resources to obtain a dynamic resource allocation optimization algorithm. Finally, the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm. The advantage is that the dynamic resource allocation optimization algorithm can predict the load indicators of the server after different collection subtasks are allocated to different server ends, thereby providing the best allocation scheme during allocation. In addition, the present scheme only needs to collect the load data of the server once, which reduces the number of data interactions on the server and can improve the efficiency of data collection on the server, thereby improving the efficiency of cluster data collection and the balance of cluster load. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a functional block diagram of the system of the present invention.

[0060] Figure 2 It is a scatter plot of the CPU occupancy variation trend of the present invention.

[0061] Figure 3 It is a scatter plot of the memory usage change trend of the present invention.

[0062] Figure 4 It is a scatter plot of the disk IO occupancy change trend of the present invention.

[0063] Figure 5 The figure is a flow chart of the steps of the method of the present invention.

[0064] Figure 6 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION

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

[0066] Example 1, please refer to Figure 1 As shown, the present application provides a cluster data acquisition system based on computing power optimization, including a data partitioning module, a preloading module, an initial task allocation module, a resource change analysis module and an optimized task allocation module; the data partitioning module, the preloading module, the initial task allocation module and the optimized task allocation module are respectively connected to the resource change analysis module data;

[0067] The data partitioning module is used to divide the entire data collection task into multiple collection subtasks, each of which is responsible for collecting a part of the data;

[0068] The data partition module is configured with a data partition strategy, which includes:

[0069] Divide the data collection task into multiple collection subtasks based on the data source type;

[0070] Data source types include relational databases, NoSQL databases, file systems, log files, web data, and sensor data;

[0071] Number the collection subtasks, using the symbol C n Indicates, where n is a positive integer and n is the sequence number of C;

[0072] In practical applications, the collection subtasks need to be numbered and sorted from large to small according to the preset priority, that is, C n The smaller the n is, the greater the priority is. In each collection task, the priority of different data source types is not fixed, so it needs to be defined by the user. The numbers C1 to C6 are log files, NoSQL databases, file systems, web data, relational databases, and sensor data.

[0073] The preloading module is used to set the preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark it as the required resources for preloading;

[0074] The preloading module is configured with a preloading strategy, which includes:

[0075] Set up a preloading end, and simulate running each collection subtask through the preloading end; the simulation run includes assigning the collection subtask to the preloading end for execution. When the collection subtask starts executing, it will apply to the preloading end for calling computing resources. The size of the computing resources applied for calling is the resources required for preloading. After obtaining the resources required for preloading, the collection subtask will be stopped, and the resources required for preloading will be released at the same time;

[0076] Obtain the amount of resources required by the acquisition subtask on the preloading end and mark them as resources required for preloading. The resources required for preloading include the CPU usage required for preloading, the memory usage required for preloading, and the disk IO usage required for preloading.

[0077] In actual applications, the server with the worst configuration in the cluster is set as the preloading end. The preloading end only performs simulated operation and does not allocate other processes. When obtaining the resources required for preloading, the resources consumed by the system operation of the preloading end are automatically eliminated. Due to the excessive amount of data, this embodiment no longer specifically displays the preloading resources of the acquisition subtask. The subsequent historical resource change database displays the preloading resources of some acquisition subtasks.

[0078] The initial task allocation module is used to allocate the acquisition subtasks to each processing end of the cluster based on the dynamic resource allocation algorithm, obtain the amount of resources required by the acquisition subtasks at the processing end, and mark them as the resources required for processing; the initial task allocation module includes a load index calculation unit and an initial task allocation unit;

[0079] The load index calculation unit is configured with a load index calculation strategy, which includes:

[0080] The processing ends in the cluster are numbered and represented by P m Represents, where m is a positive integer and m is the serial number of P;

[0081] For P m , get P m CPU utilization, memory usage, and disk IO load;

[0082] The CPU utilization, memory usage, and disk IO load are calculated through the dynamic resource allocation algorithm to obtain P m Load indicator;

[0083] The dynamic resource allocation algorithm is configured as: Among them, L m P m Load index, UR1 m P m CPU utilization, UR2 m P m Memory utilization of UR3 m P m The disk IO load of K1 is the CPU load weight, K2 is the memory load weight, and K3 is the disk load weight. K1+K2+K3=1, and K1, K2, and K3 are all greater than zero.

[0084] Calculate all P m Based on the load index, the collection subtasks are assigned to each processing end of the cluster and the resources required for processing are obtained;

[0085] In practical applications, since the calculation process of the load index of the processing end is the same, this embodiment only takes the calculation process of the load index of the processing end P1 as an example for illustration; the dynamic resource allocation algorithm adopts a weighted calculation method, so the formula contains K1, K2 and K3, and the CPU has the greatest impact on the performance of the processing end, followed by the memory, and the disk IO is the smallest, so K1 is set to 0.5, K2 is set to 0.3, and K3 is set to 0.2. The CPU utilization rate of P1 is 25%, the memory utilization rate is 38%, and the disk IO load is 26%. The load index L1 of P1 is 0.291 through calculation;

[0086] The initial task allocation unit is configured with an initial task allocation strategy, which includes:

[0087] Calculate all P m load index, find the minimum value among the load indexes, and mark the corresponding processing end as the minimum load end;

[0088] According to the preset collection queue, the collection queue is recorded as C n , assign the first acquisition subtask in the acquisition queue to the minimum load end, and remove it from the acquisition queue;

[0089] Recalculate all P m The load indicator is used to cyclically allocate the collection subtasks until all the collection subtasks are allocated to the processing end of the cluster;

[0090] Get the collection subtask in P m The amount of resources required in the process is marked as the resources required for processing. The resources required for processing include the CPU usage required for processing, the memory usage required for processing, and the disk IO usage required for processing.

[0091] All resources required for preloading and corresponding processing are recorded through the historical resource change database;

[0092] In actual application, there are 4 processing terminals in this embodiment, so P m , 1≤m≤4, based on the calculation process of L1, similarly, L2 to L4 are calculated to be 0.323, 0.289 and 0.365 respectively, and the minimum value is L3=0.289, that is, the minimum load end is P3, C1 is assigned to P3 for operation, and recalculating the load index actually only requires recalculating the load index of P3, that is, recalculating L3, and L3 is 0.326. At this time, L1 to L4 are 0.291, 0.323, 0.326 and 0.365 respectively. The minimum value is L1=0.291, that is, P1 is the minimum load end, C2 is assigned to P1, and so on, until C6 is assigned and the analysis is stopped; Get the acquisition subtask at P m The resources required for processing in the above example are recorded in the historical resource change database for all the resources required for preloading and the corresponding resources required for processing. Part of the data in the historical resource change database is shown in Table 1 below:

[0093] Table 1 Partial data of historical resource change database

[0094]

[0095] Each row constitutes a piece of historical resource change data.

[0096] The resource change analysis module is used to analyze the resource change range of the processing resources required by different processing ends relative to the pre-loaded resources through historical data, and obtain resource change functions for different processing ends;

[0097] The resource change analysis module is configured with resource change analysis strategies, which include:

[0098] Read the historical resource change database to obtain the resources required for preloading and the corresponding resources required for processing;

[0099] See also Figure 2 As shown, a plane rectangular coordinate system is established with the CPU occupancy required for preloading as the X-axis and the CPU occupancy required for processing as the Y-axis, and is named a CPU occupancy change trend scatter diagram. The CPU occupancy required for preloading and the corresponding CPU occupancy required for processing are entered into the CPU occupancy change trend scatter diagram;

[0100] Perform power regression on the CPU usage change trend scatter plot, and name the obtained regression function as the CPU usage change function. Each processing end corresponds to a CPU usage change function, marked as P mCPU usage change function;

[0101] See also Figure 3 As shown, a plane rectangular coordinate system is established with the memory usage required for preloading as the X-axis and the memory usage required for processing as the Y-axis, and is named a memory usage change trend scatter plot. The memory usage required for preloading and the corresponding memory usage required for processing are entered into the memory usage change trend scatter plot;

[0102] Perform power regression on the scatter plot of memory usage change trend, and name the obtained regression function as the memory usage change function. Each processing end corresponds to a memory usage change function, marked as P m Memory usage change function;

[0103] See also Figure 4 As shown, a plane rectangular coordinate system is established with the disk IO occupancy required for preloading as the X-axis and the disk IO occupancy required for processing as the Y-axis, and is named a disk IO occupancy change trend scatter plot. The disk IO occupancy required for preloading and the corresponding disk IO occupancy required for processing are entered into the disk IO occupancy change trend scatter plot;

[0104] Perform power regression on the scatter plot of disk IO usage change trend, and name the obtained regression function as disk IO usage change function. Each processing end corresponds to a disk IO usage change function, marked as P m Disk IO occupancy change function;

[0105] The CPU usage change function, memory usage change function, and disk IO usage change function are collectively referred to as resource change functions;

[0106] In practical applications, for each P m There is a CPU occupancy change trend scatter plot, a memory occupancy change trend scatter plot and a disk IO occupancy change trend scatter plot. In this embodiment, P1 is taken as an example, and only the analysis process of the resource change function of the processing end P1 is listed; the CPU occupancy change trend scatter plot is constructed as shown in FIG. Figure 2 As shown in Table 1, the CPU usage required for preloading in the first historical resource change data is 16%, and the CPU usage required for processing is 12%. Therefore, the coordinate point (16,12) is entered into Figure 2 Similarly, other coordinate points are obtained. The scatter plot of memory usage change trend is as follows Figure 3 As shown in the figure, the scatter plot of disk IO usage change trend is as follows Figure 4 As shown, P is obtained by power regression m The CPU usage change function is YA1=0.7118×XA1 1.0177 , P m The memory usage change function is YB1=0.8371×XB1 0.9326 , Pm The disk IO usage change function is YC1=0.7099×XC1 0.9883 , where YA1 is the CPU usage required for P1 processing, XA1 is the CPU usage required for P1 preloading, YA1 is the memory usage required for P1 processing, XA1 is the memory usage required for P1 preloading, YA1 is the disk IO usage required for P1 processing, and XA1 is the disk IO usage required for P1 preloading.

[0107] The optimization task allocation module is used to estimate the estimated required resources of the collection subtask on different processing ends based on the resource change function, optimize the dynamic resource allocation algorithm based on the estimated required resources, obtain the dynamic resource allocation optimization algorithm, and then allocate the collection tasks of the cluster according to the dynamic resource allocation optimization algorithm;

[0108] The optimization task allocation module is configured with an optimization task allocation strategy, which includes:

[0109] After calculating and analyzing the resource change function, when cluster data is collected again, the data collection task is divided into multiple collection subtasks based on the data source type;

[0110] Run the acquisition subtask C through the pre-loading end simulation n , and obtain the collection subtask C at the same time n The preloaded resources are substituted into each P m The CPU usage change function is used to calculate several estimated CPU usages, named nm estimated CPU usages. The memory usage required for preloading is substituted into each P m The memory usage change function calculates several estimated memory usages, named nm estimated memory usages; the disk IO usage required for preloading is substituted into each P m The disk IO occupancy change function calculates several estimated disk IO occupancy requirements and names them as nm estimated disk IO occupancy requirements.

[0111] In actual application, suppose this contains 4 running collection subtasks, namely C n Where 1≤n≤4, taking C1 as an example, it is obtained that the CPU usage required for preloading when C1 is running on the preloading end is 12%, the memory usage required for preloading is 15%, and the disk IO usage required for preloading is 14%. Substitute them into YA1=0.7118×XA1 respectively 1.0177 、YB1=0.8371×XB1 0.9326 and YC1=0.7099×XC1 0.9883 11 obtained the estimated CPU usage PO1 (1,1) 9%, 11 estimated memory usage PO2 (1,1)10%, 11 estimated disk IO usage PO3 (1,1) is 10%, and the calculation results are all integers; PO1 is calculated in the same way (1,2) =8,PO2 (1,2) =9,PO3 (1,2) =10,PO1 (1,3) =8,PO2 (1,3) =11,PO3 (1,3) =9,PO1 (1,4) =8,PO2 (1,4) =10,PO3 (1,4) =8;

[0112] The dynamic resource allocation algorithm is optimized to obtain the dynamic resource allocation optimization algorithm. The nm load optimization index is calculated by the dynamic resource allocation optimization algorithm. The nm load optimization index represents the acquisition subtask C. n Assign to processing end P m Post-P m The load index of nm is represented by the symbol R(n,m);

[0113] The dynamic resource allocation optimization algorithm is configured as: ; Among them, R (n,m) Optimization index for nm load, PO1 (n,m) Estimate the CPU usage required for nm, PO2 (n,m) Estimate the memory usage required for nm, PO3 (n,m) Estimate the required disk IO usage for nm;

[0114] Calculate P through dynamic resource allocation algorithm m The current load index, marked as the pre-allocation index, is indicated by the symbol B m express;

[0115] In actual application, the current UR11 of P1 is 28, UR21 is 35, and UR31 is 38. The calculation R(n,m)=0.5×(28%+9%)+0.3×(35%+10%)+0.2×(38%+10%)=0.416. The R is calculated in the same way. (1,2) =0.441, R (1,3) =0.395, R (1,4) =0.404, and L1=0.5×28%+0.3×35%+0.2×38%=0.321=B1. Similarly, B2 to B4 are calculated to be 0.354, 0.304, and 0.318;

[0116] Find the minimum value in R(n,m), mark it as the best allocation index, mark n corresponding to the best allocation index as i, and mark m as j; nAssign to P m , where n=i, m=j;

[0117] After the allocation is completed, all R(n,m) with n=i will be removed, and at the same time, all R(n,j) in the remaining R(n,m) will be increased by (R(i,j)-B j ), R(n,j) is R(n,m) with m=j, B j That is, B with m=j m ;

[0118] After the increase is completed, re-find the best allocation index, redefine i and j, and execute the loop until C n After all the assignments are completed, the loop stops; the collection subtasks are executed according to the assigned processing end;

[0119] In practical applications, after all R(n,m) are calculated, R(n,m) is represented by a matrix:

[0120] , substitute the value into , the best allocation index is 0.375, corresponding to R(2,3), that is, the collection subtask C2 is assigned to P3, and R(2,m) is completely eliminated, leaving , where ∞ is the R(2,m) after elimination. At this time, i=2,j=3, R(2,3)=0.375, B3=0.304, that is, (R(i,j)-B j )=0.375-0.304=0.71, R(1,3), R(3,3) and R(4,3) are all increased by 0.71. Since C2 has been allocated to P3 at this time, the load occupied by C2 in P3 needs to be taken into account in the subsequent analysis, so R(n,j) needs to be increased by (R(i,j)-B j ); the matrix at this time is , the best allocation index is R(1,4)=0.404, i=1,j=4, so the acquisition subtask C1 is assigned to P4 for execution, and the execution is repeated until C n The loop stops after all assignments are completed. The analysis result is that C1 is assigned to P4 for operation, C2 is assigned to P3 for operation, C3 is assigned to P1 for operation, and C4 is assigned to P2 for operation.

[0121] Example 2, please refer to Figure 5 As shown, the present application provides a cluster data collection method based on computing power optimization, comprising the following steps:

[0122] Step S1, divide the entire data collection task into multiple collection subtasks, each collection subtask is responsible for collecting a part of the data; step S1 includes the following sub-steps:

[0123] Step S101, dividing the data collection task into multiple collection subtasks based on the data source type;

[0124] Step S102, data source types include relational databases, NoSQL databases, file systems, log files, web data, and sensor data;

[0125] Step S103: number the collection subtasks, using symbol C n Indicates, where n is a positive integer and n is the sequence number of C;

[0126] Step S2, setting a preloading end, simulating running each acquisition subtask through the preloading end, obtaining the amount of resources required by the acquisition subtask on the preloading end, and marking them as preloading required resources; Step S2 includes the following sub-steps:

[0127] Step S201, setting a preloading end, and simulating the operation of each acquisition subtask through the preloading end; the simulation operation includes assigning the acquisition subtask to the preloading end for execution, and the acquisition subtask will apply to the preloading end for calling computing resources at the beginning of execution. The size of the computing resources applied for calling is the resources required for preloading. After obtaining the resources required for preloading, the acquisition subtask will be stopped, and the requested resources required for preloading will be released at the same time;

[0128] Step S202, obtaining the amount of resources required by the acquisition subtask at the preloading end, marking them as resources required for preloading, where the resources required for preloading include CPU occupancy required for preloading, memory occupancy required for preloading, and disk IO occupancy required for preloading;

[0129] Step S3, based on the dynamic resource allocation algorithm, the collection subtask is allocated to each processing end of the cluster, and the amount of resources required by the collection subtask at the processing end is obtained and marked as the resources required for processing; Step S3 includes the following sub-steps:

[0130] Step S301: number the processing terminals in the cluster, using the symbol P m Represents, where m is a positive integer and m is the serial number of P;

[0131] Step S302: for P m , get P m CPU utilization, memory usage, and disk IO load;

[0132] Step S303, CPU utilization, memory usage and disk IO load are calculated by dynamic resource allocation algorithm to obtain P m Load indicator;

[0133] The dynamic resource allocation algorithm is configured as: Among them, L mP m Load index, UR1 m P m CPU utilization, UR2 m P m Memory utilization of UR3 m P m The disk IO load of K1 is the CPU load weight, K2 is the memory load weight, and K3 is the disk load weight. K1+K2+K3=1, and K1, K2, and K3 are all greater than zero.

[0134] Step S304, calculate all P m Based on the load index, the collection subtasks are assigned to each processing end of the cluster and the resources required for processing are obtained;

[0135] Step S304 includes the following sub-steps:

[0136] Step S3041, calculate all P m load index, find the minimum value among the load indexes, and mark the corresponding processing end as the minimum load end;

[0137] Step S3042: according to the preset collection queue, the collection queue is recorded as C n , assign the first acquisition subtask in the acquisition queue to the minimum load end, and remove it from the acquisition queue;

[0138] Step S3043, recalculate all P m The load indicator is used to cyclically allocate the collection subtasks until all the collection subtasks are allocated to the processing end of the cluster;

[0139] Step S3044, obtain the collection subtask in P m The amount of resources required in the process is marked as the resources required for processing. The resources required for processing include the CPU usage required for processing, the memory usage required for processing, and the disk IO usage required for processing.

[0140] Step S3045, all resources required for preloading and corresponding resources required for processing are recorded in the historical resource change database;

[0141] Step S4, analyzing the resource change range of the processing resources required by different processing terminals relative to the preloading required resources through historical data, and obtaining the resource change function for different processing terminals; Step S4 includes the following sub-steps:

[0142] Step S401, read the historical resource change database to obtain the resources required for preloading and the corresponding resources required for processing;

[0143] Step S402, establishing a plane rectangular coordinate system with the CPU occupancy required for preloading as the X-axis and the CPU occupancy required for processing as the Y-axis, named as a CPU occupancy change trend scatter diagram, and entering the CPU occupancy required for preloading and the corresponding CPU occupancy required for processing into the CPU occupancy change trend scatter diagram;

[0144] Step S403, perform power regression on the CPU occupancy change trend scatter plot, and name the obtained regression function as the CPU occupancy change function. Each processing end corresponds to a CPU occupancy change function, which is marked as P m CPU usage change function;

[0145] Step S404, establishing a plane rectangular coordinate system with the memory usage required for preloading as the X-axis and the memory usage required for processing as the Y-axis, and naming it as a memory usage change trend scatter plot, and entering the memory usage required for preloading and the corresponding memory usage required for processing into the memory usage change trend scatter plot;

[0146] Step S405, perform power regression on the memory usage change trend scatter plot, and name the obtained regression function as the memory usage change function. Each processing end corresponds to a memory usage change function, which is marked as P m Memory usage change function;

[0147] Step S406, a plane rectangular coordinate system is established with the disk IO occupancy required for preloading as the X-axis and the disk IO occupancy required for processing as the Y-axis, and the system is named as a disk IO occupancy change trend scatter diagram, and the disk IO occupancy required for preloading and the corresponding disk IO occupancy required for processing are entered into the disk IO occupancy change trend scatter diagram;

[0148] Step S407, perform power regression on the disk IO occupancy change trend scatter plot, and name the obtained regression function as the disk IO occupancy change function. Each processing end corresponds to a disk IO occupancy change function, which is marked as P m Disk IO occupancy change function;

[0149] Step S408, the CPU occupancy change function, the memory occupancy change function and the disk IO occupancy change function are collectively referred to as resource change functions;

[0150] Step S5, estimating the estimated required resources of the collection subtask on different processing ends based on the resource change function, optimizing the dynamic resource allocation algorithm based on the estimated required resources, obtaining a dynamic resource allocation optimization algorithm, and then allocating the collection tasks of the cluster according to the dynamic resource allocation optimization algorithm; Step S5 includes the following sub-steps:

[0151] Step S501, after calculating and analyzing the resource change function, when cluster data collection is performed again, the data collection task is divided into multiple collection subtasks based on the data source type;

[0152] Step S502: simulate and run the acquisition subtask C through the preloading end n , and obtain the collection subtask C at the same time n The preloaded resources are substituted into each P m The CPU usage change function is used to calculate several estimated CPU usages, named nm estimated CPU usages. The memory usage required for preloading is substituted into each P m The memory usage change function calculates several estimated memory usages, named nm estimated memory usages; the disk IO usage required for preloading is substituted into each P m The disk IO occupancy change function calculates several estimated disk IO occupancy requirements and names them as nm estimated disk IO occupancy requirements.

[0153] Step S503, optimizing the dynamic resource allocation algorithm to obtain a dynamic resource allocation optimization algorithm, and calculating the nm load optimization index through the dynamic resource allocation optimization algorithm, wherein the nm load optimization index represents the acquisition subtask C. n Assign to processing end P m Post-P m The load index of nm is represented by the symbol R(n,m);

[0154] The dynamic resource allocation optimization algorithm is configured as: ; Among them, R(n,m) is the nm load optimization index, PO1 (n,m) Estimate the CPU usage required for nm, PO2 (n,m) Estimate the memory usage required for nm, PO3 (n,m) Estimate the required disk IO usage for nm;

[0155] Step S504: Calculate P using a dynamic resource allocation algorithm m The current load index, marked as the pre-allocation index, is indicated by the symbol B m express;

[0156] Step S505, find the minimum value in R(n,m), mark it as the best allocation index, mark n corresponding to the best allocation index as i, and mark m as j; n Assign to P m , where n=i, m=j;

[0157] Step S506: After the allocation is completed, all R(n,m) with n=i are removed, and at the same time, all R(n,j) in the remaining R(n,m) are increased by (R(i,j)-B j ), R(n,j) is R(n,m) with m=j, B j That is, B with m=j m ;

[0158] Step S507: After the increase is completed, the optimal allocation index is searched again, i and j are redefined, and the cycle is executed until C n After all allocations are completed, the loop stops; the collection subtasks are executed according to the allocated processing ends.

[0159] Example 3, please refer to Figure 6 As shown, Figure 6 The structural diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the cluster data acquisition method based on computing power optimization are executed to achieve the following functions: divide the entire data acquisition task into multiple acquisition subtasks; obtain the resources required for preloading of the acquisition subtask at the preloading end; obtain the resources required for processing of the acquisition subtask at the processing end; analyze the resource change function of different processing ends through historical data; and allocate the cluster acquisition tasks according to the dynamic resource allocation optimization algorithm.

[0160] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0161] Embodiment 4. The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the cluster data collection method based on computing power optimization provided by the above methods, and the method includes: dividing the entire data collection task into multiple collection subtasks; obtaining the resources required for preloading of the collection subtask at the preloading end; obtaining the resources required for processing of the collection subtask at the processing end; analyzing the resource change function of different processing ends through historical data; and allocating cluster collection tasks according to a dynamic resource allocation optimization algorithm.

[0162] Embodiment 5. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the cluster data collection method based on computing power optimization are executed to achieve the following functions: divide the entire data collection task into multiple collection subtasks; obtain the resources required for preloading of the collection subtask at the preloading end; obtain the resources required for processing of the collection subtask at the processing end; analyze the resource change function of different processing ends through historical data; and allocate the collection tasks of the cluster according to a dynamic resource allocation optimization algorithm.

[0163] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0164] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A cluster data collection method based on computing power optimization, characterized in that: The steps include: Divide the entire data collection task into multiple collection subtasks, each of which is responsible for collecting a part of the data; Set up a preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark them as resources required for preloading; Based on the dynamic resource allocation algorithm, the collection subtasks are allocated to each processing end of the cluster, and the amount of resources required by the collection subtasks on the processing end is obtained and marked as the resources required for processing; Based on the dynamic resource allocation algorithm, the collection subtask is allocated to each processing end of the cluster, and the amount of resources required by the collection subtask on the processing end is obtained. The resources marked as required for processing include the following substeps: The processing ends in the cluster are numbered and represented by P m Represents, where m is a positive integer and m is the serial number of P; For P m , get P m CPU utilization, memory usage, and disk IO load; The CPU utilization, memory usage, and disk IO load are calculated through the dynamic resource allocation algorithm to obtain P m Load indicator; The dynamic resource allocation algorithm is configured as follows: Among them, L m P m Load index, UR1 m P m CPU utilization, UR2 m P m Memory utilization of UR3 m P m The disk IO load of K1 is the CPU load weight, K2 is the memory load weight, and K3 is the disk load weight. K1+K2+K3=1, and K1, K2, and K3 are all greater than zero. Calculate all P m Based on the load index, the collection subtasks are assigned to each processing end of the cluster and the resources required for processing are obtained; By analyzing the resource change range of the resources required for processing of different processing ends relative to the resources required for preloading through historical data, a resource change function for different processing ends is obtained; The estimated required resources of the collection subtask on different processing ends are estimated based on the resource change function, and the dynamic resource allocation algorithm is optimized based on the estimated required resources to obtain a dynamic resource allocation optimization algorithm, and then the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm; The estimated required resources of the collection subtask on different processing ends are estimated based on the resource change function, and the dynamic resource allocation algorithm is optimized based on the estimated required resources to obtain a dynamic resource allocation optimization algorithm. Then, the collection tasks of the cluster are allocated according to the dynamic resource allocation optimization algorithm, including the following sub-steps: After calculating and analyzing the resource change function, when cluster data is collected again, the data collection task is divided into multiple collection subtasks based on the data source type; Run the acquisition subtask C through the pre-loading end simulation n , and obtain the collection subtask C at the same time n The preloaded resources are substituted into each P m The CPU usage change function is used to calculate several estimated CPU usages, named nm estimated CPU usages. The memory usage required for preloading is substituted into each P m The memory usage change function calculates several estimated memory usages, named nm estimated memory usages; the disk IO usage required for preloading is substituted into each P m The disk IO occupancy change function calculates several estimated disk IO occupancy requirements and names them as nm estimated disk IO occupancy requirements. The dynamic resource allocation algorithm is optimized to obtain a dynamic resource allocation optimization algorithm, and the nm load optimization index is calculated by the dynamic resource allocation optimization algorithm. The nm load optimization index represents the acquisition subtask C. n Assign to processing end P m Post-P m The load index of nm is represented by the symbol R(n,m); The dynamic resource allocation optimization algorithm is configured as follows: ; Among them, R(n,m) is the nm load optimization index, PO1 (n,m) Estimate the CPU usage required for nm, PO2 (n,m) Estimate the memory usage required for nm, PO3 (n,m) Estimate the required disk IO usage for nm; Calculate P through dynamic resource allocation algorithm m The current load index, marked as the pre-allocation index, is indicated by the symbol B m express; Find the minimum value in R(n,m), mark it as the best allocation index, mark n corresponding to the best allocation index as i, and mark m as j; n Assign to P m , where n=i, m=j; After the allocation is completed, all R(n,m) with n=i will be removed, and at the same time, all R(n,j) in the remaining R(n,m) will be increased by (R(i,j)-B j ), R(n,j) is R(n,m) with m=j, B j That is, B with m=j m ; After the increase is completed, re-find the best allocation index, redefine i and j, and execute the loop until C n After all allocations are completed, the loop stops; the collection subtasks are executed according to the allocated processing ends.

2. The cluster data collection method based on computing power optimization according to claim 1 is characterized in that: The entire data collection task is divided into multiple collection subtasks. Each collection subtask is responsible for collecting a part of the data and includes the following sub-steps: Divide the data collection task into multiple collection subtasks based on the data source type; The data source types include relational databases, NoSQL databases, file systems, log files, web data, and sensor data; The collection subtasks are numbered and represented by the symbol Cn, where n is a positive integer and n is the sequence number of C.

3. The cluster data collection method based on computing power optimization according to claim 2 is characterized in that: Set up the preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark the required resources for preloading, including the following sub-steps: A preloading end is set, and each acquisition subtask is simulated and run through the preloading end; the simulation operation includes assigning the acquisition subtask to the preloading end for execution, and the acquisition subtask will apply to the preloading end for calling computing resources at the beginning of execution. The size of the computing resources applied for calling is the resources required for preloading. After the required resources for preloading are obtained, the acquisition subtask is stopped, and the requested resources required for preloading are released at the same time; The amount of resources required by the acquisition subtask at the preloading end is obtained and marked as the resources required for preloading. The resources required for preloading include the CPU occupancy required for preloading, the memory occupancy required for preloading, and the disk IO occupancy required for preloading.

4. The cluster data collection method based on computing power optimization according to claim 3 is characterized in that: Based on the load index, the collection subtasks are distributed to each processing end of the cluster, and the resources required for processing are obtained, including the following sub-steps: Calculate all P m load index, find the minimum value among the load indexes, and mark the corresponding processing end as the minimum load end; According to the preset collection queue, the collection queue is recorded as C n , assign the first acquisition subtask in the acquisition queue to the minimum load end, and remove it from the acquisition queue; Recalculate all P m The load indicator is used to cyclically allocate the collection subtasks until all the collection subtasks are allocated to the processing end of the cluster; Get the collection subtask in P m The amount of resources required in the processing is marked as the resources required for processing, and the resources required for processing include the CPU occupancy required for processing, the memory occupancy required for processing, and the disk IO occupancy required for processing; All resources required for preloading and corresponding processing are recorded through the historical resource change database.

5. The cluster data collection method based on computing power optimization according to claim 4 is characterized in that: Analyzing the resource change range of the resources required for processing of different processing terminals relative to the resources required for preloading through historical data, obtaining the resource change function for different processing terminals includes the following sub-steps: Read the historical resource change database to obtain the resources required for preloading and the corresponding processing resources; A plane rectangular coordinate system is established with the CPU usage required for preloading as the X-axis and the CPU usage required for processing as the Y-axis, and the system is named as a CPU usage change trend scatter plot. The CPU usage required for preloading and the corresponding CPU usage required for processing are entered into the CPU usage change trend scatter plot. Perform power regression on the CPU occupancy change trend scatter plot, and name the obtained regression function as the CPU occupancy change function. Each processing end corresponds to a CPU occupancy change function, which is marked as P m CPU usage change function; A plane rectangular coordinate system is established with the memory usage required for preloading as the X-axis and the memory usage required for processing as the Y-axis, and the system is named as a memory usage change trend scatter plot. The memory usage required for preloading and the corresponding memory usage required for processing are entered into the memory usage change trend scatter plot. Perform power regression on the memory usage change trend scatter plot, and name the obtained regression function as the memory usage change function. Each processing end corresponds to a memory usage change function, which is marked as Pm memory usage change function. A plane rectangular coordinate system is established with the disk IO occupancy required for preloading as the X-axis and the disk IO occupancy required for processing as the Y-axis, and the system is named as a disk IO occupancy change trend scatter plot. The disk IO occupancy required for preloading and the corresponding disk IO occupancy required for processing are entered into the disk IO occupancy change trend scatter plot. Perform power regression on the disk IO occupancy change trend scatter plot, and name the obtained regression function as the disk IO occupancy change function. Each processing end corresponds to a disk IO occupancy change function, which is marked as Pm disk IO occupancy change function. The CPU occupancy change function, the memory occupancy change function and the disk IO occupancy change function are collectively referred to as resource change functions.

6. A cluster data collection system based on computing power optimization, used to implement the cluster data collection method based on computing power optimization according to any one of claims 1 to 5, characterized in that: It includes a data partitioning module, a preloading module, an initial task allocation module, a resource change analysis module and an optimized task allocation module; the data partitioning module, the preloading module, the initial task allocation module and the optimized task allocation module are respectively connected to the resource change analysis module data; The data partitioning module is used to divide the entire data collection task into multiple collection subtasks, each collection subtask is responsible for collecting a part of the data; The preloading module is used to set a preloading end, simulate running each acquisition subtask through the preloading end, obtain the amount of resources required by the acquisition subtask on the preloading end, and mark them as preloading required resources; The initial task allocation module is used to allocate the acquisition subtasks to each processing end of the cluster based on the dynamic resource allocation algorithm, obtain the amount of resources required by the acquisition subtasks on the processing end, and mark them as the resources required for processing; The resource change analysis module is used to analyze the resource change range of the processing resources required by different processing terminals relative to the pre-loaded resources through historical data, and obtain resource change functions for different processing terminals; The optimization task allocation module is used to estimate the estimated required resources of the collection subtask on different processing ends based on the resource change function, optimize the dynamic resource allocation algorithm based on the estimated required resources, obtain the dynamic resource allocation optimization algorithm, and then allocate the collection tasks of the cluster according to the dynamic resource allocation optimization algorithm.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 5 are executed.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are performed.