A method, device, and medium for optimizing server operation status.

By using a sliding time window and machine learning model to dynamically evaluate server load, the problem of static thresholds being unable to adapt to load fluctuations is solved, enabling more accurate anomaly detection and resource optimization, and improving the operational stability and resource utilization efficiency of the server cluster.

CN120704993BActive Publication Date: 2025-10-31YOUR E DOCUMENT TRANSFORMATION PARTNER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511172323.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-10-31
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

Traditional server operation status optimization methods rely on static thresholds, which cannot dynamically match the fluctuation characteristics of server load, resulting in low accuracy of anomaly detection and high false positive and false negative rates.

Method used

By acquiring server operating parameter data, extracting feature vectors using a sliding time window, and combining the isolated forest anomaly detection model and the LSTM prediction model, the server operating status is dynamically evaluated, and future parameter prediction values ​​and dynamic thresholds are constructed to achieve dynamic monitoring and resource scheduling of server load.

Benefits of technology

It reduces false alarm and false negative rates, enables early identification of performance degradation or failure risks, reduces resource waste caused by ineffective scheduling, and improves the resource utilization efficiency of server clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704993B_ABST
    Figure CN120704993B_ABST
Patent Text Reader

Abstract

This application relates to the field of server optimization technology, and in particular to a method, device, and medium for optimizing the operating status of a server. The method includes: acquiring server operating parameter data; applying a sliding window to the server operating parameter data according to a preset sliding time window to obtain a server operating feature vector; inputting the vector in parallel into a first model and a second model, obtaining abnormal values ​​of the server's operating status through the first model, and obtaining predicted values ​​of target parameters for each collection cycle within a preset future time period through the second model; obtaining monitoring parameter thresholds for the server in each collection cycle within the preset future time period based on the predicted target parameter values; and executing a preset resource scheduling optimization action if the real-time monitoring parameter data of the server in a certain collection cycle exceeds the corresponding monitoring parameter threshold. This invention can solve the problems of low accuracy in anomaly detection and high false alarm and false negative rates caused by traditional static thresholds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server optimization technology, and in particular to a method, device and medium for optimizing the operating status of a server. Background Technology

