Database anomaly detection and prediction method and system based on deep learning

By automatically learning the normal mode of database operations and monitoring database operations in real time by using deep learning methods, the problem that traditional anomaly detection methods are difficult to adapt to the rapidly changing environment is solved, efficient and accurate anomaly detection and prediction is achieved, and the security and stability of the database system are improved.

CN119847857APending Publication Date: 2025-04-18SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411775938.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Traditional database anomaly detection methods are difficult to adapt to rapidly changing environments and complex data patterns, resulting in inaccuracy and inefficiency of detection.

Method used

Using a deep learning-based method, through data preprocessing, feature extraction and deep learning model training, the normal mode of database operations is automatically learned, and the database operations are monitored in real time to identify and predict abnormal behavior.

Benefits of technology

It significantly improves the security and stability of the database system, reduces losses due to abnormal behavior, and improves detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847857A_ABST
    Figure CN119847857A_ABST
Patent Text Reader

Abstract

The invention discloses a database anomaly detection and prediction method and system based on deep learning, and belongs to the technical field of database management, the implementation of the method comprises the following steps: 1) data preprocessing: collecting original data from database logs and performance monitoring tools, and cleaning and formatting; 2) feature extraction: extracting useful features from the preprocessed data; 3) deep learning model training: constructing and training a deep learning model to identify normal and abnormal modes in database operation; and 4) abnormity prediction: monitoring real-time database operation by using the trained deep learning model, and predicting potential abnormal behaviors. According to the method, the normal mode of database operation can be automatically learned, and the abnormal behavior can be effectively identified and predicted, so that the safety and the stability of a database system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database management, and in particular to a method and system for detecting and predicting database anomalies based on deep learning. Background Art

[0002] With the rapid development of information technology, database systems have become an indispensable part of enterprises and organizations for storing and managing large amounts of data. However, the complexity of database systems and the increase in data volume make the systems more susceptible to abnormal behaviors and failures. Traditional anomaly detection methods, such as rule-based systems and statistical methods, often have difficulty adapting to rapidly changing environments and complex data patterns. Therefore, a more advanced technology is needed to improve the accuracy and efficiency of database anomaly detection. Summary of the invention

[0003] The technical task of the present invention is to address the above shortcomings and provide a database anomaly detection and prediction method and system based on deep learning, which can automatically learn the normal mode of database operation and effectively identify and predict abnormal behavior, thereby improving the security and stability of the database system.

[0004] The technical solution adopted by the present invention to solve its technical problem is:

[0005] A database anomaly detection and prediction method based on deep learning, the implementation of the method includes the following steps:

[0006] 1) Data preprocessing: Collect raw data from database logs and performance monitoring tools, and clean and format them;

[0007] 2) Feature extraction: extract useful features from preprocessed data;

[0008] 3) Deep learning model training: Build and train deep learning models to identify normal and abnormal patterns in database operations;

[0009] 4) Anomaly prediction: Use the trained deep learning model to monitor real-time database operations and predict potential abnormal behaviors.

[0010] Through the deep learning model, database operations are monitored in real time, potential abnormal behaviors are identified, and possible system failures are predicted. This method can significantly improve the security and stability of the database system and reduce losses caused by abnormal behaviors.

[0011] Furthermore, the data preprocessing specifically includes:

[0012] Data cleaning: remove invalid or erroneous data records, including format errors, missing values, etc.;

[0013] Data formatting: unify the data from different sources into a unified format for easy subsequent processing;

[0014] Data normalization: Normalize the data to eliminate the dimensional effects between different features.

[0015] Furthermore, the feature extraction extracts useful features from the preprocessed data, and the features can represent the behavior patterns of database operations.

[0016] Furthermore, the feature extraction specifically includes:

[0017] Statistical feature extraction: Calculate the statistical features of database operations, including mean, variance, maximum and minimum values;

[0018] Time series feature extraction: extract the time series features of database operations, including autocorrelation, periodicity, etc.;

