Server resource utilization rate improving method, system, device, medium and product
By establishing a resource prediction model and dynamically adjusting the server's constraint variables and resource slicing allocation, the problem of low resource utilization in the existing technology is solved, and more flexible and adaptive resource management is achieved, meeting real-time needs.
Patent Information
- Application Number
- CN202411360703.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, the static resource management control method cannot make real-time adjustments based on the actual usage and requirements of server resources, resulting in low resource utilization.
By establishing a resource prediction model, using machine learning technology to predict resource requirements in the target time period based on historical data, dynamically adjust the server's constraint variables, such as CPU usage and memory usage, reevaluate and adjust the resource allocation of resource slices, and ensure resources Distribute according to actual needs.
It improves the utilization rate of server resources, avoids resource waste and over-allocation, and makes cloud server management more flexible and adaptable, and can meet changing application needs and real-time resource usage.
Smart Images

Figure CN119292776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, device, medium and product for improving server resource utilization. Background Art
[0002] In related technologies, cloud server resource utilization solutions usually adopt static resource management control methods, which set a series of thresholds or rules. When the server resource usage exceeds these thresholds or rules, the system will automatically adjust the resources to meet the needs of the application and maintain the stable operation of the system. This solution can improve the resource utilization of the server while ensuring the stability and reliability of the system.
[0003] However, static preset rules or simple threshold adjustments cannot be adjusted in real time according to the actual usage and demand of server resources. Therefore, how to adjust server resources more effectively has become an urgent problem to be solved in the industry. Summary of the invention
[0004] The present invention provides a method, system, device, medium and product for improving the utilization rate of server resources, so as to solve the defect of how to more effectively adjust the server resources in the prior art.
[0005] The present invention provides a method for improving server resource utilization, comprising the following steps: Based on the historical resource usage data of the server, the machine learning model is trained to establish a resource prediction model; According to the resource prediction model, the resource demand of the server in the target time period is predicted, and the constraint variables of the server are dynamically adjusted according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0006] According to the dynamically adjusted constraint variables, the resource requirements of each server resource slice are re-evaluated to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0007] According to a method for improving server resource utilization provided by the present invention, after the step of re-evaluating the resource requirements of each server resource slice according to the dynamically adjusted constraint variable, and dynamically adjusting the resource allocation of each server resource slice according to the re-evaluated resource requirements, the method further includes: Obtain actual server usage data within the target time period; The resource prediction model is updated according to actual server usage data within a target time period and resource requirements of the resource prediction model within the target time period.
[0008] According to a method for improving server resource utilization provided by the present invention, after the step of updating the resource prediction model according to actual server usage data within a target time period and the resource demand of the resource prediction model within the target time period, the method further includes: Re-evaluate the resource requirements of each server resource slice based on the updated resource prediction model; And according to the re-evaluated resource requirements, adjust the resource allocation and priority of each server resource slice.
[0009] According to a method for improving server resource utilization provided by the present invention, a machine learning model is trained based on historical resource usage data of the server to establish a resource prediction model, including: Get the initial historical resource usage data of the server; Performing data cleaning, sorting and standardization on the initial historical resource usage data to obtain initialized historical resource usage data; Extracting features related to server performance and resource usage from the initialized historical resource usage data to obtain historical resource usage data, wherein the historical resource usage data includes at least one of the following: CPU historical data, memory historical data, and network bandwidth historical data; The historical resource usage data is learned through a preset model to establish a resource prediction model.
[0010] According to a method for improving server resource utilization provided by the present invention, the historical resource usage data is learned through a preset model to establish a resource prediction model, including: When the preset model is a linear fitting and regression model, the historical resource usage data is used as the input of the linear regression model, and the historical resource usage data is fitted by the least squares method to establish a resource prediction model.
[0011] The present invention also provides a server resource utilization improvement system, comprising: The machine learning module is used to train the machine learning model and establish a resource prediction model based on the historical resource usage data of the server; A resource prediction module is used to predict the resource demand of the server within the target time period according to the resource prediction model, and dynamically adjust the constraint variables of the server according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0012] A constraint adjustment module is used to re-evaluate the resource requirements of each server resource slice according to the dynamically adjusted constraint variables, so as to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0013] According to a server resource utilization improvement system provided by the present invention, the system is also used for: Get the initial historical resource usage data of the server; Performing data cleaning, sorting and standardization on the initial historical resource usage data to obtain initialized historical resource usage data; Extracting features related to server performance and resource usage from the initialized historical resource usage data to obtain historical resource usage data, wherein the historical resource usage data includes at least one of the following: CPU historical data, memory historical data, and network bandwidth historical data; The historical resource usage data is learned through a preset model to establish a resource prediction model.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above methods for improving server resource utilization is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the server resource utilization improvement method described in any one of the above methods is implemented.
[0016] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method for improving server resource utilization as described above is implemented.
[0017] The server resource utilization improvement method, system, device, medium and product provided by the present invention establish a resource prediction model through online learning, and then predict the resource demand of the server in the target time period, divide the specified amount of slice resources according to the classification strategy, and limit the resource use of each slice according to the constraint variables, so that each application can obtain sufficient resources, ensure that resources are allocated according to actual needs, avoid waste and over-allocation of resources, thereby improving resource utilization, making the management and optimization of cloud servers more flexible and adaptive. By dynamically adjusting the constraint variables of the server, the server can achieve more flexible and adaptive resource management to meet the ever-changing application needs and real-time resource usage. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flow chart of a method for improving server resource utilization provided in an embodiment of the present application.
[0020] Figure 2 A flow chart of a server resource allocation method provided in an embodiment of the present application.
[0021] Figure 3 A schematic diagram of the server resource utilization improvement system provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0023] Figure 1 A flow chart of a method for improving server resource utilization provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including: Step 110, training a machine learning model based on historical resource usage data of the server to establish a resource prediction model; Collect historical resource usage data of the server in different time periods, including but not limited to CPU usage, memory usage, disk I / O, network traffic, etc. Clean the collected data, including removing outliers, filling missing data, and data standardization, to improve data quality.
[0024] Extract useful features from the preprocessed data, which may include time (such as hour of the day, day of the week), historical resource usage patterns, server load, etc. Select appropriate machine learning algorithms (such as linear regression, decision tree, random forest, neural network, etc.) to build a prediction model. Train the selected machine learning model using historical data and minimize the prediction error by adjusting the model parameters.
[0025] In an embodiment of the present application, historical data is analyzed to predict resource usage of the server in a future time period so that resource allocation decisions can be made in advance.
[0026] Step 120: predict the resource demand of the server within the target time period according to the resource prediction model, and dynamically adjust the constraint variables of the server according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0027] In an embodiment of the present application, the resource prediction model established by the above steps is used to predict the resource demand of the server within a target time period (such as the next hour, day or week).
[0028] Based on the forecast results, analyze the resource pressure that the server may face during the target time period, especially for key resources such as CPU and memory. Based on the resource demand forecast, dynamically adjust the server's constraint variables, such as increasing the CPU usage constraint or memory usage constraint, to reserve enough resources to cope with the predicted high load.
[0029] Step 130, re-evaluate the resource requirements of each server resource slice according to the dynamically adjusted constraint variables, so as to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0030] In the embodiment of the present application, the server resources are divided into multiple logical units according to the resource allocation strategy, and each unit (resource slice) can be independently allocated to different applications or services. After the constraint variables are adjusted, the resource requirements of each resource slice are re-evaluated, taking into account the predicted resource requirements and the current resource usage.
[0031] Dynamically adjust resource allocation for each resource slice based on reassessed resource requirements. This may include increasing or decreasing the number of CPU cores, memory capacity, storage space, or network bandwidth allocated to a specific slice. In the case of limited resources, assign different priorities to each resource slice based on its importance and business needs to ensure that critical businesses receive adequate resource support.
[0032] Apply the adjusted resource allocation plan to the server and continuously monitor resource usage and system performance to ensure the effectiveness of the resource allocation plan and the stability of the system.
[0033] In the embodiment of the present application, a resource prediction model is established through online learning to predict the resource demand of the server within the target time period, and a specified amount of slice resources is divided according to the classification strategy, and the resource usage of each slice is limited according to the constraint variables, so that each application can obtain sufficient resources, ensure that resources are allocated according to actual needs, avoid waste and over-allocation of resources, thereby improving resource utilization and making the management and optimization of cloud servers more flexible and adaptive. By dynamically adjusting the constraint variables of the server, the server can achieve more flexible and adaptive resource management to meet the ever-changing application needs and real-time resource usage.
[0034] Optionally, after the step of re-evaluating the resource requirements of each server resource slice according to the dynamically adjusted constraint variable, and dynamically adjusting the resource allocation of each server resource slice according to the re-evaluated resource requirements, the method further includes: Obtain actual server usage data within the target time period; The resource prediction model is updated according to actual server usage data within a target time period and resource requirements of the resource prediction model within the target time period.
[0035] In the embodiment of the present application, the actual resource usage data of the server in the target time period is collected for comparison and analysis with the prediction results of the prediction model. The collected data includes but is not limited to key performance indicators such as CPU usage, memory usage, disk I / O, network traffic, etc.
[0036] Use monitoring tools or built-in resource management tools to track and record server resource usage in real time. Store the collected data in log files or databases for subsequent analysis and model updates.
[0037] More specifically, based on the differences between actual usage data and forecast data, the resource forecast model is adjusted and optimized to improve the accuracy and reliability of the model.
[0038] Compare the actual usage data of the server during the target time period with the prediction results of the resource prediction model and analyze the differences between the two. Based on the results of the comparative analysis, adjust the parameters or algorithm of the resource prediction model. This may include modifying the weights of the machine learning model, adjusting the hyperparameters of the algorithm, or reselecting features.
[0039] Retrain the resource prediction model with updated data and parameters to ensure that the model can more accurately reflect the resource usage of the server. Verify the performance of the updated model through cross-validation or using an independent test dataset to ensure the accuracy and generalization ability of the model.
[0040] Continuously monitor the resource usage of the server and collect new data to continuously update and optimize the resource prediction model. Then establish a feedback mechanism to feed the results of the model update back to the resource allocation strategy so as to dynamically adjust resource allocation and achieve more efficient resource management.
[0041] Regularly evaluate the performance of resource forecasting models and resource allocation strategies to ensure that they meet business needs and system performance goals. You can also automate the above steps to reduce manual intervention and improve efficiency and responsiveness.
[0042] In the embodiments of the present application, server resource management can not only dynamically respond to current resource requirements, but also adapt to future changes through continuous learning and optimization, thereby achieving more efficient and intelligent resource management. This continuous optimization and feedback mechanism is the key to ensuring maximum server resource utilization and optimal system performance.
[0043] Optionally, a machine learning model is trained based on historical resource usage data of the server to establish a resource prediction model, including: Get the initial historical resource usage data of the server; Performing data cleaning, sorting and standardization on the initial historical resource usage data to obtain initialized historical resource usage data; Extracting features related to server performance and resource usage from the initialized historical resource usage data to obtain historical resource usage data, wherein the historical resource usage data includes at least one of the following: CPU historical data, memory historical data, and network bandwidth historical data; The historical resource usage data is learned through a preset model to establish a resource prediction model.
[0044] In the embodiment of the present application, the resource usage records of the server over a period of time are collected, and these data will serve as the basis for training the machine learning model. They usually include CPU usage, memory usage, disk I / O, network traffic, etc. They can be obtained through the server's monitoring system, log files, or special data collection tools.
[0045] More specifically, it can remove errors, duplications, or incomplete records in the data to ensure data accuracy. It can arrange the data in a time series or other logical order to facilitate analysis. It can convert the data into a unified format or scale so that data from different sources or types can be compared and processed fairly.
[0046] In the present application embodiment, it is necessary to identify which data features are most critical for predicting server resource usage. Common features include peak and average CPU usage, memory usage patterns, high and low peaks of network traffic, etc.
[0047] This may include creating new features, transforming the form of features (such as extracting trend and seasonal components from time series data), or encoding features (such as one-hot encoding).
[0048] The historical resource usage data is learned through the preset model, and the appropriate machine learning model is selected according to the nature of the problem and the characteristics of the data. Possible models include linear regression, decision tree, random forest, neural network, etc.
[0049] Evaluate the model's predictive performance and generalization ability by splitting the dataset into training and test sets or using methods such as cross-validation.
[0050] For example, if you choose linear regression to build a resource prediction model, you need to select features related to resource usage before using it, such as time, server type, operating system type, etc. These features will be used as inputs to the linear regression model, which fits historical data to build a resource prediction model. The linear regression model assumes that there is a linear relationship between the dependent variable and the independent variable, that is, the relationship between the input variable and the output variable; Among them, the parameters of the linear regression model are estimated using statistical methods such as the least squares method. The least squares method finds the best fit line by minimizing the difference between the actual observed values and the model's predicted values; Specifically, the formula of the linear regression model is: y = ax + b, where y is the output variable, x is the input variable, a is the slope, and b is the intercept; The goal of the least squares method is to find a and b so that the sum of the squared differences between the actual observations and the model predictions is minimized; expressed mathematically, the objective function of the least squares method is: J(a, b) = Σ[(y_i - (ax_i + b))^2]; J'(a) = Σ[2*(y_i - (ax_i + b))(x_i - Σ[x_j] / n)]
[0051] J'(b) = Σ[2(y_i - (ax_i + b))]
[0052] Among them, Σ represents the summation symbol, y_i is the output variable of the i-th observation, and x_i is the input variable of the i-th observation.
[0053] In an optional embodiment, the resource requirements of each server resource slice are re-evaluated according to the dynamically adjusted constraint variables, so as to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements. A weight allocation method can be used to assign different weights to each slice according to its importance and criticality. Slices with higher weights will be given higher priorities, and slice priorities correspond to the application priority of the slice, that is, the demand and importance of the application to allocate resources. The weight allocation formula used is: Priority = w1 * (R / S) + w2 * (B / S) + w3 * (Q / S); Among them, w1, w2, and w3 are weight coefficients, indicating the importance of each evaluation indicator, R represents resource demand, S represents the number of slices, B represents resource bottleneck, and Q represents service quality.
[0054] In the above method and system, a feedback mechanism needs to be established, and polynomial regression can be used to establish the feedback mechanism. Polynomial regression is a method for predicting the value of a dependent variable by fitting a polynomial equation; The general form of polynomial regression is: y = β0 + β1 * x + β2 * x^2 + ... + βn * x^n
[0055] Where y is the dependent variable, x is the independent variable, β0, β1, ..., βn are the coefficients of the polynomial, and n is the order of the polynomial.
[0056] When establishing a feedback mechanism, the actual operation data of the server can be used as the independent variable x. Specifically, x can be the data of resource usage such as the CPU usage rate, memory usage rate, network bandwidth, etc. of the server, or other variables that can reflect the operation status of the server; the resource demand or classification strategy that needs to be predicted or adjusted can be used as the dependent variable y. Specifically, in step S5, y can be the resource demand, performance index, or other variables related to resource management and system performance of the server. Then, a polynomial regression model is fitted using historical data to obtain the coefficients β0, β1,... βn of the polynomial.
[0057] Figure 2 A flow chart of the server resource allocation method provided in the embodiment of the present application is as follows: Figure 2 As shown, including: Step 1: Establish a cloud server model and resource prediction model: collect historical server resource usage data; use machine learning models (such as neural networks, support vector machines, etc.) to learn historical data and establish a resource prediction model; This step may specifically include: Collect data: Collect historical resource usage data of cloud servers, including CPU, memory, network bandwidth, etc. This data can be obtained through monitoring tools or log files; Data preprocessing: Clean, organize and standardize the collected data to eliminate outliers and missing values and ensure the quality and accuracy of the data; Establish cloud server model: Based on historical data and server configuration information, establish a cloud server model to describe the performance, configuration, and behavior of the server, and provide basic data and reference for resource prediction; Feature extraction: Extract features related to cloud server performance and resource usage from historical data, such as CPU usage, memory usage, network bandwidth, etc. These features can be used as input variables to build models; Model building: Select appropriate machine learning models (such as neural networks, support vector machines, etc.) to learn historical data and build resource prediction models; Step 2: Adjust the constraint variables of the server according to the predicted resources: Based on the resource prediction model, predict the resource demand in the future, and dynamically adjust the constraint variables of the server according to the predicted resource demand. The constraint variables specifically include constraints such as CPU usage and memory usage. Step 3: Adjust the allocation strategy based on the constraint variables: Divide the server resources into multiple slices based on the resource allocation strategy, re-evaluate the resource requirements of each slice based on the adjusted constraint variables, and dynamically adjust the resource allocation of each slice; adjust the resource allocation and priority of the slices based on the new resource requirements; Determine the granularity of the slice: The granularity of the slice needs to be determined, that is, the amount of resources contained in each slice; the granularity is determined based on factors such as business needs, system scale, and performance requirements; Calculate the resource requirements of each slice: Based on the prediction model, calculate the required CPU, memory, storage and other resources according to the business requirements and historical resource usage of each slice; Step 4: Adjust the classification strategy in real time based on real-time data: Collect the resource usage data of the server in real time; use online learning technology to update the resource prediction model in real time to reflect the current actual resource usage; adjust the classification strategy in real time based on the real-time data and the updated resource prediction model to ensure the effective use of resources and the stable operation of the system; Step 5: Introduce a feedback mechanism: Establish a feedback mechanism so that the actual operation of the server can affect the adjustment of the resource prediction model and the allocation strategy; through the feedback mechanism, continuously optimize and adjust the model and strategy to achieve more refined resource management and optimization; This step may specifically include: Collect feedback data: Collect the actual operation data of the server, including CPU usage, memory usage, network bandwidth usage, etc. Establish feedback model: Use machine learning models (such as neural networks, support vector machines, etc.) to learn feedback data and establish feedback models; feedback models can predict the actual operation of servers and adjust resource prediction models and classification strategies based on the prediction results; Adjust the resource prediction model: According to the prediction results of the feedback model, adjust the parameters or weights of the resource prediction model to make it closer to the actual operation situation; Adjust the allocation strategy: Re-evaluate the resource requirements of each slice based on the adjusted resource forecast model, and adjust the resource allocation and priority of the slices.
[0058] Step 6: Continuous learning and optimization: Continuously collect new data, update and optimize resource forecasting models; continuously improve and optimize classification strategies based on actual operating conditions and feedback mechanisms.
[0059] The server resource utilization improvement device provided by the present invention is described below. The server resource utilization improvement device described below and the server resource utilization improvement method described above can be referenced to each other.
[0060] Figure 3 A schematic diagram of the server resource utilization improvement system structure provided in the embodiment of the present application is as follows: Figure 3 As shown, including: The machine learning module 310 is used to train the machine learning model based on the historical resource usage data of the server and establish a resource prediction model; The resource prediction module 320 is used to predict the resource demand of the server within the target time period according to the resource prediction model, and dynamically adjust the constraint variables of the server according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint; The constraint adjustment module 330 is used to re-evaluate the resource requirements of each server resource slice according to the dynamically adjusted constraint variables, so as to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on the resource allocation strategy.
[0061] The cloud server resource utilization improvement system of the present invention is based on the above method and includes: a cloud native platform, characterized in that: The cloud native platform is equipped with a data collection module, a machine learning module, a resource prediction module, a constraint adjustment module, a classification strategy module, a learning module, and a feedback module. Data collection module, used to collect historical server resource usage data, including CPU, memory, network bandwidth, etc.; these data will be used to train resource prediction models and subsequent real-time adjustments; The machine learning module uses machine learning models (such as neural networks, support vector machines, etc.) to learn from historical data and build resource prediction models. The machine learning module will be responsible for extracting useful features from historical data and building models to predict future resource needs. It takes historical data as input and learns patterns and trends in the data by training the model. Once the model is trained, it can predict resource needs for a period of time in the future; The resource prediction module, based on the resource prediction model established by the machine learning module, predicts resource demand in the future. The resource prediction module inputs the current system status and historical data into the trained model to obtain the future resource demand prediction results, providing a basis for subsequent constraint adjustment and classification strategies; The constraint adjustment module dynamically adjusts the server's constraint variables based on the predicted resource demand. The constraint adjustment module will adjust the server's CPU usage, memory usage and other constraints based on the predicted resource demand. If the predicted resource demand increases, the CPU usage, memory usage and other constraints can be appropriately increased to adapt to future needs; The classification strategy module re-evaluates the resource requirements of each slice according to the constraint variables adjusted by the constraint adjustment module; adjusts the resource allocation and priority of the slice according to the new resource requirements. The classification strategy module will be responsible for re-evaluating the resource requirements of each slice according to the adjustment of the constraint variables, and adjusting the resource allocation and priority of the slice to achieve efficient use of resources; The learning module collects the server's resource usage data in real time and uses online learning technology to update the resource prediction model in real time to reflect the current actual resource usage. The learning module will be responsible for collecting the server's resource usage data in real time and using online learning technology to update the resource prediction model in real time to reflect the current actual resource usage; The feedback module will be responsible for establishing a feedback mechanism so that the actual operation of the server can affect the adjustment of the resource prediction model and the allocation strategy; through the feedback mechanism, the model and strategy are continuously optimized and adjusted to achieve more refined resource management and optimization. The feedback module will be responsible for establishing a feedback mechanism so that the actual operation of the server can affect the adjustment of the resource prediction model and the allocation strategy, and through the feedback mechanism, the model and strategy are continuously optimized and adjusted; The cloud native platform is also equipped with a monitoring module to monitor the resource usage of the server in real time, including CPU usage, memory usage, network bandwidth, etc. The real-time monitored data is collected and transmitted to the data collection module. The data collection module can obtain this data from the monitoring module regularly or in real time, and process and analyze it. After receiving the data transmitted by the monitoring module, the data collection module will further process and analyze it. This includes operations such as cleaning, sorting, and classifying the data to facilitate subsequent machine learning model training and resource prediction. Feedback and adjustments can be made based on the data monitored by the monitoring module and the results of data processing and analysis. For example, if the CPU usage of the server is found to be too high, the system performance can be optimized by adjusting the classification strategy or increasing server resources. The monitoring module will continuously monitor the resource usage of the server and optimize it according to the actual situation. This includes monitoring, analyzing, and adjusting various indicators of the server to ensure the stable operation of the system and the effective use of resources.
[0062] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a method for improving server resource utilization, the method comprising: training a machine learning model according to the historical resource usage data of the server to establish a resource prediction model; According to the resource prediction model, the resource demand of the server in the target time period is predicted, and the constraint variables of the server are dynamically adjusted according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0063] According to the dynamically adjusted constraint variables, the resource requirements of each server resource slice are re-evaluated to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0064] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0065] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the server resource utilization improvement method provided by the above methods, the method includes: training a machine learning model according to the historical resource usage data of the server to establish a resource prediction model; According to the resource prediction model, the resource demand of the server in the target time period is predicted, and the constraint variables of the server are dynamically adjusted according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0066] According to the dynamically adjusted constraint variables, the resource requirements of each server resource slice are re-evaluated to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0067] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the server resource utilization improvement method provided by the above methods, the method comprising: training a machine learning model based on historical resource usage data of the server to establish a resource prediction model; According to the resource prediction model, the resource demand of the server in the target time period is predicted, and the constraint variables of the server are dynamically adjusted according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint
[0068] According to the dynamically adjusted constraint variables, the resource requirements of each server resource slice are re-evaluated to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
[0069] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0071] 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for improving server resource utilization, characterized in that: include: Based on the historical resource usage data of the server, the machine learning model is trained to establish a resource prediction model; According to the resource prediction model, the resource demand of the server in the target time period is predicted, and the constraint variables of the server are dynamically adjusted according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint According to the dynamically adjusted constraint variables, the resource requirements of each server resource slice are re-evaluated to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
2. The method for improving server resource utilization according to claim 1, characterized in that: After the step of re-evaluating the resource requirements of each server resource slice according to the dynamically adjusted constraint variables to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements, the method further includes: Obtain actual server usage data within the target time period; The resource prediction model is updated according to actual server usage data within a target time period and resource requirements of the resource prediction model within the target time period.
3. The method for improving server resource utilization according to claim 2, characterized in that: After the step of updating the resource prediction model according to the actual usage data of the server within the target time period and the resource demand of the resource prediction model within the target time period, the method further includes: Re-evaluate the resource requirements of each server resource slice based on the updated resource prediction model; And according to the re-evaluated resource requirements, adjust the resource allocation and priority of each server resource slice.
4. The method for improving server resource utilization according to claim 1, characterized in that: Based on the historical resource usage data of the server, the machine learning model is trained to establish a resource prediction model, including: Get the initial historical resource usage data of the server; Performing data cleaning, sorting and standardization on the initial historical resource usage data to obtain initialized historical resource usage data; Extracting features related to server performance and resource usage from the initialized historical resource usage data to obtain historical resource usage data, wherein the historical resource usage data includes at least one of the following: CPU historical data, memory historical data, and network bandwidth historical data; The historical resource usage data is learned through a preset model to establish a resource prediction model.
5. The method for improving server resource utilization according to claim 4, characterized in that: The historical resource usage data is learned through a preset model to establish a resource prediction model, including: When the preset model is a linear fitting and regression model, the historical resource usage data is used as the input of the linear regression model, and the historical resource usage data is fitted by the least squares method to establish a resource prediction model.
6. A server resource utilization improvement system, characterized in that: include: The machine learning module is used to train the machine learning model and establish a resource prediction model based on the historical resource usage data of the server; A resource prediction module is used to predict the resource demand of the server within the target time period according to the resource prediction model, and dynamically adjust the constraint variables of the server according to the resource demand; wherein the constraint variables include at least one of the following: CPU usage constraint, memory usage constraint A constraint adjustment module is used to re-evaluate the resource requirements of each server resource slice according to the dynamically adjusted constraint variables, so as to dynamically adjust the resource allocation of each server resource slice according to the re-evaluated resource requirements; wherein the server resource slices are obtained by dividing server resources based on a resource allocation strategy.
7. The server resource utilization improvement system according to claim 6, characterized in that: The system is also used to: Get the initial historical resource usage data of the server; Performing data cleaning, sorting and standardization on the initial historical resource usage data to obtain initialized historical resource usage data; Extracting features related to server performance and resource usage from the initialized historical resource usage data to obtain historical resource usage data, wherein the historical resource usage data includes at least one of the following: CPU historical data, memory historical data, and network bandwidth historical data; The historical resource usage data is learned through a preset model to establish a resource prediction model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for improving server resource utilization as described in any one of claims 1 to 5 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for improving server resource utilization as claimed in any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for improving server resource utilization as claimed in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Server automatic tuning method and system based on historical data and machine learning
CN117130888A
Cloud platform resource capacity management method and device
CN117768339A
Machine learning-based slice resource dynamic adjustment method and system
CN118540804A
Resource allocation method and apparatus, readable medium, electronic device, and program product
US20230084784A1
Cited By
Digital human driving method and system for museum interaction in combination with large model technology
CN119828896A
Digital Human Driving Method and System for Museum Interaction Combined with Large Model Technology
CN119828896B
Resource allocation method, storage medium, electronic equipment and program product
CN120066798A
Server data processing method, device and system and storage medium
CN120162157A
Dynamic resource optimization method and system based on large model incremental learning
CN120223553A