A two-stage small-scale anomaly event detection method for RDTS

By constructing a two-stage detection method using spatial and temporal datasets and combining global and local detection modules, the problem of RDTS's inability to detect small-scale abnormal events is solved, achieving efficient and accurate detection of small-scale hot areas, which is suitable for application scenarios such as power transmission and fire monitoring.

CN121502617BActive Publication Date: 2026-05-05CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU UNIVERSITY OF TECHNOLOGY
Filing Date
2026-01-12
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing Raman distributed optical temperature sensors (RDTS) are unable to accurately detect small-scale anomalies with lengths less than the spatial resolution and temperatures less than 10°C above room temperature, resulting in the inability to identify safety incidents in the early stages and increasing the risk of incident escalation.

Method used

A two-stage method for detecting small-scale anomalies is proposed. This method constructs spatial and temporal datasets and utilizes an anomaly detection network combining global and local detection modules, based on RDTS signals, for detection. The method involves constructing spatial and temporal samples, using a global detection module to identify anomaly probabilities, and combining this with a local detection module for secondary classification, thereby achieving accurate detection of small-scale anomalies.

Benefits of technology

It improves the detection accuracy and generalization ability of small-scale anomalies, reduces the false negative rate, and can effectively identify anomalies in small-scale hot zones on optical fibers. It is applicable to fields such as power transmission, long-distance tunnel fire monitoring, and thermal pipeline leak monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502617B_ABST
    Figure CN121502617B_ABST
Patent Text Reader

Abstract

This invention discloses a two-stage small-scale anomaly detection method for RDTS (Real-Time Stress Test), belonging to the field of temperature measurement technology. The method includes the following steps: acquiring RDTS signals containing and excluding small-scale anomalies to construct a reference signal, an empty signal, and a first matrix; constructing a spatial domain dataset D1; constructing Q-channel temporal samples for each spatial domain sample to form a temporal dataset D2; constructing an anomaly detection network, including a global detection module, a classifier, and a local detection module; adjusting the classifier to obtain the optimal classifier; constructing an anomaly detection model; and sampling RDTS signals at time intervals in the detection area, normalizing them, and then using the anomaly detection model for detection. This invention achieves the monitoring of small-scale thermal anomalies by extracting different features of RDTS signals in the spatial and temporal domains. It can automatically and accurately continuously perform small-scale anomaly monitoring tasks and has broad application potential in RDTS-based disaster monitoring scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of temperature measurement technology, and in particular to a two-stage small-scale anomaly detection method for RDTS. Background Technology

[0002] Raman Distributed Temperature Sensor (RDTS) uses optical fiber as the sensing unit. Each response point on the fiber is equivalent to a separate discrete sensor. Its core principle is to utilize the inelastic Raman scattering effect generated by photons interacting with molecular lattice vibrations in the fiber. By analyzing the intensity ratio of the anti-Stokes light to the Stokes light in the backscattered light, temperature information is retrieved in real time. RDTS is widely used in various fields such as monitoring cable temperature in power transmission, real-time monitoring of fires in long-distance tunnels, monitoring leaks in thermal pipelines, and monitoring fires in oil and gas storage tanks due to its advantages of fully distributed sensing, long monitoring distance, high sensitivity, resistance to electromagnetic interference, and low requirements for deployment environment.

[0003] Small-scale anomalies refer to events where the length of the hot zone is much smaller than the spatial resolution of the RDTS (Radio Frequency Identification and Traction Control) device and the temperature of the hot zone is no more than 10°C above room temperature. While RDTS technology has been widely used in safety monitoring, it struggles to detect small-scale anomalies with temperatures close to room temperature. Since the initial stages of safety incidents often manifest as temperature anomalies within small areas, the limitations of RDTS in detecting small-scale anomalies mean that such hazards cannot be identified in a timely manner, leading to missed opportunities for optimal intervention and increasing the risk of escalation.

[0004] Existing RDTS anomaly detection methods include those based on a combination of convolutional neural networks (CNNs) and cosine similarity. However, these methods are only suitable for anomalies of a large scale (several meters) and perform poorly when multiple hot spots appear on the optical fiber. In addition, there are methods based on attention mechanisms and K-Means clustering label generation. These methods are designed for detecting small-scale anomalies and have achieved good results. However, these methods only use features in the spatial domain and do not learn temporal features, so there is still room for improvement in their performance. Summary of the Invention

[0005] The purpose of this invention is to provide a two-stage small-scale anomaly detection method for RDTS that solves the problem that small-scale hot areas with lengths less than the spatial resolution and temperatures less than 10°C above room temperature in the measurement scenario cannot be accurately detected by RDTS.

[0006] To achieve the above objectives, the technical solution adopted by this invention is as follows: a two-stage small-scale anomaly event detection method for RDTS, based on optical fiber sampling of RDTS signals, with Q response points deployed on the optical fiber, and the RDTS signal being a vector containing the temperatures of the Q response points, comprising the following steps:

[0007] S1, collect RDTS signals from K groups containing small-scale anomalies and I groups excluding small-scale anomalies, normalize them into K groups of reference signals and I groups of empty signals, and label the k-th group of reference signals as... , 1≤k≤K, construct the first matrix R1 with I rows and Q columns from the I sets of empty signals;

[0008] M small-scale thermal regions are randomly arranged on the optical fiber, where the m-th region is labeled H. m , 1≤m≤M;

[0009] S2, construct spatial domain dataset D1, including S21~S24;

[0010] S21, for each Each H m Extract the temperature of Z response points to construct thermal zone signals, resulting in a total of K×M thermal zone signals, among which... H m Hot zone signal , 4≤Z≤6;

[0011] S22, Randomly select hot zone signal The second matrix R2, which is dynamically adjusted to form V rows and Z columns according to the duration step V, is randomly inserted into an insertion region of V rows and Z columns in R1;

[0012] S23, repeat S22 several times, inserting without overlap each time, to obtain the replacement matrix R1. ;

[0013] S24, for Label each element with an exception tag, marking elements within the insertion area as exceptions and the rest as normal. The i-th row constitutes the spatial domain sample SD i , 1≤i≤I, all spatial domain samples constitute D1, and are divided into training set and validation set;

