A multi-task enhanced DAS system and processing method thereof
By building a two-stage multi-task learning model, combining shared networks and task networks, the redundancy problem of DAS system in multi-task processing is solved, synchronous processing of vibration source recognition and positioning is realized, and processing capabilities and efficiency are improved.
Patent Information
- Application Number
- CN202310143415.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-10-20
- Filing Date
- 2023-02-21
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-02-21
AI Technical Summary
When faced with multiple tasks, it is difficult for existing DAS systems to effectively utilize the correlation between tasks for coordinated processing, resulting in exponential growth in algorithm redundancy and computing consumption, and real-time multitasking processing cannot be achieved.
A two-stage multi-task learning model is built, including a shared network and a task network. The shared network is used to extract shared features. The task network generates task-associated features through the attention module, adopts ResNet18 as the basic skeleton, and combines lightweight structures such as Bottleneck and GAP to reduce redundant feature extraction.
The synchronous processing of vibration source recognition and positioning is realized, the intelligent processing capability and efficiency of the DAS system is improved, the computational complexity and model scale are reduced, and the multi-classifier and combined single-task network are better than that of multi-tasks.
Smart Images

Figure CN116204813B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distributed optical fiber sensing and applications, and particularly relates to a multi-task enhanced DAS system and a processing method thereof. Background Art
[0002] Distributed fiber-optic acoustic / vibration sensing (DAS) systems, based on phase-sensitive optical time-domain reflectometry (Φ-OTDR), leverage widely deployed communication fiber optic cables to provide a high-density, low-cost sensing network over a large area. In recent years, DAS systems have been widely used in the oil and gas industry for seismic wave detection, intrusion detection, and traffic monitoring, forming a new type of fiber-optic Internet of Things for ground monitoring applications.
[0003] Currently, most signal processing methods used in DAS focus on single-task solutions. These methods can usually only solve a certain problem at a time (for example, only event recognition or positioning problems). When faced with multiple tasks, it is often necessary to design multiple models to solve different problems in sequence, or for multiple classification tasks, simply permutate and combine the output results of multiple tasks, and use a single-task network to classify the combined categories. The former makes it difficult to utilize the correlation between tasks to achieve coordinated processing and there is obvious algorithmic redundancy, while the latter will increase with the number and complexity of tasks, resulting in an exponential increase in computational consumption, thereby greatly increasing the classification capability requirements of the model. Therefore, more advanced technologies are needed to achieve real-time multi-task processing. Summary of the Invention
[0004] The purpose of the present invention is to provide a multi-task enhanced DAS system and its processing method. By constructing a two-stage multi-task learning model, the problem of being unable to implement multi-task processing in the signal post-processing algorithm is simultaneously solved, and the extraction of redundant features in multi-task processing is reduced, thereby improving the DAS intelligent processing capability and processing efficiency.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A multi-tasking method for a DAS system comprises the following steps:
[0007] Step 1: Use the DAS system to collect distributed optical fiber sensing signals, divide the collected signals into time periods, and obtain a space-time matrix signal containing time information and spatial information;
[0008] Step 2: Construct a multi-task learning sample dataset based on the spatiotemporal matrix signal obtained in step 1, and each sample in the dataset contains multiple task labels;
[0009] Step 3: Classify the sample data set based on preset rules to obtain the training set, validation set, and test set;
[0010] Step 4: Construct a two-stage multi-task learning network model. The two-stage multi-task learning network model includes a shared network in the first stage and a task network in the second stage. The shared network is used to extract shared features from the input spatiotemporal matrix sample data and provide them to the task network. The task network is composed of n task-specific networks with different network structures or task-specific networks with the same structure but different parameters and weights. Each task-specific network is used to extract its own task-related features from the received shared features to achieve synchronous processing of multiple tasks.
[0011] Step 5: Input the training set into the two-stage multi-task learning network model for training, and input the validation set into the trained two-stage multi-task learning network model to verify the accuracy of the model;
[0012] Step 6: Input the test set into the model verified in step 5 to complete multi-task processing.
[0013] Furthermore, the shared network uses ResNet18 as the basic skeleton, and the task network is constructed by connecting multiple attention modules in series.
[0014] Furthermore, the shared network includes an initial convolutional layer and eight sequentially connected residual blocks. The initial convolutional layer is used to perform preliminary feature extraction and downsampling on the input spatiotemporal matrix. The eight residual blocks are connected after the initial convolutional layer to extract sample data features at different levels and provide them as shared features to the task network.
[0015] There are two task networks, namely the first specific task network and the second specific task network, each of which is composed of four sequentially connected attention modules;
[0016] The output ends of the 1st and 2nd residual blocks in the 8 residual blocks are respectively connected to the input end of the 1st attention module in the first and second specific task networks, the output ends of the 3rd and 4th residual blocks are respectively connected to the input end of the 2nd attention module in the first and second specific task networks, the output ends of the 5th and 6th residual blocks are respectively connected to the input end of the 3rd attention module in the first and second specific task networks, and the output ends of the 7th and 8th residual blocks are respectively connected to the input end of the 4th attention module in the first and second specific task networks; among them, the output features of the 1st, 3rd, 5th and 7th residual blocks are used to generate attention templates, and the output features of the 2nd, 4th, 6th and 8th residual blocks are element-wise multiplied with the results of the generated attention template calculation in the attention modules connected to them to obtain their respective task-associated features.
[0017] Furthermore, the 8 residual blocks in the shared network use two types of residual blocks, namely residual block type 1 and residual block type 2; the 1st, 2nd, 4th, 6th, and 8th residual blocks use residual block type 1, and the channel scale of the input feature remains unchanged when passing through this type of residual block. The 3rd, 5th, and 7th residual blocks use residual block type 2; the residual block type 1 structure includes two convolutional layers conv3×3, two BN layers, and two ReLU layers, which are connected in sequence as follows: convolutional layer conv3×3, BN, ReLU layer, convolutional layer conv3×3, BN, and ReLU layer. The features are connected in the first convolutional layer co nv3×3 input, a jump connection from input to output is performed before the last ReLU layer; the input feature's channel and scale remain unchanged when passing through this type of residual block to facilitate subsequent element-by-element product operations; residual block type 2 has the same structure as residual block type 1. The difference from residual block type 1 is that a convolutional layer conv1×1 and a BN layer are added to the input-output jump connection before the last ReLU layer, and the number of channels of the input feature is doubled when passing through the first convolutional layer conv3×3, and the scale of the feature map changes, achieving deeper feature extraction.
[0018] Furthermore, the attention modules in each task-specific network adopt two structures, a and b. The first three attention modules adopt structure a, and the fourth attention module adopts structure b.
[0019] The structure a is composed of two parts: an attention template generator and an output layer. The attention template generator adopts a structure similar to a bottleneck layer, which is connected in the order of conv1×1, BN, ReLU, conv3×3, BN and sigmoid layers. After the feature passes through the convolution layer with a convolution kernel size of 1×1, the number of feature channels is reduced to half the number of feature channels output by the next convolution layer, thereby reducing computational complexity. The activation function of the last convolution layer uses the sigmoid function, which can make the final attention template distributed between 0 and 1; the output layer is connected in the order of conv3×3, BN, ReLU and MaxPool layers, and the activation layer of the MaxPool function is used as the output of the output layer;
[0020] Structure b consists of an attention template generator and an output layer. The attention template generator is identical to structure a, while the output layer consists of a global average pooling (GAP) layer, a one-dimensional average pooling layer, and a softmax layer, with the softmax function serving as the output. This different output layer structure reduces parameters and computational complexity, reducing model size and computational complexity.
[0021] The detection optical fiber is used to sense vibration signals;
[0022] The laser emitting device is composed of a laser, an acousto-optic modulator and an erbium-doped fiber amplifier connected in sequence; the laser generates a continuous coherent optical signal and sends it to the acousto-optic modulator, the acousto-optic modulator modulates the received optical signal into an optical pulse signal and sends it to the erbium-doped fiber amplifier, the erbium-doped fiber amplifier amplifies the received optical pulse signal and sends it to the optical circulator;
[0023] The optical circulator is connected to the detection optical fiber; receives the amplified optical pulse signal, injects it into the detection optical fiber through the transmission port, and generates Rayleigh scattering during the transmission process; receives the backward Rayleigh scattered light signal returned along the detection optical fiber, and sends the signal to the optical signal demodulation device;
[0024] The optical signal demodulation device performs photoelectric and analog-to-digital conversion on the received backscattered Rayleigh light signal to obtain a digital electrical signal, and sends the digital electrical signal to the signal processing host;
[0025] The signal processing host is used to convert digital electrical signals into space-time matrix signals, and use the multi-task processing method for the DAS system to achieve synchronous identification and positioning of vibration sources.
[0026] After adopting the above technical solution, the present invention has the following advantages:
[0027] 1. This invention implements a multi-task learning network in a DAS system for the first time. By constructing a two-stage multi-task learning model, it can simultaneously handle the two tasks of vibration source identification and location, effectively improving the DAS intelligent processing capability and processing efficiency.
[0028] 2. The two-stage multi-task learning model of the present invention is composed of a shared network in the first stage and a task network in the second stage. In this model, the task network is composed of two task-specific networks with the same structure but different parameters and weights. These two task-specific network structures are migrated and complemented with the output features provided by the shared network to obtain a more effective shared feature pool. At the same time, based on the attention mechanism in each task-specific network, attention templates for different tasks are generated, and effective task-specific features are screened from the shared feature pool, ultimately achieving stronger feature extraction capabilities, and better recognition and positioning performance than multiple classifiers and combined single-task networks.
[0029] 3. In the multi-task network of the DAS system, the extraction of redundant features is reduced through the architectural "shared feature extraction combined with task-specific feature screening" model. At the same time, lightweight structures (such as Bottleneck and GAP) are rationally used in the task-specific network, and the overall structure and number of feature channels of the model are optimized. As a result, the network's computational efficiency and space usage are superior to those of multiple classifiers and combined single-task networks. Its online processing speed is even faster than that of the fastest single-task recognition network reported so far. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The overall framework of the multi-task enhanced DAS system and its processing method of the present invention;
[0031] Figure 2 This is a flow chart of the vibration source synchronization event identification and vertical distance classification algorithm of the present invention;
[0032] Figure 3 This is the DAS system structure diagram.
[0033] Figure 4 It is a schematic diagram of the space-time signal matrix;
[0034] Figure 5 This is the two-stage multi-task learning network structure based on the attention mechanism in the present invention;
[0035] Figure 6 The impact of different numbers of repeated units in the network on the accuracy of each task and the computational complexity of the model in this invention;
[0036] Figure 7 The impact of the number of network feature channels on the accuracy of each task and the computational complexity of the model in this invention;
[0037] Figure 8 It is the combined single-task learning model structure used for comparison in the present invention;
[0038] Figure 9 This is the multi-classifier model structure used for comparison in the present invention;
[0039] Figure 10 The confusion matrix of the multi-task learning model, the combined single-task learning model and the multi-classifier model for event recognition and vertical distance classification tasks in the present invention;
[0040] Figure 11 Bar charts showing the classification accuracy of the three models for event recognition and vertical distance classification tasks;
[0041] Figure 12The model scale and computational efficiency of the three models; (a) is the model space occupied, (b) is the computational complexity, expressed as the number of model multiplications and additions; (c) is the model training time; (d) is the online testing time of a single sample. DETAILED DESCRIPTION
[0042] In order for those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and the following embodiments.
[0043] Taking the security monitoring application based on communication optical cable as an example, refer to Figure 1 This embodiment provides a multi-task enhanced DAS system and its processing method. It is necessary to first connect the DAS system to the communication optical cable in the monitoring area, and collect the spatiotemporal signals of events of different types occurring on the ground at different vertical distances from the optical fiber, namely, distributed optical fiber sensing signals.
[0044] A multi-task learning model is constructed based on the signal to simultaneously realize multiple vibration source perception tasks. The present invention takes vibration source event type recognition (Event Recogniton, referred to as event recognition) and vertical distance positioning classification (Radial Distance Discrimination, referred to as vertical distance classification) from the optical fiber as two common vibration source perception tasks in practical applications as examples. After solving the vertical distance classification task, it can be further combined with the axial positioning capability of the optical time domain reflectometry (OTDR) mechanism to ultimately realize synchronous event recognition and two-dimensional positioning. The processing flow can be referred to in Figure 2 , including the following steps:
[0045] Step 1: Build a DAS system and divide the distributed optical fiber sensing signals collected in the system into time periods to obtain a space-time matrix signal containing time information and spatial information;
[0046] Step 2: Construct a two-stage multi-task learning sample dataset based on the spatiotemporal matrix signal obtained in step 1, where each sample contains multiple task labels at the same time;
[0047] Step 3: Classify the sample data set based on preset rules to obtain the training set, validation set, and test set;
[0048] Step 4: Construct a two-stage multi-task learning network model. This model consists of a shared network in the first stage and a task network in the second stage. The shared network is used to extract shared features from the input spatiotemporal matrix sample data and pass them to the task-specific network. The task network is composed of multiple task-specific networks with the same network structure but different parameters and weights. Each task-specific network uses multiple attention modules connected in series to extract the corresponding task-related features from the received shared features, enabling simultaneous processing of multiple tasks.
[0049] Step 5: Input the training set into the two-stage multi-task learning network model for training, and input the validation set into the trained two-stage multi-task learning network model to verify the accuracy of the model;
[0050] Step 6: Input the test set into the model verified in step 5, and implement multi-task processing through this model.
[0051] To more clearly demonstrate the advantages of the method of this embodiment, it is described in detail below through Example 1.
[0052] Example 1
[0053] Step 1: Build a DAS system and divide the distributed optical fiber sensing signals collected in the system into time periods to obtain a space-time matrix signal containing both time and space dimension information.
[0054] The distributed optical fiber acoustic sensing (DAS) system constructed in this embodiment is based on the phase-demodulated phase-sensitive optical time domain reflectometry (Φ-OTDR) technology. Its system structure and working principle can be found in Figure 3 The system consists of four parts: a detection fiber, a laser emitting device, an optical signal demodulation device, and a signal processing host. The detection fiber is used to sense vibration signals. During implementation, a communication optical cable is directly used as the detection fiber. The laser emitting device consists of a laser, an acousto-optic coupler (AOM), and an erbium-doped fiber amplifier (EDFA). The laser generates a continuous coherent optical signal, which is modulated into an optical pulse signal by an acousto-optic modulator. The optical pulse signal is centrally amplified by the erbium-doped fiber amplifier and injected into the detection fiber through a circulator. The optical pulse signal generates Rayleigh scattering during transmission along the optical cable. The Rayleigh scattered optical signal then returns along the optical cable and enters the optical signal demodulation device through the circulator. After coupling through the first coupler, the optical signal is injected into an unbalanced Mach-Zehnder or Michelson interferometer, determined by the demodulation method. A second 3×3 coupler outputs three phase shifts, each with a 120-degree phase difference, to detect the vibration's effect on the optical fiber. The demodulated optical signal is converted into a digital electrical signal by a photodetector (PD) and a data acquisition unit (DAQ). This digital signal is then transmitted in real time to a signal processing host via a network or other interface. The signal processing host, a standard computer (PC) or an FPGA / DSP embedded motherboard, analyzes and processes the optical fiber detection signals. Specific signal processing algorithms are used to determine the vibration source, and its location along the fiber is determined using the principles of optical time domain reflectometry (OTDR). Intelligent analysis and processing of the vibration source is then performed, enabling various sensing tasks such as vibration source event type identification and vertical distance classification.
[0055] The system returns the original signal trajectory containing valid event information distributed along the space at each moment, and continuously accumulates B original signal trajectories on the time axis to obtain a two-dimensional time-space signal matrix (Time-Space Matrix) M:
[0056] M=X ab (a=1,2,...,A; b=1,2,...,B) (1)
[0057] Where A represents the number of spatial sampling points contained in the space-time signal matrix, and B represents the number of time sampling points in the matrix. Figure 4 , the horizontal axis represents the time axis, and the sampling interval between two sampling points is ΔT=1 / f s , f s is the pulse trigger frequency on the time axis, that is, the time sampling frequency. The vertical axis represents the spatial axis, which represents the data collection spatial points along the detection fiber. The distance between the two spatial points is ΔS, which is the spatial resolution.
[0058] In this embodiment, the spatiotemporal signal matrix was collected from an on-site excavator experiment conducted in Tongren, Guizhou in 2019. The excavator performed two operations, bucket tamping and excavation, at different vertical distances from the optical fiber, resulting in a common two-task problem: one is to identify different operating modes of the excavator, and the other is to classify different vertical distances. The radial distances of the bucket tamping (Striking) event are 0m, 1m, 2m, 3m, ..., 15m, while the radial distances of the excavating (Excavating) event are 2m, 3m, 4m, 6m, 8m, 10m, 12m, and 14m. The experiment was conducted in the above manner, and spatiotemporal signal matrix samples were collected.
[0059] Step 2: Construct a multi-task learning sample dataset based on the spatiotemporal matrix signal obtained in step 1. In this embodiment, the size of each spatiotemporal signal matrix in the sample set is set to 100×250, representing a spatial coverage range of 129m and an event duration of 5s.
[0060] Step 3: Divide the multi-task learning sample dataset into training, validation, and test sets. This implementation uses a 5-fold cross-validation method for division, where 85% of the entire dataset is divided into a cross-validation training set and a validation set. The training set samples account for 4 / 5 of this part of the data, and the validation set accounts for 1 / 5. The remaining 15% of the data is the test set. The number of samples in each set is shown in Table 1:
[0061] Table 1 Number of samples in the multi-task learning database
[0062]
[0063] Step 4: Build a two-stage multi-task learning network model.
[0064] The multi-task learning network is a two-stage framework consisting of a shared network part in the first stage and a task network part in the second stage, which respectively extracts task shared features and respective task features, and is referred to as a multi-task learning model (MTL). For the shared network design of the first stage, classic image classification networks such as AlexNet, ResNet, and VGG can be selected as their basic backbone. In order to extract multi-level shared features, the present invention requires a deeper convolutional structure, so ResNet18 is preferred. For the task network in the second stage, it is essentially a feature selector, which is used to filter out specific task features that are beneficial to each task from the shared features and implement the corresponding tasks. Each task corresponds to a specific task network, and its structure can be the same or different. In terms of structural design, an ordinary multi-layer convolution can be used to directly receive shared features and extract specific task features. A certain attention mechanism can also be added. For example, the present invention uses multiple attention modules connected in series to first generate an attention template representing feature weights based on a part of the shared features, and act on another part of the shared features, thereby extracting specific task features that are beneficial to each task.
[0065] See Figure 5 In the two-stage multi-task learning model constructed in this embodiment, the shared network includes an initial convolutional layer and eight sequentially connected residual blocks. The initial convolutional layer is used to perform preliminary feature extraction and downsampling on the input spatiotemporal matrix. The eight residual blocks are connected after the initial convolutional layer and serve as feature extractors to further extract sample data features to generate shared features and provide them to the task network. The task network includes a first specific task network for identifying event categories and a second specific task network for achieving vertical positioning. The first specific task network includes four sequentially connected attention modules. The second specific task network has the same structure as the first specific task network, but its network parameters and weights are different.
[0066] The output ends of the 1st and 2nd residual blocks in the 8 residual blocks are respectively connected to the input end of the 1st attention module in the first and second specific task networks, the output ends of the 3rd and 4th residual blocks are respectively connected to the input end of the 2nd attention module in the first and second specific task networks, the output ends of the 5th and 6th residual blocks are respectively connected to the input end of the 3rd attention module in the first and second specific task networks, and the output ends of the 7th and 8th residual blocks are respectively connected to the input end of the 4th attention module in the first and second specific task networks; among them, the output features of the 1st, 3rd, 5th and 7th residual blocks are used to generate attention templates, and the output features of the 2nd, 4th, 6th and 8th residual blocks are artificially element-wise multiplied with the generated attention templates in the attention modules connected to them to obtain their respective task-associated features.
[0067] In order to obtain deeper and deeper features, the eight residual blocks in this embodiment adopt two structural types. For the convenience of description, the two structural types of residual blocks are named residual block type 1 and residual block type 2 respectively; among them, the 1st, 2nd, 4th, 6th, and 8th residual blocks adopt residual block type 1, and the channel scale of the input feature remains unchanged when passing through this type of residual block. The 3rd, 5th, and 7th residual blocks adopt residual block type 2; the residual block type 1 structure includes two convolutional layers conv3×3, two BN layers, and two ReLU layers. According to the convolutional layers conv3×3, BN, and Re The LU layer, conv3×3 convolutional layer, BN, and ReLU layers are connected sequentially. Data is input by the first conv3×3 convolutional layer, and a jump connection is made from input to output before the last ReLU layer. Residual block type 2 has the same structure as residual block type 1, except that a conv1×1 convolutional layer and a BN layer are added to the input-output jump connection before the last ReLU layer. Furthermore, the number of channels of the input features is doubled and the scale of the feature map is changed when passing through the first conv3×3 convolutional layer. When used, the number of channels of the sample data features extracted by the initial convolutional layer is doubled after passing through the first convolutional layer of the third, fifth, and seventh residual blocks, so that the output feature dimensions match.
[0068] set up Figure 5 The shared features output by residual block 1 are Then the output of residual block 2 is Have the same size and number of channels. And the shared features output by residual block 3 With doubled number of channels and different sizes. Similarly, the following residual blocks generate shared features in the same way.
[0069] In each task-specific network, the first three attention modules have the same structure, while the fourth attention module is different. The first three attention modules all perform three steps: attention template generation, task-related feature screening, and task-specific feature extraction. Taking attention modules 1.1 and 2.1 as an example, the shared features output by residual block 1 in the shared network are It is input into the attention template generators 1.1 and 2.1, and different attention templates are generated. The generated attention templates have the same size and number of channels as the shared feature F2. Each attention template generator is actually a small convolutional network, which consists of two layers of convolutional layers with batch normalization (BN) and nonlinear activation functions. The convolutional network adopts a structure similar to a bottleneck layer to reduce computational complexity. Specifically, the structure first performs preliminary feature extraction on the input features through a convolution layer with a convolution kernel size of 1×1, while reducing the number of feature channels to half of the number of feature channels output by the next convolution layer, and then the second 3×3 convolution layer performs further feature extraction. In addition, in order to make the final attention template distributed between 0 and 1, the activation function of the last convolution layer is replaced with a sigmoid function. The attention template generated by this process and Respectively reflects the selection weights from shared features to task-related features in attention modules 1.1 and 2.1. 1,1 and M 2,1 Respectively Element-wise multiplication of , we get the task-related features and
[0070] A 1,1 =M 1,1 ⊙F2,A 2,1 =M 2,1 ⊙F2 (2)
[0071] where ⊙ represents the element-wise product of matrices.
[0072] Task-related features and Further convolution and pooling operations are performed on the output layer to obtain task-specific features. In the output layers 1.1 and 2.1, the number of channels of the features is doubled by the convolution layer to obtain deeper features, and then the size is reduced by the pooling layer to match the shared features. Finally, the task-specific features obtained and Shared features Perform channel dimension splicing to obtain spliced features and They will serve as input to the next attention module.
[0073] Similarly, the following attention modules 1.2, 1.3, 1.4 and 2.2, 2.3, 2.4 are constructed in a similar way. However, in attention modules 1.4 and 2.4, different output layers 1.4 and 2.4 are used. The output layer consists of a global average pooling (GAP), a one-dimensional average pooling layer, and a final softmax layer. The two output layers actually act as classifiers for the two tasks and obtain the final category results based on the specific task features. Specifically, in attention modules 1.4 and 2.4, the task-related features and It is input into the global average pooling layer and returns a feature vector consisting of the average value of each channel feature map. Subsequently, the feature vector generated in the previous step is pooled into an output feature vector of the same length as the number of output categories through a one-dimensional average pooling layer, and finally converted into a probability vector through a softmax layer. Finally, the event category and vertical distance can be determined based on the maximum value of the two probability vectors. Compared with the commonly used output layer based on the fully connected layer, the output layer based on the global average pooling adopted in the present invention does not contain parameters, which can significantly reduce the computational complexity and make the entire structure more lightweight.
[0074] Step 5: Network training and structural parameter tuning. Using the 5-fold cross-validation method as an example, the model is trained iteratively offline and its structural parameters are tuned to improve event recognition and vertical distance classification performance while reducing computational complexity and making the model more lightweight. The detailed process is as follows:
[0075] Step 5.1. Network parameter initialization
[0076] Initialize the parameters of the two-stage multi-task learning model, including the matrix weight W and the bias b. The initialized network parameters are the starting point of model training. Good initialization parameters make the model easier to learn and converge quickly. The present invention uses the Xavier initialization method for parameter initialization. In order to ensure that the variance of each layer is consistent during forward propagation and backward propagation, the distribution range of the random initialization parameters is a number n of input parameters passing through the layer. in , the number of output parameters n out The uniform distribution within the obtained distribution range is:
[0077]
[0078] Where U represents uniform distribution.
[0079] Step 5.2: Forward Propagation
[0080] The multi-task learning network takes the spatiotemporal matrix training samples as input, passes through the shared network and two specific task networks, and finally obtains the probability distribution of the two task prediction categories. All the operation layers used by the network in the forward propagation process can be summarized as convolution layer, batch normalization (BN) layer, nonlinear activation function layer, pooling layer, softmax layer, and a Mini-Batch sample set [X1, X2, ..., X1] with a sample size of n at each input during offline training. i ,...,X n ],( Representing a spatiotemporal matrix sample with width and height of M and N respectively) as an example, the specific operations of each layer are explained:
[0081] Convolutional layer: Assume that the number of convolution kernels in a convolutional layer is M, the size is m×n, and each convolution kernel needs to perform K convolutions. The weight matrix W after the jth convolution kernel is initialized is j , the bias vector is Bias j , for this layer the input data or features X starts from the first data point X 1:m+1,1:n+1 Starting from the submatrix consisting of the 1st to the m+1th row and the 1st to the n+1th column of the matrix X, the convolution kernel is covered to the data point, and the m×n data in X are convolved to obtain the first convolution result:
[0082] Conv jhi =X h:m+h,i:n+i W j +Bias j (4)
[0083] Where j, k, l, and m represent the jth convolution kernel, the kth convolution, the size of the input data, the length and width of the convolution kernel, respectively. h and i represent the position coordinates of the selected data points in the matrix X.
[0084] Similarly, the next time the convolution is performed, the convolution kernel is moved to the right by S. conv Step size, calculate the next data point according to formula (4), if the convolution kernel has moved to the rightmost side of the matrix X, then move to the next S conv The leftmost end of the row, and so on, until the entire matrix X is fully calculated. Data X i After M convolution kernels, the output of the convolution layer is Conv1 = [Conv1, Conv2, ..., Conv j ,Conv M ], where Conv j Conv jhi The matrix formed.
[0085] Batch Normalization Layer: Batch normalization is used to normalize the feature distribution after convolution. Suppose the output feature of a Mini-Batch is [X1,X2,...,X i ,...,X n ], then the features after batch normalization The calculation formula is:
[0086]
[0087] Among them, μ, σ 2 are [X1,X2,...,X i ,...,X n ], ε is a very small constant used to prevent the divisor from being zero.
[0088] Nonlinear activation function layer: This invention uses two activation functions to increase the nonlinearity of the network. The commonly used Rectified Linear Unit (ReLU) is calculated as follows:
[0089] Out ReLU =max(0,X) (6)
[0090] Where X is the input feature of the activation layer, Out ReLU Represents the output of the ReLU layer. Another activation function used in the present invention is the Sigmoid function, which is calculated as follows:
[0091]
[0092] Unlike ReLU, this activation function transforms the output feature range to between 0 and 1, so it is used to generate attention templates.
[0093] Pooling layer: This invention uses three types of pooling layers: two-dimensional maximum pooling, one-dimensional average pooling, and global average pooling. This invention uses two-dimensional maximum pooling in output layers 1.1-1.3 and 2.1-2.3. Let the number of pooling kernels in a pooling layer be M, and the size be p×p. The calculation method of pooling is similar to the convolution operation. Similarly, the pooling kernel is covered on the upper left end of the input feature X, and the maximum value of the covered area is obtained as the output of this pooling step. Then, the pooling kernel is moved to the right by S. pool After the step size, the next pooling operation is performed. If the pooling kernel has moved to the rightmost side of the matrix X, it moves to the next S pool The leftmost end of the row, and so on, until the entire feature matrix is fully calculated. The final output of the pooling layer is Pool1 = [Pool1, Pool2, ..., Pool j ,Pool M]. Among them, Pool j Output matrix Conv for the jth convolutional layer j The pooling output matrix of .
[0094] This example uses global average pooling and one-dimensional average pooling in output layers 1.4 and 2.4. Assume that the input feature map containing M channels is [X1, X2, ..., X i ,...,X M ], global average pooling directly calculates the average value x of each channel feature map i , output M feature vectors [x1,x2,...,x i ,...,x M For one-dimensional average pooling, the operation is similar to the two-dimensional maximum pooling operation, but the input of this layer is the one-dimensional feature vector [x1,x2,...,x i ,...,x M ], and the pooling kernel is only 1×p. After covering the left end of the feature vector with the pooling kernel, the average value of the covered area is calculated as the output, and then the pooling kernel is moved in the same way until the entire feature vector is calculated.
[0095] Softmax layer: The softmax layer is located at the end of the two task-specific networks and is used to convert the feature vector output by the network into a vector of predicted probabilities for each category. The calculation method is as follows (taking the probability of a certain category as an example):
[0096]
[0097] where x i Represents the output vector of a certain category, and C represents the number of categories.
[0098] Step 5.3, loss function calculation and back propagation
[0099] Unlike single-task networks, multi-task learning networks solve multiple problems simultaneously, so each specific task network has its own loss function. That is, the task network in the second stage includes multiple loss functions. In order to make the two tasks converge synchronously, it is necessary to linearly combine the two loss functions to obtain the total loss function, which is used as the optimization target to make it converge iteratively during the training process. That is:
[0100]
[0101] Among them L i (X,Y i )(i=1,2) represents the loss function for event recognition and vertical distance classification. i(i=1,2) is the weighting coefficient used to ensure the balance of gradients during back propagation. This coefficient can be directly selected as a fixed value of 0.5, or it can be dynamically adjusted according to the gradient changes during training. i (X,Y i ), since both tasks are classification tasks, the present invention uses the cross entropy function as the loss function of the two tasks, namely:
[0102]
[0103] where n i is the number of categories of task i, and are the output vector and predicted probability vector of task i respectively.
[0104] Using the total loss value L total Reversely calculate the parameter gradients of the multi-task learning model and use the parameter gradients to update the model. The present invention uses the Adam algorithm for optimization, and the calculation steps are as follows:
[0105] g t =▽ θ L t (θ t-1 ) (11)
[0106] m t =u*m t-1 +(1-u)*g t (12)
[0107]
[0108] Where: g t is the target gradient for calculation, m t 、n t are the first-order and second-order moment estimates of the gradient, u,v∈[0,1), and are the exponential decay rates of the first-order and second-order moments of the gradient, respectively.
[0109] Let the tth iteration, Then the network parameter update formula is:
[0110]
[0111] Where: α is the learning rate, ε is a very small number to prevent division by zero.
[0112] This embodiment takes 5-fold cross validation as an example to illustrate the structural parameter tuning process of the model. For a network with certain structural parameters, a 5-fold cross validation is performed on it. Each 5-fold cross validation includes 5 rounds of verification process. In each round of verification process, the model is first trained with the training set in that round. The specific process is: after updating the multi-task learning model with the model parameter θ, the total loss function value of the training and the number of iterations are used to determine whether it has converged. If it is continuously less than a set threshold or reaches the set maximum number of iterations, it means that it has converged and the training process is over, otherwise jump to step 5.2. After the training is completed, the verification set is input into the trained two-stage multi-task learning network model to verify the accuracy of the model.
[0113] After training is completed, the model is verified using the validation set to obtain the verification accuracy of the two tasks. A total of five rounds of verification are performed in this way, and the average accuracy of the two tasks in the five rounds of verification is calculated.
[0114] After a 5-fold cross-validation is completed, the average accuracy of the two tasks in the 5 verification processes and the computational complexity of the model are recorded, the network structure parameters are adjusted, and the 5-fold cross-validation is repeated multiple times. By selecting appropriate network structure parameters, the computational complexity is reduced as much as possible while ensuring a high accuracy, and the lightweight model is achieved. The present invention focuses on adjusting the overall scale of the network and the number of feature channels in the entire network. The overall scale of the network is mainly affected by the number of residual blocks and attention modules. Since every two consecutive residual blocks and one attention module in each of the two specific task networks are connected as a repeating unit, and the entire network is mainly composed of multiple such repeating units. Therefore, determining the number of repeating units can determine the scale of the entire network. For the number of feature channels, since the number of channels of the shared features is doubled only after passing through the first convolutional layer of residual blocks 3, 5, and 7 in the shared network, and the number of channels of the features in the specific task network corresponds to the shared network, it is only necessary to determine the number of input feature channels of the first repeating unit to determine the number of feature channels in the entire network. For the impact of different numbers of repeating units and the number of input feature channels of the first repeating unit on the average verification accuracy and computational complexity, please refer to Figure 6 and Figure 7, where the model's multiply-accumulate operations (MACs) are used to describe the model's computational complexity. Regarding the number of repeating units, it can be seen that after exceeding 4, the accuracy of both tasks no longer increases significantly, while the computational complexity still shows a linear growth. Therefore, the number of repeating units is set to 4, indicating that the model's shared network contains 8 residual blocks and each task-specific network contains 4 attention modules. Regarding the number of feature channels, it can be seen that the accuracy of both tasks basically stops increasing after the number of input feature channels of the first repeating unit exceeds 16, while the computational complexity still grows exponentially. Therefore, the number of input feature channels of the first repeating unit is selected as 16, and the number of remaining feature channels can be determined according to the model structure. The final network model structure parameters are shown in Table 2, and the model under this structure is used as the final multi-task learning model.
[0115] Table 2 Network structure parameters of the final multi-task learning model
[0116]
[0117]
[0118] Step 6: Input the test set into the final multi-task learning model in step 5 to perform event type recognition and vertical distance classification to achieve online monitoring of signals along the optical cable.
[0119] To verify the effectiveness of the method in this embodiment, we constructed Comparison Model 1 and Comparison Model 2. We then compared the results obtained from the three network models, including event recognition and vertical distance classification accuracy, model scale, and model calculation rate. The process is as follows:
[0120] The test set of this embodiment is simultaneously input into two other single-task networks trained under the same conditions to solve the same event recognition and vertical distance classification problems. Among them, the comparison model 1 is a combined single-task model, see Figure 8. This model is actually a combination of two single-task networks, each of which is modified from the multi-task model, retaining only the event recognition branch or the vertical distance positioning branch. This model is referred to as the combined single-task model (combined STL model, STL). Comparison model 2 is an existing study on solving event recognition and vertical distance classification with a single-task network (Y.Shi, S.Dai, T.Jiang, Z.Fan, "A recognition method for multi-radial-distance event ofΦ-OTDRsystem based on CNN," IEEE Access, vol.9, pp.143473-143480, 2021.) This model is a multi-classifier based on Inception_V3. See Figure 9 It consists of an initial convolutional and pooling layer, 11 intermediate Inception modules consisting of five different types, and a final average pooling layer and fully connected layer. The model outputs 24 categories, consisting of 16 vertical distance tamping event types and 8 vertical distance excavation event types, hence the name multi-classifier (MC).
[0121] The confusion matrix of the three models is calculated based on the classification accuracy of different event types and vertical distances. Figure 10 It can be seen that the degree of confusion of the three models is relatively small. According to the confusion matrix, the accuracy, precision, recall and F1-score of the three models in the two tasks are calculated, as shown in Table 3; the accuracy of the three models is also visualized, see Figure 11 It can be seen that the accuracy rates of the multi-task learning model, the combined single-task model, and the multi-classifier in event recognition are 100.00%, 99.79%, and 99.95%, respectively, and the accuracy rates in vertical distance classification are 99.84%, 99.74%, and 98.59%, respectively. Therefore, it is not difficult to find that for the event recognition task, since there are only two event categories, the three models can achieve an accuracy rate of more than 99%. However, the multi-task learning model is still slightly higher than the other two models. For the vertical distance classification task, the multi-task learning model has a higher accuracy rate than the combined single-task model and the multi-classifier. Therefore, in terms of classification accuracy, the multi-classifier model has better performance than the other two models in recognition and positioning tasks.
[0122] Table 3 Classification accuracy of three models for two tasks
[0123]
[0124] For the vertical distance classification task: This embodiment groups three or five adjacent positioning results together, representing positioning with different positioning error ranges of ±1m and ±2m. The accuracy of the three models within the two positioning error ranges is shown in Table 4. The multi-task learning model and the combined single-task model have 100% accuracy within the error range of ±2m, and only the multi-task learning model has 100% accuracy within the error range of ±1m. It shows that the two-stage multi-task learning model provided in this embodiment has the lowest vertical distance positioning error, which can reach ±1m; while the combined single-task model is ±2m, which is in the middle position; the multi-classifier model is greater than ±2m and performs the worst. It can be seen that compared with the existing single-task method, the multi-task model proposed in this embodiment has better recognition and positioning accuracy.
[0125] Table 4 Positioning accuracy of three models
[0126]
[0127]
[0128] Regarding model size and computational efficiency, the space occupied, computational complexity, and offline training and online testing results of the three models are shown in Table 5 and Figure 12As shown. The online test time includes data preprocessing (matrix clipping and downsampling) and model inference time. The results show that in terms of model scale, the size of the multi-task learning model is 4.5MB, which is only 61.8% and 5.2% of the combined single-task model and multi-classifier model, making it easier to deploy in embedded systems. In terms of computational complexity, the number of multiplications and additions in the inference process of the multi-task learning model is only 67.8% and 19.8% of the other two models. During offline training, with the same parameters, the training time of the multi-task learning model, the combined single-task model and the multi-classifier model on the GPU are 406.6 seconds, 583.8 seconds and 1003.6 seconds respectively, which shows that the two-stage multi-task learning model of this embodiment can complete the model preparation the fastest. In online testing, a spatiotemporal matrix consisting of 100 sensor nodes (reflecting a spatial range of 129 meters) took only 0.3 milliseconds on a commercial GPU (NVIDIA GeForce(R) GTX 1080Ti) and 5.7 milliseconds on a general-purpose CPU (Intel(R) Core(TM) i7-10700), significantly faster than the other two models. Data preprocessing took only 0.004 milliseconds per sample, negligible compared to the total processing time of 0.3 milliseconds. This means that with a spatial sampling interval of 1.29 meters, the processing time for the two tasks along the entire 18.7-kilometer line was only 0.04 seconds. To the best of our knowledge, this is half the time cost of the fastest single-task model for event recognition reported so far (Y. Yang, Y. Li, T. Zhang, Y. Zhou and H. Zhang, “Early safety warnings for long-distance pipelines: A distributed optical fiber sensor machine learning approach,” in Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2021, vol. 35. no. 17, pp. 14991-14999.). These results demonstrate that computational resources and time overhead can be significantly reduced by sharing feature extraction and removing redundant layers in the proposed MTL model. Even on a general-purpose CPU, simultaneous event recognition and two-dimensional localization for a DAS with tens of thousands of sensor nodes can be achieved online. Therefore, it provides a very promising approach for large-scale or ultra-large-scale array processing with multiple sensing tasks in DAS.
[0129] Table 5 Model scale and computational efficiency of three models
[0130] Model Type Model Size[MB] MACs[G] Training Time[s] Test Time(GPU)[ms] Test Time(CPU)[ms] MTL 4.5 0.221 406.6 0.3 5.7 STL 7.3 0.326 583.8 0.4 7.9 MC 87.4 1.114 1003.6 1 15.9
[0131] From the above, it can be seen that the present invention provides a multi-task enhanced DAS system and processing method, which realizes the identification and positioning of vibration sources at the same time by constructing a two-stage multi-task learning model. The model mines the data correlation of the two tasks through the shared network of the first stage, extracts the common features of the tasks, and forms a shared feature pool; then, through the attention module in the task network of the second stage, the features of each task are selected from the shared feature pool, and finally the two tasks are solved at the same time. Compared with the existing technology, the present invention is superior to the existing single-task learning model-based identification and positioning methods in event recognition and vertical positioning accuracy, especially in model scale and computational efficiency. There is less redundant data in its classification process, which effectively improves the intelligent processing capability and processing efficiency of DAS. It provides a more advanced multi-task real-time solution for large-scale vibration monitoring applications of optical fiber Internet of Things.
[0132] The above are embodiments of the present invention. The above embodiments and the specific parameters therein are only for the purpose of clearly describing the invention verification process and are not intended to limit the scope of patent protection of the present invention. The scope of patent protection of the present invention shall still be subject to the claims. Any equivalent structural changes made by using the contents of the description and drawings of the present invention shall also be included in the scope of protection of the present invention.
Claims
1. A multi-tasking method for a DAS system, characterized in that: The following steps are involved: Step 1: Use the DAS system to collect distributed optical fiber sensing signals, divide the collected signals into time periods, and obtain a space-time matrix signal containing time information and spatial information; Step 2: Construct a multi-task learning sample dataset based on the spatiotemporal matrix signal obtained in step 1, and each sample in the dataset contains multiple task labels; Step 3: Classify the sample data set based on preset rules to obtain the training set, validation set, and test set; Step 4: Construct a two-stage multi-task learning network model. The two-stage multi-task learning network model includes a shared network in the first stage and a task network in the second stage. The shared network is used to extract shared features from the input spatiotemporal matrix sample data and provide them to the task network. The task network is composed of n task-specific networks with different network structures or task-specific networks with the same structure but different parameters and weights. Each task-specific network is used to extract its own task-related features from the received shared features to achieve synchronous processing of multiple tasks. Step 5: Input the training set into the two-stage multi-task learning network model for training, and input the validation set into the trained two-stage multi-task learning network model to verify the accuracy of the model; Step 6: Input the test set into the model verified in step 5 to complete multi-task processing.
2. The multi-tasking processing method for a DAS system according to claim 1, characterized in that: The shared network uses ResNet18 as the basic skeleton, and the task network is constructed by connecting multiple attention modules in series.
3. The multi-tasking processing method for a DAS system according to claim 2, characterized in that: The shared network includes an initial convolutional layer and eight sequentially connected residual blocks. The initial convolutional layer is used to perform preliminary feature extraction and downsampling on the input spatiotemporal matrix. The eight residual blocks are connected after the initial convolutional layer to extract sample data features at different levels and transmit them as shared features to the task network. There are two task networks, namely the first specific task network and the second specific task network, each of which is composed of four sequentially connected attention modules; The output ends of the 1st and 2nd residual blocks in the 8 residual blocks are respectively connected to the input end of the 1st attention module in the first and second specific task networks, the output ends of the 3rd and 4th residual blocks are respectively connected to the input end of the 2nd attention module in the first and second specific task networks, the output ends of the 5th and 6th residual blocks are respectively connected to the input end of the 3rd attention module in the first and second specific task networks, and the output ends of the 7th and 8th residual blocks are respectively connected to the input end of the 4th attention module in the first and second specific task networks; among them, the output features of the 1st, 3rd, 5th and 7th residual blocks are used to generate attention templates, and the output features of the 2nd, 4th, 6th and 8th residual blocks are element-wise multiplied with the results of the generated attention template calculation in the attention modules connected to them to obtain their respective task-associated features.
4. The multi-tasking method for a DAS system according to claim 3, wherein: The 8 residual blocks in the shared network use two types of residual blocks, namely residual block type 1 and residual block type 2; the 1st, 2nd, 4th, 6th, and 8th residual blocks use residual block type 1, and the channel scale of the input feature remains unchanged when passing through this type of residual block. The 3rd, 5th, and 7th residual blocks use residual block type 2; the residual block type 1 structure includes two convolutional layers conv3×3, two BN layers, and two ReLU layers, in the order of convolutional layer conv3×3, BN, ReLU layer, convolutional layer conv3×3, BN, and ReLU layer. The feature is input by the first convolutional layer conv3×3, and a jump connection is performed from input to output before the last ReLU layer. The channel and scale of the input feature remain unchanged when passing through this type of residual block. The residual block type 2 has the same structure as the residual block type 1. The difference is that a convolutional layer conv1×1 and a BN layer are added to the input-output jump connection before the last ReLU layer, and the number of channels of the input feature is doubled when passing through the first convolutional layer conv3×3, and the scale of the feature map changes.
5. The multi-tasking processing method for a DAS system according to claim 3, characterized in that: The attention modules in each task-specific network adopt two structures, a and b. The first three attention modules adopt structure a, and the fourth attention module adopts structure b. The structure a consists of two parts: an attention template generator and an output layer. In this structure, the attention template generator adopts a structure similar to a bottleneck layer, which is connected in sequence according to the conv1×1, BN, ReLU, conv3×3, BN layer and sigmoid layer. After the feature passes through the convolution layer with a convolution kernel size of 1×1, the number of its feature channels is reduced to half of the number of output feature channels of the next convolution layer. The activation function of the last convolution layer adopts the sigmoid function so that the final attention template is distributed between 0 and 1; the output layer is connected in sequence according to the conv3×3, BN, ReLU layer and MaxPool layer, and the activation layer of the MaxPool function is used as the output of the output layer; The structure b consists of two parts: an attention template generator and an output layer. The attention template generator in this structure is the same as that in structure a. The output layer is connected in sequence according to the global average pooling (GAP), one-dimensional average pooling layer and softmax layer, and the softmax function is used as the output of the output layer.
6. The multi-tasking method for a DAS system according to claim 1, characterized in that: During the training process of step 5, a loss function is set for the specific task network corresponding to each task, and all loss functions are linearly combined to obtain the total loss function of the task network, so as to iterate so that the total loss function converges and completes the training.
7. The multi-tasking method for a DAS system according to claim 1, characterized in that: During the training process of step 5, the number of residual blocks, the number of attention modules, and the number of feature channels can be adjusted.
8. A multi-task enhanced DAS system, comprising a detection optical fiber, a laser emitting device, an optical circulator, an optical signal demodulation device, and a signal processing host, characterized in that: The detection optical fiber is used to sense vibration signals; The laser emitting device is composed of a laser, an acousto-optic modulator and an erbium-doped fiber amplifier connected in sequence; the laser generates a continuous coherent optical signal and sends it to the acousto-optic modulator, the acousto-optic modulator modulates the received optical signal into an optical pulse signal and sends it to the erbium-doped fiber amplifier, the erbium-doped fiber amplifier amplifies the received optical pulse signal and sends it to the optical circulator; The optical circulator is connected to the detection optical fiber; receives the amplified optical pulse signal and transfers it to the detection optical fiber, causing it to generate Rayleigh scattering during the transmission process; and simultaneously receives the backward Rayleigh scattered light signal returned along the detection optical fiber and sends the signal to the optical signal demodulation device; The optical signal demodulation device performs photoelectric and analog-to-digital conversion on the received backscattered Rayleigh light signal to obtain a digital electrical signal, and sends the digital electrical signal to the signal processing host; The signal processing host is used to convert digital electrical signals into space-time matrix signals, and use the multi-task processing method for a DAS system described in claim 1 to achieve multi-task processing.
Citation Information
Patent Citations
Distributed optical fiber sensing signal identification method based on Resnet of attention mechanism
CN113049084A
Processing communications signals using a machine-learning network
CN113906719A