Lightweight optical fiber intrusion behavior recognition method and system based on small sample learning

CN123012745APending Publication Date: 2026-10-30OCEAN UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611173681.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]为了解决现有光纤入侵行为识别技术在样本极度稀缺条件下因深度学习模型过拟合而导致的识别精度低、泛化能力差的技术问题,本发明提供一种基于小样本学习的轻量化光纤入侵行为识别方法及系统

Benefits of technology

1、本发明通过将光纤入侵行为识别建模为小样本分类任务,并采用基于原型网络的元学习机制在特征嵌入空间中构建各类别的几何中心原型,实现了在仅提供每类5至10个标注样本的极端条件下模型的快速收敛与高精度识别,显著降低了对大规模标注数据的依赖及数据采集与人工标注成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012745A_ABST
    Figure CN123012745A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of optical fiber intrusion behavior recognition, and particularly relates to a light optical fiber intrusion behavior recognition method and system based on small sample learning, comprising: acquiring original optical fiber sensing signals collected by an optical fiber sensing system, performing short-time Fourier transform and normalization processing on the original optical fiber sensing signals to obtain a time-frequency feature map; inputting the time-frequency feature map into a pre-constructed physically constrained light convolutional network to obtain a to-be-tested feature vector corresponding to the original optical fiber sensing signals; performing small sample training on the physically constrained light convolutional network by using a meta-learning mechanism, calculating distances between the to-be-tested feature vector and prototype vectors of various categories, and outputting an intrusion type corresponding to a prototype vector of a category with the shortest distance as an intrusion behavior recognition result of the to-be-tested optical fiber signal, so that the present application effectively avoids the problems of feature overlap and inter-class confusion caused by mutual interference of time-frequency domain features in a small sample scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fiber optic intrusion behavior recognition technology, and in particular to a lightweight fiber optic intrusion behavior recognition method and system based on few-shot learning. Background Technology

[0002] As a core technology of modern perimeter security, fiber optic intrusion detection systems identify intrusion behaviors by capturing and analyzing these weak signal disturbances. When intrusion behaviors such as digging, climbing, or cutting occur, the mechanical stress on the optical fiber causes abrupt changes in the phase, intensity, or polarization state of the transmitted optical signal. The current mainstream technical approaches mainly include time-domain reflectometry and frequency-domain analysis.

[0003] Time-domain reflectometry (TDRS) locates intrusion points by emitting high-frequency pulses into an optical fiber and analyzing the time-domain waveform of the backscattered signal. While it has location capabilities, it is weak in extracting deep time-frequency features of the signal. Frequency-domain analysis, while effectively capturing dynamic changes, heavily relies on a large number of labeled samples to train the classification model and is extremely sensitive to environmental noise. At the data processing level, existing identification methods are mostly based on supervised learning. A typical process includes optical fiber signal acquisition, manual labeling of intrusion types, and training a classifier using a deep learning model. Its core support lies in feature engineering and deep learning frameworks.

[0004] However, the aforementioned existing technical solutions are all based on the ideal assumption of abundant data and lack specific optimization for extremely small sample scenarios. Because real-world intrusion events exhibit an extremely low-frequency distribution in actual operation, high-quality labeled samples available for training are extremely scarce. Existing mainstream deep learning paradigms heavily rely on large-scale balanced data; once placed in small sample scenarios, this leads to a surge in false alarm rates and increased response latency. Furthermore, transfer learning-based methods suffer from a mismatch between source and target domain features due to the fundamental differences in feature distribution between fiber optic time-series signals and natural images. This results in a precipitous drop in recognition accuracy under small sample conditions, leading to persistently high false alarm rates in practical applications. Therefore, a lightweight fiber optic intrusion behavior recognition method and system based on small sample learning is currently needed. Summary of the Invention

[0005] To address the technical problems of low recognition accuracy and poor generalization ability caused by overfitting of deep learning models under conditions of extremely scarce samples in existing fiber optic intrusion behavior recognition technologies, this invention provides a lightweight fiber optic intrusion behavior recognition method and system based on few-sample learning.

[0006] In a first aspect, the lightweight fiber optic intrusion behavior recognition method based on few-shot learning provided by the present invention adopts the following technical solution: A lightweight fiber optic intrusion behavior recognition method based on few-shot learning, including The original fiber optic sensing signal collected by the fiber optic sensing system is acquired, and the original fiber optic sensing signal is subjected to short-time Fourier transform and normalization processing to obtain the time-frequency feature map. The time-frequency feature map is input into a pre-constructed physically constrained lightweight convolutional network. The time-frequency features are decoupled and extracted through asymmetric axial decomposition convolution. After asymmetric step-size downsampling and global average pooling, the target feature vector corresponding to the original optical fiber sensing signal is obtained. A meta-learning mechanism is used to train a physically constrained lightweight convolutional network with few samples, and the network parameters are iteratively optimized using the negative log-likelihood loss of the query set samples to obtain a trained intrusion behavior recognition model. Calculate the distance between the feature vector to be tested and the prototypes of each category, and output the intrusion type corresponding to the closest prototype category as the intrusion behavior recognition result of the fiber optic signal to be tested.

[0007] Furthermore, the original optical fiber sensing signal undergoes short-time Fourier transform and normalization processing, including acquiring the original optical fiber sensing signal collected by the optical fiber sensing system. The original optical fiber sensing signal is a one-dimensional time series containing information on vibration or stress changes caused by an intrusion event. Short-time Fourier transform is performed on the original fiber optic sensing signal to nonlinearly map the time-domain waveform into a time-frequency representation, so as to capture the dynamic coupling characteristics of intrusion behavior in the time and frequency dimensions. The time-frequency representation is normalized based on global statistics to obtain a time-frequency feature map. , , in, The time-frequency diagram is obtained from the short-time Fourier transform. This is a one-dimensional time series corresponding to the original fiber optic sensing signal. It is a short-time Fourier transform. The global mean of the time-frequency plot. The global standard deviation of the time-frequency plot. This is the time-frequency feature map obtained after normalization.