[0002] As the core node for data processing and business operations, the stability and resource utilization efficiency of servers directly impact the service quality of the entire information system. Currently, servers face increasingly complex business loads, placing stringent demands on their real-time responsiveness and continuous operation capabilities. Traditional server performance optimization methods often rely on static threshold monitoring, which involves pre-setting fixed thresholds for parameters such as CPU utilization. When real-time parameters exceed these thresholds, alarms or resource scheduling are triggered. However, this approach has significant limitations: server load is dynamically changing, and fixed thresholds are ill-suited to load fluctuations in different business scenarios, easily leading to false alarms (e.g., unnecessary scheduling triggered by short-term peaks) or missed alarms (e.g., slow load increases that haven't reached the threshold but are already close to the critical failure point). Summary of the Invention

[0003] The purpose of this invention is to provide a method, device, and medium for optimizing the operating status of a server, in order to solve the problem that traditional static thresholds cannot dynamically match the fluctuation characteristics of server load, resulting in low accuracy of anomaly detection and high false alarm and false negative rates.

[0004] According to a first aspect of the present invention, a method for optimizing the operating state of a server is provided, the method comprising the following steps:

[0005] Obtain server operating parameter data; the operating parameters include CPU utilization, disk IOPS, disk latency, network packet loss rate, and TCP retransmission rate.

[0006] The server's operating parameter data is processed by sliding a window according to a preset sliding time window to obtain the server's operating feature vector; the server operating feature vector includes CPU utilization entropy value, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient.

[0007] The server's running feature vector is input into the first model and the second model in parallel. The first model is used to obtain abnormal values ​​of the server's running status, and the second model is used to obtain the predicted values ​​of the target parameters of the server for each collection cycle within a preset time period in the future. The predicted values ​​of the target parameters include predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate.

[0008] The monitoring parameter thresholds for each collection cycle within the future preset time period are obtained based on abnormal values ​​of server operating status and predicted values ​​of target parameters for each collection cycle within the future preset time period; the monitoring parameters include CPU utilization.

[0009] If the real-time monitoring parameter data of the server exceeds the corresponding monitoring parameter threshold during a certain collection period in the future, then the preset resource scheduling optimization action will be executed.

[0010] According to a second aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described server operation state optimization method.

[0011] According to a third aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described server operation state optimization method.

[0012] Compared with the prior art, the present invention has at least the following beneficial effects:

[0013] This invention extracts feature vectors of multiple parameters (such as CPU utilization entropy, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient) through a sliding time window. Combined with outliers output by the first model, it achieves dynamic evaluation of server operating status, overcoming the limitations of static thresholds and reducing false alarm and false negative rates. A second model predicts future values ​​of key parameters such as CPU utilization, disk IOPS, and network packet loss rate, and constructs dynamic thresholds based on outliers. This comprehensively considers the correlation and future trends of multiple parameters to capture potential risks in server operating status. Based on the predicted values ​​of target parameters over a preset future time period and the dynamic thresholds, it can identify performance degradation or failure risks in advance, transforming optimization actions from reactive responses to proactive prevention. This effectively avoids service interruptions or performance degradation and ensures that resource scheduling actions are triggered when necessary (e.g., when future parameters exceed dynamic thresholds). This reduces resource waste caused by ineffective scheduling and improves the overall resource utilization efficiency of the server cluster. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart of a server operation status optimization method provided in Embodiment 1 of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example 1:

[0018] According to this embodiment, as Figure 1 As shown, a method for optimizing the operating status of a server is provided, the method comprising the following steps:

[0019] S100, obtain the server's operating parameter data; the operating parameters include CPU utilization, disk IOPS, disk latency, network packet loss rate, and TCP retransmission rate.

[0020] As a specific implementation method, the following operating parameters are periodically collected (e.g., every 10 seconds) using the server's built-in monitoring tools (such as top, iostat, and netstat on Linux systems, or distributed monitoring systems like Prometheus and Zabbix): CPU utilization: refers to the server's CPU activity level per unit of time (range 0-100%), reflecting the occupancy of computing resources. Disk IOPS: refers to disk input / output operations per second, reflecting the frequency of disk read / write operations (unit: operations / second). Disk latency: refers to the average response time for a disk to complete one read / write operation (unit: milliseconds), reflecting the efficiency of disk read / write operations. Network packet loss rate: refers to the proportion of data packets lost during network transmission out of the total number of data packets sent (range 0-100%), reflecting the stability of network transmission. TCP retransmission rate: refers to the proportion of data packets that need to be retransmitted due to packet loss in the TCP protocol out of the total number of data packets sent (range 0-100%), which further reflects the quality of network transmission.

[0021] Based on the parameters collected above, comprehensive and real-time raw data can be provided for subsequent feature extraction and state assessment.

[0022] S200, the server's operating parameter data is slid-windowed according to a preset sliding time window to obtain the server operating feature vector; the server operating feature vector includes CPU utilization entropy value, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient.

[0023] In this embodiment, considering that parameter data in a single period is easily affected by instantaneous fluctuations (such as sudden CPU peaks) and cannot reflect the overall operating trend of the server, this embodiment uses a preset sliding time window (the size of the sliding time window and the sliding step are empirical values, optional, the window size is 5 minutes and the sliding step is 1 minute) to continuously extract parameter sequences of fixed duration, which can smooth instantaneous fluctuations and extract more stable feature vectors.

[0024] In this embodiment, entropy is an indicator of data disorder. A higher CPU utilization entropy value indicates greater fluctuations in CPU load within the window (such as frequent switching between low and high loads), and a more unstable server operation. As a specific implementation, the probability distribution of CPU utilization within the window is statistically analyzed, and then the CPU utilization entropy value is calculated using the entropy formula. Compared to simply the average CPU utilization, entropy provides a more comprehensive reflection of CPU load stability. Those skilled in the art will understand that the entropy formula is prior art and will not be elaborated upon here.

[0025] In this embodiment, disk performance is affected by both read / write frequency (IOPS) and response speed (latency); as a specific implementation, the disk pressure index is p, p=(b1 / b max )×(a1 / a0), where b1 is the average disk IOPS within the current window, b max a1 is the maximum disk IOPS, a0 is the average disk latency within the current window, and a0 is the preset disk latency threshold, where a0 > 0. Where b max >0, b1 reflects the current read / write frequency; b max The p value reflects the disk's maximum capacity and is preset by the manufacturer; a1 reflects the current response speed, and a0 is the upper limit of normal operating latency, such as 50ms. The larger the p value, the more severe the latency exceedance and the greater the pressure on the disk during high-frequency read and write operations.

[0026] In this embodiment, the coefficient of variation of packet loss rate measures the degree of network fluctuation. As a specific implementation, the coefficient of variation of packet loss rate is L, when... l When 2 is less than or equal to the preset packet loss rate threshold, L=0; when l When 2 is greater than the preset packet loss rate threshold, L= l 1 / l 2; l 1 represents the standard deviation of the packet loss rate within the current window. l 2 represents the average packet loss rate within the current window. A larger L indicates more drastic fluctuations in the packet loss rate and a more unstable network transmission. Optionally, a preset packet loss rate threshold can be an empirical value greater than 0, such as 0.5%.

[0027] In this embodiment, the trend of TCP retransmission rate changes (such as whether it has increased rapidly recently) is a better predictor of network degradation risk than the current value. As a specific implementation, the network retransmission gradient is d, where d = ∑ n i=0 (e -λ×i / (∑ n i=0 e -λ×i )×(R0-R i )) / max(R0,r), where R0 is the TCP retransmission rate for the current period, and R... i Let be the TCP retransmission rate of the previous i periods in the current period, r be the preset minimum TCP retransmission rate threshold, λ be the preset attenuation coefficient, i be the value from 1 to n, and n be the preset number of periods. Here, n is an empirical value, for example, n=5, e -λ×i The attenuation factor gives higher weight to recent data (smaller i); r is a preset value, r>0, for example 0.1%; numerator ∑ n i=0 (e -λ×i / (∑ n i=0 e -λ×i )×(R0-R i The weighted difference between the current and historical retransmission rates reflects the trend of retransmission rate changes; the denominator max(R0,r) is used for normalization. A positive and larger d indicates that the TCP retransmission rate has increased faster recently and the network quality is deteriorating, while a negative d indicates that the TCP retransmission rate has decreased recently and the network quality is improving.

[0028] S300, the server running feature vector is input into the first model and the second model in parallel. The first model is used to obtain abnormal values ​​of the server running status, and the second model is used to obtain the target parameter prediction values ​​of the server for each collection cycle in a future preset time period. The target parameter prediction values ​​include CPU utilization prediction values, disk IOPS prediction values ​​and network packet loss rate prediction values.

[0029] In this embodiment, the assessment of whether the current server operating state is abnormal is based on a first model. As a specific implementation, the first model is an isolated forest anomaly detection model, where the abnormal value of the server operating state is y, and y=2. -e / cLet e ​​be the average path length of the server's running feature vector across q trees, q be the number of anomalous trees constructed by the isolated forest anomaly detection model, and c be a correction factor for the sample size based on the isolated forest anomaly detection model. Where c > 0. The larger the value of y, the more anomalous the server's running state; optionally, q = 100. Those skilled in the art will understand that the training process of isolated forests is existing technology. In the splitting process, the isolated forest algorithm randomly selects one feature from multi-dimensional features and randomly selects a splitting value for that feature; this will not be elaborated further here. This embodiment automatically learns normal patterns based on isolated forests to achieve anomaly detection with a lower false positive rate.

[0030] In this embodiment, the future operating status trend of the server is evaluated based on the second model. Server parameters (such as CPU utilization, disk IOPS, and network packet loss rate) have time series characteristics, and LSTM (Long Short-Term Memory) can capture long-term dependencies, making it suitable for predicting the future operating status trend of the server. As a specific implementation, the second model is an LSTM prediction model. The input of the second model also includes the target parameter sequence of the most recent first time period; the target parameter sequence includes the CPU utilization sequence, disk IOPS sequence, and network packet loss rate sequence; the second model is used to obtain the predicted values ​​of the target parameters of the server in the future for a preset time period based on the input server operating feature vector and the target parameter sequence of the most recent first time period.

[0031] As a specific implementation, the input of the LSTM prediction model contains two types of data: one is the server running feature vector extracted through a sliding time window (including CPU utilization entropy, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient); the other is the target parameter sequence (including CPU utilization sequence, disk IOPS sequence, and network packet loss rate sequence) collected at a preset sampling frequency (e.g., once every 10 seconds) within the most recent first duration (which can be an empirical value, such as 10 minutes). The input data needs to be processed by Min-Max normalization into a tensor form of [number of samples, time step (if the first duration is 10 minutes, and the sampling is once every 10 seconds, then the time step is 60), feature dimension (7 dimensions, i.e., 4-dimensional feature vector + 3-dimensional parameter sequence)]. The LSTM prediction model structure employs a multi-layer LSTM stacked design, specifically: two LSTM layers are connected after the input layer (the first layer has 128 hidden units and returns a sequence, and the second layer has 64 hidden units and returns a sequence), with a Dropout layer (dropout rate 0.2) inserted in between to suppress overfitting. The output of the LSTM layers passes through an attention layer (dynamically assigning weights to each time step) and is then connected to a fully connected layer (32 units, ReLU activation), finally outputting the result through an output layer (3 units, linear activation). The model output is the predicted value of the target parameters for a preset future time period (e.g., for the next 5 minutes, generating 30 time-step prediction sequences for CPU utilization, disk IOPS, and network packet loss rate, each step corresponding to 10 seconds; the output results need to be inversely normalized to restore the true physical values). During training, historical data was used to divide the training, validation, and test sets in a 7:1.5:1.5 ratio. Weighted MSE was used as the loss function (CPU utilization, disk IOPS, and network packet loss rate were weighted at 0.5, 0.3, and 0.2 respectively). The Adam optimizer (initial learning rate 0.001 with decay mechanism) was used for iterative training with a batch size of 64. An early stopping mechanism (stopping if the validation set loss does not decrease for 5 consecutive rounds) was used to determine the optimal model. The model was retrained periodically (e.g., weekly) using newly collected data to adapt to changes in server status. Simultaneously, missing values ​​were handled using linear interpolation during training, and outliers exceeding 3σ were smoothed to ensure model robustness. Through this design, the LSTM prediction model can fully capture the temporal dependencies of server parameters and accurately predict parameter change trends over a preset time period, providing a reliable basis for subsequent dynamic threshold calculation and resource scheduling optimization.

[0032] S400: Based on abnormal values ​​of server operating status and predicted values ​​of target parameters for each collection cycle within a preset time period, obtain the monitoring parameter thresholds for each collection cycle within a preset time period; the monitoring parameters include CPU utilization.

[0033] As a specific implementation method, the CPU utilization threshold for a certain acquisition cycle within a preset time period is h, where h = min(h max ,h min ×(1+α×k)), h min h is the lower limit of the preset CPU utilization threshold, min() is to take the minimum value, and h max The upper limit of the preset CPU utilization threshold is given by k, where k is the relative rate of change. k = max(0, β1×(f1-u1) / (u1+ε)+β2×(f2-b1) / (b1+ε)+β3×(f3-u2) / (u2+ε)), where β1, β2, and β3 are the weights corresponding to CPU utilization, disk IOPS, and network packet loss rate, respectively. To take the maximum value, β1, β2, and β3 are all greater than 0 and less than 1. f1, f2, and f3 are the predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate for the current collection period within the preset time period, respectively. u1, b1, and u2 are the CPU utilization, disk IOPS, and network packet loss rate for the current window, respectively, u1≠0, b1≠0, u2≠0. ε is a preset constant, ε>0. α is an adjustment coefficient, α=α0×(1+η×tanh(g×y)), y is the abnormal value of server operation status, η is a preset coupling coefficient, η>0, α0 is the baseline coefficient, g is a preset amplification coefficient, g>1, and tanh() is the hyperbolic tangent function. Optional, h min h max β1, β2, β3, η, α0, and g are empirical values, and ε is a preset minimum value to prevent the denominator from being zero. For example, h min =50%, h max =85%, β1=0.5, β2=0.3, β3=0.2, h 1,0 =50%, α0=0.2, η=0.4, g=2.

[0034] Among them, h min Ensure the server always maintains redundancy in basic resources (such as burst requests and process scheduling) to avoid a decrease in resilience caused by excessively relaxed thresholds under prolonged low load; maxThe maximum increase of the threshold is limited to prevent the threshold from approaching 100% without limit due to prediction errors or amplification of anomalies (CPU full load will lead to process blocking and a sharp increase in response latency); the weight relationship is: β1 > β2 > β3 (total = 1), which is adapted to the characteristics of general-purpose servers where computing load is the main factor, storage is secondary, and network is secondary. CPU utilization is the core indicator that directly reflects computing resources and has the highest weight (0.5); disk IOPS (such as database read and write, log write) has the next least indirect impact on CPU (0.3, which can be increased to 0.4-0.5 in IO-intensive scenarios); network packet loss rate mainly consumes CPU indirectly through TCP retransmission and has the lowest weight (0.2, which can be increased to 0.3 in network-intensive scenarios). α0 controls the basic adjustment range of the threshold under normal conditions to avoid excessive fluctuation of the threshold when there are no anomalies. η controls the influence of outlier values ​​y on the adjustment coefficient α to avoid excessive amplification of abnormal signals. g enhances the nonlinear response sensitivity of outlier values ​​y, so that small anomalies are adjusted slowly and large anomalies are adjusted rapidly.

[0035] Therefore, in this embodiment, h min ~h max The safety range, serving as a threshold, ensures resource utilization (avoiding h) min Excessive height leads to waste, while preventing overload (e.g., h) max (≤85%) The load change trend is determined by combining the predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate. The weight allocation focuses on computation and multi-resource linkage to adapt to the load characteristics of most servers. The abnormal response is achieved by gradient perception through g and η to avoid being too sensitive to small anomalies and slow to react to large anomalies. The safety threshold processing prevents mathematical calculation errors and ensures that the formula still runs stably in extreme scenarios (such as low load and zero packet loss).

[0036] S500: If the real-time monitoring parameter data of a certain collection period of the server exceeds the corresponding monitoring parameter threshold within a future time period, then a preset resource scheduling optimization action will be executed.

[0037] In this embodiment, S500 includes: if the CPU utilization data of the server in a certain collection period within a future time period exceeds the corresponding CPU utilization threshold, then a preset resource scheduling optimization action is executed; wherein, the corresponding CPU utilization threshold refers to the CPU utilization threshold for the same collection period. For example, if the CPU utilization data of the server in the first collection period within a future time period exceeds the CPU utilization threshold for the first collection period within a future time period, then the preset resource scheduling optimization action is executed. As another example, if the CPU utilization data of the server in the fifth collection period within a future time period exceeds the CPU utilization threshold for the fifth collection period within a future time period, then the preset resource scheduling optimization action is executed.

[0038] As a specific implementation, the preset resource scheduling optimization actions include at least one of the following: load balancing and resource expansion. Load balancing includes migrating some tasks to idle servers to reduce the current CPU load on the server; resource expansion includes temporarily increasing the number of CPU cores to improve the server's processing capacity. Those skilled in the art will understand that the process of performing resource scheduling optimization actions is prior art and will not be described in detail here.

[0039] This embodiment extracts feature vectors of multiple parameters (such as CPU utilization entropy, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient) through a sliding time window. Combined with outliers output by the first model, it achieves dynamic evaluation of server operating status, overcoming the limitations of static thresholds and reducing false alarm and false negative rates. The second model predicts future values ​​of key parameters such as CPU utilization, disk IOPS, and network packet loss rate, and constructs dynamic thresholds based on outliers. It comprehensively considers the correlation and future trends of multiple parameters to capture potential risks in server operating status. Based on the predicted values ​​of target parameters and dynamic thresholds over a preset future time period, it can identify performance degradation or failure risks in advance, transforming optimization actions from post-event responses to pre-event prevention, effectively avoiding service interruptions or performance degradation. It can also ensure that resource scheduling actions are triggered when necessary (such as when future parameters exceed dynamic thresholds), thereby reducing resource waste caused by ineffective scheduling and improving the overall resource utilization efficiency of the server cluster.

[0040] Example 2:

[0041] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0042] Obtain server operating parameter data; the operating parameters include CPU utilization, disk IOPS, disk latency, network packet loss rate, and TCP retransmission rate.

[0043] The server's operating parameter data is processed by sliding a window according to a preset sliding time window to obtain the server's operating feature vector; the server operating feature vector includes CPU utilization entropy value, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient.

[0044] The server's running feature vector is input into the first model and the second model in parallel. The first model is used to obtain abnormal values ​​of the server's running status, and the second model is used to obtain the predicted values ​​of the target parameters of the server for each collection cycle within a preset time period in the future. The predicted values ​​of the target parameters include predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate.

[0045] The monitoring parameter thresholds for each collection cycle within the future preset time period are obtained based on abnormal values ​​of server operating status and predicted values ​​of target parameters for each collection cycle within the future preset time period; the monitoring parameters include CPU utilization.

[0046] If the real-time monitoring parameter data of the server exceeds the corresponding monitoring parameter threshold during a certain collection period in the future, then the preset resource scheduling optimization action will be executed.

[0047] Example 3:

[0048] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps:

[0049] Obtain server operating parameter data; the operating parameters include CPU utilization, disk IOPS, disk latency, network packet loss rate, and TCP retransmission rate.

[0050] The server's operating parameter data is processed by sliding a window according to a preset sliding time window to obtain the server's operating feature vector; the server operating feature vector includes CPU utilization entropy value, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient.

[0051] The server's running feature vector is input into the first model and the second model in parallel. The first model is used to obtain abnormal values ​​of the server's running status, and the second model is used to obtain the predicted values ​​of the target parameters of the server for each collection cycle within a preset time period in the future. The predicted values ​​of the target parameters include predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate.

[0052] The monitoring parameter thresholds for each collection cycle within the future preset time period are obtained based on abnormal values ​​of server operating status and predicted values ​​of target parameters for each collection cycle within the future preset time period; the monitoring parameters include CPU utilization.

[0053] If the real-time monitoring parameter data of the server exceeds the corresponding monitoring parameter threshold during a certain collection period in the future, then the preset resource scheduling optimization action will be executed.

[0054] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0055] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A method for optimizing the operating status of a server, characterized in that, The method includes the following steps: Obtain server operating parameter data; the operating parameters include CPU utilization, disk IOPS, disk latency, network packet loss rate, and TCP retransmission rate; The server's operating parameter data is processed by sliding a window according to a preset sliding time window to obtain the server's operating feature vector; the server operating feature vector includes CPU utilization entropy value, disk pressure index, network retransmission gradient, and packet loss rate variation coefficient. The server's running feature vector is input into the first model and the second model in parallel. The first model is used to obtain abnormal values ​​of the server's running status, and the second model is used to obtain the predicted values ​​of the target parameters of the server for each collection cycle within a preset time period in the future. The predicted values ​​of the target parameters include predicted values ​​of CPU utilization, disk IOPS, and network packet loss rate. The monitoring parameter thresholds for each collection cycle within the future preset time period are obtained based on abnormal values ​​of server operating status and predicted values ​​of target parameters for each collection cycle within the future preset time period; the monitoring parameters include CPU utilization. If the real-time monitoring parameter data of the server exceeds the corresponding monitoring parameter threshold during a certain collection period in the future, then the preset resource scheduling optimization action will be executed.

2. The server operation status optimization method according to claim 1, characterized in that, The CPU utilization threshold for a certain data collection cycle within a preset time period is h, where h = min(h) max ,h min ×(1+α×k)), h min h is the lower limit of the preset CPU utilization threshold, min() is to take the minimum value, and h max The upper limit of the preset CPU utilization threshold is given by k, where k is the relative rate of change. k = max(0, β1×(f1-u1) / (u1+ε)+β2×(f2-b1) / (b1+ε)+β3×(f3-u2) / (u2+ε)), where β1, β2, and β3 are the weights corresponding to CPU utilization, disk IOPS, and network packet loss rate, respectively. To take the maximum value, β1, β2 and β3 are all greater than 0 and less than 1. f1, f2 and f3 are the predicted values ​​of CPU utilization, disk IOPS and network packet loss rate for the current collection period within the preset time period, respectively. u1, b1 and u2 are the CPU utilization, disk IOPS and network packet loss rate of the current window, respectively. ε is a preset constant, ε>0. α is an adjustment coefficient, α=α0×(1+η×tanh(g×y)), y is the abnormal value of server running status, η is a preset coupling coefficient, η>0, α0 is the baseline coefficient, g is a preset amplification coefficient, g>1, and tanh() is the hyperbolic tangent function.

