A method for establishing a security abnormal behavior detection model with a fusion multi-attention mechanism
By integrating a multi-attention mechanism into a security anomaly detection model, combining EfficientNet-b1 and BiLSTM, the problem of existing methods failing to effectively integrate multi-dimensional features is solved, achieving efficient detection of security anomalies.
Patent Information
- Application Number
- CN202311667284.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-06
AI Technical Summary
Existing methods for detecting abnormal security behavior fail to effectively integrate multi-dimensional features, making it difficult to extract sufficient spatial and temporal motion features from complex and rapidly changing security anomaly videos, especially when key behaviors are occluded.
A security anomaly detection model with a fusion of multi-attention mechanisms is adopted. Through the EfficientNet-b1 backbone network and BiLSTM, combined with RGB and optical flow features, the multi-attention module extracts features in the channel, spatial and temporal dimensions, and obtains frame-level features through data augmentation and optical flow extraction modules. Temporal features are learned using BiLSTM.
It improves the network's ability to fuse and learn RGB and optical flow features, enabling more accurate detection of abnormal security behaviors, enhancing the ability to extract features in complex scenarios, and the model is plug-and-play.
Smart Images

Figure CN117765611B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of abnormal behavior detection, and in particular to a method for establishing a security abnormal behavior detection model that integrates multiple attention mechanisms. Background Technology
[0002] Anomaly detection in security surveillance is an important branch of intelligent security, playing a crucial role in public safety. To maintain social order and protect public safety, anomaly detection has received widespread attention and research. Surveillance video images differ from static images; they possess not only spatial features but also strongly correlated temporal motion characteristics across multiple frames. In particular, the complexity of security anomaly video scenes, rapid temporal movement, and the ease with which key actions in the video can be occluded make anomaly detection difficult. Therefore, extracting sufficient spatial and temporal motion features from complex and rapidly changing security anomaly videos has become a major challenge in anomaly detection.
[0003] Traditional security anomaly detection methods rely on histograms and bag-of-words to represent feature regions and propose specific descriptors for specific datasets to study security anomaly features and perform anomaly detection. While these methods can extract temporal features from video streams, they do not fully consider the problem that interest descriptors cannot represent global feature dependencies when key behaviors are occluded in complex scenes. With the development of computer vision, deep learning-based feature extraction methods have significant advantages over traditional methods. Current methods can memorize inter-frame correlation information, but it is important to note that they do not integrate more effective multi-dimensional features. Since security anomalies have multi-dimensional feature attributes, and these dimensional features have strong temporal motion correlations, it is essential to extract and fuse multi-dimensional features to obtain more sufficient and richer security anomaly behavior features. Summary of the Invention
[0004] In view of the defects or deficiencies of the existing methods, the purpose of this invention is to provide a method for establishing a security abnormal behavior detection model that integrates multiple attention mechanisms.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] A method for establishing a security anomaly behavior detection model that integrates multiple attention mechanisms, characterized by the following steps:
[0007] Step 1: Load the model parameters trained on the ImageNet dataset;
[0008] Step 2: Input the source domain dataset with real labels to train the network and obtain the trained source domain model. Use image samples as behavioral images.
[0009] Step 3, input the target domain dataset without labels. For each target domain training sample Data augmentation was performed, including HSV augmentation, random value augmentation and attenuation, and histogram equalization. Salt-and-pepper noise was then incorporated into the data-augmented samples. After passing through the optical flow extraction module, the input consists of a concatenated RGB stream and an optical flow stream. This concatenated input is then fed into the network model, passing through the CBS Block and MBConv Block modules of the EfficientNet-b1 backbone network to obtain the anomalous behavior frame-level features X∈R. B×T×C×H×W ;
[0010] Step 4, Frame-level feature map X∈R B×T×C×H×W Convolution and pooling operations are performed in the channel, spatial, and temporal dimensions, respectively.
[0011] For channel attention, a method to compress the spatial dimension of the input feature map is adopted. Average pooling and max pooling are used to compress the space, and the pooled feature descriptors are then fused and incorporated into the input map to obtain the channel attention map, expressed as:
[0012]
[0013] In the formula, X represents the weights of the fully connected layer. C This represents the channel attention feature map.
[0014] Next, average pooling and max pooling are performed along the feature channel direction. The frame-level feature information is aggregated through pooling operations, as shown below:
[0015] A(X C =Avgpool(X) C )+Maxpool(X C )
[0016] In the formula, A(X) C ) represents the feature matrix of the aggregate space.
[0017] Finally, after aggregating the channel information, channel adjustment is performed by reducing the number of channels using a standard convolutional layer, expressed as:
[0018] X S =X C W θ A(X C )
[0019] In the formula, W θ X represents the convolution kernel weight parameters. S This represents the spatial attention feature matrix after adjusting the number of channels.
[0020] For feature map X S Three sets of convolution operations are performed respectively. The convolutional feature descriptors are then scaled. By multiplying the scaled feature descriptors element by element and using Softmax to calculate temporal correlation, the temporal correlation feature matrix is obtained, expressed as:
[0021] A T1 (X S ) = View(W φ X S )
[0022] A T2 (X S ) = View(W φ X S )
[0023] A T3 (X S ) = View(W φ X S )
[0024] X T ={View[A T1 (X S A T2 (X S )]}A T3 (X S )
[0025] In the formula, A T1 (X S A) T2 (X S A) T3 (X S W represents the feature descriptor after convolution. φ For different convolution kernel weight parameters, X T Represents the time-related feature matrix;
[0026] Step 5: After passing through the spatial, temporal, and channel attention modules, a fused spatial, temporal, and channel attention map is obtained. Then, the initial dimension is restored by a convolutional kernel to obtain X. A The resulting attention feature map is fused with the input feature map to obtain the final output feature map Y∈R. B×T×C×H×W The expression is:
[0027]
[0028] Y = X A +X
[0029] Step 6: Next, transform the dimensions to three dimensions, resulting in the transformed feature Z∈R. B×T×CSubsequently, a BiLSTM is connected, which learns the temporal features of abnormal security behaviors. This module captures the correlation temporal features between frames of abnormal security videos and normal activity videos. BiLSTM is a bidirectional LSTM, and its first layer is called the forget gate layer, expressed as:
[0030] f(t)=σ(Wfh t-1 +Ufx t +bf)
[0031] After the forget gate, the input gate layer is entered, and the memory state data is retrained into new features, expressed as:
[0032] i(t)=σ(W i h t-1 +U i x i +b i )
[0033] The expression for the output gate o(t) is:
[0034] a(t) = tanh(W) a h t-1 +U a x t +b a )
[0035] o(t)=σ(W o h t-1 +U o x t +b o )
[0036]
[0037]
[0038] In the formula, tanh is the tangent hyperbolic function, and σ is the activation function Sigmoid.
[0039] The calculation results of the forget gate and the input gate constitute the state at time t, expressed as:
[0040] c(t)=c(t-1)⊙f(t)+i(t)☉a(t)
[0041] In the formula, ⊙ represents the Hadamard product. The hidden layer state at time t is derived from the output gate and the current state, expressed as:
[0042] h(r)=o(t)⊙tanh(c0)
[0043] Step 7: Set the learning rate l from 0.0005 to 0.001 and update the model parameters;
[0044] Step 8: Repeat steps 3-7 continuously and use the optimizer to optimize until the model converges; obtain the security abnormal behavior detection model that integrates multiple attention mechanisms.
[0045] According to the present invention, in step 6, the three dimensions are batchsize, timestep, and channel*.
[0046] Specifically, in step 7, the learning rate l is set to 0.0005.
[0047] In step 8, the optimizer is set to Adam.
[0048] According to the applicant's experimental results, the obtained security anomaly detection model that integrates multiple attention mechanisms can be used for security anomaly detection of input target images.
[0049] The application employs an electronic device comprising: a memory and a processor. The memory stores execution instructions, and the processor executes the execution instructions stored in the memory, causing the processor to perform the method for establishing a security anomaly behavior detection model that integrates multiple attention mechanisms; or:
[0050] A readable storage medium is used to store execution instructions, which, when executed by a processor, are used to establish a security anomaly behavior detection model that integrates multiple attention mechanisms.
[0051] The beneficial technical effects of the method for establishing a security anomaly behavior detection model integrating multi-attention mechanisms in this invention are as follows:
[0052] The established security anomaly detection model, which integrates a multi-attention mechanism, uses EfficientNet-b1 and BiLSTM as benchmark models, while also introducing a multi-attention module and optical flow input to extract effective features. This detection algorithm, which integrates RGB and optical flow, differs from traditional dual-backbone dual-flow network algorithms. This model uses only a single backbone structure to simultaneously process both RGB and optical flow features, thus improving the network's ability to learn and fuse RGB and optical flow features, resulting in better performance.
[0053] Security anomaly behavior features possess multi-dimensional attributes, with vertical features being frame-level image features and horizontal features being temporal-dimensional features. A multi-attention module is introduced to enhance the extraction of effective features across the channel, spatial, and temporal dimensions, and these effective features are then fused. The proposed multi-attention module focuses on effective security anomaly behavior features by weakening noise and strengthening effective information, while maintaining the same dimensionality between its input and output. When extracting effective features through the multi-attention mechanism, the input and output dimensions are consistent. This multi-attention mechanism has the advantage of being plug-and-play, making it easy to transfer to mainstream network models to improve the algorithm's feature extraction capabilities. Attached Figure Description
[0054] Figure 1 This is a structural block diagram of the security abnormal behavior detection model that integrates multiple attention mechanisms constructed in this invention;
[0055] Figure 2 This is a diagram of the multi-attention mechanism structure;
[0056] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. Detailed Implementation
[0057] The embodiments described below are only used to explain the relevant content of the technical solutions of the present invention, and are not intended to limit the present invention. The present invention is not limited to the following embodiments. For ease of description, only the parts related to the technical solutions are shown in the accompanying drawings. Unless otherwise specified, the feature technologies in the following embodiments can be combined with each other.
[0058] This embodiment presents a method for establishing a security anomaly behavior detection model that integrates multiple attention mechanisms, including the following steps:
[0059] Step 1: Load the model parameters trained on the ImageNet dataset;
[0060] Step 2: Input the source domain dataset with real labels to train the network and obtain the trained source domain model, using image samples as behavioral images;
[0061] Step 3: Input the target domain dataset without labels For each target domain training sample Data augmentation was performed, including HSV augmentation, random value augmentation and attenuation, and histogram equalization. Salt-and-pepper noise was then incorporated into the data-augmented samples. After passing through the optical flow extraction module, the input consists of a concatenated RGB stream and an optical flow stream. This concatenated input is then fed into the network model, passing through the CBS Block and MBConv Block modules of the EfficientNet-b1 backbone network to obtain the anomalous behavior frame-level features X∈R.B×T×C×H×W ;
[0062] Step 4: Frame-level feature map X∈R B×T×C×H×W Convolution and pooling operations are performed in the channel, spatial, and temporal dimensions, respectively.
[0063] For channel attention, a method to compress the spatial dimension of the input feature map is adopted. Average pooling and max pooling are used to compress the space, and the pooled feature descriptors are then fused and incorporated into the input map to obtain the channel attention map, expressed as:
[0064]
[0065] In the formula, X represents the weights of the fully connected layer. C Represents the channel attention feature map;
[0066] Next, average pooling and max pooling are performed along the feature channel direction. The frame-level feature information is aggregated through pooling operations, as shown below:
[0067] A(X C =Avgpool(X) C )+Maxpool(X C )
[0068] In the formula, A(X) C ) represents the feature matrix of the aggregate space;
[0069] Finally, after aggregating the channel information, channel adjustment is performed by reducing the number of channels using a standard convolutional layer, expressed as:
[0070] X S =X C W θ A(X C )
[0071] In the formula, W θ X represents the convolution kernel weight parameters. S This represents the spatial attention feature matrix after adjusting the number of channels;
[0072] For feature map X S Three sets of convolution operations are performed respectively. The convolutional feature descriptors are then scaled. By multiplying the scaled feature descriptors element by element and using Softmax to calculate temporal correlation, the temporal correlation feature matrix is obtained, expressed as:
[0073] A T1 (X S ) = View(W φ X S )
[0074] AT2 (X S ) = View(W φ X S )
[0075] A T3 (X S ) = View(W φ X S )
[0076] X T ={View[A T1 (X S A T2 (X S )]}A T3 (X S )
[0077] In the formula, A T1 (X S A) T2 (X S A) T3 (X S W represents the feature descriptor after convolution. φ For different convolution kernel weight parameters, X T Represents the time-related feature matrix;
[0078] Step 5: Obtain the fused spatial, temporal, and channel attention map through the spatial, temporal, and channel attention modules, and then restore the initial dimension X through convolutional kernels. A The resulting attention feature map is fused with the input feature map to obtain the final output feature map Y∈R. B×T×C×H×W The expression is:
[0079]
[0080] Y = X A +X
[0081] Step 6: Next, transform the dimensions, converting them into three dimensions: (batchsize, timestep, and channel*). The transformed features are Z∈R. B×T×C Subsequently, a BiLSTM is connected. The BiLSTM learns the temporal features of abnormal security behavior. This module captures the correlation temporal features between frames of abnormal security videos and normal activity videos. The BiLSTM is a bidirectional LSTM; its first layer is called the forget gate layer, and its expression is:
[0082] f(t)=σ(Wfh t-1 +Ufx t +bf)
[0083] After the forget gate, the input gate layer is entered, and the memory state data is retrained into new features, expressed as:
[0084] i(t)=σ(W i h t-1 +U i x i +b i )
[0085] The expression for the output gate o(t) is:
[0086] a(t) = tanh(W) a h t-1 +U a x t +b a )
[0087] o(t)=σ(W o h t-1 +U o x t +b o )
[0088]
[0089]
[0090] In the formula, tanh is the tangent hyperbolic function, and σ is the activation function Sigmoid;
[0091] The calculation results of the forget gate and the input gate constitute the state at time t, expressed as:
[0092] c(t)=c(t-1)⊙f(t)+i(t)⊙a(t)
[0093] In the formula, ⊙ represents the Hadamard product, and the hidden layer state at time t is derived from the output gate and the current state, expressed as:
[0094] h(t)=o(t)⊙tanh(c(t))
[0095] Step 7: Set the learning rate l from 0.0005 to 0.001 and update the model parameters;
[0096] Step 8: Repeat steps 3-7 continuously and use the optimizer (Adam) to optimize until the model converges, thus obtaining a security abnormal behavior detection model that integrates multiple attention mechanisms.
[0097] According to the applicant's experimental results, the obtained security anomaly detection model that integrates multiple attention mechanisms can be used for security anomaly detection of input target images.
[0098] In specific applications, an electronic device is used, comprising: a memory and a processor. The memory stores execution instructions, and the processor executes the execution instructions stored in the memory, causing the processor to perform the aforementioned method for establishing a security anomaly detection model that integrates multiple attention mechanisms; or:
[0099] A readable storage medium is used to store execution instructions, which, when executed by a processor, are used to implement the above-mentioned method for establishing a security abnormal behavior detection model that integrates multiple attention mechanisms.
[0100] The following are specific embodiments provided by the inventor.
[0101] Before training the model, training sample data needs to be prepared in advance. The training sample data should contain labels for both abnormal security behaviors and normal activity behaviors. In this embodiment, two public datasets, Hockey Fight and Violent Flows, are used. The Hockey Fight dataset consists of 1000 videos, with abnormal security behavior and normal activity behavior segments each accounting for half of the total number of videos, i.e., 500 videos of abnormal security behavior and 500 videos of normal activity behavior. Each video lasts approximately 2 seconds and contains about 41 frames. The Violent Flows dataset has more complex scenes and contains 246 videos, including 123 video segments of abnormal security behavior and 123 video segments of normal activity behavior. Each segment lasts approximately 3-5 seconds and contains about 60-70 frames. Both datasets are divided into five subsets for training.
[0102] First, a training round is conducted. The training images are labeled images of security anomalies and normal activities. Before training the model, the model parameters trained on the ImageNet dataset are pre-loaded. One subset is selected as the test set, and the remaining four subsets are used as the training set for one of the experiments in the five-fold cross-validation. Then, the behavior images from the four subsets of the five subsets are used to train the model, resulting in the trained model.
[0103] Then, five rounds of cross-training were performed on four subsets in sequence. The images used for training were labeled images of abnormal security behavior and normal activity behavior, and features were extracted from them. The Adam optimizer was used for optimization until the model converged.
[0104] like Figure 1 As shown, the security abnormal behavior detection model that integrates multiple attention mechanisms constructed in this embodiment consists of the following three parts in its network structure:
[0105] The network structure consists of three modules: the EfficientNet-b1 backbone network module, the multi-attention mechanism module, and the BiLSTM correlation temporal feature extraction module that integrates RGB and optical flow feature inputs.
[0106] First, data augmentation is performed on the input video to improve the quality and robustness of the video image. Then, the optical flow of the video is extracted and concatenated with the RGB stream to form an input form in which the first part is the RGB stream and the second part is the optical flow. Finally, it is input into the feature extraction module in the network model to obtain feature information.
[0107] The EfficientNet-b1 backbone network module is used to extract frame-level features of abnormal behavior from security surveillance videos. To extract richer feature information, a multi-attention module is designed and introduced into the network model to obtain effective channel, spatial, and temporal features. RGB and optical flow features are fused and input into a BiLSTM for temporal processing of the security surveillance video. This module captures the temporal correlation features between frames in security anomaly videos and normal activity videos, and a Softmax classifier is used to detect abnormal security behavior under surveillance.
[0108] A schematic diagram of the structure of the multi-attention mechanism is shown below. Figure 2 As shown.
[0109] In this embodiment, the output and input of the multi-attention mechanism have the same size, allowing it to be incorporated into the backbone network at any location and significantly improving its performance. The multi-attention mechanism comprises the following parts:
[0110] 1. Channel attention branch: A method to compress the spatial dimension of the input feature map is employed. Average pooling and max pooling are used to compress the space, and the pooled feature descriptors are then fused into the input map to obtain the channel attention map. The expression is:
[0111]
[0112] In the formula, X represents the weights of the fully connected layer. C This represents the channel attention feature map.
[0113] 2. Spatial attention branch: Average pooling and max pooling are performed along the feature channel direction. Frame-level feature information is aggregated through pooling operations, represented as:
[0114] A(X C =Avgpool(X) C )+Maxpool(X C )
[0115] In the formula, A(X) C) represents the feature matrix of the aggregate space.
[0116] Finally, after aggregating the channel information, channel adjustment is performed by reducing the number of channels using a standard convolutional layer, expressed as:
[0117] X S =X C W θ A(X C )
[0118] In the formula, W θ X represents the convolution kernel weight parameters. S This represents the spatial attention feature matrix after adjusting the number of channels.
[0119] 3. Temporal attention branch, for feature map X S Three sets of convolution operations are performed respectively. The convolutional feature descriptors are then scaled. By multiplying the scaled feature descriptors element by element and using Softmax to calculate temporal correlation, the temporal correlation feature matrix is obtained, expressed as:
[0120] A T1 (X S ) = View(W φ X S )
[0121] A T2 (X S ) = View(W φ X S )
[0122] A T3 (X S ) = View(W φ X S )
[0123] X T ={View[A T1 (X S A T2 (X S )]}A T3 (X S )
[0124] In the formula, A T1 (X S A) T2 (X S A) T3 (X S W represents the feature descriptor after convolution. φ For different convolution kernel weight parameters, X T Represents the time-related feature matrix;
[0125] The spatial, temporal, and channel attention modules are used to obtain a fused spatial, temporal, and channel attention map. Then, a convolutional kernel is used to restore the initial dimension to obtain X. A The resulting attention feature map is fused with the input feature map to obtain the final output feature map Y∈R. B ×T×C×H×W The expression is:
[0126]
[0127] Y = X A +X
[0128] The applicant conducted an experiment to detect abnormal security behaviors in input target images using the obtained multi-attention mechanism-integrated security anomaly detection model. The datasets used in the experiment were Hockey Fight and VioletFlows. The experimental results of the proposed multi-attention mechanism-integrated method compared with existing methods are shown in Tables 1 and 2.
[0129] The metrics used were accuracy and the area under the Roc curve (Auc). Accuracy is mathematically expressed as the sum of true positives (TP) and true negatives (TN) divided by the sum of true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN). In this experiment, TP refers to the total number of correctly identified abnormal videos; FP is the total number of videos that were misclassified as abnormal but were actually normal; TN is the total number of correctly identified normal videos; and FN is the total number of abnormal videos that were misclassified as normal. The formula for accuracy is:
[0130]
[0131] Auc is used to evaluate the model's ability to distinguish between abnormal and normal security behavior. The Roc curve is plotted using the true positive rate (TPR) and false positive rate (FPR). The formulas for calculating TPR and FPR are as follows:
[0132]
[0133]
[0134] Table 1: Comparison of detection results in the Hockey Fight dataset
[0135]
[0136] Table 2: Comparison of detection results on the Violent Flows dataset
[0137]
[0138] 。
Claims
1. A method for establishing a security anomaly behavior detection model that integrates multiple attention mechanisms, characterized in that, Includes the following steps: Step 1: Load the model parameters trained on the ImageNet dataset; Step 2: Input the source domain dataset with real labels to train the network and obtain the trained source domain model, using image samples as behavioral images; Step 3: Input the target domain dataset without labels For each target domain training sample Data augmentation was performed, including HSV augmentation, random value augmentation and attenuation, and histogram equalization. Salt-and-pepper noise was then incorporated into the data-augmented samples. After passing through the optical flow extraction module, the input consists of a concatenated RGB stream and an optical flow stream. This concatenated input is then fed into the network model, passing through the CBS Block and MBConv Block modules of the EfficientNet-b1 backbone network to obtain the anomalous behavior frame-level features X∈R. B×T×C×H×W ; Step 4: Frame-level feature map X∈R B×T×C×H×W Convolution and pooling operations are performed in the channel, spatial, and temporal dimensions, respectively. For channel attention, a method to compress the spatial dimension of the input feature map is adopted. Average pooling and max pooling are used to compress the space, and the pooled feature descriptors are then fused and incorporated into the input map to obtain the channel attention map, expressed as: In the formula, X represents the weights of the fully connected layer. C Represents the channel attention feature map; Next, average pooling and max pooling are performed along the feature channel direction. The frame-level feature information is aggregated through pooling operations, as shown below: A(X C )=Avgpool(X C )+Maxpool(X C ) In the formula, A(X) C ) represents the feature matrix of the aggregate space; Finally, after aggregating the channel information, channel adjustment is performed by reducing the number of channels using a standard convolutional layer, expressed as: X S =X C W θ A(X C ) In the formula, W θ X represents the convolution kernel weight parameters. S This represents the spatial attention feature matrix after adjusting the number of channels; For feature map X S Three sets of convolution operations are performed respectively. The convolutional feature descriptors are then scaled. By multiplying the scaled feature descriptors element by element and using Softmax to calculate temporal correlation, the temporal correlation feature matrix is obtained, expressed as: A T1 (X S )=View(W φ X S ) A T2 (X S )=View(W φ X S ) A T3 (X S )=View(W φ X S ) X T ={View[A T1 (X S )A T2 (X S )]}A T3 (X S ) In the formula, A T1 (X S A) T2 (X S A) T3 (X S W represents the feature descriptor after convolution. φ For different convolution kernel weight parameters, X T Represents the time-related feature matrix; Step 5: Obtain the fused spatial, temporal, and channel attention map through the spatial, temporal, and channel attention modules, and then restore the initial dimension X through convolutional kernels. A The resulting attention feature map is fused with the input feature map to obtain the final output feature map Y∈R. B×T×C×H×W The expression is: Y=X A +X Step 6: Next, transform the dimensions to three dimensions, resulting in the transformed feature Z∈R. B×T×C Subsequently, a BiLSTM is connected. The BiLSTM learns the temporal features of abnormal security behavior. This module captures the temporal correlation features between frames of abnormal security videos and normal activity videos. The BiLSTM is a bidirectional LSTM; its first layer is called the forget gate layer, and its expression is: f(t)=σ(Wfh t-1 +Ufx t +bf) After the forget gate, the input gate layer is entered, and the memory state data is retrained into new features, expressed as: i(t)=σ(W i h t-1 +U i x i +b i ) The expression for the output gate o(t) is: a(t)=tanh(W a h t-1 +U a x t +b a ) o(t)=σ(W o h t-1 +U o x t +b o ) In the formula, tanh is the tangent hyperbolic function, and σ is the activation function Sigmoid; The calculation results of the forget gate and the input gate constitute the state at time t, expressed as: c(t)=c(t-1)⊙f(t)+i(t)⊙a(t) In the formula, ⊙ represents the Hadamard product, and the hidden layer state at time t is derived from the output gate and the current state, expressed as: h(r)=o(t)⊙tanh(c(t)) Step 7: Set the learning rate l from 0.0005 to 0.001 and update the model parameters; Step 8: Repeat steps 3-7 continuously and use the optimizer to optimize until the model converges, thus obtaining a security abnormal behavior detection model that integrates multiple attention mechanisms.
2. The method as described in claim 1, characterized in that, In step 6, the three dimensions are batchsize, timestep, and channel*.
3. The method as described in claim 1, characterized in that, In step 7, the learning rate l is set to 0.0005.
4. The method as described in claim 1, characterized in that, In step 8, the optimizer is set to Adam.
5. The method for establishing a security abnormal behavior detection model that integrates multiple attention mechanisms as described in any one of claims 1 to 4, wherein the obtained security abnormal behavior detection model that integrates multiple attention mechanisms is used for security abnormal behavior detection of input target images.
6. The application as described in claim 5, characterized in that: An electronic device is employed, comprising: a memory and a processor, wherein the memory stores execution instructions, and the processor executes the execution instructions stored in the memory, causing the processor to perform the method for establishing a security anomaly behavior detection model incorporating a multi-attention mechanism as described in any one of claims 1 to 4; or: A readable storage medium is used, wherein execution instructions are stored in the readable storage medium, and when the execution instructions are executed by a processor, they are used to implement the method for establishing a security abnormal behavior detection model that integrates a multi-attention mechanism as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Behavior recognition method based on space-time attention enhancement feature fusion network
CN111709304A
Action recognition method based on double-flow convolution attention
CN112926396A
