Database user abnormal behavior detection method based on graph neural network model

The database user abnormal behavior detection method based on the graph neural network model solves the limitations of existing technology in detecting abnormal behaviors of internal personnel, achieves more efficient abnormal behavior identification and automated early warning, and improves the comprehensiveness of database security. and flexibility.

CN118672907AInactive Publication Date: 2024-09-20ANHUI UNIV +1

Patent Information

Application Number
CN202410721431.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing database security measures are not effective enough to detect and prevent malicious or abnormal behaviors of insiders, especially in dealing with complex non-linear relationships and unstructured data.

Method used

A database user abnormal behavior detection method based on the graph neural network model is adopted. By collecting the original data of user activities from the database system, extracting features and forming a user-behavior graph, the graph neural network is used to learn complex relationships, and the model is optimized using semi-supervised learning methods. parameters to achieve abnormal behavior detection and automatically trigger the early warning mechanism.

Benefits of technology

It improves the accuracy and real-time performance of abnormal behavior detection, reduces manual operations, can describe user behavior more comprehensively, has strong adaptability and learning capabilities, and automated detection reduces costs and potential losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672907A
    Figure CN118672907A
Patent Text Reader

Abstract

The invention relates to the technical field of data security detection, and discloses a graph neural network model-based database user abnormal behavior detection method, which comprises the steps of data acquisition, feature extraction, user behavior portrait construction, anomaly detection and the like. Through the graph neural network model, the complex relation in the user-behavior graph can be learned, abnormal behaviors can be recognized more accurately, the activities of database users can be monitored in real time, once potential abnormal behaviors are found, the system can automatically trigger an early warning mechanism, and the early warning efficiency is improved. Therefore, possible data leakage or other security incidents can be prevented in time; according to the method, basic information and behavior logs of the user are considered, various factors such as an operation environment are also considered, user behaviors can be described more comprehensively, so that the detection accuracy is improved, meanwhile, the graph neural network model is adopted, high learning and reasoning capabilities are achieved, and complex user behavior data can be effectively processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data security detection, and in particular to a method for detecting abnormal behavior of database users based on a graph neural network model. Background Art

[0002] With the rapid development of information technology, databases play an increasingly important role in storing and managing large amounts of data. However, this is accompanied by an increase in database security threats, especially abnormal behaviors of insiders, which may lead to data leakage, corruption or other security issues. Traditional database security measures mainly rely on access control and authentication, but these methods are often not effective enough to detect and prevent malicious or abnormal behaviors of insiders.

[0003] In recent years, with the development of artificial intelligence and machine learning technologies, anomaly detection methods based on user behavior analysis have received widespread attention. These methods analyze the normal behavior patterns of users to identify abnormal behaviors that do not conform to these patterns. However, most of the existing methods are based on traditional machine learning algorithms, such as support vector machines (SVMs) and decision trees, which have limitations in dealing with complex nonlinear relationships and unstructured data.

[0004] Graph Neural Networks (GNNs) are an emerging class of deep learning models that are particularly suitable for processing graph-structured data. GNNs can effectively learn complex relationships between nodes and update node states through an iterative message passing mechanism between nodes and edges, thereby capturing global and local features in the graph. Summary of the invention

[0005] The purpose of the present invention is to provide a method for detecting abnormal behavior of database users based on a graph neural network model, which solves the technical problems raised in the background technology.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] The method for detecting abnormal behavior of database users based on the graph neural network model includes the following steps:

[0008] The first step is to collect and parse the original data of user activities from the database system, which includes the user's basic information, behavior logs, and operation timestamps;

[0009] The second step is to extract the characteristics describing user behavior from the original data through syntax analysis, statistical analysis, environmental analysis and data analysis methods, and classify users into different categories based on them, and define static attributes and dynamic attributes for each category of users;

[0010] Step 3: Use machine learning algorithms to group users to form different user-behavior graphs, and use graph neural network models to learn the complex relationships in the user-behavior graphs, and then obtain the corresponding user portrait model;

[0011] Step 4: Through model training, learn the characteristic representation of normal user behavior, and detect abnormal behavior that deviates from the normal state based on it. Combined with semi-supervised learning methods, use a small amount of labeled normal and abnormal data to optimize model parameters;

[0012] Step 5: Import user data into the model. When the model detects potential abnormal behavior, the system will automatically trigger an early warning mechanism.

[0013] As a further solution of the present invention: the feature extraction method through grammatical analysis is as follows:

[0014] StepA1, extract user information and database operation information from the database operation log;

[0015] StepA2: parse the SQL statement, extract the keywords, obtain the operation command type, the table name and column name involved;

