Server performance detection method and device, electronic equipment and storage medium
By acquiring and processing multiple server data to generate embedded vector sequences and inputting intelligent models for detection, the problem of inaccurate evaluation of single indicators in the prior art is solved, and more accurate and dynamically adaptable performance detection is achieved.
Patent Information
- Application Number
- CN202411045569.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-26
AI Technical Summary
In the server performance detection, it is difficult to fully and accurately evaluate relying on a single performance indicator, resulting in inaccurate detection results and inability to adapt to dynamic environmental changes.
By obtaining the server's performance monitoring data, system logs, environmental monitoring data and configuration information, the performance detection characteristics are generated, and converted into an embedded vector sequence, and an intelligent performance detection model is input to determine the performance detection results.
Improves the accuracy of server performance detection, enables more comprehensive evaluation of performance status, and adapts to variable IT environments to predict potential performance bottlenecks and failures.
Smart Images

Figure CN119025394A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a server performance detection method, device, electronic device and storage medium. Background Art
[0002] At present, with the rapid development of technologies such as cloud computing, big data, and artificial intelligence, companies are increasingly demanding server performance and stability. Therefore, how to perform performance testing on servers has become a hot research topic.
[0003] In the related art, the performance test result of the server is usually determined based on performance indicators such as the CPU usage, memory usage and disk I / O speed of the server.
[0004] However, the performance of a server is affected by many factors. It is difficult to comprehensively and accurately evaluate the performance of a server based on only some performance indicators, which reduces the accuracy of the server performance test results. Summary of the invention
[0005] The present application provides a server performance detection method, device, electronic device and storage medium to solve the defects of related technologies such as reducing the accuracy of server performance detection results.
[0006] The first aspect of the present application provides a server performance detection method, comprising:
[0007] Obtain performance monitoring data, system logs, environment monitoring data and configuration information of the server under test;
[0008] Generate performance detection features of the server to be tested based on the performance monitoring data, system logs, environment monitoring data and configuration information;
[0009] According to the semantic features and grammatical features of each subword in the performance detection feature, each subword in the performance detection feature is converted into an embedding vector to obtain a target embedding vector sequence corresponding to the performance detection feature;
[0010] The target embedding vector sequence is input into a target performance detection model, and a performance detection result of the server to be tested is determined based on the target performance detection model and the target embedding vector sequence.
[0011] In an optional implementation, generating the performance detection feature of the server to be tested according to the performance monitoring data, system log, environment monitoring data and configuration information includes:
[0012] Determining the long-term change trend information and periodic change information of each performance indicator of the server to be tested according to the performance monitoring data;
[0013] Determining the performance timing characteristics of the server to be tested according to the long-term change trend information and the periodic change information of each of the performance indicators;
[0014] Performing keyword extraction on the system log to obtain a system log keyword extraction result;
[0015] Performing text segmentation processing on the system log keyword extraction result to obtain the corresponding log text segmentation result;
[0016] Constructing a log vocabulary according to the log text segmentation result;
[0017] Determining the log features of the server to be tested according to the number of occurrences of each keyword represented by the log vocabulary;
[0018] Determine, based on the environmental monitoring data, a calculation result of a characteristic value of an environmental indicator of the server to be tested;
[0019] Determining the environmental time series characteristics of the server to be tested according to the characteristic value calculation result of the environmental indicator;
[0020] Determining static characteristics of the server to be tested according to the configuration information;
[0021] The performance time series characteristics, log characteristics, environment time series characteristics and static characteristics of the server to be tested are integrated to obtain the performance detection characteristics of the server to be tested.
[0022] In an optional implementation, determining the log feature of the server to be tested according to the number of occurrences of each keyword represented by the log vocabulary includes:
[0023] Based on the following formula, the log characteristics of the server to be tested are determined:
[0024]
[0025] Among them, TF-IDF(t,d) represents the log feature corresponding to keyword t in system log d, TF(t,d) represents the number of times keyword t appears in system log d, N represents the total number of system logs, and DF(t) represents the number of system logs containing keyword t.
[0026] In an optional implementation, determining the characteristic value calculation result of the environmental indicator of the server to be tested according to the environmental monitoring data includes:
[0027] The characteristic value calculation result of the environmental indicator of the server to be tested is determined based on the following formula:
[0028]
[0029] Wherein, P represents the characteristic value calculation result of the environmental index, T represents temperature, M represents humidity, V represents voltage, the environmental monitoring data at least includes temperature, humidity and voltage, and Var represents the calculation of the coefficient of variation.
[0030] In an optional implementation, inputting the target embedding vector sequence into a target performance detection model, and determining the performance detection result of the server to be tested according to the target embedding vector sequence based on the target performance detection model, includes:
[0031] Inputting the target embedding vector sequence into the target performance detection model, performing dot product attention calculation on each subword vector in the target embedding vector sequence based on the self-attention layer, and obtaining an attention representation of each subword vector;
[0032] Inputting the attention representation of each of the sub-word vectors into a feed-forward network layer, so as to perform linear transformation and non-linear activation on the attention representation of each of the sub-word vectors based on the feed-forward network layer, and obtain a hidden state of each of the sub-word vectors;
[0033] Determining a performance test result of the server to be tested according to the hidden state of each of the subword vectors;
[0034] Among them, the target performance detection model at least includes the self-attention layer and the feedforward network layer.
[0035] In an optional implementation, determining the performance test result of the server to be tested according to the hidden state of each of the subword vectors includes:
[0036] The performance test result of the server to be tested is determined based on the following formula:
[0037] s=h s W+b
[0038] Among them, s represents the performance test result of the server to be tested, h s represents the hidden state of the last subword vector in the target embedding vector sequence, W represents the weight matrix, b represents the bias term, and the hidden state of the last subword vector includes the hidden states of all subword vectors in the target embedding vector sequence.
[0039] In an optional embodiment, the method further includes:
[0040] Determine the performance score and status score of the server to be tested according to the performance test result of the server to be tested;
[0041] A performance detection report of the server to be tested is generated according to the performance score and the status score of the server to be tested.
[0042] A second aspect of the present application provides a server performance detection device, comprising:
[0043] The acquisition module is used to obtain the performance monitoring data, system logs, environment monitoring data and configuration information of the server under test;
[0044] A feature generation module, used to generate performance detection features of the server to be tested based on the performance monitoring data, system logs, environment monitoring data and configuration information;
[0045] A feature conversion module, used for converting each subword in the performance detection feature into an embedding vector according to the semantic features and grammatical features of each subword in the performance detection feature, so as to obtain a target embedding vector sequence corresponding to the performance detection feature;
[0046] The detection module is used to input the target embedding vector sequence into a target performance detection model, and determine the performance detection result of the server to be tested based on the target embedding vector sequence based on the target performance detection model.
[0047] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0048] The memory stores computer-executable instructions;
[0049] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0050] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0051] A fifth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0052] The technical solution of this application has the following advantages:
[0053] The present application provides a server performance detection method, device, electronic device and storage medium, the method comprising: obtaining performance monitoring data, system log, environment monitoring data and configuration information of the server to be tested; generating performance detection features of the server to be tested based on the performance monitoring data, system log, environment monitoring data and configuration information; converting the subwords in the performance detection features into embedding vectors according to the semantic features and grammatical features of each subword in the performance detection features to obtain a target embedding vector sequence corresponding to the performance detection features; inputting the target embedding vector sequence into a target performance detection model, and determining the performance detection result of the server to be tested based on the target performance detection model and the target embedding vector sequence. The method provided by the above scheme improves the accuracy of the performance detection results by utilizing an intelligent model to perform performance detection on the server to be tested according to various information of the server to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0055] Figure 1 This is a schematic diagram of the structure of the server performance detection system based on the embodiment of the present application;
[0056] Figure 2 A flow chart of a server performance detection method provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of the structure of a server performance detection device provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of the structure of an exemplary server performance detection device provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0060] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0063] In today's information technology environment, servers, as core components of data centers, bear the important responsibility of processing large amounts of data and maintaining daily operations of enterprises. With the rapid development of technologies such as cloud computing, big data, and artificial intelligence, the performance and stability of servers directly affect the operational efficiency and service quality of enterprises. Therefore, effectively evaluating and monitoring the performance status of servers has become an important issue in information technology management. Server performance affects the response speed and processing power of applications, and is directly related to user experience and the efficiency of business execution. In multi-user and high-concurrency business scenarios, excellent server performance can ensure smooth business operation and avoid economic losses and brand reputation damage caused by system delays or crashes. Traditional server performance evaluation relies on the monitoring of hardware indicators, such as CPU usage, memory usage, disk I / O speed, etc. Although these indicators can provide a preliminary understanding of the server's operating status, it is difficult to fully reflect the performance of the server in actual applications. In addition, the performance of the server is also affected by many factors such as the network environment, system configuration, and application efficiency. A single indicator is difficult to provide a comprehensive evaluation.
[0064] The limitations of related technologies are: Narrow test scope: Although existing performance testing methods such as benchmarking and stress testing can simulate server performance under high load, these methods are often limited to specific test environments and conditions and cannot fully simulate the actual operating environment. Response time testing limitations: Many performance evaluation methods focus on measuring response time or processing speed, ignoring other important performance indicators such as data consistency and security. Poor adaptability to dynamic environments: Servers will face constantly changing loads and configuration adjustments in actual operation. Related technologies often lack sufficient adaptability and predictability and are difficult to cope with rapidly changing IT environments.
[0065] In response to the above problems, an embodiment of the present application provides a server performance detection method, device, electronic device and storage medium, the method comprising: obtaining performance monitoring data, system logs, environmental monitoring data and configuration information of the server to be tested; generating performance detection features of the server to be tested based on the performance monitoring data, system logs, environmental monitoring data and configuration information; converting each subword in the performance detection feature into an embedding vector according to the semantic features and grammatical features of each subword in the performance detection feature to obtain a target embedding vector sequence corresponding to the performance detection feature; inputting the target embedding vector sequence into a target performance detection model, and determining the performance detection result of the server to be tested based on the target performance detection model and the target embedding vector sequence. The method provided by the above scheme improves the accuracy of the performance detection result by utilizing an intelligent model to perform performance detection on the server to be tested according to various information of the server to be tested.
[0066] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0067] First, the structure of the server performance detection system on which this application is based is described:
[0068] The server performance detection method, device, electronic device and storage medium provided in the embodiments of the present application are suitable for performing performance detection on a running server. Figure 1 The figure is a schematic diagram of the structure of the server performance detection system based on the embodiment of the present application, which mainly includes a server to be tested, a data acquisition device and a server performance detection device. The data acquisition device is used to collect performance monitoring data, system logs, environmental monitoring data and configuration information of the server to be tested, and send the collected data to the server performance detection device, which performs performance detection on the server to be tested based on the obtained data to obtain a performance detection result.
[0069] The embodiment of the present application provides a server performance detection method for performing performance detection on a running server. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used to perform performance detection on a running server.
[0070] like Figure 2 FIG. 1 is a flow chart of a server performance detection method provided in an embodiment of the present application, the method comprising:
[0071] Step 201, obtaining performance monitoring data, system logs, environment monitoring data and configuration information of the server to be tested.
[0072] Specifically, various key indicators of the server can be monitored and collected in real time based on the data acquisition device, including but not limited to CPU usage, memory usage, disk I / O speed, network bandwidth utilization, GPU load, etc. At the same time, this data acquisition device is also responsible for collecting the server's system logs, environmental monitoring data and configuration information, where environmental monitoring data includes but is not limited to the temperature and humidity and power supply of the computer room. Specific data collection is automatically collected from multiple data sources by integrating the monitoring software (such as Prometheus, Zabbix, etc.) on the server and the output of physical sensors.
[0073] Step 202: Generate performance detection features of the server to be tested based on performance monitoring data, system logs, environment monitoring data and configuration information.
[0074] Specifically, the performance detection features of the server to be tested are obtained by performing feature extraction and feature fusion on the performance monitoring data, system logs, environment monitoring data and configuration information.
[0075] Step 203, converting each subword in the performance detection feature into an embedding vector according to the semantic features and grammatical features of each subword in the performance detection feature, so as to obtain a target embedding vector sequence corresponding to the performance detection feature.
[0076] It should be noted that the target performance detection model in the embodiment of the present application adopts the GPT2 language model, whose input is the processed prompt string, and the output is the conversion of these strings into a numerical input sequence that can be processed by the model, that is, a Token sequence (target embedding vector sequence). The specific operation steps are as follows:
[0077] Step 1: Tokenization, convert the input prompt string into a token sequence. In GPT-2, the text string must first be decomposed into words or sub-word tokens in the vocabulary. Specifically, the BPE (Byte-Pair Encoding) algorithm of GPT-2 can be used to split the text string into sub-word tokens.
[0078] For each token, look up the predefined vocabulary and convert the string token to the corresponding integer index.
[0079] Step 2: Embedding, converting the token sequence into an embedding vector sequence. This step converts each integer token into a vector in a high-dimensional space that can capture the semantic and grammatical features of the token.
[0080] An embedding matrix is used to map the integer index of each token to a vector of fixed dimension. The calculation formula is as follows:
[0081] e i =EmbeddingMatrix[token i ]
[0082] Among them, e i is the embedding vector, token i It is the index of the Token.
[0083] Step 3: Positional Encoding, adding position information to the embedding vector. Since the structure of GPT-2 itself does not contain a mechanism for processing sequence order, position encoding is used to provide the model with information about the position of the token in the sequence.
[0084] For each position in the sequence, a position vector is generated and added to the corresponding embedding vector. The specific calculation formula is as follows:
[0085] e i′ =e i +p i
[0086]
[0087] Among them, pos is the position index, i is the dimension index, and d model is the model dimension.
[0088] The position information refers to the relative or absolute position of the token in the input sequence, because Transformer-based models such as GPT-2 process data through a self-attention mechanism, which itself does not naturally understand the position or order in the sequence. Adding position information enables the model to distinguish the semantics and role of the same word in different positions, thereby effectively processing sequential dependencies in language.
[0089] Step 204: input the target embedding vector sequence into the target performance detection model, and determine the performance detection result of the server to be tested based on the target embedding vector sequence based on the target performance detection model.
[0090] Specifically, the target embedding vector sequence is input into a pre-trained target performance detection model, and the target embedding vector sequence is intelligently calculated based on the target performance detection model to obtain the performance detection result of the server to be tested.
[0091] On the basis of the above embodiments, since there are many types of performance detection data of the server to be tested, each type of data reflects the performance of the server to be tested to different degrees. In order to further improve the accuracy of the server performance detection results, as an implementable method, in one embodiment, based on the performance monitoring data, system logs, environment monitoring data and configuration information, the performance detection features of the server to be tested are generated, including:
[0092] Step 2021, determining the long-term change trend information and periodic change information of each performance indicator of the server to be tested according to the performance monitoring data;
[0093] Step 2022, determining the performance timing characteristics of the server to be tested according to the long-term change trend information and periodic change information of each performance indicator;
[0094] Step 2023, extracting keywords from the system log to obtain a system log keyword extraction result;
[0095] Step 2024, performing text segmentation processing on the system log keyword extraction result to obtain the corresponding log text segmentation result;
[0096] Step 2025, constructing a log vocabulary according to the log text segmentation result;
[0097] Step 2026, determining the log features of the server to be tested according to the number of occurrences of each keyword represented by the log vocabulary;
[0098] Step 2027, determining the characteristic value calculation result of the environmental indicator of the server to be tested according to the environmental monitoring data;
[0099] Step 2028, determining the environmental time series characteristics of the server to be tested according to the characteristic value calculation result of the environmental indicator;
[0100] Step 2029, determining the static characteristics of the server to be tested according to the configuration information;
[0101] Step 202 (10) integrates the performance time series characteristics, log characteristics, environment time series characteristics and static characteristics of the server under test to obtain the performance detection characteristics of the server under test.
[0102] Specifically, before extracting features from relevant data, the collected raw data can be preprocessed, including data cleaning (removing noise and outliers), data format conversion, missing value processing, and data normalization. In addition, key information can be extracted from system logs, and unstructured log data can be converted into structured numerical features. The specific data processing uses the Pandas library for data cleaning and preprocessing, and uses natural language processing technology (such as NLTK or SpaCy) to process text data.
[0103] Specifically, for performance monitoring data, its types include CPU usage, memory usage, disk I / O, network bandwidth, and GPU load. The acquisition method is through the system's built-in tools such as Windows' performance monitor, Linux's top or htop command, or using professional server monitoring software, including Nagios and Zabbix. The format is usually recorded in the form of time series data, with each indicator as a column and the timestamp as a row. After obtaining the performance monitoring data, it can be subjected to time series characterization processing, that is, time series characterization processing of data such as CPU usage, memory usage, disk I / O, network bandwidth, and GPU load. This includes calculating the average, maximum, minimum, and standard deviation of the rolling window (for example, every 30 minutes). Then trend extraction is performed, and time series analysis methods (such as autoregressive models) can be used to extract long-term trends and periodic changes. Further anomaly detection is performed, such as calculating the historical quantiles (such as the 95% quantile) of each indicator and identifying abnormal values that exceed these thresholds. Finally, formatting is performed to integrate the processed features into a format acceptable to the model. For example, a feature vector is generated for each time point, which contains all the above statistics and trend indicators to obtain the performance time series characteristics of the server to be tested.
[0104] Specifically, for system logs, their types include system event logs, error logs, and warning messages. The acquisition method is to directly extract from the log system of the operating system or application software, including the Windows event viewer or the Linux / var / log / directory. The format is text format, which may include fields such as timestamp, log level, event ID, description, etc. After obtaining the system log, log classification can be performed to classify the log according to levels such as errors, warnings, and information. Then keyword extraction is performed to extract keywords and phrases from the log text, such as "failure", "timeout", "restart", etc. Use the bag of words model to convert text information (system log keyword extraction results) into numerical features. Add a time tag to each log entry for synchronization with other time series data. Combine the text features with the corresponding timestamp and classification label to form part of the model input, that is, obtain the log features.
[0105] Specifically, in one embodiment, the log feature of the server to be tested is determined based on the following formula:
[0106]
[0107] Among them, TF-IDF(t,d) represents the log feature corresponding to keyword t in system log d, TF(t,d) represents the number of times keyword t appears in system log d, N represents the total number of system logs, and DF(t) represents the number of system logs containing keyword t.
[0108] Specifically, the TF-IDF (Term Frequency-Inverse Document Frequency) method can be used to further weight text features to improve the discrimination of keywords in system logs.
[0109] Specifically, for environmental monitoring data, its types include temperature, humidity, and power supply voltage, which are collected through physical sensors. The format is similar to that of hardware performance indicators, usually time series data. After obtaining the environmental monitoring data, data normalization is first performed, that is, environmental monitoring data such as temperature, humidity, and power supply voltage are normalized to a unified scale (0-1 range). Then time series characterization is performed to calculate the average value, fluctuation range (difference between maximum and minimum values), and coefficient of variation (ratio of standard deviation to mean value) within the time window (such as every 30 minutes) of each environmental indicator. Finally, all statistical data are integrated in a time series format to ensure time synchronization with the hardware performance data to obtain environmental time series characteristics.
[0110] Specifically, in one embodiment, the characteristic value calculation result of the environmental indicator of the server to be tested can be determined based on the following formula:
[0111]
[0112] Wherein, P represents the characteristic value calculation result of the environmental index, T represents temperature, M represents humidity, V represents voltage, the environmental monitoring data includes at least temperature, humidity and voltage, and Var represents the calculation of the coefficient of variation.
[0113] Specifically, for configuration information, its types include hardware configuration information of the server, such as CPU model, memory size, hard disk capacity, etc. The acquisition method is hardware detection tools, including CPU-Z and HWinfo automatic detection. The format is in the form of key-value pairs, for example {"CPU model":"Intel Xeon","memory size":"32GB"}. After obtaining the configuration information, feature encoding is performed to convert the configuration data (CPU model, memory size) into numerical features. For categorical data (CPU model), one-hot encoding is used; for numerical data (memory size), standardization or normalization is used. The processed configuration data is combined as a static feature with other time series features to provide a complete server performance view to obtain the static features of the server to be tested.
[0114] Furthermore, the processed features from different sources (performance monitoring data, system logs, environmental monitoring data, and configuration information) are fused by timestamp to ensure that the model receives a comprehensive data representation (performance detection features) containing all relevant information. Data batches are prepared for model training and analysis, and each batch contains data from a series of consecutive time points.
[0115] Specifically, all features can be normalized to ensure the same scale for easy model processing. The formula is as follows:
[0116]
[0117] Among them, x is the original data and x′ is the normalized data.
[0118] Furthermore, all time series features, log features, environmental stability index, and normalized configuration data are concatenated in chronological order to form a single long string, and each feature can be separated by a special delimiter. Finally, according to the input requirements of the large model, the start and end tags are constructed, as well as possible control codes, such as special tags to prompt the model that the current input is the data of server performance analysis (performance detection features).
[0119] On the basis of the above embodiments, with the development of machine learning and artificial intelligence technologies, server performance detection methods based on these technologies have begun to attract attention. These methods can not only evaluate the current performance status of the server by analyzing historical data, but also predict performance bottlenecks and failures that may occur in the future, and provide data support for server maintenance and optimization. For example, time series analysis is used to predict server performance trends, or deep learning models are used to extract key factors that affect server performance from complex data. Therefore, in order to further improve the accuracy of server performance detection results, as an implementable method, in one embodiment, the target embedded vector sequence is input into the target performance detection model, and the performance detection results of the server to be tested are determined based on the target embedded vector sequence based on the target performance detection model, including:
[0120] Step 2041, inputting the target embedding vector sequence into the target performance detection model, so as to perform dot product attention calculation on each subword vector in the target embedding vector sequence based on the self-attention layer, and obtain the attention representation of each subword vector;
[0121] Step 2042, inputting the attention representation of each sub-word vector into the feed-forward network layer, so as to perform linear transformation and non-linear activation on the attention representation of each sub-word vector based on the feed-forward network layer, and obtain the hidden state of each sub-word vector;
[0122] Step 2043, determining the performance test result of the server to be tested according to the hidden state of each sub-word vector.
[0123] Among them, the target performance detection model includes at least a self-attention layer and a feedforward network layer.
[0124] It should be noted that, before performing server performance testing, the embodiment of the present application will train the performance testing model to obtain the target performance testing model. The specific training process includes model initialization, training, verification and real-time evaluation execution, and the model training is performed using a deep learning framework (PyTorch). A large amount of historical data is used to train the model to identify and predict server performance and status indicators, and real-time data is used for performance evaluation.
[0125] Specifically, in the self-attention layer, the model considers all tokens in the input sequence when generating the representation of each token (subword vector). Calculate the query matrix, key matrix, and value matrix. These three matrices are obtained by multiplying the input matrix with different weight matrices.
[0126] For each token, the dot product attention function is used to calculate its association weight with all other tokens in the sequence. The specific calculation formula is as follows:
[0127] Q=XW Q ,K=XW K ,V=XW V
[0128]
[0129] Where X is the input vector sequence, W Q , W K , W V is the learnable weight matrix, d k is a hyperparameter, set to W Q Dimension.
[0130] Specifically, in the feed-forward network layer, additional nonlinear processing capabilities are provided for the output of each position of the model.
[0131] The output of the self-attention layer passes through two layers of linear networks, and a ReLU activation function is added in between. The specific calculation formula is as follows:
[0132] FFN(x)=max(0,xW1+b1)W2+b2
[0133] Among them, W1 and W2 are weight matrices, and b1 and b2 are bias terms.
[0134] Specifically, the target performance detection model also includes a layer normalization layer and a residual connection layer (LayerNormalization and Residual Connection) to help the model remain stable during training and accelerate convergence.
[0135] Add residual connections after the self-attention and feed-forward networks, that is, add the input directly to the output.
[0136] Perform layer normalization on the vector at each position. The calculation formula is:
[0137] y = LayerNorm(x + Sublayer(x))
[0138] Among them, x is the input of the sublayer (previous layer), and Sublayer is a self-attention or feed-forward network.
[0139] Specifically, in one embodiment, the performance test result of the server to be tested may be determined based on the following formula:
[0140] s=h s W+b
[0141] Among them, s represents the performance test result of the server to be tested, h s represents the hidden state of the last subword vector in the target embedding vector sequence, W represents the weight matrix, b represents the bias term, and the hidden state of the last subword vector includes the hidden states of all subword vectors in the target embedding vector sequence.
[0142] Specifically, the target performance detection model also includes an output layer, which converts the output of the last layer of the model into a specific score prediction. A linear layer is used to map the vector of the last token to an output of a fixed size, that is, the performance detection results (scores) of the server to be tested are obtained.
[0143] Furthermore, in one embodiment, the performance score and status score of the server to be tested may be determined according to the performance test result of the server to be tested; and a performance test report of the server to be tested may be generated according to the performance score and status score of the server to be tested.
[0144] Specifically, the performance test results can be passed to the output formatting module through the internal API, which converts the results into a predefined report format, including a detailed JSON report or a concise text summary, based on user requirements and configuration.
[0145] The text summary is a one-sentence evaluation of the server:
[0146] “As of 12:00 on June 4, 2024, the server’s performance score was 85 points and its status score was 78 points, indicating excellent performance and stable operation.”
[0147] The Json report contains detailed evaluation indicators:
[0148]
[0149] performance_score: A number between 0 and 100, indicating the overall score of server performance.
[0150] status_score: A number between 0 and 100, indicating the overall score of the server's current status.
[0151] Summary: A string providing a brief overview of the server's performance and status.
[0152] Details: object that provides detailed information about each performance indicator, such as CPU usage, memory usage, etc.
[0153] Timestamp: A string indicating the time when the review was generated.
[0154] Furthermore, in one embodiment, after obtaining the performance test report of the server to be tested, various configuration optimizations can be performed on the server to be tested based on the performance test report, and corresponding configuration optimization strategies can be determined, such as hardware optimization strategy, software optimization strategy, resource allocation strategy, and network optimization strategy.
[0155] Specifically, for hardware optimization strategies, you can increase memory to ensure that the server has enough memory to support running creative-related tasks and applications. More memory can reduce the need to exchange data to disk and improve the system's responsiveness. Improve processor performance and consider upgrading to a more powerful CPU to speed up computing, especially for creative work that requires a lot of computing resources, such as graphics processing and data analysis. Optimize storage and use high-speed solid-state drives (SSDs) to replace traditional mechanical hard drives to increase data reading and writing speeds and reduce the impact of disk I / O on performance. For software optimization strategies, you can optimize the operating system to ensure that the server operating system is properly optimized, such as shutting down unnecessary services and processes and adjusting system parameters to improve performance. You can also optimize applications to optimize creative applications running on the server, such as adjusting configuration parameters and updating to the latest version for better performance and functionality. Perform database optimization. If the server involves database operations, optimize the database, including index optimization, query optimization, table structure design, etc., to improve the efficiency of data access. For resource allocation strategies, you can use monitoring tools to monitor the server's resource usage in real time, including CPU, memory, disk I / O, etc., so as to promptly identify resource bottlenecks and make adjustments. According to different creative tasks and user needs, server resources should be reasonably allocated to ensure that key tasks can obtain sufficient resource support. If there are multiple servers, you can consider using load balancing technology to evenly distribute the workload to each server to improve the overall performance and availability of the system. For network optimization strategies, you can optimize network connections to ensure that the network connection between the server and the client is stable and high-speed. You can consider upgrading network equipment, optimizing network topology, using high-speed network protocols, etc. Reduce the amount of data transmission. In creative work, try to reduce unnecessary data transmission, such as compressing data, using caching technology, etc., to improve network transmission efficiency.
[0156] The server performance detection method provided in the embodiment of the present application obtains the performance monitoring data, system log, environment monitoring data and configuration information of the server to be tested; generates the performance detection features of the server to be tested according to the performance monitoring data, system log, environment monitoring data and configuration information; converts the subwords in the performance detection features into embedded vectors according to the semantic features and grammatical features of each subword in the performance detection features to obtain the target embedded vector sequence corresponding to the performance detection features; inputs the target embedded vector sequence into the target performance detection model, and determines the performance detection result of the server to be tested according to the target embedded vector sequence based on the target performance detection model. The method provided by the above scheme improves the accuracy of the performance detection results by using an intelligent model to perform performance detection on the server to be tested according to various information of the server to be tested, and can quickly respond to performance degradation and potential security threats through continuous monitoring and timely evaluation, ensuring the healthy operation of the server environment. And by using a deep learning model (such as GPT-2), the performance and status of the server can be analyzed and predicted more accurately. Compared with traditional monitoring systems based on thresholds or simple statistics, this method can understand and process more complex data patterns and provide more accurate performance indicators and status evaluation. This accuracy is particularly important because it helps IT managers detect potential problems in a timely manner and take measures to avoid or minimize the impact of system failures and performance degradation. Moreover, this method can not only evaluate current server performance, but also predict future performance trends. This is due to the powerful data processing and learning capabilities of deep learning models, which can learn from historical data and predict future performance changes. This predictive capability provides IT managers with forward-looking decision support, enabling them to plan resources, schedule maintenance, and optimize systems in advance, thereby improving server operating efficiency and business continuity. In addition, through automated data collection and processing processes, the need for human involvement is significantly reduced. Automated tools (such as Prometheus and Zabbix) and physical sensors can monitor server operating status 24 hours a day and automatically record and transmit data. This not only improves the efficiency and accuracy of data collection.
[0157] An embodiment of the present application provides a server performance detection device, which is used to execute the server performance detection method provided in the above embodiment.
[0158] like Figure 3 , which is a schematic diagram of the structure of a server performance detection device provided in an embodiment of the present application. The server performance detection device 30 comprises: an acquisition module 301 , a feature generation module 302 , a feature conversion module 303 and a detection module 304 .
[0159] Among them, the acquisition module is used to obtain the performance monitoring data, system logs, environmental monitoring data and configuration information of the server to be tested; the feature generation module is used to generate the performance detection features of the server to be tested based on the performance monitoring data, system logs, environmental monitoring data and configuration information; the feature conversion module is used to convert each sub-word in the performance detection feature into an embedding vector according to the semantic features and grammatical features of each sub-word in the performance detection feature, so as to obtain a target embedding vector sequence corresponding to the performance detection feature; the detection module is used to input the target embedding vector sequence into the target performance detection model, and determine the performance detection result of the server to be tested based on the target performance detection model and the target embedding vector sequence.
[0160] For example, Figure 4 , which is a schematic diagram of the structure of an exemplary server performance detection device provided in an embodiment of the present application, divides the internal structure of the device into different functional modules. The device includes a data acquisition module, a data processing module, a model training and evaluation module, and an output formatting module.
[0161] Data collection module: responsible for collecting real-time operation data from the server, including CPU usage, memory usage, disk I / O speed, network bandwidth utilization, GPU load, etc. Collect device logs, including error, warning and information logs. Monitor the server operating environment, such as temperature, humidity and power status.
[0162] Data processing module: Clean and preprocess the collected data, including removing outliers, filling missing values, and normalizing data. Extract key information from device logs and use natural language processing technology to convert text data into numerical features. Use feature engineering technology to extract statistical features from time series data, such as mean, maximum, minimum, and standard deviation.
[0163] Model training and evaluation module: Use historical data to train the GPT-2 model. Model training aims to understand and predict the performance and status of the server. Use the trained model to evaluate real-time data and generate performance and status scores.
[0164] Output formatting module: Formats the model output into JSON format or concise text description as needed to facilitate device monitoring and manual review.
[0165] The specific implementation process is as follows:
[0166] S1: Assume that the operation data of a server is monitored for a week. The following is part of the raw data collected in one day:
[0167] CPU usage: [20%, 45%, 55%, 50%, 60%, 40%] recorded every 10 minutes
[0168] Memory usage: [30GB, 28GB, 32GB, 35GB, 33GB, 30GB] recorded every 10 minutes
[0169] Disk I / O: [100MB / s, 150MB / s, 130MB / s, 120MB / s, 140MB / s, 110MB / s] recorded every 10 minutes
[0170] Network bandwidth: [200Mbps, 180Mbps, 220Mbps, 210Mbps, 230Mbps, 240Mbps] recorded every 10 minutes
[0171] System log:
[0172] 10:00 "Warning: Memory usage exceeded 80%"
[0173] 10:20 "Information: Regular backup successful"
[0174] 10:40 "Error: Network connection failed"
[0175] S2: These data are processed by the processing module and the following features are extracted:
[0176] Average CPU usage: 45%
[0177] Maximum memory usage: 35GB
[0178] Average disk I / O rate: 125MB / s
[0179] Network bandwidth peak: 240Mbps
[0180] Number of log errors: 1
[0181] Number of log warnings: 1
[0182] S3: Using historical datasets, the GPT-2 model is trained to understand the impact of different performance indicators on the overall performance of the server. This includes multiple cycles of observations of servers with different configurations, with each configuration running for at least one month.
[0183] S4: Input the processed real-time data into the trained GPT-2 model, and the model will predict the performance and status score of the server based on the input feature vector. Assume that the model outputs the following score:
[0184] Performance score: 82
[0185] Status Rating: 76
[0186] Output the rating in JSON format according to the device settings:
[0187]
[0188]
[0189] Regarding the server performance detection device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0190] The server performance detection device provided in the embodiment of the present application is used to execute the server performance detection method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0191] An embodiment of the present application provides an electronic device for executing the server performance detection method provided in the above embodiment.
[0192] like Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 50 includes: at least one processor 51 and a memory 52.
[0193] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the server performance detection method provided in the above embodiment.
[0194] The electronic device provided in the embodiment of the present application is used to execute the server performance detection method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0195] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the server performance detection method provided in any of the above embodiments is implemented.
[0196] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store the computer executable instructions of the server performance detection method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0197] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the server performance detection method provided in the above embodiment.
[0198] The embodiment of the present application provides a computer program product that can be used to execute computer instructions of the server performance detection method provided in the aforementioned embodiment. The implementation method and principle are the same and will not be repeated here.
[0199] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0202] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit 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.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0203] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0204] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A server performance detection method, characterized in that: include: Obtain performance monitoring data, system logs, environment monitoring data and configuration information of the server under test; Generate performance detection features of the server to be tested based on the performance monitoring data, system logs, environment monitoring data and configuration information; According to the semantic features and grammatical features of each subword in the performance detection feature, each subword in the performance detection feature is converted into an embedding vector to obtain a target embedding vector sequence corresponding to the performance detection feature; The target embedding vector sequence is input into a target performance detection model, and a performance detection result of the server to be tested is determined based on the target performance detection model and the target embedding vector sequence.
2. The method according to claim 1, characterized in that: Generating the performance detection characteristics of the server to be tested according to the performance monitoring data, system log, environment monitoring data and configuration information includes: Determining the long-term change trend information and periodic change information of each performance indicator of the server to be tested according to the performance monitoring data; Determining the performance timing characteristics of the server to be tested according to the long-term change trend information and the periodic change information of each of the performance indicators; Performing keyword extraction on the system log to obtain a system log keyword extraction result; Performing text segmentation processing on the system log keyword extraction result to obtain the corresponding log text segmentation result; Constructing a log vocabulary according to the log text segmentation result; Determining the log features of the server to be tested according to the number of occurrences of each keyword represented by the log vocabulary; Determine, based on the environmental monitoring data, a calculation result of a characteristic value of an environmental indicator of the server to be tested; Determining the environmental time series characteristics of the server to be tested according to the characteristic value calculation result of the environmental indicator; Determining static characteristics of the server to be tested according to the configuration information; The performance time series characteristics, log characteristics, environment time series characteristics and static characteristics of the server to be tested are integrated to obtain the performance detection characteristics of the server to be tested.
3. The method according to claim 2, characterized in that The step of determining the log feature of the server to be tested according to the number of occurrences of each keyword represented by the log vocabulary includes: Based on the following formula, the log characteristics of the server to be tested are determined: Among them, TF-IDF(t,d) represents the log feature corresponding to keyword t in system log d, TF(t,d) represents the number of times keyword t appears in system log d, N represents the total number of system logs, and DF(t) represents the number of system logs containing keyword t.
4. The method according to claim 2, characterized in that: The step of determining the calculation result of the characteristic value of the environmental indicator of the server to be tested according to the environmental monitoring data includes: The characteristic value calculation result of the environmental indicator of the server to be tested is determined based on the following formula: Wherein, P represents the characteristic value calculation result of the environmental index, T represents temperature, M represents humidity, V represents voltage, the environmental monitoring data at least includes temperature, humidity and voltage, and Var represents the calculation of the coefficient of variation.
5. The method according to claim 1, characterized in that The step of inputting the target embedding vector sequence into a target performance detection model, and determining the performance detection result of the server to be tested according to the target embedding vector sequence based on the target performance detection model, comprises: Inputting the target embedding vector sequence into the target performance detection model, performing dot product attention calculation on each subword vector in the target embedding vector sequence based on the self-attention layer, and obtaining an attention representation of each subword vector; Inputting the attention representation of each of the sub-word vectors into a feed-forward network layer, so as to perform linear transformation and non-linear activation on the attention representation of each of the sub-word vectors based on the feed-forward network layer, and obtain a hidden state of each of the sub-word vectors; Determining a performance test result of the server to be tested according to the hidden state of each of the subword vectors; Among them, the target performance detection model at least includes the self-attention layer and the feedforward network layer.
6. The method according to claim 5, characterized in that The step of determining the performance test result of the server to be tested according to the hidden state of each of the subword vectors includes: The performance test result of the server to be tested is determined based on the following formula: s=h s W+b Among them, s represents the performance test result of the server to be tested, h s represents the hidden state of the last subword vector in the target embedding vector sequence, W represents the weight matrix, b represents the bias term, and the hidden state of the last subword vector includes the hidden states of all subword vectors in the target embedding vector sequence.
7. The method according to claim 5, characterized in that The method further comprises: Determine the performance score and status score of the server to be tested according to the performance test result of the server to be tested; A performance detection report of the server to be tested is generated according to the performance score and the status score of the server to be tested.
8. A server performance detection device, characterized in that: include: The acquisition module is used to obtain the performance monitoring data, system logs, environment monitoring data and configuration information of the server under test; A feature generation module, used to generate performance detection features of the server to be tested based on the performance monitoring data, system logs, environment monitoring data and configuration information; A feature conversion module, used for converting each subword in the performance detection feature into an embedding vector according to the semantic features and grammatical features of each subword in the performance detection feature, so as to obtain a target embedding vector sequence corresponding to the performance detection feature; The detection module is used to input the target embedding vector sequence into a target performance detection model, and determine the performance detection result of the server to be tested based on the target embedding vector sequence based on the target performance detection model.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.
