Database system log analysis and processing analysis method

The method addresses data inefficiencies and neural network instability in database log analysis by using a generative adversarial network, policy gradient adjusted neural network, quantum interference autoencoder, and extreme learning machine for enhanced log classification and security threat detection.

CN119089496APending Publication Date: 2024-12-06SHANGHAI SHANGJIA INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411179132.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing database log analysis methods face challenges such as insufficient data or low labeling efficiency, gradient problems in neural networks, and insufficient classification accuracy, especially with complex data, leading to instability and decreased performance.

Method used

A method involving data collection and annotation, followed by data expansion using a generative adversarial network, feature extraction with a 6-layer fully connected neural network adjusted by policy gradient, feature dimensionality reduction with an autoencoder employing quantum interference, and classification with an extreme learning machine algorithm for improved accuracy and adaptability.

Benefits of technology

Enables quick and accurate classification of database system logs, enhancing real-time monitoring and security threat detection, and providing reliable decision support for system management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089496A_ABST
    Figure CN119089496A_ABST
Patent Text Reader

Abstract

A database system log analysis and processing analysis method belongs to the technical field of data processing, and comprises the following steps: S1, data acquisition and labeling; s2, performing sample generation by adopting a generative adversarial network based on adaptive noise suppression learning to realize data expansion; s3, inputting the expanded data into a feature extraction model for model training, and performing feature extraction by adopting a six-layer full-connection neural network; s4, inputting the data subjected to feature extraction into a feature dimension reduction model for model training, wherein an auto-encoder algorithm is specifically adopted; s5, inputting the data subjected to dimension reduction into a classifier for model training, wherein an extreme learning machine algorithm based on implicit neural representation is specifically adopted; and S6, log analysis and operation behavior identification. According to the method, a response can be made in real time when a new log record is faced, possible security threats or abnormal behaviors can be recognized, and an important basis is provided for security management and fault diagnosis of a database system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method for parsing and processing logs of a database system. Background Art

[0002] With the rapid development of information technology, database systems play an increasingly important role in the daily operations of organizations and individuals. The large number of operation logs generated by these systems contain rich operation information, such as query statements, execution time, user information, and changes to the database structure. However, the scale of these log data is large and complex, and traditional log analysis methods are difficult to process and analyze effectively, especially in real-time monitoring and security threat identification.

[0003] In response to this problem, the Chinese invention patent with application number CN202010886796.0 proposes an application control method and system based on machine learning, the method comprising: obtaining the historical operation data of the application to obtain a sample set; establishing labels for the samples of the sample set; obtaining a first model based on the sample set and its labels based on a machine learning method; selecting one or more indicators of the operation of the application; judging whether the current value of the indicator exceeds a preset range; if so, calculating the current data of the application based on the first model; and controlling the number of processes of the application according to the calculation result. The interval of the indicator is first pre-judged, and then the data exceeding the reasonable interval is predicted by the first model. The calculation amount of pre-judgment of the interval of the indicator is small, which is conducive to saving computing resources; the number of processes of the application is calculated by the first model as a secondary screening and judgment to control the number of processes of the application and adjust the processing volume of the application. The Chinese invention patent with application number CN202410796336.7 proposes a network security data processing technology, especially a network security threat detection method and system based on machine learning. The method includes the following steps: based on a preset network data monitoring script, the network interface data is subjected to network data flow monitoring processing to generate flow monitoring data; data packet parsing is performed on the flow monitoring data to generate flow parsing data; structured anomaly and source tracing anomaly analysis of the flow parsing data is performed on the flow parsing data to obtain abnormal flow parsing data; preliminary security flow monitoring data extraction is performed on the flow monitoring data according to the source tracing conventional flow parsing data to generate preliminary security flow monitoring data; network attack flow identification is performed on the preliminary security flow behavior data to generate network attack flow data; and a network attack flow security interception mechanism is designed based on the network attack flow data. The present invention realizes efficient network security threat detection by analyzing the abnormal flow characteristics through machine learning. The Chinese invention patent with application number CN202410372019.2 proposes a network security event classification method and system based on a machine learning algorithm. The network security event classification method based on machine learning algorithm includes: collecting data information corresponding to network complete events, generating training data sets and test data sets; retrieving a machine learning algorithm model for network security event classification from a database, and training the machine learning algorithm model to obtain a trained machine learning algorithm model; testing the machine learning algorithm model using the test data set to obtain a test result of the machine learning algorithm model; when the test result does not meet the preset classification requirements, retraining the machine learning algorithm model until the test result of the machine learning algorithm model meets the preset classification requirements. The system includes modules corresponding to the steps of the method.

[0004] The above technical solutions can solve some problems to a certain extent, but the following problems still need to be further solved:

[0005] 1. Existing technologies may face problems of insufficient data or low labeling efficiency during data collection and labeling, resulting in a lack of sufficient high-quality samples for model training.

[0006] 2. Traditional neural networks may encounter gradient problems or local optimal solutions during feature extraction, affecting the stability and performance of the model.

[0007] 3. Existing technologies may not be able to effectively retain key information of the data during the feature dimensionality reduction process, resulting in a decrease in reconstruction quality.

[0008] 4. Existing classification algorithms may not be able to accurately encode and classify input data, especially when faced with complex data or data with specific characteristics, the classification accuracy and adaptability may be insufficient. Summary of the invention

[0009] The present invention proposes a database system log parsing and processing analysis method. By using the trained model to process new samples, the database system logs can be quickly and accurately classified and analyzed. When faced with new log records, it can respond immediately and identify possible security threats or abnormal behaviors, which provides an important basis for the security management and fault diagnosis of the database system. It not only improves the real-time monitoring capability of the system, but also provides a reliable decision support tool for operation and maintenance personnel.

[0010] The technical solution adopted by the present invention is:

[0011] A database system log parsing and processing analysis method comprises the following steps:

[0012] S1. Data collection and annotation: Data is collected from database operation logs, which record detailed information of all transactions during the operation of the database, including query statements, execution time, user information, and changes to the database structure; the collected log data is stored in a structured JSON format, and the collected data is manually annotated;

[0013] S2, data expansion: Use the generative adversarial network based on adaptive noise suppression learning to generate samples and then achieve data expansion;

[0014] S3. Feature extraction model training: The expanded data is input into the feature extraction model for feature extraction model training. A 6-layer fully connected neural network is used for feature extraction. In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, gradient vanishing, gradient explosion, or falling into the local optimal solution may occur, affecting the stability of training and the performance of the model. Specifically, a neural network feature extraction model based on policy gradient adjustment is used to extract the key features of the database system log data. The policy gradient method is used on the basis of the traditional neural network to allow the network to automatically adjust its behavior strategy during the learning process, optimizing the efficiency and accuracy of feature extraction.

[0015] S4, feature dimensionality reduction model training: the data after feature extraction is input into the feature dimensionality reduction model for training the feature dimensionality reduction model, and the autoencoder algorithm is specifically used as the feature dimensionality reduction model, the autoencoder algorithm is composed of an encoder and a decoder, the encoder is responsible for compressing the high-dimensional input data into a low-dimensional feature representation, and the decoder attempts to reconstruct the original input data from these low-dimensional representations. The present invention adopts a quantum interference strategy in each layer of the encoder and the decoder, optimizes the flow of information by simulating the interference pattern of the quantum state, and enhances the accuracy of feature extraction and data reconstruction.

[0016] S5. Classifier model training: The reduced-dimensional data is input into the classifier to train the classifier model. Specifically, the extreme learning machine algorithm based on implicit neural representation is used as the classification algorithm. On the basis of the extreme learning machine algorithm, an implicit function is used to represent the activation state of neurons, which includes not only linear or nonlinear activation, but also adaptive learning of specific data features, so that each neuron can encode its input more accurately, thereby improving classification performance and classification accuracy.

[0017] S6. Log parsing and operation behavior identification: Use the trained model to process new log samples. First, input the collected original data into the trained feature extraction and feature dimension reduction model for feature processing, and then input the processed features into the classifier model for classifier training to obtain the classification results.

