Resource allocation method and device of server, storage medium and electronic equipment
By integrating AI models in BMC to predict future resource requirements and generate dynamic allocation strategies, the problem of low resource utilization caused by fixed resource allocation strategies is solved, efficient and flexible management of server resources is achieved, and system performance and energy efficiency are improved.
Patent Information
- Application Number
- CN202510629617.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, the fixed resource allocation strategy of BMC cannot be dynamically adjusted based on the real-time state data of the server, resulting in low resource utilization and cannot meet the needs of modern data centers for high performance and low energy consumption, especially in high load or burst task scenarios, showing performance bottlenecks and untimely response problems.
By obtaining the server's hardware status data, task queue data and timestamp data, using AI models (such as LSTM and reinforcement learning) to predict future resource utilization, generate dynamic resource allocation strategies, and perform real-time dynamic allocation through the BMC's resource scheduling module, including CPU core count, memory partition management and bandwidth priority control.
It significantly improves resource utilization, reduces resource waste, improves task execution efficiency and service quality, reduces system power consumption, and improves the intelligent management level and operation efficiency of the system.
Smart Images

Figure CN120492165A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a resource allocation method, device, storage medium, and electronic device for a server. Background Art
[0002] As a key component of server hardware, the baseboard management controller (BMC) is responsible for monitoring and managing the server's operating status. As data centers expand in size and complexity, the BMC needs to be more flexible in allocating computing resources (such as CPUs, memory, and network bandwidth) to accommodate emerging application scenarios such as cloud computing, edge computing, and artificial intelligence (AI).
[0003] Currently, the fixed resource allocation strategy in related technologies cannot dynamically adjust resource allocation according to the real-time status data of the server, resulting in low resource utilization. Summary of the Invention
[0004] The present disclosure provides a server resource allocation method, device, storage medium, and electronic device, which are intended to solve the problem in related technologies that fixed resource allocation strategies cannot dynamically adjust resource allocation based on the server's real-time status data, resulting in low resource utilization.
[0005] In a first aspect, the present application provides a method for allocating resources of a server, comprising:
[0006] Obtaining hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task;
[0007] Inputting the hardware status data, the task queue data and the timestamp data into a target resource prediction model to predict resource utilization corresponding to the execution of the data processing task by the server within a preset time period;
[0008] Based on the resource utilization, generating a resource allocation policy corresponding to the server;
[0009] According to the resource allocation policy, real-time dynamic allocation of computing resources to the server is performed.
[0010] In a second aspect, the present application provides a resource allocation device for a server, comprising:
[0011] an acquisition module configured to acquire hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task;
[0012] a prediction module configured to input the hardware status data, the task queue data, and the timestamp data into a target resource prediction model to predict resource utilization corresponding to the server executing the data processing task within a preset time period;
[0013] A generating module is configured to generate a resource allocation policy corresponding to the server based on the resource utilization;
[0014] The execution module is configured to execute real-time dynamic allocation of computing resources of the server according to the resource allocation policy.
[0015] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.
[0016] In a fourth aspect, the present application provides an electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the method of the first aspect is implemented when the processor executes the computer program.
[0017] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.
[0018] The present disclosure provides a server resource allocation method, device, storage medium and electronic device, wherein the method includes: first obtaining the hardware status data of the server, the task queue data of the data processing task corresponding to the server and the timestamp data of the data processing task; then inputting the hardware status data, task queue data and timestamp data into a target resource prediction model to predict the resource utilization rate corresponding to the data processing task executed by the server within a preset time period; then generating a resource allocation strategy corresponding to the server based on the resource utilization rate; and executing real-time dynamic allocation of the computing resources of the server according to the resource allocation strategy. Compared with the current related art, the present application realizes accurate prediction of the resource utilization rate within a future preset time period by collecting the hardware status data, task queue data and timestamp data of the server in real time and inputting these multi-dimensional data into the target resource prediction model, then automatically generates the optimal resource allocation strategy based on the prediction result, and performs real-time dynamic scheduling of the computing resources of the server accordingly, which can flexibly adjust the resource configuration according to the actual load changes, significantly improve the resource utilization rate, reduce resource waste, and at the same time ensure the task execution efficiency and service quality, thereby improving the intelligent management level and operation efficiency of the system.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 A schematic diagram showing a flow chart of a method for allocating resources to a server provided in an embodiment of the present application is shown;
[0022] Figure 2 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0023] Figure 3 A schematic diagram illustrating a flow chart of another method for allocating resources to a server provided in an embodiment of the present application is shown;
[0024] Figure 4 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0026] Figure 6 A schematic structural diagram of a resource allocation device for a server provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0028] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0029] Typically integrated into a server's management chip, the BMC operates independently of the main operating system through its own processor, memory, and network interface. It performs several key functions, including real-time monitoring of the operating status of hardware such as the central processing unit (CPU), memory, hard disk, and power supply (e.g., temperature, voltage, and fan speed); diagnosing faults through sensor data and log information, and issuing alerts when an anomaly occurs; supporting remote power on / off, firmware updates, and system configuration for remote management; and recording system events and error messages for subsequent problem analysis and troubleshooting.
[0030] As the scale of servers expands and the complexity of data centers increases, the function and importance of BMCs are becoming increasingly prominent. However, traditional BMC designs and resource allocation methods can no longer meet the evolving needs of modern data centers. First, while pursuing high performance, data center operators also hope to reduce power consumption to reduce operating costs, and dynamic resource allocation technology helps achieve a better balance between performance and energy consumption. Secondly, as the number of servers increases, manual management of BMCs becomes increasingly difficult and expensive, which has promoted the development of intelligent and automated management technologies, such as AI-based resource scheduling, to improve operation and maintenance efficiency and reduce costs. In addition, modern data centers also need to deal with sudden tasks such as large-scale data processing and AI training, which places higher demands on the response speed of BMCs. With the help of dynamic resource allocation technology, BMCs can adjust resource configurations more quickly to effectively respond to sudden demands.
[0031] Currently, BMCs generally employ static resource allocation strategies, such as fixed CPU core counts, memory size, and network bandwidth. This leads to significant resource waste during low loads and can lead to performance bottlenecks in high-load or bursty scenarios, impacting task execution efficiency. Furthermore, traditional prediction methods based on historical data are limited by model accuracy and data quality, making them incapable of adapting to the significant differences between peak and trough periods in data centers, as well as the sudden real-time data processing demands of edge computing scenarios. Furthermore, current BMCs also have shortcomings in balancing power consumption and performance. Relying on a fixed-priority scheduling mechanism, they are unable to dynamically adjust based on task urgency and system resource availability, resulting in inadequate responses to critical events such as hardware fault alerts and remote management requests. Furthermore, existing BMC management systems are mostly passive and lack AI-driven proactive optimization capabilities. When managing an increasing number of hardware devices (such as graphics processing units (GPUs) and smart network cards) and complex tasks (such as encryption and decryption, and log analysis), they exhibit a lack of predictive and collaborative capabilities, hindering coordinated optimization with the main processor or other management modules. Therefore, there is an urgent need for a more intelligent, flexible and efficient BMC resource management and task response mechanism.
[0032] Based on the above problems in server resource allocation, in order to improve the technical problem that the fixed resource allocation strategy in the related art cannot dynamically adjust resource allocation according to the real-time status data of the server, resulting in low resource utilization. This embodiment provides a server resource allocation method, such as Figure 1 As shown, the method comprises the following steps:
[0033] Step 101: Obtain hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task.
[0034] For example, the AI-based BMC dynamic resource allocation system architecture in this embodiment can be as follows: Figure 2 As shown in the figure, it consists of a data acquisition module, an AI model module, a resource scheduling module, and a monitoring and feedback module. The data acquisition module is deployed in the BMC firmware and collects hardware status data (such as CPU usage, memory occupancy, network bandwidth utilization, temperature, power consumption, etc.), task queue data (including task type, priority, and duration), and timestamp data (task trigger and completion time, etc.) in real time through the sensor interface, memory controller, and network interface.
[0035] Step 102: Input the hardware status data, task queue data, and timestamp data into a target resource prediction model to predict resource utilization corresponding to the server executing the data processing task within a preset time period.
[0036] In some examples, hardware status data, task queue data, and timestamp data are transmitted to the target resource prediction model in the AI model module, which runs on a dedicated AI accelerator in the isolated computing unit of the main CPU and includes a data preprocessing unit, a prediction model unit, and a decision model unit. The data preprocessing unit normalizes and extracts features from the raw data, for example, by using a sliding window to calculate load fluctuations; the prediction model unit uses a long short-term memory network (LSTM) to predict resource utilization (such as CPU utilization, memory utilization, bandwidth utilization, etc.) for the next 5 minutes. By combining the target resource prediction model to predict resource demand, resource scheduling decisions can be made in advance, improving the system's adaptability and stability.
[0037] Step 103: Generate a resource allocation policy corresponding to the server based on the resource utilization.
[0038] Exemplarily, the resource allocation policy may be used for dynamic allocation of processor cores, memory partition management, and bandwidth priority control in a server.
[0039] For example, when monitoring data shows that the CPU or memory utilization of a server has been high for a long time (such as exceeding 80%), and is accompanied by a backlog in the task queue or an increase in response delay, you can consider adding server nodes, upgrading hardware configuration, or adjusting memory and bandwidth, and redistributing the load to avoid bottlenecks; for servers with low resource utilization, some tasks can be migrated to these idle nodes, thereby improving overall resource utilization and reducing energy consumption costs.
[0040] Step 104: Execute real-time dynamic allocation of computing resources to the server according to the resource allocation policy.
[0041] In some examples, resource allocation can be dynamically adjusted through the resource scheduling module. Specifically, this may include: dynamically allocating CPU cores through the BMC's CPU affinity settings (such as the Linux taskset command) to bind different tasks to specific CPU cores; dividing the dynamic memory pool in the BMC memory and allocating memory blocks according to task requirements (such as large blocks of memory for logging tasks and small blocks of memory for sensor tasks); and reserving bandwidth for high-priority tasks (such as remote control) through traffic shaping algorithms.
[0042] In some examples, the monitoring and feedback module can also monitor resource allocation in real time and feed this data back to the AI model module. This includes statistics on actual CPU, memory, and bandwidth usage to monitor resource utilization; recording the time it takes for tasks to be submitted and completed to monitor task execution latency; and collecting real-time power consumption data through the BMC's power consumption sensor to generate power consumption statistics. The entire system continuously optimizes resource allocation strategies through a closed-loop feedback mechanism to ensure an optimal balance between high performance and low power consumption.
[0043] Compared with the related art, this embodiment first obtains the hardware status data of the server, the task queue data of the data processing task corresponding to the server, and the timestamp data of the data processing task; then inputs the hardware status data, task queue data, and timestamp data into the target resource prediction model to predict the resource utilization rate corresponding to the server executing the data processing task within a preset time period; then, based on the resource utilization rate, generates a resource allocation policy corresponding to the server; and according to the resource allocation policy, performs real-time dynamic allocation of the server's computing resources. Compared with the current related art, by collecting the server's hardware status data, task queue data, and timestamp data in real time and inputting these multi-dimensional data into the target resource prediction model, an accurate prediction of the resource utilization rate within a future preset time period is achieved, and then the optimal resource allocation policy is automatically generated based on the prediction results, and the computing resources of the server are dynamically scheduled in real time accordingly. It can flexibly adjust resource configuration according to actual load changes, significantly improve resource utilization, reduce resource waste, and at the same time ensure task execution efficiency and service quality, thereby improving the intelligent management level and operational efficiency of the system.
[0044] As a refinement of this embodiment, the hard disk installation position can be determined by, but not limited to, the following methods: Figure 3 As shown, Figure 3 A schematic flow chart of a server resource allocation method provided in an embodiment of the present disclosure includes:
[0045] Step 201: Obtain hardware status data of the server, task queue data of the data processing task corresponding to the server, and timestamp data of the data processing task.
[0046] For example, Figure 4 The data acquisition module can collect BMC load data (including hardware status data, task queue data, and timestamp data, etc.) in real time with a period of 1 second, clean and normalize the raw data, eliminate sensor outliers, and generate a standardized feature vector F = [f1, f2, ..., fn].
[0047] Step 202: Input the hardware status data, task queue data, and timestamp data into a target resource prediction model to predict resource utilization corresponding to the server executing the data processing task within a preset time period.
[0048] For example, by inputting the feature vector into the LSTM model, the CPU, memory, and bandwidth requirements D = [DCPU, DMemory, DBandwidth] can be predicted in the next 5 minutes.
[0049] Optionally, the training process of the above-mentioned target resource prediction model may specifically include: obtaining historical load data of the server; dividing the historical load data into a training set and a test set; using a long short-term memory network to perform model training based on the load sequence composed of the historical load data in the training set to obtain the original resource prediction model; using the test set to verify the original resource prediction model and obtain the target resource prediction model.
[0050] For example, Figure 5 As shown, one month of load data is first extracted from historical BMC logs and divided into training and test sets in a 7:3 ratio. An LSTM model is then trained, using the load sequence for the past 10 minutes as input and the predicted value for the next 5 minutes as output. The mean squared error (MSE) loss function is used to optimize prediction accuracy. Simultaneously, reinforcement learning training defines the state space (current resource utilization), action space (resource allocation strategy), and reward function (increased resource utilization and reduced power consumption) to further optimize resource allocation decisions. Finally, the trained LSTM and reinforcement learning models are converted to TensorFlow Lite format for efficient deployment on the BMC's AI accelerator. The model inference cycle is set to 1 minute to ensure real-time response and dynamic adjustment of resource allocation strategies.
[0051] Step 203: Obtain the processor configuration of the server and the task type of the data processing task.
[0052] For example, a server's processor configuration information may include hardware features such as the CPU model, number of cores, main frequency, cache size, and support for hyperthreading and dynamic frequency scaling (DVFS). It also identifies the type of data processing task currently being executed, such as compute-intensive, memory-intensive, or input / output (I / O)-intensive. Through a comprehensive analysis of processor capabilities and task requirements, the system can more accurately schedule resources and optimize performance, ensuring that tasks meet latency and throughput requirements while improving overall operational efficiency and energy efficiency.
[0053] Step 204: Generate a resource allocation strategy using a reinforcement learning algorithm based on resource utilization, processor configuration, and task type.
[0054] Among them, resource allocation strategies are used for dynamic allocation of processor cores in servers, memory partition management, and bandwidth priority control.
[0055] In some examples, reinforcement learning (Q-learning algorithm) can be used to generate resource allocation strategies to maximize resource utilization and minimize power consumption. The reinforcement learning model generates a corresponding resource allocation strategy S = {number of CPU cores, memory size, bandwidth reservation value} based on the predicted demand output by the target resource prediction model.
[0056] Step 205: Execute real-time dynamic allocation of computing resources to the server according to the resource allocation policy.
[0057] For example, by real-time monitoring of the server's operating status, including key indicators such as current task load, resource utilization, and task priority, and combining AI prediction models to judge the changing trend of resource demand, the allocation of server computing resources (such as the number of CPU cores, memory capacity, bandwidth allocation, etc.) is dynamically adjusted to ensure that high-priority tasks or emergency tasks can obtain sufficient computing resources in a timely manner, while avoiding idle resources during low-load periods, thereby improving overall resource utilization efficiency.
[0058] Optionally, the method of this embodiment may further specifically include: dynamically adjusting the resource allocation strategy by real-time monitoring the resource allocation effect corresponding to the computing resources of the server.
[0059] For example, the monitoring module can calculate the actual resource utilization rate Uactual and compare it with the predicted value D to calculate the error E = |Uactual-D|. If the error E exceeds 10%, the online learning mechanism is triggered to update the LSTM model weights with new data to improve prediction accuracy, forming a closed-loop feedback loop and continuously optimizing the resource allocation strategy, ultimately achieving the goal of efficient utilization of server resources.
[0060] Optionally, the above-mentioned dynamic adjustment of resource allocation strategy by real-time monitoring of resource allocation effect corresponding to the computing resources of the server may specifically include: obtaining the actual resource utilization rate, task execution delay time and real-time power consumption data of the server during the data processing task; and dynamically adjusting the resource allocation strategy based on the actual resource utilization rate, task execution delay time and real-time power consumption data.
[0061] In some examples, by collecting key performance indicators of the server during the execution of data processing tasks in real time, including actual resource utilization (such as CPU, memory, bandwidth), task execution delay time, and real-time power consumption data, the system operation status is fully reflected. Based on these multi-dimensional real-time data, the resource allocation strategy is dynamically adjusted, such as increasing or decreasing the number of CPU cores, adjusting the memory allocation ratio, adjusting the bandwidth priority, etc., to achieve rapid response to load changes and optimal resource configuration. This not only improves resource utilization efficiency and task processing performance, but also effectively controls system power consumption, thereby achieving the unity of high efficiency and low power consumption while ensuring service quality.
[0062] In some embodiments, the hardware configuration utilizes the ASPEED AST2600 BMC chip, equipped with a dedicated AI acceleration core for running AI models. The main CPU uses an Intel Xeon Silver 4310, with two cores allocated for BMC use. 4GB of DDR4 memory is reserved for the BMC, supporting dynamic partitioning to optimize memory utilization. By applying dynamic resource allocation strategies, significant performance improvements and energy efficiency optimizations have been demonstrated: CPU utilization increased from 45% with static allocation to 68%, and memory waste was reduced by 40%. Overall BMC power consumption was reduced by 18% (from 12W to 9.8W). The average response latency of remote control tasks also decreased from 120ms to 85ms, effectively improving server management efficiency and resource utilization.
[0063] Through the AI model (LSTM+reinforcement learning), real-time load prediction is achieved, and key resources such as CPU, memory, and bandwidth are dynamically allocated according to the prediction results, effectively avoiding resource idleness during low load and system overload during high load. At the same time, combined with dynamic voltage and frequency regulation and task priority scheduling mechanism, on-demand resource allocation is further realized and ineffective power consumption is reduced. Actual test data shows that this embodiment has achieved significant technical effects after implementation: CPU utilization has increased from the original 45% to 68%, memory waste has been reduced by 40%, and overall power consumption has been reduced by 18%, greatly improving the system's energy efficiency and resource utilization efficiency.
[0064] Optionally, step 205 may specifically include: determining a dynamic voltage and frequency adjustment mode and a task priority scheduling mechanism based on a resource allocation strategy; and allocating computing resources according to actual requirements of data processing tasks in combination with the dynamic voltage and frequency adjustment mode and the task priority scheduling mechanism.
[0065] For example, resources can be dynamically allocated based on the predicted results: if the predicted CPU demand (DCPU) exceeds 80%, one CPU core is added; if it falls below 30%, one core is removed. Regarding memory allocation, high-priority tasks (such as logging) are reserved with a fixed amount of memory (e.g., 512MB), while the remaining memory is dynamically allocated on demand. Regarding bandwidth, a weighted fair queuing (WFQ) algorithm is used to ensure that the remote control task receives 50% of the bandwidth, while the remaining tasks share the remaining bandwidth.
[0066] Optionally, the method of this embodiment may further specifically include: using a resource prediction model to predict potential emergency tasks, where emergency tasks include hardware alarm tasks and remote request tasks; reserving emergency computing resources for the server based on the prediction results, and dynamically adjusting the task priorities of multiple data processing tasks and emergency tasks according to the urgency of the tasks; optimizing the queuing and execution order of multiple data processing tasks and emergency tasks based on the task priorities and the real-time load data of the server.
[0067] For example, based on the prediction results of sudden tasks (such as hardware alarms and remote requests), sufficient emergency computing resources (such as CPU computing power, memory bandwidth, etc.) can be reserved for the server to ensure that the required resources can be quickly obtained when sudden tasks arrive. At the same time, according to the urgency of the task, the execution priority between multiple regular data processing tasks and sudden tasks is dynamically adjusted to build a flexible task scheduling mechanism. On this basis, combined with the real-time load data of the current server (such as CPU utilization, memory usage, task queue length, etc.), the queuing order and execution strategy of various tasks are further optimized to ensure that high-priority tasks can be processed in a timely manner, thereby significantly improving the system's real-time response capability and task scheduling efficiency.
[0068] In some embodiments, when a server's edge computing node receives a burst of video analysis tasks, the AI model can predict the increase in bandwidth demand and dynamically increase the BMC bandwidth from 1Gbps to 2.5Gbps to meet the high load. After the task is completed, the bandwidth resources are automatically released to ensure efficient resource utilization. Verification has shown that this mechanism speeds up burst tasks by 25% without impacting other BMC tasks such as temperature monitoring. This demonstrates that this embodiment not only enhances the server's ability to cope with burst loads, but also maintains system stability and reliability.
[0069] AI models are used to predict emergencies (such as hardware alarms and remote requests) in advance, reserve emergency resources before the task arrives, dynamically adjust task priorities, and improve system responsiveness. The resource scheduling module uses containerized isolation and real-time task queue management mechanisms to ensure that critical tasks receive priority execution and resource guarantees, thereby significantly improving task processing efficiency. Actual test data shows that this solution reduces the average latency of remote control tasks from 120ms to 85ms, a 30% reduction in latency; the resource allocation delay for emergencies is also significantly reduced, by 50%, effectively enhancing the real-time and stability of the system.
[0070] Compared with the current related technologies, this embodiment adopts a BMC dynamic resource allocation method based on LSTM and reinforcement learning, covering the complete process from data collection, model prediction, dynamic scheduling to feedback optimization. First, the BMC hardware architecture with integrated AI accelerator supports efficient model reasoning and real-time resource scheduling. The architecture includes functions such as dedicated AI cores and dynamic memory partitioning. In terms of model design, the LSTM model is trained with sensor data, task type, and timestamp as input features, while the reward function of reinforcement learning is designed based on resource utilization weights and power consumption weights, aiming to optimize the overall system performance. In addition, in order to ensure the continuous accuracy and adaptability of the model, an online learning trigger condition based on an error threshold is set, and an incremental learning method is adopted so that the system can automatically update the model parameters when specific conditions are met, thereby maintaining the best operating state, which not only improves resource utilization efficiency and response speed, but also ensures the stability and flexibility of the system.
[0071] The embodiment of the present application also provides a resource allocation device for a server, as Figure 1 The specific implementation of the method shown is as follows Figure 6 As shown, the device includes: an acquisition module 31, a prediction module 32, a generation module 33, and an execution module 34.
[0072] An acquisition module 31 is configured to acquire hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task;
[0073] The prediction module 32 is configured to input the hardware status data, the task queue data and the timestamp data into a target resource prediction model to predict the resource utilization rate corresponding to the execution of the data processing task by the server within a preset time period;
[0074] A generating module 33 is configured to generate a resource allocation policy corresponding to the server based on the resource utilization;
[0075] The execution module 34 is configured to execute real-time dynamic allocation of computing resources of the server according to the resource allocation policy.
[0076] In some examples of this embodiment, the generation module 33 is specifically configured to obtain the processor configuration of the server and the task type of the data processing task; based on the resource utilization, the processor configuration and the task type, the resource allocation strategy is generated using a reinforcement learning algorithm, and the resource allocation strategy is used for dynamic allocation of processor cores in the server, memory partition management and bandwidth priority control.
[0077] In some examples of this embodiment, the prediction module 32 is specifically configured to obtain historical load data of the server; divide the historical load data into a training set and a test set; perform model training using a long short-term memory network based on a load sequence composed of historical load data in the training set to obtain an original resource prediction model; and perform verification training on the original resource prediction model using the test set to obtain the target resource prediction model.
[0078] In some examples of this embodiment, the execution module 34 is specifically configured to dynamically adjust the resource allocation strategy by monitoring the resource allocation effect corresponding to the computing resources of the server in real time.
[0079] In some examples of this embodiment, the execution module 34 is further configured to obtain the actual resource utilization, task execution delay time and real-time power consumption data of the server during the data processing task; and dynamically adjust the resource allocation strategy based on the actual resource utilization, the task execution delay time and the real-time power consumption data.
[0080] In some examples of this embodiment, the execution module 34 is further configured to determine a dynamic voltage and frequency adjustment mode and a task priority scheduling mechanism based on the resource allocation strategy; and allocate the computing resources according to the actual needs of the data processing task in combination with the dynamic voltage and frequency adjustment mode and the task priority scheduling mechanism.
[0081] In some examples of this embodiment, the execution module 34 is further configured to use the resource prediction model to predict potential emergency tasks, wherein the emergency tasks include hardware alarm tasks and remote request tasks; reserve emergency computing resources for the server based on the prediction results, and dynamically adjust the task priorities of multiple data processing tasks and the emergency tasks according to the urgency of the tasks; and optimize the queuing and execution order of the multiple data processing tasks and the emergency tasks based on the task priorities and the real-time load data of the server.
[0082] It should be noted that for other corresponding descriptions of the functional units involved in the resource allocation device of a server provided in this embodiment, please refer to Figure 1 The corresponding description in will not be repeated here.
[0083] Based on the above Figure 1 and Figure 3 The method shown in FIG. 1 is a method for performing the above-mentioned steps. Accordingly, this embodiment further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned steps are performed. Figure 1 and Figure 3 The method shown.
[0084] Based on the above Figure 1 and Figure 3 The method shown in FIG. 1 is a method for performing the above-mentioned operations. Accordingly, this embodiment further provides a computer program product having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 3 The method shown.
[0085] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0086] Based on the above Figure 1 and Figure 3 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device, such as a personal computer or a server, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 3 The method shown.
[0087] In some embodiments, the physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, etc. The user interface may include a display, an input unit such as a keyboard, etc. Optional user interfaces may also include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc. in some embodiments.
[0088] Those skilled in the art will understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0089] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device, supporting the execution of information processing programs and other software and / or programs. The network communication module is used to enable communication between components within the storage medium, as well as with other hardware and software within the physical information processing device.
[0090] Through the above description of the implementation methods, those skilled in the art will clearly understand that this application can be implemented using software plus the necessary general-purpose hardware platform, or through hardware. By applying the solution of this embodiment, compared to current related technologies, this embodiment utilizes an LSTM time series model to predict future load and combines it with reinforcement learning to dynamically generate resource allocation strategies to achieve real-time adaptive adjustment. The LSTM model input includes real-time sensor data and task queue status, and the output is resource demand within a preset time period in the future. Reinforcement learning optimizes resource utilization and power consumption, generating dynamic scheduling strategies such as the number of CPU cores and memory allocation ratio. In addition, through a real-time feedback and online learning closed-loop system that differs from traditional fixed resource allocation strategies, this embodiment can provide real-time feedback on actual resource utilization errors through the monitoring module. When the error exceeds a set threshold, the online learning mechanism is triggered, automatically updating the model weights and supporting incremental learning to adapt to long-term load changes and hardware expansion. This solution is not only applicable to server management, but can also be extended to mobile network fields such as 5G base stations, edge computing, and network slicing. In this case, the data input is replaced with information such as wireless channel status, user location, and service type, and the resource objects are expanded from CPU / memory to spectrum, power, and virtualized resources.
[0091] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.
[0092] The above are merely specific embodiments of the present application, which are intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but rather is intended to conform to the widest scope consistent with the principles and novel features of the present application.
Claims
1. A method for allocating server resources, characterized in that: include: Obtaining hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task; Inputting the hardware status data, the task queue data and the timestamp data into a target resource prediction model to predict resource utilization corresponding to the execution of the data processing task by the server within a preset time period; Based on the resource utilization, generating a resource allocation policy corresponding to the server; According to the resource allocation policy, real-time dynamic allocation of computing resources to the server is performed.
2. The method according to claim 1, characterized in that Generating a resource allocation policy corresponding to the server based on the resource utilization includes: Acquiring the processor configuration of the server and the task type of the data processing task; The resource allocation strategy is generated using a reinforcement learning algorithm based on the resource utilization, the processor configuration, and the task type. The resource allocation strategy is used for dynamic allocation of processor cores, memory partition management, and bandwidth priority control in the server.
3. The method according to claim 1, characterized in that The training process of the target resource prediction model includes: Obtaining historical load data of the server; Dividing the historical load data into a training set and a test set; Based on the load sequence composed of the historical load data in the training set, a long short-term memory network is used to perform model training to obtain an original resource prediction model; The original resource prediction model is verified and trained using the test set to obtain the target resource prediction model.
4. The method according to claim 1, wherein After executing the real-time dynamic allocation of computing resources of the server according to the resource allocation policy, the method further includes: By monitoring the resource allocation effect corresponding to the computing resources of the server in real time, the resource allocation strategy is dynamically adjusted.
5. The method according to claim 4, characterized in that The dynamically adjusting the resource allocation strategy by real-time monitoring of the resource allocation effect corresponding to the computing resources of the server includes: Obtaining actual resource utilization, task execution delay time, and real-time power consumption data of the server during the data processing task; The resource allocation strategy is dynamically adjusted based on the actual resource utilization, the task execution delay time and the real-time power consumption data.
6. The method according to claim 1, characterized in that The performing of real-time dynamic allocation of computing resources of the server according to the resource allocation strategy includes: Determining a dynamic voltage and frequency adjustment mode and a task priority scheduling mechanism based on the resource allocation strategy; In combination with the dynamic voltage and frequency adjustment mode and the task priority scheduling mechanism, the computing resources are allocated according to the actual requirements of the data processing task.
7. The method according to claim 6, characterized in that The method further comprises: Using the resource prediction model to predict potential emergency tasks, the emergency tasks include hardware alarm tasks and remote request tasks; Reserving emergency computing resources for the server based on the prediction results, and dynamically adjusting the task priorities of multiple data processing tasks and the emergency tasks based on the urgency of the tasks; The queuing and execution order of the multiple data processing tasks and the burst tasks are optimized according to the task priorities and the real-time load data of the server.
8. A resource allocation device for a server, characterized in that: include: an acquisition module configured to acquire hardware status data of a server, task queue data of a data processing task corresponding to the server, and timestamp data of the data processing task; a prediction module configured to input the hardware status data, the task queue data, and the timestamp data into a target resource prediction model to predict resource utilization corresponding to the server executing the data processing task within a preset time period; A generating module is configured to generate a resource allocation policy corresponding to the server based on the resource utilization; The execution module is configured to execute real-time dynamic allocation of computing resources of the server according to the resource allocation policy.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Server test method and device, storage medium and computer program product
CN120687266A
Resource metering method and device, electronic equipment and storage medium
CN120750683A
Server task allocation method and device, electronic equipment and storage medium
CN120762919A
Server network state dynamic adjustment method and device, equipment and storage medium
CN120896852A
Dynamic storage resource allocation method and system based on artificial intelligence
CN121029429A