[0016] StepA3, combine the extracted information into a four-tuple (user, operation command, data table name, column name);

[0017] StepA4, perform attribute conversion on the four-tuple to obtain the user behavior feature set;

[0018] StepA5, perform statistical analysis on the tables and columns that appear in the SQL command, and use mathematical features such as quantity to represent user behavior characteristics;

[0019] StepA6. Count the order by and group by statements, as well as the join, and, or keywords.

[0020] StepA7: Project the tables and columns appearing in the command in the form of multiple groups, and extract features based on the principal component analysis method to obtain the database user behavior feature set.

[0021] As a further solution of the present invention: the method of feature extraction by statistical analysis is as follows:

[0022] Step B1, group the behavior logs in the database by user and time, and create multiple data sets;

[0023] Step B2: For each user group, count the amount of data accessed in one day, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access to the total number of accesses;

[0024] Step B3. For each time group, divide the twenty-four hours of a day into twelve two-hour time periods, and count the amount of data accessed by users in each time period, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access times to the total number of accesses.

[0025] As a further solution of the present invention: the method of feature extraction through environmental analysis is as follows:

[0026] Step C1, collect the user's behavior data in the behavior log, which at least includes the user name, operation time, latitude and longitude, IP address and host name;

[0027] Step C2, through statistical analysis of the objective attributes of the corresponding data;

[0028] The statistical analysis step includes the frequency, duration and geographic location distribution of user behavior;

[0029] Step C3, using the form of a four-tuple "user name, operation time, IP address, operation command" to represent the user behavior;

[0030] Step C4: Adjust the representation of user behavior based on the information data differences in different database logs.

[0031] As a further solution of the present invention: the method of feature extraction through data analysis is as follows:

[0032] Step D1, analyze the query results and obtain different attribute values ​​through various calculations and analyses to characterize user behavior;

[0033] Step D2: When the query column is numeric, extract the minimum value, maximum value, median value, average value, and standard deviation of the query result, and record the result in the form of five tuples;

[0034] Step D3: When the query column is non-numeric, count the query results to obtain the total number of query results and the number of different values, and record the results in the form of tuples.

[0035] As a further solution of the present invention: the user portrait is formed as follows:

[0036] SS1. Represent the users and their access behaviors in the database as a graph structure, where nodes represent users and edges represent the relationship between users or the relationship between users and access behaviors, forming a user-behavior graph.

[0037] SS2, extract features for each node and edge, including user attributes, access behavior statistics, and use the embedding layer of the deep neural network to obtain the features of nodes and edges;

[0038] SS3, using graph neural network models to learn complex relationships between nodes in graph structures;

[0039] SS4. Use the labeled normal and abnormal access data to train the model, use appropriate loss functions and optimization algorithms to optimize model parameters, and use unlabeled data to evaluate and tune the model, thereby obtaining the corresponding user portrait model.

[0040] As a further solution of the present invention: wherein, the parsing of SQL statements includes analyzing all keywords in statements such as select, insert, update, delete, etc.;

[0041] Among them, the graph neural network model adopts one of Graph Convolutional Network, GraphSAGE or Gated Graph Neural Network.

[0042] As a further solution of the present invention: the abnormal behavior detection method is as follows:

[0043] XS1. Use frequent item mining algorithm to mine frequent item sets from database access logs;

[0044] XS2, define a threat scenario feature tree, which reflects the characteristics associated with various threat scenarios;

[0045] XS3,combines frequent itemsets and threat scenario feature trees, and uses association rule mining algorithms to find potential abnormal patterns in database access.

[0046] As a further solution of the present invention: wherein, the frequent item mining algorithm is the April algorithm;

[0047] The feature tree is defined by security experts and covers a variety of normal and abnormal database access patterns.

[0048] As a further solution of the present invention: wherein the association rules describe the relationship between different features, and are used to identify abnormal behaviors related to threat scenarios, and at the same time, based on the mined association rules, define abnormal thresholds and rules for triggering alarms;

[0049] The parameter value obtained by the association rule mining algorithm is compared with the abnormal threshold. When the parameter value exceeds the abnormal threshold, an alarm is triggered, otherwise, no alarm is triggered.

[0050] Beneficial effects of the present invention:

[0051] Improve the accuracy of abnormal behavior detection: Through the graph neural network model, the present invention can learn the complex relationships in the user-behavior graph, thereby more accurately identifying abnormal behaviors.

[0052] Real-time: The present invention can monitor the activities of database users in real time. Once potential abnormal behavior is found, the system will automatically trigger an early warning mechanism, thereby preventing possible data leakage or other security incidents in a timely manner.

