Open set identification method of distributed optical fiber sensing event based on mask auto-encoder and OpenMax
By combining mask autoencoders and OpenMax, the problem of insufficient identification capability of distributed fiber optic acoustic wave sensing systems for unknown intrusion events in complex environments is solved, achieving more efficient open set identification and identification robustness, which is suitable for edge devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-14
AI Technical Summary
Existing distributed fiber optic acoustic sensing systems struggle to effectively identify unknown intrusion events in complex environments, and traditional methods lack generalization performance when faced with complex vibration modes, easily leading to false alarms and missed alarms.
A novel DAS event recognition framework is constructed by combining mask autoencoders and OpenMax, using self-supervised learning and open set recognition techniques. The framework includes data preprocessing, MAE model pre-training, and OpenMax testing. Deep features are extracted using mask autoencoders, and open set recognition is performed using OpenMax.
It significantly improves the system's adaptability and reliability in open environments, reduces the risk of misjudgment of unknown events, and enhances identification robustness and efficiency, making it suitable for deployment in resource-constrained edge devices.
Smart Images

Figure CN121859077A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of perimeter security intrusion event monitoring, and particularly relates to an open set identification method for distributed fiber optic sensing events based on a mask autoencoder and OpenMax. Background Technology
[0002] Distributed fiber optic acoustic sensing (DAS) technology, with its advantages of high sensitivity, resistance to electromagnetic interference, wide coverage, and flexible deployment, has been widely applied in perimeter security, oil and gas pipeline monitoring, and earthquake detection. The basic DAS system can capture the phase changes of Rayleigh scattered light caused by external vibrations in real time, thereby enabling the location and identification of intrusion behavior or abnormal events. However, in complex real-world scenarios, DAS signals are often interfered with by factors such as wind noise, mechanical vibration, and background environment, posing greater challenges to feature extraction and real-time processing.
[0003] Traditional event recognition methods are mostly based on the closed-set assumption, which assumes that all possible events have occurred during the training phase. These methods typically rely on manually generated features combined with traditional classifiers such as Support Vector Machines (SVMs) and KNN, or use supervised learning models such as Convolutional Neural Networks (CNNs), LSTMs, and Transformers to automatically extract features. However, whether using manually generated or deep learning features, when "unknown events" not seen during the training phase appear in the test data, the model struggles to make reliable judgments, easily leading to false positives and false negatives, thus limiting its application in real-world video security environments. Furthermore, existing feature extraction methods often lack the expressive power to handle complex vibration patterns, further limiting the model's generalization performance.
[0004] In recent years, self-supervised learning and open-set recognition techniques have provided new solutions for the DAS (Distributed Event Recognition) field. Masked autoencoders (MAEs) reconstruct the input by randomly masking large proportions of image patches, enabling the model to learn deeper features with greater structure and global relevance, exhibiting strong generalization capabilities and making them highly suitable for feature pre-training on large-scale unlabeled DAS data. Meanwhile, the OpenMax open-set recognition algorithm effectively identifies previously unseen events by probabilistically recalibrating the Softmax output and fitting the feature tails using the Weibull distribution. Although MAE and OpenMax each demonstrate excellent characteristics, there is currently a lack of mature solutions combining them for DAS open-set recognition. Therefore, constructing a novel DAS event recognition framework that integrates the strong feature extraction capabilities of MAE and the open-set recognition capabilities of OpenMax has become a crucial research direction urgently requiring breakthroughs. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides an open-set identification method for distributed fiber optic sensing events based on a mask autoencoder and OpenMax. This method effectively addresses the problem of insufficient identification capability of distributed fiber optic sensing technology for unknown intrusion events in complex environments. By combining self-supervised learning and open-set identification techniques, this method significantly improves the system's adaptability and reliability in open environments.
[0006] The technical solution adopted by this invention to solve its technical problem is:
[0007] An open-set identification method for distributed fiber optic sensing events based on mask autoencoders and OpenMax includes the following steps:
[0008] S1. Experimental Scenario Setup and Data Acquisition: Set up a DAS system and collect data on five types of intrusion events;
[0009] S2. Data preprocessing: The experimental data is denoised and then converted into Gram angle field images;
[0010] S3. Create the dataset: Divide the dataset into three parts: training set, validation set, and test set;
[0011] S4. Training the MAE model: Use a mask autoencoder to perform self-supervised pre-training on the preprocessed image data and save the model weights.
[0012] S5, OpenMax Test: Load the pre-trained weights of the MAE encoder, perform open set recognition test on the test set, and complete the open set recognition of perimeter fence intrusion events.
[0013] Furthermore, the process of S1 is as follows:
[0014] S1.1 Lay optical fibers around the fence. There are two ways to lay them: S-shaped netting and ground laying. Then connect the optical fibers to distributed optical fiber sensors to collect data on different intrusion events.
[0015] S1.2 There are five types of intrusion events, including: cutting, drones, shaking, trampling, and animal biting. The sampling frequency of the distributed acoustic sensor is 20000Hz, the spatial resolution is 5m, the sampling time for each type of event in this scenario is 60min, and the repetition frequency of the event action is once per second.
[0016] Furthermore, the process of S2 is as follows:
[0017] S2.1 The distributed fiber optic acoustic sensor collects one-dimensional signal data. The signal is denoised using wavelet transform based on db4 wavelet basis to reduce the impact of surrounding noise on the intrusion signal.
[0018] S2.2 After noise reduction, the signal intensity is normalized to [-1,1]. By converting to polar coordinates to calculate the Gram matrix, the Gram angle field image of each perturbation signal is obtained. The GASF algorithm extracts motion features from the trend and pattern of the signal changing over time by converting the 1D time signal into a 2D image of focused features. Each perturbation signal corresponds to a unique two-dimensional image, similar to a fingerprint, thereby effectively improving the recognition accuracy.
[0019] Furthermore, in S3, the data in the experimental scenario is divided into a training set, a validation set, and a test set in a 4:1:1 ratio, and the data of unknown categories is placed in the last category.
[0020] The process of step 4 is as follows:
[0021] S4.1 First, data augmentation is employed to enhance the diversity and generalization ability of data in different scenarios. Two augmentation methods are used: First, a light data augmentation is applied to the Gram corner field map, including horizontal flipping and random cropping, to improve the model's adaptability to local perturbations. Second, the MAE self-supervised training utilizes the mask autoencoder's built-in setting ratio occlusion mechanism as the main augmentation method, with the occlusion ratio set to 0.5.
[0022] S4.2 Next is the MAE pre-training part. The Masked Autoencoder (MAE) is a self-supervised learning method based on the Vision Transformer (ViT) architecture. It achieves deep feature learning of the input signal through an asymmetric encoder-decoder design. Its core design is to use a high-proportion random masking strategy to construct challenging self-supervised tasks. The encoder only processes the visible image patches that are not masked and extracts high-level semantic features through multi-layer Transformer modules; the decoder reconstructs the masked image region based on the latent features output by the encoder and the learnable masking labels.
[0023] ViT is a model that applies the Transformer architecture to image data. Its core idea is to divide the image into patches and capture global dependencies within the image through a self-attention mechanism. Here's a brief overview of the network structure: The ViT encoder mainly consists of the following parts: First, image patch processing: the input image is divided into fixed-size patches, each 16×16 pixels, forming a sequence of patches. Second, linear projection: each patch is mapped to a token through a linear projection layer, outputting an ordered token sequence. Third, positional encoding: to preserve spatial information between patches, the ordered token sequence is embedded with positional encoding, outputting a token sequence X = [x1, x2, ..., x...]. n Where x i It is the i-th tag in the tag sequence. Fourth is the Transformer coding block structure. The ViT encoder is composed of L identical Transformer coding blocks stacked together. Each transformer coding block first enters the normalization layer and outputs the normalized tag sequence. The normalized tag sequence then enters the multi-head self-attention layer. In the self-attention layer, three linear transformations are first performed on the input sequence X to calculate the query Q, key K, and value V:
[0024]
[0025] Among them W Q W K W V This is the weight matrix obtained through training. The resulting sequence of query Q, key K, and value V is divided into h heads. An attention score is calculated for each head using a dot product attention mechanism.
[0026]
[0027] Among them, the head q, k i ,v i It is a subset of the original sequence. It is the scaling factor, d k This represents the dimensions of query Q and key K in each head. The Softmax function transforms the attention scores into weights. After concatenating the outputs of all heads and performing a linear transformation, the final output of multi-head self-attention is obtained:
[0028] MultiHead(Q,K,V)=Concat(Attention(q1,k1,v1),Attention(q2,k2,v2),...,Attention(q h ,k h ,vh The concatenated output is then passed through another weight matrix W obtained from training. O Perform a linear transformation, then concatenate the result with the input sequence using residuals:
[0029] Output=LN(MultiHead(Q,K,V))·W O +X
[0030] Here, LN stands for Layer Normalization. The output of the multi-head self-attention layer is input into a normalization layer, then into a multilayer perceptron layer. The multilayer perceptron layer scales up and then down its input dimension to the size of the initial input label sequence. The output is then residually concatenated with the input sequence to output a deformer code, which is then fed into the next deformer encoding block. After L deformer encoding blocks, the final deformer code is obtained. Each deformer code corresponds to a label in the initial label sequence, and a fixed number of label groups correspond to the initial image blocks.
[0031] MAE employs LayerNorm layers to stabilize the training process, uses the GELU activation function, and preserves the spatial location information of image patches through positional embedding. Furthermore, MAE undergoes large-scale mask reconstruction pre-training, enabling the model to learn robust and discriminative feature representations from the data. This results in excellent performance when transferred to downstream tasks, making it a network with strong feature extraction capabilities and good generalization performance. In this invention, reconstruction error is used as the loss function for training, and the reconstruction loss MSE is as follows:
[0032]
[0033] Where: y i Original pixels; To reconstruct pixels, after MAE training is complete, only its encoder portion is retained as the feature extraction network for downstream tasks (i.e., the input features of the downstream OpenMax classifier).
[0034] S4.3. Since the model structure is deep and the parameter scale is large, relying entirely on manual hyperparameter adjustment will result in long training cycles, low efficiency and difficulty in obtaining the best recognition performance. Therefore, a set of verified stable parameter combinations was selected during the training process, and the AdamW optimizer was used to train the model end-to-end to ensure the stability and convergence efficiency of the feature extraction process.
[0035] Specifically, during the training phase, key parameters of the OpenMax module and batch size and learning rate of the MAE self-supervised training part are set. In order to improve the stability of the training process and avoid initial gradient oscillations, a learning rate warm-up strategy is introduced, with the first 10 iterations serving as a warm-up phase, so that the learning rate is gradually increased from a small value to a preset value, ensuring that the parameters of the model encoder and decoder can smoothly enter the effective training range.
[0036] During pre-training, the model uses AdamW as the optimizer to suppress overfitting and improve generalization ability through weight decay. An iteration cycle is set for the entire training process; as training progresses, the MAE reconstruction loss gradually decreases and eventually converges. Once the convergence condition is met, training stops and the optimal model weights, including the pre-trained parameters of the MAE encoder, are saved. These saved weights will be used for open-set event recognition in the subsequent testing phase.
[0037] The process of S5 is as follows:
[0038] S5.1, Extreme value theory fitting of Weibull model,
[0039] Assuming the model has N categories of output, and the input training data is the average patch token output of the last layer of the trained MAE encoder, the resulting N-dimensional vector is called the activation vector (AV). For the samples of the i-th category in the training dataset, m AVs are obtained. i :
[0040] AV i ={av1,av2,...,av m}
[0041] Next, regarding AV i The average activation vector (MAV) is obtained by averaging. i :
[0042] MAV i =mean(aV1,aV2,...,aV) m )
[0043] Calculate category i in av j With MAV i Euclidean distance between them:
[0044] dist j =Euclidean(MAV) i ,av j ) ←
[0045] Collect all distances to obtain the distance set Dists i :
[0046] Dists i ={dist1,dist2,...,dist m}
[0047] From Dists i Select η extreme value samples as the dataset for fitting the Weibull model:
[0048]
[0049] Among them, sort() η This represents sorting from largest to smallest and selecting the η largest elements, where η is the tail size.
[0050] Finally, the Weibull distribution is used to fit category i:
[0051]
[0052] Where τ i It is a data parameter, k i and λ i These are the Weibull shape parameters and scale parameters, respectively.
[0053] S5.2 is for OpenMax score calculation.
[0054] Input the test sample x into the trained model and calculate its activation vector:
[0055] AV(x)={v1(x),...,v i (x),...,v N (x)}
[0056] Calculate AV x With MAV i The Euclidean distance between them i (x).;The distance from dist i (x) Input into WeibullModel i In the process, the correction coefficient for category i is obtained:
[0057]
[0058] Where w i It is the correction factor for category i. These are the weights of the probability estimation function.
[0059] Calculate the calibration weights for all categories:
[0060] W(x) = {w1, w2, ..., w N} ←
[0061] Use 1-w i After correcting the original activation vectors, we obtain the OpenMax scores for each category:
[0062] v i (x)=v i (x)·(1-w i )
[0063] Calculate the OpenMax score for an unknown category:
[0064] v N+1 (x) = AV(x)·W(x)
[0065] The final vector is formed by concatenating the scores of all categories:
[0066] AV(x) final ={V1(x),...,V N (x),V N+1 (x)}
[0067] Input the final vector into the SoftMax function to obtain the probability distribution:
[0068]
[0069] If the unknown class classification probability P(y=N+1) of a sample exceeds the preset threshold t, the input is determined to be an unknown class and is rejected as any known class; otherwise, the known class with the highest probability is selected as the final prediction result.
[0070] The beneficial effects of this invention are mainly reflected in the following aspects: The MAE-OpenMax method proposed in this invention significantly improves the detection capability for unknown categories and the overall robustness of open set recognition by deeply fusing self-supervised MAE pre-trained features with OpenMax tail distribution modeling. Compared with traditional supervised training of OpenMax, this method forms more compact and discriminative known class clusters in the feature space, while being more sensitive to out-of-distribution samples, effectively reducing the risk of unknown samples being misclassified as known classes, and achieving more stable rejection recognition capability in various complex scenarios. Compared with existing technologies, this invention also achieves significant breakthroughs in inference efficiency and deployment friendliness. By moving the anomaly detection logic to the MAE feature extraction stage and simplifying the tail estimation process, this method significantly reduces online computational overhead, making the inference process more lightweight and efficient, significantly reducing latency and resource consumption, and making it easier to deploy on resource-constrained edge devices and real-time systems. Attached Figure Description
[0071] Figure 1 This is a flowchart of the open set identification of perimeter security intrusion signals in this invention.
[0072] Figure 2 This is a schematic diagram of the distributed optical fiber acoustic sensing system (DAS) in this invention.
[0073] Figure 3 This is a diagram of the perimeter security deployment scheme of DAS in a laboratory setting according to the present invention.
[0074] Figure 4 These are experimental field diagrams of different intrusion events implemented in this invention, as well as Gram field diagrams corresponding to different intrusion events, wherein (a) is trampling, (b) cutting, (c) drone, (d) shaking, and (e) animal biting.
[0075] Figure 5 This is a framework diagram of the MAE model in this invention.
[0076] Figure 6 This is a framework diagram of the OpenMax open set recognition method.
[0077] Figure 7 This is a confusion matrix diagram of the test results using the test set in this invention. Detailed Implementation
[0078] The present invention will now be further described with reference to the accompanying drawings.
[0079] Reference Figures 1 to 7 This paper presents an open-set identification method for distributed fiber optic sensing events based on a masked autoencoder and OpenMax. Using a fence in a laboratory setting as a specific example, the flowchart of the open-set identification method for distributed fiber optic sensing perimeter intrusion events based on masked autoencoders and OpenMax is shown below. Figure 1 As shown.
[0080] The open set identification method includes the following steps:
[0081] S1. Scene Setup: The DAS system is set up in a laboratory setting, as follows: Figure 2 As shown, optical fibers are laid in an "S" shape for 10 meters in a net and 5 meters in a ground-layout configuration. The net-mounted optical fibers are fixed with braided tape. A bundle of 0.5 kilometers of optical fiber is separated between the two laying methods, and the total length of optical fiber used is 1 kilometer. One end of the optical fiber is connected to the distributed optical fiber acoustic sensing system (DAS), and the other end is coiled.
[0082] S2. Data Preprocessing: In a laboratory setting, data signals are acquired using a distributed fiber optic acoustic sensing system (DAS). The principle is described in [reference needed]. Figure 2The main equipment used in the system includes an ultra-narrow linewidth laser (NLL), an acousto-optic modulator, a coupler, an erbium-doped fiber amplifier (AOM), a circulator, a balanced photodetector (BPD), a data acquisition card, and a host computer. This system uses a narrow linewidth laser (NLL) source emitting highly coherent continuous light, which is split into two parts by a coupler. Coupler 1 acts as the local oscillator and separates the probe signal. The probe signal is modulated into an optical pulse by the AOM. After amplification by the erbium-doped fiber amplifier (EDFA), the probe pulse is transmitted through the circulator to the sensing fiber for the acoustic sensing link. Next, the backscattered signal from the sensing fiber carries the acoustic signal information generated by the intrusion event and interferes with the local oscillator at coupler 2, forming a heterodyne beat frequency signal. The AC component of the final generated beat frequency signal is received by the balanced photodetector (BPD) and recorded by a data acquisition card (DAQ) with a sampling rate of 20 kS / s. When an intrusion event occurs near the sensing fiber, the phase of the backscattered signal from the sensing fiber is modulated by the acoustic signal generated by the intrusion event. The demodulated vibration signal is transmitted to an industrial control computer or server via gigabit Ethernet for backend processing such as signal feature analysis and event discrimination. The distributed fiber optic acoustic sensor has a sampling frequency of 20000Hz, a spatial resolution of 5m, a sampling time of 60 minutes for each type of event in this scenario, and a repetition frequency of 1 second for the event action. Animal biting is simulated using a toy device to mimic the action of biting optical fibers. Events such as... Figure 3 As shown, the raw vibration data (dat) collected in 1 second was denoised using wavelet transform based on the "db4" wavelet basis, and the signal intensity was normalized to obtain a time series diagram of the one-dimensional vibration signal for each event. The normalized sequence data was then converted to polar coordinates, where the values were considered as the cosines of the angles, and the timestamps were considered as radii. Finally, the polar coordinate form of the time series data was converted to a two-dimensional image, preserving the temporal features. The Gram matrix was obtained by calculating the cosine angles between different points to distinguish the temporal correlation at different time points. The resulting Gram image is shown below. Figure 4 As shown, (a) represents cutting: the image shows relatively concentrated areas of brightness variation, which may correspond to continuous signal changes during the cutting process of the object, and the pattern shows local highlights and a structured trend. (b) represents a drone: the overall pattern is relatively uniformly distributed, with characteristics similar to periodic or stable signals, which may reflect the vibration or stable motion mode of the drone during operation. (c) represents trampling: the image texture is relatively dense and irregularly distributed, and the brightness changes frequently, which may correspond to impact or discontinuous signals, such as vibrations caused by trampling. (d) represents shaking: the pattern shows a relatively obvious undulating shape, and the brightness changes periodically along a certain direction, which may correspond to the motion mode of the object shaking left and right or back and forth. (e) represents animal biting: the image has locally concentrated bright spots or short-term high-intensity changes, which may correspond to sudden, short-term mechanical signals, such as the instantaneous vibrations generated by biting actions.
[0083] S3. Dataset Creation: Label the collected data for various events as follows: shaking (foreground shaking), trampling (foreground trampling), UAV (foreground drone intrusion), cutting (foreground cutting), and unknown (for unknown events, including simulated animal bites). Divide the data into training, validation, and test sets in a 4:1:1 ratio, placing the unknown category data in the last category. The training set contains 10,000 samples, with a balanced number of data points per category.
[0084] S4, MAE pre-training: such as Figure 5 As shown, the encoder employs a masked autoencoder (MAE). MAE is a self-supervised learning method based on the Vision Transformer (ViT) architecture, which achieves deep feature learning of the input signal through an asymmetric encoder-decoder design. Its core design includes employing a high-proportion random masking strategy to construct challenging self-supervised tasks. The encoder only processes visible image patches that are not masked, extracting high-level semantic features through multi-layer Transformer modules; the decoder reconstructs the masked image regions based on the latent features output by the encoder and learnable masking markers.
[0085] ViT is a model that applies the Transformer architecture to image data. Its core idea is to divide the image into patches and capture global dependencies within the image through a self-attention mechanism. Here's a brief overview of the network structure: The ViT encoder mainly consists of the following parts: First, image patch processing: the input image is divided into fixed-size patches, each 16×16 pixels, forming a sequence of patches. Second, linear projection: each patch is mapped to a token through a linear projection layer, outputting an ordered token sequence. Third, positional encoding: to preserve the spatial location information between patch patches, the ordered token sequence is embedded with positional encoding, outputting a token sequence X = [x1, x2, ..., x...]. n Where x i It is the i-th tag in the tag sequence. Fourth is the Transformer coding block structure. The ViT encoder is composed of L identical Transformer coding blocks stacked together. Each transformer coding block first enters the normalization layer and outputs the normalized tag sequence. The normalized tag sequence then enters the multi-head self-attention layer. In the self-attention layer, three linear transformations are first performed on the input sequence X to calculate the query Q, key K, and value V:
[0086]
[0087] Among them W Q W K W V This is the weight matrix obtained through training. The resulting sequence of query Q, key K, and value V is divided into h heads. An attention score is calculated for each head using a dot product attention mechanism.
[0088]
[0089] Among them, the head q, k i ,v i It is a subset of the original sequence. It is the scaling factor, d k This represents the dimensions of query Q and key K in each head. The Softmax function transforms the attention scores into weights. After concatenating the outputs of all heads and performing a linear transformation, the final output of multi-head self-attention is obtained:
[0090] MultiHead(Q,K,V)=Concat(Attention(q1,k1,v1),Attention(q2,k2,v2),...,Attention(q h ,k h ,v h The concatenated output is then passed through another weight matrix W obtained from training. O Perform a linear transformation, then concatenate the result with the input sequence using residuals:
[0091] Output=LN(MultiHead(Q,K,V))·W O +X
[0092] Here, LN stands for Layer Normalization. The output of the multi-head self-attention layer is input into a normalization layer, then into a multilayer perceptron layer. The multilayer perceptron layer scales up and then down its input dimension to the size of the initial input label sequence. The output is then residually concatenated with the input sequence to output a deformer code, which is then fed into the next deformer encoding block. After L deformer encoding blocks, the final deformer code is obtained. Each deformer code corresponds to a label in the initial label sequence, and a fixed number of label groups correspond to the initial image blocks.
[0093] MAE employs LayerNorm layers to stabilize the training process, uses the GELU activation function, and preserves the spatial location information of image patches through positional embedding. Furthermore, MAE undergoes large-scale mask reconstruction pre-training, enabling the model to learn robust and discriminative feature representations from the data. This results in excellent performance when transferred to downstream tasks, making it a network with strong feature extraction capabilities and good generalization performance. In this invention, reconstruction error is used as the loss function for training, and the reconstruction loss MSE is as follows:
[0094]
[0095] Where: y i Original pixels; To reconstruct pixels, after MAE training, only its encoder portion is retained as the feature extraction network for downstream tasks (i.e., the input features of the downstream OpenMax classifier). Because the model structure used in this invention is deep and has a large parameter scale, relying entirely on manual hyperparameter tuning would result in long training cycles, low efficiency, and difficulty in achieving optimal recognition performance. Therefore, this invention selects a set of validated and stable parameter combinations during training and uses the AdamW optimizer for end-to-end model training to ensure the stability and convergence efficiency of the feature extraction process.
[0096] Specifically, during the training phase, this invention sets the key parameters of the OpenMax module as follows: tail size η is 15, rejection threshold is 0.93; batch size of the MAE self-supervised training part is set to 32, and learning rate is fixed at 5×10. -4 To improve the stability of the training process and avoid initial gradient oscillations, a learning rate warm-up strategy is introduced. The first 10 iterations are used as a warm-up phase, gradually increasing the learning rate from a small value to a preset value to ensure that the parameters of the model encoder and decoder can smoothly enter the effective training range.
[0097] During pre-training, the model uses AdamW as the optimizer to suppress overfitting and improve generalization ability through weight decay. The entire training process is set to 600 iterations. As training progresses, the MAE reconstruction loss gradually decreases and eventually converges to approximately 0.05. After reaching the convergence condition, training is stopped and the optimal model weights are saved, including the pre-trained parameters of the MAE encoder and the rejection parameters of the OpenMax model. The saved weights will be used in the subsequent testing phase for open-set recognition of perimeter intrusion events.
[0098] S5 and OpenMax testing: OpenMax's rejection mechanism enables the identification and differentiation of intrusion events that have never occurred before, such as... Figure 6 As shown, the processing procedure of the OpenMax open set classification module is as follows:
[0099] S5.1. Fitting the Weibull model using extreme value theory.
[0100] Assuming the model has N categories of output, and the input training data is the average patch token output of the last layer of the trained MAE encoder, the resulting N-dimensional vector is called the activation vector (AV). For the samples of the i-th category in the training dataset, m AVs are obtained. i :
[0101] AV i ={av1,av2,...,av m}
[0102] Next, regarding AV i The average activation vector (MAV) is obtained by averaging. i :
[0103] MAV i =mean(aV1,aV2,...,aV) m )
[0104] Calculate category i in av j With MAV i Euclidean distance between them:
[0105] dist j =Euclidean(MAV) i ,av j ) ←
[0106] Collect all distances to obtain the distance set Dists i :
[0107] Dists i ={dist1,dist2,...,dist m}
[0108] From Dists i Select η extreme value samples as the dataset for fitting the Weibull model:
[0109]
[0110] Among them, sort() η This represents sorting from largest to smallest and selecting the η largest elements, where η is the tail size.
[0111] Finally, the Weibull distribution is used to fit category i:
[0112]
[0113] Where τi It is a data parameter, k i and λ i These are the Weibull shape parameters and scale parameters, respectively.
[0114] S5.2, OpenMax score calculation,
[0115] Input the test sample x into the trained model and calculate its activation vector:
[0116] AV(x)={v1(x),...,v i (x),...,v N (x)}
[0117] Calculate AV x With MAV i The Euclidean distance between them i (x).;The distance from dist i (x) Input into WeibullModel i In the process, the correction coefficient for category i is obtained:
[0118]
[0119] Where w i It is the correction factor for category i. These are the weights of the probability estimation function.
[0120] Calculate the calibration weights for all categories:
[0121] W(x) = {w1, w2, ..., w N} ←
[0122] Use 1-w i After correcting the original activation vectors, we obtain the OpenMax scores for each category:
[0123] v i (x)=v i (x)·(1-w i )
[0124] Calculate the OpenMax score for an unknown category:
[0125] v N+1 (x) = AV(x)·W(x)
[0126] The final vector is formed by concatenating the scores of all categories:
[0127] AV(x) final ={V1(x),...,V N (x),V N+1 (x)}
[0128] Input the final vector into the SoftMax function to obtain the probability distribution:
[0129]
[0130] If the unknown class classification probability P(y=N+1) of a sample exceeds the preset threshold t, the input is determined to be an unknown class and is rejected as any known class; otherwise, the known class with the highest probability is selected as the final prediction result.
[0131] The test results are presented using a confusion matrix. This not only allows us to intuitively understand how well the algorithm model classifies events, but more importantly, it reveals which events are easily confused and the number of instances of confusion. The confusion matrix is shown below. Figure 7 As shown, 2500 samples (500 for each of the five event categories) were used for testing. The model training time was 3 hours, and the test accuracy was 0.927 for the known class, and 0.848 and 0.911 for the unknown class and the overall population, respectively.
[0132] The embodiments described in this specification are merely examples of implementations of the inventive concept and are for illustrative purposes only. The scope of protection of this invention should not be considered limited to the specific forms described in these embodiments; rather, it extends to equivalent technical means conceived by those skilled in the art based on the inventive concept.
Claims
1. An open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax, characterized in that, The method includes the following steps: S1. Experimental Scenario Setup and Data Acquisition: Set up a DAS system and collect data on five types of intrusion events; S2. Data preprocessing: The experimental data is denoised and then converted into Gram angle field images; S3. Create a dataset: labeled data of known categories, divided into three parts: training set, validation set, and test set; S4. Training the MAE model: Use a mask autoencoder to perform self-supervised pre-training on the converted image data and save the model weights; S5, OpenMax Test: Load the pre-trained weights of the MAE encoder, perform open set recognition test on the test set, and complete the open set recognition of perimeter fence intrusion events.
2. The open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax as described in claim 1, characterized in that, The process of S1 is as follows: S1.1 Lay optical fibers around the fence. There are two ways to lay them: S-shaped net-hanging optical fibers and ground-laying optical fibers. Then connect the optical fibers to distributed optical fiber sensors to collect data on different intrusion events. S1.2 There are five types of intrusion events, including: cutting, drones, shaking, trampling, and animal biting; set the sampling frequency, spatial resolution, sampling time of each type of event in this scenario, and repetition frequency of event actions for the distributed fiber optic sensors.
3. The open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax as described in claim 1 or 2, characterized in that, The process of S2 is as follows: S2.1 The distributed fiber optic sensor collects one-dimensional signal data. Wavelet denoising is used to reduce noise and minimize the impact of noise on the intrusion signal. S2.2 After the noise reduction process, the signal intensity is normalized, and the Gram angle field image of each data point is constructed by converting it to polar coordinates and calculating the Gram matrix.
4. The open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax as described in claim 1 or 2, characterized in that, In S3, the data in the experimental scenario is divided into training set, validation set and test set according to a set ratio, and the data of unknown category is placed in the last category.
5. The open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax as described in claim 1 or 2, characterized in that, The process of S4 is as follows: S4.1 The following enhancement methods are adopted: First, perform light data enhancement on the image, including horizontal flipping, random cropping, etc.; for the MAE part, use the patch random proportional occlusion built into MAE. S4.2 The MAE module includes a Transformer encoder and a lightweight decoder, and is trained through the following steps: the image is divided into fixed-size patches; a large proportion of the mask is randomly occluded; the Vision Transformer encoder is used to extract deep features of the occluded parts; the image is reconstructed using the Transformer decoder; the reconstruction error MSE is used as the loss function for training; after training, the encoder part of MAE is retained as the feature extraction network. S4.3 During the training process, a set of validated and stable parameter combinations were selected, and the AdamW optimizer was used to train the model end-to-end to ensure the stability and convergence efficiency of the feature extraction process.
6. The open-set identification method for distributed fiber optic sensing events based on masked autoencoders and OpenMax as described in claim 1 or 2, characterized in that, In S5, the OpenMax open set classification module can identify and distinguish intrusion events that have not occurred before through the OpenMax rejection mechanism. In the testing phase, the MAE encoder weights are loaded first, and the deep features of the test samples are extracted. Based on the known category features in the training set, the OpenMax average activation vector and Weibull distribution model are constructed, and the classification probability is output using Softmax. Combined with threshold judgment, the open set classification including unknown categories is realized.