Server cluster control method and device, electronic equipment, storage medium and platform

By dynamically querying cached data and estimating resource usage, optimizing the resource allocation of server clusters, the problem of task processing delay and scheduling bottlenecks in high-density server clusters is solved, and processing efficiency and system stability are improved.

CN119299522AActive Publication Date: 2025-01-10CHINESE PEOPLES LIBERATION ARMY UNIT 91977
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411456651.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-10
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

In high-density server clusters, insufficient stand-alone performance leads to task processing delays and scheduling bottlenecks, which is difficult to meet the needs of high concurrency, high request volume, and big data storage.

Method used

By obtaining the pending task information of the server group, dynamically querying cache data, setting resource control policies, scheduling and allocating resources, prioritizing important tasks, estimating memory and CPU usage, rationally making use of cache, and optimizing task priority and resource allocation.

Benefits of technology

It improves the degree of matching tasks with hardware resources, reduces resource consumption, improves processing efficiency, ensures task fluency, maintains system stability, and reduces efficiency reduction and data loss caused by untimely task storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299522A_ABST
    Figure CN119299522A_ABST
Patent Text Reader

Abstract

The invention discloses a server cluster control method, a server cluster control device, electronic equipment, a storage medium and a platform, and relates to the field of server cluster control, the method comprises the following steps: obtaining to-be-processed task information of a server cluster; querying dynamic cache data in the server cluster according to the to-be-processed task information of the server cluster; setting a server cluster resource control strategy for processing the to-be-processed task according to the dynamic cache data in the query server cluster; the server cluster resource control strategy comprises scheduling and distributing server cluster resources based on associated data of to-be-processed tasks of a server cluster; obtaining to-be-processed task information of the current server cluster; and implementing a server cluster resource control strategy for processing the to-be-processed task according to the number information of the to-be-processed task of the current server cluster to-be-processed task information and the associated data state of the to-be-processed task of the current server cluster, and scheduling and distributing server cluster resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server cluster control, and in particular to a server cluster control method, a server cluster control device, an electronic device, a storage medium and a platform. Background Art

[0002] In the construction of information systems, high-density server clusters are often needed to handle high-concurrency, high-request volume, high-computing volume, large data storage volume, and low-processing latency instruction tasks. However, due to the low performance of a single server, to meet the ever-increasing business information processing tasks, it is necessary to increase the number of servers exponentially and build massive computing units to compensate for the performance shortfall by increasing the number of servers. However, this approach still has bottlenecks in single-task processing latency and task scheduling.

[0003] Therefore, a server cluster control solution is needed. Under high-density applications based on server clusters, the server responds quickly, and a dynamic cache and priority scheduling mechanism based on the frequency of task execution is used to reduce the number of repeated task processing times, reasonably utilize the cache mechanism, and improve the average processing delay of tasks. For high-frequency tasks, task scheduling is actively performed according to changes in the dependent data source, thereby improving the server cluster's ability to support a large number of tasks under high-density applications while reducing the average processing delay of tasks. Summary of the invention

[0004] The purpose of the present invention is to provide a server cluster control method, a server cluster control device, an electronic device, a storage medium and a platform, which at least solve the problem of hardware resource allocation, the problem of task processing priority and the problem of data cache sorting.

[0005] The present invention provides the following scheme:

[0006] According to one aspect of the present invention, a server group control method is provided, the server group control method comprising:

[0007] Get the pending task information of the server group;

[0008] The server group pending task information includes the number information of the pending tasks;

[0009] According to the server group's pending task information, query the dynamic cache data in the server group;

[0010] The query server group dynamically caches data including associated data based on tasks to be processed by the server group;

[0011] The associated data of the server group's pending tasks include cached result data based on processing the server group's pending tasks;

[0012] The cache result data includes final cache result data and intermediate cache result data;

[0013] According to the query server group dynamically cached data, setting a server group resource control strategy for processing pending tasks;

[0014] The server group resource control strategy includes scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group;

[0015] Get the pending task information of the current server group;

[0016] According to the number information of the pending tasks in the current server group's pending tasks information and the associated data status of the current server group's pending tasks, the server group resource control strategy for processing the pending tasks is implemented to schedule and allocate server group resources.

[0017] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group includes:

[0018] Set up rules for querying dynamic cache data in the server cluster;

[0019] The rule for querying the dynamic cache data in the server group includes querying the dynamic cache data in the server group based on the serial number information of the task to be processed, and determining whether the cache result data queried is the final cache result data;

[0020] If,yes, then the complete cache result data is returned to the data end corresponding to the task to be processed;

[0021] If not, determine whether the cache result data queried is intermediate cache result data;

[0022] If,yes, then the intermediate cache result data is matched and filtered according to the input data of the task to be processed.

[0023] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group also includes:

[0024] The server group task information to be processed also includes input data information of the task to be processed;

[0025] Matching and filtering the intermediate cache result data according to the input data of the task to be processed includes determining whether the input data of the task to be processed is consistent with the input data in the final cache result data;

[0026] If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data;

[0027] If,they are consistent, then the program execution location information is obtained,according to the cached result data;

[0028] The task to be processed begins to be executed according to the program execution position information.

[0029] Further, starting to execute the task to be processed according to the program execution position information includes:

[0030] The server group pending task information also includes program execution order information of the pending tasks;

[0031] According to the program execution order information, the intermediate cache result data is screened in turn to see if it matches the input data of the task to be processed;

[0032] If the nth intermediate cache result data matches successfully and the n+1th intermediate cache result data fails to match or the n+1th intermediate cache result data does not exist, then based on the successful match of the nth intermediate cache result data, the task to be processed is executed from the program execution position corresponding to the nth intermediate cache result data.

[0033] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group also includes:

[0034] Determine whether the input data of the task to be processed is consistent with the input data in the final cache result data;

[0035] If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data;

[0036] If,they are inconsistent, then the historical information of the tasks to be processed is obtained;

[0037] The historical information of the task to be processed includes memory usage information and CPU usage information of executing the task to be processed;

[0038] According to the memory usage information and CPU usage information of the tasks to be processed in the historical information, the memory usage and CPU usage status of the current tasks to be processed are estimated;

[0039] Pre-allocate memory resources and CPU resources based on the estimated memory usage and CPU usage of the current tasks to be processed.

[0040] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group also includes:

[0041] Get algorithm information for estimating memory usage status;

[0042] The algorithm information for estimating the memory occupancy state includes:

[0043] in,

[0044] R e The estimated memory usage of tasks to be processed after this task is processed;

[0045] R0 is the actual memory usage of this processing task;

[0046] The estimated memory usage for this processing task;

[0047] θ∈(0,1) is the configuration coefficient.

[0048] Furthermore, the algorithm information for estimating the memory usage status includes:

[0049] Get the actual execution frequency period information of the tasks to be processed;

[0050] According to the actual execution frequency cycle information of the task to be processed, the data of θ∈(0,1) in the corresponding memory is controlled.

[0051] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group also includes:

[0052] Get the algorithm information for estimating CPU usage status;