[0053] Automation: The present invention automatically groups users through machine learning and deep learning technologies to form different user-behavior graphs, and automatically extracts features that describe user behavior, reducing manual operations and improving efficiency.

[0054] Comprehensiveness: The present invention not only considers the user's basic information and behavior log, but also considers multiple factors such as the operating environment, which can describe the user behavior more comprehensively, thereby improving the accuracy of detection.

[0055] Flexibility: The present invention can adjust the representation of user behavior according to the differences in different database log information data, and has strong adaptability.

[0056] Innovation: The present invention adopts the graph neural network model, which is a newer machine learning model with strong learning and reasoning capabilities and can effectively process complex user behavior data.

[0057] Cost saving: The present invention can automatically detect abnormal behavior, reducing the cost of manual monitoring and also reducing the losses caused by abnormal behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The present invention will be further described below in conjunction with the accompanying drawings.

[0059] Figure 1 It is a flow chart of the method for detecting abnormal behavior of database users based on the graph neural network model of the present invention. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] Embodiment 1

[0062] See also Figure 1 As shown, the present invention is a method for detecting abnormal behavior of database users based on a graph neural network model, comprising the following steps:

[0063] Step 1: Data collection and feature extraction

[0064] Collect all user data from the database, perform feature extraction on the collected user data, and obtain a database user behavior feature set;

[0065] The feature extraction method is as follows:

[0066] Feature extraction based on grammar:

[0067] StepA1, extract user information and database operation information from the database operation log;

[0068] StepA2: parse the SQL statement, extract the keywords, obtain the operation command type, the table name and column name involved;

[0069] The parsing of SQL statements further includes analyzing all keywords in select, insert, update, and delete statements;

[0070] StepA3, combine the extracted information into a four-tuple (user, operation command, data table name, column name);

[0071] StepA4, perform attribute conversion on the four-tuple to obtain the user behavior feature set;

[0072] StepA5, perform statistical analysis on the tables and columns that appear in the SQL command, and use mathematical features such as quantity to represent user behavior characteristics;

[0073] StepA6. Count the order by and group by statements, as well as the keywords such as join, and, or.

[0074] StepA7, project the tables and columns appearing in the command in the form of multiple groups, and extract features based on the principal component analysis method to obtain a database user behavior feature set;

[0075] Step 2: User Behavior Profile Construction

[0076] Categorize users into different types based on their behavioral characteristics, define static and dynamic attributes for each type of user, and perform cluster analysis to build user profiles;

[0077] Among them, user attributes are divided into static attributes and dynamic attributes;

[0078] Static attributes refer to the basic information of the user, which refers to the user ID information;

[0079] Dynamic attributes refer to user behavior information, which includes access frequency, access duration, and operation records;

[0080] The user portrait is constructed as follows:

[0081] SS1. Represent the users and their access behaviors in the database as a graph structure, where nodes represent users and edges represent the relationship between users or the relationship between users and access behaviors, forming a user-behavior graph.

[0082] SS2, extract features for each node and edge, including user attributes, access behavior statistics, and use the embedding layer of the deep neural network to obtain the feature representation of the nodes and edges;

[0083] SS3, use any of the models in Graph Convolutional Network (GCN), GraphSAGE or Gated Graph Neural Network (GGNN) to learn the complex relationships between nodes in the graph structure;

[0084] SS4. Use the labeled normal and abnormal access data to train the model, use appropriate loss functions and optimization algorithms to optimize model parameters, and use unlabeled data to evaluate and tune the model, thereby obtaining the corresponding user portrait model.

[0085] Step 3: Anomaly Detection

[0086] XS1. Use frequent item mining algorithm to mine frequent item sets from database access logs;

[0087] Among them, the frequent item mining algorithm is April algorithm;

[0088] XS2, define a threat scenario feature tree, which reflects the characteristics associated with various threat scenarios;

[0089] In this embodiment, the feature tree is defined by security experts, which covers various normal and abnormal database access patterns;

[0090] XS3,combines frequent itemsets and threat scenario feature trees, and uses association rule mining algorithms to find potential abnormal patterns in database access;

[0091] Among them, association rules describe the relationship between different features and are used to identify abnormal behaviors related to threat scenarios. Based on the mined association rules, anomaly thresholds and rules for triggering alarms are defined.

[0092] This embodiment can accurately extract user information and database operation information from the database operation log through a grammar-based feature extraction method, and obtain key information such as the operation command type, the name of the data table involved, and the name of the column by parsing the SQL statement. This method can effectively capture the characteristics of user behavior and provide a basis for subsequent user profile construction and anomaly detection.