[0008] Furthermore, the decoupling extraction of time-frequency features through asymmetric axial decomposition convolution includes decomposing the input features of the time-frequency feature map along two orthogonal one-dimensional paths, extracting the formant distribution features of the frequency dimension through depth-separable convolution of the frequency-sensitive kernel, and extracting the phase modulation and rhythm features of the time dimension through depth-separable convolution of the time-sensitive kernel. A learnable physical scale factor is introduced to adaptively weight and fuse the outputs of the two one-dimensional paths to obtain the decoupled time-frequency features. The expression for the adaptive weighted fusion is as follows: , in, For depthwise separable convolutions with frequency-sensitive kernels, For depthwise separable convolution with time-sensitive kernels, For input features, , For adaptive physical scale factor, For pointwise convolution, For batch normalization operations, These are the output features after fusion.

[0009] Furthermore, the asymmetric stride downsampling includes replacing pooling operations with asymmetric stride convolution in the downsampling layer, defining an asymmetric stride ratio, performing fast compression in the frequency dimension to filter out steady-state environmental noise in the spectrum, and maintaining resolution in the time dimension. Between downsampling layers, features before and after downsampling are fused using dynamic feature projection. The expression for dynamic feature projection is: , in, This is the input feature map before downsampling. It is an asymmetric step size operator. For linear projection mapping, For activation function, This is the output feature map after downsampling.

[0010] Furthermore, obtaining the feature vector corresponding to the original optical fiber sensing signal specifically includes: The first stage, feature excitation and noise suppression, involves shallow feature extraction and preliminary spatial downsampling of the time-frequency feature map through convolutional layers, filtering out high-frequency white noise from the environment and compressing spatial redundancy. In the second stage, time-frequency axial decoupling extraction is performed. The shallow features output from the first stage are input into the backbone network. The time-frequency texture is decoupled through asymmetric axial decomposition convolution and learnable physical scale factors to construct the physical contour features of the intrusion behavior. In the third stage, asymmetric sampling and manifold evolution input the decoupled features output from the second stage into the downsampling layer. Through asymmetric stride convolution, a double compression is performed in the frequency dimension and a low sampling is maintained in the time dimension, mapping the scattered pixels into behavioral semantic units. In the fourth stage, semantic convergence and behavior discrimination, the high-level feature map output from the third stage is input into the global average pooling layer. By calculating the global mean of each channel, the information in the spatial dimension is collapsed to obtain the corresponding feature vector.

[0011] Furthermore, the method of using a meta-learning mechanism to train a physically constrained lightweight convolutional network with few samples includes constructing a training sample set on a task-by-task basis, randomly selecting N types of intrusion behaviors from the training set for each training session, and selecting K samples from each type to construct a support set and M samples to construct a query set. All samples from the support set and query set are respectively input into a physically constrained lightweight convolutional network for embedding mapping to obtain the multi-dimensional feature vector corresponding to each sample. The support set is represented as follows: , in, To support the collection, To support a centralized sample, For the sample Corresponding category tags, K represents the number of intrusion behavior categories extracted, and K represents the number of samples extracted for each category to construct the support set.

[0012] Furthermore, the step of using a meta-learning mechanism to train the physically constrained lightweight convolutional network with few samples also includes, for each type of intrusion behavior in the support set, calculating the arithmetic mean of the feature vectors obtained by embedding mapping for all samples of that type, and using the arithmetic mean as the prototype corresponding to that type of intrusion behavior. Therefore, the prototype corresponding to the c-th type of intrusion behavior is represented as: , in, To support the collection of samples belonging to the c-th type of intrusion behavior, Embedding mapping for physically constrained lightweight convolutional networks. These are the learnable parameters of the network. This is the prototype corresponding to the c-th type of intrusion behavior.

[0013] Furthermore, the iterative optimization of network parameters using the negative log-likelihood loss of the query set samples includes, for each sample in the query set, calculating the negative log-likelihood loss of the query set samples based on the multidimensional feature vector corresponding to each sample and the prototype of each category, and updating the network parameters of the physically constrained lightweight convolutional network with the objective of minimizing the negative log-likelihood loss. The negative log-likelihood loss is expressed as: , in, For loss function, For all learnable weights in the network, For the query set sample, For query samples The corresponding real tags, For query samples The actual category of intrusion, The query samples will be used for the intrusion behavior identification model. The first is judged as the The probability of a class.

[0014] Furthermore, the output of the intrusion behavior identification result of the fiber optic signal under test includes calculating the squared Euclidean distance between the feature vector under test and each category prototype, and normalizing the squared Euclidean distance based on the Softmax function to obtain the probability that the fiber optic signal under test belongs to each category of intrusion behavior. The category with the highest probability is selected, and the intrusion type corresponding to this category is output as the intrusion behavior identification result of the fiber optic signal under test. The probability expression of the intrusion behavior is: , in, The fiber optic signal to be tested. For the category index to be traversed, For the set of all intrusion categories, The feature vector corresponding to the optical fiber signal under test. This is the prototype corresponding to the c-th type of intrusion behavior. For the first The prototype corresponding to the intrusion behavior.