[0014] S3, based on For each spatial domain sample, construct Q channels of temporal domain samples and perform channel anomaly annotation, where SD i The time-domain sample of channel q is All time-domain samples constitute the time-domain dataset D2;

[0015] S4, construct an abnormal event detection network, including a global detection module, a classifier, and a local detection module;

[0016] The global detection module is pre-trained with D1 and is used to input spatial domain samples and output the predicted anomaly probability of each element therein.

[0017] The local detection module is pre-trained with D2 and is used to input time-domain samples and output their channel anomaly probabilities.

[0018] The classifier is used to classify each element in the spatial domain sample into three categories: normal, suspected, and abnormal, according to the predicted abnormal probability, based on a preset threshold range.

[0019] S5, Based on the detection results of the global detection module and the local detection module, adjust the threshold range of the classifier to obtain the optimal classifier;

[0020] S6, which combines the global detection module, the optimal classifier, and the local detection module to form an abnormal event detection model;

[0021] S7 samples the RDTS signal at each time step in the detection area, normalizes it, and then uses the abnormal event detection model for detection.

[0022] As a preferred option, small-scale hot zones H1~H M The lengths are l1~l M All of these are smaller than the spatial resolution of optical fibers;

[0023] The small-scale anomaly event is an event in which the temperature of a small-scale hot zone is higher than the room temperature value but does not exceed 10°C. In the RDTS signal, Q = fiber length / minimum sampling interval.

[0024] Preferably, S1 includes S11 to S13;

[0025] S11, preset room temperature range Abnormal temperature fluctuation range ;

[0026] S12, in K sets of RDTS signals are sampled for the fluctuating temperature scenario and normalized to K sets of reference signals respectively;

[0027] S13, in Several sampling temperatures are selected from low to high, and samples are taken multiple times at each sampling temperature. A total of I sets of RDTS signals are sampled, normalized into I sets of empty signals, and stacked into a first matrix R1 with I rows and Q columns according to the sampling time.

[0028] As a preferred embodiment, in S21, the construction is as follows: H m Hot zone signal The method is as follows:

[0029] Will H mThe highest temperature point is marked as , obtain The closest sampling temperature t m , The temperature of the most recent Z response points ~ ,Will ~ Divide by t respectively m The corresponding thermal zone value is obtained. ~ ,constitute H m Hot zone signal ;

[0030] S22 specifically refers to:

[0031] Sa1 generates a symmetric sequence S of length V, with random tolerance and values ​​that first increase and then decrease, forming a column vector S. T In S, the element value is no greater than 1, and V∈[20,300];

[0032] Sa2, a randomly selected hot zone signal is ,according to Generate a second matrix R2 with V rows and Z columns;

[0033] Sa3: Select any V-row, Z-column region in R1, and add R2 element by element to that region.

[0034] As a preferred option, in S3, the spatial domain sample SD i Time-domain samples of channel q The construction method is as follows:

[0035] S31, preset time-domain sample length L, 100≤L≤200, 1≤q≤Q;

[0036] S32, generate an L×1 selection box, and... The element in row i and column q, r iq As the last element of the selection box, take L elements upwards to form... If the upward row is insufficient (L rows), pad with 0;

[0037] S33, for Perform channel anomaly labeling, if If an element contains the inserted region, the channel is faulty; otherwise, the channel is normal.

[0038] Preferably, S5 includes S51 to S54:

[0039] S51, the predicted anomaly probability of each element of the spatial domain samples in the D1 validation set is output by the global detection module and classified using a threshold classifier;

[0040] S52, select elements classified as suspected, output the channel abnormality probability of their corresponding time-domain samples through the local detection module, and then classify them into normal or abnormal as the category of suspected elements;

[0041] S53, Calculate the mean F1 score of all spatial domain samples in the validation set;

[0042] S54, adjust the threshold interval. Repeat steps S51 to S53 for each adjustment. The threshold interval with the largest mean F1 score is taken as the optimal interval, and the classifier of the optimal interval is used as the optimal classifier.

[0043] Preferably, S7 includes S71~S72:

[0044] S71, the optical fiber is placed in the detection area and samples are taken at each time step. At time t, the sample y of the spatial domain to be measured is obtained. t y1~y t The real-time matrix R consisting of t rows and Q columns (t) ;

[0045] S72, y t The global detection module and the optimal classifier output the category of each element in Q. Elements with the suspected category are extracted and then processed in R. (t) Time-domain samples are constructed on the corresponding channels, and the channel anomaly probability is output by the local detection module. Then, binary classification is performed to obtain all y. t Categories of all elements.

[0046] Preferably, the global detection module is based on a U-Net structure and includes an encoder module, a bottleneck module, and a decoder module;

[0047] The encoder module is used to process spatial domain samples SD i The number of feature channels was increased from 1 to 512, and the length was downsampled to Q / 16 to obtain the encoded features;

[0048] The bottleneck module is used to increase the number of feature channels of the encoded features to 1024 through double convolution operations to obtain the bottleneck features;

[0049] The decoder module is used to reduce the number of feature channels of the bottleneck feature to 64, restore the length to Q, and then map Q predicted anomaly probabilities through the Sigmoid activation function.

[0050] When pre-training the global detection module, the loss function is the Smooth L1 loss.

[0051] Preferably, the encoder module includes four downsampling layers connected in sequence;

[0052] The downsampling layer includes a first double convolutional layer and a max pooling layer; the first double convolutional layer includes two stacked convolutional modules, each consisting of a convolutional layer, a batch normalization layer, and an activation function layer connected in sequence.

[0053] The four double convolutional layers increase the number of feature channels in the input from 1 to 64, 128, 256, and 512 respectively, and the four max pooling layers halve the length of the input features respectively;

[0054] The bottleneck module is a first dual convolutional layer, used to increase the number of encoded feature channels from 512 to 1024.

[0055] The decoder module includes four upsampling layers and an output layer connected in sequence. The upsampling layer includes a deconvolution layer, an attention layer, and a second double convolution layer arranged in sequence.

[0056] The deconvolution layer is used to perform deconvolution operations on the input features, increasing the feature length to twice that of the input, to obtain deconvolution features;

[0057] The attention layer is used to perform self-attention operations on the deconvolution features and output attention features;