[0053] The algorithm information for estimating the CPU occupancy state includes:

[0054] in,

[0055] C e The estimated CPU core usage after processing this task;

[0056] C0 is the number of CPU cores actually occupied by this processing task;

[0057] T0 is the actual execution time of this processing task;

[0058] The estimated number of CPU cores occupied by this processing task;

[0059] The average execution time of the processing task;

[0060] θ∈(0,1) is the configuration coefficient.

[0061] Furthermore, the algorithm information for estimating the CPU occupancy state includes:

[0062] Get the actual execution frequency period information of the tasks to be processed;

[0063] According to the actual execution frequency cycle information of the task to be processed, the data of θ∈(0,1) of the corresponding CPU is controlled.

[0064] Furthermore, the average execution time of the execution processing task includes:

[0065] According to the actual execution frequency period information of the task to be processed, the average execution time of the most recent preset n execution times of the processing task is counted, and the average execution time of the processing task is updated periodically.

[0066] Furthermore, the pre-allocation of memory resources and CPU resources according to the estimated memory occupancy and CPU occupancy status of the current task to be processed includes:

[0067] Set the memory usage threshold according to the actual execution frequency period of the task to be processed;

[0068] Initiate a strategy for pre-allocating memory resources based on the estimated memory usage being greater than the memory usage threshold;

[0069] Furthermore, the pre-allocation of memory resources and CPU resources according to the estimated memory occupancy and CPU occupancy status of the current task to be processed includes:

[0070] Set the CPU usage threshold according to the actual execution frequency period of the task to be processed;

[0071] According to the estimated CPU usage being greater than the CPU usage threshold, a strategy for pre-allocating CPU resources is initiated.

[0072] Furthermore, the scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group also includes:

[0073] Based on the estimated memory usage and CPU usage status of the currently pending tasks, pre-allocate memory resources and CPU resources, and set a task scheduling strategy;

[0074] The server group pending task information also includes preset priority information of the pending tasks;

[0075] The task scheduling strategy includes setting a priority order of pre-allocated memory resources and CPU resources according to preset priority information of the tasks to be processed and estimated memory occupancy and CPU occupancy status of the tasks to be processed.

[0076] Furthermore, it also includes:

[0077] After the current processing task is completed, the cached result data is returned to the data end corresponding to the task to be processed, and the parameters of the task execution are updated synchronously;

[0078] The task execution parameters include the time of the most recent task execution, the CPU resources and memory resources occupied during task execution, the task execution duration, the hit rate of the complete cache result data in the dynamic cache data, and the hit rate of the intermediate cache result data in the dynamic cache data;

[0079] According to the task execution parameters, the next pre-allocation of memory resources and CPU resources is regulated.

[0080] Furthermore, it also includes:

[0081] According to the inconsistency between the input data of the task to be processed and the input data in the final cache result data, and the inconsistency between the input data of the task to be processed and the input data in the intermediate cache result data, the intermediate result and final result data generated by the task to be processed are obtained;

[0082] According to the intermediate results and final result data generated by the task to be processed, the cache array storage distributed in the dynamic cache is judged whether there is blank space;

[0083] If,None, then overwrite from the lowest priority in the dynamic cache according to the priority order of,preallocated memory resources and CPU resources.

[0084] Furthermore, it also includes:

[0085] The CPU occupancy threshold includes a threshold value at which the actual number of CPU cores occupied is less than 90% of the estimated CPU core usage.

[0086] Furthermore, it also includes:

[0087] The memory usage threshold includes a threshold at which the actual memory usage is less than 90% of the estimated memory usage of the task to be processed.

[0088] According to two aspects of the present invention, there is provided a server group control system, characterized in that the server group control system comprises: a task module, a server group module;

[0089] The task module is used to input tasks to be processed into the server group module;

[0090] The server group module is used to schedule and allocate server group resources;

[0091] The task module inputs the pending tasks to the server group module, including periodically initiated tasks, randomly initiated tasks, and tasks requiring immediate response;

[0092] According to the input of pending tasks into the server group module, including periodically initiated tasks, randomly initiated tasks and tasks requiring immediate response, program execution order information of the pending tasks is marked;

[0093] The server group module schedules and allocates server group resources according to the program execution sequence information marking the tasks to be processed.

[0094] Further, the server group module includes: a task scheduling module, a priority queue module and a server group resource module;

[0095] The priority queue module is used to arrange the preset priority order of the tasks to be processed according to the memory occupancy and CPU occupancy status of the tasks to be processed and the program execution order information of the marked tasks to be processed;

[0096] The task scheduling module is used for the priority queue module to arrange the preset priority order of the tasks to be processed and schedule the processing order of the tasks to be processed;

[0097] The server cluster resource module is used to regulate the pre-allocated memory resources and CPU resources according to the processing order of the tasks to be processed and the memory occupancy and CPU occupancy status of the current tasks to be processed scheduled by the task scheduling module.

[0098] Furthermore, the server cluster module also includes: a cache control module and a distributed cache array module;

[0099] The cache control module is used to control the input data of the task to be processed to match and filter the complete cache result data and the intermediate cache result data;

[0100] The distributed cache array module is used to store higher priority complete cache result data and intermediate cache result data.

[0101] According to three aspects of the present invention, a server group control device is provided, the server group control device comprising:

[0102] The task information acquisition module is used to obtain the task information to be processed by the server group;

[0103] The server group pending task information includes the number information of the pending tasks;

[0104] A cache data query module, used to query the dynamic cache data in the server group according to the task information to be processed by the server group;

[0105] The query server group dynamically caches data including associated data based on tasks to be processed by the server group;

[0106] The associated data of the server group's pending tasks include cached result data based on processing the server group's pending tasks;

[0107] The cache result data includes final cache result data and intermediate cache result data;

[0108] A control strategy setting module, used to set a server group resource control strategy for processing pending tasks according to the dynamic cache data in the query server group;

[0109] The server group resource control strategy includes scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group;

[0110] The current task acquisition module is used to obtain the information of pending tasks of the current server group;

[0111] The scheduling and allocation control module is used to implement the server group resource control strategy for processing the pending tasks according to the number information of the pending tasks of the current server group and the associated data status of the pending tasks of the current server group, and to schedule and allocate the server group resources.

[0112] According to four aspects of the present invention, there is provided an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0113] A computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the server group control method.

[0114] According to five aspects of the present invention, there is provided a computer-readable storage medium, comprising: a computer program executable by an electronic device is stored therein, and when the computer program runs on the electronic device, the electronic device executes the steps of the server group control method.

[0115] According to six aspects of the present invention, a server group control platform is provided, including:

[0116] An electronic device, used to implement the steps of the server group control method;

[0117] A processor, the processor runs a program, and when the program runs, the steps of the server group control method are executed from the data output by the electronic device;

[0118] The storage medium is used to store a program, and when the program is running, the steps of the server group control method are executed for the data output from the electronic device.

[0119] Through the above scheme, the following beneficial technical effects are obtained:

[0120] This application schedules and allocates server group resources through the associated data of tasks to be processed by the server group, thereby improving the matching degree between tasks and hardware resources, so that the related data of more important tasks are processed and saved first.