[0018] Furthermore, the data expansion of step S2, the specific training process is as follows:

[0019] S201, initializing the parameters of the generator and the discriminator, including the weight and bias parameters of the generator, and the weight and bias parameters of the discriminator, in a random initialization manner;

[0020] S202: Based on the current network state, a preliminary noise vector is generated using an adaptive noise module. The adaptive noise generation method is expressed as:

[0021] zc =A c ⊙(μ c +σ c ⊙∈ c )

[0022] In the formula, z c is the generated noise vector; μ c is the mean vector of noise; σ c is the standard deviation vector of the noise; ∈ c is the random noise sampled from the standard normal distribution; ⊙ is the element-wise multiplication; A c is the noise attention weight vector;

[0023] The calculation method of the standard deviation vector of the noise is expressed as:

[0024]

[0025] Where Sig() is the Sigmoid activation function, β c is a learnable scaling parameter, tanh() is the hyperbolic tangent function, N c represents the number of nodes in the network layer of the adaptive noise module, W c,i is the weight of the ith node in the network layer of the adaptive noise module, b c,i is the bias of the ith node in the network layer of the adaptive noise module, d out is the input vector of the adaptive noise module network layer;

[0026] Through the adversarial attention weight vector, the features that have the greatest impact on the generated quality are dynamically selected and strengthened, thereby improving the authenticity and diversity of the generated data. The calculation method is expressed as:

[0027] A c =sof(V c tanh(W c,a z c +b c,a ))

[0028] Where W c,a and b c,a are the learned parameter matrix and bias vector respectively; V c is the attention adjustment parameter; sof() is the Softmax function, which is used to normalize the weight;

[0029] S203, the generator G uses the adjusted noise vector to generate new log data, and the generation method is expressed as:

[0030] X c =G(z c ,θ c )

[0031] Where, X c represents the generated log data; G() is the generator function; θ c is the parameter of the generator;

[0032] S204. According to the feedback from the discriminator, the parameters of the generator are adjusted. Specifically, a composite loss function is used to optimize the generation process to ensure that the generated log data is more realistic, which is expressed as:

[0033]

[0034] In the formula, is the composite loss function, λ c is the first regularization parameter, γ c is the second regularization coefficient, ∥∥ represents the L2 norm;

[0035] S205, adjusting the mean vector of the noise according to the performance of the discriminator, and the calculation method of the increment of the mean vector of the noise is expressed as:

[0036]

[0037] In the formula, Δμ c is the increment of the mean vector of the noise; η c Adjust learning rate for noise; is the gradient of the composite loss function with respect to the mean vector;

[0038] The update method of the noise mean vector is expressed as:

[0039] μ c (t+1) =μ c (t) +Δμ c

[0040] In the formula, μ c (t+1) is the mean vector of the noise at the t+1th iteration; μ c (t) is the mean vector of the noise at the tth iteration;

[0041] S206: Repeat iterative steps S201-S205 until the preset stop iteration condition is met, indicating that the model training is completed.

[0042] Furthermore, the feature extraction model training in step S3 has the following specific training process:

[0043] S301, setting the initial network parameters of the neural network, including the weight W of the neural network p and the bias b of the neural network p , the initialization method is random initialization;

[0044] S302, input the database log data after data expansion into the neural network, perform forward propagation of the data, and calculate the output features of each layer of the neural network; specifically, adaptive noise modulation is used to enhance the randomness of the input feature vector to enhance the model's understanding and processing capabilities of the input data;

[0045] For the first layer of the neural network, the calculation method is expressed as:

[0046] h p (1) =Sig(W p (1) x p ′+b p (1) )

[0047]

[0048] In the formula, x p is the feature vector of the input neural network; ⊙ is element-wise multiplication; represents the normal distribution noise with mean 0 and standard deviation as the unit matrix, I is the unit matrix; σ p (x p ) is an adaptive standard deviation function based on the input; x p ′ is the input feature vector after modulation; W p (1) is the weight matrix from the neural network input layer to the first hidden layer; b p (1) is the bias vector from the neural network input layer to the first hidden layer; Sig() is the Sigmoid activation function; h p (1) is the output of the first hidden layer of the neural network;

[0049] For the transmission from the 2nd layer of neural network to the 6th layer of neural network, the calculation method is expressed as:

[0050] h p (i) =Sig(W p (i) h p (i-1) +b p (i) )

[0051] In the formula, h p (i) is the output of the i-th layer of the neural network, h p (i-1) is the output of the previous hidden layer (i.e., the i-1th layer) of the neural network; W p(i) is the weight of the i-th layer of the neural network; b p (i) is the bias of the i-th layer of the neural network;

[0052] S303, using the policy gradient method to adjust the network strategy and enhance the recognition ability of key features. Specifically, the policy gradient method calculates the update amount of the neural network weight according to the policy function. The calculation method is expressed as:

[0053]

[0054] In the formula, ΔW p is the update amount of the neural network weight; α p is the learning rate of the neural network; Tnn is the total number of iterations of the neural network; γ p is the discount factor, is the discount factor for the tth iteration; W p is the weight parameter of the neural network; G t is the return at the tth iteration; is the gradient of the weight; π p () is the strategy function; π p (a t |s t ,W p ) determines the parameter W p When the state s is given t Take the update strategy a t The probability of The calculation method is expressed as:

[0055]

[0056] In the formula, R t For immediate reward; b p (s t ) is state s t Baseline function under s t is the state of the tth iteration; a t is the update strategy for the tth iteration; Q p () is the action value function; Q p (s t ,a t ,W p ) indicates that the parameter is W p When in state s t Take the update strategy a t expected benefits;

[0057] The calculation method of the action value function is expressed as:

[0058]

[0059] In the formula, is the discount factor for the kth iteration; r t+k is the updated parameter value for the t+kth time; r t+k |s t Represents a given state s t The updated parameter value for the t+kth time under ;

[0060] S304. After each forward propagation, the neuron competition mechanism is activated, and the importance of each neuron is evaluated according to its output contribution. The activity of the neurons is screened by a preset threshold, and those more active neurons are trained first. For neurons with high activity, the weight update method is expressed as follows:

[0061]

[0062] Where ← is the parameter update symbol; η p is the learning rate of neural network back propagation; CA p () is the content-aware function; h p (i) (t) is the hidden layer output of the i-th neural network at the t-th iteration; W p (i) represents the weight of the i-th layer of the neural network; J p () is the loss function of the neural network; is the loss function of the neural network relative to the weight W p (i) The gradient of

[0063] Among them, the loss function of the neural network is defined as:

[0064]

[0065] Where Mnn is the number of training samples input in the current batch; C is the total number of categories; y ij If the i-th sample belongs to the j-th category, it is 1, otherwise it is 0; p ij is the probability that the i-th predicted sample of the model belongs to the j-th category;

[0066] The content-aware function dynamically adjusts the intensity of weight updates according to the information content of the current layer output. The calculation method of the content-aware function is expressed as:

[0067]

[0068] Where, CA p (h p ) represents the output h based on the current layer pis the content-aware weight adjustment factor; ∥∥ is the L2 norm; h p is the output of the hidden layer;

[0069] S305, repeating iterative steps S301-S304 until the preset stop iteration condition is met, indicating that the model training is completed.

[0070] Furthermore, the feature dimension reduction model training in step S4 has the following specific training process:

[0071] S401, initializing the weights and bias parameters of the encoder and decoder, and the initialization method is random initialization;

[0072] S402, input the data after feature extraction, and perform multi-layer conversion through the encoder. Each layer uses the quantum interference strategy to enhance the feature extraction capability. The low-dimensional feature representation finally formed is a compressed expression of the input data, which is expressed as:

[0073] z r =tanh(W r ·x r +b r )⊙cos(φ(x r ))