[0058] The second double convolutional layer structure is the same as the first double convolutional layer, but the convolutional kernel is different. The four second double convolutional layers are used to reduce the number of feature channels in the input from 1024 to 512, 256, 128 and 64 respectively.

[0059] The output layer includes a one-dimensional convolutional layer and a softmax layer. The one-dimensional convolutional layer compresses features of length Q and 64 feature channels into convolutional features of length Q and 1 feature channel. The softmax layer maps each element of the convolutional feature to the interval [0,1] as the SD value. i The predicted anomaly probability of the element at the corresponding position.

[0060] Preferably, the local detection module includes a feature extraction module and a classification decision module;

[0061] The feature extraction module includes a first convolutional layer, a first pooling layer, a second convolutional layer, and a second pooling layer arranged sequentially.

[0062] The first convolutional layer has 1 input channel, 16 output channels, a kernel size of 5, a stride of 2, padding of 2, and a ReLU activation function. It is used to input temporal samples of length L and outputs the first decoded feature F. d1 ;

[0063] The first pooling layer is used for F d1Perform max pooling to reduce the length to L / 2, and obtain the second decoded feature F. d2 ;

[0064] The second convolutional layer has 16 input channels, 32 output channels, a kernel size of 3, a stride of 1, padding of 1, and uses ReLU activation function for the input F. d2 Output the third decoding feature F d3 ;

[0065] The second pooling layer is used for F d3 Perform max pooling to reduce the length to L / 4, and obtain the fourth decoded feature F. d4 ;

[0066] The classification decision module includes a shape adjustment layer, a first fully connected layer, and a second fully connected layer. The shape adjustment layer is used for F... d4 The eigenvector F is adjusted to 32×L / 4. d5 ;

[0067] The first fully connected layer has an input length of 32×L / 4, an output length of 128, and an activation function of ReLU.

[0068] The second fully connected layer has an input length of 128, an output length of 1, an activation function of Sigmoid, and an output value representing the channel anomaly probability of the temporal sample.

[0069] This invention proposes a two-stage small-scale anomaly event detection method based on the spatial and temporal domains by studying the signal characteristics of RDTS. The invention mainly includes the following steps:

[0070] (1) Constructing the spatial domain dataset D1: Obtain spatial domain samples of abnormal events that are continuous in the time domain and randomly distributed in the spatial domain through the sample generation method, and generate corresponding abnormal labels according to the distribution location of small-scale hot areas. Use the spatial domain samples with abnormal labels to construct D1.

[0071] When constructing spatial domain samples, first collect K sets of reference signals containing anomalous temperatures (small-scale anomalous events) and I sets of empty signals without anomalous temperatures. Then, extract the hot zone signal from the reference signal according to step S21. According to step S22, dynamically adjust the amplitude of the hot zone signal to form a second matrix R2 with V rows and Z columns. Then, insert R2 into the region corresponding to the hot zone signal response point in R1 to obtain the replacement matrix of R1. Since the elements in R2 are continuous in the time domain, the insertion generates This region also has temporal continuity, which facilitates the subsequent construction of time-domain signals.

[0072] The process of constructing spatial domain samples includes thermal signal extraction and thermal signal insertion.

[0073] Regarding thermal zone signal extraction: This invention addresses temperature fluctuation ranges. K RDTS signals are sampled internally, each containing M hot zones, resulting in a total of K×M small-scale hot zones. Hot zone signals are extracted from each small-scale hot zone, resulting in a total of K×M hot zone signals. Considering the characteristics of small-scale anomalies, Z response point temperatures are selected for each small-scale hot zone and divided by the closest sampled temperature to reduce the difference between the anomaly temperature and room temperature. This constructed hot zone signal exhibits characteristics of "small scale," "diversity," and "flexible appearance at various locations in the optical fiber." The model trained based on spatial domain samples constructed from this hot zone signal demonstrates better generalization. The hot zone signal contains Z response points, typically 4-6.

[0074] Regarding hotspot signal insertion: The purpose is to simulate the occurrence and disappearance of small-scale anomalies in real-world scenarios. The hotspot signal is dynamically amplitude-adjusted to generate a second matrix R2, which is then inserted into a first matrix R1 composed of empty signals. To ensure data generalization, multiple matrices R2 of different scales can be repeatedly generated and inserted non-overlappingly into different positions within R1. The following points should be noted when inserting hotspot signals:

[0075] First: Random hot zone signals cannot be directly inserted into random empty signals.

[0076] Assuming the hot zone signal is directly transmitted If a training sample is obtained by randomly inserting an empty signal, the training samples are not correlated in time step, and the process of the hot zone temperature appearing, gradually rising, gradually decreasing and disappearing cannot be simulated, and time-domain samples cannot be constructed in the subsequent channel.

[0077] Second: The duration of the dynamic amplitude of the hot zone signal varies. Assuming the process of a small-scale hot zone signal going from nothing to something and back to nothing is called a temperature change process, the duration of this temperature change process differs for different small-scale hot zone signals. This invention uses a time step V∈[20,300] to represent this; the larger V is, the longer the duration. To simulate the process of the hot zone signal going from weak to strong and back to weak while keeping the signal constant, it is necessary to first obtain a symmetrical sequence S with a length V, random tolerance, and values ​​that first increase and then decrease, and then apply the formula... A second matrix R2 with V rows and Z columns is generated. R2 is the result of dynamic amplitude adjustment of the hot zone signal. Each element of each row vector of R2 corresponds to the temperature of the corresponding response point of the hot zone signal. Each column vector of R2 presents the temperature change process of the corresponding response point over time. Therefore, R2 can completely display the temperature change process of the hot zone signal and realize the dynamic amplitude adjustment of the simulation of the temperature change process.

[0078] Third: The symmetrical sequence S required for the dynamic amplitude can be obtained from two arithmetic sequences. For example, generate an arithmetic sequence S1 from 0.001 to 1 with a length of V / 2 using random tolerance, and then generate an arithmetic sequence S2 from 1 to 0.001 with a length of V / 2. The two sequences are then combined to obtain the symmetrical sequence S.