[0019] Pattern recognition and feature extraction: Use machine learning methods to identify patterns in database operations and extract relevant features.

[0020] Furthermore, the deep learning model training specifically includes:

[0021] Model selection: Choose a suitable deep learning model; deep learning models include: convolutional neural network (CNN), recurrent neural network (RNN) or long short-term memory network (LSTM);

[0022] Model training: Use labeled normal and abnormal database operation data to train deep learning models;

[0023] Model validation: Evaluate the performance of the model through methods such as cross-validation and perform tuning.

[0024] Furthermore, the deep learning model specifically includes:

[0025] Data representation: Database operation data can be represented as a sequence, where each operation is an event at a point in time; these events can be queries, updates, inserts, or deletes, etc.

[0026] Model architecture: LSTM is selected as the basic model because it can effectively process time series data and capture long-term dependencies. The LSTM network consists of multiple LSTM units, each of which contains an input gate, a forget gate, and an output gate. These gates control the flow of information to avoid the gradient vanishing problem of traditional RNNs.

[0027] Feature input: The features at each time point include statistical features, time series features, and pattern recognition features; these features are input into the LSTM network to capture the dynamic behavior of database operations;

[0028] Loss function: The model is trained using the cross entropy loss function to distinguish between normal and abnormal behavior; the goal of the model is to minimize the difference between the predicted label and the true label;

[0029] Optimization algorithm: The Adam optimization algorithm is used to update the model weights because it combines the advantages of gradient descent and momentum methods and can adapt to different learning rates;

[0030] Model evaluation: Evaluate the performance of the model through indicators including precision, recall rate and F1 score; these indicators can fully reflect the detection ability of the model;

[0031] Model deployment: The trained model is deployed to the production environment to monitor database operations in real time and predict abnormal behaviors.

[0032] Furthermore, the abnormal prediction specifically includes:

[0033] Real-time data stream processing: collect database operation data in real time, and perform preprocessing and feature extraction;

[0034] Anomaly detection: Use deep learning models to classify real-time data and identify abnormal behavior;

[0035] Anomaly prediction: Based on historical data and current behavior patterns, predict abnormal behaviors that may occur in the future.

[0036] The present invention also claims a database anomaly detection and prediction system based on deep learning, the system comprising:

[0037] Data preprocessing module, used to collect raw data from database logs and performance monitoring tools, and clean and format them;

[0038] Feature extraction module, used to extract useful features from preprocessed data;

[0039] A deep learning model training module for building and training deep learning models to identify normal and abnormal patterns in database operations;

[0040] The anomaly prediction module is used to monitor real-time database operations using a trained deep learning model and predict potential abnormal behaviors;

[0041] The system specifically implements database anomaly detection and prediction through the above-mentioned deep learning-based database anomaly detection and prediction method.

[0042] The present invention also claims a deep learning-based database anomaly detection and prediction device, comprising: at least one memory and at least one processor;

[0043] The at least one memory is used to store a machine-readable program;

[0044] The at least one processor is used to call the machine-readable program to implement the above method.

[0045] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which, when executed by a processor, causes the processor to perform the above method.

[0046] Compared with the prior art, the database anomaly detection and prediction method and system based on deep learning of the present invention have the following beneficial effects:

[0047] The present invention uses a deep learning model to monitor database operations in real time, identify potential abnormal behaviors, and predict possible system failures. Through this method or system, the security and stability of the database system can be significantly improved, and the losses caused by abnormal behaviors can be reduced.

[0048] The method and system have good effects in improving detection accuracy, reducing false alarms, real-time monitoring, predicting future anomalies, and reducing maintenance costs in database anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of the principle of a database anomaly detection and prediction method based on deep learning provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0051] The embodiment of the present invention provides a database anomaly detection and prediction method based on deep learning, and the implementation of the method includes the following steps:

[0052] 1. Data preprocessing: Collect raw data from database logs and performance monitoring tools, and clean and format them;