3. The server operation status optimization method according to claim 1, characterized in that, The disk stress index is p, p = (b1 / b) max )×(a1 / a0), where b1 is the average disk IOPS within the current window, b max a1 is the maximum disk IOPS, a0 is the average disk latency within the current window, and a0 is the preset disk latency threshold, where a0>0.

4. The server operation status optimization method according to claim 1, characterized in that, The coefficient of variation of packet loss rate is L, when l When 2 is less than or equal to the preset packet loss rate threshold, L=0; when l When 2 is greater than the preset packet loss rate threshold, L= l 1 / l 2; l 1 represents the standard deviation of the packet loss rate within the current window. l 2 represents the average packet loss rate within the current window.

5. The server operation status optimization method according to claim 1, characterized in that, The network retransmission gradient is d, d = ∑ n i=0 (e -λ×i / (∑ n i=0 e -λ×i )×(R0-R i )) / max(R0,r), where R0 is the TCP retransmission rate for the current period, and R... i λ is the TCP retransmission rate of the previous i periods of the current period, r is the preset minimum TCP retransmission rate threshold, λ is the preset attenuation coefficient, i ranges from 1 to n, and n is the preset number of periods.

6. The server operation status optimization method according to claim 1, characterized in that, The first model is an isolated forest anomaly detection model, where the abnormal value of the server's running status is y, and y=2. -e / c , e is the average path length of the server-run feature vector in q trees, q is the number of anomaly trees constructed by the isolated forest anomaly detection model, and c is the correction factor for the sample size based on the isolated forest anomaly detection model.

7. The server operation status optimization method according to claim 1, characterized in that, The second model is an LSTM prediction model. The input of the second model also includes the target parameter sequence of the most recent first time period. The target parameter sequence includes the CPU utilization sequence, disk IOPS sequence, and network packet loss rate sequence. The second model is used to obtain the predicted values ​​of the target parameters of the server in the future preset time period based on the input server running feature vector and the target parameter sequence of the most recent first time period.

8. The server operation status optimization method according to claim 1, characterized in that, The preset resource scheduling optimization actions include at least one of the following: load balancing and resource expansion.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the server operation state optimization method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the server operation state optimization method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • DCS system autonomous controllable upgrading and system fault prediction method and system

    CN119536177A

  • Server load state evaluation method based on dynamic evaluation algorithm

    CN119902905A