A perimeter security disturbance recognition algorithm based on GAF-ConvNeXt-TF
By using a perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF and an optimized ConvNeXt network structure through Gram corner field transformation and transfer learning, the accuracy and adaptability problems of traditional perimeter security systems in disturbance identification are solved, achieving high-accuracy disturbance identification. This algorithm is suitable for perimeter security applications of distributed fiber optic sensing systems.
Patent Information
- Application Number
- CN202211160053.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-22
AI Technical Summary
Traditional perimeter security systems suffer from low accuracy in disturbance identification and poor adaptability to different disturbance signals. Existing classification and identification technologies are insufficient to meet practical needs.
A perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF is adopted. The ConvNeXt convolutional neural network structure is combined with the swin-transform training method, the module ratio of the ResNet50 network structure is adjusted, and the Gram angle field is used to transform the one-dimensional time series signal into a two-dimensional time series graph. The learning rate is optimized by combining the AdamW optimizer and cosine annealing algorithm, and transfer learning is introduced to improve the model training efficiency and accuracy.
It significantly improves the accuracy of disturbance identification. After using transfer learning, the model achieved an accuracy of 99.26%, which is significantly better than traditional methods and is suitable for the application of distributed fiber optic sensing systems in the field of perimeter security.
Smart Images

Figure CN115496100B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a disturbance identification technology of a distributed optical fiber vibration sensing system in perimeter security, in particular to a perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF. BACKGROUND
[0002] Nowadays, distributed optical fiber sensing technology has been paid more and more attention due to its long detection range, anti-interference, high sensitivity, low price and other advantages, so it has developed rapidly in recent years and has been widely used in various fields of life, such as rail transit, structural health monitoring and perimeter security, especially in the field of perimeter security. The traditional perimeter security system often has the disadvantages of easy corrosion, poor anti-interference ability, high maintenance cost and so on. The early technology can only detect the disturbance position, which obviously cannot meet the current demand. With the increasing demand of practical application, the field of optical fiber intrusion detection puts forward higher requirements for the positioning and identification of events, which is manifested as the accurate classification of intrusion events. The development of distributed optical fiber sensing technology provides a new solution for the field of perimeter security. Therefore, the combination of distributed optical fiber acoustic sensing technology and pattern recognition technology is currently a hot research.
[0003] Traditional classification and recognition technology mainly focuses on time-frequency-based analysis methods, such as drawing a macroscopic envelope with a short-time maximum frequency as a feature, and classifying signals according to the similarity of the envelope. Although this method simplifies the identification process and improves the calculation speed, it is easy to confuse the recognition when the difference between signal envelopes is not obvious. After that, a high-precision classification method based on the combination of empirical mode decomposition (EMD) and radial basis function (RBF) neural network appeared. This method uses the energy ratio of the intrinsic mode function (IMF) obtained by EMD decomposition as the basis for classification tasks, but the EMD method has the problem of modal mixing for discontinuous signals, which seriously affects the accuracy. Therefore, the classification accuracy of traditional methods cannot meet the actual demand.
[0004] In recent years, deep learning has made great achievements in pattern recognition. Especially the convolutional neural network has great advantages in image pattern feature extraction. Therefore, the method of converting one-dimensional signals into two-dimensional images and using CNN network for intrusion signal pattern recognition has become a new idea. Through convolutional neural network, deeper signal features can be extracted, which will greatly improve the recognition accuracy. SUMMARY
[0005] The purpose of the present application is to provide a GAF-ConvNeXt-TF-based perimeter security disturbance recognition algorithm, which adopts a ConvNeXt convolutional neural network structure, combines a swin-transform training method, adjusts the proportion of each module of a resnet50 network structure, and generates a new network structure for the application of distributed optical fibers in the field of perimeter security, thereby accurately recognizing external disturbance behaviors and solving the problems of low accuracy and poor adaptability to different disturbance signals in traditional recognition methods.
[0006] The purpose of the present application is achieved. A GAF-ConvNeXt-TF-based perimeter security disturbance recognition algorithm has the following steps:
[0007] Step one, data preprocessing of the disturbance signal, baseline removal and denoising preprocessing of one-dimensional time series signals generated by various disturbance behaviors;
[0008] Step two, based on the principle of Gram angle field, the preprocessed one-dimensional time series signal is converted into a two-dimensional time series graph, and a total data set is made according to the type of disturbance; then the total data set is divided into a training set, a validation set and a test set according to the ratio of 3:1:1;
[0009] Step three, establishing a ConvNeXt model, including a ConvNeXt Block, a Downsample, a global average pooling layer, a fully connected layer and an output layer;
[0010] Step four, using the AdamW optimizer combined with the cosine annealing algorithm to optimize the learning rate, using the fine-tuning method in transfer learning, first training a larger source data set on the model to obtain pre-trained weights, and then loading the pre-trained weights into the ConvNeXt model to prepare for training the target data set;
[0011] Step five, importing the training set in step two into the ConvNeXt model for training, introducing a cross-entropy loss function (CrossEntropyLoss) in the training process to calculate the difference between the target and the predicted value, and adjusting the training parameters using the validation set to obtain the training weight file;
[0012] Step six, using the test set in step two to test the accuracy of the model classification and recognition.
[0013] Further, the specific steps of converting the one-dimensional time series signal into a two-dimensional time series graph are as follows:
[0014] 1) Normalizing the preprocessed one-dimensional time series signal data;
[0015] 2) Convert the normalized time series data into polar coordinate form data;
[0016] 3) Convert the time series data in polar form to a two-dimensional image that preserves the time characteristics based on the principle of Gram angle field.
[0017] Further, the normalization processing operation is as follows:
[0018]
[0019] Wherein is the numerical scaling one-dimensional time series signal at the i-th moment, x i is the signal value at the i-th moment in the one-dimensional time series signal, Max(X) is the maximum value in the one-dimensional time series signal, and Min(X) is the minimum value in the one-dimensional time series signal.
[0020] Further, the conversion operation of the polar form data is as follows:
[0021]
[0022] In the formula, σ i is the polar angle at the i-th moment in the polar coordinate system; r i is the polar radius at the i-th moment in the polar coordinate system; is the normalized signal sequence, N is the total number of time stamps; t i is the time stamp corresponding to the i-th moment.
[0023] Further, the encoding of the Gram angle field adopts the GASF image encoding method, and the conversion method is specifically divided into two kinds, namely Gram sum field (GASF) and Gram difference field (GADF); the specific operation is as follows:
[0024] The specific conversion formula of GASF is as follows:
[0025]
[0026] The specific conversion formula of GADF is as follows:
[0027]
[0028] In the formula, I = [1, 1, … 1] is a unit row vector, and are respectively and the transpose vector of
[0029] Further, the composition process of the ConvNeXtBlock is as follows: first, a deep convolution module is passed, in which the convolution kernel size is 7x7, the stride is 1, and Layer Normalization is performed; then an inverse residual structure is introduced, in which a 1x1 convolution kernel is used to increase the dimension, a GELU activation function is added, and then a 1x1 convolution kernel is used to reduce the dimension; then a learnable vector gama is introduced, and layer scale is used to scale each channel data of the feature map with scaling ratio gama; finally, a Dropout layer is introduced to randomly inactivate part of the neurons, and is set to 0.2; Downsample first passes through a Layer Normalization, and then a convolution kernel with a size of 2x2 is used with a stride of 2.
[0030] Further, the formula of the GELU activation function is:
[0031] GeLu(X) = x x p(X≤x) = x x φ(x), x ~ N(0, 1)
[0032] where x is the input value, X is a Gaussian random variable with zero mean and unit variance, and p(X≤x) is the probability that X is less than or equal to a given value x;
[0033] Its approximate calculation formula is:
[0034]
[0035] Further, the cosine annealing algorithm is represented as follows:
[0036]
[0037] where ηt is the learning rate value increased at the current t time, ηmin is the set minimum learning rate, ηmax is the set maximum learning rate, T is the current training Epoch number, T is the set maximum Epoch number. t Min Max cur Max
[0038] Further, the training process of step five is as follows: first, image preprocessing is performed on the training set and validation set, including random cropping, random horizontal flipping, conversion to Tensor format and standardization processing; in the process of training, a cross entropy loss function (CrossEntropyLoss) is introduced to calculate the difference between the target and the predicted value; the training parameters are set as follows: the two hyperparameters β1 and β2 of the AdamW optimizer are determined as 0.9 and 0.999 respectively, the batch size is set to 32, and 100 Epochs are trained; the highest learning rate is set to 0.0005; in order to prevent overfitting during training, the learning rate is first raised to the maximum value by using the Warmup method, and then the learning rate decay method is used in the form of 1 / 4 period of the cosine function, starting from the set maximum value.
[0039] Further, the AdamW optimizer is:
[0040] m t = β1 * m t-1 + (1 - β1) * g t
[0041] v t = β2 * v t-1 + (1 - β2) * g t 2
[0042]
[0043]
[0044]
[0045] wherein β1 and β2 are two hyperparameters representing the exponential decay rate of the first and second moment estimates of the gradient, respectively, which serves to allocate weights and affect the gradient square; g t represents the gradient at time step t; m t and v t are the first and second moment estimates of the gradient, respectively; t represents the time step; and are the bias correction results of m t and v t , respectively; θ t represents the value of the optimizer output parameter at time t; λ is the weight decay factor; η t represents the learning rate; and ε represents a very small number to prevent the denominator from being zero.
[0046] The application applies machine learning methods to perimeter security field through the conversion of time sequence signal dimension, and can enable the model to better learn the information of time dimension due to the time correlation of Gram angle field; the use of transfer learning can load pre-training weights to greatly reduce the training parameters, accelerate the model training convergence speed, and improve the accuracy of disturbance recognition results. An effective algorithm is provided for the disturbance recognition field of the distributed optical fiber sensing system in perimeter security. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 is a processing method flowchart of the application;
[0048] Figure 2 is a ConvNeXt model structure diagram in the embodiment of the application;
[0049] Figure 3 is a flowchart for converting a one-dimensional time sequence diagram into a two-dimensional time sequence diagram in the embodiment of the application;
[0050] Figure 4a is a time sequence diagram and a corresponding Gram angle field diagram of the "impact" disturbance mode in the embodiment of the application;
[0051] Figure 4b is a time sequence diagram and a corresponding Gram angle field diagram of the "kick" disturbance mode in the embodiment of the application;
[0052] Figure 4c is a time sequence diagram and a corresponding Gram angle field diagram of the "knock" disturbance mode in the embodiment of the application;
[0053] Figure 4d is a time sequence diagram and a corresponding Gram angle field diagram of the "rolling" disturbance mode in the embodiment of the application;
[0054] Figure 4e is a time sequence diagram and a corresponding Gram angle field diagram of the "shaking" disturbance mode in the embodiment of the application;
[0055] Figure 4f is a time sequence diagram and a corresponding Gram angle field diagram of the "tread" disturbance mode in the embodiment of the application;
[0056] Figure 5 is a learning rate decay curve diagram of the application of the cosine annealing algorithm in the embodiment of the application;
[0057] Figure 6a is a training set accuracy change curve diagram of whether to use transfer learning to optimize the model in the embodiment of the application;
[0058] Figure 6b is a training set loss change curve diagram of whether to use transfer learning to optimize the model in the embodiment of the application;
[0059] Figure 6c is the validation set accuracy change curve diagram of whether to use transfer learning to optimize the model in the embodiment of the application;
[0060] Figure 6d is the validation set loss change curve diagram of whether to use transfer learning to optimize the model in the embodiment of the application;
[0061] Figure 7 is the confusion matrix diagram obtained by using the trained ConvNeXt network model to perform perturbation recognition on the data in the test set and without using transfer learning in the embodiment of the application;
[0062] Figure 8 is the confusion matrix diagram obtained by using the trained ConvNeXt network model to perform perturbation recognition on the data in the test set and using transfer learning in the embodiment of the application. DETAILED DESCRIPTION
[0063] The application will be further described below in combination with the drawings and embodiments.
[0064] A perimeter security perturbation recognition algorithm based on GAF-ConvNeXt-TF, the specific implementation needs the following steps (see Figure 1 and Figure 2 ):
[0065] Step one, obtain various perturbation signals 101, and perform data preprocessing on the collected perturbation signals, and perform baseline removal, denoising and other preprocessing on the one-dimensional time series signals generated by various perturbation behaviors 102. Wavelet decomposition is used for denoising and baseline removal, db5 wavelet basis is selected as the basis function, and wavelet transform is used to decompose the original signal into two sub-signals, called approximation and detail coefficients. The approximation coefficient and the detail coefficient correspond to the low-frequency component and the high-frequency component of the signal, respectively. Then, only the approximation coefficient is decomposed again, and then the approximation coefficient is decomposed, until the requirement is met. Then, according to the research needs, the wavelet coefficients of the real signal are retained, and finally the signal is reconstructed, that is, the purpose of denoising and baseline removal is achieved.
[0066] Step two, convert the preprocessed one-dimensional time series signal into a two-dimensional time series diagram based on the principle of Gram angle field 103, and the result is shown in Figure 3 The specific implementation steps are as follows:
[0067] (1) The preprocessed signal data is normalized, and the data range is scaled to [-1, 1], and the specific implementation formula is as follows:
[0068]
[0069] wherein X(i) is the value of the one-dimensional time series signal at the i-th time point i X(i) is the value of the one-dimensional time series signal at the i-th time point Max(X) is the maximum value of the one-dimensional time series signal, and Min(X) is the minimum value of the one-dimensional time series signal.
[0070] (2) Convert the normalized sequence data into polar coordinate form data, that is, treat the value as the cosine value of the included angle, and treat the timestamp as the radius. The specific implementation formula is as follows:
[0071]
[0072] In the formula, σ i is the polar angle of the i-th time point in the polar coordinate system; r i is the polar radius of the i-th time point in the polar coordinate system. is the normalized signal sequence, and N is the total number of timestamps; t i is the timestamp corresponding to the i-th time point. Obviously, using the polar coordinate method to represent the time series makes it easier to analyze the data. As time increases, its value changes between different angle points on the span circle. The encoding mapping of the above formula has two important properties. First: it is a bidirectional mapping because when σ i ∈[0, π], cos(σ i ) is a monotonic function, that is, for any given one-dimensional time series sequence, its mapping in the polar coordinate system will produce a unique result, and it has a unique inverse mapping; second: the polar coordinate system preserves the absolute time sequence relationship.
[0073] (3) Convert the polar coordinate form time series data into a two-dimensional image that preserves the time characteristics based on the principle of Gram angle field, and then identify the time correlation of different time points by considering the angle and / or difference between different points. Depending on whether to do angle sum or angle difference, there are two implementation methods: GASF (Gram Sum Field), GADF (Gram Difference Field).
[0074] The specific conversion formula of GASF is as follows:
[0075]
[0076] The specific conversion formula of GADF is as follows:
[0077]
[0078] In the formula, I = [1, 1, … 1] is a unit row vector, and are the transpose vectors of and respectively.
[0079] The application adopts a two-dimensional picture generated based on the GASF principle as a data set, and makes a total data set according to the types of disturbances. The total disturbances include six types of "impact", "kick", "knock", "roll", "shake" and "stomp". The six disturbance types are preprocessed and corresponding GASF pictures (as shown in Figures 4a to 4f ) are generated. Then the total set is divided into a training set, a validation set and a test set according to a ratio of 3:1:1.
[0080] Step three, a ConvNeXt model 104 is built, and the model structure is as shown in Figure 2 , which mainly includes a ConvNeXtBlock, a Downsample, a global average pooling layer, a full connection layer and an output layer.
[0081] The specific process is as follows. The input picture is first subjected to a convolution operation with a convolution kernel size of 4x4 and a step size of 4, and then subjected to layer normalization processing, and then subjected to ConvNeXt Blocks with different dimensions in sequence, and the number ratio of different dimension modules is 1:1:3:1, and Downsample modules are arranged between them. After a series of convolution operations, the dimension is adjusted through the global average pooling layer, and finally the full connection layer and the output layer are used to output the disturbance categories.
[0082] The ConvNeXt Block is composed of the following, which is first subjected to a deep convolution module (convolution kernel size of 7x7 and step size of 1), then subjected to Layer Normalization, and then introduced into the inverse residual structure (first using a 1x1 convolution kernel to upgrade the dimension, adding a GELU activation function, and then using a 1x1 convolution kernel to downgrade the dimension). Then a learnable vector gama is introduced, and layerscale is used to scale the data of each channel of the feature map with a scaling ratio gama. Finally, a Dropout layer is introduced to randomly inactivate part of the neurons, and the inactivation rate is set to 0.2. The Downsample mainly first passes through a Layer Normalization, and then passes through a convolution kernel with a size of 2x2 and a step size of 2.
[0083] The calculation formula of the GELU activation function used is:
[0084] GeLu(X) = x * p(X <= x) = x * phi(x), x ~ N(0, 1)
[0085] Where x is the input value, X is a Gaussian random variable with zero mean and unit variance, and p(X <= x) is the probability that X is less than or equal to a given value x;
[0086] Its approximate calculation formula is:
[0087]
[0088] Step four, using AdamW optimizer combined with cosine annealing algorithm to optimize learning rate, using the method of fine-tuning in transfer learning, first using a larger source dataset to train the model to obtain pre-training weight 105, and then load the pre-training weight into the ConvNeXt model to prepare for training the target dataset. In order to make the improvement of transfer learning more obvious, only the number of nodes of the output layer (corresponding to the number of categories of disturbance recognition) is changed, and all the nodes of each layer structure participate in training. Because of the effect of pre-training weight, the model can extract more feature information and has smaller bias at the beginning of training. The accuracy has a very high starting point at the beginning.
[0089] The formula of AdamW optimizer is as follows:
[0090] m t = β1*m t-1 + (1-β1)*g t
[0091] v t = β2*v t-1 + (1-β2)*g t 2
[0092]
[0093]
[0094]
[0095] Wherein, β1 and β2 are two hyperparameters, which are the exponential decay rate of the first moment estimate and the second moment estimate of gradient, respectively. Its role is the distribution of weight and the influence of gradient square; g t represents the gradient of step t; m t and v t are the first moment estimate and the second moment estimate of the gradient, respectively; t represents the time step; and are the bias correction results of m t and v t , respectively; θ t represents the value of the optimizer output parameter at time t; λ is the weight decay factor; η t represents the learning rate; ε represents a very small number to prevent the denominator from being zero.
[0096] The formula of cosine annealing algorithm is as follows:
[0097]
[0098] In the formula, ηt is the current t time increased learning rate value, η Min is the minimum learning rate set, η Max is the maximum learning rate set, T cur is the current training Epoch number, T Max is the maximum Epoch number set.
[0099] Step five, the training set in step two is imported into the model for training, and the training parameters are adjusted using the validation set, so as to obtain the training weight file. In order to increase the randomness of the sample, first, the training set and the validation set are preprocessed, such as random cropping, random horizontal flipping, conversion to Tensor format, and finally standardization processing. The size of the two-dimensional GAF graph converted from one-dimensional time series data is 1999x1999, and after processing, the image size becomes 224x224. The processed image is input into the model for training. In the process of training, the cross entropy loss function (CrossEntropyLoss) is introduced to calculate the difference between the target and the predicted value.
[0100] The training parameters are set as follows: the two hyperparameters β1 and β2 of the AdamW optimizer are determined as 0.9 and 0.999 respectively, the batch size is set to 32, and 100 Epochs are trained. The highest learning rate is set to 0.0005. In order to prevent overfitting phenomenon during training, the Warmup method is used for preheating, so that the learning rate rises to the maximum value, and then the learning rate decay method is used according to the 1 / 4 period of the cosine function, starting from the maximum value set. After using the cosine annealing algorithm, the learning rate decay curve is as shown in Figure 5 The entire training is forward propagated, and then the training parameters are backward propagated to each node to continuously adjust the weight parameters of each process.
[0101] In order to evaluate the excellent performance of the model in training, the cross entropy loss function (CrossEntropyLoss) is introduced to calculate the difference between the target and the predicted value.
[0102] The operation result of CrossEntropyLoss is equivalent to the result obtained by combining Softmax-log-NLLLoss.
[0103] (1) The Softmax function, also known as the normalized exponential function, is used in the process of multi-classification. It maps the output of multiple neurons to the (0, 1) interval, and the sum of all probabilities will be equal to 1.
[0104]
[0105] In the formula, N represents the number of categories; xi This represents the score of the i-th category output from the last layer of the model.
[0106] (2) Then take the log of the result after Softmax, which is the LogSoftmax operation. The purpose is that the stability of the numerical calculation using the SoftMax function is not high, and it may also report NaN errors. Therefore, a possible alternative is to use LogSoftMax (and then calculate exp), which has better numerical stability than Softmax, while ensuring the monotonicity of the function:
[0107]
[0108] (3) The output of the NLLLoss function is the value corresponding to the label in the above logarithm output, the negative sign is removed, and then the average is calculated. The NLLLoss function expression is as follows:
[0109] f(x, class) = -x[class]
[0110] In the formula, x represents the value after LogSoftMax calculation; class represents the actual category.
[0111] The cross-entropy formula is:
[0112]
[0113] Where p k The value corresponding to the k-th neuron is represented by q in one-hot form in the formula; k This is the predicted value corresponding to the k-th neuron, which is the result after applying the Softmax function. And p... k Since the elements are either 0 or 1, and it involves multiplication, it's natural that if we know the index corresponding to 1, we don't need to perform other meaningless calculations. Therefore, the formula for cross-entropy (where m represents the true class) can be transformed into:
[0114]
[0115] Therefore, the formula for the CrossEntropyLoss function is:
[0116]
[0117] The performance of the model is evaluated by accuracy and loss function. During training, the changes in accuracy and loss between the training and validation sets are as follows: Figures 6a to 6d As shown, it is clear that after using transfer learning, the model's convergence speed is significantly faster, and it has higher accuracy and lower training loss.
[0118] Step six, test the accuracy of model classification recognition using the test set divided in step two 106. Draw the confusion matrix (as shown in Figure 7 Figure 8 The network model draws the confusion matrix for the prediction of the disturbance signal, and compares the confusion matrix accordingly to judge the classification recognition performance of the model. Obviously, in the case of not using transfer learning, the overall average recognition accuracy of the model is 98.33%, and using transfer learning to train the network, the final recognition accuracy reaches 99.26%, obviously the accuracy is further improved, which shows that the method of training the model by using transfer learning can learn deeper features and has better ability, and the recognition ability far exceeds the traditional classification and recognition method based on time-frequency analysis, and is more suitable for application in the field of perimeter security of distributed optical fiber sensing system.
[0119] The application converts the one-dimensional time sequence signal obtained after preprocessing into a two-dimensional time sequence graph based on the principle of Gram angle field, and compared with traditional time-frequency analysis, the time correlation of Gram angle field (GAF) can enable the model to better learn the information in the time dimension, thereby facilitating the model to extract the features of the two-dimensional time sequence vector, and further improving the accuracy of the disturbance signal recognition result. Compared with ordinary deep learning methods, the latest ConvNeXt convolutional neural network model is adopted, and the AdamW optimizer is combined with the cosine annealing algorithm to optimize the parameter learning rate to prevent overfitting phenomenon, and then the transfer learning method is used to optimize the model, accelerate the convergence speed of model training and reduce the training loss, and more importantly, further improve the classification accuracy. In the application of distributed optical fiber perimeter security disturbance recognition, the characteristics of the signal itself are fully tapped, and the generalization ability and prediction accuracy of the disturbance recognition are finally improved.
[0120] By using the transfer learning (TF) method to optimize the model, the convergence speed of model training can be further accelerated, the classification accuracy can be improved, and the training loss can be reduced. Therefore, compared with traditional classification algorithms, the perimeter security disturbance recognition algorithm based on GAF-ConvNeXt-TF can perform better in specific classification tasks, and is more suitable for practical applications.
Claims
1. A perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF, characterized in that, The steps are as follows: Step 1: Perform data preprocessing on the disturbance signals, and perform baseline removal and noise reduction preprocessing on the one-dimensional time series signals generated by various disturbance behaviors respectively; Step 2: Based on the principle of Gram angle field, the preprocessed one-dimensional time series signal is transformed into a two-dimensional time series diagram, and a data set is created according to the type of disturbance. The dataset is then divided into training, validation, and test sets in a 3:1:1 ratio. Step 3: Build the ConvNeXt model, including ConvNeXt Block, Downsample, global average pooling layer, fully connected layer and output layer; Step 4: Optimize the learning rate using the AdamW optimizer combined with the cosine annealing algorithm. Utilize the fine-tuning method in transfer learning, first train the model on a larger source dataset to obtain pre-trained weights, and then load the pre-trained weights into the ConvNeXt model to prepare for training on your target dataset. Step 5: Import the training set from Step 2 into the ConvNeXt model for training. During the training process, introduce the cross-entropy loss function to calculate the difference between the target and the predicted value, and use the validation set to adjust the training parameters to obtain the training weight file. Step 6: Use the test set from Step 2 to test the accuracy of the model's classification and recognition.
2. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1, characterized in that, The specific steps for converting the one-dimensional time series signal into a two-dimensional time series graph are as follows: 1) Normalize the preprocessed one-dimensional time series signal data; 2) Convert the normalized time series data into polar coordinate form; 3) Based on the principle of Gram angle field, time series data in polar coordinate form is converted into two-dimensional images that retain time features.
3. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 2, characterized in that, The normalization process is as follows: in Let x be the one-dimensional time series signal after numerical scaling at time i. i Let X be the signal value at time i in a one-dimensional time series signal, Max(X) be the maximum value in the one-dimensional time series signal, and Min(X) be the minimum value in the one-dimensional time series signal.
4. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 2, characterized in that, The conversion operation for the polar coordinate data is as follows: In the formula, σ i Let r be the polar angle in the polar coordinate system at time i; i Let be the polar radius in the polar coordinate system at time i; For a normalized signal sequence, N is the total number of timestamps; t i Let be the timestamp corresponding to the i-th time.
5. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1 or 2, characterized in that, The Gram angle field is encoded using the GASF image encoding method, which has two specific conversion methods: Gram summation field (GASF) and Gram difference field (GADF). The specific operations are as follows: The specific conversion formula for GASF is as follows: The specific conversion formula for GADF is as follows: In the formula, I = [1,1,…1] is a unit row vector. and They are and The transpose of .
6. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1, characterized in that, The ConvNeXt Block is composed as follows: First, it passes through a deep convolutional module with a kernel size of 7×7 and a stride of 1, followed by Layer Normalization; then, an inverse residual structure is introduced, in which a 1×1 convolutional kernel is first used to increase the dimensionality, a GELU activation function is added, and then a 1×1 convolutional kernel is used to reduce the dimensionality; then, a learnable vector gama is introduced, and layerscale is used to scale the data of each channel of the feature map, with a scaling ratio of gama; finally, a Dropout layer is introduced to randomly deactivate some neurons, and the value is set to 0.2; Downsampling first passes through a Layer Normalization, then through a 2×2 convolutional kernel with a stride of 2.
7. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 6, characterized in that, The formula for the GELU activation function is: GeLu(X)=x×p(X≤x)=x×φ(x),x~N(0,1) Where x is the input value, X is a Gaussian random variable with zero mean and unit variance, and p(X≤x) is the probability that X is less than or equal to the given value x; Its approximate calculation formula is: 。 8. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1, characterized in that, The cosine annealing algorithm is expressed as follows: In the formula η t η is the increase in the learning rate at time t. Min This is the minimum learning rate set, η. Max This is the maximum learning rate set, T. cur T is the current training epoch number. Max This is the maximum number of epochs set.
9. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1, characterized in that, The training process in step five is as follows: First, the training set and validation set are preprocessed, including random cropping, random horizontal flipping, conversion to Tensor format, and standardization. During the training process, the cross-entropy loss function is introduced to calculate the difference between the target and the predicted value. The training parameters are set as follows: the two hyperparameters of the AdamW optimizer are β1 = 0.9 and β2 = 0.999, the batch size is set to 32, and the training lasts for 100 epochs. The maximum learning rate is set to 0.0005. To prevent overfitting during training, a warm-up method is used to raise the learning rate to its maximum value. Then, the learning rate decays in a manner that follows a 1 / 4 cycle of a cosine function, starting from the maximum value.
10. The perimeter security disturbance identification algorithm based on GAF-ConvNeXt-TF according to claim 1, characterized in that, The AdamW optimizer is: m t =β1*m t-1 +(1-β1)*g t v t =β2*v t-1 +(1-β2)*g t 2 Among them, β1 and β2 are the exponential decay rates of the first and second moment estimates of the gradient, respectively, and their roles are the weight allocation and the influence of the squared gradient; g t The gradient at time step t is represented by m. t and v t These are the first-order moment estimate and the second-order moment estimate of the gradient, respectively; t represents the time step. and They are respectively for m t and v t The result of the paranoid correction; θ t η represents the value of the optimizer output parameters at time t; λ is the weight decay factor; η t ε represents the learning rate; ε represents a very small number to prevent the denominator from being zero.
Citation Information
Patent Citations
Distributed optical fiber vibration signal feature extraction and identification method
CN111242021A
Remote monitoring method, reader, monitoring terminal and sensor
WO2017041560A1