[0053] 2. Feature extraction: Extract useful features from preprocessed data; these features can represent the behavior patterns of database operations;

[0054] 3. Deep learning model training: Build and train deep learning models to identify normal and abnormal patterns in database operations;

[0055] 4. Anomaly prediction: Use trained deep learning models to monitor real-time database operations and predict potential abnormal behaviors.

[0056] The data preprocessing specifically includes:

[0057] Data cleaning: remove invalid or erroneous data records, including format errors, missing values, etc.;

[0058] Data formatting: unify the data from different sources into a unified format for easy subsequent processing;

[0059] Data normalization: Normalize the data to eliminate the dimensional effects between different features.

[0060] The feature extraction specifically includes:

[0061] Statistical feature extraction: Calculate the statistical features of database operations, such as mean, variance, maximum and minimum values;

[0062] Time series feature extraction: extract the time series features of database operations, including autocorrelation, periodicity, etc.;

[0063] Pattern recognition and feature extraction: Use machine learning methods to identify patterns in database operations and extract relevant features.

[0064] The deep learning model training specifically includes:

[0065] Model selection: Choose a suitable deep learning model; deep learning models include: convolutional neural network (CNN), recurrent neural network (RNN) or long short-term memory network (LSTM);

[0066] Model training: Use labeled normal and abnormal database operation data to train deep learning models;

[0067] Model validation: Evaluate the performance of the model through methods such as cross-validation and perform tuning.

[0068] The abnormal prediction specifically includes:

[0069] Real-time data stream processing: collect database operation data in real time, and perform preprocessing and feature extraction;

[0070] Anomaly detection: Use deep learning models to classify real-time data and identify abnormal behavior;

[0071] Anomaly prediction: Based on historical data and current behavior patterns, predict abnormal behaviors that may occur in the future.

[0072] The deep learning model is the core component, which can automatically learn and extract features from large amounts of data to identify and predict abnormal behavior. The deep learning model specifically includes:

[0073] Data representation: Database operation data can be represented as a sequence, where each operation is an event at a point in time; these events can be queries, updates, inserts, or deletes, etc.

[0074] Model architecture: LSTM is selected as the basic model because it can effectively process time series data and capture long-term dependencies. The LSTM network consists of multiple LSTM units, each of which contains an input gate, a forget gate, and an output gate. These gates control the flow of information to avoid the gradient vanishing problem of traditional RNNs.

[0075] Feature input: The features at each time point include statistical features, time series features, and pattern recognition features; these features are input into the LSTM network to capture the dynamic behavior of database operations;

[0076] Loss function: The model is trained using the cross entropy loss function to distinguish between normal and abnormal behavior; the goal of the model is to minimize the difference between the predicted label and the true label;

[0077] Optimization algorithm: The Adam optimization algorithm is used to update the model weights because it combines the advantages of gradient descent and momentum methods and can adapt to different learning rates;

[0078] Model evaluation: Evaluate the performance of the model through indicators such as precision, recall, and F1 score; these indicators can fully reflect the detection ability of the model;

[0079] Model deployment: The trained model is deployed to the production environment to monitor database operations in real time and predict abnormal behaviors.

[0080] Through the above technical solution, it is possible to achieve efficient detection and prediction of abnormal database behavior and improve the security and stability of the database system.

[0081] An embodiment of the present invention also provides a database anomaly detection and prediction system based on deep learning, which implements database anomaly detection and prediction through the database anomaly detection and prediction method based on deep learning described in the above embodiment.

[0082] The system includes:

[0083] 1. Data preprocessing module.

[0084] The data preprocessing module is responsible for collecting raw data from database logs and performance monitoring tools, and cleaning and formatting it for subsequent processing. This module includes the following steps:

[0085] Data cleaning: remove invalid or erroneous data records, such as format errors, missing values, etc.

[0086] Data formatting: unify the data from different sources into a unified format for easy subsequent processing;

[0087] Data normalization: Normalize the data to eliminate the dimensional effects between different features.

