Optical fiber vibration event classification method and device fusing global and local features
By fusing global and local features and using convolutional layers and self-attention mechanisms to process fiber optic vibration event data, the problems of low classification accuracy and high false alarm rate in existing technologies are solved, and more efficient fiber optic vibration event classification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO INST OF TECH ZHEJIANG UNIV ZHEJIANG
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-24
AI Technical Summary
Existing fiber optic vibration event classification methods rely on a single deep learning model or manually designed feature extractors, which makes it difficult to effectively model global context and long-range correlations, resulting in poor classification accuracy, high false alarm rate, and difficulty in adapting to various application scenarios.
A method that integrates global and local features is adopted. Local features are extracted through the first convolutional layer, global correlation features are extracted through the two-stream transformation layer, and self-attention mechanism is used for feature fusion and differentiation, including window sliding convolution, two-stream transformation, multi-head self-attention layer and feedforward network layer processing.
It improves the classification accuracy of fiber optic vibration events, reduces the false alarm rate, can adapt to various application scenarios, and enhances generalization ability.
Smart Images

Figure CN121919637A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of fiber optic sensor event classification, and in particular to a method and apparatus for classifying fiber optic vibration events by integrating global and local features. Background Technology
[0002] Currently, existing methods for classifying fiber optic vibration events primarily rely on single deep learning models or manually designed feature extractors. However, single convolutional neural networks and long short-term memory (LSTM) deep learning models tend to focus on local patterns or short-range dependencies, making it difficult to effectively model global context and long-range correlations. This limits their ability to fully capture the complex spatiotemporal characteristics of fiber optic vibration events and their generalization capabilities. Manually designed feature extractors, on the other hand, rely heavily on expert experience, have limited feature representation capabilities, and cannot adapt to the diverse variations in vibration signals across different scenarios. Consequently, existing methods may result in poor classification accuracy, high false alarm rates, and difficulty in adapting to various application scenarios. Summary of the Invention
[0003] This disclosure provides a fiber optic vibration event classification method and apparatus that integrates global and local features, which can, to some extent, solve the problems that existing methods may lead to poor classification accuracy, high false alarm rate, and difficulty in adapting to various application scenarios.
[0004] According to one aspect of this disclosure, a method for classifying optical fiber vibration events by fusing global and local features is provided. The method includes: acquiring optical fiber vibration events to be classified; the optical fiber vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer; extracting local features of the optical fiber vibration events to be classified based on a first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the optical fiber vibration events to be classified; the local features include at least local peak values and local waveforms; extracting global correlation features of the optical fiber vibration events to be classified based on a two-stream conversion layer; the two-stream conversion layer is used to separate the optical fiber vibration events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; inputting the local features and global correlation features into a second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of the local features and global correlation features; inputting the fused features into a single-stream conversion layer to obtain distinguishing features; the single-stream conversion layer is used to determine the distinguishing features of the fused features based on a self-attention mechanism; and determining the target classification event based on the distinguishing features.
[0005] Furthermore, according to one aspect of the method of this disclosure, the method further includes: repeatedly extracting local features and global associated features at least twice; and inputting the repeatedly extracted local feature and associated feature data into a second convolutional layer.
[0006] Furthermore, according to one aspect of the method of this disclosure, target classification events include: background noise, digging, knocking, watering, shaking, and walking.
[0007] Furthermore, according to one aspect of the method of this disclosure, local features of optical fiber vibration events to be classified are extracted based on a first convolutional layer, including: flattening the optical fiber vibration events to be classified to obtain flattened events to be classified; flattening is used to reduce dimensionality or order of magnitude; window sliding convolution is performed on the flattened events to be classified based on the convolution kernel and sliding window length of the first convolutional layer to obtain data after convolution operation; batch normalization, activation function enhancement, max pooling and random deactivation are sequentially performed on the data after convolution operation to obtain local features.
[0008] Furthermore, according to one aspect of the method disclosed herein, based on a dual-stream conversion layer, global correlation features of fiber vibration events to be classified are extracted, including: performing spatial pooling and temporal pooling on the fiber vibration events to be classified respectively to obtain a first spatial feature and a first temporal feature; inputting the first spatial feature into multiple spatial stream conversion layers for global spatial correlation and achieving a first expansion to obtain a second spatial feature; inputting the first temporal feature into multiple temporal stream conversion layers for global temporal correlation and achieving a second expansion to obtain a second temporal feature; and concatenating and merging the second spatial feature and the second temporal feature to obtain global correlation features; the concatenation and merging includes: dimension combination and feature overlay.
[0009] Furthermore, according to one aspect of the method of this disclosure, local features and global correlation features are input into a second convolutional layer to obtain fused features, including: preprocessing the local and global correlation features; the preprocessing includes: dimension adaptation and feature normalization; based on the convolutional kernel of the second convolutional layer, the preprocessed local features and global correlation features are convolved one by one to obtain fused data; the fused data is then subjected to batch normalization, activation function enhancement, max pooling, and random deactivation processing in sequence to obtain fused features.
[0010] Furthermore, according to one aspect of the method of this disclosure, the single-stream conversion layer includes a multi-head self-attention layer and a feedforward network layer; the multi-head self-attention layer includes: a first normalization unit, a first fully connected layer and a splicing layer; the feedforward network layer includes: a second normalization unit, a second fully connected layer and a third fully connected layer.
[0011] Furthermore, according to one aspect of the method disclosed herein, inputting fused features into a single-stream transformation layer to obtain target features includes: inputting the fused features into the first normalization unit of a multi-head self-attention layer to obtain normalized fused features; inputting the normalized fused features into a first fully connected layer to convert them into self-attention features; the self-attention features include: query, key, and value; based on self-attention weights, weighting and aggregating the self-attention features and inputting them into a concatenation layer to obtain multi-head attention output data; inputting the multi-head attention output data into the second normalization unit of a feedforward network layer, and sequentially passing through a second fully connected layer and a third connected layer for dimensionality expansion and enhancement to obtain distinguishable features.
[0012] According to another aspect of this disclosure, a fiber optic vibration event classification device that fuses global and local features is provided. The device includes: an acquisition unit for acquiring fiber optic vibration events to be classified; the fiber optic vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer; a first extraction unit for extracting local features of the fiber optic vibration events to be classified based on a first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the fiber optic vibration events to be classified; the local features include at least local peak values and local waveforms; a second extraction unit for extracting global correlation features of the fiber optic vibration events to be classified based on a two-stream conversion layer; the two-stream conversion layer is used to separate the fiber optic vibration events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; a fusion unit for inputting the local features and global correlation features into the second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of the local features and global correlation features; a differentiation unit for inputting the fused features into a single-stream conversion layer to obtain differentiation features; the single-stream conversion layer is used to determine the differentiation of the fused features based on a self-attention mechanism; and a classification unit for determining the target classification event based on the differentiation features.
[0013] According to another aspect of this disclosure, an electronic device is provided, comprising: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in any embodiment of one aspect.
[0014] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided for storing computer-readable instructions that, when executed by a processor, cause the processor to perform the method as described in any embodiment of one aspect.
[0015] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method as described in any embodiment of one aspect.
[0016] This disclosure provides a method and apparatus for classifying optical fiber vibration events by fusing global and local features. The method involves: acquiring optical fiber vibration events to be classified, including spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer; extracting local features of the optical fiber vibration events based on a first convolutional layer; the first convolutional layer performing window sliding convolution on the optical fiber vibration events; the local features including at least local peak values and local waveforms; extracting global correlation features of the optical fiber vibration events based on a two-stream conversion layer; the two-stream conversion layer separating the optical fiber vibration events into spatial and temporal dimensions for global correlation extraction; the global correlation features including at least temporal persistence and spatial propagation characteristics; inputting the local features and the global correlation features into a second convolutional layer to obtain fused features; the second convolutional layer performing dimensional alignment and fusion of the local features and the global correlation features; inputting the fused features into a single-stream conversion layer to obtain distinguishing features; the single-stream conversion layer determining the distinguishing features based on a self-attention mechanism; and determining the target classification event based on the distinguishing features. In this way, compared to existing single deep learning models that can only capture local or short-range features and manual feature extractors with weak generalization ability, this disclosure can simultaneously extract features that take into account both local details and global correlations. It also leverages a two-stream transformation layer to model the global laws of spatial propagation and temporal persistence, and further strengthens key distinguishing information through feature fusion and the self-attention mechanism of a single-stream transformation layer. This avoids the limitations of single models in representing complex spatiotemporal features and eliminates the reliance on manual feature design, improving the comprehensiveness of feature representation while enhancing generalization and adaptability. In summary, the technical solution provided by this disclosure can improve classification accuracy, reduce false positive rate, and is adaptable to various application scenarios.
[0017] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0018] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0019] Figure 1 A flowchart illustrating a fiber optic vibration event classification method that integrates global and local features, provided as an embodiment of this disclosure; Figure 2 A schematic diagram illustrating different target classification events provided in embodiments of this disclosure; Figure 3 This is a schematic diagram of the structure of a single-stream conversion layer provided in an embodiment of this disclosure; Figure 4 A schematic flowchart illustrating the complete classification of fiber optic vibration events provided for embodiments of this disclosure; Figure 5 A schematic diagram showing the results of comparing the accuracy of different methods for classifying fiber optic vibration events according to embodiments of this disclosure; Figure 6 A schematic diagram showing the accuracy comparison between the method of this disclosure and a method without a conversion layer, provided in the embodiments of this disclosure; Figure 7 A schematic diagram showing the comparison of the accuracy of target classification events classified by different methods in an embodiment of this disclosure; Figure 8 A structural block diagram of an optical fiber vibration event classification device that integrates global and local features, provided in an embodiment of this disclosure; Figure 9 This is a hardware block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0021] Currently, existing methods for classifying fiber optic vibration events primarily rely on single deep learning models or manually designed feature extractors. However, single convolutional neural networks and long short-term memory (LSTM) deep learning models tend to focus on local patterns or short-range dependencies, making it difficult to effectively model global context and long-range correlations. This limits their ability to fully capture the complex spatiotemporal characteristics of fiber optic vibration events and their generalization capabilities. Manually designed feature extractors, on the other hand, rely heavily on expert experience, have limited feature representation capabilities, and cannot adapt to the diverse variations in vibration signals across different scenarios. Consequently, existing methods may result in poor classification accuracy, high false alarm rates, and difficulty in adapting to various application scenarios.
[0022] Therefore, to address the aforementioned problems, this disclosure provides a fiber optic vibration event classification method that integrates global and local features. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a fiber optic vibration event classification method that integrates global and local features, as provided in an embodiment of this disclosure. Figure 1 As shown, the method includes: In step S101, the fiber vibration events to be classified are acquired; the fiber vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer. In step S102, local features of the fiber vibration events to be classified are extracted based on the first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the fiber vibration events to be classified; the local features include at least local peaks and local waveforms; In step S103, based on the dual-stream conversion layer, global correlation features of the fiber vibration events to be classified are extracted; the dual-stream conversion layer is used to separate the fiber vibration events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; In step S104, local features and global related features are input into the second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of local features and global related features. In step S105, the fused features are input into the single-stream conversion layer to obtain distinguishable features; the single-stream conversion layer is used to determine the distinguishability of the fused features based on the self-attention mechanism. In step S106, the target classification event is determined based on the distinguishing features.
[0023] In this disclosure, the fiber vibration event to be classified can be understood as a vibration signal event of a type to be determined, detected on the sensing fiber by a phase-sensitive optical time-domain reflectometer (Φ-OTDR). The fiber vibration event to be classified may include spatiotemporal data, which can be understood as vibration response data at different spatial locations of the fiber that change over time.
[0024] In this disclosure, the first convolutional layer can be understood as a convolutional neural network layer used to extract local features. It can perform window sliding operations through convolutional kernels of a preset size to capture local details in the data.
[0025] In this disclosure, local features can be understood as the characteristic information of an optical fiber vibration event within a local spatiotemporal range. The local features of this disclosure may include, but are not limited to, local peak values and local waveforms. A local peak value can be understood as the maximum intensity of the vibration signal at a specific local spatiotemporal location. A local waveform can be understood as the morphological change characteristics of the vibration signal within a small temporal or spatial interval.
[0026] In this disclosure, the dual-stream conversion layer can be understood as a module that splits spatiotemporal data into two independent branches, space and time, and extracts global correlation information for each. In this disclosure, global correlation features can be understood as the correlation patterns of optical fiber vibration events within the overall spatiotemporal scope. The global correlation features of this disclosure may include, but are not limited to, temporal duration patterns and spatial propagation characteristics. Temporal duration patterns can be understood as at least one pattern, such as the duration and frequency variation of the vibration event in the time dimension. Spatial propagation characteristics can be understood as at least one characteristic, such as the propagation speed and range of the vibration signal at different spatial locations in the optical fiber.
[0027] In this disclosure, the second convolutional layer can be understood as a convolutional neural network layer used for dimension matching and feature fusion of local features and globally related features.
[0028] In this disclosure, fusion features can be understood as comprehensive features that integrate local details and global correlation information, and include both fine-grained information (corresponding to local) and coarse-grained information (corresponding to global) of vibration events.
[0029] In this disclosure, the single-stream transformation layer can be understood as a feature processing module based on a self-attention mechanism, which can be used to capture the difference information of different dimensions in the fused features.
[0030] In this disclosure, distinguishing features can be understood as key features that can differentiate between different types of fiber optic vibration events, highlighting the core differences between various events.
[0031] In this disclosure, the target classification event can be understood as the type of optical fiber vibration event to be classified that is ultimately determined. The target classification events of this disclosure include, but are not limited to: background noise, digging, knocking, watering, shaking, and walking. Background noise can refer to vibration signals generated by at least one of the following when there is no specific vibration source: environmental electromagnetic interference, optical fiber thermal noise, etc.; digging is vibration caused by digging equipment acting on the ground, characterized by long duration, wide spatial propagation range, and stable frequency; knocking can be instantaneous vibration caused by a hard object impacting the optical fiber or surrounding structures, with an extremely short duration, sharp local peaks, fast spatial propagation speed, and significant attenuation; watering can be vibration caused by water flowing onto the ground or optical fiber accessories; shaking is mostly caused by wind or external forces pushing the optical fiber carrier; walking can be vibration caused by personnel walking along the optical fiber, with a duration matching the number of steps taken, a local waveform of continuous small pulses, and rapid attenuation with distance in spatial propagation. For example, Figure 2Figure 2 is a schematic diagram of different target classification events provided in the embodiments of this disclosure. As can be seen from Figure 2, the vibration signals of different target classification events show obvious differences: (a) the amplitude fluctuation of the background noise is fragmented and irregular, with low overall intensity and no concentrated feature areas in either the spatial or temporal dimensions; (b) the vibration amplitude of digging is concentrated and stable, with a wide coverage in the temporal dimension and a wider propagation range in the spatial dimension; (c) the amplitude peak of the knocking sound is sharp but the duration is extremely short, forming prominent features only in local time and space, and then decays rapidly; (d) the vibration amplitude of watering fluctuates more frequently, with moderate overall intensity and relatively dispersed distribution in the temporal and spatial dimensions; (e) the shaking vibration shows periodic amplitude fluctuations with obvious fluctuation patterns in the temporal dimension; (f) the vibration of walking is characterized by continuous small-amplitude pulse peaks, with the time interval matching the walking rhythm and clear spatial attenuation characteristics.
[0032] Specifically, the following steps can be performed when classifying fiber optic vibration events: First, acquire spatiotemporal data of the sensing fiber using a phase-sensitive optical time-domain reflectometer; second, input the preprocessed data into the first convolutional layer, perform convolution operations using a pre-sized kernel and a window with a pre-defined stride, and extract a local feature matrix containing information such as local peak positions and waveforms; third, input the spatiotemporal data into the spatial and temporal branches of the dual-stream conversion layer. The spatial branch uses global average pooling to obtain the feature mean of each spatial point and inputs it into multiple cascaded spatial stream conversion layers. The temporal branch uses temporal pooling to obtain the feature sequence of each time node and inputs it into multiple cascaded temporal stream conversion layers. The outputs of the two branches are combined in terms of dimensions and superimposed on features to form a global correlation feature containing information such as time duration period and spatial propagation distance. In the fourth step, the local features and global correlation features are input into the second convolutional layer. The dimensions of the two are unified by a preset convolution kernel. After element-wise convolution, a fused feature with both fine-grained (local) and coarse-grained (global) information is generated. In the fifth step, the fused feature is fed into a single-stream transformation layer. After normalization, self-attention is calculated and the final output is a distinguishing feature that highlights the differences between events. Finally, by calculating the cosine similarity between the distinguishing feature to be classified and the features of each category, the category with the highest similarity is selected as the target classification result, thus completing the entire classification process of optical fiber vibration events.
[0033] The following section further elaborates on the fiber optic vibration event classification method that integrates global and local features, including: Extract local features and global correlation features at least twice; The repeatedly extracted local and associated feature data are input into the second convolutional layer.
[0034] In this embodiment, local features and globally correlated features can be repeatedly extracted. The core purpose of repeatedly extracting local and globally correlated features is to uncover hidden deep patterns and subtle differences in fiber optic vibration signals through multiple rounds of feature enhancement. By repeating the extraction process two or more times, iterative optimization can be performed based on the previous round of feature results, gradually removing noise interference while enhancing the representational capabilities of local and globally correlated features. This allows the feature map processed by the second convolutional layer to further compress feature dimensions and retain key information. This combination of multi-round feature extraction and hierarchical convolutional processing effectively improves the accuracy of distinguishing similar vibration events compared to traditional single-step feature extraction schemes.
[0035] The following will explain in detail how to perform the first convolution to extract local features, including: The fiber vibration events to be classified are flattened to obtain the flattened events; flattening is used to reduce dimensionality or order of magnitude. Based on the convolution kernel and sliding window length of the first convolutional layer, window sliding convolution is performed on the flattened events to be classified to obtain the data after convolution operation; The data after convolution are processed sequentially with batch normalization, activation function enhancement, max pooling, and random deactivation to obtain local features.
[0036] In this disclosure, flattening can be understood as the process of converting the original two-dimensional or multi-dimensional signals of fiber optic vibration events into one-dimensional vectors.
[0037] In this disclosure, the convolution kernel of the first convolutional layer can be understood as a feature detector used to capture local patterns of optical fiber vibration signals. Essentially, it is a set of preset, learnable weight parameters that can identify discriminative local features such as vibration peaks through dot product operations with local regions. Different convolution kernels can detect different types of feature patterns and can be flexibly adjusted.
[0038] In this disclosure, the sliding window length can be understood as the length of the signal covered each time the convolution kernel slides across the flattened one-dimensional vibration signal. Its value can be set in conjunction with the characteristic scale of the vibration event.
[0039] In this disclosure, batch normalization can be understood as the process of standardizing and calibrating the data after convolution. Batch normalization can constrain the data to a reasonable numerical range by performing processes such as zeroing the mean and normalizing the variance of each batch of data.
[0040] In this disclosure, activation function enhancement can be understood as injecting nonlinear expressive power into the feature extraction process to obtain high-fitness and complex feature relationships.
[0041] In this disclosure, max pooling can be understood as a dimensionality reduction operation on activated features. It can select the maximum value within a preset pooling window as the output of that window, thereby significantly reducing the amount of feature data and lowering computational costs while preserving the most significant local features within the window.
[0042] In this disclosure, random deactivation can be understood as a feature selection process. This operation can randomly set the output of some feature nodes to zero, forcing them to avoid over-reliance on these specific local features, while reducing redundant correlations between feature nodes.
[0043] Specifically, the following steps can be performed when extracting local features: First, flatten the signal according to the preset flattening rules for the fiber vibration event to be classified. For example, if it is a multi-channel signal, flatten and stitch it sequentially along the channel dimension. Second, configure the parameters of the first convolutional layer, select the convolution kernel and sliding window, and perform sliding convolution on the flattened signal to capture local features. Third, complete feature optimization in the order of batch normalization, activation function enhancement, max pooling, and probabilistic random deactivation, ultimately outputting local features with simplified dimensions and strong representational capabilities.
[0044] The following section will explain in detail how to perform dual-stream transformation and extract globally correlated features, including: Spatial pooling and temporal pooling are performed on the fiber vibration events to be classified to obtain the first spatial feature and the first temporal feature respectively. The first spatial feature is input into multiple spatial flow transformation layers for global spatial correlation and first expansion to obtain the second spatial feature; The first time feature is input into multiple time stream transformation layers for global time correlation and second extension to obtain the second time feature; The second spatial feature and the second temporal feature are combined and merged to obtain the global associated feature; the combination and merging includes: dimension combination and feature overlay.
[0045] In this disclosure, spatial pooling can be understood as a feature aggregation operation for fiber optic vibration events in the spatial dimension. Fiber optic vibration sensing systems typically contain multiple monitoring points, and the collected events usually exhibit spatial distribution characteristics of the points and amplitudes. Spatial pooling statistically aggregates vibration data in each spatial region through a preset pooling window, removing spatial noise while preserving the relative vibration intensity relationships between different points.
[0046] In this disclosure, the first spatial feature can be understood as feature data obtained after spatial pooling, which can preliminarily reflect the spatial distribution law of optical fiber vibration events. It can be presented in a concise vector or matrix form.
[0047] In this disclosure, the spatial flow transformation layer can be understood as the core unit for mining the spatial global correlation of optical fiber vibration events. Internally, it can focus on the characteristics of spatial regions in the vibration signal and break through local spatial limitations through fully connected or convolutional operations to achieve a reasonable expansion of feature dimensions.
[0048] In this disclosure, the second spatial feature can be understood as an extended feature that possesses global spatial correlation information after being processed by multiple spatial flow transformation layers. It not only includes the vibration features of a single region, but also integrates global information such as vibration propagation paths and synchronous vibration relationships between regions, thus improving the feature representation capability compared to the first spatial feature.
[0049] In this disclosure, time pooling can be understood as a feature condensation operation on the optical fiber vibration signal in the time dimension. Time pooling aggregates time-series data through a sliding time window, extracts time-domain features within the window, and reduces data redundancy in the time dimension.
[0050] In this disclosure, the first time feature can be understood as the basic feature output after time pooling that can reflect the temporal evolution law of the vibration event.
[0051] In this disclosure, the time transformation layer can be understood as a feature processing unit used to establish global temporal correlations of vibration events. It can identify features with dependencies in the time series and correlate local temporal features into a global temporal pattern through feature expansion operations.
[0052] In this disclosure, the second temporal feature can be understood as an extended feature that incorporates global temporal correlation information after being processed by a time transformation layer. It can cover the complete temporal sequence of a vibration event from occurrence to end, as well as the intrinsic relationship between features at different time stages, thus solving the problem that a single time segment feature cannot reflect the whole picture of an event.
[0053] In this disclosure, splicing and merging can be understood as the operation of fusing extended features of spatial and temporal dimensions to form a complete globally correlated feature. Through this operation, the feature simultaneously contains the spatial distribution pattern and temporal evolution characteristics of vibration events, achieving complementarity and enhancement of spatial and temporal dual-dimensional information. Dimensional combination can be understood as the process of splicing the second spatial feature and the second temporal feature according to their feature dimensions to form a higher-dimensional feature vector, which can completely preserve the original dimensional information of both types of features. Feature superposition can be understood as a weighted summation operation on the corresponding dimensions of the spatial and temporal features based on dimensional combination. By assigning appropriate weights to the spatial and temporal features, the fused feature more prominently highlights the event classification information.
[0054] Specifically, the following steps can be performed when extracting global correlation features: First, preprocess the fiber optic vibration events to be classified, separating the spatial matrix and time series; Second, for the spatial dimension, perform maximum spatial pooling using a pooling window grouped with multiple monitoring points to obtain the first spatial feature, which is then input into multiple cascaded spatial flow transformation layers to output the second spatial feature; Third, for the time dimension, perform mean time pooling using a preset time window to obtain the first time feature, which is then input into multiple cascaded time transformation layers to output the second time feature; Fourth, combine the second spatial feature of the spatial dimension and the second time feature of the time dimension to obtain a feature vector, and then superimpose the features according to preset weights to finally obtain the global correlation features.
[0055] The following will explain in detail how to perform the second convolution to obtain the fused features, including: Preprocessing is performed on local features and globally related features; preprocessing includes dimension adaptation and feature normalization. Based on the convolution kernel of the second convolutional layer, convolution operations are performed one by one on the preprocessed local features and global related features to obtain fused data; The fused data is subjected to batch normalization, activation function enhancement, max pooling, and random deactivation in sequence to obtain fused features.
[0056] In this disclosure, preprocessing can be understood as eliminating data differences between local features and globally related features, enabling the two types of features to adapt to subsequent convolutional fusion operations. Dimensional adaptation can be understood as adjusting local features and globally related features to the same dimension through at least one operation such as transposition, zero-padding, or feature compression. Feature normalization can be understood as a standardization operation that maps the dimension-adapted two types of feature data to a unified numerical range. Furthermore, by calculating the mean and standard deviation of the features, a linear transformation can be performed on the feature data to eliminate weight imbalances caused by differences in the dimensions of different features, thereby improving the effectiveness of convolutional fusion.
[0057] In this disclosure, the convolution kernel of the second convolutional layer can be understood as a bridge for achieving deep fusion of local features and globally related features. It can be a composite convolution kernel containing two sets of independent weight parameters, which perform convolution operations with local features and globally related features respectively. At the same time, a cross-weight design is used to establish a correlation mapping between the two types of features, thereby achieving feature fusion of local details and global patterns.
[0058] In this disclosure, the specific explanations of batch normalization, activation function enhancement, max pooling, and random deactivation can be found above, and will not be repeated here.
[0059] Specifically, when using the second convolution to obtain fused features, the following steps can be performed: First, preprocess the local and global features. For example, zero-padding can be used to expand the vectors of local features to achieve dimensionality adaptation; standardization methods can be used to normalize the two types of features, making their mean 0 and standard deviation 1. Second, configure the convolution kernel of the second convolutional layer to perform convolution operations on the two types of features separately and then superimpose them to obtain fused data. Third, perform feature optimization in the order of batch normalization, activation function enhancement, max pooling, and probabilistic random deactivation, ultimately outputting fused features with reduced dimensions and a fusion of local details and global patterns.
[0060] The following will elaborate on the single-stream conversion layer and how to obtain target features, including: The single-stream conversion layer includes a multi-head self-attention layer and a feedforward network layer; the multi-head self-attention layer includes: a first normalization unit, a first fully connected layer, and a splicing layer; the feedforward network layer includes: a second normalization unit, a second fully connected layer, and a third fully connected layer.
[0061] In this disclosure, the multi-head self-attention layer can be understood as a module that mines the internal correlation information of the fused features from multiple feature dimensions. It can establish global dependencies within the features by setting multiple self-attention heads in parallel, simultaneously focusing on different subspace features of the fused features, effectively capturing hidden local-to-global correlations in the fused features. The first-layer normalization unit can be understood as a preprocessing unit that optimizes the stability of the input fused features. Layer normalization can be used to standardize the feature data by calculating the mean and variance of the features. The first fully connected layer can be understood as a feature transformation unit that converts the normalized fused features into the format required for self-attention calculation. It contains three independent weight matrices, capable of simultaneously mapping the input features into query, key, and value feature vectors, providing basic data for the calculation of self-attention weights. The concatenation layer can be understood as a feature aggregation unit that integrates the outputs of multiple self-attention heads. It concatenates the feature vectors calculated by each attention head according to their dimensions, forming a comprehensive feature containing multi-dimensional correlation information, achieving complementarity of feature information from different attention heads.
[0062] In this disclosure, the feedforward network layer can be understood as a module that performs dimensional expansion and nonlinear enhancement on the features output by the multi-head self-attention layer. It can further enhance the representational power of the features through two fully connected operations and nonlinear activation, making the features more suitable for subsequent event classification tasks. The second-layer normalization unit can be understood as a unit that standardizes the multi-head attention output data. Consistent with the principle of the first-layer normalization unit, layer normalization eliminates the distribution differences of the feature data, providing stable input for subsequent fully connected operations. The second fully connected layer can be understood as a unit that performs dimensional expansion and nonlinear transformation on the normalized features. It can expand the dimension of the input features by setting more neurons and combine activation functions to achieve nonlinear mapping of features, uncovering more complex feature relationships. The third fully connected layer can be understood as a unit that performs dimensional compression and key information extraction on the expanded features. It can compress the high-dimensional features output by the second fully connected layer into low-dimensional features suitable for the classification task, while strengthening the features that play a decisive role in the classification result.
[0063] The following will elaborate on how to obtain target features using a single-stream conversion layer, including the following methods: The fused features are input into the first normalization unit of the multi-head self-attention layer to obtain the normalized fused features; The normalized fused features are input into the first fully connected layer and converted into self-attention features; the self-attention features include: query, key, and value. Based on self-attention weights, the self-attention features are weighted and aggregated and then input into the splicing layer to obtain multi-head attention output data; The multi-head attention output data is input into the second normalization unit of the feedforward network layer, and then passed through the second fully connected layer and the third connected layer for dimensional expansion and enhancement to obtain distinguishing features.
[0064] In this disclosure, self-attention features can be understood as a combination of basic features used to calculate the weights of internal associations within a feature. It comprises three types of features: query, key, and value, each with a clearly defined function, working together to achieve the complete process of feature association identification, association strength calculation, and associated feature output in the self-attention mechanism. Specifically, a query can be understood as a retrieval feature used to actively explore feature associations; its essence is a mapping vector of fused features. A key can be understood as an index feature used to match the query feature. It originates from the same fused feature as the query feature and is obtained through mapping using a specific weight matrix. A value can be understood as the content carrying feature information. It can be the result of weight mapping of the fused features.
[0065] In this disclosure, the self-attention weight can be understood as a numerical parameter reflecting the strength of the association between different positions within the fused feature. It is obtained by normalizing the similarity score between the query and the key. The larger the weight value, the stronger the feature association at the corresponding position, which can guide the model to focus on the feature association relationship that is more important for event classification.
[0066] In this disclosure, multi-head attention output data can be understood as the aggregation result of output features from multiple self-attention heads. Each self-attention head focuses on different subspaces of the fused features, and its output features contain correlation information in a specific dimension. After being integrated by the splicing layer, comprehensive feature data covering multi-dimensional correlation information is formed.
[0067] Specifically, when using a single-stream conversion layer to obtain target features, the following steps can be performed: First, input the fused features into the first normalization unit of the multi-head self-attention layer. After layer normalization, a stable feature vector is obtained. Second, input the features into the first fully connected layer containing multiple attention heads, converting them into multiple sets of query, key, and value features. Calculate the dot product similarity between the query and key, normalize it to obtain self-attention weights, and then combine the weights to perform weighted aggregation of the value features. The outputs of each attention head are integrated into multi-head attention output data through a concatenation layer. Third, input the multi-head attention output data into a feedforward network layer. After processing by the second normalization unit, it passes sequentially through the second fully connected layer containing multiple neurons and the third fully connected layer containing multiple neurons, finally outputting the target feature. This feature can be directly input into a classifier to complete the classification and recognition of fiber optic vibration events.
[0068] For example, Figure 3 Figure 3 is a schematic diagram of the structure of a single-stream conversion layer provided in an embodiment of this disclosure. As can be seen from Figure 3, the single-stream conversion layer consists of two parts: a multi-head attention mechanism (i.e., the multi-head attention layer of this disclosure) and a feedforward network (i.e., the feedforward network layer of this disclosure), and residual connections are used to avoid gradient vanishing.
[0069] In the multi-head attention mechanism module, the input features are first processed by layer normalization, and then mapped to query, key and value features respectively through fully connected layers, etc. After these features are processed by multiplication layer operation and scaling, the self-attention weights are obtained through Softmax, and then multiplied with the value features in a weighted manner. The outputs of multiple attention heads are integrated by the concatenation layer and combined with the residual connection to output intermediate features (i.e., the multi-head attention output data of this disclosure).
[0070] The feedforward network module takes intermediate features as input and processes them sequentially through layer normalization, fully connected layer WFF1, activation function enhancement, fully connected layer WFF2, and random deactivation layer, finally outputting the target features through residual connections.
[0071] For example, this disclosure also provides specific calculation formulas for a single-stream conversion layer, including: The input features of a certain layer are represented as Suppose the output features of a certain layer are represented as... .
[0072] The multi-head attention layer matrix of this single-stream conversion layer can satisfy the following formula: in, Represented as the first In the attention head, the first The input feature for the th _th Attention weights for each input feature; This represents a softmax operation performed along the column direction. Represented as the first In each attention head, the input features are used to convert them into a query. The weights of the fully connected layer. Represented as the first In each attention head, the input features are converted into keys ( The weights of the fully connected layer. This is represented as the matrix transpose operation. Represented as the first The dimensional hyperparameters of each attention head.
[0073] After determining the attention matrix, the output of the multi-head attention layer can be calculated according to the following formula: in, The QUOTE represents the multi-head attention layer. Each output feature. This represents the weights of the fully connected layer used to convert the feature dimension into the input / output dimension after the attention heads are concatenated. express The operation involves concatenating the output features of each attention head. Indicates the first The attention matrix corresponding to each attention head. Indicates the first In each attention head, the input features are converted into values ( The weights of the fully connected layer.
[0074] Next, the outputs of the multiple attention layers are input into the feedforward network layer, which satisfies the following formula: in, This indicates the first layer. Each output feature. This represents the weight of the second fully connected layer in the feedforward network. This represents the Gaussian error linear unit (as the activation function of the feedforward network). This represents the weight of the first fully connected layer in the feedforward network. Presentation layer normalization operation.
[0075] For example, Figure 4 A schematic flowchart illustrating the complete classification of optical fiber vibration events provided in this embodiment of the disclosure. As can be seen from Figure 4: The entire fiber optic vibration event classification process uses spatiotemporal signals acquired by a phase-sensitive optical time-domain reflectometer as input. First, the spatiotemporal signals are converted into a one-dimensional sequence through a flattening operation. Then, the signals are input into the first convolutional block (containing two-dimensional convolutional layers, batch normalization, activation, max pooling, and random deactivation layers) to extract local features (such as local peaks and waveforms). Subsequently, the signals enter a dual-stream converter block: the features are split into spatial and temporal branches. The spatial branch undergoes spatial pooling, location embedding, multiple time converter layers, and expansion operations to extract global spatial correlation features. The temporal branch undergoes temporal pooling, location embedding, and multiple... A spatial transformer layer and an expansion operation extract global temporal correlation features. The two branches of features are concatenated and merged to obtain global correlation features. Then, the local features and global correlation features are extracted at least twice using the above convolution and dual-stream transformer process to enhance feature representation capabilities. After that, the features extracted in multiple rounds are input into the second convolutional block (the process is the same as the first convolutional block) to complete dimension alignment and fusion, resulting in fused features that combine local details and global regularities. The fused features are then input into a single-stream transformer block (containing a multi-head self-attention layer and a feedforward network layer): first, they are normalized and generated by a fully connected layer to produce query / key / value features, then the self-attention weights are calculated and weighted aggregation is performed to obtain multi-head attention output, and then processed by the fully connected and activation processes of the feedforward network to output distinguishing features that highlight the differences between events. Finally, the distinguishing features are reduced in dimensionality by max pooling and input into a fully connected layer to complete classification, ultimately outputting the target classification results of fiber optic vibration events (such as background noise, excavation, knocking, etc.).
[0076] The entire process utilizes a hierarchical architecture that includes local feature extraction, global correlation mining, multi-round feature enhancement, feature fusion, and differential feature extraction and classification to achieve accurate identification of fiber optic vibration events.
[0077] For example, this disclosure also provides a specific experimental procedure for classifying fiber optic vibration events, as shown below: First, prepare the dataset, as shown in Table 1 below: Event Type Number of training set samples Number of validation sets Number of test sets total Background noise 2475 309 310 3094 Excavation 2010 251 251 2512 knocking sound 2024 253 253 2530 Watering 1827 236 235 2298 shake 2182 273 273 2728 walk 1960 245 245 2450 Table 1 As can be seen from Table 1, the sample size distribution of various fiber optic vibration events is relatively balanced, and the ratio of training set, validation set and test set is reasonable. This provides sufficient and reliable data support for model training and performance evaluation, avoiding the problem of insufficient model generalization ability due to sample imbalance.
[0078] Next, we set the initial parameters for the experiment: We used the Adam optimizer, set the cross-loss to 0.0009, and then reduced it by 3 every 10 rounds, for a total of 50 rounds of training.
[0079] Then, the experimental performance and effects of each step are compared between this disclosure and different combinations of existing networks, further demonstrating the high accuracy of the classification method disclosed in this disclosure. The specific comparison is as follows: Model accuracy Support Vector Machine 82.60 Convolutional Neural Networks 94.00 Convolutional Neural Networks, Support Vector Machines 96.43 Attention-temporal convolutional networks, bidirectional long short-term memory networks 91.64 Attention-temporal convolutional networks, self-attention, bidirectional long short-term memory networks 92.27 Dendritic networks 98.60 Convolutional Neural Networks, Long Short-Term Memory Networks 97.76 ISAC Model 98.00 TSC model 91.00 Patch-TST model 97.60 ST-T model 98.50 Lightweight gradient booster 95.00 This article's method 99.36 Table 2 As shown in Table 2, the method proposed in this paper achieves an accuracy of 99.36% on the dataset, which is significantly better than existing models such as support vector machines and convolutional neural networks, demonstrating the performance advantage of this method in the optical fiber vibration event classification task. Space Transformation Layer Time conversion Spacetime Transformation Layer accuracy × × × 97.57 ✓ × × 98.91 × ✓ × 98.97 ✓ ✓ × 99.29 ✓ ✓ ✓ 99.36
[0080] Table 3 As shown in Table 3, the accuracy is improved when only a single type of transformation layer (spatial or temporal) is used; when both spatial and temporal transformation layers are used, the accuracy is further improved to 99.29%; and when spatial, temporal and spatiotemporal transformation layers are used at the same time, the accuracy reaches the highest level of 99.36%, indicating that the combination of the three types of transformation layers can fully explore spatiotemporal correlation information and improve classification performance. Transformer layer number accuracy 1 99.29 2 99.36 3 99.36 4 98.85 5 98.64
[0081] Table 4 As shown in Table 4, the number of transformation layers has an initial positive and then negative impact on model performance. When the number of layers is 2 or 3, the model accuracy reaches a peak of 99.36%; after the number of layers exceeds 3, the accuracy gradually decreases, which may be due to overfitting caused by too many layers. Space Transformation Layer Time conversion Spacetime Conversion Layer accuracy × ✓ ✓ 99.29 ✓ × ✓ 99.04 ✓ ✓ × 99.29 ✓ ✓ ✓ 99.36
[0082] Table 5 As can be seen from Table 5, the model accuracy will decrease to some extent when the spatial or temporal transformation layer is missing; while the combination of spatial, temporal and spatiotemporal transformation layers can achieve the best classification performance, which once again verifies the effectiveness of the synergistic effect of multiple transformation layers. Pooling method accuracy Max pooling 99.36 Mean pooling 98.85 Last mark 98.21
[0083] Table 6 As can be seen from Table 6, when the max pooling method is used after the spatiotemporal transformation layer, the model accuracy reaches 99.36%, which is better than mean pooling and the pooling method of the last label, indicating that max pooling is more suitable for capturing the key features in this task. Space pooling Time pooling accuracy Max pooling Max pooling 99.23 Max pooling Mean pooling 99.17 Mean pooling Max pooling 99.04 Mean pooling Mean pooling 99.36
[0084] Table 7 As can be seen from Table 7, when both spatial pooling and temporal pooling use mean pooling, the accuracy reaches 99.36%, which is better than other pooling combinations. This indicates that in this task, mean pooling can more effectively aggregate feature information in both spatial and temporal dimensions.
[0085] For example, this disclosure also provides a process for visualizing image comparison during the experiment.
[0086] Figure 5 A schematic diagram showing the comparison of the accuracy of different methods for classifying fiber optic vibration events according to embodiments of this disclosure. From Figure 5 It can be seen that the accuracy of the proposed method consistently outperforms other comparative methods throughout the training rounds, and tends to stabilize and approach 1.0 after about 15 rounds. It has a fast convergence speed and the highest final accuracy, indicating that its learning efficiency and performance advantages are significant.
[0087] Figure 6 This diagram illustrates a comparison of the accuracy of the method of this disclosure and a method without a conversion layer, as provided in embodiments of this disclosure. Figure 6 It can be seen that the values on the main diagonal of the confusion matrix (number of correctly classified samples) of the method disclosed in this paper are generally higher than those of the method without a transformation layer. In particular, the number of misclassified samples is significantly reduced in multiple event types, which proves the key role of the transformation layer in improving classification accuracy.
[0088] Figure 7 This diagram illustrates the comparison of the accuracy of different methods for classifying target events, as provided in an embodiment of this disclosure. Figure 7 It can be seen that for events (a) watering, (b) shaking, and (c) walking, the prediction results of the method disclosed herein are completely consistent with the true labels, while other comparative models show obvious misjudgments, which intuitively demonstrates the accurate identification capability of the method for complex vibration events.
[0089] This disclosure also provides a fiber optic vibration event classification device that integrates global and local features. Figure 8 A structural block diagram of an optical fiber vibration event classification device that integrates global and local features, provided in an embodiment of this disclosure, is shown below. Figure 8 As shown, the fiber optic vibration event classification device 800, which integrates global and local features, includes: The acquisition unit 801 is used to acquire fiber vibration events to be classified; the fiber vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer. The first extraction unit 802 is used to extract local features of the fiber vibration event to be classified based on the first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the fiber vibration event to be classified; the local features include at least local peaks and local waveforms; The second extraction unit 803 is used to extract global correlation features of the fiber vibration events to be classified based on the dual-stream conversion layer; the dual-stream conversion layer is used to separate the fiber vibration events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; The fusion unit 804 is used to input local features and global related features into the second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of local features and global related features. The distinguishing unit 805 is used to input the fused features into the single-stream transformation layer to obtain distinguishing features; the single-stream transformation layer is used to determine the distinguishing features based on the self-attention mechanism. Classification unit 806 is used to determine the target classification event based on distinguishing features.
[0090] In one exemplary embodiment, the first extraction unit 802 and the second extraction unit 803 are further configured to: extract local features and global associated features at least twice; and input the repeatedly extracted local feature and associated feature data into the second convolutional layer.
[0091] In one exemplary embodiment, the classification unit 806 is specifically used to classify target events including: background noise, digging, tapping, watering, shaking, and walking.
[0092] In one exemplary embodiment, the first extraction unit 802 is specifically used to: flatten the fiber vibration events to be classified to obtain flattened events to be classified; flattening is used to reduce dimensionality or order of magnitude; based on the convolution kernel and sliding window length of the first convolutional layer, perform window sliding convolution on the flattened events to be classified to obtain data after convolution operation; and sequentially perform batch normalization, activation function enhancement, max pooling, and random deactivation on the data after convolution operation to obtain local features.
[0093] In one exemplary embodiment, the second extraction unit 803 is specifically used to: perform spatial pooling and temporal pooling on the fiber vibration events to be classified, respectively, to obtain a first spatial feature and a first temporal feature; input the first spatial feature into multiple spatial flow transformation layers for global spatial correlation and achieve a first expansion, to obtain a second spatial feature; input the first temporal feature into multiple temporal flow transformation layers for global temporal correlation and achieve a second expansion, to obtain a second temporal feature; and concatenate and merge the second spatial feature and the second temporal feature to obtain a globally correlated feature; the concatenation and merging includes: dimension combination and feature overlay.
[0094] In one exemplary embodiment, the fusion unit 804 is specifically used to: preprocess the local integrated and global related features; the preprocessing includes: dimension adaptation and feature normalization; based on the convolution kernel of the second convolutional layer, perform convolution operations on the preprocessed local features and global related features one by one to obtain fused data; and sequentially perform batch normalization, activation function enhancement, max pooling and random deactivation processing on the fused data to obtain fused features.
[0095] In one exemplary embodiment, the distinguishing unit 805 is specifically used for: the single-stream conversion layer includes a multi-head self-attention layer and a feedforward network layer; the multi-head self-attention layer includes: a first normalization unit, a first fully connected layer and a splicing layer; the feedforward network layer includes: a second normalization unit, a second fully connected layer and a third fully connected layer.
[0096] In one exemplary embodiment, the distinguishing unit 805 is specifically used to: input the fused features into the first normalization unit of the multi-head self-attention layer to obtain normalized fused features; input the normalized fused features into the first fully connected layer to convert them into self-attention features; the self-attention features include: query, key, and value; based on the self-attention weights, the self-attention features are weighted and aggregated and then input into the concatenation layer to obtain multi-head attention output data; the multi-head attention output data is input into the second normalization unit of the feedforward network layer, and sequentially passes through the second fully connected layer and the third connected layer for dimensional expansion and enhancement to obtain distinguishing features.
[0097] Figure 9 This is a hardware block diagram of an electronic device provided according to an embodiment of the present disclosure. The electronic device 900 according to an embodiment of the present disclosure includes at least a processor and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor performs the fiber optic vibration event classification method that integrates global and local features as described in any of the preceding embodiments of the present disclosure.
[0098] Figure 9The illustrated electronic device 900 specifically includes a central processing unit (CPU) 901, a graphics processing unit (GPU) 902, and a memory 903. These units are interconnected via a bus 904. The CPU 901 and / or GPU 902 can function as the aforementioned processor, and the memory 903 can function as the aforementioned memory storing computer-readable instructions. Furthermore, the electronic device 900 may also include a communication unit 905, a storage unit 906, an output unit 907, an input unit 908, and an external device 909, all of which are also connected to the bus 904.
[0099] In summary, this disclosure provides a method and apparatus for classifying optical fiber vibration events by fusing global and local features. This disclosure involves acquiring optical fiber vibration events to be classified; the events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer; extracting local features of the events to be classified based on a first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the events to be classified; the local features include at least local peak values and local waveforms; extracting global correlation features of the events to be classified based on a two-stream conversion layer; the two-stream conversion layer is used to separate the events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; inputting the local features and the global correlation features into a second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of the local features and the global correlation features; inputting the fused features into a single-stream conversion layer to obtain distinguishing features; the single-stream conversion layer is used to determine the distinguishing features based on a self-attention mechanism; and determining the target classification event based on the distinguishing features. In this way, compared to existing single deep learning models that can only capture local or short-range features and manual feature extractors with weak generalization ability, this disclosure can simultaneously extract features that take into account both local details and global correlations. It also leverages a two-stream transformation layer to model the global laws of spatial propagation and temporal persistence, and further strengthens key distinguishing information through feature fusion and the self-attention mechanism of a single-stream transformation layer. This avoids the limitations of single models in representing complex spatiotemporal features and eliminates the reliance on manual feature design, improving the comprehensiveness of feature representation while enhancing generalization and adaptability. In summary, the technical solution provided by this disclosure can improve classification accuracy, reduce false positive rate, and is adaptable to various application scenarios.
[0100] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0101] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0102] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0103] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0104] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0105] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0106] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0107] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for classifying fiber optic vibration events by integrating global and local features, characterized in that, The method includes: Acquire fiber vibration events to be classified; the fiber vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer; Based on the first convolutional layer, local features of the fiber vibration event to be classified are extracted; the first convolutional layer is used to perform window sliding convolution on the fiber vibration event to be classified; the local features include at least local peak values and local waveforms; Based on a two-stream conversion layer, global correlation features of the fiber vibration events to be classified are extracted; the two-stream conversion layer is used to separate the fiber vibration events to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; The local features and the global related features are input into the second convolutional layer to obtain the fused features; the second convolutional layer is used to perform dimensional alignment and fusion of the local features and the global related features; The fused features are input into a single-stream transformation layer to obtain distinguishable features; the single-stream transformation layer is used to determine the distinguishability of the fused features based on a self-attention mechanism. Based on the distinguishing features, the target classification event is determined.
2. The method according to claim 1, characterized in that, The method further includes: The local features and the global associated features are extracted at least twice; The repeatedly extracted local features and associated feature data are input into the second convolutional layer.
3. The method according to claim 1, characterized in that, The target classification events include: background noise, digging, knocking, watering, shaking, and walking.
4. The method according to claim 1, characterized in that, The step of extracting local features of the fiber vibration events to be classified based on the first convolutional layer includes: The fiber vibration events to be classified are flattened to obtain flattened events to be classified; the flattening process is used to reduce the dimensionality or order of magnitude. Based on the convolution kernel and sliding window length of the first convolutional layer, the flattened events to be classified are subjected to window sliding convolution to obtain the data after convolution operation; The local features are obtained by sequentially performing batch normalization, activation function enhancement, max pooling, and random deactivation on the data after the convolution operation.
5. The method according to claim 1, characterized in that, The extraction of global correlation features of the fiber vibration events to be classified based on the dual-stream conversion layer includes: The fiber vibration events to be classified are subjected to spatial pooling and temporal pooling respectively to obtain the first spatial feature and the first temporal feature. The first spatial feature is input into multiple spatial flow transformation layers for global spatial association and first expansion to obtain the second spatial feature; The first time feature is input into multiple time stream transformation layers for global time correlation and second extension to obtain the second time feature; The second spatial feature and the second temporal feature are concatenated and merged to obtain the global association feature; the concatenation and merging includes: dimension combination and feature overlay.
6. The method according to claim 1, characterized in that, The step of inputting the local features and the global correlation features into the second convolutional layer to obtain fused features includes: The local integration and the global correlation features are preprocessed; the preprocessing includes: dimension adaptation and feature normalization. Based on the convolution kernel of the second convolutional layer, convolution operations are performed one by one on the preprocessed local features and the global associated features to obtain fused data; The fused data is sequentially subjected to batch normalization, activation function enhancement, max pooling, and random deactivation to obtain the fused features.
7. The method according to claim 1, characterized in that, The single-stream conversion layer includes a multi-head self-attention layer and a feedforward network layer; The multi-head self-attention layer includes: a first normalization unit, a first fully connected layer, and a splicing layer; the feedforward network layer includes: a second normalization unit, a second fully connected layer, and a third fully connected layer.
8. The method according to claim 1, characterized in that, The fused features are input into a single-stream conversion layer to obtain target features, including: The fused features are input into the first normalization unit of the multi-head self-attention layer to obtain the normalized fused features; The normalized fused features are input into the first fully connected layer and converted into self-attention features; the self-attention features include: query, key, and value. Based on the self-attention weights, the self-attention features are weighted and aggregated and then input into the splicing layer to obtain multi-head attention output data; The multi-head attention output data is input into the second normalization unit of the feedforward network layer, and then sequentially passed through the second fully connected layer and the third connected layer for dimensional expansion and enhancement to obtain the distinguishing features.
9. A fiber optic vibration event classification device that integrates global and local features, characterized in that, The device includes: The acquisition unit is used to acquire fiber vibration events to be classified; the fiber vibration events to be classified include spatiotemporal data collected by a phase-sensitive optical time-domain reflectometer. The first extraction unit is used to extract local features of the fiber vibration event to be classified based on the first convolutional layer; the first convolutional layer is used to perform window sliding convolution on the fiber vibration event to be classified; the local features include at least local peak values and local waveforms; The second extraction unit is used to extract the global correlation features of the fiber vibration event to be classified based on the dual-stream conversion layer; the dual-stream conversion layer is used to separate the fiber vibration event to be classified into spatial and temporal dimensions for global correlation extraction; the global correlation features include at least temporal persistence patterns and spatial propagation characteristics; The fusion unit is used to input the local features and the global related features into the second convolutional layer to obtain fused features; the second convolutional layer is used to perform dimensional alignment and fusion of the local features and the global related features; The distinguishing unit is used to input the fused features into a single-stream conversion layer to obtain distinguishing features; the single-stream conversion layer is used to determine the distinguishing features based on a self-attention mechanism. A classification unit is used to determine the target classification event based on the distinguishing features.
10. An electronic device, characterized in that, include: Memory, used to store computer-readable instructions; as well as A processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in any one of claims 1-8.