[0074] In the formula, z r represents the encoded low-dimensional feature vector, x r is the feature vector after input feature extraction; W r is the weight matrix of the coding layer; b r is the bias vector of the coding layer; tanh() is the hyperbolic tangent function; cos() represents the cosine transform of the simulated quantum interference strategy; φ() is the phase adjustment function of the coding feature, φ(x r ) is a phase adjustment function that changes dynamically according to input data;

[0075] The calculation method of the phase adjustment function is expressed as:

[0076]

[0077] Where W φ,k is the first parameter matrix, W′ φ,k is the second parameter matrix, the first parameter matrix and the second parameter matrix are used to respectively r Transform to produce a linear combination of the numerator and denominator; x r k The kth column of the feature vector after feature extraction of the input; the arctan() function is used to convert the linear combination into a phase angle, providing a periodically changing angle to simulate the phase change of the quantum state;

[0078] S403. During the decoding process, the low-dimensional feature representation output by the encoder is sent to the decoder. The decoder attempts to reconstruct the original input data through the opposite multi-layer structure and adopts a quantum interference strategy to optimize the reconstruction quality, which is expressed as:

[0079] y r =W′ r ·(z r ⊙sin(φ(z r )))+b′ r

[0080] In the formula, y r is the reconstructed data after decoding; W′ r is the weight matrix of the decoding layer; b′ r is the bias vector of the decoding layer; sin() represents the sine transform, which corresponds to the cosine transform in the encoding stage to achieve complete reconstruction of the data; φ() is the phase adjustment function of the encoding feature, and the calculation method is the same as the phase adjustment function described in step S402;

[0081] S404, calculate the gradient according to the loss function of the autoencoder, and update the parameters of the encoder and decoder through the back propagation algorithm. The update method is expressed as:

[0082]

[0083] Where η r is the learning rate of the autoencoder; sgn() is the sign function of the weight; α r is the adjustment coefficient of the autoencoder; ψ() is the adjustment function of the autoencoder; E r is the reconstruction error factor;

[0084] Among them, the reconstruction error factor E r The calculation method is expressed as:

[0085] E r =∥x r -y r ∥ 2

[0086] Where, ∥∥ is the L2 norm;

[0087] The calculation method of the adjustment function of the autoencoder is expressed as:

[0088]

[0089] Where kr is the adjustment sensitivity coefficient, θ r is the error threshold;

[0090] S405, repeating the iteration steps S401-S404 until the preset stop iteration condition is met, indicating that the model training is completed.

[0091] Furthermore, the classifier model training in step S5 has the following specific training process:

[0092] S501, using a density-aware mechanism to initialize the parameters of an extreme learning machine, so as to ensure the sensitivity of the model to sparse data areas, wherein the parameters of the extreme learning machine include weights and bias parameters of the extreme learning machine; specifically, the following formula is used for calculation:

[0093] W u (0) =Sig(A u ·X u +c u )

[0094] b u (0) =0

[0095] Where W u is the weight of the extreme learning machine, W u (0) is the initial weight of the extreme learning machine; b u is the bias of the extreme learning machine, b u (0) is the initial bias of the extreme learning machine; Sig() is the Sigmoid activation function; A u is the density perception matrix; X u is the feature matrix after the input feature is reduced in dimension; c u To initialize the bias vector;

[0096] Among them, the calculation method of the density perception matrix is ​​expressed as:

[0097] A u =exp(-γ u ∥X u -μ u ∥ 2 )

[0098] In the formula, γ u is the density adjustment parameter; μ u is the mean vector of the input data center;

[0099] S502, input the data after feature dimension reduction into the extreme learning machine for forward propagation calculation. The hidden layer of the extreme learning machine is processed by implicit neural representation learning method. Specifically, the output of each neuron not only depends on its activation function, but also performs adaptive learning according to the characteristics of the input data through the implicit neural representation function. The calculation method of forward propagation is expressed as:

[0100] H u =Re(W u ·X u +b u +ξ u (X u ))

[0101] In the formula, H u is the output of the hidden layer of the extreme learning machine; u () is the implicit neural representation function; Re() is the ReLU activation function;

[0102] Among them, the calculation method of the implicit neural representation function is expressed as:

[0103]

[0104] In the formula, is the first weight matrix of the linear transformation; is the second weight matrix of the linear transformation, is the first bias term of the linear transformation; is the second bias term of the linear transformation; tanh() is the hyperbolic tangent function; α u is the weighting factor of the implicit neural representation function;

[0105] S503, the output of the hidden layer of the extreme learning machine is transmitted to the output layer of the extreme learning machine, the neurons of the output layer of the extreme learning machine directly calculate the error with the training target, and the weight of the output layer of the extreme learning machine is solved by analytical method, which is expressed as:

[0106] W u out =H u + ·T u

[0107] In the formula, H u + is the generalized inverse matrix of the hidden layer output of the extreme learning machine; W u out is the output layer weight matrix of the extreme learning machine; T u is the true label matrix for each sample, also known as the target matrix;

[0108] Among them, the calculation method of the generalized inverse matrix of the hidden layer output is expressed as:

[0109] H u + =(H u T ·H u +λ u I) -1 ·Hu T

[0110] In the formula, H u T is the transposed matrix of the hidden layer output; u I is the regularization term, λ u is the regularization parameter, I is the unit matrix; (H u T ·H u +λ u I) -1 Indicates the inversion of the calculated matrix;

[0111] S504, dynamically adjust the implicit neural representation function to optimize the feature extraction capability of the model, expressed as:

[0112] ξ u (X u )←ξ u (X u )+α ud ·g u (X u ,W u )

[0113] In the formula, α ud is the learning rate parameter of the implicit neural representation function; g u () is the preset nonlinear mapping function;

[0114] S505. During the training process, the weight of the output layer of the extreme learning machine is solved analytically, and the weight of the hidden layer and the implicit representation is optimized by the loss function of the extreme learning machine, which is expressed as:

[0115]

[0116] In the formula, J u is the loss function of the extreme learning machine; ud is the first regularization parameter, β ud is the first regularization parameter; T u is the true label matrix for each sample, also known as the target matrix; H u is the output of the hidden layer of the extreme learning machine; ∥∥ 2 is the square of the L2 norm, is the square of the L1 norm; ξ Cf is the penalty coefficient;

[0117] S506. Repeat iterative steps S501-S505 until the preset stop iteration condition is met, which means that the model training is completed.

[0118] Further, in step S203, the discriminator is used to discriminate whether the data is real data or generated data, and the optimization constraint condition of the discriminator is:

[0119]

[0120] In the formula, φ c is the parameter of the discriminator; D() is the discriminator function; represents expectation; ~ represents compliance with a specific distribution; x cs is the real data sample; p data is the distribution of real data; is the noise distribution; α c It is a dynamically adjusted balance factor.

[0121] Further, in step S302, the calculation method of the input-based adaptive standard deviation function is expressed as:

[0122]

[0123] Where, w aes is the adaptive standard deviation exponent term, and are the weight and bias of the adaptive noise modulation function respectively.

[0124] Furthermore, in step S403, the difference between the reconstructed data and the original input data is calculated, and the difference is evaluated using the loss function of the autoencoder; the calculation method of the loss function of the autoencoder is expressed as:

[0125]

[0126] In the formula, J r is the loss function of the autoencoder; r is the regularization parameter of the autoencoder; ∥W r (i) ∥1 is the L1 norm of the weight of the i-th layer of the autoencoder.

[0127] Furthermore, in step S505, the penalty coefficient is calculated as follows:

[0128]

[0129] In the formula, λ us is the weight factor of the penalty coefficient; C is the total number of categories; p u,k is the probability that the current input sample belongs to the kth class; is the indicator function; τ u is the dynamically adjusted threshold used to influence the final classification decision; It means that when the probability p u,kExceeding the threshold τ u The value is 1 when it is, otherwise it is 0;

[0130] In the formula, the dynamically adjusted threshold τ u The calculation method is expressed as:

[0131]