[0093] Embodiment 2

[0094] As the second embodiment of the present invention, when the present application is specifically implemented, compared with the first embodiment, the technical solution of the present embodiment is different from the first embodiment only in that in the present embodiment, the feature extraction method is also as follows:

[0095] Feature extraction based on statistics:

[0096] Step B1, group the behavior logs in the database by user and time, and create multiple data sets;

[0097] Step B2: For each user group, count the amount of data accessed in one day, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access to the total number of accesses;

[0098] Step B3. For each time group, divide the twenty-four hours of a day into twelve two-hour time periods, and count the amount of data accessed by users in each time period, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access times to the total number of accesses.

[0099] This embodiment uses a feature extraction method based on statistics to group and perform statistical analysis on the behavior logs in the database, thereby obtaining key indicators such as the amount of data accessed by users, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access to the total number of accesses. This method can better understand the user's access behavior and operating habits, and help discover potential abnormal behavior.

[0100] Embodiment 3

[0101] As the third embodiment of the present invention, when the present application is specifically implemented, compared with the first and second embodiments, the technical solution of this embodiment is to combine the solutions of the first and second embodiments, and the difference between the technical solution of this embodiment and the first and second embodiments is that in this embodiment, the method of feature extraction is also as follows:

[0102] Feature extraction based on environment:

[0103] Step C1, collect the user's behavior data in the behavior log, which at least includes the user name, operation time, latitude and longitude, IP address and host name;

[0104] Step C2, through statistical analysis of the objective attributes of the corresponding data;

[0105] The statistical analysis step includes the frequency, duration and geographic location distribution of user behavior;

[0106] Step C3, using the form of a four-tuple "user name, operation time, IP address, operation command" to represent the user behavior;

[0107] Step C4: Adjust the representation of user behavior based on the information data differences in different database logs.

[0108] This embodiment combines the technical solutions of the above-mentioned embodiment 1 and embodiment 2 to implement, and can comprehensively use grammar-based, statistical-based and environment-based feature extraction methods to more comprehensively characterize user behavior characteristics. This method can improve the accuracy and completeness of anomaly detection, thereby better protecting the security of the database.

[0109] Embodiment 4

[0110] As the fourth embodiment of the present invention, when the present application is specifically implemented, compared with the first embodiment, the second embodiment and the third embodiment, the difference between the present embodiment and the first embodiment, the second embodiment and the third embodiment is that in the present embodiment, the method of feature extraction is also as follows:

[0111] Feature extraction based on data:

[0112] Step D1, analyze the query results and obtain different attribute values ​​through various calculations and analyses to characterize user behavior;

[0113] Step D2: When the query column is numeric, extract the minimum value, maximum value, median value, average value, and standard deviation of the query result, and record the result in the form of five tuples;

[0114] Among them, the form of the quintuple is 〈tab ename.col umnname.min,tab ename.col umnname.max,tab ename.col umnname.mean,tab ename.col umnname.stddev,tab ename.col umnname.med i an〉

[0115] Step D3, when the query column is non-numeric, count the query results to obtain the total number of query results and the number of different values, and record the results in the form of tuples;

[0116] Among them, the form of the tuple is 〈tab l ename.co l umnname.ncount,tab l ename.co lumnname.nd i nct〉.

[0117] This embodiment can analyze and calculate the query results through a data-based feature extraction method to obtain different attribute values ​​to characterize user behavior. This method can further enrich the feature representation of user behavior and improve the sensitivity and accuracy of anomaly detection. At the same time, according to the information data differences of different database logs, the representation of user behavior can be adjusted to better adapt to different application scenarios and needs.

[0118] Embodiment 5

[0119] As the fifth embodiment of the present invention, when the present application is specifically implemented, compared with the first, second, third and fourth embodiments, the technical solution of this embodiment is to combine and implement the solutions of the above-mentioned first, second, third and fourth embodiments.

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A database user abnormal behavior detection method based on a graph neural network model, characterized in that: The following steps are involved: The first step is to collect and parse the original data of user activities from the database system, which includes the user's basic information, behavior logs, and operation timestamps; The second step is to extract the characteristics describing user behavior from the original data through syntax analysis, statistical analysis, environmental analysis and data analysis methods, and classify users into different categories based on them, and define static attributes and dynamic attributes for each category of users; Step 3: Use machine learning algorithms to group users to form different user-behavior graphs, and use graph neural network models to learn the complex relationships in the user-behavior graphs, and then obtain the corresponding user portrait model; Step 4: Through model training, learn the characteristic representation of normal user behavior, and detect abnormal behavior that deviates from the normal state based on it. Combined with semi-supervised learning methods, use a small amount of labeled normal and abnormal data to optimize model parameters; Step 5: Import user data into the model. When the model detects potential abnormal behavior, the system will automatically trigger an early warning mechanism.

2. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1 is characterized in that: The feature extraction method through grammatical analysis is as follows: StepA1, extract user information and database operation information from the database operation log; StepA2: parse the SQL statement, extract the keywords, obtain the operation command type, the table name and column name involved; StepA3, combine the extracted information into a four-tuple (user, operation command, data table name, column name); StepA4, perform attribute conversion on the four-tuple to obtain the user behavior feature set; StepA5, perform statistical analysis on the tables and columns that appear in the SQL command, and use mathematical features such as quantity to represent user behavior characteristics; StepA6. Count the order by and group by statements, as well as the join, and, or keywords. StepA7: Project the tables and columns appearing in the command in the form of multiple groups, and extract features based on the principal component analysis method to obtain the database user behavior feature set.

3. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1 is characterized in that: The way to extract features through statistical analysis is as follows: Step B1, group the behavior logs in the database by user and time, and create multiple data sets; Step B2: For each user group, count the amount of data accessed in one day, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access to the total number of accesses; Step B3. For each time group, divide the twenty-four hours of a day into twelve two-hour time periods, and count the amount of data accessed by users in each time period, the number of different tables accessed, the proportion of abnormal operation command permissions to the total number of operations, and the proportion of top-secret data access times to the total number of accesses.

4. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1 is characterized in that: The way to extract features through environmental analysis is as follows: Step C1, collect the user's behavior data in the behavior log, which at least includes the user name, operation time, latitude and longitude, IP address and host name; Step C2, through statistical analysis of the objective attributes of the corresponding data; The statistical analysis step includes the frequency, duration and geographic location distribution of user behavior; Step C3, using the form of a four-tuple "user name, operation time, IP address, operation command" to represent the user behavior; Step C4: Adjust the representation of user behavior based on the information data differences in different database logs.

5. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1 is characterized in that: The way to extract features through data analysis is as follows: Step D1, analyze the query results and obtain different attribute values ​​through various calculations and analyses to characterize user behavior; Step D2: When the query column is numeric, extract the minimum value, maximum value, median value, average value, and standard deviation of the query result, and record the result in the form of five tuples; Step D3: When the query column is non-numeric, count the query results to obtain the total number of query results and the number of different values, and record the results in the form of tuples.

6. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1 is characterized in that: The user portrait is formed as follows: SS1. Represent the users and their access behaviors in the database as a graph structure, where nodes represent users and edges represent the relationship between users or the relationship between users and access behaviors, forming a user-behavior graph. SS2, extract features for each node and edge, Its features include user attributes, statistical information of access behavior, and use the embedding layer of a deep neural network to obtain node and edge features; SS3, using graph neural network models to learn complex relationships between nodes in graph structures; SS4. Use the labeled normal and abnormal access data to train the model, use appropriate loss functions and optimization algorithms to optimize model parameters, and use unlabeled data to evaluate and tune the model, thereby obtaining the corresponding user portrait model.

7. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 6 is characterized in that: in, The graph neural network model uses one of Graph Convolutional Network, GraphSAGE or GatedGraph Neural Network.

8. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 1, characterized in that: Abnormal behavior detection methods are as follows: XS1. Use frequent item mining algorithm to mine frequent item sets from database access logs; XS2, define a threat scenario feature tree, which reflects the characteristics associated with various threat scenarios; XS3,combines frequent itemsets and threat scenario feature trees, and uses association rule mining algorithms to find potential abnormal patterns in database access.

9. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 8 is characterized in that: in, The frequent item mining algorithm is Apriori algorithm; The feature tree is defined by security experts and covers a variety of normal and abnormal database access patterns.

10. The method for detecting abnormal behavior of database users based on a graph neural network model according to claim 8, characterized in that: in, Association rules describe the relationship between different features and are used to identify abnormal behaviors related to threat scenarios. At the same time, based on the mined association rules, anomaly thresholds and rules for triggering alarms are defined; The parameter value obtained by the association rule mining algorithm is compared with the abnormal threshold. When the parameter value exceeds the abnormal threshold, an alarm is triggered, otherwise, no alarm is triggered.

Citation Information

Patent Citations

  • Database anomaly detection method based on cyclic marking time point process

    CN110580213A

Cited By

  • A user identity threat detection method and system based on large language model

    CN120316757B