[0121] This application uses the serial number information of the tasks to be processed to query the dynamic cache data in the server group, and uses the cache data to simplify the steps and stages of program execution according to the association status with the cache data, thereby greatly improving the processing efficiency of the tasks to be processed and reducing resource consumption.

[0122] This application pre-sets the processing priority according to the characteristics of the tasks to be processed, combines the dynamic cache data in the query server group, forms the priority order of executing the tasks to be processed, and uses the cache data to simplify the steps and stages of program execution, thereby reducing resource consumption.

[0123] This application estimates the hardware resources that may be consumed by the tasks to be executed, selects the tasks to be executed with greater hardware consumption pressure, provides more memory and CPU resources, and ensures the smoothness of the entire tasks to be processed.

[0124] This application regularly monitors the processing status of tasks, adjusts algorithm parameters in a timely manner, and optimizes the status of hardware resource scheduling and allocation, so that device resources are always closely adapted to the task release status.

[0125] This application sets the CPU usage threshold and the memory usage threshold to achieve the processing capability of tasks under special conditions while trying to maintain the stability of task processing under general conditions, so as to prevent the risk of system instability caused by overly proactive scheduling and allocation adjustments.

[0126] This application sets the priority of data storage, caches more urgent task data first, adjusts the competition for cache among tasks, balances the processing speed among tasks, and reduces the efficiency loss and data loss of the entire processing process caused by untimely storage of individual tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0127] Figure 1 It is a flow chart of a server cluster control method provided by one or more embodiments of the present invention.

[0128] Figure 2 It is a structural diagram of a server cluster control system provided by one or more embodiments of the present invention.

[0129] Figure 3 It is a structural diagram of a server cluster control device provided by one or more embodiments of the present invention.

[0130] Figure 4 It is a schematic diagram of a high-density server cluster architecture according to a specific embodiment of the present invention.

[0131] Figure 5 It is a schematic diagram of a high-density server cluster execution according to a specific embodiment of the present invention.

[0132] Figure 6 It is a structural block diagram of an electronic device of a server cluster control method provided by one or more embodiments of the present invention. DETAILED DESCRIPTION

[0133] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. 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.

[0134] Figure 1 It is a flow chart of a server cluster control method provided by one or more embodiments of the present invention.

[0135] like Figure 1 The server group control method shown includes:

[0136] Step S1, obtaining information on pending tasks of the server group;

[0137] The server group's pending task information includes the number information of the pending tasks;

[0138] Step S2, querying the dynamic cache data in the server group according to the task information to be processed by the server group;

[0139] Querying the dynamically cached data in the server cluster includes, based on the associated data of the tasks to be processed by the server cluster;

[0140] The associated data of the tasks to be processed by the server group includes cached result data based on processing the tasks to be processed by the server group;

[0141] The cache result data includes final cache result data and intermediate cache result data;

[0142] Step S3, setting a server group resource control strategy for processing the pending tasks according to the query of the dynamic cache data in the server group;

[0143] The server cluster resource control strategy includes, scheduling and allocating server cluster resources based on the associated data of the tasks to be processed by the server cluster;

[0144] Step S4, obtaining the task information to be processed by the current server group;

[0145] Step S5, according to the number information of the pending tasks in the current server group's pending tasks information and the associated data status of the current server group's pending tasks, implement the server group resource control strategy for processing the pending tasks, and schedule and allocate server group resources.

[0146] Specifically, in one embodiment, the tasks to be processed include periodic scheduled tasks, which are sent to the server group for processing according to a preset cycle; they also include random tasks, whose content and / or time do not have a clear regularity; and they also include tasks that require immediate response, which have a higher priority in data processing.

[0147] The pending tasks sent to the server cluster need to have attached number information for identification, so as to facilitate the adoption of targeted processing strategies. Based on the diversity of pending tasks, trace data such as data cache and resource consumption of the server are formed to form the associated data of the pending tasks of the server cluster.

[0148] By utilizing the associated data of the tasks to be processed in the server cluster, targeted server cluster resource control strategies are adopted to optimize resource scheduling and allocation, task execution priority control, data storage trade-offs, etc.

[0149] In this embodiment, scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group includes:

[0150] Set up rules for querying dynamic cache data in the server cluster;

[0151] The rules for querying the dynamic cache data in the server group include querying the dynamic cache data in the server group based on the number information of the task to be processed, and determining whether the cache result data queried is the final cache result data;

[0152] If,yes, then the complete cache result data is returned to the data end corresponding to the task to be processed;

[0153] If not, then determine whether the cache result data queried is intermediate cache result data;

[0154] If,yes, then the intermediate cache result data is matched and filtered according to the input data of the task to be processed.

[0155] Specifically, in one embodiment, the periodic scheduled tasks have stable data characteristics, such as most of the same input data, source data of the task, instruction content in the task, etc. There are a large number of repeated steps in the task processing flow, and the results formed are relatively stable. Since the previous cache data is retained in the dynamic cache space in the server group, the complete cache result data that is the same as the input data corresponding to the previous task can be screened for the return of the result, omitting a large amount of repetitive work that consumes CPU and memory, and will not cause errors.

[0156] In this embodiment, scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group further includes:

[0157] The server group's pending task information also includes input data information of the pending tasks;

[0158] Matching and filtering the intermediate cache result data according to the input data of the task to be processed includes determining whether the input data of the task to be processed is consistent with the input data in the final cache result data;

[0159] If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data;

[0160] If,they are consistent, then the program execution location information is obtained,according to the cached result data;

[0161] Start executing pending tasks based on program execution position information.

[0162] Specifically, in one embodiment, when the input data of the task to be processed cannot find result data matching it in the complete cached result data, the next best option is to continue screening and matching in the intermediate cached result data.

[0163] Some input data may be the same between multiple pending tasks. The program execution location information can be obtained based on the cached result data, and part of the pending tasks can be selected for execution and part of the data can be used directly, which can reduce CPU and memory resource consumption and delay waiting to a certain extent.

[0164] In this embodiment, starting to execute the pending task according to the program execution position information includes:

[0165] The server group pending task information also includes program execution order information of the pending tasks;

[0166] According to the program execution order information, the intermediate cache result data is screened in turn to see if it matches the input data of the task to be processed;

[0167] If the nth intermediate cache result data matches successfully and the n+1th intermediate cache result data fails to match or the n+1th intermediate cache result data does not exist, then based on the successful match of the nth intermediate cache result data, the task to be processed is executed from the program execution position corresponding to the nth intermediate cache result data.

[0168] Specifically, in one embodiment, by comparing the input data of the task to be processed, the available location of the intermediate cache result data is screened, and after reaching a location different from the input data of the task to be processed, CPU and memory resources are consumed to perform subsequent unfinished calculation processing.

[0169] By reducing the number of calculations and processing steps, hardware resources are saved and latency is reduced compared to processing the entire task from start to finish.

[0170] In this embodiment, scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group further includes:

[0171] Determine whether the input data of the task to be processed is consistent with the input data in the final cache result data;

[0172] If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data;

[0173] If,they are inconsistent, then the historical information of the tasks to be processed is obtained;

[0174] The historical information of the pending tasks includes the memory usage information and CPU usage information of executing the pending tasks;

[0175] According to the memory usage information and CPU usage information of the tasks to be processed in the historical information, the memory usage and CPU usage status of the current tasks to be processed are estimated;

[0176] Pre-allocate memory resources and CPU resources based on the estimated memory usage and CPU usage of the current tasks to be processed.

[0177] Specifically, in this embodiment, due to the different tasks to be processed, the required hardware resources are also different. Based on historical data, relatively regular tasks (such as periodic scheduled tasks) can be analyzed and judged to determine the memory resources and CPU resources that may be required to process the task again, and used to predict the memory resources and CPU resources consumed by the current task to be processed. Through pre-judgment, memory resources and CPU resources are pre-allocated to ensure the smooth processing of the task. At the same time, predictable and controllable hardware resource redundancy is reserved for other tasks with poor regularity, reducing the risk of insufficient resources during multi-tasking.

[0178] In this embodiment, scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group further includes:

[0179] Get algorithm information for estimating memory usage status;

[0180] The algorithm information for estimating memory usage status includes:

[0181] in,

[0182] R e The estimated memory usage of tasks to be processed after this task is processed;

[0183] R0 is the actual memory usage of this processing task;

[0184] The estimated memory usage for this processing task;

[0185] θ∈(0,1) is the configuration coefficient.

[0186] Specifically, in one embodiment, by comparing the estimated memory usage of pending tasks with the actual memory usage, fluctuations in hardware resource consumption can be detected in a timely manner, so that preparations can be made to schedule and allocate server cluster resources in response to sudden tasks.

[0187] In this embodiment, the algorithm information for estimating the memory usage status includes:

[0188] Get the actual execution frequency period information of the tasks to be processed;

[0189] According to the actual execution frequency cycle information of the task to be processed, the data of θ∈(0,1) in the corresponding memory is controlled.

[0190] Specifically, in one embodiment, the actual execution effect and resource requirements of the tasks to be processed may fluctuate. In order to timely adjust and obtain an appropriate estimated memory usage of the tasks to be processed, the data of θ∈(0,1) of the corresponding memory may be controlled according to the actual execution frequency cycle information of the tasks to be processed. For example, the resource consumption status data of the task execution may be collected regularly, and the increase or decrease of the memory may be scheduled to be allocated to the new tasks to be processed.

[0191] In this embodiment, scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group further includes:

[0192] Get the algorithm information for estimating CPU usage status;

[0193] The algorithm information for estimating CPU usage status includes:

[0194] in,

[0195] C e The estimated CPU core usage after processing this task;

[0196] C0 is the number of CPU cores actually occupied by this processing task;

[0197] T0 is the actual execution time of this processing task;

[0198] The estimated number of CPU cores occupied by this processing task;

[0199] The average execution time of the processing task;

[0200] θ∈(0,1) is the configuration coefficient.

[0201] Specifically, in one embodiment, by comparing the estimated CPU core usage of tasks to be processed with the actual CPU core usage, fluctuations in hardware resource consumption can be detected in a timely manner to prepare for sudden tasks, scheduling and allocating server cluster resources.

[0202] In this embodiment, the algorithm information for estimating the CPU occupancy state includes:

[0203] Get the actual execution frequency period information of the tasks to be processed;

[0204] According to the actual execution frequency cycle information of the task to be processed, the data of θ∈(0,1) of the corresponding CPU is controlled.

[0205] Specifically, in one embodiment, the actual execution effect and resource requirements of the tasks to be processed may fluctuate. In order to timely adjust and obtain an appropriate estimated CPU usage of the tasks to be processed, the data of θ∈(0,1) of the corresponding CPU may be controlled according to the actual execution frequency cycle information of the tasks to be processed. For example, the resource consumption status data of the task execution may be collected regularly, and the increase or decrease of the CPU may be scheduled to be allocated to the new tasks to be processed.

[0206] The average execution time of the processing task is introduced as the input data of the algorithm to adjust the sampling period of the algorithm.

[0207] In this embodiment, the average execution time of executing the processing task includes:

[0208] According to the actual execution frequency period information of the task to be processed, the average execution time of the most recent preset n execution times of the processing task is counted, and the average execution time of the processing task is updated periodically.

[0209] Specifically, in one embodiment, the delay state can be obtained by sampling the average execution time. Corresponding to the delay state, the smoothness of task processing is monitored.

[0210] In this embodiment, based on the estimated memory usage and CPU usage status of the current task to be processed, pre-allocating memory resources and CPU resources includes:

[0211] Set the memory usage threshold according to the actual execution frequency period of the task to be processed;

[0212] When the estimated memory usage is greater than the memory usage threshold, the strategy of pre-allocating memory resources is started;

[0213] Specifically, in one embodiment, if the estimated memory usage is greater than the memory usage threshold, it means that tasks are arriving more concentratedly and need to be dealt with by scheduling and allocating memory resources.

[0214] In this embodiment, based on the estimated memory usage and CPU usage status of the current task to be processed, pre-allocating memory resources and CPU resources includes:

[0215] Set the CPU usage threshold according to the actual execution frequency period of the task to be processed;

[0216] When the estimated CPU usage is greater than the CPU usage threshold, the policy of pre-allocating CPU resources is started.

[0217] Specifically, in one embodiment, if the estimated CPU usage is greater than the CPU usage threshold, it means that tasks are coming more concentratedly and need to be dealt with by scheduling and allocating CPU resources.

[0218] In this embodiment, based on the associated data of the tasks to be processed by the server group, scheduling and allocating server group resources further includes:

[0219] Based on the estimated memory usage and CPU usage of the current pending tasks, pre-allocate memory resources and CPU resources and set the task scheduling strategy;

[0220] The server group pending task information also includes preset priority information of the pending tasks;

[0221] The task scheduling strategy includes setting the priority order of pre-allocated memory resources and CPU resources according to preset priority information of the tasks to be processed and the estimated memory occupancy and CPU occupancy status of the tasks to be processed.

[0222] Specifically, in one embodiment, the pending tasks include tasks that require immediate response and have high requirements for response speed, and such tasks can be preset with a higher priority. At the same time, based on the estimated memory usage and CPU usage status of the pending tasks, the priority order of pre-allocated memory resources and CPU resources can be further set, so as to improve the fast response speed while reducing the consumption of hardware resources and improving the ability to cope with pending tasks.

[0223] In this embodiment, it also includes:

[0224] After the current processing task is completed, the cached result data is returned to the data end corresponding to the task to be processed, and the parameters of the task execution are updated synchronously;

[0225] The task execution parameters include the time of the most recent task execution, the CPU resources and memory resources used during task execution, the task execution duration, the hit rate of the complete cache result data in the dynamic cache data, and the hit rate of the intermediate cache result data in the dynamic cache data;

[0226] According to the task execution parameters, the next pre-allocation of memory resources and CPU resources is regulated.

