Abnormality detection method, device, computer equipment and storage medium
By detecting the historical prediction data of periodic significant indicators and the residuals of monitoring results, the problem of low accuracy in detecting periodic indicators in intelligent operation and maintenance is solved, anomaly detection and alarms in the hidden danger stage are realized, and system failures are avoided.
Patent Information
- Application Number
- CN201910985364.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2039-10-16
AI Technical Summary
In existing intelligent operation and maintenance monitoring, unsupervised learning algorithms and deep learning algorithms are not very accurate in detecting periodic significant indicators, and cannot detect when there are no obvious abnormalities in indicators.
Provide an anomaly detection method that detects whether the indicator to be detected is a periodic significant indicator, obtains its historical forecast data, inputs the forecast model to obtain dynamic forecast results, and calculates the residual between the forecast result and the monitoring result. If the residual exceeds the preset The scope records exception logs and sends alarms.
It can detect anomalies in the hidden danger stage and notify manual troubleshooting to avoid system failures caused by hidden faults.
Smart Images

Figure CN110888788B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an anomaly detection method, apparatus, computer equipment and storage medium. Background Art
[0002] In intelligent operation and maintenance monitoring and management, anomaly detection is an important part of the entire process. Since it is difficult to provide a large number of anomaly annotations for monitoring indicator sequences, the existing detection methods are mainly based on unsupervised learning algorithms or statistical algorithms, and there are also deep learning algorithms. However, the existing algorithms have low detection accuracy for certain indicators (such as indicators with significant periodicity). When such indicators are abnormal but not obvious, they cannot be detected. Summary of the invention
[0003] In order to solve the technical problem in the prior art that the detection accuracy of indicators with significant periodicity is low, the present application provides an anomaly detection method, apparatus, computer equipment and storage medium.
[0004] In a first aspect, the present application provides an anomaly detection method, the method comprising:
[0005] Check whether the indicator to be tested is a significant cyclical indicator;
[0006] If the indicator to be detected is a periodic significant indicator, obtain historical prediction data corresponding to multiple time points before the preset time point of the indicator to be detected to obtain multiple historical prediction data;
[0007] Inputting the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point;
[0008] Obtaining the monitoring result corresponding to the indicator to be detected at the preset time point, and calculating the residual between the dynamic prediction result and the monitoring result;
[0009] If the residual exceeds a preset range, the monitoring result is recorded in an abnormal log, and whether an abnormal event occurs is detected based on the abnormal log;
[0010] If there is an abnormal event, an abnormal event alarm will be sent to the operation and maintenance terminal.
[0011] In a second aspect, the present application further provides an abnormality detection device, the device comprising:
[0012] A detection module is used to detect whether the indicator to be detected is a periodic significant indicator;
[0013] An acquisition module, for acquiring historical prediction data corresponding to a plurality of time points before a preset time point of the indicator to be detected, if the indicator to be detected is a periodic significant indicator, to obtain a plurality of historical prediction data;
[0014] A prediction module, used to input the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point;
[0015] A calculation module, used to obtain the monitoring result corresponding to the indicator to be detected at the preset time point, and calculate the residual between the dynamic prediction result and the monitoring result;
[0016] An abnormal event detection module, configured to record the monitoring result in an abnormal log if the residual exceeds a preset range, and detect whether an abnormal event exists based on the abnormal log;
[0017] The alarm module is used to send abnormal event alarms to the operation and maintenance terminal if there are abnormal events.
[0018] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the above-mentioned anomaly detection method when executing the computer program.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the anomaly detection method as described above.
[0020] The present application discloses an anomaly detection method, apparatus, computer equipment and storage medium. Through the present application, based on the prediction results of periodic significant indicators and the actual monitoring results, anomalies can be discovered in the hidden danger stage and manual investigation can be notified to avoid the hidden danger from causing real system failure later. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A flowchart of an anomaly detection method provided in one embodiment of the present application;
[0023] Figure 2 for Figure 1 A flowchart of the sub-steps of the anomaly detection method in FIG.
[0024] Figure 3 for Figure 2 Flow chart of the steps for identifying significant indicators;
[0025] Figure 4 for Figure 1 A flowchart of the sub-steps of the anomaly detection method in FIG.
[0026] Figure 5 for Figure 1 A flowchart of the sub-steps of the anomaly detection method in FIG.
[0027] Figure 6 is a schematic block diagram of an abnormality detection device provided in an embodiment of the present application;
[0028] Figure 7 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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.
[0030] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0031] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0032] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0033] Embodiments of the present application provide an anomaly detection method, apparatus, computer device, and storage medium.
[0034] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0035] See also Figure 1 , Figure 1This is a flow chart of an abnormality detection method according to an embodiment of the present invention.
[0036] like Figure 1 As shown, the abnormality detection method specifically includes steps S10 to S60.
[0037] Step S10, detecting whether the indicator to be detected is a periodic significant indicator.
[0038] In this embodiment, monitoring data of the indicator to be detected within a period of time can be obtained, and the monitoring data can be used to analyze whether the indicator to be detected shows periodic changes. If so, the indicator to be detected is a periodic significant indicator. The indicator to be detected can be an indicator such as the CPU usage rate of a system, the number of visits to a certain service, etc., which are not limited here.
[0039] In an optional embodiment, referring to Figure 2 , Figure 2 for Figure 1 Flowchart of the sub-steps of the anomaly detection method in . Figure 2 As shown, step S10 includes steps S101 to S106.
[0040] Step S101, obtaining historical monitoring data of the indicator to be detected within a preset time period.
[0041] In this embodiment, the indicator to be detected may be an indicator such as the CPU usage rate of a certain system, the number of visits to a certain service, etc., and the CPU usage rate of a certain system is specifically used as an example for explanation below. In this embodiment, the preset duration may be one year, four months, or one month, and is selected according to actual needs, and is not limited here. For example, the CPU usage rate of a certain system at each hour (i.e., midnight, one o'clock, two o'clock, ... twenty-three o'clock) in the past month is obtained as historical monitoring data, or the average value of the CPU usage rate per day in a certain month is used as historical monitoring data.
[0042] Step S102, performing fast Fourier transform on the historical monitoring data to obtain frequency domain spectrum information data.
[0043] In this embodiment, after obtaining the historical detection data, the acquired historical monitoring data is subjected to a fast Fourier transform. Fast Fourier transform (FFT) is a general term for an efficient and fast calculation method for calculating discrete Fourier transform (DFT) using a computer, referred to as FFT. By performing a fast Fourier transform on the historical monitoring data, the frequency domain spectrum information data corresponding to the historical monitoring data can be obtained.
[0044] Step S103, determining the spectral components corresponding to the daily frequency position and the spectral components corresponding to other frequency positions according to the frequency domain spectrum information data.
[0045] In this embodiment, after obtaining the frequency domain spectrum information data, the amplitude components (i.e., spectrum components) of the historical monitoring data at each frequency can be obtained according to the frequency domain spectrum information data. For example, according to the frequency domain spectrum information data, the spectrum component P1 corresponding to the daily frequency position of the historical monitoring data is obtained, and the spectrum components corresponding to other frequency positions are P2, P3, P4, ..., Pn, respectively.
[0046] Step S104, calculating an average value of the spectral components corresponding to the other frequency positions, and calculating a difference between the spectral components corresponding to the daily frequency position and the average value.
[0047] In this embodiment, the average value P of the spectral components corresponding to other frequency positions (respectively P2, P3, P4...Pn) is calculated, and the difference between P1 and P is calculated, which is recorded as P c .
[0048] Step S105, calculating the standard deviation of the spectral components corresponding to the daily frequency position and the spectral components corresponding to the other frequency positions.
[0049] In this embodiment, the standard deviation of the spectral component P1 corresponding to the daily frequency position and the spectral components P2, P3, P4, ..., Pn corresponding to other frequency positions is further calculated and is denoted as P.
[0050] Step S106: If the difference is greater than or equal to a preset multiple of the standard deviation, it is determined that the indicator to be detected is a periodic significant indicator.
[0051] In this embodiment, the preset multiple is set according to actual needs, for example, it is set to 25, that is, the comparison P c Is it greater than or equal to 25 times P. If P c If P is greater than or equal to 25 times, the data to be detected is determined to be highly significant data. In this embodiment, the daily frequency, that is, the index shows a law of daily change. If P c If P is greater than or equal to the preset multiple, it means that the daily change of the indicator is very regular, so the indicator is determined to be a significant cyclical indicator.
[0052] Further, refer to Figure 3 , Figure 3 for Figure 2 Schematic diagram of the process of determining significant indicators in the Figure 3 As shown, step S106 includes step S1061 to step S1062.
[0053] Step S1061, if the difference is greater than or equal to the preset multiple of the standard deviation, then determine the saturation and autocorrelation coefficient corresponding to the daily frequency position according to the frequency domain spectrum information data.
[0054] In this embodiment, on the basis of detecting that the difference is greater than or equal to the preset multiple of the standard deviation, the saturation and autocorrelation coefficient corresponding to the daily frequency position are further obtained according to the frequency domain spectrum information data. The saturation and autocorrelation coefficient corresponding to the daily frequency position are both included in the frequency domain spectrum information data, and therefore can be directly obtained from the frequency domain spectrum information data.
[0055] Step S1062: If the saturation is greater than the first threshold and the autocorrelation coefficient is greater than the second threshold, it is determined that the indicator to be detected is a periodic significant indicator.
[0056] In this embodiment, it is detected whether the saturation is greater than the first threshold and whether the autocorrelation coefficient is greater than the second threshold. Only when the saturation is greater than the first threshold and the autocorrelation coefficient is greater than the second threshold, the indicator to be detected is determined to be a periodic significant indicator. Among them, the specific values of the first preset threshold and the second preset threshold are set according to actual needs. For example, the first preset threshold is set to 0.3, and the second preset threshold is set to 0.2. In this embodiment, on the basis of detecting that the difference is greater than or equal to the preset multiple of the standard deviation, it is further determined whether the indicator to be detected is a periodic significant indicator based on the saturation and autocorrelation coefficient corresponding to the daily frequency position, so that the type of the indicator to be detected is more accurately determined.
[0057] Step S20: If the indicator to be detected is a periodic significant indicator, historical prediction data corresponding to multiple time points before a preset time point of the indicator to be detected is obtained to obtain multiple historical prediction data.
[0058] In this embodiment, if the indicator to be detected is a periodic significant indicator, the historical prediction data corresponding to the indicator to be detected at n time points before the preset time point is obtained. Among them, the size of n is set according to actual needs, for example, it is set to 10. Taking the CPU usage rate as an example, if the preset time point is a certain hour, such as 13:00 on March 3, the CPU usage rate prediction value at 3:00 on March 3, the CPU usage rate prediction value at 4:00 on March 3... the CPU usage rate prediction value at 12:00 on March 3 are obtained; if the preset time point is a certain day, such as March 13, the CPU usage rate prediction value on March 3, the CPU usage rate prediction value on March 4... the CPU usage rate prediction value on March 12 are obtained.
[0059] In this embodiment, when the prediction model is used for the first prediction at a certain time node T1, the CPU usage rates actually monitored at the 10 time nodes before T1 (n1, n2 ... n10) are obtained, and the CPU usage rates actually monitored at n1, n2 ... n10 are input into the prediction model to obtain the prediction value of the next time node T2, and then n2 ... n10 and the prediction values of T2 are input into the prediction model to obtain the prediction value of the next time node T3, and then n3 ... n10 and the prediction values of T2 and T3 are input into the prediction model to obtain the prediction value of the next time node T4. Prediction value... That is, the first input is n real data, and the first prediction data is obtained; the second input is n-1 real data and the first prediction data, and the second prediction data is obtained; the third input is n-2 real data, and the first and second prediction data are obtained, and the third prediction data is obtained... The nth input is 1 real data, the first to n-1 prediction data, and the nth prediction data is obtained; the n+1th input is the first n prediction data, and the n+1th prediction data is obtained, and the subsequent prediction data is obtained by the previously obtained prediction data. In this embodiment, the time interval between the above T1 and the preset time point is far enough to ensure that the historical prediction data corresponding to the n time points before the preset time point can be obtained.
[0060] Step S30, inputting the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point.
[0061] In this embodiment, the prediction model is an LSTM long short-term memory network, including: an RNN recurrent neural network and valve nodes of each layer; the valve nodes include: a forget valve, an input valve and an output valve;
[0062] The forgotten valve is:
[0063] ft=σ(W f [h t-1 , x t ]+b f )
[0064] i t =σ(W i [h t-1 , x t ]+b i )
[0065] The input valve is:
[0066]
[0067] After being processed by the forget gate and the input gate, the past memory and the present memory content are merged, and the generated value is:
[0068]
[0069] o t =σ(W o [h t-1 , x t ]+b o )
[0070] The output valve is:
[0071] h t =o t *tanh(C t )
[0072] The h t is the output result of the prediction model; where W is the weight, b is the bias, and h t-1 Represents the last network output, x t Represents the current network input, C t-1 represents the old neuron state, C t is the new neuron state, f t is a number between 0 and 1, i t is a number between 0 and 1. A number from -1 to 1, o t A number between 0 and 1.
[0073] In this embodiment, the CPU usage rate actually monitored in the past period of time is collected in advance, and LSTM modeling is performed based on the collected data to fit the historical trend of the indicator. Among them, LSTM is a unidirectional LSTM, the training loss function is MSE, and the optimization algorithm is ADAM. The establishment and optimization training of the LSTM model are implemented through the tensorflow library in Python.
[0074] In this embodiment, multiple historical prediction data are input into the prediction model to obtain the dynamic prediction result corresponding to the preset time point, that is, the current prediction value is obtained through the previous prediction value.
[0075] Step S40, obtaining the monitoring result corresponding to the indicator to be detected at the preset time point, and calculating the residual between the dynamic prediction result and the monitoring result.
[0076] In this embodiment, the monitoring result corresponding to the indicator to be detected at the preset time point is the monitoring result actually monitored at the preset time point. For example, the monitoring result corresponding to the CPU usage at the preset time point can be directly obtained from the system information. Then, the residual of the dynamic prediction result and the monitoring result is calculated to obtain the residual of the two.
[0077] Step S50, if the residual exceeds a preset range, the monitoring result is recorded in an abnormal log, and whether there is an abnormal event based on the abnormal log;
[0078] In this embodiment, if the residual between the dynamic prediction result and the monitoring result exceeds the preset range, it means that the current prediction result is significantly different from the actual monitored result, and the current actual monitored result is determined to be abnormal data, so the monitoring result is recorded in the abnormal log.
[0079] Further, refer to Figure 4 , Figure 4 for Figure 1 Flowchart of the sub-steps of the anomaly detection method in . Figure 4 As shown, recording the monitoring result into the abnormality log includes steps S501 to S504.
[0080] Step S501, obtaining historical monitoring data corresponding to a plurality of time points before a preset time point of the indicator to be detected.
[0081] In this embodiment, if the current monitoring result is determined to be abnormal data based on the dynamic prediction result, historical monitoring data corresponding to multiple time points before the preset time point of the indicator to be detected (that is, data that has been actually monitored) are further obtained to obtain multiple historical monitoring data.
[0082] Step S502: input the plurality of historical monitoring data into a prediction model to obtain a static prediction result corresponding to the preset time point.
[0083] In this embodiment, a plurality of historical monitoring data are input into the prediction model to obtain a static prediction result corresponding to a preset time point (ie, a prediction result obtained based on the actual monitored data).
[0084] Step S503, calculating the difference between the static prediction result and the monitoring result.
[0085] In this embodiment, the residual between the static prediction result and the monitoring result is calculated (ie, the difference between the static prediction result and the monitoring result is calculated).
[0086] Step S504: if the difference exceeds a preset range, the monitoring result is recorded in an abnormality log.
[0087] In this embodiment, it is detected whether the difference between the static prediction result and the monitoring result exceeds the preset range. If the residual between the static prediction result and the monitoring result exceeds the preset range, the monitoring result is determined to be abnormal data, and therefore, the monitoring result is recorded in the abnormal log. In this embodiment, if the current monitoring result is determined to be abnormal data based on the dynamic prediction result (the prediction result obtained based on the predicted value), it is further detected whether the difference between the static prediction result (the prediction result obtained based on the actual monitored data) and the current monitoring result exceeds the preset range. If the difference between the static prediction result and the monitoring result also exceeds the preset range, the current monitoring result is determined to be abnormal data. The accuracy of abnormal determination is improved through the double determination mechanism.
[0088] Furthermore, in one embodiment, after step S503, the method further includes:
[0089] If the difference does not exceed the preset range, the monitoring result is determined to be a normal monitoring result.
[0090] In this embodiment, if the difference does not exceed the preset range, it means that the static prediction result is relatively close to the current monitoring result. Therefore, the current monitoring result is determined to be a normal monitoring result, and the monitoring result is not recorded in the abnormal log.
[0091] Further, in one embodiment, detecting whether there is an abnormal event based on the abnormal log includes:
[0092] Detect whether there are two monitoring results in the abnormal log whose corresponding time difference is less than or equal to the preset time difference; if there are two monitoring results in the abnormal log whose corresponding time difference is less than or equal to the preset time difference, determine that an abnormal event exists.
[0093] In this embodiment, according to the above steps, if the monitoring result corresponding to the preset time point 1 is recorded in the abnormal log, the monitoring result corresponding to the preset time point 2 is also recorded in the abnormal log, and the time difference between the preset time point 1 and the preset time point 2 is less than or equal to the preset time difference, indicating that two abnormal monitoring results have appeared in a short period of time, it is determined that an abnormal event currently exists. That is, in this embodiment, if it is detected in the abnormal log that the time difference corresponding to the two monitoring results is less than or equal to the preset time difference, it is determined that an abnormal event exists.
[0094] Step S60: If an abnormal event occurs, an abnormal event alarm is sent to the operation and maintenance terminal.
[0095] In this embodiment, if an abnormal event occurs, an abnormal event alarm is sent to the operation and maintenance terminal. Specifically, the operation and maintenance system responsible person can be notified in the form of email or text message, so that the problem of the operation and maintenance related computer hardware and system can be manually checked and repaired in time to restore the normal operation of the system.
[0096] In this embodiment, it is detected whether the indicator to be detected is a periodic significant indicator; if the indicator to be detected is a periodic significant indicator, the historical prediction data corresponding to the indicator to be detected at multiple time points before the preset time point are obtained to obtain multiple historical prediction data; the multiple historical prediction data are input into the prediction model to obtain the dynamic prediction result corresponding to the preset time point; the monitoring result corresponding to the indicator to be detected at the preset time point is obtained, and the residual between the dynamic prediction result and the monitoring result is calculated; if the residual exceeds the preset range, the monitoring result is recorded in the abnormal log, and whether there is an abnormal event based on the abnormal log; if there is an abnormal event, an abnormal event alarm is sent to the operation and maintenance terminal. Through this embodiment, based on the prediction results of periodic significant indicators and the actual monitoring results, anomalies can be discovered in the hidden danger stage and manual investigation can be notified to avoid the hidden danger of failure causing a real system failure later.
[0097] Further, refer to Figure 5 , Figure 5 for Figure 1 Flowchart of the sub-steps of the anomaly detection method in . Figure 5 As shown, step S60 includes step S601 to step S602.
[0098] Step S601: If an abnormal event occurs, the status information of each operation and maintenance terminal is obtained.
[0099] In this embodiment, each operation and maintenance personnel is equipped with an operation and maintenance terminal. The operation and maintenance personnel operate on the operation and maintenance terminal according to their own situation to adjust the status information of the operation and maintenance terminal, wherein the status information includes: busy status and idle status. When an abnormal event occurs, the status information of each operation and maintenance terminal is obtained. Specifically, the status information can be an identifier, for example, the obtained status information is identifier 1, indicating that the corresponding operation and maintenance terminal is in a busy state, and the obtained status information is identifier 2, indicating that the corresponding operation and maintenance terminal is in an idle state.
[0100] Step S602: Based on the status information, determine a target operation and maintenance terminal in an idle state, and send an abnormal event alarm to the target operation and maintenance terminal.
[0101] In this embodiment, based on the status information of each operation and maintenance terminal obtained, one operation and maintenance terminal is randomly determined as the target operation and maintenance terminal from the operation and maintenance terminals whose status information is idle, and an abnormal event alarm is sent to the target operation and maintenance terminal so that manual inspection and repair of operation and maintenance-related computer hardware and system problems can be carried out in the first time to restore the normal operation of the system.
[0102] See also Figure 6 , Figure 6An embodiment of the present application provides a schematic block diagram of an anomaly detection device, which is used to execute the aforementioned anomaly detection method.
[0103] like Figure 6 As shown, the abnormality detection device comprises:
[0104] A detection module 10 is used to detect whether the indicator to be detected is a periodic significant indicator;
[0105] An acquisition module 20 is used to acquire historical prediction data corresponding to multiple time points before a preset time point of the indicator to be detected if the indicator to be detected is a periodic significant indicator, so as to obtain multiple historical prediction data;
[0106] A prediction module 30, used to input the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point;
[0107] A calculation module 40 is used to obtain the monitoring result corresponding to the indicator to be detected at the preset time point, and calculate the residual between the dynamic prediction result and the monitoring result;
[0108] An abnormal event detection module 50 is used to record the monitoring result in an abnormal log if the residual exceeds a preset range, and detect whether there is an abnormal event based on the abnormal log;
[0109] The alarm module 60 is used to send an abnormal event alarm to the operation and maintenance terminal if an abnormal event occurs.
[0110] Furthermore, in one embodiment, the detection module 10 includes:
[0111] An acquisition unit, used to acquire historical monitoring data of the indicator to be detected within a preset time period;
[0112] A data processing unit, used for performing a fast Fourier transform on the historical monitoring data to obtain frequency domain spectrum information data;
[0113] A first determining unit is used to determine the spectrum components corresponding to the daily frequency position and the spectrum components corresponding to other frequency positions according to the frequency domain spectrum information data;
[0114] A calculation unit, used to calculate the average value of the spectral components corresponding to the other frequency positions, calculate the difference between the spectral component corresponding to the daily frequency position and the average value; calculate the standard deviation of the spectral component corresponding to the daily frequency position and the spectral components corresponding to the other frequency positions;
[0115] The second determination unit is used to determine that the indicator to be detected is a periodic significant indicator if the difference is greater than or equal to a preset multiple of the standard deviation.
[0116] Further, in one embodiment, the second determining unit includes:
[0117] A first determination subunit is used to determine the saturation and autocorrelation coefficient corresponding to the daily frequency position according to the frequency domain spectrum information data if the difference is greater than or equal to the standard deviation of a preset multiple;
[0118] The second determination subunit is used to determine that the indicator to be detected is a periodic significant indicator if the saturation is greater than a first threshold and the autocorrelation coefficient is greater than a second threshold.
[0119] Furthermore, in one embodiment, the abnormal event detection module 50 includes:
[0120] An acquisition unit, used to acquire historical monitoring data corresponding to the indicator to be detected at multiple time points before a preset time point;
[0121] A static prediction unit, used to input the plurality of historical monitoring data into a prediction model to obtain a static prediction result corresponding to the preset time point;
[0122] A calculation unit, used for calculating the difference between the static prediction result and the monitoring result;
[0123] A recording unit is used to record the monitoring result in an abnormality log if the difference exceeds a preset range.
[0124] Furthermore, in one embodiment, the abnormality detection device further includes:
[0125] The determination module is configured to determine that the monitoring result is a normal monitoring result if the difference does not exceed a preset range.
[0126] Furthermore, in one embodiment, the abnormal event detection module 50 further includes:
[0127] A detection unit, used to detect whether there are time differences corresponding to two monitoring results in the abnormal log that are less than or equal to a preset time difference;
[0128] The abnormal event determination unit is used to determine that an abnormal event exists if the time difference corresponding to two monitoring results in the abnormal log is less than or equal to a preset time difference.
[0129] Furthermore, in one embodiment, the alarm module 60 includes:
[0130] A status information acquisition unit, used to acquire status information of each operation and maintenance terminal if an abnormal event occurs;
[0131] The alarm unit is used to determine a target operation and maintenance terminal in an idle state based on the state information, and send an abnormal event alarm to the target operation and maintenance terminal.
[0132] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0133] The above-mentioned device can be implemented in the form of a computer program. Figure 7 Runs on the computer device shown.
[0134] See also Figure 7 , Figure 7 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0135] See also Figure 7 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0136] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the anomaly detection methods.
[0137] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0138] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the abnormality detection methods.
[0139] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0140] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0141] In one embodiment, the processor is used to run a computer program stored in a memory to implement the steps of each embodiment of the above abnormality detection method.
[0142] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any one of the anomaly detection methods provided in the embodiments of the present application.
[0143] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. An anomaly detection method, characterized in that: include: Check whether the indicator to be tested is a significant cyclical indicator; If the indicator to be detected is a periodic significant indicator, obtain historical prediction data corresponding to multiple time points before the preset time point of the indicator to be detected to obtain multiple historical prediction data; Inputting the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point; Obtaining the monitoring result corresponding to the indicator to be detected at the preset time point, and calculating the residual between the dynamic prediction result and the monitoring result; If the residual exceeds a preset range, the monitoring result is recorded in an abnormal log, and whether an abnormal event occurs is detected based on the abnormal log; If there is an abnormal event, an abnormal event alarm is sent to the operation and maintenance terminal; The step of detecting whether the indicator to be detected is a periodic significant indicator includes: Obtain historical monitoring data of the indicator to be tested within a preset time period; Performing a fast Fourier transform on the historical monitoring data to obtain frequency domain spectrum information data; According to the frequency domain spectrum information data, it is determined whether the indicator to be detected changes periodically. If the indicator to be detected changes periodically, it is determined that the indicator to be detected is a significant periodic indicator.
2. The anomaly detection method according to claim 1, characterized in that: The step of determining whether the indicator to be detected changes periodically according to the frequency domain spectrum information data includes: Determine, based on the frequency domain spectrum information data, the spectrum components corresponding to the daily frequency position and the spectrum components corresponding to other frequency positions; Calculate the average value of the spectral components corresponding to the other frequency positions, and calculate the difference between the spectral component corresponding to the daily frequency position and the average value; Calculate the standard deviation of the spectral component corresponding to the daily frequency position and the spectral components corresponding to the other frequency positions; If the difference is greater than or equal to a preset multiple of the standard deviation, it is determined that the indicator to be detected shows a periodic change, and the indicator to be detected is determined to be a periodically significant indicator.
3. The anomaly detection method according to claim 2, characterized in that: If the difference is greater than or equal to a preset multiple of the standard deviation, determining that the indicator to be detected changes periodically includes: If the difference is greater than or equal to the preset multiple of the standard deviation, the saturation and autocorrelation coefficient corresponding to the daily frequency position are determined according to the frequency domain spectrum information data; If the saturation is greater than a first threshold and the autocorrelation coefficient is greater than a second threshold, it is determined that the indicator to be detected changes periodically.
4. The anomaly detection method according to claim 1, characterized in that: The recording of the monitoring result into an abnormality log includes: Obtaining historical monitoring data corresponding to a plurality of time points before a preset time point of the indicator to be detected; Inputting the plurality of historical monitoring data into a prediction model to obtain a static prediction result corresponding to the preset time point; Calculating the difference between the static prediction result and the monitoring result; If the difference exceeds a preset range, the monitoring result is recorded in an abnormality log.
5. The anomaly detection method according to claim 4, characterized in that: After calculating the difference between the static prediction result and the monitoring result, the method further includes: If the difference does not exceed the preset range, the monitoring result is determined to be a normal monitoring result.
6. The anomaly detection method according to claim 1, characterized in that: The detecting whether there is an abnormal event based on the abnormal log includes: Detecting whether there are two monitoring results in the abnormal log whose corresponding time difference is less than or equal to a preset time difference; If the time difference corresponding to two monitoring results in the abnormal log is less than or equal to the preset time difference, it is determined that an abnormal event exists.
7. The abnormality detection method according to any one of claims 1 to 6, characterized in that: If an abnormal event occurs, an abnormal event alarm is sent to the operation and maintenance terminal, including: If there is an abnormal event, obtain the status information of each operation and maintenance terminal; Based on the status information, a target operation and maintenance terminal in an idle state is determined, and an abnormal event alarm is sent to the target operation and maintenance terminal.
8. An abnormality detection device, characterized in that: include: A detection module is used to detect whether the indicator to be detected is a periodic significant indicator; An acquisition module, for acquiring historical prediction data corresponding to a plurality of time points before a preset time point of the indicator to be detected, if the indicator to be detected is a periodic significant indicator, to obtain a plurality of historical prediction data; A prediction module, used to input the plurality of historical prediction data into a prediction model to obtain a dynamic prediction result corresponding to the preset time point; A calculation module, used to obtain the monitoring result corresponding to the indicator to be detected at the preset time point, and calculate the residual between the dynamic prediction result and the monitoring result; An abnormal event detection module, configured to record the monitoring result in an abnormal log if the residual exceeds a preset range, and detect whether an abnormal event exists based on the abnormal log; The alarm module is used to send abnormal event alarms to the operation and maintenance terminal if there are abnormal events; Among them, the detection module is also used to obtain historical monitoring data of the indicator to be detected within a preset time length; perform fast Fourier transform on the historical monitoring data to obtain frequency domain spectrum information data; determine whether the indicator to be detected shows periodic changes based on the frequency domain spectrum information data, and if the indicator to be detected shows periodic changes, determine that the indicator to be detected is a significant periodic indicator.
9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the anomaly detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the abnormality detection method according to any one of claims 1 to 7.