[0088] 2. Feature extraction module.

[0089] The feature extraction module is responsible for extracting useful features from the preprocessed data, which can represent the behavior patterns of database operations. This module includes the following steps:

[0090] Statistical feature extraction: Calculate the statistical features of database operations, such as mean, variance, maximum and minimum values;

[0091] Time series feature extraction: extract time series features of database operations, such as autocorrelation, periodicity, etc.;

[0092] Pattern recognition and feature extraction: Use machine learning methods to identify patterns in database operations and extract relevant features.

[0093] 3. Deep learning model training module.

[0094] The deep learning model training module is responsible for building and training deep learning models to identify normal and abnormal patterns in database operations. This module includes the following steps:

[0095] Model selection: Choose a suitable deep learning model, such as convolutional neural network (CNN), recurrent neural network (RNN), or long short-term memory network (LSTM);

[0096] Model training: Use labeled normal and abnormal database operation data to train deep learning models;

[0097] Model validation: Evaluate the performance of the model through methods such as cross-validation and perform tuning.

[0098] 4. Abnormal prediction module.

[0099] The anomaly prediction module is responsible for monitoring real-time database operations using the trained deep learning model and predicting potential abnormal behaviors. This module includes the following steps:

[0100] Real-time data stream processing: collect database operation data in real time, and perform preprocessing and feature extraction;

[0101] Anomaly detection: Use deep learning models to classify real-time data and identify abnormal behavior;

[0102] Anomaly prediction: Based on historical data and current behavior patterns, predict abnormal behaviors that may occur in the future.

[0103] Among them, the deep learning model is the core component, which can automatically learn and extract features from large amounts of data to identify and predict abnormal behavior. The following is a detailed description of the deep learning model, including:

[0104] Data representation: Database operation data can be represented as a sequence, where each operation is an event at a point in time. These events can be queries, updates, inserts, or deletes, etc.

[0105] Model architecture: LSTM is selected as the basic model because it can effectively process time series data and capture long-term dependencies. The LSTM network consists of multiple LSTM units, each of which contains an input gate, a forget gate, and an output gate. These gates control the flow of information to avoid the gradient vanishing problem of traditional RNNs.

[0106] Feature input: The features at each time point include statistical features, time series features, and pattern recognition features. These features are input into the LSTM network to capture the dynamic behavior of database operations.

[0107] Loss Function: The model is trained using the cross entropy loss function to distinguish between normal and abnormal behavior. The goal of the model is to minimize the difference between the predicted label and the true label.

[0108] Optimization algorithm: The Adam optimization algorithm is used to update the model weights because it combines the advantages of gradient descent and momentum methods and can adapt to different learning rates.

[0109] Model evaluation: The performance of the model is evaluated through indicators such as precision, recall, and F1 score. These indicators can fully reflect the detection ability of the model.

[0110] Model deployment: The trained model is deployed to the production environment to monitor database operations in real time and predict abnormal behaviors.

[0111] Through deep learning models, database operations are monitored in real time, potential abnormal behaviors are identified, and possible system failures are predicted. This system can significantly improve the security and stability of database systems and reduce losses caused by abnormal behaviors.

[0112] An embodiment of the present invention further provides a database anomaly detection and prediction device based on deep learning, comprising: at least one memory and at least one processor;

[0113] The at least one memory is used to store a machine-readable program;

[0114] The at least one processor is used to call the machine-readable program to implement the database anomaly detection and prediction method based on deep learning described in the above embodiment.

[0115] The embodiment of the present invention also provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the processor executes the database anomaly detection and prediction method based on deep learning described in the above embodiment. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code that implements the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.

[0116] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0117] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0118] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0119] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0120] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A database anomaly detection and prediction method based on deep learning, characterized in that: The implementation of this method includes the following steps: 1) Data preprocessing: Collect raw data from database logs and performance monitoring tools, and clean and format them; 2) Feature extraction: extract useful features from preprocessed data; 3) Deep learning model training: Build and train deep learning models to identify normal and abnormal patterns in database operations; 4) Anomaly prediction: Use the trained deep learning model to monitor real-time database operations and predict potential abnormal behaviors.