[0227] Specifically, in one embodiment, by processing more historical data, parameters can be set based on task execution, and according to the optimization of each item in the parameters, the next pre-allocation of memory resources and CPU resources can be regulated to optimize the task processing effect.

[0228] In this embodiment, it also includes:

[0229] According to the inconsistency between the input data of the task to be processed and the input data in the final cache result data, and the inconsistency between the input data of the task to be processed and the input data in the intermediate cache result data, the intermediate result and final result data generated by the task to be processed are obtained;

[0230] According to the intermediate results and final result data generated by the task to be processed, the cache array storage distributed in the dynamic cache is judged whether there is blank space;

[0231] If,None, then overwrite from the lowest priority in the dynamic cache according to the priority order of,preallocated memory resources and CPU resources.

[0232] Specifically, in one embodiment, new tasks to be processed may appear, which do not exist in the historical data. This data has the requirement of complete consumption of hardware resources, and cannot refer to the above-mentioned final cache result data and intermediate cache result data to achieve the purpose of reducing calculation steps and reducing delays and waiting. For example, such a situation may occur in random tasks. Due to the dependence of scheduled tasks on the final cache result data and intermediate cache result data, the space in the dynamic cache is occupied. In order to ensure the complete and reliable processing of new tasks to be processed, it is necessary to free up cache space to ensure the smooth processing of the current new tasks to be processed.

[0233] In this embodiment, it also includes:

[0234] The CPU usage threshold includes a threshold at which the actual number of CPU cores used is less than 90% of the estimated number of CPU cores used.

[0235] Specifically, in one embodiment, if the actual number of CPU cores used is less than 90% of the estimated number of CPU cores used, it means that the estimate is relatively accurate and has a certain amount of redundancy. The threshold disclosed in this embodiment is a preferred scheduling and allocation solution in a server cluster scenario.

[0236] The value of the actual number of CPU cores used is less than the estimated number of CPU cores used. If the value of the actual number of CPU cores used is less than the estimated number of CPU cores used decreases, it means that more redundancy is left, but resource utilization decreases. Similarly, the value of the actual number of CPU cores used is less than the estimated number of CPU cores used increases, resource utilization increases, and resource redundancy decreases. However, if the actual number of CPU cores used is less than the estimated number of CPU cores used, it means that the estimated number of CPU cores cannot meet the actual number of CPU cores used, which may cause a crash.

[0237] In this embodiment, it also includes:

[0238] The memory usage threshold includes a threshold at which the actual memory usage is less than 90% of the estimated memory usage of the pending tasks.

[0239] Specifically, in one embodiment, if the actual memory usage is less than 90% of the estimated memory usage of the task to be processed, it means that the estimation is relatively accurate and has a certain redundancy. The threshold disclosed in this embodiment is a preferred scheduling and allocation solution in a server cluster scenario.

[0240] The value of actual memory usage less than estimated memory usage decreases, indicating that more redundancy is left, but resource utilization decreases. Similarly, the value of actual memory usage less than estimated memory usage increases, resource utilization increases, and resource redundancy decreases. However, if the actual memory usage is less than the estimated memory usage, it means that the estimated memory cannot meet the actual memory usage needs, which may cause a crash.

[0241] Figure 2 It is a structural diagram of a server cluster control system provided by one or more embodiments of the present invention.

[0242] like Figure 2 The server group control system shown includes: a task module, a server group module;

[0243] A task module, used to input tasks to be processed into the server cluster module;

[0244] Server cluster module, used to schedule and allocate server cluster resources;

[0245] Among them, the task module inputs the pending tasks to the server group module, including periodically initiated tasks, randomly initiated tasks, and tasks requiring immediate response;

[0246] According to the input of pending tasks into the server group module, including periodically initiated tasks, randomly initiated tasks and tasks requiring immediate response, program execution order information of the pending tasks is marked;

[0247] The server cluster module schedules and allocates server cluster resources according to the program execution order information of the tasks to be processed.

[0248] Specifically, pending tasks include tasks initiated periodically, tasks initiated randomly, and tasks that require immediate response. Before entering the server cluster module, set the number of pending tasks, and the number can be used to identify the tasks initiated periodically, tasks initiated randomly, and tasks that require immediate response. By marking the program execution order information of pending tasks, the server cluster resources are scheduled and allocated in the server cluster module to ensure that each task is processed according to its own characteristics and requirements, reduce resource waste, and reduce the overall response speed.

[0249] In this embodiment, the server group module includes: a task scheduling module, a priority queue module and a server group resource module;

[0250] The priority queue module is used to arrange the preset priority order of the tasks to be processed according to the memory occupancy and CPU occupancy status of the tasks to be processed and the program execution order information of the marked tasks to be processed;

[0251] The task scheduling module is used for the priority queue module to arrange the preset priority order of the tasks to be processed and schedule the processing order of the tasks to be processed;

[0252] The server cluster resource module is used to regulate the pre-allocated memory resources and CPU resources according to the processing order of the pending tasks and the memory occupancy and CPU occupancy status of the current pending tasks scheduled by the task scheduling module.

[0253] Specifically, the tasks are first sorted according to their characteristics, and after the sorting is completed, the cache space, memory, CPU, etc. are scheduled and allocated.

[0254] In this embodiment, the server cluster module further includes: a cache control module and a distributed cache array module;

[0255] A cache control module is used to control the input data of the task to be processed to match and filter the complete cache result data and the intermediate cache result data;

[0256] The distributed cache array module is used to store higher priority complete cache result data and intermediate cache result data.

[0257] Specifically, for example, for a newly executed task, the intermediate results and the final results can be saved in the distributed cache array. If the distributed cache array is full, the cache with a low hit rate is replaced with the current execution result or the intermediate result.

[0258] Figure 3 It is a structural diagram of a server cluster control device provided by one or more embodiments of the present invention.

[0259] like Figure 3The server cluster control device shown includes: a task information acquisition module, a cache data query module, a control strategy setting module, a current task acquisition module, and a scheduling allocation control module;

[0260] The task information acquisition module is used to obtain the task information to be processed by the server group;

[0261] The server group's pending task information includes the number information of the pending tasks;

[0262] The cache data query module is used to query the dynamic cache data in the server group according to the task information to be processed by the server group;

[0263] Querying the dynamically cached data in the server cluster includes, based on the associated data of the tasks to be processed by the server cluster;

[0264] The associated data of the tasks to be processed by the server group includes cached result data based on processing the tasks to be processed by the server group;

[0265] The cache result data includes final cache result data and intermediate cache result data;

[0266] A control strategy setting module, used to set a server group resource control strategy for processing pending tasks based on querying dynamic cache data in the server group;

[0267] The server cluster resource control strategy includes, scheduling and allocating server cluster resources based on the associated data of the tasks to be processed by the server cluster;

[0268] The current task acquisition module is used to obtain the information of pending tasks of the current server group;

[0269] The scheduling and allocation control module is used to implement the server group resource control strategy for processing pending tasks, and schedule and allocate server group resources according to the number information of the pending tasks in the current server group pending task information and the associated data status of the current server group pending tasks.

