Phi-OTDR optical fiber disturbance sample expansion method based on improved conditional generative adversarial network
Through the improved conditional adversarial generation network, fiber perturbation samples are generated based on the attention-enhanced U-Net structure, which solves the problem of difficulty in obtaining sample data, and achieves the expansion of sample sets and the improvement of monitoring accuracy.
Patent Information
- Application Number
- CN202510225527.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-17
AI Technical Summary
In fiber optic disturbance monitoring, it is difficult to obtain high-quality and sufficient sample data, resulting in high training cost and low efficiency of intelligent detection models.
An improved conditional adversarial generation network (CGAN) is adopted, and a generator and discriminator model based on attention-enhanced U-Net structure is used to generate fiber-optic perturbation samples that are closer to real data through game training.
The fiber-optic disturbance sample set is effectively expanded, reducing data acquisition costs, and improving monitoring accuracy and efficiency.
Smart Images

Figure CN120162585A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical fiber status monitoring based on distributed optical fiber sensing, and specifically relates to a method for generating Φ-OTDR optical fiber perturbation samples. Background Art
[0002] Phase-sensitive Optical Time Domain Reflectometry (Φ-OTDR) technology has important applications in the field of optical fiber perturbation monitoring and can accurately detect minute perturbations and abnormal events on optical fiber lines. By measuring the phase change of the transmitted signal in the optical fiber, Φ-OTDR can capture vibrations, pressures, or temperature changes in real time, featuring high sensitivity and high precision, and it has extensive applications in fields such as oil and gas pipeline monitoring, intelligent building monitoring systems, and water conservancy environment monitoring.
[0003] With the continuous development of artificial intelligence technology, its application in the field of Φ-OTDR optical fiber monitoring is also increasing. Through technologies such as deep learning, intelligent models can automatically identify and analyze perturbation events in optical fibers, thereby improving the accuracy and efficiency of monitoring. However, constructing an efficient intelligent detection model, especially in optical fiber perturbation monitoring, often requires a large amount of real perturbation event data as training support. However, due to the complex and changeable actual environment, it is not easy to obtain high-quality and sufficient sample data. This not only involves the technical difficulty of data acquisition but also requires a relatively high cost investment. Therefore, on the basis of small sample data, adopting an effective sample expansion method to obtain a better intelligent model has become the key to improving monitoring accuracy and reducing costs. Summary of the Invention
[0004] Based on the above deficiencies existing in the prior art, the present invention provides a method for generating Φ-OTDR optical fiber perturbation samples based on an improved Conditional Generative Adversarial Nets (CGAN).
[0005] Based on the distinguishability of optical fiber perturbation phase signal samples, the present invention proposes a method for expanding Φ-OTDR optical fiber perturbation samples based on an attention-enhanced U-Net conditional adversarial generative network:
[0006] Construct an improved CGAN generator and discriminator model, and let the generator and discriminator conduct adversarial training. The structure of the generator is a U-Net structure enhanced by hybrid attention. The input of the generator is random noise obeying the normal distribution and the encoded labels of corresponding events, and the output is the event samples generated by prediction. The discriminator consists of a two-dimensional convolutional layer and a linear layer. Use the loss function to calculate the error between the predicted labels and the actual labels output by the discriminator, and cooperate with the iterative optimization algorithm to update the model parameters to reduce the error, and finally make the loss converge.
[0007] The U-Net type structure of the generator includes a convolutional module, a downsampling module, an upsampling module, and a hybrid attention module. The convolutional module consists of a two-dimensional convolutional layer and uses the LeakyReLU function as the activation function. Both the downsampling and upsampling modules are composed of two-dimensional convolutional modules. The hybrid attention module includes a channel attention module and a spatial attention module.
[0008] The channel attention module inputs the results of global max pooling and global average pooling in the spatial dimension into the multi-layer perceptron respectively and adds them, and finally activates through the Sigmoid function. The spatial attention module concatenates the results of global max pooling and global average pooling in the channel dimension by channel, performs two-dimensional convolution on this basis and activates using the Sigmoid function. After that, the two are mixed in series for attention enhancement.
[0009] The specific steps include:
[0010] Step 1: Connect the fiber optic cable to the Φ-OTDR system, apply different external perturbations, and collect the original phase signal samples of different perturbation events.
[0011] Step 2: Use forward difference to process the phase signal of the Φ-OTDR fiber optic perturbation to obtain a two-dimensional difference phase signal that can represent the characteristics of each perturbation event.
[0012] Step 3: Use Gaussian filtering to denoise the difference samples.
[0013] Step 4: Normalize the denoised samples and convert them into binary images.
[0014] Step 5: Use one-hot encoding to add sample labels.
[0015] Step 6: Construct an improved CGAN generator and discriminator model, and let the generator and discriminator conduct adversarial training to obtain Φ-OTDR fiber optic perturbation samples that are closer to real data.
[0016] The further Step 1 includes: Fix the fiber optic cable on the fence and connect it to the Φ-OTDR system, apply different external perturbations, and collect the original phase signal samples of different perturbation events.
[0017] The further step 2 includes: The original two-dimensional phase signal matrix is which is the signal of the i-th column in matrix P, where i ∈ [1, N]. Forward difference is performed on it column by column, that is to obtain the two-dimensional phase signal matrix after difference where is the signal after difference of the j-th column.
[0018] The further step 3 includes: Using Gaussian filtering to denoise the difference samples, and the specific formula is:
[0019]
[0020] where x and y are the coordinates of the corresponding positions in the sample matrix, and I ’ (x, y) is the value at the corresponding (x, y) position in the output matrix, I(x + i, y + j) is the value at the corresponding (x + i, y + j) position in the input matrix, and G(i, j) is the weight value in the Gaussian filter, and the specific formula is:
[0021]
[0022] where σ is the standard deviation of the Gaussian distribution.
[0023] The further step 4 includes: Performing maximum-minimum normalization on the denoised data, and the specific formula is:
[0024]
[0025] where, X norm is the normalized data, X is the original denoised data, X min is the minimum value in the original denoised data, and X max is the maximum value in the original denoised data. Then, the matrix is binarized and converted into an image.
[0026] The further step 5 includes: Classifying the image samples and using one-hot encoding to label each category, and the sample labels of each category are [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], and [0, 0, 0, 1] respectively.
[0027] A computer device includes a memory and a processor, the memory stores a computer program, and it is characterized in that when the processor executes the computer program, the above method is implemented.
[0028] Advantages of the present invention: The present invention effectively solves the problem of difficult acquisition in obtaining actual optical fiber disturbance samples by Φ-OTDR. By constructing an improved conditional adversarial generation network and training the model with processed disturbance event samples, a large number of samples are generated, achieving the purpose of expanding the sample set.
[0029] In addition, in the improved conditional adversarial generation network used in the present invention, a U-Net structure enhanced by hybrid attention is used as the generator, which can enhance the network's extraction of key features of samples and improve the details and quality of the generated images. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0031] Figure 1 Schematic flow chart of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention.
[0032] Figure 2 Schematic diagram of an experimental device of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention.
[0033] Figure 3 Structure diagram of the generator of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention.
[0034] Figure 4 Structure diagram of the discriminator of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention.
[0035] Figure 5 Training flow chart of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention.
[0036] Figure 6 Comparison diagram of generated samples of a Φ-OTDR optical fiber disturbance sample expansion method based on an improved conditional adversarial generation network provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the drawings and specific embodiments.
[0038] Example 1:
[0039] The present invention adopts the following technical solution. An unsupervised distributed overhead optical fiber anomaly detection method, and the specific steps are as follows:
[0040] Step 1: Fix the optical fiber on the fence and connect it to the Φ-OTDR system. Apply different external disturbances and collect the original phase signal samples of different disturbance events;
[0041] Step 2: The original two-dimensional phase signal matrix is is the i-th column signal in matrix P, where i ∈ [1, N]. Perform forward difference on it column by column, that is Obtain the two-dimensional phase signal matrix after difference where is the signal after difference of the j-th column.
[0042] Step 3: Use Gaussian filtering to denoise the difference samples. The specific formula is:
[0043]
[0044] where x and y are the coordinates of the corresponding positions in the sample matrix, I ’ (x, y) is the value at the corresponding (x, y) position in the output matrix, I(x + i, y + j) is the value at the corresponding (x + i, y + j) position in the input matrix, and G(i, j) is the weight value in the Gaussian filter. The specific formula is:
[0045]
[0046] where σ is the standard deviation of the Gaussian distribution.
[0047] Step 4: Perform maximum-minimum normalization on the denoised data. The specific formula is:
[0048]
[0049] where, X norm is the normalized data, X is the original denoised data, X min is the minimum value in the original denoised data, and X max is the maximum value in the original denoised data. Then, binarize the matrix and convert it into an image.
[0050] Step 5: Classify the image samples and use one-hot encoding to label each category.
[0051] Step 6: Construct the generator of the improved CGAN model. The structure of the generator is of the U-Net type. Due to its symmetric structure and skip connection characteristics, U-Net can retain more spatial information when generating images. U-Net includes a convolutional module, a downsampling module, an upsampling module, and a hybrid attention module. The convolutional module consists of two-dimensional convolutional layers and uses the LeakyReLU function as the activation function. Both the downsampling and upsampling modules are composed of two-dimensional convolutional modules. The hybrid attention includes channel attention and spatial attention: The channel attention module inputs the results of global max pooling and global average pooling in the spatial dimension into a multi-layer perceptron respectively and adds them, and finally activates through the Sigmoid function; the spatial attention module concatenates the results of global max pooling and global average pooling in the channel dimension by channel, and performs two-dimensional convolution on this basis and activates using the Sigmoid function. Then, the two are mixed in series for attention enhancement. The input of the generator is random noise obeying a normal distribution and the encoded labels of corresponding events, and the output is the event samples generated by prediction.
[0052] Construct the discriminator of the CGAN model. The discriminator consists of two-dimensional convolutional layers and linear layers and is activated through the Sigmoid function. The input of the discriminator is the original real samples and the fake samples generated by the generator, and the output is the predicted labels for various input samples.
[0053] Step 7: Let the generator and the discriminator conduct adversarial training. Based on the predicted labels and actual labels output by the discriminator, use the loss function to calculate the error between the two, and cooperate with the iterative optimization algorithm to update the model parameters to reduce the error, and finally make the loss converge. The trained generator can generate samples corresponding to fiber optic disturbance events by inputting random noise with the label information of each event.
[0054] A computer device, including a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the steps of the Φ-OTDR fiber optic disturbance sample augmentation method of the improved conditional adversarial generation network.
[0055] A computer-readable storage medium, on which a computer program is stored, and is characterized in that when the computer program is executed by a processor, it implements the steps of the Φ-OTDR fiber optic disturbance sample augmentation method of the improved conditional adversarial generation network.
[0056] Example 2: As Figures 1 - 6As shown in the figure, an embodiment of the present invention provides a method for expanding Φ-OTDR optical fiber perturbation samples based on an improved conditional adversarial generation network. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments. First, connect the optical fiber to the Φ-OTDR system, apply different external perturbations, and collect the original phase signal samples of different perturbation events; use forward difference to process the phase signal of Φ-OTDR optical fiber perturbation to obtain a two-dimensional differential phase signal that can represent the characteristics of each perturbation event; use Gaussian filtering to denoise the differential samples; normalize the denoised samples and convert them into binary images; use one-hot encoding to add sample labels; construct an improved CGAN generator and discriminator model, input the sample labels and noise into the generator, and then input the generated fake samples and real samples into the discriminator respectively to make the generator and discriminator conduct game training, so as to obtain Φ-OTDR optical fiber perturbation samples that are closer to real data.
[0057] Step 1: Fix the optical fiber on the fence and connect it to the Φ-OTDR system, apply different external perturbations, and collect the original phase signal samples of different perturbation events;
[0058] In this example, the schematic diagram of the fence optical fiber experimental device is as Figure 2 shown.
[0059] In this example, one end of a single-mode tight-buffered optical fiber with a total length of 4 km is connected to the Φ-OTDR system. Starting from about 2 km, 10 m of the optical fiber is fixed to the fence every 1 m, and different perturbations are applied.
[0060] In this example, the events collected mainly include the optical fiber phase signals in the non-perturbed state and the perturbed state. The non-perturbed state refers to the normal state where the optical fiber is not affected by external high-intensity events and is mainly affected by environmental noise in the experiment; the perturbed state refers to the state where the optical fiber is affected by external relatively large-intensity perturbations. The perturbation events in this experiment are artificial knocking, rain, and wind. The above collected data is sorted into a data set, and the specific composition is shown in Table 1.
[0061] Table 1 Composition table of the data set
[0062]
[0063] Step 2: Perform differential processing on the original two-dimensional phase signal matrix. The original two-dimensional phase signal matrix is is the signal of the i-th column in matrix P, i ∈ [1, N]. Perform forward difference on each column, that is to obtain the differential two-dimensional phase signal matrix where is the signal after the j-th column difference.
[0064] In this example, the size of each original two-dimensional phase signal is 1000×257, and the size after the difference processing is 1000×256.
[0065] Step 3: Use Gaussian filtering to denoise the difference samples. The specific formula is:
[0066]
[0067] where x and y are the coordinates of the corresponding positions in the sample matrix, I ’ (x,y) is the value at the corresponding (x,y) position in the output matrix, I(x+i,y+j) is the value at the corresponding (x+i,y+j) position in the input matrix, and G(i,j) is the weight value in the Gaussian filter. The specific formula is:
[0068]
[0069] where σ is the standard deviation of the Gaussian distribution.
[0070] In this example, σ is set to 1.5.
[0071] Step 4: Perform max-min normalization on the denoised data. The specific formula is:
[0072]
[0073] where, X norm is the normalized data, X is the original denoised data, X min is the minimum value in the original denoised data, and X max is the maximum value in the original denoised data. After that, the matrix is binarized and converted into an image.
[0074] In this example, the size of the image obtained after binarization is 256×256.
[0075] Step 5: Classify the image samples and use one-hot encoding to label each category.
[0076] In this example, the sample labels corresponding to no disturbance, knocking, raining, and wind blowing are [1,0,0,0], [0,1,0,0], [0,0,1,0], and [0,0,0,1] respectively.
[0077] Step 6: Construct the generator of the improved CGAN model. The structure of the generator is of the U-Net type. Due to its symmetric structure and skip connection characteristics, U-Net can retain more spatial information when generating images. In this example, the structure of the generator is as Figure 3As shown, it includes 9 convolutional modules, 4 downsampling modules, 4 upsampling modules, and 9 hybrid attention modules. The convolutional module consists of two two-dimensional convolutional layers and uses the LeakyReLU function as the activation function. Both the downsampling and upsampling modules are composed of two-dimensional convolutional modules. The hybrid attention includes channel attention and spatial attention: The channel attention module inputs the results of global max pooling and global average pooling in the spatial dimension into a multi-layer perceptron respectively and adds them. Finally, it is activated through the Sigmoid function; the spatial attention module concatenates the results of global max pooling and global average pooling in the channel dimension by channel, and on this basis, performs two-dimensional convolution and activates it using the Sigmoid function. Then, the two are mixed in series for attention enhancement. The input of the generator is random noise obeying the normal distribution and the encoded labels of the corresponding events, and the output is the event samples generated by prediction.
[0078] Construct the discriminator of the CGAN model. In this example, the structure of the discriminator is as Figure 4 shown. It consists of 3 two-dimensional convolutional layers and 3 linear layers, and is activated through the Sigmoid function. The input of the discriminator is the original real samples and the fake samples generated by the generator, and the output is the predicted labels for various input samples.
[0079] Step 7: Make the generator and the discriminator conduct adversarial training. Based on the predicted labels and the actual labels output by the discriminator, use the loss function to calculate the error between the two, and cooperate with the iterative optimization algorithm to update the model parameters to reduce the error, and finally make the loss converge.
[0080] In this example, the process of the adversarial training between the generator and the discriminator is as Figure 5 shown. The specific formula of the loss function used is:
[0081]
[0082] Among them, G(I) represents the fake sample image generated by the generator, D(J) represents the probability that the target image is an ideal sample image, and D(G(I)) represents the probability that the generated image is an ideal sample image. The discriminator minimizes the loss function through the iterative optimization algorithm.
[0083] Step 8: The trained generator generates samples corresponding to the optical fiber perturbation events by inputting random noise with the label information of each event.
[0084] In this example, the samples of each perturbation event generated are as Figure 6 shown.
[0085] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for expanding Φ-OTDR optical fiber disturbance samples based on an improved conditional adversarial generation network, characterized in that: An improved CGAN generator and discriminator model is constructed to conduct game training between the generator and the discriminator. The generator structure is a hybrid attention-enhanced U-Net structure. The input of the generator is random noise that follows a normal distribution and the encoded label of the corresponding event, and the output is an event sample generated by prediction. The discriminator consists of a two-dimensional convolutional layer and a linear layer. The loss function is used to calculate the error between the predicted label and the actual label output by the discriminator, and the model parameters are updated with an iterative optimization algorithm to reduce the error and finally converge the loss.
2. The Φ-OTDR optical fiber disturbance sample expansion method based on the improved conditional adversarial generation network according to claim 1 is characterized in that: The U-Net structure of the generator includes convolution module, downsampling module, upsampling module and hybrid attention module; the convolution module is composed of two-dimensional convolution layer and uses LeakyReLU function as activation function; both downsampling and upsampling modules are composed of two-dimensional convolution modules. The hybrid attention module includes channel attention module and spatial attention module.
3. The Φ-OTDR optical fiber disturbance sample expansion method based on the improved conditional adversarial generation network according to claim 2 is characterized in that: The channel attention module inputs the results of global maximum pooling and global average pooling in the spatial dimension into the multi-layer perceptron respectively and adds them, and finally activates them through the Sigmoid function; the spatial attention module concatenates the results of global maximum pooling and global average pooling in the channel dimension by channel, performs two-dimensional convolution on this basis and activates them using the Sigmoid function; then, the two are mixed and connected in series for attention enhancement.
4. The Φ-OTDR optical fiber disturbance sample expansion method based on the improved conditional adversarial generation network according to any one of claims 1 to 3, characterized in that The specific steps include: Step 1: Connect the Φ-OTDR system to the optical fiber, apply different external disturbances, and collect the original phase signal samples of different disturbance events; Step 2: Use forward differential processing to process the phase signal of the Φ-OTDR fiber disturbance to obtain a two-dimensional differential phase signal that can represent the characteristics of each disturbance event; Step 3: Use Gaussian filtering to reduce noise on the differential samples; Step 4: Normalize the denoised samples and convert them into binary images; Step 5: Use one-hot encoding to add sample labels; Step 6: Construct an improved CGAN generator and discriminator model to conduct game training between the generator and the discriminator to obtain Φ-OTDR fiber disturbance samples that are closer to real data.
5. The Φ-OTDR optical fiber disturbance sample expansion method based on the improved conditional adversarial generation network as claimed in claim 4, characterized in that Step 1: Fix the optical fiber on the fence and connect it to the Φ-OTDR system, apply different external disturbances, and collect the original phase signal samples of different disturbance events.
6. The Φ-OTDR fiber disturbance sample expansion method based on the improved conditional adversarial generation network as claimed in claim 4, characterized in that Step 2: The original two-dimensional phase signal matrix is is the signal of the i-th column in the matrix P, i∈[1,N]; forward difference is performed on it column by column, that is, Get the two-dimensional phase signal matrix after difference in is the signal after difference of the jth column.
7. The Φ-OTDR fiber disturbance sample expansion method based on the improved conditional adversarial generation network as claimed in claim 4, characterized in that Step 3: Use Gaussian filtering to reduce the noise of the differential samples. The specific formula is: Where x and y are the coordinates of the corresponding positions in the sample matrix, I ’ (x, y) is the value of the corresponding position (x, y) in the output matrix, I(x+i, y+j) is the value of the corresponding position (x+i, y+j) in the input matrix, and G(i, j) is the value of the weight in the Gaussian filter. The specific formula is: Where σ is the standard deviation of the Gaussian distribution.
8. The Φ-OTDR fiber disturbance sample expansion method based on the improved conditional adversarial generation network as claimed in claim 4, characterized in that Step 4: Perform maximum-minimum normalization on the denoised data. The specific formula is: Among them, X norm is the normalized data, X is the original denoised data, and X min is the minimum value in the original denoised data, X max is the maximum value in the original denoised data; after that, the matrix is binarized and converted into an image.
9. A method for expanding Φ-OTDR optical fiber disturbance samples based on an improved conditional adversarial generation network as claimed in claim 4, characterized in that Step 5: Classify the image samples and use one-hot encoding to label each category. The sample labels of each category are [1,0,0,0], [0,1,0,0], [0,0,1,0] and [0,0,0,1] respectively.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.