[0079] Fourth: Regarding the multiple constructions and insertions of the second matrix R2. S22 is a complete process of constructing and inserting the second matrix R2. However, for the sake of sample diversity, multiple hot zone signals can be randomly selected, and multiple second matrices R2 can be constructed using different time steps V. These matrices are then inserted into different regions of the first matrix R1. After insertion, the final matrix is ​​labeled as the replacement matrix. .

[0080] Fifth: Label the abnormalities. Each element is labeled with an exception label, and those located within the insertion area are considered exceptions, while the rest are considered normal.

[0081] (2) Constructing the time-domain dataset D2: Construct time-domain samples based on spatial domain samples. Each element of the spatial domain sample corresponds to one time-domain sample, so each spatial domain sample corresponds to Q time-domain samples, which is reflected in the first matrix R1. Each time-domain sample corresponds to a column of elements, and the changes are related to the symmetric sequence S.

[0082] (3) A global detection module is pre-trained using D1 and a local detection module is pre-trained using D2. The input of the global detection module is a spatial domain sample, and the output is Q values, where the qth value corresponds to the predicted abnormal probability of the qth element of the spatial domain sample; the input of the local detection module is a temporal domain sample, and the output is 1 value, which corresponds to the channel abnormal probability of the temporal domain sample.

[0083] (4) Then select an appropriate classifier threshold range and classify each element in the spatial domain sample into three categories: normal, suspected, and abnormal according to the predicted abnormal probability. In this way, after the spatial domain sample is output by the global detection module, the predicted abnormal probability of each element is then divided into normal, suspected, and abnormal by the classifier. The temporal sample corresponding to the suspected element is extracted and the channel abnormal probability is output by the local detection module and then classified into normal and abnormal. Finally, for each response point of the spatial domain sample, a normal or abnormal detection result can be obtained as the final detection result.

[0084] Compared with the prior art, the advantages of the present invention are as follows:

[0085] (1) This invention extracts different features of the RDTS signal in the spatial and temporal domains and constructs spatial and temporal samples. First, in the spatial domain, the response points are identified into three categories: normal, suspected, and abnormal using a global detection module and classifier. For the "suspected" category with uncertain results, the local detection module is used again in the temporal domain for detection and classification. Finally, the detection result of each response point as normal or abnormal is obtained. This detection method that combines spatial and temporal domains has the advantages of low false negative rate, high detection accuracy, and strong generalization ability.

[0086] (2) Compared with the method based on CNN and cosine similarity, the present invention can detect small-scale abnormal events; compared with the method based on attention mechanism and K-Means clustering label generation, the present invention has a higher F1-Score for small-scale hot spot detection results, and the present invention combines the features of RDTS in the spatial and temporal domains, and has stronger robustness.

[0087] In summary, this invention can monitor small-scale hot zone anomalies and can automatically and accurately perform small-scale anomaly monitoring tasks continuously, and has the potential for wide application in RDTS-based disaster monitoring scenarios. Attached Figure Description

[0088] Figure 1 This is a schematic diagram of the process of the present invention;

[0089] Figure 2 Flowchart for constructing spatial domain and temporal domain samples;

[0090] Figure 3 This is a structural diagram of the global detection module;

[0091] Figure 4 This is a structural diagram of the local detection module;

[0092] Figure 5 A schematic diagram illustrating anomaly detection using an anomaly detection model;

[0093] Figure 6 This is a schematic diagram of a reference signal;

[0094] Figure 7 This is a schematic diagram of an empty signal;

[0095] Figure 8 This is a schematic diagram of the synthesized spatial domain sample;

[0096] Figure 9 For the replacement matrix The time-domain plot composed of the elements in column 1280;

[0097] Figure 10 This is a schematic diagram of time-domain data. Detailed Implementation

[0098] The present invention will be further described below with reference to the embodiments and accompanying drawings.

[0099] Example 1: See Figures 1-5 A two-stage small-scale anomaly detection method for RDTS (Responsive Response Time Signal) is proposed, based on fiber optic sampling of the RDTS signal. Q response points are deployed on the fiber, and the RDTS signal is a vector containing the temperatures of the Q response points. The method includes the following steps:

[0100] S1, collect RDTS signals from K groups containing small-scale anomalies and I groups excluding small-scale anomalies, normalize them into K groups of reference signals and I groups of empty signals, and label the k-th group of reference signals as... , 1≤k≤K, construct the first matrix R1 with I rows and Q columns from the I sets of empty signals;

[0101] M small-scale thermal regions are randomly arranged on the optical fiber, where the m-th region is labeled H. m , 1≤m≤M;

[0102] S2, construct spatial domain dataset D1, including S21~S24;

[0103] S21, for each Each H m Extract the temperature of Z response points to construct thermal zone signals, resulting in a total of K×M thermal zone signals, among which... H m Hot zone signal , 4≤Z≤6;

[0104] S22, Randomly select hot zone signal The second matrix R2, which is dynamically adjusted to form V rows and Z columns according to the duration step V, is randomly inserted into an insertion region of V rows and Z columns in R1;

[0105] S23, repeat S22 several times, inserting without overlap each time, to obtain the replacement matrix R1. ;

[0106] S24, for Label each element with an exception tag, marking elements within the insertion area as exceptions and the rest as normal. The i-th row constitutes the spatial domain sample SD i , 1≤i≤I, all spatial domain samples constitute D1, and are divided into training set and validation set;

[0107] S3, based on For each spatial domain sample, construct Q channels of temporal domain samples and perform channel anomaly annotation, where SD i The time-domain sample of channel q is All time-domain samples constitute the time-domain dataset D2;

[0108] S4, construct an abnormal event detection network, including a global detection module, a classifier, and a local detection module;

[0109] The global detection module is pre-trained with D1 and is used to input spatial domain samples and output the predicted anomaly probability of each element therein.

[0110] The local detection module is pre-trained with D2 and is used to input time-domain samples and output their channel anomaly probabilities.

[0111] The classifier is used to classify each element in the spatial domain sample into three categories: normal, suspected, and abnormal, according to the predicted abnormal probability, based on a preset threshold range.

[0112] S5, Based on the detection results of the global detection module and the local detection module, adjust the threshold range of the classifier to obtain the optimal classifier;

[0113] S6, which combines the global detection module, the optimal classifier, and the local detection module to form an abnormal event detection model;

[0114] S7 samples the RDTS signal at each time step in the detection area, normalizes it, and then uses the abnormal event detection model for detection.

