Method and system for real-time online detection of virtual machine status
By combining OCSVM, DAEN and SVM models and using the isolated forest algorithm to annotate data, the problem of false negative rate and false positive rate in virtual machine status detection in cloud computing environment is solved, efficient and accurate virtual machine status detection is achieved, and the cost is reduced. Operation and maintenance costs.
Patent Information
- Application Number
- CN201911226077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-04
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2039-12-04
AI Technical Summary
The existing technology has a high false negative rate and false positive rate in virtual machine status detection in a cloud computing environment. It is difficult to accurately collect all normal behavior status data, and abnormal data is not fully utilized, which reduces detection efficiency.
Single classification support vector machine (OCSVM) model, deep autoencoding network (DAEN) model and support vector machine (SVM) classification model are used for misuse detection and anomaly detection, combined with the isolated forest algorithm to label unlabeled data to form labeled anomalies. and normal data sets, train abnormal and normal behavior models, and judge the virtual machine status through the decision boundary and square error value, and use the SVM classification model to make the final judgment.
It effectively reduces the false negative rate and false positive rate, improves detection efficiency and accuracy, reduces the workload of operation and maintenance personnel to manually label data, reduces costs, and ensures real-time and accuracy.
Smart Images

Figure CN112906727B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing, and in particular to a method and system for real-time online detection of virtual machine status. Background Art
[0002] Cloud computing provides services to users through virtualization technology. As the carrier of cloud computing services, the abnormal state of virtual machines will not only affect the user experience, but also cause the business system to fail to operate, resulting in various inestimable losses. Timely detection of abnormal states in the operation of virtual machines and prompting operation and maintenance personnel to take necessary measures are important means to ensure the smooth operation of various business systems under the cloud computing platform.
[0003] Traditional detection methods are divided into anomaly detection and misuse detection. Anomaly detection first defines normal behavior and defines all other behaviors as abnormal. Misuse detection first defines abnormal behavior and defines all other behaviors as normal. Anomaly detection can detect unknown abnormal behaviors, but if all normal behaviors cannot be defined, a high false alarm rate will occur. Misuse detection has a low false alarm rate and a fast detection speed, but it cannot detect unknown abnormal behaviors and has a high false alarm rate.
[0004] In cloud computing environments, online monitoring data of virtual machine status has three main characteristics: 1) large data size and multiple types; 2) high manual labeling cost, few sample data with normal or abnormal labels, and a large amount of data is unlabeled; 3) data distribution is unbalanced, most of the collected monitoring data are normal data, and the number of abnormal data samples is small. For monitoring the status of virtual machines in cloud environments, the anomaly detection method currently used is mainly to collect indicator data of the virtual machine in normal state at fixed time intervals, and then use long short-term memory neural networks to train the normal behavior model of the virtual machine offline, and deploy the training model to the server for online real-time detection. However, this method is difficult to accurately collect all the normal behavior status data of the virtual machine, and the false alarm rate is high; at the same time, it does not make full use of the small amount of abnormal data generated during the operation of the virtual machine, which reduces the detection efficiency. Summary of the invention
[0005] The present disclosure provides a solution for real-time and efficient online detection of virtual machine status, so as to effectively reduce the missed alarm rate and the false alarm rate.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for real-time online detection of a virtual machine status is provided, comprising: reading trained single-classification support vector machine OCSVM model parameters, deep autoencoder network DAEN model parameters and support vector machine SVM classification model parameters from a training model database to complete the initialization of the OCSVM model, the DAEN model and the SVM classification model; obtaining virtual machine key performance indicator KPI data online; performing misuse detection on the KPI data using the OCSVM model to obtain a first detection result; performing anomaly detection on the KPI data using the DAEN model to obtain a second detection result; judging whether the first detection result and the second detection result are consistent; if the first detection result and the second detection result are consistent, outputting the first detection result or the second detection result as the detection result of the KPI data; if the first detection result and the second detection result are inconsistent, performing classification judgment on the first detection result and the second detection result using the SVM classification model to output the detection result of the KPI data.
[0007] In some embodiments, using the OCSVM model to detect misuse of KPI data includes: processing the KPI data using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model; judging whether the KPI data is located inside the decision boundary based on the difference; if the KPI data is located inside the decision boundary, the output first detection result indicates that the KPI data is abnormal; if the KPI data is located outside the decision boundary, the output first detection result indicates that the KPI data is normal.
[0008] In some embodiments, using the DAEN model to perform anomaly detection on KPI data includes: processing the KPI data using the DAEN model to calculate the square error value of the KPI data; determining whether the square error value of the KPI data is less than a preset square error threshold; if the square error value of the KPI data is less than the preset square error threshold, then the output second detection result indicates that the KPI data is normal; if the square error value of the KPI data is greater than the preset square error threshold, then the output second detection result indicates that the KPI data is abnormal.
[0009] In some embodiments, the KPI information includes at least one of CPU load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
[0010] In some embodiments, historical monitoring data of the virtual machine KPI is obtained, wherein the historical monitoring data includes an unlabeled data set and a labeled data set, and the amount of unlabeled data is greater than the amount of labeled data; the data in the unlabeled data set is processed using an isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set; based on the labeled abnormal data set, an OCSVM algorithm is used to train an abnormal behavior model, and the labeled data set is used to adjust the abnormal behavior model to obtain an OCSVM model, and the OCSVM model parameters are stored in a training model database; based on the labeled normal data set, a DAEN algorithm is used to train a normal behavior model, and the labeled data set is used to adjust the normal behavior model to obtain a DAEN model, and the D The AEN model parameters are stored in the training model database; the OCSVM model is used to calculate the difference between each data in the labeled data set and the decision boundary of the OCSVM model, and a first operation data set is generated according to the calculated difference; the DAEN model is used to calculate the square error value of each data in the labeled data set, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set is generated according to the calculated difference; the first operation data set and the second operation data set are merged, and the corresponding category label in the labeled data set is added to obtain a third operation data set; the SVM classification algorithm is used to perform binary classification training on the third operation data set to obtain an SVM classification model, and the SVM classification model parameters are stored in the training model database.
[0011] In some embodiments, in the labeled data set, data labeled as normal and data labeled as abnormal are evenly distributed.
[0012] According to a second aspect of an embodiment of the present disclosure, a system for real-time online detection of a virtual machine status is provided, comprising: a model initialization module, configured to read trained single-classification support vector machine OCSVM model parameters, deep autoencoder network DAEN model parameters and support vector machine SVM classification model parameters from a training model database to complete the initialization of the OCSVM model, the DAEN model and the SVM classification model; an online detection module, configured to obtain online key performance indicator KPI data of the virtual machine, perform misuse detection on the KPI data using the OCSVM model to obtain a first detection result, perform anomaly detection on the KPI data using the DAEN model to obtain a second detection result, determine whether the first detection result and the second detection result are consistent, if the first detection result and the second detection result are consistent, output the first detection result or the second detection result as the detection result of the KPI data, if the first detection result and the second detection result are inconsistent, perform classification judgment on the first detection result and the second detection result using the SVM classification model to output the detection result of the KPI data.
[0013] In some embodiments, the online detection module is configured to process the KPI data using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model, and determine whether the KPI data is located inside the decision boundary based on the difference. If the KPI data is located inside the decision boundary, the output first detection result indicates that the KPI data is abnormal; if the KPI data is located outside the decision boundary, the output first detection result indicates that the KPI data is normal.
[0014] In some embodiments, the online detection module is configured to process the KPI data using the DAEN model to calculate the square error value of the KPI data, and determine whether the square error value of the KPI data is less than a preset square error threshold. If the square error value of the KPI data is less than the preset square error threshold, the output second detection result indicates that the KPI data is normal; if the square error value of the KPI data is greater than the preset square error threshold, the output second detection result indicates that the KPI data is abnormal.
[0015] In some embodiments, the KPI information includes at least one of CPU load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
[0016] In some embodiments, the system further includes: a training module configured to obtain virtual machine KPI historical monitoring data, wherein the historical monitoring data includes an unlabeled data set and a labeled data set, and the amount of unlabeled data is greater than the amount of labeled data, and the data in the unlabeled data set is processed using an isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set, and based on the labeled abnormal data set, the abnormal behavior model is trained using an OCSVM algorithm, and the abnormal behavior model is adjusted using the labeled data set to obtain an OCSVM model, and the OCSVM model parameters are stored in a training model database; based on the labeled normal data set, the normal behavior model is trained using a DAEN algorithm, and the normal behavior model is adjusted using the labeled data set to obtain a D AEN model is used, and the DAEN model parameters are stored in the training model database; the OCSVM model is used to calculate the difference between each data in the labeled data set and the decision boundary of the OCSVM model, and a first operation data set is generated according to the calculated difference; the DAEN model is used to calculate the square error value of each data in the labeled data set, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set is generated according to the calculated difference; the first operation data set and the second operation data set are merged, and the corresponding category label in the labeled data set is added to obtain a third operation data set; the SVM classification algorithm is used to perform binary classification training on the third operation data set to obtain an SVM classification model, and the SVM classification model parameters are stored in the training model database.
[0017] In some embodiments, in the labeled data set, data labeled as normal and data labeled as abnormal are evenly distributed.
[0018] According to a third aspect of an embodiment of the present disclosure, a system for real-time online detection of a virtual machine status is provided, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a method as described in any of the above embodiments based on the instructions stored in the memory.
[0019] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method involved in any of the above embodiments is implemented.
[0020] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0023] Figure 1 is a flow chart of a method for real-time online detection of virtual machine status according to an embodiment of the present disclosure;
[0024] Figure 2 is a flow chart of a method for real-time online detection of virtual machine status according to another embodiment of the present disclosure;
[0025] Figure 3 is a structural diagram of a system for real-time online detection of virtual machine status according to an embodiment of the present disclosure;
[0026] Figure 4 is a structural diagram of a system for real-time online detection of virtual machine status according to another embodiment of the present disclosure;
[0027] Figure 5 It is a structural diagram of a system for real-time online detection of virtual machine status according to another embodiment of the present disclosure.
[0028] It should be understood that the size of each part shown in the accompanying drawings is not drawn according to the actual proportional relationship. In addition, the same or similar reference numerals represent the same or similar components. DETAILED DESCRIPTION
[0029] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The description of the exemplary embodiments is merely illustrative and is in no way intended to limit the present disclosure and its application or use. The present disclosure can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to make the present disclosure thorough and complete and to fully express the scope of the present disclosure to those skilled in the art. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the composition of the materials, and the numerical values set forth in these embodiments should be interpreted as being merely exemplary and not as limiting.
[0030] The words “include” or “comprising” and the like used in the present disclosure mean that the elements preceding the words include the elements listed after the words, and do not exclude the possibility of also including other elements.
[0031] All terms (including technical terms or scientific terms) used in the present disclosure have the same meanings as those understood by ordinary technicians in the field to which the present disclosure belongs, unless otherwise specifically defined. It should also be understood that terms defined in general dictionaries, such as general dictionaries, should be interpreted as having meanings consistent with their meanings in the context of the relevant technology, and should not be interpreted in an idealized or extremely formal sense, unless explicitly defined herein.
[0032] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0033] Figure 1 The flowchart of the method for real-time online detection of virtual machine status according to one embodiment of the present disclosure is shown in FIG. 1. In some embodiments, the following method steps for real-time online detection of virtual machine status are performed by a system for real-time online detection of virtual machine status.
[0034] In step 101, the trained OCSVM (One Class Support Vector Machine) model parameters, DAEN (Deep AutoEncoder Network) model parameters and SVM (Support Vector Machine) classification model parameters are read from the training model database to complete the initialization of the OCSVM model, DAEN model and SVM classification model.
[0035] In some embodiments, the training model database may be MySQL or another type of database.
[0036] In step 102, virtual machine KPI (Key Performance Indicator) data is obtained online.
[0037] In some embodiments, the KPI information includes at least one of CPU (Central Processing Unit) load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
[0038] In some embodiments, KPI data may be collected by deploying Zabbix Agent on the target virtual machine.
[0039] In step 103, the OCSVM model is used to perform misuse detection on the KPI data to obtain a first detection result.
[0040] In some embodiments, the KPI data is processed by using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model, and the KPI data is judged whether it is located inside the decision boundary according to the difference. If the KPI data is located inside the decision boundary, the output first detection result indicates that the KPI data is abnormal; if the KPI data is located outside the decision boundary, the output first detection result indicates that the KPI data is normal.
[0041] In step 104, the DAEN model is used to perform anomaly detection on the KPI data to obtain a second detection result.
[0042] In some embodiments, the KPI data is processed by utilizing the DAEN model to calculate the square error value of the KPI data, and it is determined whether the square error value of the KPI data is less than a preset square error threshold. If the square error value of the KPI data is less than the preset square error threshold, the output second detection result indicates that the KPI data is normal; if the square error value of the KPI data is greater than the preset square error threshold, the output second detection result indicates that the KPI data is abnormal.
[0043] In step 105, it is determined whether the first detection result is consistent with the second detection result.
[0044] If the first detection result and the second detection result are consistent, step 106 is executed; if the first detection result and the second detection result are inconsistent, step 107 is executed.
[0045] In step 106, the first detection result or the second detection result is output as the detection result of the KPI data.
[0046] In step 107, the first detection result and the second detection result are classified and judged using the SVM classification model to output the detection result of the KPI data.
[0047] It should be noted here that since SVM classification itself is not the inventive point of the present disclosure, it will not be described in detail here.
[0048] In the method for real-time online detection of the status of a virtual machine provided in the above embodiment of the present disclosure, the online data is detected by utilizing the trained OCSVM model, DAEN model and SVM classification model, so that when the total amount of data is large and the labeled data is small, the status of the virtual machine can be detected online in real time and efficiently, and anomalies in operation can be discovered in time.
[0049] Figure 2It is a flowchart of a method for real-time online detection of virtual machine status according to another embodiment of the present disclosure. In some embodiments, the following method steps for real-time online detection of virtual machine status are performed by a system for real-time online detection of virtual machine status.
[0050] In step 201, the virtual machine KPI historical monitoring data is obtained, wherein the historical monitoring data includes an unlabeled data set and a labeled data set, and the amount of unlabeled data is greater than the amount of labeled data.
[0051] In some embodiments, in the labeled data set Labeled_Dataset, data labeled as normal and data labeled as abnormal are evenly distributed.
[0052] In step 202, the data in the unlabeled data set is processed using an isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set.
[0053] For example, a labeled abnormal data set consisting of labeled abnormal data is represented by IF_Abnormal_Dataset, and a labeled normal data set consisting of labeled normal data is represented by IF_Normal_Dataset.
[0054] It should be noted here that in the process of using the isolation forest algorithm to process a large amount of unlabeled data, points that are sparsely distributed and far away from the high-density group are marked as abnormal, and the others are marked as normal.
[0055] In step 203, based on the labeled abnormal data set IF_Abnormal_Dataset, the OCSVM algorithm is used to train the abnormal behavior model, and the labeled data set Labeled_Dataset is used to adjust the abnormal behavior model to obtain the OCSVM model, and the OCSVM model parameters are stored in the training model database.
[0056] The OCSVM model has a decision boundary, and the model output value is the difference between the data point and the decision boundary. When a data point is within the decision boundary, it is judged as abnormal, and when it is outside the decision boundary, it is judged as normal.
[0057] In step 204, based on the labeled normal data set, the DAEN algorithm is used to train the normal behavior model, and the normal behavior model is adjusted using the labeled data set Labeled_Dataset to obtain the DAEN model, and the DAEN model parameters are stored in the training model database.
[0058] The output value of the DAEN model is the square error value. The DAEN model has a square error threshold. When the calculation result of the input data is lower than this threshold, it is judged as normal. When it exceeds this threshold, it is judged as abnormal.
[0059] In step 205, the OCSVM model is used to calculate the difference between each data in the labeled data set Labeled_Dataset and the decision boundary of the OCSVM model, and a first operation data set OCSVM_Dataset is generated according to the calculated difference.
[0060] In step 206, the DAEN model is used to calculate the square error value of each data in the labeled data set Labeled_Dataset, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set DAEN_Dataset is generated according to the calculated difference.
[0061] In step 207 , the first operation data set OCSVM_Dataset and the second operation data set DAEN_Dataset are merged, and corresponding category labels in the labeled data set Labeled_Dataset are added to obtain a third operation data set Dataset.
[0062] In step 208, the third operation data set Dataset is trained for binary classification using an SVM classification algorithm to obtain an SVM classification model, and the SVM classification model parameters are stored in a training model database.
[0063] In some embodiments, the isolation forest algorithm, the OCSVM algorithm, and the SVM classification algorithm can be implemented using Spark, and the DAEN algorithm can be implemented using TensorFlow.
[0064] Figure 3 FIG. 1 is a schematic diagram of a system for real-time online detection of virtual machine status according to an embodiment of the present disclosure. Figure 3 As shown, the system for real-time online detection of virtual machine status includes a model initialization module 31 and an online detection module 32 .
[0065] The model initialization module 31 is configured to read the trained OCSVM model parameters, DAEN model parameters and SVM classification model parameters from the training model database to complete the initialization of the OCSVM model, DAEN model and SVM classification model.
[0066] In some embodiments, the training model database may be MySQL or another type of database.
[0067] The online detection module 32 is configured to obtain virtual machine KPI data online, perform misuse detection on the KPI data using the OCSVM model to obtain a first detection result, perform anomaly detection on the KPI data using the DAEN model to obtain a second detection result, and determine whether the first detection result and the second detection result are consistent. If the first detection result and the second detection result are consistent, the first detection result or the second detection result is output as the detection result of the KPI data. If the first detection result and the second detection result are inconsistent, the SVM classification model is used to classify and judge the first detection result and the second detection result to output the detection result of the KPI data.
[0068] In some embodiments, the KPI information includes at least one of CPU load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
[0069] In some embodiments, KPI data may be collected by deploying Zabbix Agent on the target virtual machine.
[0070] In some embodiments, the online detection module 32 is configured to process the KPI data using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model, and determine whether the KPI data is located inside the decision boundary based on the difference. If the KPI data is located inside the decision boundary, the output first detection result indicates that the KPI data is abnormal; if the KPI data is located outside the decision boundary, the output first detection result indicates that the KPI data is normal.
[0071] In some embodiments, the online detection module 32 is configured to process the KPI data using the DAEN model to calculate the square error value of the KPI data, and determine whether the square error value of the KPI data is less than a preset square error threshold. If the square error value of the KPI data is less than the preset square error threshold, the output second detection result indicates that the KPI data is normal; if the square error value of the KPI data is greater than the preset square error threshold, the output second detection result indicates that the KPI data is abnormal.
[0072] Figure 4 It is a structural diagram of a system for real-time online detection of virtual machine status according to another embodiment of the present disclosure. Figure 4 and Figure 3 The difference is that in Figure 4 In the illustrated embodiment, the system further comprises a training module 33 .
[0073] The training module 33 is configured to obtain virtual machine KPI historical monitoring data, wherein the historical monitoring data includes an unlabeled data set and a labeled data set, and the amount of unlabeled data is greater than the amount of labeled data.
[0074] In some embodiments, in the labeled data set Labeled_Dataset, data labeled as normal and data labeled as abnormal are evenly distributed.
[0075] The training module 33 processes the data in the unlabeled data set using the isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set. Based on the labeled abnormal data set, the OCSVM algorithm is used to train the abnormal behavior model, and the labeled data set is used to adjust the abnormal behavior model to obtain the OCSVM model, and the OCSVM model parameters are stored in the training model database; based on the labeled normal data set, the DAEN algorithm is used to train the normal behavior model, and the labeled data set is used to adjust the normal behavior model to obtain the DAEN model, and the DAEN model parameters are stored in the training model database; the OCSVM model is used to calculate The difference between each data in the labeled data set and the decision boundary of the OCSVM model is calculated, and a first operation data set is generated according to the calculated difference; the square error value of each data in the labeled data set is calculated using the DAEN model, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set is generated according to the calculated difference; the first operation data set and the second operation data set are merged, and the corresponding category label in the labeled data set is added to obtain a third operation data set; the third operation data set is trained for binary classification using the SVM classification algorithm to obtain an SVM classification model, and the SVM classification model parameters are stored in the training model database.
[0076] It should be noted here that the OCSVM model has a decision boundary, and the model output value is the difference between the data point and the decision boundary. When a data point is within the decision boundary, it is judged as abnormal, and when it is outside the decision boundary, it is judged as normal.
[0077] In addition, the output value of the DAEN model is the square error value. The DAEN model has a square error threshold. When the calculation result of the input data is lower than this threshold, it is judged as normal, and when it exceeds this threshold, it is judged as abnormal.
[0078] In some embodiments, the isolation forest algorithm, the OCSVM algorithm, and the SVM classification algorithm can be implemented using Spark, and the DAEN algorithm can be implemented using TensorFlow.
[0079] Figure 5 FIG. 1 is a schematic diagram of a system for real-time online detection of virtual machine status according to another embodiment of the present disclosure. Figure 5As shown, the system includes a memory 51 and a processor 52 .
[0080] The memory 51 is used to store instructions. The processor 52 is coupled to the memory 51. The processor 52 is configured to execute the instructions stored in the memory to implement the following Figure 1 and Figure 2 The method of any one of the embodiments.
[0081] like Figure 5 As shown, the system also includes a communication interface 53 for information exchange with other devices. At the same time, the system also includes a bus 54, through which the processor 52, the communication interface 53, and the memory 51 communicate with each other.
[0082] The memory 51 may include high-speed RAM (Random Access Memory) and may also include NVM (Non-Volatile Memory). For example, at least one disk storage. The memory 51 may also be a storage array. The memory 51 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
[0083] In addition, the processor 52 may be a central processing unit, or may be an ASIC (Application Specific Integrated Circuit), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0084] The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figure 1 and Figure 2 The method of any one of the embodiments.
[0085] By implementing the solution of the present disclosure, the following beneficial effects can be obtained:
[0086] 1) In view of the fact that the number of abnormal samples in unlabeled data is much smaller than the number of normal samples, the unsupervised isolation forest algorithm is used to label the data. It has fast processing speed and good effect, greatly reducing the workload of manual data labeling for operation and maintenance personnel and reducing costs;
[0087] 2) For small sample abnormal data, the OCSVM algorithm is used to train the abnormal behavior model for misuse detection, which reduces the false alarm rate;
[0088] 3) For large samples of normal data, the DAEN algorithm is used to train the normal behavior model for anomaly detection, which reduces the false negative rate;
[0089] 4) After training the model with a large amount of data labeled by the isolation forest algorithm, a small amount of manually labeled sample data is used to fine-tune the model, which improves the accuracy of the detection model;
[0090] 5) The OCSVM algorithm and the DAEN algorithm are used to process the online data in parallel. When the judgment results of the two are consistent, the detection results are directly output. When the judgment results of the two are inconsistent, the SVM classification algorithm is used for further judgment, which shortens the calculation time, ensures real-time performance, and also improves the accuracy of detection.
[0091] In some embodiments, the above-mentioned functional modules can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components or any appropriate combination thereof for performing the functions described in the present disclosure.
[0092] So far, the embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein.
[0093] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A method for real-time online detection of a virtual machine state, comprising: Read the trained single-classification support vector machine OCSVM model parameters, deep autoencoder network DAEN model parameters and support vector machine SVM classification model parameters from the training model database to complete the initialization of the OCSVM model, DAEN model and SVM classification model; Get the key performance indicator (KPI) data of virtual machines online; Using the OCSVM model to perform misuse detection on the KPI data to obtain a first detection result; Use the DAEN model to perform anomaly detection on the KPI data to obtain a second detection result; Determine whether the first test result and the second test result are consistent; If the first detection result and the second detection result are consistent, the first detection result or the second detection result is output as the detection result of the KPI data; If the first detection result and the second detection result are inconsistent, the SVM classification model is used to classify and judge the first detection result and the second detection result to output the detection result of the KPI data; Among them, training the SVM classification model includes: Obtaining virtual machine KPI historical monitoring data, wherein the historical monitoring data includes unlabeled data sets and labeled data sets, and the amount of unlabeled data is greater than the amount of labeled data; The data in the unlabeled data set is processed using the isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set; Based on the labeled abnormal data set, the OCSVM algorithm is used to train the abnormal behavior model, and the labeled data set is used to adjust the abnormal behavior model to obtain the OCSVM model, and the OCSVM model parameters are stored in the training model database; Based on the labeled normal data set, the DAEN algorithm is used to train the normal behavior model, and the labeled data set is used to adjust the normal behavior model to obtain the DAEN model, and the DAEN model parameters are stored in the training model database; The OCSVM model is used to calculate the difference between each data in the labeled data set and the decision boundary of the OCSVM model, and a first operation data set is generated according to the calculated difference; the DAEN model is used to calculate the square error value of each data in the labeled data set, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set is generated according to the calculated difference; The first operation data set is merged with the second operation data set, and the corresponding category mark in the labeled data set is added to obtain a third operation data set; The third operation data set is trained for binary classification using an SVM classification algorithm to obtain an SVM classification model, and the SVM classification model parameters are stored in a training model database.
2. The method according to claim 1, wherein: Using the OCSVM model to detect the misuse of KPI data includes: The KPI data is processed using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model; Determine whether the KPI data is within the decision boundary according to the difference; If the KPI data is within the decision boundary, the output first detection result indicates that the KPI data is abnormal; If the KPI data is outside the decision boundary, the output first detection result indicates that the KPI data is normal.
3. The method according to claim 1, wherein: Using the DAEN model to detect anomalies in KPI data includes: The KPI data is processed using the DAEN model to calculate the square error value of the KPI data; Determine whether the square error value of the KPI data is less than the preset square error threshold; If the square error value of the KPI data is less than the preset square error threshold, the output second detection result indicates that the KPI data is normal; If the square error value of the KPI data is greater than a preset square error threshold, the output second detection result indicates that the KPI data is abnormal.
4. The method according to claim 1, wherein: The KPI data includes at least one of CPU load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
5. The method according to any one of claims 1 to 4, wherein: In the labeled data set, the data labeled as normal and the data labeled as abnormal are evenly distributed.
6. A system for real-time online detection of virtual machine status, comprising: The model initialization module is configured to read the trained single-classification support vector machine OCSVM model parameters, deep autoencoder network DAEN model parameters and support vector machine SVM classification model parameters from the training model database to complete the initialization of the OCSVM model, DAEN model and SVM classification model; An online detection module is configured to obtain online key performance indicator KPI data of a virtual machine, perform misuse detection on the KPI data using an OCSVM model to obtain a first detection result, perform anomaly detection on the KPI data using a DAEN model to obtain a second detection result, and determine whether the first detection result and the second detection result are consistent. If the first detection result and the second detection result are consistent, the first detection result or the second detection result is output as a detection result of the KPI data. If the first detection result and the second detection result are inconsistent, the first detection result and the second detection result are classified and judged using an SVM classification model to output the detection result of the KPI data. The training module is configured to obtain the historical monitoring data of the virtual machine KPI, wherein the historical monitoring data includes an unlabeled data set and a labeled data set, and the amount of the unlabeled data is greater than the amount of the labeled data, and the data in the unlabeled data set is processed by using the isolation forest algorithm to form a labeled abnormal data set and a labeled normal data set, and based on the labeled abnormal data set, the abnormal behavior model is trained by using the OCSVM algorithm, and the abnormal behavior model is adjusted by using the labeled data set to obtain the OCSVM model, and the OCSVM model parameters are stored in the training model database; Based on the labeled normal data set, the DAEN algorithm is used to train the normal behavior model, and the labeled data set is used to adjust the normal behavior model to obtain the DAEN model, and the DAEN model parameters are stored in the training model database; the OCSVM model is used to calculate the difference between each data in the labeled data set and the decision boundary of the OCSVM model, and a first operation data set is generated according to the calculated difference; the DAEN model is used to calculate the square error value of each data in the labeled data set, and the difference between each square error value and a preset square error threshold is calculated, and a second operation data set is generated according to the calculated difference; the first operation data set and the second operation data set are merged, and the corresponding category label in the labeled data set is added to obtain a third operation data set; the SVM classification algorithm is used to perform binary classification training on the third operation data set to obtain an SVM classification model, and the SVM classification model parameters are stored in the training model database.
7. The system according to claim 6, wherein: The online detection module is configured to process the KPI data using the OCSVM model to determine the difference between the PKI data and the decision boundary of the OCSVM model, and judge whether the KPI data is located inside the decision boundary based on the difference. If the KPI data is located inside the decision boundary, the output first detection result indicates that the KPI data is abnormal; if the KPI data is located outside the decision boundary, the output first detection result indicates that the KPI data is normal.
8. The system according to claim 6, wherein: The online detection module is configured to process the KPI data using the DAEN model to calculate the square error value of the KPI data, and determine whether the square error value of the KPI data is less than a preset square error threshold. If the square error value of the KPI data is less than the preset square error threshold, the output second detection result indicates that the KPI data is normal; if the square error value of the KPI data is greater than the preset square error threshold, the output second detection result indicates that the KPI data is abnormal.
9. The system according to claim 6, wherein: The KPI data includes at least one of CPU load, CPU usage, total number of processes, total number of running processes, memory occupied by processes, total physical memory, available physical memory capacity, network card outflow rate, network card inflow rate, disk read rate, disk write rate, and used space and free space of file system partition.
10. The system according to any one of claims 6 to 9, wherein: In the labeled data set, the data labeled as normal and the data labeled as abnormal are evenly distributed.
11. A system for real-time online detection of virtual machine status, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 5 based on instructions stored in the memory.
12. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Intelligent train comprehensive fault analysis method based on multi-source signals
CN109324604A
Model training method, customer service system, data labeling system and readable storage medium
CN109582793A
Detection method and device for Internet surfing equipment user, storage medium and server
CN109960753A
Wireless network fault detection method based on self-learning
CN110139315A
Anomaly detection method and device, computer device and storage medium
CN110443274A