[0132] In the formula, is the initial threshold; α us is the uncertainty impact factor; U u (H u ) is the entropy value of the hidden layer output of the extreme learning machine;

[0133] In the formula, the calculation method of the entropy value of the hidden layer output of the extreme learning machine is expressed as:

[0134]

[0135] Where U u () is the calculation function of the entropy value output of the hidden layer of the extreme learning machine.

[0136] The penalty coefficient is calculated based on the uncertainty measure. When measuring the uncertainty of classification, the output of the hidden layer of the extreme learning machine is calculated by the entropy value.

[0137] Beneficial effects of the present invention:

[0138] 1. The present invention adopts a generative adversarial network based on adaptive noise suppression learning for sample generation, which solves the problem of poor model generalization ability caused by insufficient training data. The collaborative work of the generator and the discriminator dynamically adjusts the noise signal through the adaptive noise control module, thereby improving the authenticity and diversity of the generated data.

[0139] 2. The present invention solves the problems of gradient vanishing, gradient exploding or falling into local optimum that may occur in the feature extraction process of traditional neural networks by adopting a neural network feature extraction model adjusted by policy gradient. The policy gradient method allows the network to automatically adjust the behavior strategy, thereby optimizing the efficiency and accuracy of feature extraction.

[0140] 3. The present invention uses an autoencoder algorithm to perform feature dimensionality reduction and simulates the interference pattern of quantum states through a quantum interference strategy, thereby enhancing the accuracy of feature extraction and data reconstruction, effectively compressing high-dimensional data while retaining key information.

[0141] 4. The extreme learning machine algorithm based on implicit neural representation of the present invention not only improves the classification performance and accuracy, but also adaptively learns specific data features through implicit functions, so that each neuron can encode the input more accurately, thereby improving the classification performance and classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0142] Figure 1 It is a structural diagram of the feature dimensionality reduction model proposed in the present invention. DETAILED DESCRIPTION

[0143] A database system log parsing and processing analysis method comprises the following steps:

[0144] S1, data collection and annotation;

[0145] The data is collected from the database operation log, which records the detailed information of all transactions during the operation of the database, including query statements, execution time, user information, and changes to the database structure;

[0146] The database may be a MySQL database management system, an Oracle database management system, a SQL Server database management system, etc. The collected log data is stored in a structured JSON format; in this embodiment, the attributes of the data include: a1 R is the timestamp, which records the specific time of the log; a2 is the user ID, indicating the user who performs the database operation; R a3 is the operation type, such as query, update, delete, etc.; R a4 R is the execution time, which records the duration of the operation; a5 Return status, indicating whether the operation is successfully executed; R a6 is the error code. If the operation fails, the corresponding error code is recorded; R a7 The number of rows affected shows the number of rows affected by the database operation. a8 To execute a statement, record the specific SQL command executed; R a9 For the accessed data table, record the name of the data table involved in the operation; R a10 Resource consumption indicates the amount of system resources required to perform the operation.

[0147] It should be noted that this embodiment is only used to illustrate one data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of attributes of data may reach dozens or even hundreds.

[0148] The collected data is manually labeled. In this embodiment, the labeled categories include: "normal operation", "abnormal operation", and "potential security threat", a total of 3 categories.

[0149] S2, data expansion;

[0150] The acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect the accuracy of the model. A generative adversarial network based on adaptive noise suppression learning is used to generate samples, thereby achieving data expansion; the generative adversarial network based on adaptive noise suppression learning includes two parts: a generator and a discriminator. The generator is responsible for generating seemingly real log data, and the discriminator is responsible for distinguishing between real data and generated data. Specifically, an adaptive noise control module is used to adjust the distribution and intensity of the noise signal according to the feedback of the discriminator, so that the generator can better adapt to the diversity of data.

[0151] Specifically, the training process of the generative adversarial network algorithm based on adaptive noise suppression learning is as follows:

[0152] S201, initializing the parameters of the generator and the discriminator, including the weight and bias parameters of the generator, and the weight and bias parameters of the discriminator, in a random initialization manner;

[0153] S202: Based on the current network state, a preliminary noise vector is generated using an adaptive noise module. The adaptive noise generation method is expressed as:

[0154] z c =A c ⊙(μ c +σ c ⊙∈ c )

[0155] In the formula, z c is the generated noise vector; μ c is the mean vector of noise; σ c is the standard deviation vector of the noise; ∈ c is the random noise sampled from the standard normal distribution; ⊙ is the element-wise multiplication; A c is the noise attention weight vector;

[0156] The calculation method of the standard deviation vector of the noise is expressed as:

[0157]

[0158] Where Sig() is the Sigmoid activation function, β c is a learnable scaling parameter, tanh() is the hyperbolic tangent function, N c represents the number of nodes in the network layer of the adaptive noise module, W c,i is the weight of the ith node in the network layer of the adaptive noise module, b c,i is the bias of the ith node in the network layer of the adaptive noise module, d out is the input vector of the adaptive noise module network layer;

[0159] Through the adversarial attention weight vector, the features that have the greatest impact on the generated quality are dynamically selected and strengthened, thereby improving the authenticity and diversity of the generated data. The calculation method is expressed as:

[0160] A c =sof(V c tanh(W c,a z c +b c,a ))

[0161] Where W c,a and b c,a are the learned parameter matrix and bias vector respectively; V c is the attention adjustment parameter; sof() is the Softmax function used to normalize the weight; preferably, V c Set to 2.

[0162] S203, the generator G uses the adjusted noise vector to generate new log data, and the generation method is expressed as:

[0163] X c =G(z c ,θ c )

[0164] Where, X c represents the generated log data; G() is the generator function; θ c is the parameter of the generator;

[0165] The discriminator is used to determine whether the data is real data or generated data. The optimization constraints of the discriminator are:

[0166]

[0167] In the formula, φ c is the parameter of the discriminator; D() is the discriminator function; represents expectation; ~ represents compliance with a specific distribution; x cs is the real data sample; p data is the distribution of real data; is the noise distribution; α c is a dynamically adjusted balance factor; preferably, α c Set to 0.3.

[0168] S204. According to the feedback from the discriminator, the parameters of the generator are adjusted. Specifically, a composite loss function is used to optimize the generation process to ensure that the generated log data is more realistic, which is expressed as:

[0169]

[0170] In the formula, is the composite loss function, λ c is the first regularization parameter, γ c is the second regularization coefficient, ∥∥ represents the L2 norm;

[0171] S205, adjusting the mean vector of the noise according to the performance of the discriminator, and the calculation method of the increment of the mean vector of the noise is expressed as:

[0172]

[0173] In the formula, Δμ c is the increment of the mean vector of the noise; η c Adjust learning rate for noise; is the gradient of the composite loss function with respect to the mean vector; preferably, η c Set to 0.01.

[0174] The update method of the noise mean vector is expressed as:

[0175] μ c (t+1) =μ c (t) +Δμ c

[0176] In the formula, μ c (t+1) is the mean vector of the noise at the t+1th iteration; μ c (t) is the mean vector of the noise at the tth iteration;

[0177] S206. Repeat iterative steps S201-S205 until a preset stop iteration condition is met, indicating that the model training is completed; in this embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0178] S3, feature extraction model training;

[0179] The expanded data is input into the feature extraction model for training, and a 6-layer fully connected neural network is used for feature extraction. In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, gradient vanishing, gradient explosion, or falling into the local optimal solution may occur, affecting the stability of training and the performance of the model. Specifically, a neural network feature extraction model based on policy gradient adjustment is used to extract the key features of the database system log data. The policy gradient method is used on the basis of the traditional neural network to allow the network to automatically adjust its behavior strategy during the learning process, optimizing the efficiency and accuracy of feature extraction.

[0180] The training process of the model algorithm is as follows:

[0181] S301, setting the initial network parameters of the neural network, including the weight W of the neural network p and the bias b of the neural network p , the initialization method is random initialization;