[0115] Example 2, see Figures 1 to 5 Further, based on Example 1:

[0116] Small-scale hot zones H1~H M The lengths are l1~l M All are less than the optical fiber spatial resolution. The small-scale anomaly event is an event in which the temperature of a small-scale hot zone is higher than the room temperature value but does not exceed 10°C. In the RDTS signal, Q = fiber length / minimum sampling interval.

[0117] S1 includes S11~S13;

[0118] S11, preset room temperature range Abnormal temperature fluctuation range ;

[0119] S12, in K sets of RDTS signals are sampled for the fluctuating temperature scenario and normalized to K sets of reference signals respectively;

[0120] S13, in Several sampling temperatures are selected from low to high, and samples are taken multiple times at each sampling temperature. A total of I sets of RDTS signals are sampled, normalized into I sets of empty signals, and stacked into a first matrix R1 with I rows and Q columns according to the sampling time.

[0121] In S21, the construction Hm Hot zone signal The method is as follows:

[0122] Will H m The highest temperature point is marked as , obtain The closest sampling temperature t m , The temperature of the most recent Z response points ~ ,Will ~ Divide by t respectively m The corresponding thermal zone value is obtained. ~ ,constitute H m Hot zone signal ;

[0123] S22 specifically refers to:

[0124] Sa1 generates a symmetric sequence S of length V, with random tolerance and values ​​that first increase and then decrease, forming a column vector S. T In S, the element value is no greater than 1, and V∈[20,300];

[0125] Sa2, a randomly selected hot zone signal is ,according to Generate a second matrix R2 with V rows and Z columns;

[0126] Sa3: Select any V-row, Z-column region in R1, and add R2 element by element to that region.

[0127] In S3, the spatial domain sample SD i Time-domain samples of channel q The construction method is as follows:

[0128] S31, preset time-domain sample length L, 100≤L≤200, 1≤q≤Q;

[0129] S32, generate an L×1 selection box, and... The element in row i and column q, r iq As the last element of the selection box, take L elements upwards to form... If the upward row is insufficient (L rows), pad with 0;

[0130] S33, for Perform channel anomaly labeling, if If an element contains the inserted region, the channel is faulty; otherwise, the channel is normal.

[0131] S5 includes S51~S54:

[0132] S51, the predicted anomaly probability of each element of the spatial domain samples in the D1 validation set is output by the global detection module and classified using a threshold classifier;

[0133] S52, select elements classified as suspected, output the channel abnormality probability of their corresponding time-domain samples through the local detection module, and then classify them into normal or abnormal as the category of suspected elements;

[0134] S53, Calculate the mean F1 score of all spatial domain samples in the validation set;

[0135] S54, adjust the threshold interval. Repeat steps S51 to S53 for each adjustment. The threshold interval with the largest mean F1 score is taken as the optimal interval, and the classifier of the optimal interval is used as the optimal classifier.

[0136] S7 includes S71~S72:

[0137] S71, the optical fiber is placed in the detection area and samples are taken at each time step. At time t, the sample y of the spatial domain to be measured is obtained. t y1~y t The real-time matrix R consisting of t rows and Q columns (t) ;

[0138] S72, y t The global detection module and the optimal classifier output the category of each element in Q. Elements with the suspected category are extracted and then processed in R. (t) Time-domain samples are constructed on the corresponding channels, and the channel anomaly probability is output by the local detection module. Then, binary classification is performed to obtain all y. t Categories of all elements.

[0139] The global detection module is based on a U-Net architecture and includes an encoder module, a bottleneck module, and a decoder module; the encoder module is used to process spatial domain samples into SD... i The number of feature channels is increased from 1 to 512, and the length is downsampled to Q / 16 to obtain the encoded features; the bottleneck module is used to increase the number of feature channels of the encoded features to 1024 through double convolution operation to obtain the bottleneck features; the decoder module is used to reduce the number of feature channels of the bottleneck features to 64, restore the length to Q, and then map Q predicted anomaly probabilities through the Sigmoid activation function; when pre-training the global detection module, the loss function is Smooth L1 loss.

[0140] The following describes the specific structure and parameter settings of a global detection module.

[0141] The encoder module includes four downsampling layers connected in sequence;

[0142] The downsampling layer includes a first double convolutional layer and a max pooling layer; the first double convolutional layer includes two stacked convolutional modules, each consisting of a convolutional layer, a batch normalization layer, and an activation function layer connected in sequence; in the convolutional module, the kernel size of the convolutional layer is 3, the stride is 1, and the padding length is 1, and the activation function layer uses the ReLU activation function. The four downsampling layers are labeled as downsampling layer 1 to downsampling layer 4.

[0143] In downsampling layer 1, the first double convolutional layer has 1 input channel and 64 output channels. The max pooling layer has a window size of 2, a stride of 2, and padding of 0. i The length has been halved, and the number of channels has been increased to 64.

[0144] In downsampling layer 2, the first double convolutional layer has 64 input channels and 128 output channels. The max pooling layer has a window size of 2, a stride of 2, and padding of 0.

[0145] In the downsampling layer 3, the first double convolutional layer has 128 input channels and 256 output channels. The max pooling layer has a window size of 2, a stride of 2, and padding of 0.

[0146] In downsampling layer 4, the first double convolutional layer has 256 input channels and 512 output channels. The max pooling layer has a window size of 2, a stride of 2, and padding of 0.

[0147] After passing through the encoder module, the spatial domain sample SD i The number of feature channels was increased from 1 to 512, and the length was downsampled to Q / 16 to obtain the encoded features.

[0148] The bottleneck module is a first double convolutional layer with 512 input channels and 1024 output channels. After passing through the downsampling layer and the bottleneck module, a bottleneck feature with a length of Q / 16 and 1024 feature channels is obtained.

[0149] The decoder module includes four upsampling layers and an output layer connected in sequence. The upsampling layers include a deconvolution layer, an attention layer, and a second double convolution layer arranged in sequence. The four upsampling layers are labeled as upsampling layer 4 to upsampling layer 1.

[0150] The upsampling layer 4 has 1024 input channels, 512 output channels, a kernel size of 2, a stride of 2, and 0 padding in its deconvolution layer; the attention layer has 512 input channels; and the second double convolutional layer has 512 input channels and 512 output channels.