[0015] Secondly, a lightweight fiber optic intrusion behavior recognition system based on few-shot learning includes: The signal preprocessing module is used to acquire the raw fiber optic sensing signal collected by the fiber optic sensing system, perform short-time Fourier transform and normalization processing on the raw fiber optic sensing signal, and obtain the time-frequency feature map. The feature extraction module is used to input the time-frequency feature map into a pre-constructed physically constrained lightweight convolutional network, extract the time-frequency features through asymmetric axial decomposition convolution, and obtain the feature vector corresponding to the original optical fiber sensing signal through asymmetric step downsampling and global average pooling. The model training module is used to train the physically constrained lightweight convolutional network with a few samples using a meta-learning mechanism, and iteratively optimize the network parameters with the negative log-likelihood loss of the query set samples to obtain the trained intrusion behavior recognition model. The behavior recognition module calculates the distance between the feature vector to be tested and the prototypes of each category, and outputs the intrusion type corresponding to the closest category prototype as the intrusion behavior recognition result of the fiber optic signal to be tested.

[0016] In summary, the present invention has the following beneficial technical effects: 1. This invention models fiber optic intrusion behavior recognition as a small-sample classification task and uses a prototype network-based meta-learning mechanism to construct geometric center prototypes for each category in the feature embedding space. This enables the model to achieve rapid convergence and high-precision recognition even under extreme conditions where only 5 to 10 labeled samples are provided for each category. This significantly reduces the dependence on large-scale labeled data and the costs of data collection and manual labeling.

[0017] 2. This invention designs an asymmetric axial decomposition convolution structure, decoupling the standard two-dimensional convolution orthogonally along the frequency axis and time axis into a frequency-sensitive path and a time-sensitive path. It also introduces a learnable physical scale factor to adaptively weight and fuse the outputs of the decoupled dual paths, thereby realizing the extraction of physical constraint features of the time-frequency characteristics of fiber optic sensing signals. This effectively avoids the problem of feature overlap and inter-class confusion caused by mutual interference of time-frequency domain features in small sample scenarios.

[0018] 3. This invention constructs a physically constrained lightweight convolutional neural network, employs asymmetric step-size downsampling to compress spectral redundancy and filter out steady-state environmental noise in the frequency dimension with a preset step size, and maintains resolution in the time dimension with another preset step size to retain transient feature information. It also combines a global average pooling layer to aggregate spatial semantic information, thereby achieving extreme compression of model parameters and a significant reduction in computational complexity, meeting the real-time inference requirements and millisecond-level response requirements of edge computing devices.

[0019] 4. This invention introduces a metric-based classification strategy into the meta-learning framework, using the Euclidean distance between the query sample and the prototype of each category as the basis for classification decisions. This replaces the traditional complex nonlinear classification hyperplane, achieving strong robustness to small sample distribution changes, significantly suppressing false alarms caused by environmental noise, and improving the model's generalization ability and recognition stability on unseen categories. Attached Figure Description

[0020] Figure 1 This is a schematic diagram illustrating the principle of a lightweight fiber optic intrusion behavior recognition method based on few-shot learning, according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the overall process of the lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of data preprocessing according to an embodiment of the present invention.

[0023] Figure 4 This is a schematic diagram of a physically constrained lightweight convolutional network structure according to an embodiment of the present invention.

[0024] Figure 5 This is a structural diagram of the internal structure of the asymmetric bottleneck unit in an embodiment of the present invention. Detailed Implementation

[0025] The present invention will be further described in detail below with reference to the accompanying drawings.

[0026] Example 1 Reference Figure 1 The lightweight fiber optic intrusion behavior recognition method based on few-shot learning in this embodiment includes: S1. Acquire the raw fiber optic sensing signal collected by the fiber optic sensing system, perform short-time Fourier transform and normalization on the raw fiber optic sensing signal to obtain the time-frequency characteristic map. S2. Input the time-frequency feature map into the pre-constructed physically constrained lightweight convolutional network, extract the time-frequency features through asymmetric axial decomposition convolution, and obtain the target feature vector corresponding to the original optical fiber sensing signal through asymmetric step downsampling and global average pooling. S3. A meta-learning mechanism is used to train a physically constrained lightweight convolutional network with a small number of samples, and the network parameters are iteratively optimized using the negative log-likelihood loss of the query set samples to obtain a trained intrusion behavior recognition model. S4. Calculate the distance between the feature vector to be tested and the prototypes of each category, and output the intrusion type corresponding to the closest prototype category as the intrusion behavior recognition result of the fiber optic signal to be tested.

[0027] Specifically, the lightweight fiber optic intrusion behavior recognition method based on few-shot learning includes the following: like Figure 1 , Figure 2 , Figure 3 As shown, S1, firstly, the raw fiber optic sensing signal collected by the fiber optic sensing system is acquired. The raw fiber optic sensing signal is usually the backscattered waveform data collected by the optical time domain reflectometer, which is a one-dimensional time series with a length of T sampling points. In this embodiment, T=1000. This one-dimensional time series directly contains the information of weak vibration or stress changes caused by the intrusion event, but it is also mixed with background noise and lacks intuitive spectral evolution characteristics.

[0028] To capture the dynamic coupling characteristics of intrusion behavior in the time and frequency dimensions, a short-time Fourier transform (SFT) is performed on the original fiber optic sensing signal, nonlinearly mapping the one-dimensional time series into a time-frequency graph. The SFT performs frame-by-frame windowing processing on the one-dimensional time series, calculating the local spectrum frame by frame. This preserves the signal's time-domain evolution information while introducing frequency-domain distribution information, giving the vibration signal induced by the intrusion behavior a discriminative texture structure on the time-frequency plane. This provides an input representation containing time-frequency coupling information for subsequent feature extraction.