[0182] S302, input the database log data after data expansion into the neural network, perform forward propagation of the data, and calculate the output features of each layer of the neural network; specifically, adaptive noise modulation is used to enhance the randomness of the input feature vector to enhance the model's understanding and processing capabilities of the input data;

[0183] For the first layer of the neural network, the calculation method is expressed as:

[0184] h p (1) =Sig(W p (1) x p ′+b p (1) )

[0185]

[0186] In the formula, x p is the feature vector of the input neural network; ⊙ is element-wise multiplication; represents the normal distribution noise with mean 0 and standard deviation as the unit matrix, I is the unit matrix; σ p (x p ) is an adaptive standard deviation function based on the input; x p ′ is the input feature vector after modulation; W p (1) is the weight matrix from the neural network input layer to the first hidden layer; b p (1) is the bias vector from the neural network input layer to the first hidden layer; Sig( ) is the Sigmoid activation function; h p (1) is the output of the first hidden layer of the neural network;

[0187] For the transmission from the 2nd layer of neural network to the 6th layer of neural network, the calculation method is expressed as:

[0188] h p (i) =Sig(W p (i) h p (i-1) +b p (i) )

[0189] In the formula, h p (i) is the output of the i-th layer of the neural network, h p (i-1) is the output of the previous hidden layer (i.e., the i-1th layer) of the neural network; W p (i) is the weight of the i-th layer of the neural network; b p (i) is the bias of the i-th layer of the neural network;

[0190] The calculation method of the adaptive standard deviation function based on the input is expressed as:

[0191]

[0192] Where, w aes is the adaptive standard deviation exponent term, and are the weight and bias of the adaptive noise modulation function respectively.

[0193] S303, using the policy gradient method to adjust the network strategy and enhance the recognition ability of key features. Specifically, the policy gradient method calculates the update amount of the neural network weight according to the policy function. The calculation method is expressed as:

[0194]

[0195] In the formula, ΔW p is the update amount of the neural network weight; α p is the learning rate of the neural network; Tnn is the total number of iterations of the neural network; γ p is the discount factor, is the discount factor for the tth iteration; W p is the weight parameter of the neural network; G t is the return at the tth iteration; is the gradient of the weight; π p () is the strategy function; π p (a t |s t ,W p ) determines the parameter W p When the state s is given t Take the update strategy a t The probability of p Set to 0.01, γ p Set to 3.

[0196] Among them, the gradient The calculation method is expressed as:

[0197]

[0198] In the formula, R t For immediate reward; b p (s t ) is state s t Baseline function under s t is the state of the tth iteration; a t is the update strategy for the tth iteration; Q p () is the action value function; Q p (s t ,a t ,W p ) indicates that the parameter is W p When in state s t Take the update strategy a t expected benefits;

[0199] The calculation method of the action value function is expressed as:

[0200]

[0201] In the formula, is the discount factor for the kth iteration; r t+k is the updated parameter value for the t+kth time; r t+k |s t Represents a given state s t The updated parameter value for the t+kth time under ;

[0202] S304. After each forward propagation, the neuron competition mechanism is activated, and the importance of each neuron is evaluated according to its output contribution. The activity of the neurons is screened by a preset threshold, and those more active neurons are trained first. For neurons with high activity, the weight update method is expressed as follows:

[0203]

[0204] Where ← is the parameter update symbol; η p is the learning rate of neural network back propagation; CA p () is the content-aware function; h p (i) (t) is the hidden layer output of the i-th neural network at the t-th iteration; W p (i) represents the weight of the i-th layer of the neural network; J p () is the loss function of the neural network; is the loss function of the neural network relative to the weight W p (i) The gradient of

[0205] Among them, the loss function of the neural network is defined as:

[0206]

[0207] Where Mnn is the number of training samples input in the current batch; C is the total number of categories; y ij If the i-th sample belongs to the j-th category, it is 1, otherwise it is 0; p ij is the probability that the i-th predicted sample of the model belongs to the j-th category;

[0208] The content-aware function dynamically adjusts the intensity of weight updates according to the information content of the current layer output. The calculation method of the content-aware function is expressed as:

[0209]

[0210] Where, CA p (h p ) represents the output h based on the current layer p is the content-aware weight adjustment factor; ∥∥ is the L2 norm; h p is the output of the hidden layer;

[0211] S305. Repeat iterative steps S301-S304 until a preset stop iteration condition is met, indicating that the model training is completed; in this embodiment, the preset stop iteration condition is to reach a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0212] S4, feature dimension reduction model training, such as Figure 1 As shown;

[0213] The feature-extracted data is input into a feature dimensionality reduction model to train the feature dimensionality reduction model, and an autoencoder algorithm is specifically used as the feature dimensionality reduction model. The autoencoder algorithm is composed of an encoder and a decoder. The encoder is responsible for compressing high-dimensional input data into low-dimensional feature representations, and the decoder attempts to reconstruct the original input data from these low-dimensional representations. The present invention adopts a quantum interference strategy in each layer of the encoder and the decoder, optimizes the flow of information by simulating the interference pattern of the quantum state, and enhances the accuracy of feature extraction and data reconstruction.

[0214] The training process of the autoencoder algorithm is as follows:

[0215] S401, initializing the weights and bias parameters of the encoder and decoder, and the initialization method is random initialization;

[0216] S402, input the data after feature extraction, and perform multi-layer conversion through the encoder. Each layer uses the quantum interference strategy to enhance the feature extraction capability. The low-dimensional feature representation finally formed is a compressed expression of the input data, which is expressed as:

[0217] z r =tanh(W r ·x r +b r )⊙cos(φ(x r ))

[0218] In the formula, z r represents the encoded low-dimensional feature vector, x r is the feature vector after input feature extraction; W r is the weight matrix of the coding layer; b r is the bias vector of the coding layer; tanh() is the hyperbolic tangent function; cos() represents the cosine transform of the simulated quantum interference strategy; φ() is the phase adjustment function of the coding feature, φ(x r ) is a phase adjustment function that changes dynamically according to input data;

[0219] The calculation method of the phase adjustment function is expressed as:

[0220]

[0221] Where W φ,k is the first parameter matrix, W′ φ,k is the second parameter matrix, the first parameter matrix and the second parameter matrix are used to respectively r Transform to produce a linear combination of the numerator and denominator; x r k The kth column of the feature vector after feature extraction of the input; the arctan() function is used to convert the linear combination into a phase angle, providing a periodically changing angle to simulate the phase change of the quantum state;

[0222] S403. During the decoding process, the low-dimensional feature representation output by the encoder is sent to the decoder. The decoder attempts to reconstruct the original input data through the opposite multi-layer structure and adopts a quantum interference strategy to optimize the reconstruction quality, which is expressed as:

[0223] y r =W′ r ·(z r ⊙sin(φ(z r )))+b′ r

[0224] In the formula, y r is the reconstructed data after decoding; W′ r is the weight matrix of the decoding layer; b′ ris the bias vector of the decoding layer; sin() represents the sine transform, which corresponds to the cosine transform in the encoding stage to achieve complete reconstruction of the data; φ() is the phase adjustment function of the encoding feature, and the calculation method is the same as the phase adjustment function described in step S402;

[0225] The difference between the reconstructed data and the original input data is calculated and evaluated using the loss function of the autoencoder; the calculation method of the loss function of the autoencoder is expressed as:

[0226]

[0227] In the formula, J r is the loss function of the autoencoder; r is the regularization parameter of the autoencoder; ∥W r (i) ∥1 is the L1 norm of the weight of the i-th layer of the autoencoder; preferably, λ r Set to 0.3.

[0228] S404, calculate the gradient according to the loss function of the autoencoder, and update the parameters of the encoder and decoder through the back propagation algorithm. The update method is expressed as:

[0229]

[0230] Where η r is the learning rate of the autoencoder; sgn() is the sign function of the weight; α r is the adjustment coefficient of the autoencoder; ψ() is the adjustment function of the autoencoder; E r is the reconstruction error factor;