[0151] The upsampling layer 3 has 512 input channels, 256 output channels, a kernel size of 2, a stride of 2, and 0 padding in its deconvolution layer; the attention layer has 256 input channels; and the second double convolution layer has 256 input channels and 256 output channels.

[0152] The deconvolutional layer of upsampling layer 2 has 256 input channels, 128 output channels, a kernel size of 2, a stride of 2, and padding of 0; the attention layer has 128 input channels; and the second double convolutional layer has 128 input channels and 128 output channels.

[0153] The upsampling layer 1 has 128 input channels, 64 output channels, a kernel size of 2, a stride of 2, and 0 padding in its deconvolution layer; the attention layer has 64 input channels; and the second double convolution layer has 64 input channels and 64 output channels.

[0154] The output layer comprises a one-dimensional convolutional layer and a softmax layer. The one-dimensional convolutional layer compresses features of length Q and 64 feature channels into convolutional features of length Q and 1 feature channel, with a kernel size of 1. The softmax layer maps each element of the convolutional feature to the interval [0,1], serving as the SD. i The predicted anomaly probability of the element at the corresponding position.

[0155] The local detection module includes a feature extraction module and a classification decision module;

[0156] The feature extraction module includes a first convolutional layer, a first pooling layer, a second convolutional layer, and a second pooling layer arranged sequentially.

[0157] The first convolutional layer has 1 input channel, 16 output channels, a kernel size of 5, a stride of 2, padding of 2, and a ReLU activation function. It is used to input temporal samples of length L and outputs the first decoded feature F. d1 ;

[0158] The first pooling layer is used for F d1 Perform max pooling to reduce the length to L / 2, and obtain the second decoded feature F. d2 ;

[0159] The second convolutional layer has 16 input channels, 32 output channels, a kernel size of 3, a stride of 1, padding of 1, and uses ReLU activation function for the input F. d2 Output the third decoding feature F d3 ;

[0160] The second pooling layer is used for F d3Perform max pooling to reduce the length to L / 4, and obtain the fourth decoded feature F. d4 ;

[0161] The classification decision module includes a shape adjustment layer, a first fully connected layer, and a second fully connected layer. The shape adjustment layer is used for F... d4 The eigenvector F is adjusted to 32×L / 4. d5 ;

[0162] The first fully connected layer has an input length of 32×L / 4, an output length of 128, and an activation function of ReLU.

[0163] The second fully connected layer has an input length of 128, an output length of 1, an activation function of Sigmoid, and an output value representing the channel anomaly probability of the temporal sample.

[0164] Example 3: See Figures 1 to 5 A two-stage small-scale anomaly detection method for RDTS (Responsive Response Time Signal) is proposed, based on fiber optic sampling of the RDTS signal. Q response points are deployed on the fiber, and the RDTS signal is a vector containing the temperatures of the Q response points. The method includes the following steps:

[0165] S1: Acquire reference signal and empty signal, and construct the first matrix R1.

[0166] The RDTS fiber was selected with a spatial resolution of 1.6m, a minimum sampling interval of 0.4m, and each sample of RDTS data contained the temperature of 1600 response points. Three calibration zones were set on the fiber, with lengths of 1600 cm, 1200 cm, and 1200 cm. These calibration zones did not participate in the thermal zone signal extraction process. M=14 small-scale thermal zones were set, with lengths of 10cm, 20cm, 30cm, 40cm, 40cm, 60cm, 60cm, 80cm, 80cm, 100cm, 100cm, 120cm, 140cm, and 160cm respectively. The preset room temperature range was 10~30℃, satisfying the temperature fluctuation range described in this invention. The ideal temperature range is 20-40℃, but to enhance the model's generalization and extend its detection beyond anomalies within a 10℃ temperature range to include larger temperature differences, this embodiment will use... Set the temperature range to 2℃~60℃. Sample K=8000 sets of RDTS data within the 2℃~60℃ range, normalize them into 8000 sets of reference signals, and label the k-th set as... .exist Several sampling temperatures are selected from low to high, and each sample is sampled multiple times to obtain I=10000 sets of RDTS data. These data are then normalized into 10000 sets of empty signals. All empty signals are then stacked into a first matrix R1 of 10000×1600.

[0167] S2, construct the spatial domain dataset D1. Following steps S21-S23, construct the replacement matrix for the first matrix R1. Each row is used as a spatial domain sample, resulting in a total of 10,000 spatial domain samples, which are then divided into training and validation sets in an 8:2 ratio.

[0168] S3, based on For each spatial domain sample, Q channels of time domain samples are constructed, resulting in a total of 16,000,000 spatial domain samples.

[0169] S4 constructs an abnormal event detection network, including a global detection module, a classifier, and a local detection module.

[0170] S5. Based on the detection results of the global and local detection modules, the classifier threshold range is adjusted to obtain the optimal classifier. The threshold range corresponding to the optimal range is [0.05, 0.95]. The output of the local detection module also needs binary classification. The binary classification threshold is set to 0.5. Elements corresponding to channel abnormal probabilities greater than or equal to 0.5 are classified as normal, and elements corresponding to channel abnormal probabilities less than 0.5 are classified as abnormal. In this way, through the primary classification of the output of the global detection module and the secondary classification of the output of the local detection module, the category of each response point of the RDTS signal as normal or abnormal can be obtained.

[0171] S6 combines the global detection module, the optimal classifier, and the local detection module to form an abnormal event detection model.

[0172] S7 samples the RDTS signal in the detection area at each time step and uses an abnormal event detection model for detection. By sampling at each time step and constructing a first matrix at each time step, real-time and continuous detection of small-scale abnormal events can be achieved.

[0173] Example 4: See Figures 6-10 In this embodiment, multiple hot zones are set on the optical fiber from left to right, with lengths of 1600cm, 1200cm, 160cm, 140cm, 120cm, 30cm, 20cm, 10cm, 1200cm, 100cm, 100cm, 80cm, 80cm, 60cm, 60cm, 40cm, and 40cm respectively. The 1600cm and 1200cm sections are calibration areas and do not participate in the hot zone extraction process; the others are small-scale hot zones. RDTS signal acquisition and normalization are performed using the optical fiber to generate a reference signal and a null signal, where one reference signal is as follows: Figure 6 As shown, the empty signal is as follows Figure 7 As shown, Figure 7 There is no hot zone; it only contains system noise.