[0029] Considering that different fiber optic sensing devices and deployment environments may lead to signal baseline drift or inconsistent amplitude dimensions, the time-frequency graph is normalized based on global statistics before being input into the deep learning model. Specifically, the global mean and global standard deviation of all sampling points in the time-frequency graph are calculated, and the amplitude of each sampling point is subtracted from the global mean and then divided by the global standard deviation. This unifies the amplitude distribution of different time-frequency graphs to the same dimension, resulting in a time-frequency feature map with a fixed size of 256×256.

[0030] The short-time Fourier transform and normalization are expressed as follows: , , in, The time-frequency diagram is obtained from the short-time Fourier transform. This is a one-dimensional time series corresponding to the original fiber optic sensing signal. It is a short-time Fourier transform. The global mean of the time-frequency plot. The global standard deviation of the time-frequency plot. The time-frequency feature map obtained after normalization is transformed into a time-frequency feature map with uniform dimensions and fixed size through this step.

[0031] like Figure 4 As shown in step S2, the time-frequency feature map obtained in step S1 is input into a pre-constructed physically constrained lightweight convolutional network for feature extraction. This network abandons the redundant depth and width of general image models, instead focusing on the physical characteristics of fiber optic sensing signals to achieve extreme parameter compression while ensuring feature extraction accuracy. This network does not treat the time-frequency feature map simply as an image; instead, it utilizes the physical redundancy of the fiber optic signal through an asymmetric adaptive path. Specifically, it includes three core designs: asymmetric axial decomposition convolution, asymmetric stride downsampling, and global average pooling.

[0032] This physically constrained lightweight convolutional network is constructed in the order of input transformation, axial decoupling, asymmetric downsampling, and semantic convergence. The network as a whole consists of a feature activation layer, four cascaded feature extraction stages, three asymmetric downsampling transition layers placed between adjacent stages, and a global average pooling output layer. Figure 5 As shown, each asymmetric bottleneck unit first completes channel expansion through 1×1 pointwise convolution, and then feeds the features in parallel into the frequency-sensitive path F and the time-sensitive path T. Path F uses 1×7 depth-separable convolution to extract the frequency axis formant distribution, and path T uses 7×1 depth-separable convolution to extract the time axis phase modulation and rhythm.

[0033] The two paths are weighted and fused using a learnable physical scale factor, then channel projection is performed using 1×1 pointwise convolution, and the channel projection is added to the shortcut branch. When the input and output sizes or the number of channels are inconsistent, the shortcut branch uses linear projection alignment. All three transition layers make the downsampling speed of the frequency axis higher than that of the time axis, and the number of channels is expanded from 64 dimensions to 128 dimensions, 192 dimensions, and 512 dimensions respectively. Finally, a 512-dimensional feature vector is obtained by global average pooling.

[0034] For asymmetric axial decomposition convolution, traditional convolution kernels assume that the time-frequency map has the same feature correlation in the horizontal and vertical directions. However, the frequency distribution of fiber optic signals exhibits structured sparsity, and the temporal evolution exhibits continuous causality. Therefore, this embodiment decomposes the standard two-dimensional convolution into depthwise separable convolutions of orthogonal 1×7 frequency-sensitive paths and 7×1 time-sensitive paths, and introduces learnable parameters to adaptively adjust the energy weights of the signal in different frequency bands and time dimensions. Specifically, orthogonal feature separation is first performed, decomposing the time-frequency feature map along two one-dimensional paths: the frequency axis path extracts frequency texture, and the time axis path extracts temporal rhythm. The calculation of the two one-dimensional paths is represented as follows: , , in, For input features, The kernel size is [size]. Depthwise separable convolutions with frequency-sensitive kernels are used to capture the formant distribution of signals. For frequency path output features, Depth-separable convolutions with time-sensitive kernels are used to capture the phase modulation and rhythm of vibrations. It outputs features for the time path; depthwise separable convolution ensures that each channel independently extracts its physical properties without causing dimensionality contamination.

[0035] Adaptive weighted fusion is then performed, introducing a learnable physical scale factor initialized to 0.5. The two decoupled paths are physically weighted and fused, and the upper limit of the response is limited by the ReLU6 activation function to improve the numerical stability of the embedded end after quantization, thus obtaining the decoupled time-frequency characteristics. The expression for adaptive weighted fusion is as follows: , in, For depthwise separable convolutions with frequency-sensitive kernels, For depthwise separable convolution with time-sensitive kernels, For input features, As a frequency-sensitive factor, it controls the model's capture strength of the spectral distribution. As a time-sensitive factor, it controls the model's response sensitivity to the time-domain envelope. For pointwise convolution, For batch normalization operations, To obtain the fused output features, decompose the convolution to reduce the number of parameters. The reduction to 2K is more importantly achieved at the operator level, which decouples the extraction of time-frequency domain features and avoids the mutual interference of features that is common in few-sample learning.

[0036] For asymmetric stride downsampling, the downsampling layer no longer uses pooling operations that suffer from significant information loss. Instead, it employs stride convolution with lossless bias. Furthermore, the downsampling stride is not set using a universally symmetrical ratio, but rather an asymmetric design based on the physical meaning of fiber optic signals. Specifically, the asymmetric stride ratio is defined as follows: ,in This is the frequency step size, used for rapidly compressing steady-state ambient noise in the frequency spectrum. The time step is used to maintain temporal resolution in the downsampling layer, ensuring that small transient features of intrusion behavior are not truncated by the step size.

