Server usage determination method, outlier detection method and device
By using Grubbs analysis to detect outliers in server usage and determining normal values based on the locations of outliers, the problem of low-cost and fast calculation of server usage in existing technologies is solved, thereby improving accuracy and efficiency.
Patent Information
- Application Number
- CN202210048522.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-01-17
AI Technical Summary
Existing technologies cannot quickly and accurately determine server utilization at low cost, especially when there are outliers, which affects the accuracy of the calculation.
The Grubbs analysis method is used to detect abnormal values in server utilization values by presetting the signal rate. The normal value of server utilization is determined according to the position of the abnormal value in the time slice, and then the server utilization of the current time slice is calculated.
It can quickly and accurately identify and handle outliers at low cost, improving the accuracy and efficiency of server utilization calculation.
Smart Images

Figure CN114443450B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method for determining server usage rate, and a method and device for detecting outliers. Background Art
[0002] The utilization rates of various computer server resources usually fluctuate. In addition to normal fluctuations caused by increased business volume, fluctuations caused by the start and stop of certain scheduled tasks or processes, and fluctuations due to program malfunctions, there are also abnormal values that have no meaning at all (such as omissions in the utilization rates of various computer server resources at a certain point in time due to various reasons such as network and program). These abnormal values will interfere with the use, calculation and analysis of server utilization.
[0003] Currently, to calculate server utilization, either a high-cost, long-cycle machine learning method is used, which identifies outliers before calculating the server utilization; or a low-reliability method is used, which directly takes the average of the time slice utilization without identifying outliers and directly calculates the average of all utilization rates within the time slice to calculate the server utilization. There is currently no method that has low development costs and can quickly and accurately calculate server utilization. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a server utilization determination method, an outlier detection method and a device to improve the problem that "the existing technology cannot quickly and accurately determine the server utilization rate at a low cost."
[0005] The present invention is achieved in that:
[0006] In a first aspect, an embodiment of the present application provides a method for determining server usage, the method comprising: obtaining all server usage values for a current time slice; performing a Grubbs analysis on all server usage values based on a preset first confidence rate to detect abnormal values in all server usage values; determining a normal server usage value for calculating the server usage for the current time slice based on the position of the abnormal value in the current time slice; and determining the server usage for the current time slice based on the normal server usage value.
[0007] In an embodiment of the present application, a Grubbs analysis is performed on all server utilization values in the current time slice based on a preset first confidence rate, enabling rapid and accurate identification of large error values (i.e., outliers) in the current time slice. Based on the location of the outlier in the current time slice, a normal server utilization value, used to calculate the server utilization for the current time slice, is determined. Furthermore, based on the determined normal server utilization value, the server utilization for the current time slice can be accurately determined. Therefore, compared to prior art machine learning methods that employ high-cost, long-development cycles, which calculate server utilization after identifying outliers, and the low-confidence approach of directly taking the average of the time slice utilization, the present embodiment can rapidly and accurately determine server utilization at a lower cost.
[0008] In combination with the technical solution provided in the first aspect above, in some possible implementations, determining the normal server usage value for calculating the server usage of the current time slice based on the position of the abnormal value in the current time slice includes: if there is an abnormal value located at the upper boundary of the current time slice, obtaining all server usage values of the previous time slice, where the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order; for each abnormal value located at the upper boundary of the current time slice, performing a Grubbs analysis on the abnormal value, combining all server usage values of the previous time slice, all server usage values in the current time slice that precede the abnormal value, and the first confidence rate; and determining whether the abnormal value is the normal server usage value based on the Grubbs analysis result of the abnormal value.
[0009] In this embodiment of the present application, if an outlier value is located at the upper boundary of the current time slice, it indicates that the outlier value may be misjudged. In this case, it is necessary to obtain the usage rates of all servers in the previous time slice and determine whether the outlier value is misjudged based on the usage rates of all servers in the previous time slice, the usage rates of all servers in the current time slice that precede the outlier value, and the first confidence rate. That is, if the outlier value is misjudged, it will be a normal server usage value and should be included in the calculation of the server usage rate of the current time slice. In this way, the outlier value at the upper boundary of the current time slice can be tested, thereby obtaining a more accurate server usage rate for the current time slice.
[0010] In combination with the technical solution provided in the first aspect above, in some possible implementations, the utilization rate values of all servers in the previous time slice and the abnormal value in the current time slice are calculated. All server usage values before and the first confidence rate, performing Grubbs analysis on the abnormal value, including: obtaining all server usage values of the previous time slice, the server usage values of the abnormal value in the current time slice, All previous server usage values and the abnormal value Average value and standard deviation ; According to the average value , standard deviation , the abnormal value and Grubbs' formula to obtain the ratio ; Based on the utilization rate values of all servers in the previous time slice and the abnormal value in the current time slice All previous server usage values and the abnormal value The total number and the first confidence rate are used to obtain the Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Less than or equal to the Grubbs critical value , then the abnormal value is the normal usage value of the server.
[0011] In the embodiment of the present application, the above method can quickly and accurately detect the abnormal value located at the upper boundary of the current time slice again.
[0012] In combination with the technical solution provided in the first aspect above, in some possible implementation methods, the normal value of server utilization used to calculate the server utilization of the current time slice is determined based on the position of the abnormal value in the current time slice, including: if there is an abnormal value that is not located at the upper boundary of the current time slice, then the remaining server utilization values except for the server utilization value located at the upper boundary and all abnormal values not located at the current time slice are determined to be normal server utilization values, and the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order.
[0013] In this embodiment of the present application, if an abnormal value detected in the current time slice is not located at the upper boundary of the current time slice, then the abnormal value is not considered a normal server utilization value, i.e., the abnormal value is not included in the calculation of the server utilization rate for the current time slice. This method allows for rapid determination of the normal utilization values of each server that is not located at the upper boundary of the current time slice, thereby improving the efficiency of calculating server utilization rates.
[0014] In combination with the technical solution provided in the first aspect above, in some possible implementations, the method further includes: determining whether an abnormal value is detected at the lower boundary of the previous time slice, the lower boundary being the last time period of multiple time periods divided by the time slice in chronological order; if an abnormal value is detected at the lower boundary of the previous time slice, determining whether the abnormal value is misjudged; if the abnormal value is misjudged, re-determining the server utilization rate of the previous time slice based on the normal values of all server utilization rates in the previous time slice and the abnormal value.
[0015] In an embodiment of the present application, through the above method, the abnormal value located at the lower boundary of the previous time slice can be detected again to determine whether the abnormal value is misjudged; and in the case where it is determined that the abnormal value is misjudged, the abnormal value is added to the calculation of the server utilization rate of the previous time slice, thereby correcting the server utilization rate of the previous time slice, thereby improving the accuracy of the server utilization rate of the previous time slice.
[0016] In combination with the technical solution provided in the first aspect above, in some possible implementations, determining whether the outlier is misjudged includes: performing a Grubbs analysis on the outlier based on all server usage values after the outlier at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate; and determining whether the outlier is misjudged based on the result of the Grubbs analysis of the outlier.
[0017] In this embodiment of the present application, based on all server usage values following the outlier value at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate, a Grubbs analysis can be performed on the outlier value. Specifically, the Grubbs analysis determines whether the outlier value has a large error value among all the aforementioned server usage values, thereby determining whether the outlier value is misclassified. In this way, the outlier value can be quickly and accurately retested to determine whether it is misclassified.
[0018] In combination with the technical solution provided in the first aspect above, in some possible implementations, before performing Grubbs analysis on the utilization rates of all servers according to a preset first confidence rate, the method further includes: determining whether a number of missed samples of the server utilization rates in the current time slice is less than or equal to a preset missed standard value.
[0019] In the embodiment of the present application, through the above-described method, when the number of omitted samples of the server usage rate in the current time slice is less than or equal to the omitted standard value, Grubbs analysis can be performed on the usage rates of all servers in the current time slice, thereby ensuring that the amount of data subjected to the Grubbs analysis is statistically significant. It can also be ensured that the omitted sample number does not affect the Grubbs analysis of the usage rates of all servers in the current time slice, that is, does not affect the determination of outliers in the current time slice, thereby ensuring the accuracy of the calculated server usage rate for the current time slice.
[0020] In combination with the technical solution provided in the first aspect above, in some possible implementations, the method also includes: if the number of sampling omissions is greater than the omission standard value, then calculating the server utilization rate of the current time slice according to a preset configuration strategy, wherein the configuration strategy includes: using the maximum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the maximum utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum utilization rate value in the current time slice as the server utilization rate of the current time slice, or calculating all utilization rate values in the current time slice to obtain an average value, and using the average value as the server utilization rate of the current time slice.
[0021] In an embodiment of the present application, if the number of sample omissions of the server utilization rate of the current time slice is greater than the omission standard value, the server utilization rate of the current time slice is obtained according to the above-mentioned preset configuration strategy, thereby ensuring the accuracy of the server utilization rate of the current time slice.
[0022] In a second aspect, an embodiment of the present application provides an outlier detection method, the method comprising: obtaining all collected data of a current time slice, the collected data being continuously collected data in a time sequence; performing a Grubbs analysis on all the collected data according to a preset second confidence rate to detect outliers in all the collected data; determining all data for re-detecting the outlier based on the position of the outlier in the current time slice; and re-detecting the outlier based on all the data and the second confidence rate to verify the outlier.
[0023] In this embodiment of the present application, by performing Grubbs analysis on all collected data in the current time slice, outliers in the current time slice can be quickly and accurately identified. Furthermore, based on the outlier's location in the current time slice, whether to retest the outlier can be determined, further improving the accuracy of outlier identification.
[0024] In combination with the technical solution provided in the second aspect above, in some possible implementations, the abnormal value is located at the upper boundary of the current time slice, and the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order; determining all data for re-detecting the abnormal value based on the position of the abnormal value in the current time slice includes: determining the abnormal value, all collected data before the abnormal value in the current time slice, and all collected data in the previous time slice as all data.
[0025] In the embodiment of the present application, the accuracy of re-detection of abnormal values is guaranteed through the above method.
[0026] In combination with the technical solution provided in the second aspect above, in some possible implementations, the method further includes: determining whether an abnormal value is detected at the lower boundary of the previous time slice, the lower boundary being the last time period of multiple time periods divided by the time slice in chronological order; if an abnormal value is detected at the lower boundary of the previous time slice, determining whether the abnormal value is misjudged; if the abnormal value is misjudged, re-detecting the abnormal value based on all collected data of the current time slice, all collected data after the abnormal value in the previous time slice, and the second confidence rate to verify the abnormal value.
[0027] In the embodiment of the present application, through the above method, the outlier located at the lower boundary of the previous time slice can be detected again to determine whether the outlier was misjudged in the first detection, thereby improving the accuracy of determining the outlier.
[0028] In combination with the technical solution provided in the second aspect above, in some possible implementations, the outlier is detected again based on all the data and the second confidence rate, including: obtaining the average value of all the data and standard deviation ; According to the average value , standard deviation , the outliers in the outlier detection result and Grubbs' formula to obtain the ratio ; According to the second confidence rate and the total number of all data, obtain the Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Greater than the Grubbs critical value , then the abnormal value The test result is correct.
[0029] In the embodiment of the present application, the above-mentioned method can quickly and accurately verify the abnormal value that needs to be re-detected in the current time slice.
[0030] In a third aspect, an embodiment of the present application provides a server usage determination device, the device comprising: a first acquisition module, configured to obtain all server usage values for a current time slice; a first processing module, configured to perform a Grubbs analysis on all server usage values according to a preset first confidence rate to detect abnormal values in all server usage values; and determine a normal server usage value for calculating the server usage for the current time slice based on the position of the abnormal value in the current time slice; and a determination module, configured to determine the server usage for the current time slice based on the normal server usage value.
[0031] In a fourth aspect, an embodiment of the present application provides an outlier detection device, comprising: a second acquisition module, configured to acquire all collected data of a current time slice, wherein the collected data is continuously collected data in a time sequence; a second processing module, configured to perform a Grubbs analysis on all collected data based on the total number of all collected data of the current time slice and a preset second confidence rate to detect outliers in all collected data; and to determine all data for re-detecting the outlier based on the position of the outlier in the current time slice; and a re-check module, configured to re-detect the outlier based on all data and the second confidence rate to verify the outlier.
[0032] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the processor and the memory being connected; the memory being used to store programs; the processor being used to run the programs stored in the memory, executing methods provided in some possible implementations of the above-mentioned first aspect embodiment, or executing methods provided in some possible implementations of the above-mentioned second aspect embodiment.
[0033] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when run by a computer, executes methods provided by some possible implementations of the above-mentioned first aspect embodiment, or executes methods provided by some possible implementations of the above-mentioned second aspect embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 A flowchart of the steps of a method for determining server usage provided in an embodiment of the present application.
[0036] Figure 2 A flowchart of the steps of an outlier detection method provided in an embodiment of the present application.
[0037] Figure 3 A module block diagram of a server usage determination device provided in an embodiment of the present application.
[0038] Figure 4 A block diagram of an outlier detection device according to an embodiment of the present invention.
[0039] Figure 5 A module block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0041] Since the existing technology cannot quickly and accurately determine the server utilization rate at a low cost, the inventors of this application have proposed the following embodiments to solve the above problems after research and exploration.
[0042] The following combination Figure 1 The specific process and steps of a method for determining server usage are described. The embodiment of the present application provides a method for determining server usage, which can be applied to the calculation of usage of various servers.
[0043] It should be noted that the server usage determination method provided in the embodiment of the present application is not based on Figure 1 The order shown below is a limitation.
[0044] Step S101: Obtain the usage values of all servers in the current time slice.
[0045] The above-mentioned time slice is a time period set at a preset duration. The time slice can be set to different lengths based on the preset sampling frequency (i.e., the frequency of collecting server usage values). For example, if the preset sampling frequency is set to 1s and the time slice length is set to 5s, then each time slice is 5s long, and each time slice contains 5 sampling time points and 5 collected server usage values. The time of the previous time slice is before the current time slice, and the previous time slice and the current time slice are continuous in time. For example, if the current time slice corresponds to 8:00:06-8:00:10, then the time of the previous time slice corresponds to 8:00:01-8:00:05. It should be noted that the number of all server usage values contained in the above-mentioned time slices is a multiple of 5.
[0046] The above-mentioned all server utilization values of the current time slice are all server utilization values collected at the preset sampling frequency within the current time slice. For example, if the length of the current time slice is 5 seconds and the preset sampling frequency is 1 second, then the current time slice includes 5 server utilization values. In addition, the server utilization rate represents the utilization of various physical resources of the server, such as CPU (Central Processing Unit) utilization, memory utilization, disk utilization, etc. Accordingly, the above-mentioned server utilization value can be the CPU utilization value corresponding to each second, or the memory utilization value corresponding to each second, or the disk utilization value corresponding to each second, etc. It should be noted that the sampling frequency can also be set to other times, such as 10 seconds, 20 seconds, and 60 seconds.
[0047] In addition, the acquisition of all server utilization values for the current time slice can be real-time collection, or it can be obtained by dividing the historically stored server utilization data into corresponding time slices in chronological order, and then obtaining the server utilization values corresponding to the divided time slices in sequence as all server utilization values corresponding to the current time slice. This is not limited here. It should also be noted that when obtaining the utilization values of various server resources of the server, the utilization values corresponding to each resource can be directly collected, or only the current utilization index values of each resource (such as CPU, memory, disk input and output, etc.) can be obtained instead of the utilization value. In this case, the index value needs to be converted into the corresponding utilization value. For example, for 4G of memory, the current utilization index value that can only be obtained is 2G. Therefore, based on the above-mentioned utilization index value 2G and the memory size 4G, the utilization value of the memory can be obtained as 50%.
[0048] In practical applications, the collected real-time server usage data or historical computer usage data can be formatted to obtain a usage indicator dictionary corresponding to the current time slice. , the above dictionary Including sampling time points to , and the server utilization value corresponding to the above time point to ,Right now to is the utilization rate of all servers in the current time slice. If the sampling time point is missing (i.e., sampling is omitted), then Assemble the dictionary with -1, for example: the preset sampling frequency is 1s, and the current time slice dictionary is , the current time slice dictionary include to , that is, the time slice length is 10s, and Corresponding It should be noted that when a sampling time point in a time slice has a missing sampling value, it means that the corresponding server utilization value is not collected at the sampling time point, and the sampling time point will not be included in the subsequent calculations of the server utilization rate.
[0049] Step S102: performing Grubbs analysis on all server usage values according to a preset first confidence rate to detect abnormal values in all server usage values.
[0050] Optionally, before step S102 , it is determined that the number of missed samples of the server usage rate in the current time slice is less than or equal to a preset missed standard value.
[0051] The above-mentioned omission standard value is the quotient of the total number of sampling time points in the time slice divided by 5, that is, if the length of the sampling time slice is 5 seconds, the omission standard value is 1; if the length of the sampling time slice is 10 seconds, the omission standard value is 2.
[0052] In the embodiment of the present application, after obtaining the usage rates of all servers in the current time slice, determining whether the number of missed samples of the server usage rates in the current time slice is less than or equal to the missed criteria value can ensure that the amount of data used for the Grubbs analysis is statistically significant, thereby ensuring the accuracy of the subsequently calculated server usage rates for the current time slice.
[0053] Continuing with the example in step S101 above, since the current time slice dictionary The total number of sampling time points is 10, so the omission standard value is 2. After that, we can get the number of omissions as 1 (i.e. Time point sampling omissions), by comparing the number of sampling omissions with the omission standard value, it can be determined that the number of sampling is less than the omission standard value.
[0054] It should be noted that if the number of sampling omissions is greater than the omission standard value, the server utilization rate of the current time slice is calculated according to the preset configuration strategy, wherein the configuration strategy includes: using the maximum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the maximum utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum utilization rate value in the current time slice as the server utilization rate of the current time slice, or calculating all utilization rate values in the current time slice to obtain an average value, and using the average value as the server utilization rate of the current time slice.
[0055] Among them, the minimum utilization value in the above-mentioned current time slice refers to the server utilization value corresponding to the first sampling time point in the current time slice; the maximum utilization value in the above-mentioned current time slice refers to the server utilization value corresponding to the last sampling time point in the current time slice.
[0056] In addition, it should be noted that the first confidence rate can select different confidence rates according to different application scenarios of the server utilization rate of the current time slice. For example: when issuing an early warning for resource utilization based on the server utilization rate of the current time slice, the first confidence rate can be set to 99%; or when analyzing network failures based on the server utilization rate of the current time slice, the first confidence rate can be set to 90%.
[0057] Step S102 may specifically include:
[0058] Based on the first confidence rate and the total number of all server utilization values in the current time slice, the corresponding Grubbs critical value is found in the Grubbs critical table. Among them, some of the Grubbs critical tables are shown in Table 1.
[0059] Table 1
[0060]
[0061] As shown in Table 1, if the first confidence rate is 99% and the total number of server utilization values corresponding to the current time slice is 5, the corresponding Grubbs critical value is 1.749.
[0062] Find the corresponding Grubbs critical value Then calculate the utilization value of all servers in the current time slice Average value and standard deviation , and then put each server utilization rate into the Grubbs formula to obtain the corresponding ratio . The Grubbs formula is as follows:
[0063] (1)
[0064] In formula (1), ,in, The total usage value of all servers in the current time slice. After that, the ratio and the corresponding Grubbs critical value Compare, if the ratio Greater than the Grubbs critical value It indicates the server utilization value If there is a large error, the server usage value Determine it as an outlier. In this way, the outliers in all server usage values in the current time slice can be detected quickly and accurately.
[0065] Continuing the above example, according to the preset first confidence rate, the current time slice dictionary All non-1 Grubbs analysis of the values to 、 to Grubbs analysis is performed to detect the current time slice dictionary For example, the abnormal value detected is 、 、 .
[0066] After the abnormal value is detected, the method may proceed to step S103 .
[0067] Step S103: determining a normal value of server usage for calculating the server usage in the current time slice according to the position of the abnormal value in the current time slice.
[0068] Specifically, if there is an outlier at the upper boundary of the current time slice, all server usage values of the previous time slice are obtained, where the upper boundary is the first time period of multiple time periods divided into the time slice in chronological order. For each outlier at the upper boundary of the current time slice, a Grubbs analysis is performed on the outlier based on all server usage values of the previous time slice, all server usage values before the outlier in the current time slice, and the first confidence rate. Based on the result of the Grubbs analysis of the outlier, it is determined whether the outlier is a normal server usage value.
[0069] The setting of the upper and lower boundaries of the time slice is related to the length of the time slice. Specifically, the quotient of the total number of sampling time points divided by 5 can be used as the number of upper and lower boundaries. For example, if the number of sampling time points in a time slice is 5, the number of upper and lower boundaries of the time slice is both one, so the first sampling time point and the fifth sampling time point of the time slice are its upper and lower boundaries, respectively; if the number of sampling time points in a time slice is 10, the first and second sampling time points of the time slice are its upper boundary, and the ninth and tenth sampling time points of the time slice are its lower boundary; if the number of sampling time points in the time slice is 30, the first to sixth sampling time points of the time slice are its upper boundary, and the twenty-fourth to thirtieth sampling time points of the time slice are its lower boundary; if the number of sampling time points in the time slice is 60, the first to twelfth sampling time points of the time slice are its upper boundary, and the forty-eighth to sixtieth sampling time points of the time slice are its lower boundary.
[0070] Further, based on the usage values of all servers in the previous time slice, the usage values of all servers before the abnormal value in the current time slice, and the first confidence rate, performing Grubbs analysis on the abnormal value may specifically include: obtaining the usage values of all servers in the previous time slice, the usage values of all servers before the abnormal value in the current time slice, and the first confidence rate. All previous server usage values and the abnormal value Average value and standard deviation ; Based on the average , standard deviation , outliers and Grubbs' formula to obtain the ratio ; Based on the usage values of all servers in the previous time slice and the abnormal value in the current time slice All previous server usage values and the abnormal value The total number and first confidence rate of Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Less than or equal to the Grubbs critical value , then the outliers The method for performing Grubbs analysis on abnormal values can refer to the method for performing Grubbs analysis on all server usage values of the current time slice in step S102, and will not be described again here to avoid redundancy.
[0071] It should be noted that there can be one or more outliers at the upper boundary of the current time slice. When there are multiple outliers at the upper boundary of the current time slice, it is necessary to determine all the data for Grubbs analysis for each outlier, and then perform Grubbs analysis on each outlier separately to determine whether each outlier is misjudged. For example, if the current time slice is 60s long, the 1st to 12th sampling time points of the time slice are its upper boundary. If the outliers at the upper boundary of the current time slice are the server usage value corresponding to the 3rd second and the server usage value corresponding to the 8th second, then based on all the server usage values of the previous time slice, the 1st second of the current time slice, the server usage value corresponding to the 8th second, the server usage value corresponding to the 3rd second and the server usage value corresponding to the 8th second are outliers. A Grubbs analysis is performed on the server usage value corresponding to the third second (i.e., the outlier) based on the server usage values corresponding to the first to second seconds and the first confidence ratio, so as to determine whether the server usage value corresponding to the third second is a normal server usage value. A Grubbs analysis is also performed on the server usage value corresponding to the eighth second (i.e., the outlier) based on all server usage values of the previous time slice, the server usage values corresponding to the first to seventh seconds of the current time slice, and the first confidence ratio, so as to determine whether the server usage value corresponding to the eighth second is a normal server usage value.
[0072] It should also be noted that after testing each abnormal value located at the upper boundary of the current time slice (that is, after determining whether each abnormal value is misjudged), the normal value of the server usage rate at the upper boundary of the current time slice can be determined. For example: if the length of the current time slice is 60s, then the 1st to 12th sampling time points of the time slice are its upper boundary. If the abnormal value located at the upper boundary of the current time slice is the server usage rate value corresponding to the 3rd second and the server usage rate value corresponding to the 8th second, and after testing the above-mentioned server usage rate value corresponding to the 3rd second and the server usage rate value corresponding to the 8th second, it is obtained that the server usage rate value corresponding to the 3rd second is the normal server usage value, and the server usage value corresponding to the 3rd second is the abnormal value, then it can be determined that the server usage values corresponding to the 1st to 7th seconds and the 9th to 12th seconds of the current time slice are the normal server usage values corresponding to the upper boundary of the current time slice.
[0073] Through the above approach, each outlier at the upper boundary of the current time slice can be tested to determine whether the outlier was misclassified due to being at the boundary of the current time slice, thereby obtaining a more accurate server utilization rate for the current time slice. Furthermore, by performing a Grubbs analysis on the outlier using all server utilization values from the previous time slice, all server utilization values preceding the outlier in the current time slice, and the first confidence rate, the outlier can be more accurately tested to determine whether it was misclassified. Furthermore, performing a Grubbs analysis on the outlier allows for a quick and accurate re-test of outliers at the upper boundary of the current time slice.
[0074] Optionally, if there are abnormal values that are not located at the upper boundary of the current time slice, then the remaining server utilization values, excluding the server utilization values located at the upper boundary and all abnormal values that are not located at the upper boundary of the current time slice, are determined to be normal server utilization values, and the upper boundary is the first time period of the multiple time periods divided by the time slice in chronological order. For example: if the number of samples in the current time slice is 10, then the first and second sampling time points of the current time slice are its upper boundary. If the abnormal value is the server utilization value corresponding to the 10th sampling time point, then all server utilization values corresponding to the 3rd to 9th sampling time points can be determined to be normal server utilization values; if the abnormal value is the server utilization value corresponding to the 9th and 10th time points, then all server utilization values corresponding to the 3rd to 8th sampling time points can be determined to be normal server utilization values.
[0075] In this embodiment of the present application, if an outlier value is not at the upper boundary of the current time slice, then the outlier value is not considered a normal server utilization value, i.e., the outlier value is not included in the calculation of the server utilization rate for the current time slice. This method allows for rapid determination of the normal utilization values of servers that are not at the upper boundary of the current time slice, thereby improving the efficiency of calculating server utilization rates.
[0076] Furthermore, if there are both outliers that are at the upper boundary of the current time slice and outliers that are not at the upper boundary of the current time slice, it is necessary to determine the normal usage values of each server at the upper boundary based on the outliers that are at the upper boundary of the current time slice; and it is also necessary to determine the normal usage values of each server that are not at the upper boundary of the current time slice based on the outliers that are not at the upper boundary of the current time slice. It should be noted that the above-mentioned methods for determining the normal usage values of each server at the upper boundary and the method for determining the normal usage values of each server that are not at the upper boundary have been described above and will not be repeated here.
[0077] Continuing with the example in step S102 above, since the current time slice dictionary The abnormal value detected is 、 、 , so by judging the positions of the three abnormal values mentioned above, we can get At the upper boundary of the current time slice. At this time, get the dictionary of the previous time slice Corresponding usage values of all servers to ,according to to 、 and the first confidence rate, for Perform Grubbs analysis again. According to the results of Grubbs analysis, determine Is the server usage rate normal? is the normal value of server utilization, then the normal value of server utilization corresponding to the current time slice is to 、 、 In addition, due to is an abnormal value at the lower boundary of the current time slice, so Corresponding Put into the preset abnormal value collection array , which makes it easier to check whether there are any abnormal values at the lower boundary of the current time slice.
[0078] After determining the normal value of the server usage rate in the current time slice, the method may proceed to step S104.
[0079] Step S104: Determine the server utilization rate of the current time slice according to the normal value of the server utilization rate.
[0080] Specifically, the average of the obtained multiple server utilization normal values is calculated, and the average value is used as the server utilization of the current time slice. In this way, the server utilization of the current time slice can be obtained quickly and accurately.
[0081] Continuing with the example in step S104 above, the normal server usage rate corresponding to the current time slice is to 、 、 ,right to 、 、 By calculating the average value, you can get the server utilization rate of the current time slice.
[0082] It should be noted that in addition to detecting outliers in the current time slice and obtaining the server utilization rate of the current time slice, the outlier can be detected again based on the location of the outlier in the previous time slice, and the server utilization rate of the previous time slice can be corrected based on the detection results.
[0083] Specifically, determine whether an abnormal value is detected at the lower boundary of the previous time slice, where the lower boundary is the last time period of multiple time periods divided by the time slice in chronological order; if an abnormal value is detected at the lower boundary of the previous time slice, determine whether the abnormal value is misjudged; if the abnormal value is misjudged, re-determine the server utilization rate of the previous time slice based on the normal values of all server utilization rates in the previous time slice and the abnormal value.
[0084] In an embodiment of the present application, through the above method, the abnormal value located at the lower boundary of the previous time slice can be detected again to determine whether the abnormal value is misjudged; and in the case that the abnormal value is misjudged, the abnormal value is added to the calculation of the server utilization rate of the previous time slice, thereby correcting the server utilization rate of the previous time slice, thereby improving the accuracy of the server utilization rate of the previous time slice.
[0085] Optionally, determining whether the outlier is misjudged may specifically include: performing a Grubbs analysis on the outlier based on all server usage values after the outlier at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate; and determining whether the outlier is misjudged based on a result of the Grubbs analysis of the outlier.
[0086] The method for performing Grubbs analysis on the outlier value based on all server usage values following the outlier value at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate is similar to the method for performing Grubbs analysis on all server usage values obtained in the current time slice in step S102. This method will not be described here to avoid redundancy. It should be noted that if the number of missed samples of the server usage in the current time slice is greater than the missed sample threshold, the outlier value at the lower boundary of the previous time slice will not be detected.
[0087] By using the above method, the above abnormal value can be detected again quickly and accurately, thereby determining whether the abnormal value is misjudged.
[0088] Continuing with the example of step S104 above, obtain the abnormal value collection array corresponding to the previous time slice If the array is detected If the sampling time point is stored in , it can be determined that there is an abnormal value at the lower boundary of the previous time slice. For example: abnormal value collection array There are ,but Corresponding is the abnormal value of the lower boundary of the previous time slice. 、 、 to 、 to and the first confidence rate, for Perform Grubbs analysis and determine whether the outlier is misjudged based on the Grubbs analysis result. If misjudged, The server utilization rate of the previous time slice is re-determined as the normal value of the server utilization rate.
[0089] The above server utilization determination method is applied to real-time collected server utilization data or historically stored server utilization data. When only the historically stored server utilization data is used to calculate the server utilization for the current time slice, the following method can also be used:
[0090] The historically stored server usage data is divided into time slices in chronological order, thereby obtaining server usage values corresponding to multiple different time slices.
[0091] When determining the server usage corresponding to the current time slice, Grubbs analysis is performed on all server usages of the current time slice according to a preset third confidence rate to detect abnormal values in all server usages.
[0092] After detecting an outlier among all the server usage rates, the location of the outlier is determined. If the outlier is located at the upper boundary of the current time slice, a Grubbs analysis is performed on the outlier based on the usage rates of all servers in the previous time slice, all server usage values preceding the outlier in the current time slice, and the third confidence level. Based on the result of the Grubbs analysis, it is determined whether the outlier is a normal server usage value. If the outlier is located at the lower boundary of the current time slice, a Grubbs analysis is performed on the outlier based on the usage rates of all servers in the next time slice, all server usage values following the outlier in the current time slice, and the third confidence level. Based on the result of the Grubbs analysis, it is determined whether the outlier is a normal server usage value. After all outliers in the current time slice have been determined, the server usage values other than the outlier are determined to be normal server usage values.
[0093] The server utilization rate of the current time slice is determined according to the normal value of the server utilization rate of the current time slice.
[0094] In addition, after determining the server utilization rate of the current time slice, the server utilization rate may be applied accordingly. The following are three different application scenarios.
[0095] The first application scenario involves displaying the server utilization rate for the current time slice and updating the utilization curve based on this server utilization rate. Accordingly, the revised service utilization rate for the previous time slice can also be updated and displayed, and the utilization curve can be updated based on the most recently acquired server utilization rate. Furthermore, when there are no outliers at the lower boundary of the current time slice, the server utilization rate for the current time slice is directly used to determine whether it exceeds the alarm threshold. If there are outliers at the lower boundary of the current time slice, after verifying the outliers, the server utilization rate for the most recently acquired time slice is used to determine whether it exceeds the alarm threshold. If the server utilization rate exceeds the alarm threshold, an alarm message is sent to the staff.
[0096] The second application scenario is to store the server utilization rate of the current time slice in the database, and perform trend analysis on the data stored in the database through the big data prediction system to predict the resource utilization trend in the next year in units of months.
[0097] The third application scenario involves storing the acquired server utilization rate for the current time slice in a database. Using the network fault system, this data is combined with the network fault handling ticket attribute information from the past year, network equipment operation and maintenance records, and various system traffic records to analyze the likelihood of network indicator anomalies, as well as the number and scope of affected devices, when the aforementioned event occurs. The aforementioned network fault handling ticket attribute information includes the Internet Protocol (IP) address, system name, fault occurrence time, fault recovery time, and fault type; the aforementioned network equipment operation and maintenance records include the IP address, system name, operation and maintenance operation time, and operation type.
[0098] See also Figure 2 Based on the same inventive concept, an embodiment of the present application provides an outlier detection method, which can be applied to scenarios where outliers are detected in various types of continuously collected and time-sequential data, such as: scenarios where outliers are detected in physical properties of objects such as air, such as temperature, humidity, PM2.5, etc., which are continuously collected and time-sequential, or scenarios where business volume outliers are detected in software services such as services provided by computer programs, which are continuously collected and time-sequential.
[0099] The following combination Figure 2 The specific process and steps of an outlier detection method are described. It should be noted that the outlier detection method provided in the embodiment of the present application is not based on Figure 2The order shown below is a limitation.
[0100] Step S201: Acquire all collected data of the current time slice, where the collected data is continuously collected data in time sequence.
[0101] For the description of the above time slice, current time slice and previous time slice, please refer to the description of the time slice in the aforementioned step S101. To avoid redundancy, they will not be described here again.
[0102] Optionally, after obtaining all collected data of the current time slice, it is determined whether the number of sample omissions of the current time slice is less than or equal to the omission standard value.
[0103] In an embodiment of the present application, after obtaining all the collected data of the current time slice, it is determined that the number of sampling omissions in the current time slice is less than or equal to the omission standard value, which can ensure that the above-mentioned number of sampling omissions will not affect subsequent operations, thereby ensuring the accuracy of the subsequently determined abnormal values.
[0104] After all collected data are acquired, the method may proceed to step S202 .
[0105] Step S202: performing Grubbs analysis on all collected data according to a preset second confidence rate to detect abnormal values in all collected data.
[0106] For the determination of the second confidence rate and the method of performing the Grubbs analysis based on all collected data, please refer to the description in the aforementioned step S102 , which will not be described again here to avoid redundancy.
[0107] In the embodiment of the present application, the above method can quickly and accurately determine the abnormal values in all collected data of the current time slice.
[0108] After detecting all abnormal values in the collected data, the method may proceed to step S203 .
[0109] Step S203: determining all data for re-detecting the abnormal value according to the position of the abnormal value in the current time slice.
[0110] Specifically, the outlier is located at the upper boundary of the current time slice, and the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order. The outlier, all collected data before the outlier in the current time slice, and all collected data in the previous time slice are determined to be all data.
[0111] Step S204: Based on all the data and the second confidence rate, the outlier is detected again to verify the outlier.
[0112] Specifically, based on all the data and the second confidence rate, re-detecting the outlier may specifically include: obtaining the average value of all the data and standard deviation ; Based on the average , standard deviation , outliers in outlier detection results and Grubbs' formula to obtain the ratio ; Get the Grubbs critical value based on the second confidence rate and the total number of all data ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Greater than the Grubbs critical value , then the outliers It should be noted that the above method for re-detecting abnormal values can refer to the Grubbs method of obtaining the utilization values of all servers in the current time slice in step S102, so it will not be described here to avoid redundancy.
[0113] In the embodiment of the present application, the above-mentioned method can quickly and accurately verify the abnormal value that needs to be re-detected in the current time slice.
[0114] It should be noted that, in addition to detecting outliers in the current time slice, outliers in the previous time slice can also be detected.
[0115] Specifically, a determination is made as to whether an outlier was detected at the lower boundary of the previous time slice, where the lower boundary is the last time period of the multiple time periods divided into the time slice in chronological order. If an outlier was detected at the lower boundary of the previous time slice, a determination is made as to whether the outlier was misidentified. If the outlier was misidentified, the outlier is re-detected based on all collected data in the current time slice, all collected data following the outlier in the previous time slice, and the second confidence rate to verify the outlier. The outlier detection method may employ the Grubbs analysis method. It should be noted that the specific detection method can refer to the aforementioned method for detecting an outlier at the upper boundary of the current time slice, and will not be further described here to avoid redundancy.
[0116] When an outlier is detected at the lower boundary of the previous time slice, the outlier is re-detected based on all the collected data of the current time slice, all the collected data after the outlier in the previous time slice, and the second confidence rate. This makes it possible to determine whether the outlier was misjudged in the first detection, thereby improving the accuracy of determining the outlier.
[0117] The above-mentioned outlier detection methods are applied to real-time data or historically stored data. When only outlier detection is performed on historically stored data, the following methods can also be used:
[0118] The historically stored data is divided into time slices in chronological order, thereby obtaining the collected data corresponding to multiple time slices.
[0119] According to the preset fourth confidence rate, Grubbs analysis is performed on all collected data of the current time slice to detect abnormal values in all the collected data.
[0120] After detecting an outlier in all the collected data, the location of the outlier is determined. If the outlier is located at the upper boundary of the current time slice, a Grubbs analysis is performed on the outlier based on all the collected data from the previous time slice, all the collected data before the outlier in the current time slice, and the fourth confidence ratio to verify the outlier. If the outlier is located at the lower boundary of the current time slice, a Grubbs analysis is performed on the outlier based on all the collected data from the next time slice, all the collected data after the outlier in the current time slice, and the fourth confidence ratio to verify the outlier.
[0121] See also Figure 3 Based on the same inventive concept, an embodiment of the present application further provides a server usage determination device 100 , which includes: a first acquisition module 101 , a first processing module 102 and a determination module 103 .
[0122] The first acquisition module 101 is configured to acquire usage values of all servers in the current time slice.
[0123] The first processing module 102 is configured to perform a Grubbs analysis on all server usage values according to a preset first confidence rate to detect abnormal values in all server usage values; and determine a normal server usage value for calculating the server usage in the current time slice based on the position of the abnormal value in the current time slice.
[0124] The determination module 103 is configured to determine the server utilization rate of the current time slice according to the normal value of the server utilization rate.
[0125] Optionally, the first processing module 102 is specifically configured to, if there is an abnormal value located at the upper boundary of the current time slice, obtain all server usage values of the previous time slice, where the upper boundary is the first time period of multiple time periods divided into the time slice in chronological order; perform a Grubbs analysis on each abnormal value located at the upper boundary of the current time slice, combining all server usage values of the previous time slice, all server usage values before the abnormal value in the current time slice, and the first confidence rate; and determine whether the abnormal value is a normal server usage value based on the Grubbs analysis result of the abnormal value.
[0126] Optionally, the first processing module 102 is specifically configured to obtain the usage values of all servers in the previous time slice, the abnormal value in the current time slice, and the server usage value in the previous time slice. All previous server usage values and the abnormal value Average value and standard deviation ; Based on the average , standard deviation , outliers and Grubbs' formula to obtain the ratio ; Based on the usage values of all servers in the previous time slice and the abnormal value in the current time slice All previous server usage values and the abnormal value The total number and first confidence rate of Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Less than or equal to the Grubbs critical value , then the outliers This is the normal value of server usage.
[0127] Optionally, the first processing module 102 is specifically used to determine that if there is an abnormal value that is not located at the upper boundary of the current time slice, the remaining server utilization values excluding the server utilization values located at the upper boundary and all abnormal values that are not located at the upper boundary of the current time slice are normal server utilization values, and the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order.
[0128] Optionally, the determination module 103 is also used to determine whether an abnormal value is detected at the lower boundary of the previous time slice, where the lower boundary is the last time period of multiple time periods divided by the time slice in chronological order; if an abnormal value is detected at the lower boundary of the previous time slice, then determine whether the abnormal value is misjudged; if the abnormal value is misjudged, then re-determine the server utilization rate of the previous time slice based on the normal values of all server utilization rates in the previous time slice and the abnormal value.
[0129] Optionally, the determination module 103 is specifically configured to perform a Grubbs analysis on the outlier value based on all server usage values after the outlier value at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate; and determine whether the outlier value is misjudged based on the Grubbs analysis result of the outlier value.
[0130] Optionally, the first acquisition module 101 is further configured to determine whether the number of missed samples of the server usage in the current time slice is less than or equal to a missed standard value before performing Grubbs analysis on the usage of all servers according to a preset first confidence rate.
[0131] Optionally, the first acquisition module 101 is also used to calculate the server utilization rate of the current time slice according to a preset configuration strategy if the number of sampling omissions is greater than the omission standard value, wherein the configuration strategy includes: using the maximum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the maximum utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum utilization rate value in the current time slice as the server utilization rate of the current time slice, or calculating all utilization rate values in the current time slice to obtain an average value, and using the average value as the server utilization rate of the current time slice.
[0132] See also Figure 4 Based on the same inventive concept, an embodiment of the present application further provides an outlier detection device 200 , which includes: a second acquisition module 201 , a second processing module 202 and a re-checking module 203 .
[0133] The second acquisition module 201 is used to acquire all collected data of the current time slice, where the collected data is continuously collected and has a time sequence.
[0134] The second processing module 202 is configured to perform a Grubbs analysis on all collected data based on the total number of all collected data in the current time slice and a preset second confidence rate to detect outliers in all collected data; and determine all data to be re-detected for the outlier based on the location of the outlier in the current time slice.
[0135] The recheck module 203 is configured to recheck the abnormal value based on all the data and the second confidence rate to verify the abnormal value.
[0136] Optionally, the second processing module 202 is specifically used to determine the outlier, all collected data in the current time slice before the outlier, and all collected data in the previous time slice as all data, wherein the outlier is located at the upper boundary of the current time slice, and the upper boundary is the first time period of multiple time periods divided by the time slice in chronological order.
[0137] Optionally, the re-check module 203 is also used to determine whether an abnormal value is detected at the lower boundary of the previous time slice, where the lower boundary is the last time period of multiple time periods divided by the time slice in chronological order; if an abnormal value is detected at the lower boundary of the previous time slice, it is determined whether the abnormal value is misjudged; if the abnormal value is misjudged, the abnormal value is re-detected based on all the collected data of the current time slice, all the collected data after the abnormal value in the previous time slice and the second confidence rate to verify the abnormal value.
[0138] Optionally, the recheck module 203 is specifically used to obtain the average value of all data and standard deviation ; Based on the average , standard deviation , outliers in outlier detection results and Grubbs' formula to obtain the ratio ; Get the Grubbs critical value based on the second confidence rate and the total number of all data ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Greater than the Grubbs critical value , then the outliers The test result is correct.
[0139] See also Figure 5 Based on the same inventive concept, an embodiment of the present application provides a schematic structural block diagram of an electronic device 300. The electronic device 300 can be used in the above-mentioned method for determining server usage or the above-mentioned method for detecting an outlier. In the embodiment of the present application, the electronic device 300 can be, but is not limited to, a personal computer (PC), a smartphone, a tablet computer, a personal digital assistant (PDA), a mobile internet device (MID), etc. Structurally, the electronic device 300 can include a processor 310 and a memory 320.
[0140] The processor 310 is electrically connected to the memory 320 directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 310 can also be a general-purpose processor, for example, a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. In addition, the general-purpose processor can be a microprocessor or any conventional processor.
[0141] Memory 320 can be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM). Memory 320 is used to store programs, and processor 310 executes the programs after receiving execution instructions.
[0142] It should be understood that Figure 5 The structure shown is for illustration only. The electronic device 300 provided in the embodiment of the present application may also have Figure 5 Fewer or more components, or with Figure 5 Different configurations are shown. In addition, Figure 5 The components shown may be implemented by software, hardware or a combination thereof.
[0143] It should be noted that, since those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] Based on the same inventive concept, an embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is run, the method provided in the above embodiment is executed.
[0145] The storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0146] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across 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.
[0148] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0149] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.
[0150] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for determining server usage, characterized in that: The method comprises: Get the usage values of all servers in the current time slice; performing a Grubbs analysis on the usage values of all the servers according to a preset first confidence rate to detect abnormal values in the usage values of all the servers; Determining a normal value of server usage for calculating the server usage of the current time slice based on the position of the abnormal value in the current time slice; wherein a time slice is a time period set according to a preset duration, each time slice corresponds to a plurality of time points, and each time point corresponds to a server usage value; Determining the server utilization rate of the current time slice according to the normal value of the server utilization rate; The determining, based on the position of the abnormal value in the current time slice, a normal value of the server usage used to calculate the server usage of the current time slice includes: If there is an abnormal value located at the upper boundary of the current time slice, then obtain the usage rate values of all servers in the previous time slice, where the upper boundary is the first time period of multiple time periods divided by the current time slice in chronological order; For each outlier at the upper boundary of the current time slice, performing a Grubbs analysis on the outlier by combining all server usage values of the previous time slice, all server usage values before the outlier in the current time slice, and the first confidence rate; determining, based on a Grubbs analysis result of the abnormal value, whether the abnormal value is a normal value of the server usage; The performing of a Grubbs analysis on the outlier based on the usage values of all servers in the previous time slice, the usage values of all servers preceding the outlier in the current time slice, and the first confidence rate includes: Get all server usage values of the previous time slice and the abnormal value in the current time slice All previous server usage values and the abnormal value Average value and standard deviation ; According to the average , standard deviation , the abnormal value and Grubbs' formula to obtain the ratio ; According to the utilization rate values of all servers in the previous time slice, the abnormal value in the current time slice All previous server usage values and the abnormal value The total number and the first confidence rate are used to obtain the Grubbs critical value ; Judgment ratio and Grubbs critical value The size relationship, if the ratio Less than or equal to the Grubbs critical value , then the abnormal value is the normal usage value of the server.
2. The method according to claim 1, characterized in that The determining, based on the position of the abnormal value in the current time slice, a normal value of the server usage used to calculate the server usage of the current time slice includes: If there are abnormal values that are not located at the upper boundary of the current time slice, the remaining server usage values except the server usage values located at the upper boundary and all abnormal values that are not located at the upper boundary of the current time slice are determined to be normal server usage values, and the upper boundary is the first time period of the multiple time periods divided by the time slice in chronological order.
3. The method according to claim 1, characterized in that The method further comprises: Determining whether an abnormal value is detected at a lower boundary of a previous time slice, where the lower boundary is the last time period of a plurality of time periods divided into chronological order by the time slice; If an outlier is detected at the lower boundary of the previous time slice, determining whether the outlier is misjudged; If the abnormal value is misjudged, the server utilization rate of the previous time slice is re-determined based on the normal values of all server utilization rates in the previous time slice and the abnormal value.
4. The method according to claim 3, characterized in that Determining whether the abnormal value is misjudged includes: performing a Grubbs analysis on the outlier value according to all server usage values following the outlier value at the lower boundary of the previous time slice, all server usage values in the current time slice, and the first confidence rate; According to the Grubbs analysis result of the outlier, it is determined whether the outlier is misjudged.
5. The method according to claim 1, wherein Before performing Grubbs analysis on the utilization rates of all servers according to a preset first confidence rate, the method further includes: It is determined that the number of missed samples of the server usage rate in the current time slice is less than or equal to a preset missed standard value.
6. The method according to claim 5, characterized in that The method further comprises: If the number of sampling omissions is greater than the omission standard value, the server utilization rate of the current time slice is calculated according to a preset configuration strategy, wherein the configuration strategy includes: using the maximum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum server utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the maximum utilization rate value in the current time slice as the server utilization rate of the current time slice, or using the minimum utilization rate value in the current time slice as the server utilization rate of the current time slice, or calculating all utilization rate values in the current time slice to obtain an average value, and using the average value as the server utilization rate of the current time slice.
7. A method for detecting outliers, characterized in that: The method comprises: Obtain all collected data of the current time slice, wherein the collected data is data collected continuously and in time sequence; performing Grubbs analysis on all the collected data according to a preset second confidence rate to detect outliers in all the collected data; Determine all data for re-detecting the abnormal value based on the position of the abnormal value in the current time slice; wherein the abnormal value is located at the upper boundary of the current time slice, and the upper boundary is the first time period of multiple time periods divided by the current time slice in chronological order; and the all data includes the abnormal value, all collected data in the current time slice that is located before the abnormal value, and all collected data in the previous time slice; Re-testing the outlier based on all the data and the second confidence rate to verify the outlier; The re-detecting the outlier based on all the data and the second confidence rate includes: Get the average value of all the data and standard deviation ; According to the average , standard deviation , the outliers in the outlier detection result and Grubbs' formula to obtain the ratio ; Obtain the Grubbs critical value based on the second confidence rate and the total number of all data ; Judgment ratio and Grubbs critical value The size relationship, if the ratio Greater than the Grubbs critical value , then the abnormal value The test result is correct.
8. The method according to claim 7, characterized in that The method further comprises: Determining whether an abnormal value is detected at a lower boundary of a previous time slice, where the lower boundary is the last time period of a plurality of time periods divided in chronological order by the previous time slice; If an abnormal value is detected at the lower boundary of the previous time slice, determining whether the abnormal value is misjudged; If the outlier is misjudged, the outlier is re-detected based on all collected data in the current time slice, all collected data after the outlier in the previous time slice, and the second confidence rate to verify the outlier.
9. A device for determining server usage, characterized in that: The device comprises: The first acquisition module is used to obtain the usage values of all servers in the current time slice; a first processing module configured to perform a Grubbs analysis on all server usage values according to a preset first confidence rate to detect abnormal values among all server usage values; and determine a normal server usage value for calculating the server usage for the current time slice based on a location of the abnormal value in the current time slice; wherein a time slice is a time period set according to a preset duration, each time slice corresponds to multiple time points, and each time point corresponds to a server usage value; a determination module, configured to determine the server utilization rate of the current time slice according to the normal value of the server utilization rate; The first processing module is specifically configured to, if there is an abnormal value located at the upper boundary of the current time slice, obtain all server usage values of a previous time slice, where the upper boundary is the first time period of multiple time periods divided in chronological order by the current time slice; perform a Grubbs analysis on each abnormal value located at the upper boundary of the current time slice, combining all server usage values of the previous time slice, all server usage values before the abnormal value in the current time slice, and the first confidence rate; and determine, based on the Grubbs analysis result of the abnormal value, whether the abnormal value is a normal server usage value; The first processing module is specifically used to obtain the utilization rate values of all servers in the previous time slice, the abnormal value in the current time slice, All previous server usage values and the abnormal value Average value and standard deviation ; According to the average value , standard deviation , the abnormal value and Grubbs' formula to obtain the ratio ; Based on the utilization rate values of all servers in the previous time slice and the abnormal value in the current time slice All previous server usage values and the abnormal value The total number and the first confidence rate are used to obtain the Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Less than or equal to the Grubbs critical value , then the abnormal value is the normal usage value of the server.
10. An outlier detection device, characterized in that: The device comprises: The second acquisition module is used to acquire all the collected data of the current time slice, where the collected data is continuously collected and has a time sequence; a second processing module configured to perform a Grubbs analysis on all collected data based on the total number of all collected data in the current time slice and a preset second confidence rate to detect outliers in all collected data; and determine all data for re-detecting the outlier based on the position of the outlier in the current time slice; wherein the outlier is located at an upper boundary of the current time slice, the upper boundary being the first time period of a plurality of time periods into which the current time slice is divided in chronological order; and wherein the all data includes the outlier, all collected data in the current time slice that precedes the outlier, and all collected data in the previous time slice; a rechecking module, configured to recheck the abnormal value based on all the data and the second confidence rate to verify the abnormal value; The recheck module is specifically used to obtain the average value of all the data and standard deviation ; According to the average value , standard deviation , the outliers in the outlier detection result and Grubbs' formula to obtain the ratio ; According to the second confidence rate and the total number of all data, obtain the Grubbs critical value ; Judge the ratio and Grubbs critical value The size relationship, if the ratio Greater than the Grubbs critical value , then the abnormal value The test result is correct.
11. An electronic device, characterized in that: include: a processor and a memory, the processor and the memory being connected; The memory is used to store programs; The processor is configured to run a program stored in the memory, and execute the method according to any one of claims 1 to 6, or execute the method according to any one of claims 7 to 8.
12. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a computer, the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 8 is executed.
Citation Information
Patent Citations
Method for remotely monitoring data exception of mobile medical device and server and system thereof
CN104504287A
Method for detecting abnormal load in cloud computing oriented online service
US20180041573A1