[0231] Among them, the reconstruction error factor E r The calculation method is expressed as:

[0232] E r =∥x r -y r ∥ 2

[0233] Where, ∥∥ is the L2 norm;

[0234] The calculation method of the adjustment function of the autoencoder is expressed as:

[0235]

[0236] Where kr is the adjustment sensitivity coefficient, θ r is the error threshold. Preferably, kr is set to 3, θ r Set to 0.5.

[0237] S405. Repeat iterative steps S401-S404 until a preset stop iteration condition is met, indicating that the model training is completed; in this embodiment, the preset stop iteration condition is to reach a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1200 times.

[0238] S5, classifier model training;

[0239] The reduced-dimensional data is input into the classifier to train the classifier model. Specifically, the extreme learning machine algorithm based on implicit neural representation is adopted as the classification algorithm. On the basis of the extreme learning machine algorithm, an implicit function is used to represent the activation state of neurons, which includes not only linear or nonlinear activation, but also adaptive learning of specific data features, so that each neuron can encode its input more accurately, thereby improving the classification performance and classification accuracy.

[0240] The training process of the extreme learning machine algorithm based on implicit neural representation is as follows:

[0241] S501, using a density-aware mechanism to initialize the parameters of an extreme learning machine, so as to ensure the sensitivity of the model to sparse data areas, wherein the parameters of the extreme learning machine include weights and bias parameters of the extreme learning machine; specifically, the following formula is used for calculation:

[0242] W u (0) =Sig(A u ·X u +c u )

[0243] b u (0) =0

[0244] Where W u is the weight of the extreme learning machine, W u (0) is the initial weight of the extreme learning machine; b u is the bias of the extreme learning machine, b u (0) is the initial bias of the extreme learning machine; Sig() is the Sigmoid activation function; A u is the density perception matrix; X u is the feature matrix after the input feature is reduced in dimension; c u To initialize the bias vector;

[0245] Among them, the calculation method of the density perception matrix is ​​expressed as:

[0246] A u =exp(-γ u ∥X u -μ u∥ 2 )

[0247] In the formula, γ u is the density adjustment parameter; μ u is the mean vector of the input data center; preferably, γ u Set to 1.

[0248] S502, input the data after feature dimension reduction into the extreme learning machine for forward propagation calculation. The hidden layer of the extreme learning machine is processed by implicit neural representation learning method. Specifically, the output of each neuron not only depends on its activation function, but also performs adaptive learning according to the characteristics of the input data through the implicit neural representation function. The calculation method of forward propagation is expressed as:

[0249] H u =Re(W u ·X u +b u +ξ u (X u ))

[0250] In the formula, H u is the output of the hidden layer of the extreme learning machine; u () is the implicit neural representation function; Re() is the ReLU activation function;

[0251] Among them, the calculation method of the implicit neural representation function is expressed as:

[0252]

[0253] In the formula, is the first weight matrix of the linear transformation; is the second weight matrix of the linear transformation, is the first bias term of the linear transformation; is the second bias term of the linear transformation; tanh() is the hyperbolic tangent function; α u is the weighting factor of the implicit neural representation function; preferably, α u Set to 0.3.

[0254] S503, the output of the hidden layer of the extreme learning machine is transmitted to the output layer of the extreme learning machine, the neurons of the output layer of the extreme learning machine directly calculate the error with the training target, and the weight of the output layer of the extreme learning machine is solved by analytical method, which is expressed as:

[0255] W u out =H u + ·T u

[0256] In the formula, Hu + is the generalized inverse matrix of the hidden layer output of the extreme learning machine; W u out is the output layer weight matrix of the extreme learning machine; T u is the true label matrix for each sample, also known as the target matrix;

[0257] Among them, the calculation method of the generalized inverse matrix of the hidden layer output is expressed as:

[0258] H u + =(H u T ·H u +λ u I) -1 ·H u T

[0259] In the formula, H u T is the transposed matrix of the hidden layer output; u I is the regularization term, λ u is the regularization parameter, I is the unit matrix; (H u T ·H u +λ u I) -1 Indicates the inversion of the calculated matrix;

[0260] S504, dynamically adjust the implicit neural representation function to optimize the feature extraction capability of the model, expressed as:

[0261] ξ u (X u )←ξ u (X u )+α ud ·g u (X u ,W u )

[0262] In the formula, α ud is the learning rate parameter of the implicit neural representation function; g u () is a preset nonlinear mapping function; preferably, α ud Set to 0.01.

[0263] S505. During the training process, the weight of the output layer of the extreme learning machine is solved analytically, and the weight of the hidden layer and the implicit representation is optimized by the loss function of the extreme learning machine, which is expressed as:

[0264]

[0265] In the formula, J u is the loss function of the extreme learning machine; ud is the first regularization parameter, β ud is the first regularization parameter; T u is the true label matrix for each sample, also known as the target matrix; H u is the output of the hidden layer of the extreme learning machine; ∥∥ 2 is the square of the L2 norm, is the square of the L1 norm; ξ Cf is the penalty coefficient; preferably, λ ud Set to 0.3, β ud Set to 0.7.

[0266] The calculation method of the penalty coefficient is expressed as:

[0267]

[0268] In the formula, λ us is the weight factor of the penalty coefficient; C is the total number of categories; p u,k is the probability that the current input sample belongs to the kth class; is the indicator function; τ u is the dynamically adjusted threshold used to influence the final classification decision; It means that when the probability p u,k Exceeding the threshold τ u , otherwise it is 0; preferably, us Set to 0.01.

[0269] In the formula, the dynamically adjusted threshold τ u The calculation method is expressed as:

[0270]

[0271] In the formula, is the initial threshold; α us is the uncertainty impact factor; U u (H u ) is the entropy value of the hidden layer output of the extreme learning machine; preferably, α us Set to 0.3.

[0272] In the formula, the calculation method of the entropy value of the hidden layer output of the extreme learning machine is expressed as:

[0273]

[0274] Where U u () is the calculation function of the entropy value output of the hidden layer of the extreme learning machine.

[0275] The penalty coefficient is calculated based on the uncertainty measure. When measuring the uncertainty of classification, the output of the hidden layer of the extreme learning machine is calculated by the entropy value.

[0276] S506. Repeat iterative steps S501-S505 until a preset stop iteration condition is met, indicating that the model training is completed; in this embodiment, the preset stop iteration condition is to reach a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0277] S6, log analysis and operation behavior identification;

[0278] The trained model is used to process new log samples. First, the collected raw data is input into the trained feature extraction and feature dimension reduction model for feature processing, and then the processed features are input into the classifier model for classifier training to obtain the classification results. In this embodiment, the classification categories include: "normal operation", "abnormal operation", and "potential security threats", a total of 3 categories.

Claims

1. A database system log parsing and processing analysis method, characterized in that: The following steps are involved: S1. Data collection and annotation: Data is collected from database operation logs, which record detailed information of all transactions during database operation, including query statements, execution time, user information, and changes to the database structure; The collected log data is stored in a structured JSON format, and the collected data is manually annotated; S2, data expansion: Use the generative adversarial network based on adaptive noise suppression learning to generate samples and then achieve data expansion; S3. Feature extraction model training: The expanded data is input into the feature extraction model for training, and a 6-layer fully connected neural network is used for feature extraction. Specifically, a neural network feature extraction model based on policy gradient adjustment is used to extract key features of the database system log data. S4, feature dimensionality reduction model training: input the feature-extracted data into the feature dimensionality reduction model for training the feature dimensionality reduction model, specifically using the autoencoder algorithm as the feature dimensionality reduction model; S5, classifier model training: input the reduced-dimensional data into the classifier to train the classifier model, specifically using the extreme learning machine algorithm based on implicit neural representation as the classification algorithm; S6. Log parsing and operation behavior identification: Use the trained model to process new log samples. First, input the collected original data into the trained feature extraction and feature dimensionality reduction model for feature processing, and then input the processed features into the classifier model for classifier training to obtain the classification results.