[0037] Furthermore, to address semantic discontinuities during the evolution of channel number to higher dimensions, dynamic feature projection is used between downsampling layers to fuse features before and after downsampling. This allows the model to still trace back to previous low-level physical textures when extracting high-dimensional feature vectors, ensuring the continuity of the manifold mapping. The expression for dynamic feature projection is: , in, This is the input feature map before downsampling. It is an asymmetric step size operator. For linear projection mapping, For activation function, This is the output feature map after downsampling.

[0038] Based on the above core design, the feature vector calculation process of the physically constrained lightweight convolutional network includes the following four stages. The first stage is feature excitation and noise suppression: a shallow feature extraction is performed on the time-frequency feature map through a 3×3 convolutional layer with a stride of 2, mapping the single-channel signal to a 64-dimensional high-dimensional feature space, performing preliminary spatial downsampling, using the low-pass filtering characteristics of the convolutional kernel to filter out high-frequency white noise from the environment, and compressing spatial redundancy to lock in the energy-dense effective region for subsequent deep physical feature extraction.

[0039] The second stage is time-frequency axial decoupling extraction: the shallow features output from the first stage are input into the primary stage of the backbone network. The core operator is transformed into asymmetric axial decomposition convolution, and the computation flow is split into a 1×7 frequency axis path and a 7×1 time axis path. The former is responsible for capturing the formant distribution of the vibration signal, and the latter is responsible for capturing the beat and rhythm of the movement. A learnable physical scale factor is introduced. and At the end of the first layer of asymmetric downsampling, the time-frequency texture is decoupled and the number of channels is expanded to 128 dimensions, thus initially constructing the physical contour features of the intrusion behavior.

[0040] The third stage involves asymmetric sampling and manifold evolution: traditional pooling is abandoned between adjacent feature stages, and asymmetric stride convolution is used instead. This performs accelerated compression in the frequency dimension to filter out spectral redundancy, while maintaining slow sampling in the time dimension to preserve key phase transition information. After a second asymmetric downsampling transition layer, the number of channels is expanded from 128 dimensions to 192 dimensions through dynamic feature projection; subsequently, a third transition layer further expands it to 512 dimensions. This process not only changes the number of features but also maps scattered time-frequency pixels into physically meaningful behavioral semantic units, thereby enhancing the model's discriminative boundary in small-sample environments.

[0041] The fourth stage is semantic convergence and behavior discrimination: the high-level feature map output from the third stage is fed into the global average pooling layer, and the spatial dimension information is completely collapsed by calculating the global mean of each channel, and finally abstracted into a 512-dimensional feature vector.

[0042] In this embodiment, the theoretical parameter compression ratio of the axially decomposed convolutional kernel portion is expressed as: , In the formula, The parameter compression ratio represents the ratio of the number of parameters in standard convolution to that in axially decomposed convolution. The number of parameters for a standard convolution. Here, C represents the number of parameters for axial decomposition convolution, and C represents the number of channels participating in depthwise convolution. The kernel length is 1 / 2, which is taken in this embodiment. .

[0043] The aforementioned compression ratio of 3.5 is directly calculated from the number of convolutional kernel weights under the same channel count: a standard 7×7 depthwise convolution contains 49 weights per channel, and the two axial paths of 1×7 and 7×1 contain a total of 14 weights per channel. Therefore, the number of parameters in the axial spatial convolution part is 28.57% of the standard structure, theoretically reducing it by 71.43%, corresponding to a compression ratio of 49 / 14 = 3.5. This ratio only compares the spatial depthwise convolution part; the complete network also includes 1×1 channel expansion and projection, batch normalization, and shortcut branches. Its total number of parameters and computational cost should be calculated layer by layer according to the final model structure.

[0044] S3. A meta-learning mechanism is employed to train a physically constrained lightweight convolutional network for few samples, with the core being the improvement of the prototype network. In few-sample scenarios, traditional cross-entropy classification layers are prone to overfitting. Therefore, this embodiment utilizes the physically constrained lightweight convolutional network constructed in step S2 as an embedding encoder, mapping the original signal to a 512-dimensional manifold space. Instead of training a complex nonlinear classification hyperplane, a category prototype is constructed in a high-dimensional feature embedding space, and classification is achieved by measuring distance. The training of meta-learning is not based on samples but on tasks. The overall training process includes five stages: task sampling, embedding mapping, prototype calculation, loss function calculation, and iterative optimization.

[0045] In the task sampling phase, a training sample set is constructed on a task-by-task basis. For each training iteration, N types of intrusion behaviors (e.g., digging, climbing, knocking) are randomly selected from the training set. From each type, K samples are selected to construct the support set, and M samples are selected to construct the query set, forming an N-way K-shot small-sample task. The support set is a set containing N categories and K labeled samples from each category, used to calculate the prototype of each category in the embedding space. The query set is a set of unknown samples representing the real-time test samples to be identified, used to verify the model's generalization ability and drive the model to find the optimal boundary in the manifold space. The support set is represented as: , in, To support the collection, To support a centralized sample, For the sample Corresponding category tags, K represents the number of intrusion behavior categories extracted, and K represents the number of samples extracted for each category to construct the support set.

[0046] In the embedding mapping stage, all samples from the support set and query set are input into a physically constrained lightweight convolutional network for embedding mapping, obtaining a 512-dimensional feature vector corresponding to each sample. Assume the input one-dimensional fiber optic signal is mapped to a feature vector after feature extraction. ,in, Embedding mapping for physically constrained lightweight convolutional networks. These are the learnable parameters of the network.

