An abnormal behavior security analysis method based on artificial intelligence
Through the artificial intelligence-based abnormal behavior security analysis method and the use of neural network models for multiple judgments, the problem that traditional security methods are difficult to deal with network attacks is solved, and the accuracy of abnormal behavior detection and information security level are improved.
Patent Information
- Application Number
- CN202411026863.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Traditional security protection methods cannot meet the evolution and upgrade of current network attack methods, resulting in frequent information security incidents. New technical means are needed to improve the accuracy of abnormal behavior detection.
Adopting an abnormal behavior security analysis method based on artificial intelligence to generate a behavior vector by obtaining user behavior data, and using a neural network model trained with normal and abnormal behavior data to make multiple judgments and calculate the similarity of feature values to determine whether the user has abnormal behavior. Combined with manual detection to handle special users.
It improves the accuracy of judging whether behavioral data is abnormal behavior data, can quickly identify abnormal behaviors, and enhances the accuracy and system sensitivity of information security detection.
Smart Images

Figure CN118555149B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of information security technology, and in particular to an abnormal behavior security analysis method based on artificial intelligence. Background Art
[0002] With the rapid development of information technology, the Internet has become an indispensable infrastructure in modern society, greatly promoting the convenience of information exchange and resource sharing. However, this high degree of connectivity is also accompanied by unprecedented security challenges. Frequent information security incidents such as hacker attacks, data leaks, and online fraud not only threaten personal privacy, but also pose a serious threat to the economic interests of enterprises and even national security.
[0003] Abnormal behavior detection and prevention in the field of information security is a complex and arduous task. With the continuous evolution and upgrading of network attack methods, traditional security protection methods can no longer meet the current security needs. Therefore, we need to continuously explore and innovate new technical means and methods to cope with the increasingly severe information security challenges. Summary of the invention
[0004] The embodiment of the present application provides an abnormal behavior security analysis method based on artificial intelligence, which can improve the accuracy of determining whether behavior data is abnormal behavior data.
[0005] The first aspect of the embodiment of the present application provides an abnormal behavior security analysis method based on artificial intelligence, including:
[0006] Obtain the first behavior data of the user to be detected;
[0007] generating a first behavior vector according to the first behavior data;
[0008] Inputting the first behavior vector into a first recognition model to obtain a first eigenvalue, wherein the first recognition model is a neural network model trained with normal behavior data;
[0009] Calculating a first similarity between the first eigenvalue and a first standard eigenvalue;
[0010] When the first similarity is less than a first threshold, inputting the first behavior vector into a second recognition model to obtain a second eigenvalue, wherein the second recognition model is a neural network model trained with abnormal behavior data;
[0011] Calculating a second similarity between the second eigenvalue and a second standard eigenvalue;
[0012] When the second similarity is greater than or equal to a second threshold, determining that the user to be detected has abnormal behavior;
[0013] Inputting the first behavior vector into a first recognition model to obtain a first eigenvalue includes:
[0014] Flatten the first line vector into a one-dimensional vector;
[0015] Inputting the one-dimensional vector into a complex fully connected layer of a first recognition model to obtain a first complex vector;
[0016] Randomly generate a random orthogonal matrix, and use the random orthogonal matrix to map the first complex vector into a second complex vector;
[0017] Inputting the second complex vector into the sparse regularized fully connected layer of the first recognition model to obtain a third complex vector;
[0018] Input the third complex vector into the first branch fully connected layer and the second branch fully connected layer of the first recognition model respectively to obtain a first branch vector and a second branch vector respectively, and merge the first branch vector and the second branch vector to obtain a fourth complex vector;
[0019] The third complex vector is input into the complex fully connected output layer of the first recognition model to obtain a first eigenvalue output by the complex fully connected output layer.
[0020] Optionally, the method further includes:
[0021] When the second similarity is less than a third threshold, it is determined that the user to be detected does not have abnormal behavior.
[0022] Optionally, the method further includes:
[0023] When the second similarity is greater than or equal to a third threshold and less than a second threshold, marking the user to be detected as a special user;
[0024] The special user is stored in a manual detection database, and the special user's abnormal behavior is manually determined.
[0025] Optionally, generating a first behavior vector according to the first behavior data includes:
[0026] Traversing the first behavior data, and extracting keywords from the first behavior data;
[0027] A first line is generated as a vector according to the keyword.
[0028] Optionally, generating a first behavior vector according to the keyword includes:
[0029] Inputting a defect recognition model into the keywords to identify defect keywords in the keywords;
[0030] Eliminating the defective keywords from the keywords;
[0031] A first behavior vector is generated according to the removed keywords.
[0032] Optionally, traversing the first behavior data and extracting keywords from the first behavior data includes:
[0033] Obtain a time series of the first behavior data;
[0034] Rearranging the first behavior data according to the time series;
[0035] Extract keywords from the rearranged first behavior data;
[0036] Delete duplicates from the extracted keywords.
[0037] Optionally, before calculating the first similarity between the first eigenvalue and the first standard eigenvalue, the method further includes:
[0038] Get the second behavior data of all normal users;
[0039] generating a second behavior vector according to the second behavior data;
[0040] Inputting the second behavior data into the first recognition model to obtain a third eigenvalue;
[0041] The third eigenvalue is normalized to obtain a first standard eigenvalue.
[0042] A second aspect of the embodiment of the present application provides an abnormal behavior security analysis system based on artificial intelligence, including:
[0043] A first acquisition unit, used to acquire first behavior data of a user to be detected;
[0044] A first generating unit, configured to generate a first behavior vector according to the first behavior data;
[0045] A first input unit, used to input the first behavior vector into a first recognition model to obtain a first eigenvalue, wherein the first recognition model is a neural network model trained with normal behavior data;
[0046] A first calculation unit, configured to calculate a first similarity between the first eigenvalue and a first standard eigenvalue;
[0047] a second input unit, configured to input the first behavior vector into a second recognition model to obtain a second eigenvalue when the first similarity is less than a first threshold, wherein the second recognition model is a neural network model trained with abnormal behavior data;
[0048] A second calculation unit, used for calculating a second similarity between the second eigenvalue and a second standard eigenvalue;
[0049] A determination unit is used to determine that the user to be detected has abnormal behavior when the second similarity is greater than or equal to a second threshold.
[0050] Optionally, the determining unit is further configured to:
[0051] When the second similarity is less than a third threshold, it is determined that the user to be detected does not have abnormal behavior.
[0052] Optionally, the determining unit is further configured to:
[0053] When the second similarity is greater than or equal to a third threshold and less than a second threshold, marking the user to be detected as a special user;
[0054] The special user is stored in a manual detection database, and the special user's abnormal behavior is manually determined.
[0055] Optionally, the first generating unit includes:
[0056] An extraction module, configured to traverse the first behavior data and extract keywords from the first behavior data;
[0057] A generating module is used to generate a first behavior vector according to the keyword.
[0058] Optionally, the generating module is specifically used for:
[0059] Inputting a defect recognition model into the keywords to identify defect keywords in the keywords;
[0060] Eliminating the defective keywords from the keywords;
[0061] A first behavior vector is generated according to the removed keywords.
[0062] Optionally, the extraction module is specifically used for:
[0063] Obtain a time series of the first behavior data;
[0064] Rearranging the first behavior data according to the time series;
[0065] Extract keywords from the rearranged first behavior data;
[0066] Delete duplicates from the extracted keywords.
[0067] Optionally, the system further comprises a standardization unit, wherein the standardization unit is configured to:
[0068] Get the second behavior data of all normal users;
[0069] generating a second behavior vector according to the second behavior data;
[0070] Inputting the second behavior data into the first recognition model to obtain a third eigenvalue;
[0071] The third eigenvalue is normalized to obtain a first standard eigenvalue.
[0072] The third aspect of the embodiment of the present application provides an abnormal behavior security analysis system based on artificial intelligence, including:
[0073] Processor, memory, input-output unit, and bus;
[0074] The processor is connected to the memory, the input and output unit, and the bus;
[0075] A program is stored in the memory, and the processor calls the program to execute the method in the first aspect and any possible implementation manner of the first aspect.
[0076] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the computer executes the method in the first aspect and any possible implementation of the first aspect.
[0077] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0078] The method provided by the embodiment of the present application first obtains the first behavior data of the user to be detected, then generates a first behavior vector using the first behavior data, and then inputs the first behavior vector into the first recognition model to obtain the first eigenvalue output by the first recognition model. If the first similarity between the first eigenvalue and the first standard eigenvalue is less than the first threshold, the first behavior vector is input into the second recognition model to obtain the second eigenvalue output by the second recognition model. If the second similarity between the second eigenvalue and the second standard eigenvalue is greater than or equal to the second threshold, it means that the similarity between the first behavior data and the abnormal behavior data is very high, and it can be determined that the user to be detected has abnormal behavior. Through multiple judgments, the accuracy of judging whether the first behavior data is abnormal behavior data can be improved. At the same time, by identifying abnormal behavior through an artificial intelligence neural network model, the behavior of the user to be detected can be quickly identified. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1This is a flow chart of an embodiment of an abnormal behavior security analysis method based on artificial intelligence in an embodiment of the present application;
[0080] Figure 2 This is a flow chart of an embodiment of generating a first behavior vector according to first behavior data in an embodiment of the present application;
[0081] Figure 3 A schematic diagram of a flow chart of an embodiment of obtaining a first standard characteristic value in an embodiment of the present application;
[0082] Figure 4 This is a structural diagram of an embodiment of an abnormal behavior security analysis system based on artificial intelligence in an embodiment of the present application;
[0083] Figure 5 This is a structural diagram of another embodiment of the abnormal behavior security analysis system based on artificial intelligence in the embodiments of the present application. DETAILED DESCRIPTION
[0084] An abnormal behavior security analysis method based on artificial intelligence is used to improve the accuracy of judging whether behavior data is abnormal behavior data.
[0085] The method of the present application can be applied to a server, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as a server as an example.
[0086] The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0087] See also Figure 1 In the embodiments of the present application, an abnormal behavior security analysis method based on artificial intelligence includes:
[0088] 101. Obtain the first behavior data of the user to be detected;
[0089] The server is responsible for obtaining the first behavior data of the user to be detected from the data source or user interaction system. This data usually includes various operation records of the user within a certain period of time, such as clicks, browsing, and searching. Data acquisition can be achieved through log systems, database queries, or real-time data streams. The purpose of obtaining the first behavior data of the user to be detected is to provide basic data for subsequent analysis and model training.
[0090] 102. Generate a first behavior vector according to the first behavior data;
[0091] The server converts the first behavior data into a first behavior vector. The process of behavior vectorization includes converting the original behavior data (such as click timestamps, browsed pages, etc.) into a numerical vector form so that the computer can process it. Vectorization allows these behavior data to be input into the machine learning model for analysis and processing. Generating the first behavior vector is an important part of data preprocessing, preparing for the input of subsequent models.
[0092] 103. Input the first behavior vector into a first recognition model to obtain a first eigenvalue, where the first recognition model is a neural network model trained with normal behavior data;
[0093] The server inputs the generated first behavior vector into the first recognition model to obtain a first eigenvalue. The first recognition model is a neural network model trained with normal behavior data, which is designed to recognize and understand normal user behavior patterns. After training, the model can convert the input behavior vector into eigenvalues, which reflect the main characteristics of user behavior. The first eigenvalue is obtained to determine whether the user behavior conforms to the normal pattern.
[0094] Specifically, inputting the first behavior vector into the first recognition model to obtain the first eigenvalue may include the following steps:
[0095] 103.1. Flatten the first line of vectors into a one-dimensional vector;
[0096] The first row of vectors is originally a two-dimensional structure, such as a matrix composed of N d-dimensional word vectors. The server's flattening operation converts this two-dimensional matrix into a one-dimensional vector. The flattening operation simplifies the data structure and facilitates subsequent neural network processing.
[0097] 103.2. Input the one-dimensional vector into the complex fully connected layer of the first recognition model to obtain a first complex vector;
[0098] The server inputs the flattened one-dimensional vector into a complex fully connected layer. The weights and biases of this layer are all complex numbers, and the input vector is multiplied and added to obtain a new complex vector. In this embodiment, the complex fully connected layer can handle more complex data relationships, and the real and imaginary parts of the complex number represent the projection and phase information of the input vector in a specific direction, respectively. In this way, the model can capture more features in the behavioral data.
[0099] 103.3. Randomly generate a random orthogonal matrix, and use the random orthogonal matrix to map the first complex vector to the second complex vector;
[0100] The server generates a random complex orthogonal matrix and uses it to linearly transform the first complex vector. The characteristic of this orthogonal matrix is that its column vectors are orthogonal, that is, the inner product is zero, and the norm of each column vector is 1. The orthogonal transformation helps to keep the norm of the vector unchanged, which means that it does not enlarge or reduce the scale of the feature. In this way, the directionality of the vector remains unchanged, while providing a stable input for subsequent neural network processing.
[0101] 103.4. Input the second complex vector into the sparse regularized fully connected layer of the first recognition model to obtain a third complex vector;
[0102] The server inputs the second complex vector into a complex fully connected layer with sparse regularization. This layer uses L1 regularization (or other forms of sparse regularization) to encourage a small number of non-zero elements in the output vector. Sparse regularization helps the model learn more concise and useful features, reducing noise and unnecessary information. This is especially important for processing high-dimensional data because it can avoid overfitting and improve the generalization ability of the model.
[0103] 103.5. Input the third complex vector into the first branch fully connected layer and the second branch fully connected layer of the first recognition model respectively to obtain a first branch vector and a second branch vector respectively, and merge the first branch vector and the second branch vector to obtain a fourth complex vector;
[0104] The server inputs the third complex vector into two different complex fully connected layers (i.e., the first branch and the second branch) to generate the first branch vector and the second branch vector respectively. The output vectors of the two branches are different in structure, but represent different features of the same input. The vectors of the two branches are then merged (by summing), and finally the fourth complex vector is obtained. When processing complex data, such as high-level features in behavioral data, a single network branch may not be able to capture all features. Through a multi-branch structure, information can be extracted from different angles and then combined to improve the expression and prediction capabilities of the model.
[0105] 103.6. Input the third complex vector into the complex fully connected output layer of the first recognition model to obtain the first eigenvalue output by the complex fully connected output layer.
[0106] The server inputs the fourth complex vector into the model's complex fully connected output layer, the output of which is the first eigenvalue. The final output layer is responsible for converting the high-dimensional complex eigenvector into the final eigenvalue, which is used for downstream task anomaly detection. The first eigenvalue is the final output of the model this time, representing an overall feature of the first line of the input vector.
[0107] 104. Calculate a first similarity between the first eigenvalue and a first standard eigenvalue;
[0108] The server calculates the similarity between the first feature value and the first standard feature value. The first standard feature value is a reference value calculated based on a large amount of normal behavior data, which is used to compare with the first feature value of the current user. The purpose of calculating the first similarity is to evaluate whether the behavior of the current user is consistent with the normal pattern, which is usually accomplished using a similarity calculation method (such as cosine similarity, Euclidean distance, etc.).
[0109] 105. When the first similarity is less than a first threshold, input the first behavior vector into a second recognition model to obtain a second eigenvalue, where the second recognition model is a neural network model trained with abnormal behavior data;
[0110] Since the first standard eigenvalue is obtained based on normal behavior data, when the calculated first similarity is lower than the set first threshold, it means that there is a certain difference between the first behavior data and the normal behavior data, and the first behavior data may not be normal behavior data. However, it is possible to misjudge the first behavior data as abnormal behavior data based solely on the first similarity. Therefore, the server needs to input the first behavior vector into the second recognition model. At this time, the second recognition model is a neural network model trained with abnormal behavior data, which is specifically used to detect abnormal behavior patterns. By inputting the vector into the model, the server can obtain the second eigenvalue. The purpose of obtaining the second eigenvalue is to further confirm whether the user behavior is abnormal.
[0111] 106. Calculate a second similarity between the second eigenvalue and a second standard eigenvalue;
[0112] The server calculates the similarity between the second feature value and the second standard feature value. The second standard feature value is a reference value calculated based on the abnormal behavior data and is used to compare with the second feature value. The second similarity is calculated to determine whether the second feature value meets the characteristics of the abnormal behavior, thereby further determining whether the behavior is abnormal.
[0113] 107. When the second similarity is greater than or equal to a second threshold, it is determined that the user to be detected has abnormal behavior.
[0114] The server compares the second similarity with a preset second threshold. If the second similarity reaches or exceeds the second threshold, the server determines that the behavior of the user to be detected is abnormal. The purpose of determining that the user has abnormal behavior is to make a final abnormal behavior determination based on the calculated similarity so as to take corresponding treatment measures.
[0115] The method provided by the embodiment of the present application first obtains the first behavior data of the user to be detected, then generates a first behavior vector using the first behavior data, and then inputs the first behavior vector into the first recognition model to obtain the first eigenvalue output by the first recognition model. If the first similarity between the first eigenvalue and the first standard eigenvalue is less than the first threshold, the first behavior vector is input into the second recognition model to obtain the second eigenvalue output by the second recognition model. If the second similarity between the second eigenvalue and the second standard eigenvalue is greater than or equal to the second threshold, it means that the similarity between the first behavior data and the abnormal behavior data is very high, and it can be determined that the user to be detected has abnormal behavior. Through multiple judgments, the accuracy of judging whether the first behavior data is abnormal behavior data can be improved. At the same time, by identifying abnormal behavior through an artificial intelligence neural network model, the behavior of the user to be detected can be quickly identified.
[0116] Furthermore, when the second similarity is less than the third threshold, it is determined that the user to be detected does not have abnormal behavior. The server compares the calculated second similarity with the preset third threshold. The second similarity refers to the similarity between the feature value output by the recognition model trained with abnormal behavior data and the standard feature value of abnormal behavior. The third threshold is a preset reference value used to determine whether the user behavior is abnormal. If the second similarity is less than the third threshold, it means that the user's behavior characteristics do not deviate significantly from the normal behavior pattern. Through this comparison, the server can determine whether the user's behavior is within the normal range, thereby determining that the user does not have abnormal behavior.
[0117] Furthermore, the server can perform a double threshold comparison on the second similarity. Specifically, when the second similarity is greater than or equal to the third threshold but less than the second threshold, the server will mark the user's behavior as a "special user". This means that the user's behavior characteristics are between normal and abnormal, and do not fully meet the abnormal behavior standards, but also have a certain abnormal tendency. The purpose of this step is to give special treatment to these users who are not obvious but worthy of attention. Once a user is marked as a special user, the server will store the relevant information in a special manual detection database. This database is used to store user data that requires further manual review. Subsequently, manual inspection personnel will conduct a more detailed review of the behavior of these special users to determine whether there is abnormal behavior. This step improves the accuracy of abnormal behavior detection by introducing manual judgment, especially for those boundary cases that are difficult for algorithms to fully determine.
[0118] By marking users whose second similarity is between the third threshold and the second threshold as special users, users whose behavior characteristics are between normal and abnormal can be identified. The behavior of these users may not be obviously abnormal, but still needs attention. This step can prevent potential abnormal behavior to a certain extent and increase the sensitivity and accuracy of the system. At the same time, storing special users in the manual detection database and manually judging abnormal behavior can combine the advantages of machines and humans. After the machine automatically screens out suspicious users, a more detailed review is conducted manually, which improves the accuracy and reliability of the judgment. This step not only makes up for the possible deficiencies of the algorithm, but also can handle complex or boundary situations, thereby improving the effectiveness and intelligence level of the overall detection system.
[0119] See also Figure 2 In some embodiments of the present application, step 102 in the above embodiment may generate a first behavior vector according to the first behavior data, including steps 201 to 207 as follows:
[0120] 201. Obtain a time series of the first behavior data;
[0121] The server obtains the time series of the first behavior data. This means that the time information related to the first behavior data needs to be extracted in order to sort and analyze the data in time. The time series records the specific time point when each behavior occurs. The purpose of obtaining the time series is to ensure the time sequence and integrity of the data, thereby providing accurate time context for subsequent analysis.
[0122] 202. Rearrange the first behavior data according to the time sequence;
[0123] The server reorders the first behavior data according to the acquired time sequence. Reordering is to sort the data in the order of the time sequence to ensure that the order of the data is consistent with the actual time of occurrence. The purpose of this step is to process the time sequence in the data so that it can accurately reflect the actual time flow of user behavior.
[0124] 203. Extract keywords from the rearranged first behavior data;
[0125] In this step, the server performs keyword extraction on the rearranged first behavior data. Keyword extraction is to identify representative or important words or phrases from the behavior data. The extracted keywords are usually brief descriptions of the behavior data content, which facilitates subsequent analysis and processing.
[0126] 204. Deleting duplicate contents of the extracted keywords;
[0127] The server deduplicates the extracted keywords. The purpose of deduplication is to remove duplicate keywords to reduce the impact of redundant data and make analysis more efficient and accurate. This step ensures that each keyword is unique in the data set, avoiding repeated calculations and analysis.
[0128] 205. Inputting a defect recognition model into the keywords to identify defect keywords in the keywords;
[0129] In this step, the server inputs the deduplicated keywords into the defect recognition model to identify defect keywords in the keywords. The defect recognition model is a machine learning model that detects whether there are abnormal or unexpected content in the keywords. The model analyzes keywords to identify and mark possible defects for subsequent processing.
[0130] 206. Eliminate the defective keywords from the keywords;
[0131] The server removes the identified defective keywords, which means removing the identified defective keywords from the keyword list to ensure that subsequent data analysis is based on a correct and effective keyword set.
[0132] 207. Generate a first behavior vector according to the removed keywords.
[0133] The server generates the first behavior vector based on the removed keywords. This step converts the processed keywords into vector form for further data analysis. Generating the first behavior vector is to convert text information into a computable numerical format so that it can be input into the machine learning model for analysis and prediction. Specifically, the server inputs the keywords into a pre-trained word vector model, which will generate corresponding word vectors for the input keywords one by one, and then combine these word vectors in the same order as the keywords to obtain the first behavior vector.
[0134] Through time series rearrangement, keyword extraction and deduplication, defect detection and elimination, the quality and structure of behavior data are optimized, and finally a high-precision behavior vector is generated. This series of steps ensures the timeliness, simplicity and accuracy of the data, improves the analysis and prediction capabilities of subsequent machine learning models, and effectively enhances the accuracy and reliability of abnormal behavior detection.
[0135] See also Figure 3 In some embodiments of the present application, before calculating the first similarity between the first feature value and the first standard feature value in step 104 in the above embodiment, the following steps 301 to 304 may be further included:
[0136] 301. Obtain the second behavior data of all normal users;
[0137] The server collects the second behavior data of all users who are considered normal from the data source or user interaction system. The second behavior data refers to the behavior records of these users in a specific time period, including clicks, browsing, searches, etc. The acquisition of this data provides the basis for subsequent model training and standardization.
[0138] 302. Generate a second behavior vector according to the second behavior data;
[0139] The server converts the collected second behavior data into vector form. The vectorization process includes converting the original behavior data (such as click timestamps, browsed pages, etc.) into a numerical vector format so that the computer can process it. The purpose of generating the second behavior vector is to standardize the data and use it for subsequent model training.
[0140] 303. Input the second behavior data into the first recognition model to obtain a third eigenvalue;
[0141] The server inputs the generated second behavior vector into the previously trained first recognition model to obtain a third eigenvalue. The first recognition model is a neural network model trained with normal behavior data and capable of identifying and classifying normal behavior patterns. The third eigenvalue output by the model is used to represent the characteristics of normal user behavior.
[0142] 304. Standardize the third eigenvalue to obtain a first standard eigenvalue.
[0143] The server performs standardization on the third eigenvalue. The purpose of standardization is to adjust the eigenvalue to a uniform scale to make it comparable and consistent. The eigenvalue after standardization is the first standard eigenvalue, which serves as the benchmark for subsequent comparison and anomaly detection. When performing standardization, it can specifically include:
[0144] First, the third eigenvalue is Z-score normalized. This step transforms the eigenvalue to a standard normal distribution by subtracting the mean of the eigenvalue and dividing it by its standard deviation, so that the data has zero mean and unit variance. The formula is as follows:
[0145] (Formula 1)
[0146] in, is the third eigenvalue, is the mean, is the standard deviation.
[0147] Next, principal component analysis (PCA) is performed on the standardized data to reduce the data dimension while retaining as much original information as possible. This step includes the following steps:
[0148] Calculate the covariance matrix Σ;
[0149] Compute the eigenvalues and eigenvectors of the covariance matrix;
[0150] Select the eigenvectors corresponding to the first k largest eigenvalues to form the transformation matrix W;
[0151] Use the transformation matrix W to project the data into a new low-dimensional space to obtain the reduced-dimensional data Y.
[0152] Then, Gaussian kernel density estimation (KDE) is performed on the reduced-dimensional data to estimate the probability density function of the data. The specific steps are as follows:
[0153] Select appropriate kernel function K and bandwidth h;
[0154] The kernel function K can be:
[0155] (Formula 2)
[0156] This formula is used to calculate the probability density value of each data point under kernel density estimation , in order to get the overall distribution of the data.
[0157] Calculate the kernel density estimate for each data point , to obtain the probability density distribution of the data.
[0158] In this step, you can refer to the following formula:
[0159] (Formula 3)
[0160] in, is a data point, is the total number of data points.
[0161] Finally, the data is adjusted based on the density estimate. Data points with higher density are changed less, while data points with lower density are adjusted more to ensure consistency and comparability of the data distribution. The specific process is as follows:
[0162] Calculate the density estimate for each data point ;
[0163] Use density estimates to adjust the data so that points with high density change little, and points with low density change much;
[0164] The adjusted data were restored to the original feature space through inverse PCA transformation and inverse Z-score normalization to obtain the final first standard eigenvalue.
[0165] In this embodiment, by generating and standardizing the behavioral feature values of normal users, a reliable reference standard and data basis are provided for subsequent anomaly detection.
[0166] See also Figure 4 In the embodiments of the present application, an abnormal behavior security analysis system based on artificial intelligence includes:
[0167] A first acquisition unit 401 is used to acquire first behavior data of a user to be detected;
[0168] A first generating unit 402, configured to generate a first behavior vector according to the first behavior data;
[0169] A first input unit 403 is used to input the first behavior vector into a first recognition model to obtain a first eigenvalue, wherein the first recognition model is a neural network model trained with normal behavior data;
[0170] A first calculation unit 404, configured to calculate a first similarity between the first feature value and a first standard feature value;
[0171] A second input unit 405 is used to input the first behavior vector into a second recognition model to obtain a second eigenvalue when the first similarity is less than a first threshold, wherein the second recognition model is a neural network model trained with abnormal behavior data;
[0172] A second calculation unit 406, configured to calculate a second similarity between the second eigenvalue and a second standard eigenvalue;
[0173] The determination unit 407 is configured to determine that the user to be detected has abnormal behavior when the second similarity is greater than or equal to a second threshold.
[0174] The method provided by the embodiment of the present application is as follows: first, the first acquisition unit 401 acquires the first behavior data of the user to be detected, and then the first generation unit 402 generates the first behavior vector using the first behavior data, and the first input unit 403 inputs the first behavior vector into the first recognition model to obtain the first eigenvalue output by the first recognition model. If the first similarity between the first eigenvalue and the first standard eigenvalue is less than the first threshold, the second input unit 405 inputs the first behavior vector into the second recognition model to obtain the second eigenvalue output by the second recognition model. If the second similarity between the second eigenvalue and the second standard eigenvalue is greater than or equal to the second threshold, it means that the first behavior data and the abnormal behavior data have a very high similarity, and the determination unit 407 can determine that the user to be detected has abnormal behavior. Through multiple judgments, the accuracy of determining whether the first behavior data is abnormal behavior data can be improved. At the same time, by identifying abnormal behavior through an artificial intelligence neural network model, the behavior of the user to be detected can be quickly identified.
[0175] Optionally, the determining unit 407 is further configured to:
[0176] When the second similarity is less than a third threshold, it is determined that the user to be detected does not have abnormal behavior.
[0177] Optionally, the determining unit 407 is further configured to:
[0178] When the second similarity is greater than or equal to a third threshold and less than a second threshold, marking the user to be detected as a special user;
[0179] The special user is stored in a manual detection database, and the special user's abnormal behavior is manually determined.
[0180] Optionally, the first generating unit 402 includes:
[0181] An extraction module, configured to traverse the first behavior data and extract keywords from the first behavior data;
[0182] A generating module is used to generate a first behavior vector according to the keyword.
[0183] Optionally, the generating module is specifically used for:
[0184] Inputting a defect recognition model into the keywords to identify defect keywords in the keywords;
[0185] Eliminating the defective keywords from the keywords;
[0186] A first behavior vector is generated according to the removed keywords.
[0187] Optionally, the extraction module is specifically used for:
[0188] Obtain a time series of the first behavior data;
[0189] Rearranging the first behavior data according to the time series;
[0190] Extract keywords from the rearranged first behavior data;
[0191] Delete duplicates from the extracted keywords.
[0192] Optionally, the system further comprises a standardization unit, wherein the standardization unit is configured to:
[0193] Get the second behavior data of all normal users;
[0194] generating a second behavior vector according to the second behavior data;
[0195] Inputting the second behavior data into the first recognition model to obtain a third eigenvalue;
[0196] The third eigenvalue is normalized to obtain a first standard eigenvalue.
[0197] See also Figure 5 Another embodiment of the abnormal behavior security analysis system based on artificial intelligence in the embodiment of the present application includes:
[0198] Processor 501, memory 502, input and output unit 503 and bus 504;
[0199] The processor 501 is connected to the memory 502, the input and output unit 503 and the bus 504;
[0200] The memory 502 stores a program, and the processor 501 calls the program to execute Figure 1 Steps in the illustrated embodiment.
[0201] In this embodiment, the function of the processor 501 is the same as that of the aforementioned Figure 1 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0206] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. An abnormal behavior security analysis method based on artificial intelligence, It is characterized in that include: Obtain the first behavior data of the user to be detected; generating a first behavior vector according to the first behavior data; Inputting the first behavior vector into a first recognition model to obtain a first eigenvalue, wherein the first recognition model is a neural network model trained with normal behavior data; Calculating a first similarity between the first eigenvalue and a first standard eigenvalue; When the first similarity is less than a first threshold, inputting the first behavior vector into a second recognition model to obtain a second eigenvalue, wherein the second recognition model is a neural network model trained with abnormal behavior data, and the second recognition model has the same structure as the first recognition model; Calculating a second similarity between the second eigenvalue and a second standard eigenvalue; When the second similarity is greater than or equal to a second threshold, determining that the user to be detected has abnormal behavior; Inputting the first behavior vector into a first recognition model to obtain a first eigenvalue includes: Flatten the first line vector into a one-dimensional vector; Inputting the one-dimensional vector into a complex fully connected layer of a first recognition model to obtain a first complex vector; Randomly generate a random orthogonal matrix, and use the random orthogonal matrix to map the first complex vector into a second complex vector; Inputting the second complex vector into the sparse regularized fully connected layer of the first recognition model to obtain a third complex vector; Input the third complex vector into the first branch fully connected layer and the second branch fully connected layer of the first recognition model respectively to obtain a first branch vector and a second branch vector respectively, and merge the first branch vector and the second branch vector to obtain a fourth complex vector; Inputting the third complex vector into the complex fully connected output layer of the first recognition model to obtain a first eigenvalue output by the complex fully connected output layer; Generating a first behavior vector according to the first behavior data includes: Traversing the first behavior data, and extracting keywords from the first behavior data; Generate a first behavior vector according to the keyword; Generating a first behavior vector according to the keyword includes: Inputting a defect recognition model into the keywords to identify defect keywords in the keywords; Eliminating the defective keywords from the keywords; A first behavior vector is generated according to the removed keywords.
2. The method according to claim 1, It is characterized in that The method further comprises: When the second similarity is less than a third threshold, it is determined that the user to be detected does not have abnormal behavior.
3. The method according to claim 2, It is characterized in that The method further comprises: When the second similarity is greater than or equal to a third threshold and less than a second threshold, marking the user to be detected as a special user; The special user is stored in a manual detection database, and the special user's abnormal behavior is manually determined.
4. The method according to claim 1, It is characterized in that The traversing the first behavior data and extracting keywords from the first behavior data includes: Obtain a time series of the first behavior data; Rearranging the first behavior data according to the time series; Extract keywords from the rearranged first behavior data; Delete duplicates from the extracted keywords.
5. The method according to any one of claims 1 to 4, It is characterized in that Before calculating the first similarity between the first eigenvalue and the first standard eigenvalue, the method further includes: Get the second behavior data of all normal users; generating a second behavior vector according to the second behavior data; Inputting the second behavior data into the first recognition model to obtain a third eigenvalue; The third eigenvalue is normalized to obtain a first standard eigenvalue.
6. An abnormal behavior security analysis system based on artificial intelligence, It is characterized in that include: A first acquisition unit, used to acquire first behavior data of a user to be detected; A first generating unit, configured to generate a first behavior vector according to the first behavior data; A first input unit, used to input the first behavior vector into a first recognition model to obtain a first eigenvalue, wherein the first recognition model is a neural network model trained with normal behavior data; A first calculation unit, configured to calculate a first similarity between the first eigenvalue and a first standard eigenvalue; a second input unit, configured to input the first behavior vector into a second recognition model to obtain a second eigenvalue when the first similarity is less than a first threshold, wherein the second recognition model is a neural network model trained with abnormal behavior data, and the second recognition model has the same structure as the first recognition model; A second calculation unit, used for calculating a second similarity between the second eigenvalue and a second standard eigenvalue; a determining unit, configured to determine that the user to be detected has abnormal behavior when the second similarity is greater than or equal to a second threshold; The first generating unit comprises: An extraction module, configured to traverse the first behavior data and extract keywords from the first behavior data; A generating module, used for generating a first behavior vector according to the keyword; The generation module is specifically used for: Inputting a defect recognition model into the keywords to identify defect keywords in the keywords; Eliminating the defective keywords from the keywords; A first behavior vector is generated according to the removed keywords.
7. An abnormal behavior security analysis system based on artificial intelligence, It is characterized in that include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; A program is stored in the memory, and the processor calls the program to execute the method according to any one of claims 1 to 5. 8 . A computer-readable storage medium having a program stored thereon, wherein when the program is executed on a computer, the computer is caused to execute the method according to claim 1 .
