Cloud platform abnormal behavior detection method based on depth estimation value
Through depth estimation and multi-layer perceptron technology, the cloud platform log features are mapped to a low-dimensional space and the approximate depth estimation is calculated, which solves the accuracy problem of detecting unknown types of abnormal behaviors in the cloud platform and improves detection accuracy and computing efficiency. .
Patent Information
- Application Number
- CN202410837849.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-24
AI Technical Summary
In the absence of sufficient annotated data, it is difficult for existing technologies to accurately detect unknown types of abnormal behaviors in cloud platforms, resulting in low detection accuracy.
Using a method based on depth estimation, we build an encoder and decoder through a multi-layer perceptron, map the original log features of the cloud platform to a low-dimensional spherical space, calculate an approximate depth estimate, and use a differentiable loss function to train an abnormal behavior detection model. Detect unknown types of abnormal behaviors.
It effectively discovers unknown types of abnormal behaviors, improves the accuracy of abnormal behavior detection on the cloud platform, and improves computing efficiency when processing high-dimensional data. Through end-to-end optimization algorithm training model, the semantic feature extraction and abnormal behavior detection layers are optimized. parameter.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a method for detecting abnormal behavior of a cloud platform based on depth estimation values. Background Art
[0002] With the widespread application of cloud computing technology, cloud platforms have become one of the important facilities for various applications to process and store large amounts of data. Cloud platform abnormal behavior detection can discover unusual patterns from various access behaviors of cloud platforms, thereby detecting behaviors that may lead to data theft, data tampering, and other data security hazards, which is crucial to ensuring the security and reliable operation of cloud platform infrastructure. Abnormal behaviors of cloud platforms are complex and diverse, and new attack methods and abnormal types continue to emerge, making it extremely challenging to accurately detect abnormal behaviors in cloud platforms. Existing machine learning methods are difficult to accurately detect them in the absence of sufficient labeled data.
[0003] In actual scenarios, cloud platforms often make it difficult for experts to annotate new data due to high privacy requirements or complex data, and can only use partially annotated historical data to build detection models. In this case, most existing methods fail to fully characterize all normal patterns contained in historical data, making it difficult to fully detect unknown types of abnormal behaviors, resulting in low detection accuracy for unknown types of abnormal behaviors. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a cloud platform abnormal behavior detection method based on depth estimation value, which solves the problem that the complex and diverse abnormal behaviors and the continuously appearing unknown types in the cloud platform are difficult to detect.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a cloud platform abnormal behavior detection method based on depth estimation value, comprising:
[0006] S1: Obtain the original log features of the cloud platform;
[0007] S2: constructing an initial abnormal behavior detection model using an encoder and a decoder constructed by a multi-layer perceptron; wherein the initial abnormal behavior detection model is used to: map the original log features of the cloud platform to a low-dimensional spherical latent space using the encoder to obtain mapping features as semantic feature vectors; and constrain the output of the encoder using the decoder;
[0008] Analyzing the semantic feature vector and calculating an approximate depth estimation value;
[0009] Inputting the approximate depth estimation value into an abnormality discrimination function to obtain a cloud platform abnormal behavior detection result output by an initial abnormal behavior detection model;
[0010] S3: constructing a differentiable loss function based on the differentiation of the approximate depth estimation value, and training the initial abnormal behavior detection model using the training sample and the differentiable loss function to obtain a trained abnormal behavior detection model;
[0011] S4: Input the original log features of the cloud platform into the trained abnormal behavior detection model to obtain the depth estimation value of the original log features of the cloud platform, and use the depth estimation value to obtain the final cloud platform abnormal behavior detection result to complete the detection of abnormal behavior of the cloud platform.
[0012] Further, the S3 includes:
[0013] The approximate depth estimate is expressed in the form of counts:
[0014]
[0015] Where D′(z,X) represents the approximate depth estimation value, n represents the dimension of the semantic feature vector, H represents the conditional function, z represents the semantic feature, x represents the sample semantic feature, and X represents the semantic feature vector;
[0016] The approximate depth estimate is calculated using a differentiable depth estimate calculation formula to obtain the differential of the approximate depth estimate:
[0017]
[0018] Where D”(z,X) represents the differential of the approximate depth estimate with respect to the semantic feature vector, and G represents a differentiable function;
[0019] Based on the differentiation of the approximate depth estimate, a differentiable loss function is constructed, and the initial abnormal behavior detection model is trained using the large number of unlabeled cloud platform original log features and a small number of cloud platform original log features with known types of abnormal behaviors annotated to obtain a trained abnormal behavior detection model; wherein, a large number of unlabeled cloud platform original log features and a small number of cloud platform original log features with known types of abnormal behaviors annotated belong to the training samples.
[0020] Furthermore, the expression of the conditional function is:
[0021]
[0022] Among them, H(x) represents the result of the conditional function;
[0023] The expression of the differentiable function is:
[0024]
[0025] Among them, G(x) represents the result of the differentiable function.
[0026] Furthermore, the expression of the differentiable loss function in S3 is:
[0027] L(x)=L r (x)+λ·L s (x)+μ·L T (x);
[0028] L r (x) = ||xD(E(x))||2;
[0029]
[0030] Among them, L(x) represents the differentiable loss function, L r (x) represents the reconstruction error loss of the sample semantic features, λ represents the weight of the compact regularization loss, and L s (x) represents the compact regularization loss of the sample semantic features, μ represents the weight of the depth estimation regularization loss, and L T (x) represents the regularized loss of depth estimation of sample semantic features, x represents sample semantic features, D represents the decoder, E(x) represents the encoder, ||·||2 represents the 2-norm, z represents semantic features, k represents the batch size, z0 represents the bottleneck layer output of a batch of training samples, Z represents the set of bottleneck layer outputs of a batch of training samples, y represents the weak supervision label, and D”(z,Z) represents the differential of the approximate depth estimate with respect to the training sample.
[0031] Furthermore, the expression of the semantic feature vector is:
[0032] h i (x) = σ(xW i +b i );
[0033] Among them, h i (x) represents the semantic feature vector output by the i-th layer, σ represents the activation function, x represents the sample semantic feature, W represents the weight matrix of the i-th layer, and b i Represents the bias vector of the i-th layer.
[0034] Furthermore, the expression of the approximate depth estimation value is:
[0035]
[0036] Among them, D′(z,X) represents the approximate depth estimate, n represents the dimension of the semantic feature vector, card() represents the number of elements in the set, i represents the i-th layer, z represents the semantic feature, and X irepresents the semantic feature vector of the i-th layer, and X represents the semantic feature vector.
[0037] Furthermore, the expression of the abnormal behavior detection result of the cloud platform is:
[0038]
[0039] Among them, F(z) represents the abnormal behavior detection result of the cloud platform, D(z,X) represents the projection of the depth estimation value, z represents the semantic feature, X represents the semantic feature vector, and p represents the preset fixed threshold.
[0040] The beneficial effects of the present invention are as follows: the processor processes the original log features of the cloud platform by using the abnormal behavior detection model trained by using a differentiable loss function to obtain the abnormal behavior detection results of the cloud platform, and completes the detection of abnormal behavior of the cloud platform. (1) The original log features of the cloud platform are mapped to a low-dimensional spherical latent space using the abnormal behavior detection model, and the difference between normal and abnormal features is characterized by an approximate depth estimation value, thereby effectively discovering the corresponding unknown type of abnormal behavior from the low-dimensional features; (2) The approximate depth estimation value is obtained by using a better hyperplane. Compared with using an accurate depth value, there is no need to accurately calculate the optimal hyperplane with extremely high time complexity, thereby greatly improving the computational efficiency when processing data with extremely high dimensions; (3) Differentiable functions are used to represent the counting steps in the calculation of the depth estimation value, thereby designing a differentiable loss function. Differentiable functions allow the entire model to be trained end-to-end through optimization algorithms such as gradient descent. This means that the parameters of the semantic feature extraction layer and the abnormal behavior detection layer can be optimized at the same time, thereby obtaining better performance of the abnormal behavior detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0042] Figure 1 This is an exemplary flowchart of a cloud platform abnormal behavior detection method based on depth estimation values according to some embodiments of this specification. DETAILED DESCRIPTION
[0043] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0044] Example
[0045] Figure 1 FIG. 1 is an exemplary flow chart of a method for detecting abnormal behavior of a cloud platform based on depth estimation values according to some embodiments of this specification. Figure 1 As shown, the process includes the following steps. In some embodiments, the process can be executed by a processor.
[0046] S1: Obtain the original log features of the cloud platform.
[0047] The cloud platform original log features are log features generated by the interaction between the cloud platform and the user. For example, the cloud platform original log features may include database access features, cloud host access features, and cloud storage access features.
[0048] In some embodiments, the processor may extract raw log features of the cloud platform based on historical data of the cloud platform.
[0049] S2: Construct an initial abnormal behavior detection model using an encoder and a decoder constructed using a multi-layer perceptron; wherein the initial abnormal behavior detection model is used to: use the encoder to map the original log features of the cloud platform to a low-dimensional spherical latent space to obtain mapping features as semantic feature vectors; use the decoder to constrain the output of the encoder; analyze the semantic feature vector to calculate an approximate depth estimation value; input the approximate depth estimation value into an abnormal discrimination function to obtain the cloud platform abnormal behavior detection result output by the initial abnormal behavior detection model.
[0050] A multilayer perceptron is a structure with at least one hidden layer used to build encoders and decoders.
[0051] The encoder is a structure used to map the feature vector to a low-dimensional space.
[0052] The decoder is a structure used to map the feature vector in the low-dimensional space back to the original log space, which is used to constrain the output of the encoder.
[0053] The initial abnormal behavior detection model is a model used to detect the original log features of the cloud platform and obtain the abnormal behavior detection results of the cloud platform.
[0054] In some embodiments, the initial abnormal behavior detection model may include a semantic feature extraction layer and an abnormal behavior detection layer. The output of the semantic feature extraction layer is used as the input of the abnormal behavior detection layer, and the output of the abnormal behavior detection layer is used as the output of the initial abnormal behavior detection model.
[0055] In some embodiments, the input of the semantic feature extraction layer may be the original log features of the cloud platform, and the output may be a semantic feature vector.
[0056] In some embodiments, the input of the abnormal behavior detection layer may be a semantic feature vector, and the output may be a cloud platform abnormal behavior detection result.
[0057] The semantic feature extraction layer includes an encoder and a decoder constructed by a multi-layer perceptron, which are used to map the original log features of the cloud platform into a low-dimensional spherical space to obtain a semantic feature vector.
[0058] The semantic feature vector is a vector composed of the original log features of the cloud platform in a low-dimensional spherical space.
[0059] In some embodiments, the processor may use an encoder to map the original log features of the cloud platform to a low-dimensional spherical space, and use a decoder to restore the features in the low-dimensional spherical space to obtain a semantic feature vector.
[0060] The abnormal behavior detection layer is used to analyze the semantic feature vector to obtain abnormal behavior detection results of the cloud platform.
[0061] The cloud platform abnormal behavior detection result is a detection result that reflects whether there are abnormalities in various behaviors of the cloud platform. For example, when the detection result is 1, it means that the corresponding behavior is abnormal, and when the detection result is 0, it means that the corresponding behavior is normal.
[0062] In some embodiments, the processor may process the original log features of the cloud platform using an abnormal behavior detection model to obtain abnormal behavior detection results of the cloud platform.
[0063] In some embodiments, the processor may obtain the cloud platform abnormal behavior detection result output by the initial abnormal behavior detection model based on the following steps.
[0064] The encoder is used to map the original log features of the cloud platform to a low-dimensional spherical latent space to obtain mapping features.
[0065] The mapping features are the original log features of the cloud platform in a low-dimensional spherical latent space.
[0066] The decoder is used to map the mapping feature back to the original log feature space to obtain the semantic feature vector.
[0067] In some embodiments, the expression of the semantic feature vector may be:
[0068] h i (x) = σ(xW i +b i );
[0069] Among them, h i (x) represents the semantic feature vector output by the i-th layer, σ represents the activation function, x represents the sample semantic feature, W represents the weight matrix of the i-th layer, and bi Represents the bias vector of the i-th layer.
[0070] The abnormal behavior detection layer is used to analyze the semantic feature vector and calculate an approximate depth estimation value.
[0071] In some embodiments, the processor may gather all semantic feature vectors in a spherical region near the origin, cut the spherical region into two largest and smallest regions using a hyperplane with a certain feature vector as the normal vector, and use the hyperplane to obtain an approximate depth estimate.
[0072] In some embodiments, the expression for the approximate depth estimate may be:
[0073]
[0074] Among them, D′(z,X) represents the approximate depth estimate, n represents the dimension of the semantic feature vector, card() represents the number of elements in the set, i represents the i-th layer, z represents the semantic feature, and X i represents the semantic feature vector of the i-th layer, and X represents the semantic feature vector.
[0075] The approximate depth estimation value is input into an abnormality discrimination function to obtain a cloud platform abnormal behavior detection result output by the initial abnormal behavior detection model.
[0076] In some embodiments, the expression of the cloud platform abnormal behavior detection result can be:
[0077]
[0078] Among them, F(z) represents the abnormal behavior detection result of the cloud platform, D(z,X) represents the projection of the depth estimation value, z represents the semantic feature, X represents the semantic feature vector, and p represents the preset fixed threshold.
[0079] S3: Based on the differentiation of the approximate depth estimation value, a differentiable loss function is constructed, and the initial abnormal behavior detection model is trained using the training samples and the differentiable loss function to obtain a trained abnormal behavior detection model.
[0080] A differentiable loss function is a combination of multiple loss functions including differentiable functions. For example, a differentiable loss function may include a reconstruction error loss, a compact regularization loss, and a depth estimation regularization loss.
[0081] In some embodiments, the processor can use counting to represent the approximate depth estimate value; use a differentiable depth estimate calculation formula to calculate the approximate depth estimate value to obtain the differential of the approximate depth estimate value; based on the differential of the approximate depth estimate value, construct a differentiable loss function to train the initial abnormal behavior detection model to obtain a trained abnormal behavior detection model.
[0082] The depth estimate (TukeyDepth) is a numerical value reflecting the abnormal score of the behavior.
[0083] An approximate depth estimate is an approximation that approximates the depth estimate.
[0084] In some embodiments, the expression for the approximate depth estimate may be:
[0085]
[0086] Among them, D′(z,X) represents the approximate depth estimation value, n represents the dimension of the semantic feature vector, H represents the conditional function, z represents the semantic feature, x represents the sample semantic feature, and X represents the semantic feature vector.
[0087] In some embodiments, the expression of the conditional function may be:
[0088]
[0089] Among them, H(x) represents the result of the conditional function.
[0090] In some embodiments, the expression for the differential of the approximate depth estimate may be:
[0091]
[0092] Where D”(z,X) represents the differential of the approximate depth estimate with respect to the semantic feature vector, and G represents a differentiable function.
[0093] In some embodiments, the expression of the differentiable function may be:
[0094]
[0095] Among them, G(x) represents the result of the differentiable function.
[0096] In some embodiments, the abnormal behavior detection model can be obtained by training multiple labeled training samples. For example, multiple labeled training samples can be input into the initial abnormal behavior detection model, and a differentiable loss function can be constructed by using the labels and the results of the initial abnormal behavior detection model. The parameters of the initial abnormal behavior detection model can be iteratively updated by gradient descent or other methods based on the differentiable loss function. When the preset conditions are met, the model training is completed and a trained abnormal behavior detection model is obtained. The preset conditions can be that the differentiable loss function converges, the number of iterations reaches a threshold, etc.
[0097] In some embodiments, the training samples may include a large number of unlabeled cloud platform raw log features and a small number of cloud platform raw log features with known types of abnormal behavior labels. The labels may be corresponding cloud platform abnormal behavior detection results. The labels may be manually labeled.
[0098] In some embodiments, the training samples may also include cloud platform raw log features in the NSL-KDD dataset.
[0099] In some embodiments, the expression of the differentiable loss function may be:
[0100] L(x)=L r (x)+λ·L s (x)+μ·L T (x);
[0101] L r (x) = ||xD(E(x))||2;
[0102]
[0103] Among them, L(x) represents the differentiable loss function, L r (x) represents the reconstruction error loss of the sample semantic features, λ represents the weight of the compact regularization loss, and L s (x) represents the compact regularization loss of the sample semantic features, μ represents the weight of the depth estimation regularization loss, and L T (x) represents the regularized loss of depth estimation of sample semantic features, x represents sample semantic features, D represents the decoder, E(x) represents the encoder, ||·||2 represents the 2-norm, z represents semantic features, k represents the batch size, z0 represents the bottleneck layer output of a batch of training samples, Z represents the set of bottleneck layer outputs of a batch of training samples, y represents the weak supervision label, and D”(z,Z) represents the differential of the approximate depth estimate with respect to the training sample.
[0104] S4: Input the original log features of the cloud platform into the trained abnormal behavior detection model to obtain the depth estimation value of the original log features of the cloud platform, and use the depth estimation value to obtain the final cloud platform abnormal behavior detection result to complete the detection of abnormal behavior of the cloud platform.
[0105] In some embodiments, the processor may utilize the abnormal behavior detection results of the cloud platform to detect various behavioral features of the cloud platform within a preset time period and distinguish between normal behavior and various types of abnormal behavior.
[0106] In some embodiments of the present specification, the processor processes the original log features of the cloud platform by using the abnormal behavior detection model trained by the differentiable loss function to obtain the abnormal behavior detection results of the cloud platform, and completes the detection of abnormal behavior of the cloud platform. The original log features of the cloud platform are mapped to a low-dimensional spherical latent space by using the abnormal behavior detection model, and the difference between normal and abnormal features is characterized by the approximate depth estimation value, so as to effectively discover the corresponding unknown type of abnormal behavior from the low-dimensional features; the approximate depth estimation value is obtained by using a better hyperplane, and compared with the use of the precise depth value, there is no need to accurately calculate the optimal hyperplane with extremely high time complexity, so that the calculation efficiency can be greatly improved when processing data with extremely high dimensions; the counting step in the calculation of the depth estimation value is represented by a differentiable function, so as to design a differentiable loss function. Differentiable functions allow the entire model to be trained end-to-end through optimization algorithms such as gradient descent. This means that the parameters of the semantic feature extraction layer and the abnormal behavior detection layer can be optimized at the same time, so as to obtain better performance of the abnormal behavior detection model.
Claims
1. A cloud platform abnormal behavior detection method based on depth estimation, characterized in that: include: S1: Obtain the original log features of the cloud platform; S2: Use the encoder and decoder built by the multi-layer perceptron to build the initial abnormal behavior detection model; The initial abnormal behavior detection model is used to: map the original log features of the cloud platform to a low-dimensional spherical latent space using the encoder to obtain mapping features as semantic feature vectors; and constrain the output of the encoder using the decoder; Analyzing the semantic feature vector and calculating an approximate depth estimation value; The original detection result is corrected by using the approximate depth estimation value, and an abnormal discrimination function is input to obtain a cloud platform abnormal behavior detection result output by an initial abnormal behavior detection model; S3: constructing a differentiable loss function based on the differentiation of the approximate depth estimation value, and training the initial abnormal behavior detection model using the training sample and the differentiable loss function to obtain a trained abnormal behavior detection model; S4: Input the original log features of the cloud platform into the trained abnormal behavior detection model to obtain the depth estimation value of the original log features of the cloud platform, and use the depth estimation value to obtain the final cloud platform abnormal behavior detection result to complete the detection of abnormal behavior of the cloud platform.
2. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 1 is characterized in that: The S3 includes: The approximate depth estimate is expressed in the form of counts: Where D′(z,X) represents the approximate depth estimation value, n represents the dimension of the semantic feature vector, H represents the conditional function, z represents the semantic feature, x represents the sample semantic feature, and X represents the semantic feature vector; The approximate depth estimate is calculated using a differentiable depth estimate calculation formula to obtain the differential of the approximate depth estimate: Where D”(z,X) represents the differential of the approximate depth estimate with respect to the semantic feature vector, and G represents a differentiable function; Based on the differentiation of the approximate depth estimate, a differentiable loss function is constructed, and the initial abnormal behavior detection model is trained using the large number of unlabeled cloud platform original log features and a small number of cloud platform original log features with known types of abnormal behaviors annotated to obtain a trained abnormal behavior detection model; wherein, a large number of unlabeled cloud platform original log features and a small number of cloud platform original log features with known types of abnormal behaviors annotated belong to the training samples.
3. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 2 is characterized in that: The expression of the conditional function is: Among them, H(x) represents the result of the conditional function; The expression of the differentiable function is: Among them, G(x) represents the result of the differentiable function.
4. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 1 is characterized in that: The expression of the differentiable loss function is: L(x)=L r (x)+λ·L s (x)+μ·L T (x); L r (x)=||x-D(E(x))||2; Among them, L(x) represents the differentiable loss function, L r (x) represents the reconstruction error loss of the sample semantic features, λ represents the weight of the compact regularization loss, and L s (x) represents the compact regularization loss of the sample semantic features, μ represents the weight of the depth estimation regularization loss, and L T (x) represents the regularized loss of depth estimation of sample semantic features, x represents sample semantic features, D represents the decoder, E(x) represents the encoder, ||·||2 represents the 2-norm, z represents semantic features, k represents the batch size, z0 represents the bottleneck layer output of a batch of training samples, Z represents the set of bottleneck layer outputs of a batch of training samples, y represents the weak supervision label, and D”(z,Z) represents the differential of the approximate depth estimate with respect to the training sample.
5. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 1 is characterized in that: The expression of the semantic feature vector is: h i (x)=σ(xW i +b i ); Among them, h i (x) represents the semantic feature vector output by the i-th layer, σ represents the activation function, x represents the sample semantic feature, W represents the weight matrix of the i-th layer, and b i Represents the bias vector of the i-th layer.
6. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 1 is characterized in that: The expression of the approximate depth estimate is: Among them, D′(z,X) represents the approximate depth estimate, n represents the dimension of the semantic feature vector, card() represents the number of elements in the set, i represents the i-th layer, z represents the semantic feature, and X i represents the semantic feature vector of the i-th layer, and X represents the semantic feature vector.
7. The cloud platform abnormal behavior detection method based on depth estimation value according to claim 1 is characterized in that: The expression of the abnormal behavior detection result of the cloud platform is: Among them, F(z) represents the abnormal behavior detection result of the cloud platform, D(z,X) represents the projection of the depth estimation value, z represents the semantic feature, X represents the semantic feature vector, and p represents the preset fixed threshold.