[0270] It is worth noting that although the present system only discloses the task information acquisition module, the cache data query module, the control strategy setting module, the current task acquisition module, and the scheduling allocation control module, it does not mean that the present device is limited to the above-mentioned basic functional modules. Rather, what the present invention wants to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present system is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the above-mentioned basic functional modules.

[0271] Through the above scheme, the following beneficial technical effects are obtained:

[0272] This application schedules and allocates server group resources through the associated data of tasks to be processed by the server group, thereby improving the matching degree between tasks and hardware resources, so that the related data of more important tasks are processed and saved first.

[0273] This application uses the serial number information of the tasks to be processed to query the dynamic cache data in the server group, and uses the cache data to simplify the steps and stages of program execution according to the association status with the cache data, thereby greatly improving the processing efficiency of the tasks to be processed and reducing resource consumption.

[0274] This application pre-sets the processing priority according to the characteristics of the tasks to be processed, combines the dynamic cache data in the query server group, forms the priority order of executing the tasks to be processed, and uses the cache data to simplify the steps and stages of program execution, thereby reducing resource consumption.

[0275] This application estimates the hardware resources that may be consumed by the tasks to be executed, selects the tasks to be executed with greater hardware consumption pressure, provides more memory and CPU resources, and ensures the smoothness of the entire tasks to be processed.

[0276] This application regularly monitors the processing status of tasks, adjusts algorithm parameters in a timely manner, and optimizes the status of hardware resource scheduling and allocation, so that device resources are always closely adapted to the task release status.

[0277] This application sets the CPU usage threshold and the memory usage threshold to achieve the processing capability of tasks under special conditions while trying to maintain the stability of task processing under general conditions, so as to prevent the risk of system instability caused by overly proactive scheduling and allocation adjustments.

[0278] This application sets the priority of data storage, caches more urgent task data first, adjusts the competition for cache among tasks, balances the processing speed among tasks, and reduces the efficiency loss and data loss of the entire processing process caused by untimely storage of individual tasks.

[0279] Figure 4 It is a schematic diagram of a high-density server cluster architecture according to a specific embodiment of the present invention.

[0280] Figure 5 It is a schematic diagram of a high-density server cluster execution according to a specific embodiment of the present invention.

[0281] In a specific embodiment, Figure 4 The high-density server cluster architecture shown can be divided into task scheduler, cache controller, priority task queue, distributed cache array, computing storage resources, etc. according to functional domains.

[0282] The task scheduler is mainly responsible for receiving task instructions input by the user, collecting task cache information, task historical execution statistics, etc. from the cache controller, and analyzing and scheduling the tasks to be executed based on the above, and adding the tasks to be executed to the priority queue.

[0283] The cache controller is mainly used to build a high-performance index, which can quickly find the final result cache and intermediate result cache corresponding to the task from the index according to the task number. In addition, the cache controller can also determine the aging and update methods of cache results based on a posteriori information such as cache usage and cache hit rate.

[0284] The priority task queue is mainly responsible for maintaining the list of tasks to be executed, and scheduling the execution of tasks according to the priority of the tasks added to the queue and the task-related attributes (such as the resources required to execute the tasks and the estimated execution time, etc.).

[0285] The distributed cache array is mainly used to save the final results and intermediate results of each task (including memory images of the intermediate states of task execution, etc.). When the intermediate state of the task needs to be restored, it can quickly restore to the task breakpoint state and execute subsequent task instructions based on the new input data.

[0286] Computing and storage resources are the resource base of high-density server clusters, providing the necessary computing and storage resource support for task execution.

[0287] In this embodiment, if Figure 5 The high-density server cluster shown in the figure is executed, and relates to a method for fast response of high-density servers, the steps comprising:

[0288] In the first step, when a task needs to be executed, the task scheduler sends the task number to the cache manager, which queries the index to see if there is a final cache result or an intermediate cache result for the task. If there is a final cache result or an intermediate cache result for the task, compare whether the input of this task matches the input of the cache result. If the input of the final result matches the input of this time, execute the second step; if the input of the intermediate result matches the input of this time, execute the third step; if there is no cache result that matches the input of this time, execute the fourth step.

[0289] In the second step, the cache manager extracts the final result of the task from the distributed cache array and executes step eight.

[0290] In the third step, the cache manager extracts the intermediate cache image of the task from the distributed cache array and executes the fifth step.

[0291] In the fourth step, if no cached results are matched for this input, the computing and storage resources occupied by the task are estimated based on the historical execution data of the task, including the number of CPUs occupied, the task execution time, the memory size required, etc. If the task is a new task and there is no historical execution data, the estimated resource size manually entered by the user when the task is started is used. If the user does not configure the above parameters when starting the task, the average task resource size in the high-density server cluster is used as the estimated data for the task. Execute step 6.

[0292] Step 5: Evaluate the computing and storage resources used by the image to execute tasks based on the image history execution data, including the number of CPUs, the estimated time required from the image node to the completion of the task execution, the required memory size, and other data. Execute step 6.

[0293] Step 6: If the user configures a priority when the task is started, the task is added to the task queue of the corresponding priority. If the user does not configure a priority when the task is started, the task is added to the task queue of the lowest priority. Execute step 7.

[0294] The seventh step is to schedule tasks from the priority queue based on the priority of the task and the number of resources the task requires.

[0295] The scheduling rules include:

[0296] 1. High priority tasks are executed first.

[0297] Start judging from the first task in the highest priority queue in the current priority queue. If the available resources in the current high-density server cluster can meet the estimated resource occupancy requirements, execute the task. If not, check whether there is a task that meets the resource requirements in the same priority queue. If so, execute the task.

[0298] 2. Low-priority tasks are executed in between.

[0299] When a high-priority task cannot be executed due to resource issues, a task with an estimated execution time not longer than the remaining execution time of the task with the highest resource usage can be selected from the low-priority queue for execution. This ensures that when the task with the highest resource usage is completed, the task in the high-priority queue can be scheduled immediately.

[0300] Step 8. After the task is completed or the final result is extracted based on the final result, the final result of the task is returned to the task caller, and the task execution parameters are updated at the same time, including the most recent task execution time, the CPU resources and memory resources occupied during task execution, the task execution time, the cache hit rate, etc. For the newly executed task, the intermediate results and the final results can be saved to the distributed cache array. If the distributed cache array is full, the cache with a low hit rate is replaced with the current execution result or the intermediate result.

[0301] In another specific embodiment, a fast response method of a certain type of high-density server is disclosed:

[0302] Step 1: Determine whether there is an available execution result of the task in the cache. That is, when the high-density server cluster is assigned to execute a task, first query the dynamic cache controller to see whether there is an available cache result or cached intermediate result for the task. If the cached result is available, execute step 2; if the cached final result is not available, but there is at least one cached intermediate result available, execute step 3; if there is no available cached result, execute step 4.

[0303] Step 2: Extract the cached execution result according to the task number. That is, query the cache slice that stores the final execution result of the task from the dynamic cache controller, extract the corresponding execution result, and return it directly to the task caller, and the task execution ends.