2. A database system log parsing and processing analysis method as claimed in claim 1, characterized in that: The data expansion of step S2, the specific training process is as follows: S201, initializing the parameters of the generator and the discriminator, including the weight and bias parameters of the generator, and the weight and bias parameters of the discriminator, in a random initialization manner; S202: Based on the current network state, a preliminary noise vector is generated using an adaptive noise module. The adaptive noise generation method is expressed as: z c =A c ⊙(μ c +s c ⊙∈ c ) In the formula, z c is the generated noise vector; μ c is the mean vector of noise; σ c is the standard deviation vector of the noise; ∈ c is the random noise sampled from the standard normal distribution; ⊙ is the element-wise multiplication; A c is the noise attention weight vector; The calculation method of the standard deviation vector of the noise is expressed as: Where Sig() is the Sigmoid activation function, β c is a learnable scaling parameter, tanh() is the hyperbolic tangent function, N c represents the number of nodes in the network layer of the adaptive noise module, W c,i is the weight of the ith node in the network layer of the adaptive noise module, b c,i is the bias of the ith node in the network layer of the adaptive noise module, d out is the input vector of the adaptive noise module network layer; Through the adversarial attention weight vector, the features that have the greatest impact on the generated quality are dynamically selected and strengthened, thereby improving the authenticity and diversity of the generated data. The calculation method is expressed as: A c =sof(V c tanh(W c,a z c +b c,a )) Where W c,a and b c,a are the learned parameter matrix and bias vector respectively; V c is the attention adjustment parameter; sof() is the Softmax function, which is used to normalize the weight; S203, the generator G uses the adjusted noise vector to generate new log data, and the generation method is expressed as: X c =G(z c ,θ c ) In the formula, X c represents the generated log data; G() is the generator function; θ c is the parameter of the generator; S204. According to the feedback from the discriminator, the parameters of the generator are adjusted. Specifically, a composite loss function is used to optimize the generation process to ensure that the generated log data is more realistic, which is expressed as: In the formula, is the composite loss function, λ c is the first regularization parameter, γ c is the second regularization coefficient, ∥∥ represents the L2 norm; S205, adjusting the mean vector of the noise according to the performance of the discriminator, and the calculation method of the increment of the mean vector of the noise is expressed as: In the formula, Δμ c is the increment of the mean vector of the noise; η c Adjust learning rate for noise; is the gradient of the composite loss function with respect to the mean vector; The update method of the noise mean vector is expressed as: m c (t+1) =μ c (t) +Dm c In the formula, μ c (t+1) is the mean vector of the noise at the t+1th iteration; μ c (t) is the mean vector of the noise at the tth iteration; S206: Repeat iterative steps S201-S205 until the preset stop iteration condition is met, indicating that the model training is completed.

3. A database system log parsing and processing analysis method as claimed in claim 1, characterized in that: The feature extraction model training in step S3 has the following specific training process: S301, setting the initial network parameters of the neural network, including the weight W of the neural network p and the bias b of the neural network p , the initialization method is random initialization; S302, input the database log data after data expansion into the neural network, perform forward propagation of the data, and calculate the output features of each layer of the neural network; Specifically, adaptive noise modulation is used to enhance the randomness of the input feature vector, so as to enhance the model's ability to understand and process the input data; For the first layer of the neural network, the calculation method is expressed as: h p (1) =Sig(W p (1) x p ′+b p (1) In the formula, x p is the feature vector of the input neural network; ⊙ is element-wise multiplication; represents the normal distribution noise with mean 0 and standard deviation as the unit matrix, I is the unit matrix; σp(xp) is the adaptive standard deviation function based on the input; x p ′ is the input feature vector after modulation; W p (1) is the weight matrix from the neural network input layer to the first hidden layer; b p (1) is the bias vector from the neural network input layer to the first hidden layer; Sig() is the Sigmoid activation function; h p (1) is the output of the first hidden layer of the neural network; For the transmission from the 2nd layer of neural network to the 6th layer of neural network, the calculation method is expressed as: h p (i) =Sig(W p (i) h p (i-1) +b p (i) ) In the formula, h p (i) is the output of the i-th layer of the neural network, h p (i-1) is the output of the previous hidden layer of the neural network; W p (i) is the weight of the i-th layer of the neural network; b p (i) is the bias of the i-th layer of the neural network; S303, using the policy gradient method to adjust the network strategy and enhance the recognition ability of key features. Specifically, the policy gradient method calculates the update amount of the neural network weight according to the policy function. The calculation method is expressed as: In the formula, ΔW p is the update amount of the neural network weight; α p is the learning rate of the neural network; Tnn is the total number of iterations of the neural network; γ p is the discount factor, is the discount factor for the tth iteration; W p is the weight parameter of the neural network; G t is the return at the tth iteration; is the gradient of the weight; π p () is the strategy function; π p (a t |s t , W p ) determines the parameter W p When the state s is given t Take the update strategy a t The probability of The calculation method is expressed as: In the formula, R t For immediate reward; b p (s t ) is state s t Baseline function under s t is the state of the tth iteration; a t is the update strategy for the tth iteration; Q p () is the action value function; Q p (s t , a t , W p ) indicates that the parameter is W p When in state s t Take the update strategy a t expected benefits; The calculation method of the action value function is expressed as: In the formula, is the discount factor for the kth iteration; r t+k is the updated parameter value for the t+kth time; r t+k |s t Represents a given state s t The updated parameter value for the t+kth time under ; S304. After each forward propagation, the neuron competition mechanism is activated, and the importance of each neuron is evaluated according to its output contribution. The activity of the neurons is screened by a preset threshold, and those more active neurons are trained first. For neurons with high activity, the weight update method is expressed as follows: Where ← is the parameter update symbol; η p is the learning rate of neural network back propagation; CA p () is the content-aware function; h p (i) (t) is the hidden layer output of the i-th neural network at the t-th iteration; W p (i) represents the weight of the i-th layer of the neural network; J p () is the loss function of the neural network; is the loss function of the neural network relative to the weight W p (i) The gradient of Among them, the loss function of the neural network is defined as: Where Mnn is the number of training samples input in the current batch; C is the total number of categories; y ij If the i-th sample belongs to the j-th category, it is 1, otherwise it is 0; p ij is the probability that the i-th predicted sample of the model belongs to the j-th category; The content-aware function dynamically adjusts the intensity of weight updates according to the information content of the current layer output. The calculation method of the content-aware function is expressed as: Where, CA p (h p ) represents the output h based on the current layer p is the content-aware weight adjustment factor; || || is the L2 norm; h p is the output of the hidden layer; S305, repeating iterative steps S301-S304 until the preset stop iteration condition is met, indicating that the model training is completed.