2. The method for detecting and predicting database anomalies based on deep learning according to claim 1, characterized in that: The data preprocessing specifically includes: Data cleaning: remove invalid or erroneous data records, including format errors and missing values; Data formatting: unify the format of data from different sources; Data normalization: Normalize the data to eliminate the dimensional effects between different features.

3. The method for detecting and predicting database anomalies based on deep learning according to claim 1, characterized in that: The feature extraction extracts useful features from the preprocessed data, and the features can represent the behavior patterns of database operations.

4. A database anomaly detection and prediction method based on deep learning according to claim 1 or 3, characterized in that: The feature extraction specifically includes: Statistical feature extraction: Calculate the statistical features of database operations, including mean, variance, maximum and minimum values; Time series feature extraction: extract the time series features of database operations, including autocorrelation and periodicity; Pattern recognition and feature extraction: Use machine learning methods to identify patterns in database operations and extract relevant features.

5. The method for detecting and predicting database anomalies based on deep learning according to claim 1, characterized in that: The deep learning model training specifically includes: Model selection: Choose a suitable deep learning model; deep learning models include: convolutional neural network, recurrent neural network or long short-term memory network; Model training: Use labeled normal and abnormal database operation data to train deep learning models; Model validation: Evaluate the performance of the model and perform tuning.

6. A database anomaly detection and prediction method based on deep learning according to claim 1 or 5, characterized in that: The specific implementation of the deep learning model includes: Data representation: Database operation data is represented as a sequence, where each operation is an event at a point in time; these events can be queries, updates, inserts, or deletes; Model architecture: LSTM is selected as the basic model. The LSTM network consists of multiple LSTM units. Each unit contains an input gate, a forget gate, and an output gate. These gates control the flow of information. Feature input: The features at each time point include statistical features, time series features, and pattern recognition features; these features are input into the LSTM network to capture the dynamic behavior of database operations; Loss function: The model is trained using the cross entropy loss function to distinguish between normal and abnormal behavior; the goal of the model is to minimize the difference between the predicted label and the true label; Optimization algorithm: Use the Adam optimization algorithm to update the model weights; Model evaluation: Evaluate the performance of the model through indicators that can fully reflect the detection ability of the model; indicators include precision, recall rate and F1 score; Model deployment: Deploy the trained model to the production environment, monitor database operations in real time, and predict abnormal behaviors.

7. The method for detecting and predicting database anomalies based on deep learning according to claim 1, characterized in that: The abnormal prediction specifically includes: Real-time data stream processing: collect database operation data in real time, and perform preprocessing and feature extraction; Anomaly detection: Use deep learning models to classify real-time data and identify abnormal behavior; Anomaly prediction: Based on historical data and current behavior patterns, predict abnormal behaviors that may occur in the future.

8. A database anomaly detection and prediction system based on deep learning, characterized in that: The system includes: Data preprocessing module, used to collect raw data from database logs and performance monitoring tools, and clean and format them; Feature extraction module, used to extract useful features from preprocessed data; A deep learning model training module for building and training deep learning models to identify normal and abnormal patterns in database operations; The anomaly prediction module is used to monitor real-time database operations using a trained deep learning model and predict potential abnormal behaviors; The system specifically implements database anomaly detection and prediction through the deep learning-based database anomaly detection and prediction method described in any one of claims 1 to 7.

9. A database anomaly detection and prediction device based on deep learning, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to implement the method described in any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting abnormality of time series data of database

    CN116541743A

  • Database anomaly detection method based on genetic algorithm and convolutional neural network

    CN116644418A

  • Intelligent learning database intrusion detection and response system

    CN117540372A

  • DQN-based database abnormal flow detection method, device and equipment

    CN117786405A

  • Machine learning based database anomaly prediction

    US20200160211A1