[0174] First, construct a first matrix according to the method of this invention. Then, randomly construct a second matrix R2 and insert it into the first matrix R1, which is considered as inserting one abnormal event. Insert a total of 20 abnormal events to obtain a replacement matrix. Mark the elements in the replacement matrix corresponding to the 20 insertion regions as 1, and the rest as 0. Extract a row vector from the replacement matrix as a spatial domain sample, as follows: Figure 8 The time series diagram of the 1280th response point of the spatial domain sample is constructed by extracting the elements of the 1280th column of all samples in the spatial domain dataset, as shown below. Figure 9 Construct a time-domain sample as follows Figure 10 The time-domain sample is taken from the 257th channel of the 1010th spatial domain sample in D1, with a length L=100, representing the temperature change of this channel in the 910~1010 spatial domain samples. It is a positive sample containing 20 anomalous events, with lengths from left to right of 5 cm, 10 cm, 15 cm, 20 cm, 25 cm, 30 cm, 35 cm, 40 cm, 50 cm, 60 cm, 70 cm, 80 cm, 90 cm, 100 cm, 110 cm, 120 cm, 130 cm, 140 cm, 150 cm, and 160 cm. The temperature difference between the hot zone and the room temperature is 10℃.

[0175] Example 5: See Figures 1 to 10 To illustrate the effectiveness of the present invention, a comparative experiment was conducted in this embodiment.

[0176] Dataset: Includes training set and test set.

[0177] The 10,000 spatial domain samples generated constitute the training set of D1, and 1,000,000 temporal domain samples (balanced positive and negative examples) are extracted and selected from D1. 1,300 sets of RDTS measured data containing small-scale anomalous events of 10cm, 20cm, 30cm, 40cm, and 50cm with temperature differences between 2 and 10℃ are collected as the test set.

[0178] Experimental environment: The hardware environment consists of dual NVIDIA RTX 3080 GPUs, and the software environment is PyTorch 1.9.1.

[0179] Experimental Groups: The experimental group uses the method of this invention, while the control group uses the RDTS small-scale anomaly detection method based on attention mechanism and K-means clustering. The method of this invention is based on Example 1, where the normalization described in S1 is a normalization process that divides each element of the RDTS signal by 100 to accelerate the convergence of the loss value. In S4, the global detection module is pre-trained using the SmoothL1 loss function and the Adam optimization algorithm with a learning rate of 0.0001. The local detection module is pre-trained using the cross-entropy loss function and the Adam optimization algorithm with a learning rate of 0.0001.

[0180] Experimental results: The detection effects of the experimental group and the control group on the 40cm small-scale hot zone were compared and obtained in Table 1 below.

[0181] Table 1. Comparison of Detection Results

[0182] Model Name Accuracy (%) Recall rate (%) F1 score (%) Method of the present invention 99.8 97.8 98.8 Control group method 89.5 77.8 83.2

[0183] Data analysis: Compared with the control group method, the method of the present invention has significant advantages in accuracy, recall and F1 score, proving that the model of the present invention can better handle the detection task of small-scale anomalies in RDTS.

[0184] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A two-stage small-scale anomaly detection method for RDTS, based on optical fiber sampling of RDTS signals, wherein Q response points are deployed on the optical fiber, and the RDTS signal is a vector containing the temperatures of the Q response points, characterized in that... Includes the following steps: S1, collect RDTS signals from K groups containing small-scale anomalies and I groups excluding small-scale anomalies, normalize them into K groups of reference signals and I groups of empty signals, and label the k-th group of reference signals as... , 1≤k≤K, construct the first matrix R1 with I rows and Q columns from the I sets of empty signals; M small-scale thermal regions are randomly arranged on the optical fiber, where the m-th region is labeled H. m , 1≤m≤M; S2, construct spatial domain dataset D1, including S21~S24; S21, for each Each H m Extract the temperature of Z response points to construct thermal zone signals, resulting in a total of K×M thermal zone signals, among which... H m Hot zone signal , 4≤Z≤6; S22, Randomly select hot zone signal The second matrix R2, which is dynamically adjusted to form V rows and Z columns according to the duration step V, is randomly inserted into an insertion region of V rows and Z columns in R1; S23, repeat S22 several times, inserting without overlap each time, to obtain the replacement matrix R1. ; S24, for Label each element with an exception tag, marking elements within the insertion area as exceptions and the rest as normal. The i-th row constitutes the spatial domain sample SD i , 1≤i≤I, all spatial domain samples constitute D1, and are divided into training set and validation set; S3, based on For each spatial domain sample, construct Q channels of temporal domain samples and perform channel anomaly annotation, where SD i The time-domain sample of channel q is All time-domain samples constitute the time-domain dataset D2; S4, construct an abnormal event detection network, including a global detection module, a classifier, and a local detection module; The global detection module is pre-trained with D1 and is used to input spatial domain samples and output the predicted anomaly probability of each element therein. The local detection module is pre-trained with D2 and is used to input time-domain samples and output their channel anomaly probabilities. The classifier is used to classify each element in the spatial domain sample into three categories: normal, suspected, and abnormal, according to the predicted abnormal probability, based on a preset threshold range. S5, Based on the detection results of the global detection module and the local detection module, adjust the threshold range of the classifier to obtain the optimal classifier; S6, which combines the global detection module, the optimal classifier, and the local detection module to form an abnormal event detection model; S7 samples the RDTS signal at each time step in the detection area, normalizes it, and then uses the abnormal event detection model for detection.

2. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, Small-scale hot zones H1~H M The lengths are l1~l M All of these are smaller than the spatial resolution of optical fibers; The small-scale anomaly event is an event in which the temperature of a small-scale hot zone is higher than the room temperature value but does not exceed 10°C. In the RDTS signal, Q = fiber length / minimum sampling interval.

3. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, S1 includes S11~S13; S11, preset room temperature range Abnormal temperature fluctuation range ; S12, in K sets of RDTS signals are sampled for the fluctuating temperature scenario and normalized to K sets of reference signals respectively; S13, in Several sampling temperatures are selected from low to high, and samples are taken multiple times at each sampling temperature. A total of I sets of RDTS signals are sampled, normalized into I sets of empty signals, and stacked into a first matrix R1 with I rows and Q columns according to the sampling time.

4. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, In S21, the construction H m Hot zone signal The method is as follows: Will H m The highest temperature point is marked as , obtain The closest sampling temperature t m , The temperature of the most recent Z response points ~ ,Will ~ Divide by t respectively m The corresponding thermal zone value is obtained. ~ ,constitute H m Hot zone signal ; S22 specifically refers to: Sa1 generates a symmetric sequence S of length V, with random tolerance and values ​​that first increase and then decrease, forming a column vector S. T In S, the element value is no greater than 1, and V∈[20,300]; Sa2, randomly select a hot zone signal as ,according to Generate a second matrix R2 with V rows and Z columns; Sa3: Select any V-row, Z-column region in R1, and add R2 element by element to that region.

5. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, In S3, the spatial domain sample SD i Time-domain samples of channel q The construction method is as follows: S31, preset time-domain sample length L, 100≤L≤200, 1≤q≤Q; S32, generate an L×1 selection box, and... The element in row i and column q, r iq As the last element of the selection box, take L elements upwards to form... If the upward row is insufficient (L rows), pad with 0; S33, for Perform channel anomaly labeling, if If an element contains the inserted region, the channel is faulty; otherwise, the channel is normal.

6. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, S5 includes S51~S54: S51, the predicted anomaly probability of each element of the spatial domain samples in the D1 validation set is output by the global detection module and classified using a threshold classifier; S52, select elements classified as suspected, and output the channel abnormality probability of their corresponding time-domain samples through the local detection module, and then classify them into normal or abnormal as the category of suspected elements; S53, Calculate the mean F1 score of all spatial domain samples in the validation set; S54, adjust the threshold interval. Repeat steps S51 to S53 for each adjustment. The threshold interval with the largest mean F1 score is taken as the optimal interval, and the classifier of the optimal interval is used as the optimal classifier.

7. The two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, S7 includes S71~S72: S71, the optical fiber is placed in the detection area and samples are taken at each time step. At time t, the sample y of the spatial domain to be measured is obtained. t y1~y t The real-time matrix R consisting of t rows and Q columns (t) ; S72, y t The global detection module and the optimal classifier output the category of each element in Q. Elements with the suspected category are extracted and then processed in R. (t) Time-domain samples are constructed on the corresponding channels, and the channel anomaly probability is output by the local detection module. Then, binary classification is performed to obtain all y. t Categories of all elements.

8. A two-stage small-scale anomaly event detection method for RDTS according to claim 1, characterized in that, The global detection module is based on the U-Net architecture and includes an encoder module, a bottleneck module, and a decoder module. The encoder module is used to process spatial domain samples SD i The number of feature channels was increased from 1 to 512, and the length was downsampled to Q / 16 to obtain the encoded features; The bottleneck module is used to increase the number of feature channels of the encoded features to 1024 through double convolution operations to obtain the bottleneck features; The decoder module is used to reduce the number of feature channels of the bottleneck feature to 64, restore the length to Q, and then map Q predicted anomaly probabilities through the Sigmoid activation function. When pre-training the global detection module, the loss function is the Smooth L1 loss.

9. A two-stage small-scale anomaly detection method for RDTS according to claim 8, characterized in that, The encoder module includes four downsampling layers connected in sequence; The downsampling layer includes a first double convolutional layer and a max pooling layer; the first double convolutional layer includes two stacked convolutional modules, each consisting of a convolutional layer, a batch normalization layer, and an activation function layer connected in sequence. The four double convolutional layers increase the number of feature channels in the input from 1 to 64, 128, 256, and 512 respectively, and the four max pooling layers halve the length of the input features respectively; The bottleneck module is a first dual convolutional layer, used to increase the number of encoded feature channels from 512 to 1024. The decoder module includes four upsampling layers and an output layer connected in sequence. The upsampling layer includes a deconvolution layer, an attention layer, and a second double convolution layer arranged in sequence. The deconvolution layer is used to perform deconvolution operations on the input features, increasing the feature length to twice that of the input, to obtain deconvolution features; The attention layer is used to perform self-attention operations on the deconvolution features and output attention features; The second double convolutional layer structure is the same as the first double convolutional layer, but the convolutional kernel is different. The four second double convolutional layers are used to reduce the number of feature channels in the input from 1024 to 512, 256, 128 and 64 respectively. The output layer includes a one-dimensional convolutional layer and a softmax layer. The one-dimensional convolutional layer compresses features of length Q and 64 feature channels into convolutional features of length Q and 1 feature channel. The softmax layer maps each element of the convolutional feature to the interval [0,1] as the SD value. i The predicted anomaly probability of the element at the corresponding position.

10. A two-stage small-scale anomaly detection method for RDTS according to claim 1, characterized in that, The local detection module includes a feature extraction module and a classification decision module; The feature extraction module includes a first convolutional layer, a first pooling layer, a second convolutional layer, and a second pooling layer arranged sequentially. The first convolutional layer has 1 input channel, 16 output channels, a kernel size of 5, a stride of 2, padding of 2, and a ReLU activation function. It takes a temporal sample of length L as input and outputs the first decoded feature F. d1 ; The first pooling layer is used for F d1 Perform max pooling to reduce the length to L / 2, and obtain the second decoded feature F. d2 ; The second convolutional layer has 16 input channels, 32 output channels, a kernel size of 3, a stride of 1, padding of 1, and uses ReLU activation function for the input F. d2 Output the third decoding feature F d3 ; The second pooling layer is used for F d3 Perform max pooling to reduce the length to L / 4, and obtain the fourth decoded feature F. d4 ; The classification decision module includes a shape adjustment layer, a first fully connected layer, and a second fully connected layer. The shape adjustment layer is used for F... d4 The eigenvector F is adjusted to 32×L / 4. d5 ; The first fully connected layer has an input length of 32×L / 4, an output length of 128, and an activation function of ReLU. The second fully connected layer has an input length of 128, an output length of 1, an activation function of Sigmoid, and an output value representing the channel anomaly probability of the temporal sample.