[0047] In the prototype calculation phase, for each type of intrusion behavior in the support set, the arithmetic mean of the feature vectors obtained from embedding mapping of all samples of that type is calculated, and this arithmetic mean is used as the prototype corresponding to that type of intrusion behavior. Although the waveform details of the same type of intrusion behavior differ each time, its feature vectors always revolve around a central point. This prototype is the geometric center in the feature space that encapsulates the essential physical features of that type, representing the position of that type of intrusion behavior in the embedding space. The prototype corresponding to the c-th type of intrusion behavior is represented as follows: , in, To support the collection of samples belonging to the c-th type of intrusion behavior, Embedding mapping for physically constrained lightweight convolutional networks. These are the learnable parameters of the network. This is the prototype corresponding to the c-th type of intrusion behavior. For sample set The number of samples in the sample.

[0048] In the loss function calculation stage, for each sample in the query set, the negative log-likelihood loss of the query set samples is calculated based on the 512-dimensional feature vector corresponding to each sample and the prototype of each category. The network parameters of the physically constrained lightweight convolutional network are updated with the goal of minimizing the negative log-likelihood loss. By minimizing this loss, the model is forced to cluster similar signals and push away dissimilar signals. The negative log-likelihood loss is expressed as: , in, For loss function, For all learnable weights in the network, For the query set sample, For query samples The corresponding real tags, For query samples The actual category of intrusion, The query samples will be used for the intrusion behavior identification model. The first is judged as the The probability of a class.

[0049] In the iterative optimization phase, the process of sampling and calculating the loss function is repeated multiple times, with training performed on a task-by-task basis, until the negative log-likelihood loss converges, resulting in a trained intrusion behavior recognition model. Through multiple rounds of task-by-task training, the model learns to extract discriminative features rather than memorizing specific samples, thus enabling it to quickly adapt to new intrusion types even with very small sample sizes.

[0050] To provide a reproducible convergence criterion, this embodiment calculates the moving average of the negative log-likelihood loss of the query set and the recognition accuracy on the independent validation task set after every 50 meta-learning tasks are completed. The convergence criterion is as follows: , in, Let be the relative rate of change of the negative log-likelihood loss of the query set at the t-th detection. Let be the moving average of the negative log-likelihood loss of the query set calculated on the independent validation task set at the t-th detection. For the tth The moving average of the negative log-likelihood loss for the query set during a single detection. Let be the query set sample recognition accuracy calculated on the independent validation task set at the t-th detection. For the tth The recognition accuracy rate corresponding to one detection.

[0051] The model is considered converged when both of the above conditions are met consecutively for 10 detections. If the above conditions are not met, training is terminated after 300 rounds or a cumulative total of 20,000 meta-learning tasks, and the network parameters with the lowest validation loss are retained. Through multiple rounds of task-based training, the model learns discriminative feature representations rather than memorizing specific samples, thus enabling it to quickly adapt to changes in intrusion types under conditions of extremely small sample sizes.

[0052] S4. In this embodiment, the edge device (such as an optical fiber sensor node) receives the optical fiber signal to be tested in real time, performs the short-time Fourier transform and normalization processing described in step S1 on the optical fiber signal to be tested, obtains the corresponding time-frequency feature map, and then inputs the time-frequency feature map into the intrusion behavior recognition model trained in step S3, performs the feature extraction described in step S2, and obtains the 512-dimensional feature vector to be tested corresponding to the optical fiber signal to be tested.

[0053] During the identification phase, the system does not require complex classification calculations. It only needs to calculate the distance between the feature vector to be tested and the pre-stored prototypes of each category, and classify the fiber optic signal to be tested into the intrusion type represented by the nearest prototype based on the nearest neighbor principle. Specifically, it first calculates the squared Euclidean distance between the feature vector to be tested and the prototypes of each category obtained in step S3. The smaller the squared Euclidean distance, the closer the position of the fiber optic signal to that category in the feature space is to that category, and the greater the probability that it belongs to that category. The squared Euclidean distance is expressed as: , in, The fiber optic signal to be tested. Embedding mapping for physically constrained lightweight convolutional networks. The feature vector corresponding to the optical fiber signal under test. This is the prototype corresponding to the c-th type of intrusion behavior. For the feature vector to be tested and the prototype The square of the Euclidean distance between them.

[0054] Subsequently, the squared Euclidean distance between the feature vector under test and each category prototype is normalized using the Softmax function, converting the distance metric into a probability distribution to obtain the probability that the fiber optic signal under test belongs to each category of intrusion behavior. The probability expression for intrusion behavior is as follows: , in, Let be the probability that the fiber optic signal under test belongs to the c-th type of intrusion behavior.

[0055] Finally, the category with the highest probability is selected, and the intrusion type corresponding to this category is output as the intrusion behavior identification result of the fiber optic signal under test. That is, as long as the position of the fiber optic signal under test in the high-dimensional feature space is closest to a certain category prototype, it is determined that it belongs to the intrusion behavior represented by that prototype.

[0056] Through this step, the system does not need to learn how to classify; it only needs to calculate the distance. This metric-based classification strategy not only greatly reduces the number of model parameters and sensitivity to the number of samples, but also effectively avoids overfitting problems with small samples.

[0057] Example 2 The difference between this embodiment and Embodiment 1 is that this embodiment provides a simulation experiment of a lightweight fiber optic intrusion behavior recognition method based on few-shot learning; Verification example: Simulation comparison experiment To verify the effectiveness of asymmetric axial decomposition and prototype metric under small sample and low signal-to-noise ratio conditions, a reproducible simulation validation set was constructed without using field-collected data. The simulation signals included five categories: digging, climbing, striking, cutting, and walking. Each sample contained 1000 sampling points at a sampling frequency of 500Hz. After passing through a Hanning window of length 128, a short-time Fourier transform with a step size of 16, and normalization, the samples were uniformly scaled to a 64×64 time-frequency graph. The training set contained 30 samples per category, and the test set contained 100 samples per category. The training signal-to-noise ratio was randomly selected. The signal-to-noise ratio was randomly selected during the test, ranging from 1dB to 13dB. 9dB ​​to 6dB, plus frequency drift of no more than ±18%, to simulate equipment differences and environmental changes.