[0304] Step 3: Extract the cached intermediate result according to the task number. That is, query the best available cache to store the task from the dynamic cache controller, combine it with the original input information of the current task, and use it as the intermediate startup input of the task, and execute step 4.

[0305] Step 4: Determine the task resource allocation. That is, the task scheduler determines the task execution priority and the required computing and storage resources (including the number of CPU cores, memory size, resource occupancy time, etc.) based on the task historical execution records (including the resources and execution time occupied by historical execution, etc.) and the current task status (initial state execution or intermediate state execution). Execute step 5.

[0306] Step 5: Add to the priority queue. That is, add the task to the priority queue according to the priority initially configured for the task. For tasks that are not configured with a priority, the lowest priority is used by default.

[0307] Step 6: Task scheduling. That is, the task scheduler optimizes the scheduling of tasks based on the tasks to be executed in the priority queue and the resources they require, combined with the available resources in the current high-density server cluster. For example, if there are available computing and storage resources in the high-density server cluster and the priority queue is not empty, the corresponding tasks in the priority queue are executed from high to low according to certain rules.

[0308] Step 7: Store the intermediate and final results of the task. When the task is executed, before using new input or obtaining input from the database or other external sources during execution, record the current memory state and task execution position and save them in the cache. When the task is executed, save the task execution results in the cache.

[0309] Step 8: Cache invalidation and cache update. When the high-density server provides services, when the external dependent data of a task changes, the corresponding intermediate cache results of the task need to be synchronously invalidated. In addition, the high-density server needs to count the cache hit rate of each cache result. When the hit rate of the intermediate cache results or final cache results of some tasks is low, the write cache probability of the corresponding intermediate cache results or final cache results of the task is reduced.

[0310] Among them, in step 1, it is determined whether there is an available execution result of the task in the cache, and the steps are as follows:

[0311] Step 1-1: The high-density server cluster will assign a unique identifier to each task that needs to be executed. The task is a logical task, that is, the same logical task has a unique identifier when it is run at different times and under different input conditions. When a task needs to be executed, the cache controller first queries whether there is available cache information based on the unique identifier of the task and the task input data.

[0312] Step 1-2: When the task identifier can be found in the cached result, and the input data of the task is consistent with the input data of the cached final result, it is considered that there is an available cached result, and the result is extracted and returned directly.

[0313] Step 1-3: When the task identifier can be found in the cached result, but the input data of the task is inconsistent with the input of the cached final result, check whether the input data corresponding to the intermediate cache result matches the current input data in turn. If they match, the task has an available intermediate volume cache result, and the intermediate cache result and related memory status are extracted for subsequent tasks to continue execution.

[0314] Step 1-4: When the task identifier cannot be found in the cached results, or the task identifier can be found in the cached results but the input data cannot match the final result and the intermediate results, there is no available cached result for the task.

[0315] Among them, in step 3, the cached intermediate results are extracted according to the task number, and the steps are as follows:

[0316] Step 3-1: When the identifier of the task to be executed can be found in the cache result, and the task contains n input data, and the n input data are inconsistent with the data input in the final cache result, the input data is matched in the intermediate cache result.

[0317] Step 3-2: Each intermediate cache result corresponds to an intermediate state during the execution of the task, including used input data, task execution location, current memory data, etc. The used input data of the intermediate state is matched with the input data. If the used data is completely consistent with the input data (ignoring unused input data), the intermediate cache result is considered to match the input data.

[0318] Step 3-3: In the order of program execution, match the intermediate cache results with the input data in turn. If the nth intermediate cache can match the input data, and the n+1th intermediate cache does not match the input data or the n+1th intermediate cache does not exist, then directly use the original input data combined with the result of the nth intermediate cache to start subsequent tasks from the corresponding program execution position.

[0319] In step 4, the task resource allocation is determined, and the steps are as follows:

[0320] Step 4-1: After each task is executed, the task scheduler will count and update the estimated resource usage and execution time of the task for reference when the task is executed next time. Follow the steps below to update the estimated resource usage of each task.

[0321] Step 4-2: Update the estimated memory usage of the task according to the following formula. e is the estimated memory usage after this update, R0 is the actual memory usage, is the current estimated memory usage, θ∈(0,1) is the configuration coefficient, which can be configured according to the actual execution frequency period of the task.

[0322]

[0323] Step 4-3: Update the average execution time of the task, and count the average execution time of the task for the most recent n times. Tasks whose actual available memory is less than 90% of the estimated memory usage during task execution are not included in the average time statistics. Tasks whose actual number of CPU cores used during task execution is less than 90% of the estimated number of CPU cores used are not included in the average time statistics.

[0324] Step 4-4: Update the estimated CPU core usage of the task according to the following formula. e is the estimated CPU core usage after this update, C0 is the actual number of CPU cores occupied by this task execution, T0 is the actual execution time of this task, The number of CPU cores that the current estimated task will occupy. is the average execution time of the task calculated in step 4-3, θ∈(0,1) is the configuration coefficient, which can be configured according to the actual execution frequency period of the task.

[0325]

[0326] The task scheduling in step 6 has the following steps:

[0327] Step 6-1: Use a greedy scheduling algorithm to ensure that tasks in the high-priority queue are executed first.

[0328] Step 6-2: When a task in a high-priority queue needs to wait for the current task to complete and release resources before execution due to insufficient resources, determine whether there is a task in the low-priority queue that can be completed before the current task ends based on the estimated end time of the current task. If so, schedule the task; if not, wait for the current task to complete and release resources.

[0329] In step 7, the intermediate results and final results of the task are stored. The steps are as follows:

[0330] Step 7-1: When the task starts executing, the task input includes data 1, data 2, ... data n. During execution, when the task executes the xth code segment, data 1, data 2, ... data m is required, and when executing the x+1th code segment, new data m+1 is required. After the first code segment ends, the current task execution status and results are saved.

[0331] Step 7-2: If all input data is used when executing the yth code segment, the intermediate state of the task is no longer saved, and the final result after the task execution is completed is directly saved.

[0332] Compared with the prior art, this embodiment has the following significant advantages: (1) Rationally utilize cache resources, reduce the resource occupation of repeated tasks on the high-density server cluster, and significantly improve the average response time of repeated tasks. (2) Adopt a priority task queue, and dynamically schedule the execution order of tasks by using the historical execution status of the tasks to be executed, fully utilize the high-density server resources, reduce the average waiting time of the backlog tasks, and increase the number of tasks that the high-density server can support, while ensuring that the high-priority tasks can be executed first.

[0333] Figure 6 It is a structural block diagram of an electronic device of a server cluster control method provided by one or more embodiments of the present invention.

[0334] like Figure 6 As shown, the present application provides an electronic device, including: 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;

[0335] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a server group control method.

[0336] The present application also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a server group control method.

[0337] The present application also provides a server group control platform, including:

[0338] An electronic device for implementing the steps of a server group control method;

[0339] A processor, the processor runs a program, and when the program runs, the steps of the server group control method are executed from the data output by the electronic device;

