Method and system for adjusting a vibration fiber alarm threshold
By collecting vibration signal data through a distributed optical fiber sensing system, extracting time-frequency domain features and optimizing the reinforcement learning model, and dynamically adjusting the vibration alarm threshold, the problem of threshold setting not being suitable for complex environments in traditional methods is solved, the false alarm rate is reduced, and the recognition accuracy and system performance are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING GUANYU INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-05-22
AI Technical Summary
In traditional distributed fiber optic sensing systems, vibration alarm threshold settings rely on human experience, which cannot adapt to complex and ever-changing field environments and lacks self-adaptability, resulting in a high false alarm rate.
Vibration signal data is collected by a distributed optical fiber sensing system, time-frequency domain features are extracted, scene feature vectors are constructed, and the scene classification model is input. The action value function is calculated by combining the policy network of the reinforcement learning model, threshold adjustment instructions are generated, the vibration alarm threshold is dynamically optimized, and the threshold is updated by a multi-objective reward function.
It achieves adaptive adjustment of vibration alarm threshold, reduces false alarm rate, improves the accuracy and relevance of vibration signal recognition, and enhances the overall performance of fiber optic alarm system.
Smart Images

Figure CN121482981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed optical fiber sensing technology, and in particular to a method and system for adjusting the vibration optical fiber alarm threshold. Background Technology
[0002] Distributed fiber optic sensing systems, as a novel perimeter security technology, utilize optical fibers as the sensing medium to achieve continuous monitoring of areas along pipelines, boundaries, and critical facilities. By detecting changes in parameters such as the phase, frequency, and intensity of the optical signal transmitted through the fiber, this system can sense external vibration events, thereby enabling functions such as intrusion detection and anomaly monitoring. Due to its advantages such as high sensitivity, long monitoring distance, and strong resistance to electromagnetic interference, fiber optic sensing systems have been widely applied in fields such as oil pipeline monitoring, power facility protection, border security, and rail transit monitoring.
[0003] In practical applications, distributed fiber optic sensing systems require setting appropriate vibration alarm thresholds to determine whether a vibration event of concern has occurred. Traditional threshold setting methods rely heavily on manual experience; technicians set one or more fixed alarm thresholds for the entire monitoring system based on field tests and historical data. This fixed threshold approach has significant limitations and cannot adapt to complex and changing field environments. With technological advancements, some improved solutions have begun to use simple threshold adjustments based on single characteristics such as vibration signal amplitude and frequency. However, this method still lacks a comprehensive understanding of the scenario and adaptive capabilities. Summary of the Invention
[0004] The present invention provides a method and system for adjusting the vibration fiber optic alarm threshold, which can solve the problems in the prior art.
[0005] A first aspect of the present invention provides a method for adjusting the vibration fiber optic alarm threshold, comprising:
[0006] Vibration signal data along the line are collected using a distributed optical fiber sensing system;
[0007] The vibration signal data is subjected to time-frequency domain feature extraction to construct a scene feature vector, which is then input into a scene classification model to obtain the scene category identifier and scene confidence of the current vibration source.
[0008] The scene category identifier, scene confidence, and historical reference records are combined into a state vector, which is then input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture and calculates the action value function to generate the threshold adjustment magnitude and direction for the current scene, and outputs the threshold adjustment instruction.
[0009] According to the threshold adjustment instruction, update the vibration alarm threshold corresponding to the current scene, and determine the vibration event. Compare the determination result with the actual vibration event, calculate the alarm accuracy and false alarm rate, and obtain the multi-objective reward function value.
[0010] The multi-objective reward function value and the state vector are input into the reinforcement learning model, and the weight parameters of the policy network are updated through the temporal difference algorithm to obtain the adjusted vibration alarm threshold, which is then associated with the scene category identifier.
[0011] The vibration signal data is subjected to time-frequency domain feature extraction to construct a scene feature vector. This vector is then input into a scene classification model to obtain the scene category identifier and scene confidence score of the current vibration source, including:
[0012] The vibration signal data is divided into multiple signal segments according to a time window. The multi-order statistical moment features of the vibration amplitude are extracted for each signal segment, and the correlation coefficient of the vibration amplitude envelope between adjacent signal segments is calculated. The correlation coefficient is used as the time-domain dynamic correlation feature.
[0013] Spectral analysis is performed on each signal segment to extract the distribution characteristics of spectral energy in a preset frequency band, the energy ratio of each frequency band is calculated, and the frequency domain energy distribution characteristics are obtained. These characteristics are then concatenated with the time domain dynamic correlation characteristics to construct a scene feature vector.
[0014] The scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier. A comprehensive attribution probability distribution is constructed, and the scene category corresponding to the maximum attribution probability is selected. The maximum attribution probability is used as the scene confidence score.
[0015] The scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier, and a comprehensive attribution probability distribution is constructed, including:
[0016] For each sub-classifier, different feature mapping functions are used to map the scene feature vector to the corresponding feature subspace, calculate its local density correlation degree and establish the discrimination boundary of the scene category, and obtain the scene category prediction results and confidence scores of each sub-classifier.
[0017] Based on the classification accuracy of each sub-classifier on historical samples, and the distance metric between the current scene feature vector and the training sample center of each sub-classifier, the confidence weight of each sub-classifier is calculated, multiplied by the corresponding confidence score, to obtain the weighted confidence score.
[0018] The number of times each scene category appears in the prediction results of all sub-classifiers is counted as the category support. The weighted confidence scores of the sub-classifiers that predict the same scene category are summed to obtain the cumulative confidence score of each scene category. Combined with the category support, the belonging probability value of each scene category is calculated to construct a comprehensive belonging probability distribution.
[0019] The input is given to the policy network of a reinforcement learning model, which includes a two-stream value estimation architecture, and the action value function is calculated to generate a threshold adjustment magnitude and direction for the current scene, and output threshold adjustment instructions, including:
[0020] The state vector is input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture. The state value function and advantage function are calculated based on the duel deep Q network architecture. The exploration action value is calculated. A Bayesian prior distribution is constructed based on historical reference records. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference as the utilization action value.
[0021] For each candidate threshold adjustment action, calculate the expected threshold after executing the action, calculate the deviation risk score by combining it with the reference threshold benchmark value, map it to a penalty factor through an exponential function, and multiply it by the sum of the corresponding exploration action value and utilization action value to obtain the action value function value;
[0022] The candidate threshold adjustment action with the largest action value function value is selected, and its threshold adjustment magnitude and adjustment direction are extracted. The dynamic conservative coefficient is obtained by sampling from the Beta distribution using the Thompson sampling algorithm. The parameters of the Beta distribution are determined by the historical reference records. The threshold adjustment magnitude is multiplied by the dynamic conservative coefficient to obtain the optimized threshold adjustment magnitude. The threshold adjustment command is generated and output by combining the adjustment direction.
[0023] Based on a deep Q-network architecture, the state value function and advantage function are calculated to obtain the value of exploration actions. A Bayesian prior distribution is constructed based on historical reference records. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference, which serves as the value of the utilized action, including:
[0024] In the exploration value estimation process, the state vector is input into the confrontation deep Q network architecture, and the temporal and spatial features in the state vector are extracted through the convolutional layer to output the state value function value. For multiple preset candidate threshold adjustment actions, the advantage function value of each action relative to the average action is calculated. The state value function values are combined through the aggregation layer to obtain the exploration action value of each candidate threshold adjustment action.
[0025] In the value estimation flow, historical accuracy sample sequences of historical reference records are extracted, and their sample mean and sample variance are calculated. The distribution parameters of the Bayesian prior distribution are constructed. The distribution parameters of the Bayesian prior distribution include shape parameters and scale parameters. The threshold adjustment magnitude and adjustment direction corresponding to each candidate threshold adjustment action are encoded into action feature vectors. Combined with the Bayesian prior distribution, variational inference is used to calculate the posterior expected return as the value of the utilization action.
[0026] According to the threshold adjustment instruction, the vibration alarm threshold corresponding to the current scene is updated, and vibration events are determined. The determination result is compared with the actual vibration events, and the alarm accuracy and false alarm rate are calculated to obtain the multi-objective reward function value, including:
[0027] According to the threshold adjustment instruction, the updated vibration alarm threshold for the current scene is calculated, and the real-time vibration data sequence within the preset time window is collected and compared point by point to obtain the vibration event judgment result. Based on the actual vibration event annotation data within the preset time window, the alarm accuracy rate and false alarm rate are calculated.
[0028] A multi-objective reward function is constructed, which includes maximizing alarm accuracy, minimizing false alarm rate, minimizing response latency, and maximizing threshold stability. The response latency is calculated by the time difference between the alarm trigger time and the actual event occurrence time. The threshold stability is calculated by the variance of the threshold adjustment amplitude within a continuous time window. Pareto front optimization is used to balance the four objectives. The weight coefficients of each objective are dynamically adjusted according to the frequency of vibration events in the current scene and the cumulative loss of historical false alarms to obtain the value of the multi-objective reward function.
[0029] The multi-objective reward function value and the state vector are input into a reinforcement learning model. The weight parameters of the policy network are updated using a temporal difference algorithm to obtain an adjusted vibration alarm threshold, which is then associated with the scene category identifier, including:
[0030] The multi-objective reward function value is input into the value network of the reinforcement learning model along with the state vector. The value estimate of the current state is output and the temporal difference error is calculated. This value is multiplied by the log probability of the threshold adjustment action output by the policy network to obtain the policy gradient. A composite loss function is constructed, which includes a policy gradient term, a value network mean square error term, and a policy entropy regularization term.
[0031] A dual-head network architecture with a shared feature extraction layer is adopted. The shared feature extraction layer outputs feature representations to both the policy network and the value network. The gradient is calculated based on the composite loss function, and the weight parameters of the policy network and the value network are updated. The updated policy network is then input into the state vector to obtain the adjusted vibration alarm threshold.
[0032] After binding the adjusted vibration alarm threshold with the scene category identifier, it is updated to the scene memory library, and the mean value of the state vector of the scene category is updated synchronously.
[0033] A second aspect of the present invention provides a vibration fiber optic alarm threshold adjustment system, comprising:
[0034] The first unit is used to collect vibration signal data along the line through a distributed optical fiber sensing system.
[0035] The second unit is used to extract time-frequency domain features from the vibration signal data, construct a scene feature vector, input it into a scene classification model, and obtain the scene category identifier and scene confidence of the current vibration source.
[0036] The third unit is used to combine the scene category identifier, scene confidence and historical reference records into a state vector, input it into the policy network of the reinforcement learning model, the policy network includes a two-stream value estimation architecture, calculates the action value function, generates the threshold adjustment magnitude and adjustment direction for the current scene, and outputs the threshold adjustment instruction.
[0037] The fourth unit is used to update the vibration alarm threshold corresponding to the current scene according to the threshold adjustment instruction, and to determine the vibration event. The determination result is compared with the actual vibration event to calculate the alarm accuracy and false alarm rate, and to obtain the multi-objective reward function value.
[0038] The fifth unit is used to input the multi-objective reward function value and the state vector into the reinforcement learning model, update the weight parameters of the policy network through the temporal difference algorithm, obtain the adjusted vibration alarm threshold, and associate it with the scene category identifier.
[0039] A third aspect of the present invention,
[0040] An electronic device is provided, comprising:
[0041] processor;
[0042] Memory used to store processor-executable instructions;
[0043] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0044] Fourth aspect of the embodiments of the present invention,
[0045] A computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0046] The beneficial effects of this application are as follows:
[0047] This invention collects vibration signal data through a distributed optical fiber sensing system, and combines time-frequency domain feature extraction and scene classification models to accurately identify different vibration source scene types, providing a reliable classification basis for subsequent threshold adjustment and improving the accuracy and relevance of vibration signal identification.
[0048] This invention employs a policy network based on a reinforcement learning model for adaptive threshold adjustment. By calculating the action value function through a dual-stream value estimation architecture, it can intelligently generate threshold adjustment strategies based on current scene characteristics and historical reference records, thereby achieving dynamic optimization of the vibration alarm threshold. This avoids the poor adaptability of traditional fixed threshold methods in different scenarios and effectively reduces the false alarm rate.
[0049] This invention comprehensively evaluates alarm accuracy and false alarm rate through a multi-objective reward function, and continuously updates the policy network weight parameters using a time-series difference algorithm, enabling the system to continuously learn and optimize in practical applications. This achieves accurate correlation between vibration alarm threshold and scene category, improving the overall performance and practicality of the fiber optic alarm system. Attached Figure Description
[0050] Figure 1 This is a flowchart illustrating the method for adjusting the vibration fiber optic alarm threshold according to an embodiment of the present invention.
[0051] Figure 2 A schematic diagram of the adaptive threshold adjustment method driven by reinforcement learning. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0054] Figure 1 This is a flowchart illustrating the method for adjusting the vibration fiber optic alarm threshold according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0055] Vibration signal data along the line are collected using a distributed optical fiber sensing system;
[0056] The vibration signal data is subjected to time-frequency domain feature extraction to construct a scene feature vector, which is then input into a scene classification model to obtain the scene category identifier and scene confidence of the current vibration source.
[0057] The scene category identifier, scene confidence, and historical reference records are combined into a state vector, which is then input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture and calculates the action value function, generates the threshold adjustment magnitude and direction for the current scene, and outputs the threshold adjustment instruction.
[0058] According to the threshold adjustment instruction, update the vibration alarm threshold corresponding to the current scene, and determine the vibration event. Compare the determination result with the actual vibration event, calculate the alarm accuracy and false alarm rate, and obtain the multi-objective reward function value.
[0059] The multi-objective reward function value and the state vector are input into the reinforcement learning model, and the weight parameters of the policy network are updated through the temporal difference algorithm to obtain the adjusted vibration alarm threshold, which is then associated with the scene category identifier.
[0060] In one optional implementation, time-frequency domain features are extracted from the vibration signal data to construct a scene feature vector, which is then input into a scene classification model to obtain the scene category identifier and scene confidence level of the current vibration source, including:
[0061] The vibration signal data is divided into multiple signal segments according to a time window. The multi-order statistical moment features of the vibration amplitude are extracted for each signal segment, and the correlation coefficient of the vibration amplitude envelope between adjacent signal segments is calculated. The correlation coefficient is used as the time-domain dynamic correlation feature.
[0062] Spectral analysis is performed on each signal segment to extract the distribution characteristics of spectral energy in a preset frequency band, the energy ratio of each frequency band is calculated, and the frequency domain energy distribution characteristics are obtained. These characteristics are then concatenated with the time domain dynamic correlation characteristics to construct a scene feature vector.
[0063] The scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier. A comprehensive attribution probability distribution is constructed, and the scene category corresponding to the maximum attribution probability is selected. The maximum attribution probability is used as the scene confidence score.
[0064] In this specific embodiment, the process of extracting time-frequency domain features from vibration signal data begins with signal segmentation. The collected vibration signal data is divided into fixed time windows with a length of 0.5 seconds and a 50% overlap between adjacent windows. Taking a vibration signal with a sampling frequency of 1000 Hz as an example, each signal segment contains 500 sampling points, and there is an overlap of 250 sampling points between adjacent segments. Assuming that 10 seconds of continuous vibration data is collected, 39 signal segments are obtained after segmentation, and each segment is independently subjected to subsequent feature extraction operations.
[0065] For each signal segment, multi-order statistical moment features of vibration amplitude are extracted. The mean of vibration amplitude at all sampling points within the segment is calculated as the first-order statistical moment feature, reflecting the average intensity level of vibration within that time period. The second-order central moment of vibration amplitude relative to the mean is calculated, i.e., the variance feature, characterizing the dispersion of vibration amplitude. The third-order central moment is further calculated, and divided by the cube of the standard deviation to obtain the skewness feature, used to describe the symmetry of the vibration amplitude distribution. The fourth-order central moment is calculated and divided by the square of the variance to obtain the kurtosis feature, reflecting the sharpness of the vibration amplitude distribution. Taking a certain signal segment as an example, the mean vibration amplitude of 500 sampling points is 0.23 m / s², the variance is 0.058, the skewness is 1.37, and the kurtosis is 4.82. These four values constitute the statistical moment feature vector of this segment.
[0066] The correlation coefficient of the vibration amplitude envelope between adjacent signal segments is calculated as a time-domain dynamic correlation feature. Hilbert transform is performed on each signal segment to obtain the magnitude sequence of the analytic signal; this magnitude sequence is the vibration amplitude envelope curve. Envelope data of two adjacent signal segments within the overlapping region are extracted, and the Pearson correlation coefficient between the two envelope sequences is calculated. Specifically, the mean of each envelope sequence is subtracted from the mean of the two segments, and the normalized covariance is calculated. Taking the 5th and 6th signal segments as an example, at 250 overlapping sampling points, the mean envelope value of the 5th segment is 0.31, and the mean envelope value of the 6th segment is 0.34. The calculated correlation coefficient is 0.87, indicating a high degree of continuity in the vibration modes of the two segments. Adjacent correlations are calculated for all 39 signal segments, yielding 38 correlation coefficient values, forming a time-domain dynamic correlation feature sequence.
[0067] Spectral analysis was performed on each signal segment to extract frequency domain energy distribution characteristics. A Fast Fourier Transform (FFT) was executed on each signal segment containing 500 sampling points to convert the time-domain signal to the frequency domain, obtaining a complex spectrum of 250 frequency components. The squared amplitude of each frequency component was calculated to obtain the power spectral density distribution. The frequency range of 0 to 500 Hz was divided into five preset frequency bands: the extremely low frequency band (0 to 50 Hz), the low frequency band (50 to 100 Hz), the mid-low frequency band (100 to 200 Hz), and the... In the mid-to-high frequency band (00-350 Hz) and the high frequency band (350-500 Hz), the sum of the power spectral density of all frequency components within each band is calculated to obtain the energy value of that band. The total energy of the five bands is calculated, and the energy value of each band is divided by the total energy to obtain the energy proportion of each band. Taking a certain signal segment as an example, the energy proportions of the five bands are 0.12, 0.35, 0.28, 0.18, and 0.07, respectively. These five values constitute the frequency domain energy distribution characteristic vector of the segment.
[0068] The scene feature vector is constructed by concatenating the time-domain dynamic correlation features and the frequency-domain energy distribution features. For vibration data containing 39 signal segments, each segment has 4 statistical moment features and 5 frequency-domain energy proportion features, for a total of 9 feature values. The feature values of all 39 segments are arranged in chronological order to form a basic feature sequence of length 351. The 38 time-domain dynamic correlation coefficient values are appended to the end of this sequence to finally construct a scene feature vector of length 389. This vector fully describes the comprehensive characteristics of the vibration signal in the time and frequency domains.
[0069] The constructed scene feature vector is input into the scene classification model for recognition. The classification model adopts an ensemble learning architecture, which contains three different types of sub-classifiers. The scene feature vector is input into these three sub-classifiers respectively, and each sub-classifier outputs its predicted scene category identifier and corresponding confidence score.
[0070] Each sub-classifier provides a prediction result for four preset scene categories. Assuming the four scene categories are vehicle driving scene, personnel activity scene, mechanical construction scene, and environmental interference scene, the first sub-classifier predicts a vehicle driving scene with a confidence score of 0.82. The second sub-classifier predicts a vehicle driving scene with a confidence score of 0.76, and the third sub-classifier predicts a vehicle driving scene with a confidence score of 0.88.
[0071] A comprehensive assignment probability distribution was constructed to integrate the prediction results of each sub-classifier. For each scene category, the confidence scores of all sub-classifiers predicting that category were accumulated and divided by the total number of sub-classifiers. For the vehicle driving scene, two sub-classifiers predicted that category, and the accumulated confidence score was 1.58. For the mechanical construction scene, only one sub-classifier predicted that category, and the accumulated confidence score was 0.88. The personnel activity scene and the environmental interference scene had no sub-classifiers predicting that category, and the confidence scores were both 0. The assignment probability of the four scene categories was calculated. The assignment probability of the vehicle driving scene was the highest, at 0.642. Therefore, the scene category of the current vibration source was identified as the vehicle driving scene, with a scene confidence score of 0.642. This confidence score reflects the reliability of the classification result. The closer the value is to 1, the more certain the classification is. When the value is below a certain threshold, it can be marked as an uncertain scene that requires further analysis.
[0072] In one optional implementation, the scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier, and a comprehensive attribution probability distribution is constructed, including:
[0073] For each sub-classifier, different feature mapping functions are used to map the scene feature vector to the corresponding feature subspace, calculate its local density correlation degree and establish the discrimination boundary of the scene category, and obtain the scene category prediction results and confidence scores of each sub-classifier.
[0074] Based on the classification accuracy of each sub-classifier on historical samples, and the distance metric between the current scene feature vector and the training sample center of each sub-classifier, the confidence weight of each sub-classifier is calculated, multiplied by the corresponding confidence score, to obtain the weighted confidence score.
[0075] The number of times each scene category appears in the prediction results of all sub-classifiers is counted as the category support. The weighted confidence scores of the sub-classifiers that predict the same scene category are summed to obtain the cumulative confidence score of each scene category. Combined with the category support, the belonging probability value of each scene category is calculated to construct a comprehensive belonging probability distribution.
[0076] When the scene feature vector is input into a scene classification model containing multiple sub-classifiers, each sub-classifier uses a different feature mapping function to process the input scene feature vector. Assuming the scene feature vector has a dimension of 512, the first sub-classifier uses a linear transformation mapping function, performing matrix multiplication with the scene feature vector using a weight matrix of 512 x 256 to map the original feature vector to a 256-dimensional feature subspace. The second sub-classifier uses a non-linear mapping function, first performing ReLU activation on the scene feature vector, setting negative elements to zero, and then mapping it to a 128-dimensional feature subspace using a weight matrix of 512 x 128. The third sub-classifier uses a kernel function mapping function, calculating the radial basis function value between the input feature vector and a preset reference vector to obtain a 320-dimensional kernel space representation. Each sub-classifier's feature mapping function has different transformation characteristics, enabling the extraction of scene feature expression information from different perspectives.
[0077] Within their respective feature subspaces, each subclassifier calculates the local density correlation of the current mapped feature vector. For the first subclassifier, a neighborhood with a radius threshold of 0.8 is selected in the 256-dimensional feature subspace. The number of training sample points falling within this neighborhood is counted; when 85 sample points are found, the local density value is calculated to be 0.73. For the second subclassifier, an adaptive radius strategy is used in the 128-dimensional feature subspace, adjusting the neighborhood radius to 1.2 based on the feature distribution density, resulting in 62 neighboring sample points and a local density value of 0.68. For the third subclassifier, the K-nearest neighbor method is used in the 320-dimensional kernel space, selecting the 50 nearest sample points. The local density value is obtained by weighted summation of the inverse distances between these sample points and the current feature point, resulting in a local density value of 0.81. The local density correlation reflects the degree of clustering of the current feature with the training samples in each subspace.
[0078] Each sub-classifier establishes the discrimination boundary for scene categories based on local density correlation information. The first sub-classifier establishes discrimination boundaries for each of the ten scene categories in its feature subspace. By calculating the Euclidean distance from the current feature point to the centroid of the training samples for each category, the distance value is 2.3 for category 1, 1.8 for category 2, 3.1 for category 3, and the distance values for the remaining categories are all greater than 3.5. Combined with the local density value of 0.73, the current feature point is determined to belong to category 2, and the scene category prediction result is category 2. The confidence score is calculated as 0.82 based on the distance value and local density. The second sub-classifier calculates the probability that the current feature point falls into the discrimination region of each category in its 128-dimensional feature subspace. The region probability for category 2 is 0.68, the region probability for category 4 is 0.21, and the probabilities for the remaining categories are all less than 0.15. The output prediction result is category 2, and the confidence score is 0.68. The third sub-classifier uses the support vector discrimination method to calculate the functional margin from the current feature point to the separating hyperplane of each class. The margin value for class 2 is 1.45, and the margin value for class 1 is 0.89. The output prediction result is class 2, and the confidence score is 0.76.
[0079] Calculating the confidence weights of each sub-classifier requires considering both historical classification accuracy and the applicability of the current sample. The classification accuracy of the first sub-classifier on 1000 historical test samples is calculated, with 876 correctly classified samples and an accuracy of 0.876. The second sub-classifier correctly classified 842 samples on the same test set with an accuracy of 0.842, and the third sub-classifier correctly classified 891 samples with an accuracy of 0.891. The distance between the current scene feature vector and the training sample centers of each sub-classifier is calculated. The training sample center of the first sub-classifier is obtained by averaging the feature vectors of all training samples of that sub-classifier along their dimensions. The Euclidean distance between the current feature vector and this center is 4.2. The distance between the training sample centers of the second and third sub-classifiers is 5.8, and the distance between the training sample centers of the third sub-classifier is 3.6. The smaller the distance value, the closer the current sample is to the training distribution, and the higher the applicability of the sub-classifier to the current sample.
[0080] The confidence weight is calculated by combining historical accuracy with distance metrics. For the first sub-classifier, the accuracy of 0.876 is multiplied by the inverse of the distance value of 4.2 to obtain an original weight value of 0.209. For the second sub-classifier, the accuracy of 0.842 is multiplied by the inverse of the distance value of 5.8 to obtain an original weight value of 0.145. For the third sub-classifier, the accuracy of 0.891 is multiplied by the inverse of the distance value of 3.6 to obtain an original weight value of 0.247. The three original weight values are then normalized so that their sum equals 1, resulting in the first sub-classifier's confidence weight. The confidence weight of the first sub-classifier is 0.348, the confidence weight of the second sub-classifier is 0.241, and the confidence weight of the third sub-classifier is 0.411. The weighted confidence score is obtained by multiplying the confidence weight of each sub-classifier by its corresponding confidence score. The weighted confidence score of the first sub-classifier is 0.348 multiplied by 0.82, which equals 0.285. The weighted confidence score of the second sub-classifier is 0.241 multiplied by 0.68, which equals 0.164. The weighted confidence score of the third sub-classifier is 0.411 multiplied by 0.76, which equals 0.312.
[0081] The frequency of each scene category appearing in the prediction results of all sub-classifiers is used as the category support. All three sub-classifiers predict category 2, therefore the support for category 2 is 3, and the support for other scene categories is 0. The weighted confidence scores of the three sub-classifiers predicting category 2 are summed to obtain the cumulative confidence score for category 2: 0.285 + 0.164 + 0.312 = 0.761. When calculating the probability of belonging to each scene category, the cumulative confidence score of category 2 (0.761) is multiplied by the category support score (3) to obtain a comprehensive score of 2.283. This score is then normalized by dividing by the sum of the comprehensive scores of all predicted categories. Since only category 2 is predicted, its probability of belonging is calculated as 1.0. If multiple categories are predicted, the probability of belonging is allocated according to the proportion of the product of the cumulative confidence score and the category support. The comprehensive probability distribution obtained through the above calculation shows that the probability of belonging to category 2 is 1.0, and the probability of belonging to the other categories is 0, fully reflecting the scene classification results after the integrated decision of multiple sub-classifiers.
[0082] Figure 2 This is a flowchart illustrating a reinforcement learning-driven adaptive threshold adjustment method. In one optional implementation, the method is input into the policy network of a reinforcement learning model. The policy network includes a two-stream value estimation architecture and calculates an action value function to generate a threshold adjustment magnitude and direction for the current scene. Finally, it outputs a threshold adjustment instruction, including:
[0083] The state vector is input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture. The state value function and advantage function are calculated based on the duel deep Q network architecture. The exploration action value is calculated. A Bayesian prior distribution is constructed based on historical reference records. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference as the utilization action value.
[0084] For each candidate threshold adjustment action, calculate the expected threshold after executing the action, calculate the deviation risk score by combining it with the reference threshold benchmark value, map it to a penalty factor through an exponential function, and multiply it by the sum of the corresponding exploration action value and utilization action value to obtain the action value function value;
[0085] The candidate threshold adjustment action with the largest action value function value is selected, and its threshold adjustment magnitude and adjustment direction are extracted. The dynamic conservative coefficient is obtained by sampling from the Beta distribution using the Thompson sampling algorithm. The parameters of the Beta distribution are determined by the historical reference records. The threshold adjustment magnitude is multiplied by the dynamic conservative coefficient to obtain the optimized threshold adjustment magnitude. The threshold adjustment command is generated and output by combining the adjustment direction.
[0086] In this specific embodiment, the state vector is input into the policy network of the reinforcement learning model for processing. This policy network adopts a two-stream value estimation architecture. After passing through the input layer, the state vector is divided into two parallel processing paths: one path is used to calculate the value of exploration actions, and the other path is used to calculate the value of actions.
[0087] The Duel Deep Q Network architecture calculates the exploration action value by combining the state value function and the advantage function. Specifically, the state value is added to the advantage function value of each action, and then the average advantage function value of all actions is subtracted. This approach can effectively separate the value of the state itself from the additional value brought by a specific action. Assuming that the state value of a certain state is 8.5, the advantage function value of a certain candidate action is 2.3, and the average advantage function value of all 21 candidate actions is 1.1, then the exploration action value of this action is calculated as 8.5 plus 2.3 minus 1.1, which equals 9.7.
[0088] A Bayesian prior distribution is constructed based on historical reference records, which contain the execution status of the past 500 threshold adjustments and their corresponding cumulative rewards. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference. The variational inference process fuses the prior distribution with the currently observed state features and uses variational parameters to approximate the true posterior distribution. In specific operation, the state vector is input into the variational inference network, which outputs the posterior mean adjustment and posterior variance adjustment of the candidate action. The posterior mean is obtained by adding the corresponding posterior mean adjustment to the prior mean, and the posterior variance is obtained by multiplying the prior variance by the corresponding posterior variance adjustment factor. Assuming that the posterior mean adjustment of the aforementioned positive 5 adjustment action is 1.5 and the posterior variance adjustment factor is 0.8, the posterior distribution mean of this action is 14.3 and the variance is 8.19. The posterior expected reward is the mean of the posterior distribution, which is used as the value of the action.
[0089] For each candidate threshold adjustment action, calculate its action value function value. Assuming the current threshold is 50 and the reference threshold baseline is set to 52, for a candidate action with a threshold adjustment range of +5, the expected threshold after executing the action is 55. Calculate the absolute value of the difference between the expected threshold and the reference threshold baseline to obtain 3, and then divide it by the reference threshold baseline to obtain the deviation ratio of 0.0577. Multiply the deviation ratio by the preset risk sensitivity coefficient of 10 to obtain the deviation risk score of 0.577. Map the deviation risk score to a penalty factor through an exponential function. Calculate the penalty factor of the base of the natural logarithm to the power of -0.577 to obtain 0.561. The exploration action value of this candidate action is 9.7, and the utilization action value is 14.3. The sum of the two is 24.0. Multiply 24.0 by the penalty factor 0.561 to obtain the final action value function value of this candidate action, which is 13.464.
[0090] Repeat the above calculation process for all 21 candidate threshold adjustment actions to obtain their respective action value function values. Iterate through all action value function values and select the candidate action with the largest value. Assuming that the candidate action with a threshold adjustment range of positive 3 has the largest action value function value of 15.2, select this action and extract its threshold adjustment range of 3 and adjustment direction as positive increase.
[0091] The parameters of the Beta distribution are determined based on historical reference records for sampling the dynamic conservative coefficient. The number of successful and unsuccessful adjustments in the historical records is counted. Success is defined as an improvement in the system performance index after adjustment, and failure is defined as a decrease or no change in the performance index. Assuming there are 380 successful adjustments and 120 unsuccessful adjustments in the historical records, the first parameter of the Beta distribution is set to 381 and the second parameter is set to 121, both of which are added by 1 to the original count to avoid boundary cases.
[0092] The dynamic conservatism coefficient is obtained by sampling from the Beta distribution using the Thompson sampling algorithm. Random sampling is performed from the Beta distribution with parameters 381 and 121, with sampled values ranging from 0 to 1. Assuming the dynamic conservatism coefficient obtained from this sampling is 0.742, multiplying the previously selected threshold adjustment range of 3 by the dynamic conservatism coefficient of 0.742 yields an optimized threshold adjustment range of 2.226. Depending on the actual application requirements, this value can be rounded to 2.23 or retained as an integer of 2.
[0093] Combining the adjustment direction of positive increase with the optimization threshold adjustment magnitude of 2.23, a threshold adjustment instruction is generated. This instruction is encoded in a structured data format, including an adjustment direction field set to 1 to indicate positive, an adjustment magnitude field set to 2.23, and a target threshold field calculated as the current threshold of 50 plus 2.23, which equals 52.23. The policy network outputs this threshold adjustment instruction to the execution module, which then performs the actual adjustment operation on the system threshold parameters according to the instruction content, completing a full reinforcement learning-driven adaptive threshold optimization process.
[0094] In one optional implementation, the state value function and advantage function are calculated based on a duel-deep Q-network architecture to obtain the exploration action value. A Bayesian prior distribution is constructed based on historical reference records, and the posterior expected reward of each candidate threshold adjustment action is calculated through variational inference as the utilization action value, including:
[0095] In the exploration value estimation process, the state vector is input into the confrontation deep Q network architecture, and the temporal and spatial features in the state vector are extracted through the convolutional layer to output the state value function value. For multiple preset candidate threshold adjustment actions, the advantage function value of each action relative to the average action is calculated. The state value function values are combined through the aggregation layer to obtain the exploration action value of each candidate threshold adjustment action.
[0096] In the value estimation flow, historical accuracy sample sequences of historical reference records are extracted, and their sample mean and sample variance are calculated. The distribution parameters of the Bayesian prior distribution are constructed. The distribution parameters of the Bayesian prior distribution include shape parameters and scale parameters. The threshold adjustment magnitude and adjustment direction corresponding to each candidate threshold adjustment action are encoded into action feature vectors. Combined with the Bayesian prior distribution, variational inference is used to calculate the posterior expected return as the value of the utilization action.
[0097] In this specific embodiment, during the operation of the intelligent decision-making system, the state vector is input into a deep Q-network architecture for processing. This architecture employs a branch structure design, containing two independent value estimation branches. The state vector is simultaneously input into the state value branch and the advantage function branch. The state value branch consists of two fully connected layers. The first layer has 128 neurons, and the second layer outputs a single numerical value representing the intrinsic value of the current state. Assuming the calculated state value function value for the current state is 8.73, it indicates that the state has high long-term return potential. The advantage function branch calculates the advantage function value for each of the preset candidate threshold adjustment actions. The candidate actions include five discrete actions: threshold increase of 0.05, threshold increase of 0.02, threshold unchanged, threshold decrease of 0.02, and threshold decrease of 0.05. The advantage function branch also contains two fully connected layers. The first layer has 128 neurons, and the second layer outputs a 5-dimensional vector, corresponding to the advantage function values of the five candidate actions.
[0098] The calculated dominance function values are [1.24, 0.87, -0.15, 0.56, -0.92], representing the relative dominance of each candidate action relative to the average action. The aggregation layer performs a combined operation on the state value function values and dominance function values. Specifically, the state value function values are added to the dominance function values, and then the average dominance function values are subtracted. The average dominance function value is calculated by summing the five dominance function values and dividing by 5, resulting in 0.32. The exploration action value of each candidate action is obtained by adding the dominance function value of that action to the state value function value and then subtracting the average dominance function value. The exploration action value of the first candidate action with a threshold increase of 0.05 is calculated as 8.73 plus 1. Subtracting 0.32 from 24 gives 9.65. The value of the exploration action with the threshold increased by 0.02 for the second candidate action is 8.73 plus 0.87 and then subtracting 0.32, resulting in 9.28. The value of the exploration action with the threshold unchanged for the third candidate action is 8.73 plus -0.15 and then subtracting 0.32, resulting in 8.26. The value of the exploration action with the threshold decreased by 0.02 for the fourth candidate action is 8.73 plus 0.56 and then subtracting 0.32, resulting in 8.97. The value of the exploration action with the threshold decreased by 0.05 for the fifth candidate action is 8.73 plus -0.92 and then subtracting 0.32, resulting in 7.49.
[0099] The accuracy sample sequence for the past 100 time steps was extracted from historical reference records using value estimation streams. This sequence records the actual accuracy performance under different threshold settings. The historical accuracy sample sequence consists of 100 values, including [0.876, 0.882, 0.879, 0.885, 0.871, 0.890, 0.883, 0.877, 0.886, 0.892]. The sample mean was obtained by summing all the sample values and dividing by the sample size of 100, resulting in a value of 0.8815. The sample variance was obtained by summing the squared differences between each sample value and the sample mean, and then dividing by the sample size minus 1, resulting in a value of 0.000324.
[0100] The Bayesian prior distribution is modeled using a gamma distribution. The shape and scale parameters are derived from the sample mean and sample variance. The shape parameter is obtained by dividing the square of the sample mean by the sample variance, calculated as 0.8815 squared divided by 0.000324, resulting in a shape parameter value of 2397.5. The scale parameter is obtained by dividing the sample variance by the sample mean, calculated as 0.000324 divided by 0.8815, resulting in a scale parameter value of 0.000367. This Bayesian prior distribution reflects the statistical characteristics and uncertainty of the accuracy index in historical data.
[0101] The threshold adjustment magnitude and direction corresponding to each candidate threshold adjustment action are encoded into action feature vectors. An increase of 0.05 is encoded as a vector [0.05, 1, 0.0025], where the first dimension represents the absolute value of the adjustment magnitude, the second dimension indicates a positive adjustment direction, and the third dimension represents the square of the adjustment magnitude. An increase of 0.02 is encoded as a vector [0.02, 1, 0.0004], and keeping the threshold unchanged is encoded as a vector [0, 0, 0]. A decrease of 0.02 is encoded as a vector [0.02, -1, 0.0004], and a decrease of 0.05 is encoded as a vector [0.05, -1, 0.0025]. These action feature vectors are mapped to the distribution parameters required for variational inference through a three-layer fully connected neural network. The number of neurons in each layer of the network is 16, 32, and 2, respectively. The last layer outputs two values representing the logarithmic values of the mean and standard deviation parameters of the posterior distribution.
[0102] Variational inference employs a variational autoencoder structure. The posterior distribution parameters are optimized by minimizing the variational lower bound loss. For an action that increases the threshold by 0.05, the mean parameter of the network output is 0.895, the logarithm of the standard deviation parameter is -5.2, and the corresponding standard deviation is 0.0055. 1000 accuracy predictions are sampled from this posterior distribution, and the posterior expected return is calculated from the sample mean, resulting in 0.894, which is taken as the action value for that action. For an action that increases the threshold by 0.02, the posterior expected return is calculated to be 0.887; for an action that keeps the threshold unchanged, the posterior expected return is calculated to be 0.881; for an action that decreases the threshold by 0.02, the posterior expected return is calculated to be 0.873; and for an action that decreases the threshold by 0.05, the posterior expected return is calculated to be 0.865. The action value sequence for each candidate action is [0.894, 0.887, 0.881, 0.873, ...]. [0.865] reflects the Bayesian estimation of future returns based on historical experience.
[0103] In one optional implementation, according to the threshold adjustment instruction, the vibration alarm threshold corresponding to the current scene is updated, and a vibration event is determined. The determination result is compared with the actual vibration event, and the alarm accuracy rate and false alarm rate are calculated to obtain the multi-objective reward function value, including:
[0104] According to the threshold adjustment instruction, the updated vibration alarm threshold for the current scene is calculated, and the real-time vibration data sequence within the preset time window is collected and compared point by point to obtain the vibration event judgment result. Based on the actual vibration event annotation data within the preset time window, the alarm accuracy rate and false alarm rate are calculated.
[0105] A multi-objective reward function is constructed, which includes maximizing alarm accuracy, minimizing false alarm rate, minimizing response latency, and maximizing threshold stability. The response latency is calculated by the time difference between the alarm trigger time and the actual event occurrence time. The threshold stability is calculated by the variance of the threshold adjustment amplitude within a continuous time window. Pareto front optimization is used to balance the four objectives. The weight coefficients of each objective are dynamically adjusted according to the frequency of vibration events in the current scene and the cumulative loss of historical false alarms to obtain the value of the multi-objective reward function.
[0106] In this specific implementation, the scene identifier and threshold increment value are extracted from the output threshold adjustment command. Assuming the current scene is a subway tunnel environment, the original vibration alarm threshold is 150 units, and the received threshold adjustment command is to increase it by 20 units, updating the vibration alarm threshold for the current scene to 170 units. This update process is completed through a real-time configuration update module, which writes the new threshold into the register of the vibration monitoring device, ensuring that subsequent vibration data is judged according to the new threshold.
[0107] The vibration data acquisition module starts data monitoring within a preset time window, which is set to 300 seconds. Within these 300 seconds, vibration acceleration data is continuously acquired at a sampling frequency of 100 times per second, forming a real-time vibration data sequence containing 30,000 data points. Each data point contains triaxial acceleration values, and the composite vibration amplitude is calculated as the basis for judgment. For example, if the X-axis acceleration is 80 units, the Y-axis acceleration is 120 units, and the Z-axis acceleration is 90 units at a certain moment, the composite vibration amplitude at that moment is calculated to be 167 units through vector synthesis.
[0108] The point-by-point comparison mechanism compares the vibration amplitude at each moment with the updated threshold of 170 units. When the vibration amplitude of more than 5 consecutive data points exceeds the threshold, it is judged as a vibration event. Within a 300-second time window, 8 instances of vibration amplitude exceeding the threshold were recorded. Specifically, 12 consecutive points exceeded the threshold from the 72nd to the 75th second, 9 consecutive points exceeded the threshold from the 138th to the 141st second, and 7 consecutive points exceeded the threshold from the 205th to the 208th second. The remaining 5 instances were scattered instances that did not meet the continuous judgment condition. According to the judgment rules, 3 vibration event alarms were output.
[0109] The labeled data for real vibration events comes from a manually reviewed historical record database. Within the corresponding 300-second time window, the labeled data shows that four real vibration events actually occurred, located at seconds 73, 140, 207, and 265. The judgment results are matched with the labeled data. The alarm at second 72 corresponds to the real event at second 73 and is considered an accurate alarm; the alarm at second 138 corresponds to the real event at second 140 and is considered an accurate alarm; the alarm at second 205 corresponds to the real event at second 207 and is considered an accurate alarm; the real event at second 265 was not detected, constituting a missed alarm. In this comparison process, the number of accurately detected real events is 3, and the total number of actual real events is 4. The alarm accuracy rate is calculated by dividing the number of true positives by the total number of real events, resulting in 75%.
[0110] The false alarm rate calculation requires counting the number of false alarms. Since all 3 alarms corresponded to real events, and there were no cases where alarms were triggered without actual events, the number of false alarms was 0. The false alarm rate is calculated by dividing the number of false alarms by the total number of alarms. In this case, since the denominator is 3 and the numerator is 0, the false alarm rate is 0%. In other scenarios, if there are 5 alarms in 300 seconds, but only 3 correspond to real events, then the number of false alarms is 2, and the false alarm rate is 40%.
[0111] The response delay calculation is performed for each successfully matched alarm. The first alarm occurred at 72 seconds, and the corresponding real event occurred at 73 seconds, with a response delay of 1 second. The second alarm occurred at 138 seconds, and the real event occurred at 140 seconds. Since the alarm time was earlier than the event, this is considered an early warning, and the delay is recorded as -2 seconds. The third alarm occurred at 205 seconds, and the real event occurred at 207 seconds, with a response delay of 2 seconds. The average response delay of the three alarms is calculated as the arithmetic mean of the three delay values, specifically the sum of 1 second, -2 seconds, and 2 seconds, divided by 3, resulting in 0.33 seconds.
[0112] Threshold stability assessment requires tracing the threshold adjustment history within a continuous time window, recording the threshold data for the most recent 10 time windows: 150, 155, 150, 148, 152, 150, 155, 170, 168, and 170 units. The mean of these 10 values is calculated to be 156.8 units. The squared deviation of each threshold from the mean is calculated to be 46.24, 3.24, 46.24, 77.44, 20.25, 46.24, 3.24, 174.24, 125.44, and 174.24. The sum of these 10 squared deviations is 716.81, which, divided by the sample size of 10, gives the variance of 71.68. A smaller variance indicates higher threshold stability.
[0113] The construction of the multi-objective reward function requires the integration of four evaluation dimensions: alarm accuracy (maximizing the current value of 75%), false alarm rate (minimizing the current value of 0%, converted to a reverse indicator of 100%), response latency (minimizing the current average latency of 0.33 seconds, converted to a reverse indicator of 93.4% by setting a maximum acceptable latency of 5 seconds), and threshold stability (minimizing the current variance of 71.68, converted to a stability score of 28.32% by setting a baseline variance of 100).
[0114] The dynamic weight adjustment mechanism determines the importance of each target based on the characteristics of the current scene. The frequency of vibration events in the current scene is 12 times per hour, which is a high-frequency scene. Therefore, the weight of alarm accuracy and response latency is increased. The query of historical false alarm cumulative loss shows that the manual review cost caused by false alarms in the last 24 hours is 680 man-hours. The false alarm rate weight is increased accordingly. The specific weight allocation is as follows: alarm accuracy accounts for 40%, false alarm rate accounts for 35%, response latency accounts for 15%, and threshold stability accounts for 10%.
[0115] The reward function value is calculated by multiplying the four performance indicators by their corresponding weights and then summing the results. The alarm accuracy rate of 75% multiplied by the weight of 0.4 yields 30 points; the false alarm rate performance of 100% multiplied by the weight of 0.35 yields 35 points; the response latency performance of 93.4% multiplied by the weight of 0.15 yields 14.01 points; and the threshold stability performance of 28.32% multiplied by the weight of 0.1 yields 2.83 points. The sum of the four scores yields a multi-objective reward function value of 81.84 points.
[0116] In one optional implementation, the multi-objective reward function value and the state vector are input into a reinforcement learning model, and the weight parameters of the policy network are updated using a temporal difference algorithm to obtain an adjusted vibration alarm threshold, which is then associated with the scene category identifier, including:
[0117] The multi-objective reward function value is input into the value network of the reinforcement learning model along with the state vector. The value estimate of the current state is output and the temporal difference error is calculated. This value is multiplied by the log probability of the threshold adjustment action output by the policy network to obtain the policy gradient. A composite loss function is constructed, which includes a policy gradient term, a value network mean square error term, and a policy entropy regularization term.
[0118] A dual-head network architecture with a shared feature extraction layer is adopted. The shared feature extraction layer outputs feature representations to both the policy network and the value network. The gradient is calculated based on the composite loss function, and the weight parameters of the policy network and the value network are updated. The updated policy network is then input into the state vector to obtain the adjusted vibration alarm threshold.
[0119] After binding the adjusted vibration alarm threshold with the scene category identifier, it is updated to the scene memory library, and the mean value of the state vector of the scene category is updated synchronously.
[0120] In this specific embodiment, after receiving the multi-objective reward function value and the state vector, the reinforcement learning model transmits this input data to the value network for processing. The state vector contains vibration feature parameters of the current scene, such as vibration amplitude of 8.5 mm / s, frequency of 120 Hz, duration of 3.2 seconds, historical false positive rate of 0.15, historical false negative rate of 0.08, and a current threshold set to 10 mm / s. The value network extracts features from this state vector through a three-layer fully connected neuron structure. The first layer contains 128 neurons and uses a modified linear unit as the activation function. The second layer contains 64 neurons and also uses a modified linear unit for activation. The third layer outputs a single value as the state value estimate. After calculation, the current state value estimate output is 0.72.
[0121] After obtaining the current state value estimate, the value network needs to combine it with the next state value estimate to calculate the temporal difference error. The state value estimate for the next time step is recorded as 0.68, and the discount factor is set to 0.95. The calculation process of the temporal difference error is to add the multiplier of the discount factor and the next state value estimate to the multi-objective reward function value, and then subtract the current state value estimate. Assuming the multi-objective reward function value is 0.65, the temporal difference error is calculated as 0.65 plus 0.95 multiplied by 0.68, resulting in 1.296. Then, subtracting the current state value of 0.72, the final temporal difference error is 0.576.
[0122] Under the same state vector input, the policy network adjusts the probability distribution of actions by outputting a threshold through the policy branch in the dual-head network architecture. The output layer of the policy network uses the softmax activation function to discretize the threshold adjustment into multiple action options, including five actions: decreasing the threshold by 2 mm / s, decreasing by 1 mm / s, keeping it unchanged, increasing by 1 mm / s, and increasing by 2 mm / s. The output probabilities of each action in the current state are 0.05, 0.25, 0.15, 0.40, and 0.15, respectively. The action with the highest probability is selected, which is to increase the threshold by 1 mm / s. The log probability of this action is calculated by taking the natural logarithm of 0.40, which is approximately -0.916.
[0123] The policy gradient calculation process involves multiplying the temporal difference error by the log probability of the action. Based on the aforementioned values, multiplying the temporal difference error of 0.576 by the log probability of -0.916 yields a policy gradient of -0.528. This value reflects the direction and magnitude of the policy network adjustment needed. A negative value indicates that the probability of choosing the action in the current state should be reduced.
[0124] The composite loss function integrates three key components: the policy gradient term directly uses the previously calculated -0.528 as the base value for the policy loss; the value network mean squared error term is obtained by calculating the square of the temporal difference error, where 0.576 squared equals 0.332; and the policy entropy regularization term is used to maintain the exploratory nature of the policy, obtained by summing the products of all action probabilities and their log probabilities and taking the negative value. The log probabilities of the five actions are -2.996, -1.386, and -... 1.897, -0.916, and -1.897, multiplied by their corresponding probabilities and summed, yield -1.523. Taking the negative value, the policy entropy becomes 1.523. The composite loss function combines the three terms according to their weight coefficients: the policy gradient term has a weight of 1.0, the value network mean squared error term has a weight of 0.5, and the policy entropy regularization term has a weight of 0.01. The final loss function value is -0.528 plus 0.5 multiplied by 0.332 plus 0.01 multiplied by 1.523, resulting in -0.347.
[0125] The dual-head network architecture uses a shared feature extraction layer as its basic structure. This layer contains two layers of convolutional neurons and one layer of fully connected neurons. The first layer of convolutional neurons contains 32 convolutional kernels with a kernel size of 3 by 3, a stride of 1, and padding of 1. The second layer of convolutional neurons contains 64 convolutional kernels with the same parameter settings. The fully connected layer contains 256 neuron nodes. The shared feature extraction layer converts the state vector into a 256-dimensional feature representation vector, which is simultaneously input into the independent branches of the policy network and the value network.
[0126] The gradient calculation process employs the backpropagation algorithm, propagating the error signal layer by layer from the composite loss function to the input layer. The gradient update of the policy network branch involves the weight parameters of 64 neurons in the policy output layer and 256 x 64 weight parameters in the connection layers. The gradient update of the value network branch involves the weight parameters of 64 neurons in the value output layer. The gradient of the shared feature extraction layer is updated by summing the gradients of the policy network and the value network, involving 256 fully connected layer weights, 64 second-layer convolutional kernel weights, and 32 first-layer convolutional kernel weights. The learning rate is set to 0.0003, and each weight parameter is incrementally updated by multiplying its corresponding gradient by the learning rate.
[0127] After the weight parameters are updated, the current state vector is input into the updated policy network again to obtain a new threshold adjustment action output. After the weight update, the probability distribution of the new action changes to: a probability of 0.08 for decreasing the threshold by 2 mm / s, a probability of 0.32 for decreasing it by 1 mm / s, a probability of 0.18 for keeping it unchanged, a probability of 0.30 for increasing it by 1 mm / s, and a probability of 0.12 for increasing it by 2 mm / s. At this point, decreasing the threshold by 1 mm / s becomes the optimal action, and the adjusted vibration alarm threshold is reduced from the original 10 mm / s to 9 mm / s.
[0128] The scene memory maintains the optimal threshold configuration and state vector statistics corresponding to each scene category identifier. The current scene category identifier is SC20231205, which is bound to the adjusted threshold of 9 mm / s. The original threshold record for this scene category in the scene memory was 10 mm / s. The update operation replaces it with the new threshold value and updates the mean of the state vector for this scene category. The original mean was vibration amplitude of 7.8 mm / s, frequency of 115 Hz, and duration of 2.9 seconds. The current state vector is updated using the exponential moving average method with a smoothing coefficient of 0.1. The updated mean is vibration amplitude of 7.87 mm / s, frequency of 115.5 Hz, and duration of 2.93 seconds. After the scene memory is updated, this scene category can directly call the optimized threshold configuration when encountering similar states in the future, reducing the computational overhead of repeated learning.
[0129] The vibration fiber optic alarm threshold adjustment system of this invention includes:
[0130] The first unit is used to collect vibration signal data along the line through a distributed optical fiber sensing system.
[0131] The second unit is used to extract time-frequency domain features from the vibration signal data, construct a scene feature vector, input it into a scene classification model, and obtain the scene category identifier and scene confidence of the current vibration source.
[0132] The third unit is used to combine the scene category identifier, scene confidence and historical reference records into a state vector, input it into the policy network of the reinforcement learning model, the policy network includes a two-stream value estimation architecture, calculates the action value function, generates the threshold adjustment magnitude and adjustment direction for the current scene, and outputs the threshold adjustment instruction.
[0133] The fourth unit is used to update the vibration alarm threshold corresponding to the current scene according to the threshold adjustment instruction, and to determine the vibration event. The determination result is compared with the actual vibration event to calculate the alarm accuracy and false alarm rate, and to obtain the multi-objective reward function value.
[0134] The fifth unit is used to input the multi-objective reward function value and the state vector into the reinforcement learning model, update the weight parameters of the policy network through the temporal difference algorithm, obtain the adjusted vibration alarm threshold, and associate it with the scene category identifier.
[0135] A third aspect of the present invention provides an electronic device, comprising:
[0136] processor;
[0137] Memory used to store processor-executable instructions;
[0138] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0139] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0140] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for adjusting the vibration fiber optic alarm threshold, characterized in that, include: Vibration signal data along the line are collected using a distributed optical fiber sensing system; The vibration signal data is subjected to time-frequency domain feature extraction to construct a scene feature vector, which is then input into a scene classification model to obtain the scene category identifier and scene confidence of the current vibration source. The scene category identifier, scene confidence, and historical reference records are combined into a state vector, which is then input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture and calculates the action value function. It generates the threshold adjustment magnitude and direction for the current scene and outputs threshold adjustment instructions, including: The state vector is input into the policy network of the reinforcement learning model. The policy network includes a two-stream value estimation architecture. The state value function and advantage function are calculated based on the duel deep Q network architecture. The exploration action value is calculated. A Bayesian prior distribution is constructed based on historical reference records. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference as the utilization action value. For each candidate threshold adjustment action, calculate the expected threshold after executing the action, calculate the deviation risk score by combining it with the reference threshold benchmark value, map it to a penalty factor through an exponential function, and multiply it by the sum of the corresponding exploration action value and utilization action value to obtain the action value function value; The candidate threshold adjustment action with the largest action value function value is selected, and its threshold adjustment magnitude and adjustment direction are extracted. The dynamic conservative coefficient is obtained by sampling from the Beta distribution using the Thompson sampling algorithm. The parameters of the Beta distribution are determined by the historical reference records. The threshold adjustment magnitude is multiplied by the dynamic conservative coefficient to obtain the optimized threshold adjustment magnitude. The threshold adjustment command is generated and output by combining the adjustment direction. According to the threshold adjustment instruction, update the vibration alarm threshold corresponding to the current scene, and determine the vibration event. Compare the determination result with the actual vibration event, calculate the alarm accuracy and false alarm rate, and obtain the multi-objective reward function value. The multi-objective reward function value and the state vector are input into the reinforcement learning model, and the weight parameters of the policy network are updated through the temporal difference algorithm to obtain the adjusted vibration alarm threshold, which is then associated with the scene category identifier.
2. The method according to claim 1, characterized in that, The vibration signal data is subjected to time-frequency domain feature extraction to construct a scene feature vector. This vector is then input into a scene classification model to obtain the scene category identifier and scene confidence score of the current vibration source, including: The vibration signal data is divided into multiple signal segments according to a time window. The multi-order statistical moment features of the vibration amplitude are extracted for each signal segment, and the correlation coefficient of the vibration amplitude envelope between adjacent signal segments is calculated. The correlation coefficient is used as the time-domain dynamic correlation feature. Spectral analysis is performed on each signal segment to extract the distribution characteristics of spectral energy in a preset frequency band, the energy ratio of each frequency band is calculated, and the frequency domain energy distribution characteristics are obtained. These characteristics are then concatenated with the time domain dynamic correlation characteristics to construct a scene feature vector. The scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier. A comprehensive attribution probability distribution is constructed, and the scene category corresponding to the maximum attribution probability is selected. The maximum attribution probability is used as the scene confidence score.
3. The method according to claim 2, characterized in that, The scene feature vector is input into a scene classification model containing multiple sub-classifiers to obtain the scene category prediction results and corresponding confidence scores of each sub-classifier, and a comprehensive attribution probability distribution is constructed, including: For each sub-classifier, different feature mapping functions are used to map the scene feature vector to the corresponding feature subspace, calculate its local density correlation degree and establish the discrimination boundary of the scene category, and obtain the scene category prediction results and confidence scores of each sub-classifier. Based on the classification accuracy of each sub-classifier on historical samples, and the distance metric between the current scene feature vector and the training sample center of each sub-classifier, the confidence weight of each sub-classifier is calculated, multiplied by the corresponding confidence score, to obtain the weighted confidence score. The number of times each scene category appears in the prediction results of all sub-classifiers is counted as the category support. The weighted confidence scores of the sub-classifiers that predict the same scene category are summed to obtain the cumulative confidence score of each scene category. Combined with the category support, the belonging probability value of each scene category is calculated to construct a comprehensive belonging probability distribution.
4. The method according to claim 1, characterized in that, Based on a deep Q-network architecture, the state value function and advantage function are calculated to obtain the value of exploration actions. A Bayesian prior distribution is constructed based on historical reference records. The posterior expected reward of each candidate threshold adjustment action is calculated through variational inference, which serves as the value of the utilized action, including: In the exploration value estimation process, the state vector is input into the confrontation deep Q network architecture, and the temporal and spatial features in the state vector are extracted through the convolutional layer to output the state value function value. For multiple preset candidate threshold adjustment actions, the advantage function value of each action relative to the average action is calculated. The state value function values are combined through the aggregation layer to obtain the exploration action value of each candidate threshold adjustment action. In the value estimation flow, historical accuracy sample sequences of historical reference records are extracted, and their sample mean and sample variance are calculated. The distribution parameters of the Bayesian prior distribution are constructed. The distribution parameters of the Bayesian prior distribution include shape parameters and scale parameters. The threshold adjustment magnitude and adjustment direction corresponding to each candidate threshold adjustment action are encoded into action feature vectors. Combined with the Bayesian prior distribution, variational inference is used to calculate the posterior expected return as the value of the utilization action.
5. The method according to claim 1, characterized in that, According to the threshold adjustment instruction, the vibration alarm threshold corresponding to the current scene is updated, and vibration events are determined. The determination result is compared with the actual vibration events, and the alarm accuracy and false alarm rate are calculated to obtain the multi-objective reward function value, including: According to the threshold adjustment instruction, the updated vibration alarm threshold for the current scene is calculated, and the real-time vibration data sequence within the preset time window is collected and compared point by point to obtain the vibration event judgment result. Based on the actual vibration event annotation data within the preset time window, the alarm accuracy rate and false alarm rate are calculated. A multi-objective reward function is constructed, which includes maximizing alarm accuracy, minimizing false alarm rate, minimizing response latency, and maximizing threshold stability. The response latency is calculated by the time difference between the alarm trigger time and the actual event occurrence time. The threshold stability is calculated by the variance of the threshold adjustment amplitude within a continuous time window. Pareto front optimization is used to balance the four objectives. The weight coefficients of each objective are dynamically adjusted according to the frequency of vibration events in the current scene and the cumulative loss of historical false alarms to obtain the value of the multi-objective reward function.
6. The method according to claim 1, characterized in that, The multi-objective reward function value and the state vector are input into a reinforcement learning model. The weight parameters of the policy network are updated using a temporal difference algorithm to obtain an adjusted vibration alarm threshold, which is then associated with the scene category identifier, including: The multi-objective reward function value is input into the value network of the reinforcement learning model along with the state vector. The value estimate of the current state is output and the temporal difference error is calculated. This value is multiplied by the log probability of the threshold adjustment action output by the policy network to obtain the policy gradient. A composite loss function is constructed, which includes a policy gradient term, a value network mean square error term, and a policy entropy regularization term. A dual-head network architecture with a shared feature extraction layer is adopted. The shared feature extraction layer outputs feature representations to both the policy network and the value network. The gradient is calculated based on the composite loss function, and the weight parameters of the policy network and the value network are updated. The updated policy network is then input into the state vector to obtain the adjusted vibration alarm threshold. After binding the adjusted vibration alarm threshold with the scene category identifier, it is updated to the scene memory library, and the mean value of the state vector of the scene category is updated synchronously.
7. A vibration fiber optic alarm threshold adjustment system, used to implement the method as described in any one of claims 1-6, characterized in that, include: The first unit is used to collect vibration signal data along the line through a distributed optical fiber sensing system. The second unit is used to extract time-frequency domain features from the vibration signal data, construct a scene feature vector, input it into a scene classification model, and obtain the scene category identifier and scene confidence of the current vibration source. The third unit is used to combine the scene category identifier, scene confidence and historical reference records into a state vector, input it into the policy network of the reinforcement learning model, the policy network includes a two-stream value estimation architecture, calculates the action value function, generates the threshold adjustment magnitude and adjustment direction for the current scene, and outputs the threshold adjustment instruction. The fourth unit is used to update the vibration alarm threshold corresponding to the current scene according to the threshold adjustment instruction, and to determine the vibration event. The determination result is compared with the actual vibration event to calculate the alarm accuracy and false alarm rate, and to obtain the multi-objective reward function value. The fifth unit is used to input the multi-objective reward function value and the state vector into the reinforcement learning model, update the weight parameters of the policy network through the temporal difference algorithm, obtain the adjusted vibration alarm threshold, and associate it with the scene category identifier.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.