[0058] To isolate and verify the effect of axial decoupling itself, the short-time Fourier transform, normalization, support set prototype calculation, and nearest-prototype classification rules were fixed, and only the feature construction method was changed. The control method directly forms a 256-dimensional feature by averaging the time-frequency graph to 16×16; the corresponding method in this application extracts the mean, difference, maximum value, and standard deviation along the frequency axis and time axis respectively, and fuses them into a 512-dimensional axial feature. 5-way 5-shot and 5-way 10-shot tests were performed respectively, with 50 random samplings of the support set for each setting. The test results were calculated as the mean and standard deviation.

[0059] Table 1. Simulation results of small sample recognition As shown in Table 1, under simulated low signal-to-noise ratio and frequency drift conditions, the axial decomposition feature prototype method improves the 5-shot recognition accuracy by 8.79 percentage points and the 10-shot recognition accuracy by 9.35 percentage points compared to the direct time-frequency map prototype method; the corresponding Macro-F1 scores are improved by 8.28 and 8.93 percentage points, respectively. These results indicate that after modeling the frequency axis resonance structure and the time axis rhythm structure respectively, similar samples exhibit stronger aggregation in the prototype space and lower sensitivity to noise and scale drift. The above data are used to illustrate the mechanism of axial decoupling technology and the small-sample classification trend, and do not replace field testing on actual fiber optic lines; during engineering deployment, data collected from the target line should be used to further verify the accuracy, false alarm rate, and real-time performance.

[0060] Example 3 This embodiment provides a lightweight fiber optic intrusion behavior recognition system based on few-shot learning, including: The signal preprocessing module is used to acquire the raw fiber optic sensing signal collected by the fiber optic sensing system, perform short-time Fourier transform and normalization processing on the raw fiber optic sensing signal, and obtain the time-frequency feature map. The feature extraction module is used to input the time-frequency feature map into a pre-constructed physically constrained lightweight convolutional network, extract the time-frequency features through asymmetric axial decomposition convolution, and obtain the feature vector corresponding to the original optical fiber sensing signal through asymmetric step downsampling and global average pooling. The model training module is used to train the physically constrained lightweight convolutional network with a few samples using a meta-learning mechanism, and iteratively optimize the network parameters with the negative log-likelihood loss of the query set samples to obtain the trained intrusion behavior recognition model. The behavior recognition module calculates the distance between the feature vector to be tested and the prototypes of each category, and outputs the intrusion type corresponding to the closest category prototype as the intrusion behavior recognition result of the fiber optic signal to be tested.

[0061] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A lightweight fiber optic intrusion behavior recognition method based on few-shot learning, characterized in that, include: The original fiber optic sensing signal collected by the fiber optic sensing system is acquired, and the original fiber optic sensing signal is subjected to short-time Fourier transform and normalization processing to obtain the time-frequency feature map. The time-frequency feature map is input into a pre-constructed physically constrained lightweight convolutional network. The time-frequency features are decoupled and extracted through asymmetric axial decomposition convolution. After asymmetric step-size downsampling and global average pooling, the target feature vector corresponding to the original optical fiber sensing signal is obtained. A meta-learning mechanism is used to train a physically constrained lightweight convolutional network with few samples, and the network parameters are iteratively optimized using the negative log-likelihood loss of the query set samples to obtain a trained intrusion behavior recognition model. Calculate the distance between the feature vector to be tested and the prototypes of each category, and output the intrusion type corresponding to the closest prototype category as the intrusion behavior recognition result of the fiber optic signal to be tested.

2. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 1, characterized in that, The original optical fiber sensing signal is subjected to short-time Fourier transform and normalization processing, including obtaining the original optical fiber sensing signal collected by the optical fiber sensing system. The original optical fiber sensing signal is a one-dimensional time series containing information on vibration or stress changes caused by an intrusion event. Short-time Fourier transform is performed on the original fiber optic sensing signal to nonlinearly map the time-domain waveform into a time-frequency representation, so as to capture the dynamic coupling characteristics of intrusion behavior in the time and frequency dimensions. The time-frequency representation is normalized based on global statistics to obtain a time-frequency feature map. , , in, The time-frequency diagram is obtained from the short-time Fourier transform. This is a one-dimensional time series corresponding to the original fiber optic sensing signal. It is a short-time Fourier transform. The global mean of the time-frequency plot. The global standard deviation of the time-frequency plot. This is the time-frequency feature map obtained after normalization.

3. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 1, characterized in that, The decoupling extraction of time-frequency features through asymmetric axial decomposition convolution includes decomposing the input features of the time-frequency feature map along two orthogonal one-dimensional paths, extracting the formant distribution features of the frequency dimension through depth-separable convolution of the frequency-sensitive kernel, and extracting the phase modulation and rhythm features of the time dimension through depth-separable convolution of the time-sensitive kernel. A learnable physical scale factor is introduced to adaptively weight and fuse the outputs of the two one-dimensional paths to obtain the decoupled time-frequency features. The expression for the adaptive weighted fusion is as follows: , in, For depthwise separable convolutions with frequency-sensitive kernels, For depthwise separable convolution with time-sensitive kernels, For input features, , For adaptive physical scale factor, For pointwise convolution, For batch normalization operations, These are the output features after fusion.

4. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 3, characterized in that, The asymmetric stride downsampling includes replacing pooling operations with asymmetric stride convolution in the downsampling layer, defining an asymmetric stride ratio, performing fast compression in the frequency dimension to filter out steady-state environmental noise in the spectrum, and maintaining resolution in the time dimension. Between downsampling layers, features before and after downsampling are fused using dynamic feature projection. The expression for dynamic feature projection is: , in, This is the input feature map before downsampling. It is an asymmetric step size operator. For linear projection mapping, For activation function, This is the output feature map after downsampling.

5. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 4, characterized in that, The process of obtaining the feature vector corresponding to the original fiber optic sensing signal specifically includes: The first stage, feature excitation and noise suppression, involves shallow feature extraction and preliminary spatial downsampling of the time-frequency feature map through convolutional layers, filtering out high-frequency white noise from the environment and compressing spatial redundancy. In the second stage, time-frequency axial decoupling extraction is performed. The shallow features output from the first stage are input into the backbone network. The time-frequency texture is decoupled through asymmetric axial decomposition convolution and learnable physical scale factors to construct the physical contour features of the intrusion behavior. In the third stage, asymmetric sampling and manifold evolution input the decoupled features output from the second stage into the downsampling layer. Through asymmetric stride convolution, a double compression is performed in the frequency dimension and a low sampling is maintained in the time dimension, mapping the scattered pixels into behavioral semantic units. In the fourth stage, semantic convergence and behavior discrimination, the high-level feature map output from the third stage is input into the global average pooling layer. By calculating the global mean of each channel, the information in the spatial dimension is collapsed to obtain the corresponding feature vector.

6. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 1, characterized in that, The method of using a meta-learning mechanism to train a physically constrained lightweight convolutional network with few samples includes constructing a training sample set on a task-by-task basis, randomly selecting N types of intrusion behaviors from the training set for each training session, and selecting K samples from each type to construct a support set and M samples to construct a query set. All samples from the support set and query set are respectively input into a physically constrained lightweight convolutional network for embedding mapping to obtain the multi-dimensional feature vector corresponding to each sample. The support set is represented as follows: , in, To support the collection, To support a centralized sample, For the sample Corresponding category tags, K represents the number of intrusion behavior categories extracted, and K represents the number of samples extracted for each category to construct the support set.

7. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 6, characterized in that, The method of using a meta-learning mechanism to train a physically constrained lightweight convolutional network with few samples also includes, for each type of intrusion behavior in the support set, calculating the arithmetic mean of the feature vectors obtained by embedding mapping for all samples of that type, and using the arithmetic mean as the prototype corresponding to that type of intrusion behavior. Therefore, the prototype corresponding to the c-th type of intrusion behavior is represented as: , in, To support the collection of samples belonging to the c-th type of intrusion behavior, Embedding mapping for physically constrained lightweight convolutional networks. These are the learnable parameters of the network. This is the prototype corresponding to the c-th type of intrusion behavior.

8. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 7, characterized in that, The iterative optimization of network parameters using the negative log-likelihood loss of the query set samples includes, for each sample in the query set, calculating the negative log-likelihood loss of the query set samples based on the multidimensional feature vector corresponding to each sample and the prototype of each category, and updating the network parameters of the physically constrained lightweight convolutional network with the objective of minimizing the negative log-likelihood loss. The negative log-likelihood loss is expressed as: , in, For loss function, For all learnable weights in the network, For the query set sample, For query samples The corresponding real tags, For query samples The actual category of intrusion, The query samples will be used for the intrusion behavior identification model. The first is judged as the The probability of a class.

9. The lightweight fiber optic intrusion behavior recognition method based on few-shot learning according to claim 1, characterized in that, The output of the intrusion behavior identification result of the fiber optic signal under test includes calculating the squared Euclidean distance between the feature vector under test and the prototype of each category, and normalizing the squared Euclidean distance based on the Softmax function to obtain the probability that the fiber optic signal under test belongs to each category of intrusion behavior. The category with the highest probability is selected, and the intrusion type corresponding to this category is output as the intrusion behavior identification result of the fiber optic signal under test. The probability expression of the intrusion behavior is: , in, The fiber optic signal to be tested. For the category index to be traversed, For the set of all intrusion categories, The feature vector corresponding to the optical fiber signal under test. This is the prototype corresponding to the c-th type of intrusion behavior. For the first The prototype corresponding to the intrusion behavior.

10. A lightweight fiber optic intrusion behavior recognition system based on few-shot learning, executing the method of claim 1, characterized in that, include: The signal preprocessing module is used to acquire the raw fiber optic sensing signal collected by the fiber optic sensing system, perform short-time Fourier transform and normalization processing on the raw fiber optic sensing signal, and obtain the time-frequency feature map. The feature extraction module is used to input the time-frequency feature map into a pre-constructed physically constrained lightweight convolutional network, extract the time-frequency features through asymmetric axial decomposition convolution, and obtain the feature vector corresponding to the original optical fiber sensing signal through asymmetric step downsampling and global average pooling. The model training module is used to train the physically constrained lightweight convolutional network with a few samples using a meta-learning mechanism, and iteratively optimize the network parameters with the negative log-likelihood loss of the query set samples to obtain the trained intrusion behavior recognition model. The behavior recognition module calculates the distance between the feature vector to be tested and the prototypes of each category, and outputs the intrusion type corresponding to the closest category prototype as the intrusion behavior recognition result of the fiber optic signal to be tested.