[0340] The storage medium is used to store a program, and when the program is running, the steps of the server group control method are executed for the data output from the electronic device.

[0341] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0342] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement electronic device control through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. In addition, in an embodiment of the present invention, the electronic device can be a handheld device such as a smart phone or a tablet computer, or can be an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiment of the present invention.

[0343] The execution subject of the electronic device control in the embodiment of the present invention may be an electronic device, or a functional module in the electronic device that can call and execute a program. The electronic device may obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media may be the same or different, which is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, the firmware corresponding to the storage medium may be written into the storage medium, specifically, the firmware corresponding to the storage medium may be burned into the storage medium. The process of burning the firmware into the storage medium may be implemented using existing technology, which will not be described in detail in the embodiment of the present invention.

[0344] The electronic device may also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media may be the same or different, and are not limited here.

[0345] At this time, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium in which the corresponding firmware is written, so that the electronic device resets the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented by the existing technology and will not be described in detail in the embodiments of the present invention.

[0346] For the convenience of description, the above devices are described in terms of functions and are divided into various units and modules. Of course, when implementing the present application, the functions of each unit and module can be implemented in the same or multiple software and / or hardware.

[0347] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.

[0348] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0349] It can be known from the description of the above implementation modes that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes 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 the various implementation modes of the present application or certain parts of the implementation modes.

[0350] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A server group control method, characterized in that: The server group control method comprises: Get the pending task information of the server group; The server group pending task information includes the number information of the pending tasks; According to the server group's pending task information, query the dynamic cache data in the server group; The query server group dynamically caches data including associated data based on tasks to be processed by the server group; The associated data of the server group's pending tasks include cached result data based on processing the server group's pending tasks; The cache result data includes final cache result data and intermediate cache result data; According to the query server group dynamically cached data, setting a server group resource control strategy for processing pending tasks; The server group resource control strategy includes scheduling and allocating server group resources based on the associated data of the tasks to be processed by the server group; Get the current server group pending task information; According to the number information of the pending tasks in the current server group's pending tasks information and the associated data status of the current server group's pending tasks, the server group resource control strategy for processing the pending tasks is implemented to schedule and allocate server group resources.

2. The server group control method according to claim 1, characterized in that: The scheduling and allocation of server group resources based on the associated data of the server group's pending tasks includes: Set up rules for querying dynamic cache data in the server cluster; The rule for querying the dynamic cache data in the server group includes querying the dynamic cache data in the server group based on the serial number information of the task to be processed, and determining whether the cache result data queried is the final cache result data; If,yes, then the complete cache result data is returned to the data end corresponding to the task to be processed; If not, determine whether the cache result data queried is intermediate cache result data; If,yes, then the intermediate cache result data is matched and filtered according to the input data of the task to be processed.

3. The server group control method according to claim 1 or 2, characterized in that: The scheduling and allocating of server group resources based on the associated data of the server group's pending tasks further includes: The server group task information to be processed also includes input data information of the task to be processed; Matching and filtering the intermediate cache result data according to the input data of the task to be processed includes determining whether the input data of the task to be processed is consistent with the input data in the final cache result data; If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data; If,they are consistent, then the program execution location information is obtained,according to the cached result data; The task to be processed begins to be executed according to the program execution position information.

4. The server group control method according to claim 3, characterized in that: The scheduling and allocating of server group resources based on the associated data of the server group's pending tasks further includes: Determine whether the input data of the task to be processed is consistent with the input data in the final cache result data; If,they are not consistent, then determine whether the input data of the task to be processed is consistent with the input data in the intermediate cache result data; If,they are inconsistent, then the historical information of the tasks to be processed is obtained; The historical information of the task to be processed includes memory usage information and CPU usage information of executing the task to be processed; According to the memory usage information and CPU usage information of the tasks to be processed in the historical information, the memory usage and CPU usage status of the current tasks to be processed are estimated; Pre-allocate memory resources and CPU resources based on the estimated memory usage and CPU usage of the current tasks to be processed.

5. The server group control method according to claim 4, characterized in that: The scheduling and allocating of server group resources based on the associated data of the server group's pending tasks further includes: Get algorithm information for estimating memory usage status; The algorithm information for estimating the memory occupancy state includes: in, R e The estimated memory usage of tasks to be processed after this task is processed; R0 is the actual memory usage of this processing task; The estimated memory usage for this processing task; θ∈(0,1) is the configuration coefficient.

6. The server group control method according to claim 5, characterized in that: The algorithm information for estimating the memory usage status includes: Get the actual execution frequency period information of the tasks to be processed; According to the actual execution frequency cycle information of the task to be processed, the data of θ∈(0,1) in the corresponding memory is controlled.

7. The server group control method according to claim 6, characterized in that: The scheduling and allocating of server group resources based on the associated data of the server group's pending tasks further includes: Get the algorithm information for estimating CPU usage status; The algorithm information for estimating the CPU occupancy state includes: in, C e The estimated CPU core usage after processing this task; C0 is the number of CPU cores actually occupied by this processing task; T0 is the actual execution time of this processing task; The estimated number of CPU cores occupied by this processing task; The average execution time of the processing task; θ∈(0,1) is the configuration coefficient.

8. A server cluster control system, characterized in that: The server group control system includes: a task module and a server group module; The task module is used to input tasks to be processed into the server group module; The server group module is used to schedule and allocate server group resources; The task module inputs the pending tasks to the server group module, including periodically initiated tasks, randomly initiated tasks, and tasks requiring immediate response; According to the input of pending tasks into the server group module, including periodically initiated tasks, randomly initiated tasks and tasks requiring immediate response, program execution order information of the pending tasks is marked; The server group module schedules and allocates server group resources according to the program execution sequence information marking the tasks to be processed.

9. The server cluster control system according to claim 8, characterized in that: The server group module includes: a task scheduling module, a priority queue module and a server group resource module; The priority queue module is used to arrange the preset priority order of the tasks to be processed according to the memory occupancy and CPU occupancy status of the tasks to be processed and the program execution order information of the marked tasks to be processed; The task scheduling module is used for the priority queue module to arrange the preset priority order of the tasks to be processed and schedule the processing order of the tasks to be processed; The server cluster resource module is used to regulate the pre-allocated memory resources and CPU resources according to the processing order of the tasks to be processed and the memory occupancy and CPU occupancy status of the current tasks to be processed scheduled by the task scheduling module.

10. The server cluster control system according to claim 9, characterized in that: The server cluster module also includes: a cache control module and a distributed cache array module; The cache control module is used to control the input data of the task to be processed to match and filter the complete cache result data and the intermediate cache result data; The distributed cache array module is used to store higher priority complete cache result data and intermediate cache result data.

Citation Information

Patent Citations

  • Task scheduling method and system and electronic equipment

    CN117806788A

  • Multitask scheduling method and device based on heterogeneous distributed cluster

    CN118227291A

  • Application cluster scheduling method, storage medium and electronic equipment

    CN118484302A

  • Service resource scheduling method and apparatus

    WO2024131402A1