4. A database system log parsing and processing analysis method as claimed in claim 1, characterized in that: The feature dimensionality reduction model training in step S4 has the following specific training process: S401, initializing the weights and bias parameters of the encoder and decoder, and the initialization method is random initialization; S402, input the data after feature extraction, and perform multi-layer conversion through the encoder. Each layer uses the quantum interference strategy to enhance the feature extraction capability. The low-dimensional feature representation finally formed is a compressed expression of the input data, which is expressed as: z r =tanh(W r ·x r +b r )⊙cos(φ(x r )) In the formula, z r represents the encoded low-dimensional feature vector, x r is the feature vector after input feature extraction; W r is the weight matrix of the coding layer; b r is the bias vector of the coding layer; tanh() is the hyperbolic tangent function; cos() represents the cosine transform of the simulated quantum interference strategy; φ() is the phase adjustment function of the coding feature, and φ(xr) is the phase adjustment function that changes dynamically according to the input data; The calculation method of the phase adjustment function is expressed as: Where W φ,k is the first parameter matrix, W′ φ,k is the second parameter matrix, the first parameter matrix and the second parameter matrix are used to respectively r Transform to produce a linear combination of the numerator and denominator; x r k The kth column of the feature vector after feature extraction of the input; the arctan() function is used to convert the linear combination into a phase angle, providing a periodically changing angle to simulate the phase change of the quantum state; S403. During the decoding process, the low-dimensional feature representation output by the encoder is sent to the decoder. The decoder attempts to reconstruct the original input data through the opposite multi-layer structure and adopts a quantum interference strategy to optimize the reconstruction quality, which is expressed as: and r =W′ r ·(With r ⊙sin(φ(z r ))+b′ r In the formula, y r is the reconstructed data after decoding; W′ r is the weight matrix of the decoding layer; b′ r is the bias vector of the decoding layer; sin() represents the sine transform, which corresponds to the cosine transform in the encoding stage to achieve complete reconstruction of the data; φ() is the phase adjustment function of the encoding feature; S404, calculate the gradient according to the loss function of the autoencoder, and update the parameters of the encoder and decoder through the back propagation algorithm. The update method is expressed as: Where η r is the learning rate of the autoencoder; sgn() is the sign function of the weight; α r is the adjustment coefficient of the autoencoder; ψ() is the adjustment function of the autoencoder; E r is the reconstruction error factor; Among them, the reconstruction error factor E r The calculation method is expressed as: AND r =||x r -and r || 2 Where, || || is the L2 norm; The calculation method of the adjustment function of the autoencoder is expressed as: Where kr is the adjustment sensitivity coefficient, θ r is the error threshold; S405, repeating the iteration steps S401-S404 until the preset stop iteration condition is met, indicating that the model training is completed.

5. A database system log parsing and processing analysis method as claimed in claim 1, characterized in that: The specific training process of the classifier model training in step S5 is as follows: S501, using a density-aware mechanism to initialize the parameters of an extreme learning machine, so as to ensure the sensitivity of the model to sparse data areas, wherein the parameters of the extreme learning machine include weights and bias parameters of the extreme learning machine; specifically, the following formula is used for calculation: W u (0)=Sig(A u .X u +c u ) b u (0)=0 Where W u is the weight of the extreme learning machine, W u (0) is the initial weight of the extreme learning machine; b u is the bias of the extreme learning machine, b u (0) is the initial bias of the extreme learning machine; Sig() is the Sigmoid activation function; A u is the density perception matrix; X u is the feature matrix after the input feature dimension reduction; c u To initialize the bias vector; Among them, the calculation method of the density perception matrix is ​​expressed as: A u =exp(-γ u ·||X u -m u || 2 ) In the formula, γ u is the density adjustment parameter; μ u is the mean vector of the input data center; S502, input the data after feature dimension reduction into the extreme learning machine for forward propagation calculation. The hidden layer of the extreme learning machine is processed by implicit neural representation learning method. Specifically, the output of each neuron not only depends on its activation function, but also performs adaptive learning according to the characteristics of the input data through the implicit neural representation function. The calculation method of forward propagation is expressed as: H u =Re(W u ·X u +b u +ξ u (X u )) In the formula, H u is the output of the hidden layer of the extreme learning machine; u () is the implicit neural representation function; Re() is the ReLU activation function; Among them, the calculation method of the implicit neural representation function is expressed as: In the formula, is the first weight matrix of the linear transformation; is the second weight matrix of the linear transformation, is the first bias term of the linear transformation; is the second bias term of the linear transformation; tanh() is the hyperbolic tangent function; α u is the weighting factor of the implicit neural representation function; S503, the output of the hidden layer of the extreme learning machine is transmitted to the output layer of the extreme learning machine, the neurons of the output layer of the extreme learning machine directly calculate the error with the training target, and the weight of the output layer of the extreme learning machine is solved by analytical method, which is expressed as: W u out =H u + ·T u In the formula, H u + is the generalized inverse matrix of the hidden layer output of the extreme learning machine; W u out is the output layer weight matrix of the extreme learning machine; T u is the true label matrix for each sample, also known as the target matrix; Among them, the calculation method of the generalized inverse matrix of the hidden layer output is expressed as: H u + =(H u T ·H u +λ u I) -1 ·H u T In the formula, H u T is the transposed matrix of the hidden layer output; u I is the regularization term, λ u is the regularization parameter, I is the unit matrix; (H u T ·H u +λ u I) -1 Indicates the inversion of the calculated matrix; S504, dynamically adjust the implicit neural representation function to optimize the feature extraction capability of the model, expressed as: x u (X u )←ξ u (X u )+a ud ·g u (X u ,W u ) In the formula, α ud is the learning rate parameter of the implicit neural representation function; g u () is the preset nonlinear mapping function; S505. During the training process, the weight of the output layer of the extreme learning machine is solved analytically, and the weight of the hidden layer and the implicit representation is optimized by the loss function of the extreme learning machine, which is expressed as: In the formula, J u is the loss function of the extreme learning machine; ud is the first regularization parameter, β ud is the first regularization parameter; T u is the true label matrix for each sample, also known as the target matrix; H u is the output of the hidden layer of the extreme learning machine; ∥∥ 2 is the square of the L2 norm, is the square of the L1 norm; ξ Cf is the penalty coefficient; S506. Repeat iterative steps S501-S505 until the preset stop iteration condition is met, which means that the model training is completed.

6. A database system log parsing and processing analysis method as claimed in claim 2, characterized in that: In step S203, the discriminator is used to determine whether the data is real data or generated data. The optimization constraint of the discriminator is: In the formula, φ c is the parameter of the discriminator; D() is the discriminator function; represents expectation; ~ represents compliance with a specific distribution; x cs is the real data sample; p data is the distribution of real data; is the noise distribution; α c It is a dynamically adjusted balance factor.

7. A database system log parsing and processing analysis method as claimed in claim 3, characterized in that: In step S302, the calculation method of the input-based adaptive standard deviation function is expressed as: Where, w aes is the adaptive standard deviation exponent term, and are the weight and bias of the adaptive noise modulation function respectively.

8. A database system log parsing and processing analysis method as claimed in claim 4, characterized in that: In step S403, the difference between the reconstructed data and the original input data is calculated, and the difference is evaluated using the loss function of the autoencoder; the calculation method of the loss function of the autoencoder is expressed as: In the formula, J r is the loss function of the autoencoder; r is the regularization parameter of the autoencoder; ∥W r (i) ∥1 is the L1 norm of the weight of the i-th layer of the autoencoder.

9. A database system log parsing and processing analysis method as claimed in claim 5, characterized in that: In step S505, the penalty coefficient is calculated as follows: In the formula, λ us is the weight factor of the penalty coefficient; C is the total number of categories; p u,k is the probability that the current input sample belongs to the kth class; is the indicator function; τ u is the dynamically adjusted threshold used to influence the final classification decision; It means that when the probability p u,k Exceeding the threshold τ u The value is 1 when it is, otherwise it is 0; In the formula, the dynamically adjusted threshold τ u The calculation method is expressed as: In the formula, is the initial threshold; α us is the uncertainty impact factor; U u (H u ) is the entropy value of the hidden layer output of the extreme learning machine; In the formula, the calculation method of the entropy value of the hidden layer output of the extreme learning machine is expressed as: Where U u () is the calculation function of the entropy value output of the hidden layer of the extreme learning machine.

Citation Information

Patent Citations

  • Infrared image target detection method based on deep transfer learning and extreme learning machine

    CN110427875A

  • User operation behavior data detection method and device and electronic equipment

    CN115048464A

  • Tooling replacement strategy dynamic search method

    CN116433219A

  • Energy risk identification model construction method and energy risk identification method and device

    CN117291314A

  • Intelligent data analysis method based on artificial intelligence and big data

    CN118378691A

Cited By

  • Equipment security assessment method and system based on edge computing power compensation and privacy computing

    CN119622823A

  • Self-adaptive optimization method and system for log analysis based on swarm intelligence

    CN119645778A

  • AI-based business system data violation operation behavior identification method and system

    CN120086578A

  • AI-based business system data illegal operation behavior identification method and system

    CN120086578B