A computer network security intrusion detection method
Through correlation analysis of user behavior characteristics and anomaly detection of LSTM models, complex attack patterns are identified, which solves the problem of high miss detection rate of traditional intrusion detection systems and improves detection accuracy and reliability.
Patent Information
- Application Number
- CN202410761168.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-13
AI Technical Summary
It is difficult for traditional intrusion detection systems to identify complex attacks carried out by attackers through dispersed attack paths and disguised behavioral characteristics, resulting in a high miss detection rate.
By collecting network traffic logs, system logs and application logs, we extract user behavior characteristics, construct time series, conduct correlation analysis, identify abnormal event sequences, and use the LSTM model to perform anomaly detection and identify combined abnormal behaviors.
It improves the detection accuracy and reliability of the intrusion detection system, reduces the missed detection rate, and can effectively identify complex attack patterns.
Smart Images

Figure CN118337536B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network security, and more specifically, relates to a computer network security intrusion detection method. Background Art
[0002] In the field of computer network security, intrusion detection system (IDS) is one of the important means to ensure the security of network environment. Traditional intrusion detection systems usually rely on feature matching and rule detection to discover potential security threats by identifying known attack features and patterns. This method has high accuracy and efficiency in identifying known attacks. However, with the continuous development of network attack technology, attackers have adopted more covert and complex means, which makes traditional detection methods face severe challenges.
[0003] First, traditional intrusion detection systems often rely on predefined rules and feature libraries. These rules and feature libraries need to be constantly updated to adapt to emerging attack methods. However, even the most advanced feature libraries and rules are difficult to cover all possible attack paths, resulting in a high rate of missed detection. Attackers can circumvent these known rules and disperse their attack behaviors, making it difficult for a single feature detection system to detect these hidden attacks.
[0004] Secondly, most existing intrusion detection methods focus on the analysis of a single behavioral feature, while ignoring the correlation between behavioral features. Abnormal behavior in actual network environments is often the result of the combined effects of multiple dimensions and multiple factors. Simply relying on a single feature for detection cannot capture complex attack patterns. For example, it may be normal for a user to frequently access a system within a certain period of time, but if combined with other behavioral features (such as access time and operation type), such frequent access may be abnormal. Therefore, a single-dimensional detection method is difficult to deal with complex attacks carried out by attackers by dispersing attack paths and disguising behavioral features. Summary of the invention
[0005] The present invention provides a computer network security intrusion detection method, which is intended to solve the technical problem that the current single-dimensional detection method is difficult to cope with complex attacks carried out by attackers by dispersing attack paths and disguising behavioral characteristics.
[0006] A computer network security intrusion detection method comprises the following steps:
[0007] Step 1: Collect network traffic logs, system logs, security device logs, and application logs, and pre-process the collected log data;
[0008] Step 2: Extract the user's behavior features from the original data and store the extracted behavior features in the feature library;
[0009] Step 3: Organize the extracted user behavior features in chronological order and construct a time series;
[0010] Step 4: Perform correlation analysis on the user's behavior characteristics and time series data to identify changes in user behavior patterns and potential correlations, and obtain abnormal event sequences;
[0011] Step 5: Perform anomaly detection based on the user's behavioral characteristics, time series, and abnormal event sequence to obtain specific abnormal behaviors.
[0012] The present invention performs correlation analysis on the user's behavior characteristics and event sequence data to identify changes in user behavior patterns and potential correlations; through correlation analysis, the complex relationship between individual behavior characteristics can be discovered, and seemingly normal individual behavior characteristics and abnormal behavior patterns combined can be identified; through changes in behavior patterns and potential correlations, an abnormal event sequence is obtained, and anomaly detection is performed based on user behavior characteristics, time series and abnormal event sequences to obtain specific abnormal behaviors, so that the present invention can effectively identify combined abnormal behaviors, improve the detection accuracy and reliability of intrusion detection systems, and solve the problem of high missed detection rate of existing single-dimensional detection methods.
[0013] Preferably, the user's behavior characteristics in step 2 include:
[0014] Visit frequency: Calculate the number of visits by a user within a certain period of time:
[0015] ;
[0016] Where: represents the access frequency of user i; represents the number of visits by user i in time period T;
[0017] Visit period: Statistics of users’ visit behaviors in different time periods:
[0018] ;
[0019] Where: represents the number of visits by user i in time period t; represents an exponential function, when Take 1 when it is, otherwise take 0; represents the time period of the jth visit;
[0020] Operation type: Count the number of times users perform different types of operations:
[0021] ;
[0022] Where: represents the number of times user i performs operation type k; represents an exponential function, when When it is 1, otherwise it is 0; Indicates the type of operation performed by the user during the jth visit;
[0023] Behavior sequence features: Use sequence pattern mining algorithms to discover frequent subsequences in user behavior:
[0024] ;
[0025] Where: Indicates from the state The probability of transitioning to state s; represents the state of the random variable X at time t; represents the state of the random variable X at time t+1; Denotes that the random variable X is in state , and the number of times it is in state s at time t+1; Indicates that among all observations, the random variable X is in the state at time t The number of times; and Each represents a state.
[0026] Preferably, step 3 comprises the following steps:
[0027] Step 3.1: Based on the determined time window size, divide the entire time axis into a number of non-overlapping time windows;
[0028] Step 3.2: Map the behavioral feature data of each user i into the corresponding time window;
[0029] Step 3.3: Count and aggregate the features within each time window;
[0030] Step 3.4: Based on the statistical and aggregation results, construct a corresponding time series for each extracted feature.
[0031] Preferably, step 4 comprises the following steps:
[0032] Step 4.1: Use the sliding window technique to smooth the time series and eliminate noise to obtain the first time series;
[0033] Step 4.2: Use the sequence pattern mining algorithm to find frequent behavior models in the first time series, identify the user's frequent behavior patterns by counting the frequency of occurrence of the behavior patterns, and obtain the frequency of occurrence of the behavior patterns and the frequent behavior patterns;
[0034] Step 4.3: Based on the frequency of occurrence of behavior patterns and common behavior patterns, use association rule mining algorithms to analyze the correlation between different behavior features and generate association rule sets to determine the potential relationship between behavior features;
[0035] Step 4.4: Based on the common behavior patterns and the first time series, compare the behavior patterns in the current time window with the historical behavior patterns, detect changes in the behavior patterns, and mark the behavior patterns that have changed significantly;
[0036] Step 4.5: If the detected behavior pattern violates any association rule in the association rule set, the behavior pattern is determined to be abnormal; the behavior patterns that have changed significantly and violated the association rules are organized in event order to construct an abnormal event sequence.
[0037] Preferably, the step 4.1 comprises the following steps:
[0038] The initial time series is obtained based on a simple moving average:
[0039] ;
[0040] Where: represents the smoothed value at time t; represents the original value of the time series at time i; W represents the size of the sliding window; where ;
[0041] For the first W-1 data points of the time series, the increasing window method is used:
[0042] ;
[0043] Where: ;
[0044] The first time series is obtained based on the initial time series and the exponential moving average:
[0045] ;
[0046] Where: Represents the smoothing coefficient, and its value is ; Represents the original value of the time series at time t; represents the smoothed value at time t-1.
[0047] Preferably, the step 4.2 comprises the following steps:
[0048] Initial stage: Based on step 4.1, the first time series of all users are obtained to obtain the sequence database S; and the frequent sequence set F is initialized to be empty; the candidate sequence set C is initialized to contain all single time sequence sets e, where e is an element in the behavior feature set;
[0049] Frequent sequence generation: For each candidate sequence Calculate its support in the sequence database S:
[0050] ;
[0051] Where: represents the support of sequence c, represents the number of sequences containing c, Indicates the total number of sequences in the sequence database;
[0052] like , then add c to the frequent sequence set F, and expand c to generate a new candidate sequence; represents the threshold, which is used to determine whether a sequence is considered a frequent sequence;
[0053] Sequence expansion: For each frequent sequence , expanding it into a longer sequence :
[0054] ;
[0055] Where: Represents a set of behavioral features, It means adding e to the end of f; adding the extended sequence to the candidate sequence set C, and repeating the frequent sequence generation step until no new frequent sequence is generated; the final frequent sequence set F contains all frequent behavior patterns that meet the minimum support threshold;
[0056] Frequency of behavior patterns: For each frequent behavior pattern , calculate its frequency of occurrence:
[0057] ;
[0058] Where: represents the frequency of occurrence of behavior pattern p; Indicates that it contains behavioral patterns number of sequences; Indicates the total number of sequences in the sequence database;
[0059] Based on the calculated frequent behavior patterns and their occurrence frequency, the common behavior patterns of users are identified.
[0060] Preferably, the step 4.3 comprises the following steps:
[0061] Initial stage: Get a set of frequent behavior patterns based on frequent behavior patterns and their frequency of occurrence , each behavior pattern is a frequent itemset;
[0062] Generate association rules: For each frequent item set , generate all possible non-empty subsets X and Y such that and ;
[0063] Calculation rules The support and confidence of:
[0064] ;
[0065] ;
[0066] Where: Representation Rules support level; Representation Rules Confidence level; It represents the ratio of the number of frequent itemsets appearing in the entire database to the total number of transactions; It represents the ratio of the number of times item set X appears in the entire database to the total number of transactions;
[0067] Rule evaluation: Based on the set minimum confidence threshold, filter the rules whose confidence is lower than the minimum confidence threshold;
[0068] Calculate the lift of the rule to evaluate its usefulness:
[0069] ;
[0070] Where: Representation Rules The degree of improvement; It represents the ratio of the number of times item set Y appears in the entire database to the total number of transactions;
[0071] Rule evaluation: Filter rules below the lift threshold based on the set lift threshold;
[0072] Generate an association rule set: All rules that meet the minimum confidence and lift thresholds are stored to form an association rule set.
[0073] Preferably, step 5 performs anomaly detection based on an LSTM model, and the structure of the LSTM model is as follows:
[0074] Input layer: used to input time series data;
[0075] LSTM layer: The first LSTM layer contains 64 hidden units, which captures the long-term dependencies in the time series and returns the output of the entire sequence; the second LSTM layer contains 32 hidden units, which is used to further process the time series and return the output of the final time step;
[0076] Fully connected layer: contains 10 neurons and uses ReLU activation function;
[0077] Output layer: contains 1 neuron, uses sigmoid activation function, and outputs the anomaly score.
[0078] The beneficial effects of the present invention include:
[0079] The present invention performs correlation analysis on the user's behavior characteristics and event sequence data to identify changes in user behavior patterns and potential correlations; through correlation analysis, the complex relationship between individual behavior characteristics can be discovered, and seemingly normal individual behavior characteristics and abnormal behavior patterns combined can be identified; through changes in behavior patterns and potential correlations, an abnormal event sequence is obtained, and anomaly detection is performed based on user behavior characteristics, time series and abnormal event sequences to obtain specific abnormal behaviors, so that the present invention can effectively identify combined abnormal behaviors, improve the detection accuracy and reliability of intrusion detection systems, and solve the problem of high missed detection rate of existing single-dimensional detection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0081] Figure 1 An overall step block diagram provided for an embodiment of the present invention.
[0082] Figure 2 A specific step block diagram of step 3 provided in an embodiment of the present invention.
[0083] Figure 3 This is a specific step block diagram of step 4 provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0085] See also Figures 1 to 3 As shown, the best embodiment of the present invention is further described;
[0086] See also Figure 1 As shown, a computer network security intrusion detection method comprises the following steps:
[0087] Step 1: Collect network traffic logs, system logs, security device logs, and application logs, and pre-process the collected log data; the pre-processing includes:
[0088] Data cleaning: The preprocessing step helps to remove noise and redundant data and improve the data quality.
[0089] Unified format: Unified preprocessing steps ensure the standardization and consistency of subsequent analysis.
[0090] Step 2: Extract the user's behavior features from the original data and store the extracted behavior features in the feature library;
[0091] The user's behavior characteristics in step 2 include:
[0092] Visit frequency: Calculate the number of visits by a user within a certain period of time:
[0093] ;
[0094] Where: represents the access frequency of user i; represents the number of visits by user i in time period T;
[0095] Visit period: Statistics of users’ visit behaviors in different time periods:
[0096] ;
[0097] Where: represents the number of visits by user i in time period t; represents an exponential function, when Take 1 when it is, otherwise take 0; represents the time period of the jth visit;
[0098] Operation type: Count the number of times users perform different types of operations:
[0099] ;
[0100] Where: represents the number of times user i performs operation type k; represents an exponential function, when Take 1 when it is, otherwise take 0; Indicates the type of operation performed by the user during the jth visit;
[0101] Behavior sequence features: Use sequence pattern mining algorithms to discover frequent subsequences in user behavior:
[0102] ;
[0103] Where: Indicates from the state The probability of transitioning to state s; represents the state of the random variable X at time t; represents the state of the random variable X at time t+1; Denotes that the random variable X is in state , and the number of times it is in state s at time t+1; Indicates that among all observations, the random variable X is in the state at time t The number of times; and Each represents a state.
[0104] See also Figure 2 As shown, step 3: organize the extracted user behavior features in chronological order and construct a time series;
[0105] The step 3 comprises the following steps:
[0106] Step 3.1: Based on the determined time window size, divide the entire time axis into a number of non-overlapping time windows;
[0107] Step 3.2: Map the behavioral feature data of each user i into the corresponding time window;
[0108] Step 3.3: Count and aggregate the features within each time window;
[0109] Step 3.4: Based on the statistical and aggregation results, construct a corresponding time series for each extracted feature.
[0110] See also Figure 3 As shown, step 4: perform correlation analysis on the user's behavior characteristics and time series data, identify changes in user behavior patterns and potential correlations, and obtain abnormal event sequences;
[0111] The step 4 comprises the following steps:
[0112] Step 4.1: Use the sliding window technique to smooth the time series and eliminate noise to obtain the first time series;
[0113] The step 4.1 comprises the following steps:
[0114] The initial time series is obtained based on a simple moving average:
[0115] ;
[0116] Where: represents the smoothed value at time t; represents the original value of the time series at time i; W represents the size of the sliding window; where ;
[0117] For the first W-1 data points of the time series, the increasing window method is used:
[0118] ;
[0119] Where: ;
[0120] The first time series is obtained based on the initial time series and the exponential moving average:
[0121] ;
[0122] Where: Represents the smoothing coefficient, and its value is ; Represents the original value of the time series at time t; represents the smoothed value at time t-1.
[0123] In this embodiment, for each point in the time series, the average of the previous W points is calculated to smooth short-term fluctuations. This method is simple and direct, and can effectively reduce the impact of short-term fluctuations in data; by weighting, more recent data points are given greater weights, so that the smoothing process not only considers historical data, but also pays more attention to recent changes; it can more sensitively capture changes in behavioral patterns; for the first W-1 data points in the time series, the increasing window method is used to calculate the smoothed value. In this way, a smoothed sequence can be quickly established in the initial stage, avoiding errors caused by insufficient data in the initial stage of the sliding window method, and improving the efficiency and accuracy of initial data processing; the smoothing coefficient α in the exponential moving average method is dynamically adjusted according to the size of the sliding window. , making the smoothing process adaptive. This dynamic adjustment mechanism can flexibly adjust the degree of smoothing according to the characteristics of the actual data, so as to better adapt to different data environments and application scenarios; the first time series obtained after smoothing is more stable and can more clearly reflect the user's behavior pattern. After eliminating noise and short-term fluctuations, the long-term trends and periodic patterns hidden in the data are more obvious, which is helpful for subsequent frequent behavior pattern mining and association rule analysis, thereby improving the accuracy and reliability of anomaly detection.
[0124] Step 4.2: Use the sequence pattern mining algorithm to find frequent behavior models in the first time series, identify the user's frequent behavior patterns by counting the frequency of occurrence of the behavior patterns, and obtain the frequency of occurrence of the behavior patterns and the frequent behavior patterns;
[0125] The step 4.2 comprises the following steps:
[0126] Initial stage: Based on step 4.1, the first time series of all users are obtained to obtain the sequence database S; and the frequent sequence set F is initialized to be empty; the candidate sequence set C is initialized to contain all single time sequence sets e, where e is an element in the behavior feature set;
[0127] Frequent sequence generation: For each candidate sequence Calculate its support in the sequence database S:
[0128] ;
[0129] Where: represents the support of sequence c, represents the number of sequences containing c, Indicates the total number of sequences in the sequence database;
[0130] like , then add c to the frequent sequence set F, and expand c to generate a new candidate sequence; represents the threshold, which is used to determine whether a sequence is considered a frequent sequence;
[0131] Sequence expansion: For each frequent sequence , expanding it into a longer sequence :
[0132] ;
[0133] Where: Represents a set of behavioral features, It means adding e to the end of f; adding the extended sequence to the candidate sequence set C, and repeating the frequent sequence generation step until no new frequent sequence is generated; the final frequent sequence set F contains all frequent behavior patterns that meet the minimum support threshold;
[0134] Frequency of behavior patterns: For each frequent behavior pattern , calculate its frequency of occurrence:
[0135] ;
[0136] Where: represents the frequency of occurrence of behavior pattern p; Indicates that it contains behavioral patterns number of sequences; Indicates the total number of sequences in the sequence database;
[0137] Based on the calculated frequent behavior patterns and their occurrence frequency, the common behavior patterns of users are identified.
[0138] By mining user behavior data through frequent sequences, common user behavior patterns can be identified. These frequent behavior patterns represent typical user behavior characteristics and are of great significance for understanding the user's normal behavior. Through frequent sequence mining, regularity in user behavior can be discovered and behavior patterns that appear in most cases can be identified; the initial stage starts with the behavior characteristics of a single time and gradually expands to longer sequences. This gradual expansion method can adapt to behavior sequences of different lengths and ensure that all possible behavior patterns can be mined. This method has strong adaptability and can adjust the length of the sequence according to actual conditions to ensure the comprehensiveness of frequent behavior patterns.
[0139] Step 4.3: Based on the frequency of occurrence of behavior patterns and common behavior patterns, use association rule mining algorithms to analyze the correlation between different behavior features and generate association rule sets to determine the potential relationship between behavior features;
[0140] The step 4.3 comprises the following steps:
[0141] Initial stage: Get a set of frequent behavior patterns based on frequent behavior patterns and their frequency of occurrence , each behavior pattern is a frequent itemset;
[0142] Generate association rules: For each frequent item set , generate all possible non-empty subsets X and Y such that and ;
[0143] Calculation rules The support and confidence of:
[0144] ;
[0145] ;
[0146] Where: Representation Rules support level; Representation Rules Confidence level; It represents the ratio of the number of frequent itemsets appearing in the entire database to the total number of transactions; It represents the ratio of the number of times item set X appears in the entire database to the total number of transactions;
[0147] Rule evaluation: Based on the set minimum confidence threshold, filter the rules whose confidence is lower than the minimum confidence threshold;
[0148] Calculate the lift of the rule to evaluate its usefulness:
[0149] ;
[0150] Where: Representation Rules The degree of improvement; It represents the ratio of the number of times item set Y appears in the entire database to the total number of transactions;
[0151] Rule evaluation: Filter rules below the lift threshold based on the set lift threshold;
[0152] Generate an association rule set: All rules that meet the minimum confidence and lift thresholds are stored to form an association rule set.
[0153] This embodiment filters out rules that do not meet the conditions based on the set minimum confidence and lift thresholds. This dynamic generation and filtering method effectively reduces unnecessary calculations and improves the efficiency of rule mining. By analyzing frequent behavior patterns and their frequency of occurrence, deep associations between different behavior features can be mined. This method can not only identify a single frequent behavior pattern, but also reveal the inherent connections between these patterns, helping to understand the complexity and diversity of user behavior.
[0154] Step 4.4: Based on the common behavior patterns and the first time series, compare the behavior patterns in the current time window with the historical behavior patterns, detect changes in the behavior patterns, and mark the behavior patterns that have changed significantly;
[0155] Step 4.5: If the detected behavior pattern violates any association rule in the association rule set, the behavior pattern is determined to be abnormal; the behavior patterns that have changed significantly and violated the association rules are organized in event order to construct an abnormal event sequence.
[0156] Step 5: Perform anomaly detection based on the user's behavioral characteristics, time series, and abnormal event sequence to obtain specific abnormal behaviors.
[0157] Step 5 performs anomaly detection based on the LSTM model, and the structure of the LSTM model is as follows:
[0158] Input layer: used to input time series data;
[0159] LSTM layer: The first LSTM layer contains 64 hidden units, which captures the long-term dependencies in the time series and returns the output of the entire sequence; the second LSTM layer contains 32 hidden units, which is used to further process the time series and return the output of the final time step;
[0160] Fully connected layer: contains 10 neurons and uses ReLU activation function;
[0161] Output layer: contains 1 neuron, uses sigmoid activation function, and outputs the anomaly score.
[0162] Model training process
[0163] Data preparation:
[0164] Data integration: Integrate user behavior characteristics, time series data, and abnormal event sequences into a unified data set.
[0165] Data normalization: Normalizing the data to ensure that all features have similar scales helps improve the training effect of the model.
[0166] Data segmentation:
[0167] Splitting the dataset into training and validation sets ensures that the model can be validated on unseen data.
[0168] Model compilation:
[0169] Select a loss function (such as binary cross entropy) and an optimizer (such as Adam), and compile the model. The loss function is used to evaluate the prediction effect of the model, and the optimizer is used to update the model weights.
[0170] Model training:
[0171] Use the training data to train the model, monitor the performance on the validation set during the process to prevent overfitting. Set multiple hyperparameters during training, such as the number of training rounds (epochs) and batch size (batch size).
[0172] Training process: The model calculates the predicted value through forward propagation, calculates the prediction error through the loss function, and then updates the model parameters through back propagation. During the training process, the model will continuously adjust the weights and gradually reduce the loss function value to improve the prediction accuracy.
[0173] The present invention performs correlation analysis on the user's behavior characteristics and event sequence data to identify changes in user behavior patterns and potential correlations; through correlation analysis, the complex relationship between individual behavior characteristics can be discovered, and seemingly normal individual behavior characteristics and abnormal behavior patterns combined can be identified; through changes in behavior patterns and potential correlations, an abnormal event sequence is obtained, and anomaly detection is performed based on user behavior characteristics, time series and abnormal event sequences to obtain specific abnormal behaviors, so that the present invention can effectively identify combined abnormal behaviors, improve the detection accuracy and reliability of intrusion detection systems, and solve the problem of high missed detection rate of existing single-dimensional detection methods.
[0174] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A computer network security intrusion detection method, characterized in that: The following steps are involved: Step 1: Collect network traffic logs, system logs, security device logs, and application logs, and pre-process the collected log data; Step 2: Extract the user's behavior features from the original data and store the extracted behavior features in the feature library; Step 3: Organize the extracted user behavior features in chronological order and construct a time series; Step 4: Perform correlation analysis on the user's behavior characteristics and time series data to identify changes in user behavior patterns and potential correlations, and obtain abnormal event sequences; Step 4.1: Use the sliding window technique to smooth the time series and eliminate noise to obtain the first time series; Step 4.2: Use the sequence pattern mining algorithm to find frequent behavior models in the first time series, identify the user's frequent behavior patterns by counting the frequency of occurrence of the behavior patterns, and obtain the frequency of occurrence of the behavior patterns and the frequent behavior patterns; The step 4.2 comprises the following steps: Initial stage: Based on step 4.1, the first time series of all users are obtained to obtain the sequence database S; and the frequent sequence set F is initialized to be empty; the candidate sequence set C is initialized to contain all single time sequence sets e, where e is an element in the behavior feature set; Frequent sequence generation: For each candidate sequence c∈C, calculate its support in the sequence database S: Where: sup(c) represents the support of sequence c, represents the number of sequences containing c, and |s| represents the total number of sequences in the sequence database; If sup(c)≥minsup, then add c to the frequent sequence set F and expand c to generate a new candidate sequence; where minsup represents the threshold used to determine whether a sequence is considered a frequent sequence; Sequence expansion: For each frequent sequence f∈F, expand it to a longer sequence C new : C new ={f·e|e∈Σ}; Where: Σ represents the behavior feature set, f·e represents adding e to the end of f; the extended sequence is added to the candidate sequence set C, and the frequent sequence generation step is repeated until no new frequent sequence is generated; the final frequent sequence set F contains all frequent behavior patterns that meet the minimum support threshold; Frequency of occurrence of behavior patterns: For each frequent behavior pattern p∈F, calculate its frequency of occurrence: Where: freq(p) represents the frequency of occurrence of behavior pattern p; represents the number of sequences containing behavior pattern p; |S| represents the total number of sequences in the sequence database; Identify common behavior patterns of users based on the calculated frequent behavior patterns and their frequency of occurrence; Step 4.3: Based on the frequency of occurrence of behavior patterns and common behavior patterns, use association rule mining algorithms to analyze the correlation between different behavior features and generate association rule sets to determine the potential relationship between behavior features; Step 4.4: Based on the common behavior patterns and the first time series, compare the behavior patterns in the current time window with the historical behavior patterns, detect changes in the behavior patterns, and mark the behavior patterns that have changed significantly; Step 4.5: If the detected behavior pattern violates any association rule in the association rule set, the behavior pattern is determined to be abnormal; the behavior patterns that have changed significantly and violated the association rules are organized in event order to construct an abnormal event sequence; Step 5: Based on the user's behavior characteristics, time series, and the results of the abnormal event sequence, perform anomaly detection to obtain specific abnormal behaviors.
2. A computer network security intrusion detection method according to claim 1, characterized in that: The user's behavior characteristics in step 2 include: Visit frequency: Calculate the number of visits by a user within a certain period of time: Where: F i represents the access frequency of user i; N i represents the number of visits by user i in time period T; Visit period: Statistics of users’ visit behaviors in different time periods: Where: represents the number of visits by user i in time period t; Π represents the exponential function. j = t, it takes 1, otherwise it takes 0; t j represents the time period of the jth visit; Operation type: Count the number of times users perform different types of operations: Where: represents the number of times user i performs operation type k; Π represents an exponential function. j = k, it takes 1, otherwise it takes 0; o j Indicates the type of operation performed by the user during the jth visit; Behavior sequence features: Use sequence pattern mining algorithms to discover frequent subsequences in user behavior: Where: P(X t+1 =s|X t =s') represents the probability of transitioning from state s' to state s; X t represents the state of random variable X at time t; X t+1 represents the state of the random variable X at time t+1; count(X t =s',X t+1 =s) represents the number of times the random variable X is in state s' at time t and in state s at time t+1; count(X t =s') represents the number of times the random variable X is in state s' at time t in all observations; where s and s' each represent a state.
3. A computer network security intrusion detection method according to claim 1, characterized in that: The step 3 comprises the following steps: Step 3.1: Based on the determined time window size, divide the entire time axis into a number of non-overlapping time windows; Step 3.2: Map the behavioral feature data of each user i into the corresponding time window; Step 3.3: Count and aggregate the features within each time window; Step 3.4: Based on the statistical and aggregation results, construct a corresponding time series for each extracted feature.
4. A computer network security intrusion detection method according to claim 1, characterized in that: The step 4.1 comprises the following steps: The initial time series is obtained based on a simple moving average: Where: s t represents the smoothed value at time t; x i represents the original value of the time series at time i; W represents the size of the sliding window; where t≥W; For the first W-1 data points of the time series, the increasing window method is used: Where: t <W; The first time series is obtained based on the initial time series and the exponential moving average: s t =αx t +(1-α)s t-1 ; Where: α represents the smoothing coefficient, and its value is x t Represents the original value of the time series at time t; s t-1 represents the smoothed value at time t-1.
5. A computer network security intrusion detection method according to claim 1, characterized in that: The step 4.3 comprises the following steps: Initial stage: Based on frequent behavior patterns and their occurrence frequencies, a frequent behavior pattern set F' is obtained. Each behavior pattern f∈F' is a frequent item set. Generate association rules: For each frequent item set f∈F', generate all possible non-empty subsets X and Y such that X∪Y=f and X∩Y≠0; Calculate the support and confidence of rule X→Y: support(X→Y)=support(f); Where: support(X→Y) represents the support of rule X→Y; confidence(X→Y) represents the confidence of rule X→Y; support(f) represents the proportion of the number of frequent itemsets in the entire database to the total number of transactions; support(X) represents the proportion of the number of itemsets X in the entire database to the total number of transactions; Rule evaluation: Based on the set minimum confidence threshold, filter the rules whose confidence is lower than the minimum confidence threshold; Calculate the lift of the rule to evaluate its usefulness: Where: Lift(X→Y) represents the lift of rule X→Y; support(Y) represents the proportion of the number of times item set Y appears in the entire database to the total number of transactions; Rule evaluation: Filter rules below the lift threshold based on the set lift threshold; Generate an association rule set: All rules that meet the minimum confidence and lift thresholds are stored to form an association rule set.
6. A computer network security intrusion detection method according to claim 1, characterized in that: Step 5 performs anomaly detection based on the LSTM model, and the structure of the LSTM model is as follows: Input layer: used to input time series data; LSTM layer: The first LSTM layer contains 64 hidden units, which captures the long-term dependencies in the time series and returns the output of the entire sequence; the second LSTM layer contains 32 hidden units, which is used to further process the time series and return the output of the final time step; Fully connected layer: contains 10 neurons and uses ReLU activation function; Output layer: contains 1 neuron, uses sigmoid activation function, and outputs the anomaly score.
