Cable fault distance measurement method, system, equipment and medium

By constructing a time-frequency fusion outlier prior matrix and an attention mechanism, the problems of poor model interpretability and weak noise resistance in cable fault location were solved, and high-precision and high-reliability distance measurement was achieved in complex noise environments.

CN122017450APending Publication Date: 2026-05-12GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU POWER GRID CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing cable fault location technologies suffer from poor model interpretability, weak noise resistance, low prior fusion efficiency, and insufficient accuracy in extracting key signals, making it difficult to accurately locate faults in complex noise environments.

Method used

By constructing a time-frequency fusion outlier prior matrix and combining it with an attention mechanism for feature extraction, the fault signal is accurately located using time-frequency domain outlier information. A parameterless attention mechanism is used for reliability quantification, and parameters are dynamically adjusted to ensure the reliability of the ranging results.

Benefits of technology

It improves the accuracy and reliability of cable fault location, effectively filters power frequency harmonics and environmental noise interference, enables process traceability, and adapts to the real-time location requirements in complex noise environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017450A_ABST
    Figure CN122017450A_ABST
Patent Text Reader

Abstract

The invention discloses a cable fault distance measurement method, system and device and a medium, and the method comprises the steps: obtaining current signals of a normal signal segment and a fault signal segment of a cable, constructing an original data set according to the current signals, and carrying out the data processing of the original data set, and obtaining a sample matrix; calculating statistical characteristics of each channel of a normal signal segment in the sample matrix, respectively constructing a time domain outlier matrix and a frequency domain outlier matrix according to the statistical characteristics, and fusing the time domain outlier matrix and the frequency domain outlier matrix to obtain a time-frequency fusion outlier priori matrix; performing feature extraction on the sample matrix based on a time-frequency fusion outlier priori matrix to obtain a priori attention enhancement feature; based on the prior attention enhancement features, the fault distance measurement result is obtained through calculation, the distance measurement result is quantified, the credibility of the distance measurement result is obtained, the credibility is optimized, and the final distance measurement result is output, which is convenient for industrial field personnel to verify and make decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cable fault location technology, and in particular to a cable fault location method, system, device and medium. Background Technology

[0002] Currently, among existing cable fault location technologies, research focuses on methods based on convolutional neural networks (CNNs) due to their ability to extract multi-channel signal features. However, considering the related technologies, they suffer from the following core drawbacks: Lack of interpretability. Traditional CNNs are "black box" models. When processing multi-channel current signals from monitoring points at both ends and along the cable, they cannot clearly define the model's focus on key fault information, such as the first arrival signal and the reflected signal from the fault point. The ranging results lack reliable verification, making it difficult to meet the traceability requirements of industrial scenarios. Furthermore, traditional CNNs have low accuracy in identifying key signals, and cable fault signals are easily affected by power frequency harmonics and environmental noise. Existing methods rely solely on the time domain, such as signal amplitude thresholds, or the frequency domain, such as energy analysis of specific frequency bands, without integrating outlier information in the time and frequency domains—i.e., fault-related abnormal signal regions. This leads to large errors in extracting the key arrival times of the first and reflected waves in complex noise environments, directly causing ranging deviations. Furthermore, traditional CNNs suffer from poor prior fusion efficiency. While some methods attempt to incorporate prior knowledge such as signal statistical characteristics, they often rely on pre-training, such as model pre-training or pre-diagnosis based on fault frequency priors, or shallow fusion methods that perform signal anomaly detection before inputting the data into the network. These methods lack deep embedding with the CNN feature extraction process, increasing computational costs and failing to flexibly adapt to the real-time signal processing needs of multiple monitoring points in cables. Traditional CNNs also exhibit weak noise resistance, particularly in low signal-to-noise ratio scenarios, such as noise levels below -20dB. Traditional CNNs and their improved versions, such as the squeezed excitation network SE-Net and masked CNNs, are susceptible to unrelated interference signals, leading to shifts in fault feature extraction and a significant decrease in ranging performance.

[0003] To address the shortcomings of existing cable fault location technologies, this invention proposes a cable fault location method, system, equipment, and medium that solves the core technical problems of existing solutions. Summary of the Invention

[0004] In view of the above-mentioned existing problems, the present invention provides a cable fault location method, system, device and medium.

[0005] This invention provides a cable fault location method, system, device, and medium to solve problems such as poor model interpretability, weak noise resistance, low prior fusion efficiency, and insufficient accuracy of key signal extraction in existing cable fault location technologies.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a cable fault location method, comprising: Acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct an original dataset based on the current signals, and process the original dataset to obtain a sample matrix; Calculate the statistical characteristics of each channel in the normal signal segment of the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix based on the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. Based on the time-frequency fusion outlier prior matrix, feature extraction is performed on the sample matrix to obtain prior attention enhancement features; Based on the prior attention enhancement features, the ranging result of the fault is calculated, the ranging result is quantified to obtain the reliability of the ranging result, the reliability is optimized, and the final ranging result is output.

[0007] As a preferred embodiment of the cable fault location method described in this invention, the data processing of the original dataset includes: Acquire multi-channel current signals from monitoring points at both ends and midway of the cable, discretize them according to the set sampling interval, and construct an original dataset containing the sample vector of each channel at each discrete time and the corresponding state label; The original dataset is windowed, and the data in each window are stacked in order to obtain a two-dimensional sample matrix.

[0008] As a preferred embodiment of the cable fault location method described in this invention, constructing the time-domain outlier matrix includes: Based on the normal signal segment, calculate the mean and standard deviation of the current signal for each channel; The current value of each data point in the sample matrix is ​​compared with the mean value of the corresponding channel for the first judgment. Set the first threshold based on the standard deviation and confidence coefficient; If the deviation of the current value of each data point from the mean of the corresponding channel is greater than the first threshold, the corresponding data point will be marked as abnormal. Otherwise, mark the corresponding data point as normal; For data points marked as outliers, a binary indicator matrix with the same size as the sample matrix is ​​generated as the time-domain outlier matrix.

[0009] The beneficial effect of this preferred technical solution is that, through time-domain outlier detection, fault and abnormal signals can be effectively identified, thereby improving ranging accuracy and reliability.

[0010] As a preferred embodiment of the cable fault location method described in this invention, constructing the frequency domain outlier matrix includes: Frequency domain analysis is performed on the data of each channel in each sample matrix to calculate the signal energy in multiple preset interest frequency bands, and the spectral energy time trajectory of each channel at different time points is obtained. Based on the normal signal segment, calculate the mean and standard deviation of the spectral energy of each channel; A second threshold is set based on the standard deviation and confidence coefficient of the spectral energy of each channel; If the deviation between the spectral energy time trajectory of each channel at different time points and the mean spectral energy of each channel is greater than the second threshold, the corresponding spectral energy is marked as an anomaly, and a binary frequency domain outlier indicator matrix is ​​generated. The time-domain outlier indicator matrix and the frequency-domain outlier indicator matrix are linearly combined according to preset weights and compared with a binarization threshold to generate a time-frequency fusion outlier prior matrix.

[0011] The beneficial effects of this preferred technical solution are that it integrates time and frequency domain information, accurately locates fault signals, enhances noise resistance, and improves ranging accuracy.

[0012] In a preferred embodiment of the cable fault location method of the present invention, feature extraction of the sample matrix includes: The sample matrix is ​​input into the neural network for forward propagation to obtain a total feature map composed of stacked feature maps from multiple channels. The time-frequency fusion outlier prior matrix is ​​used as the query matrix in the attention mechanism; A non-linear mapping is performed on the feature map of each channel in the overall feature map, and an aggregation operation is performed along the channel dimension to generate a key matrix with the same size as the query matrix. Calculate the distance between the query matrix and the key matrix, and then calculate the attention weight matrix based on the distance using a normalized exponential function; The attention weight matrix is ​​used to weight the feature map of each channel in the total feature map element by element to obtain the prior attention-enhanced features. Based on prior attention enhancement features, intermediate results required for fault location are output through a regression prediction head.

[0013] In a preferred embodiment of the cable fault location method described in this invention, the fault location result is calculated as follows: The local index of the regression prediction head within each analysis window is combined with the starting position offset of each window to restore the sample index on the global time series. The global sample indices of all windows are fused to obtain the global keypoint index; Multiply the global key point index by the sampling interval to convert it into a physical time value, and obtain the actual arrival time of the fault key signal; By applying excitation to a cable calibration section of known physical length, the actual arrival time difference of the fault-critical signal is measured and the equivalent wave velocity is calculated. Based on the equivalent wave velocity and the calculated actual arrival time difference of the critical fault signal, the distance between the fault point and the measurement port is calculated according to the traveling wave ranging principle.

[0014] In a preferred embodiment of the cable fault location method described in this invention, the final location result is output as follows: The consistency ratio between the attention weight matrix and the time-frequency fusion outlier prior matrix is ​​calculated and used as the confidence level of the ranging result. The confidence level is compared with a preset confidence threshold. If the confidence level is lower than the confidence level threshold, the binarization threshold used to generate the time-frequency fusion outlier prior matrix is ​​adjusted, and the construction of the time-domain outlier matrix and the frequency-domain outlier matrix is ​​re-executed based on the adjusted parameters. If the confidence level reaches or exceeds the confidence threshold, the final ranging result and the corresponding confidence level will be output.

[0015] The beneficial effect of this preferred technical solution is that by dynamically adjusting the parameters, it ensures high confidence output of the ranging results and improves the reliability of ranging.

[0016] Secondly, the present invention provides a cable fault location system, comprising: The data processing module is used to acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct an original dataset based on the current signals, and process the original dataset to obtain a sample matrix. The matrix construction and fusion module is used to calculate the statistical characteristics of each channel of the normal signal segment in the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix respectively based on the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. The feature extraction module is used to extract features from the sample matrix based on the time-frequency fusion outlier prior matrix to obtain prior attention-enhanced features; The calculation module is used to calculate the ranging result of the fault based on the prior attention enhancement feature, quantify the ranging result to obtain the reliability of the ranging result, optimize the reliability, and output the final ranging result.

[0017] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the cable fault location method described above.

[0018] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the cable fault location method described above.

[0019] Compared with existing technologies, the advantages of this invention are as follows: This invention, by fusing time-frequency domain outlier priors, guides a CNN to accurately focus on key fault signal regions, effectively filtering power frequency harmonics and environmental noise interference. This invention uses an attention weight matrix to visualize the model's focus area on the fault signal, clearly defining the feature extraction process of the first and reflected waves, achieving process traceability. This invention quantifies the reliability of ranging results through consistency confidence metrics, facilitating verification and decision-making for industrial field personnel. The parameterless attention mechanism employed in this invention requires no additional parameter learning; compared to methods such as SE-Net that require parameter training, this invention reduces computational load and can adapt to the real-time requirements of online cable fault monitoring. Furthermore, the attention fusion module of this invention can be independently deployed in any convolutional layer of a CNN, flexibly adapting to multi-channel signal processing scenarios at both ends and midway monitoring points of the cable. This invention, through the fusion of time-frequency domain outlier priors, can pre-locate fault-related abnormal signal regions, reducing the impact of unrelated interference on feature extraction and adapting to complex industrial noise environments. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the overall flow logic of a cable fault location method according to an embodiment of the present invention; Figure 2 A visualization of attention and outlier priors for a cable fault location method provided in one embodiment of the present invention; Figure 3 A cable fault location consistency confidence distribution diagram for a cable fault location method provided in one embodiment of the present invention; Figure 4 This diagram illustrates the effect of different sliding window widths on the ranging accuracy of a cable fault location method according to an embodiment of the present invention. Figure 5 This is a comparison chart of the ranging errors of different methods under different noise intensities, which is provided as an embodiment of the present invention for a cable fault ranging method. Detailed Implementation

[0022] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0023] Example 1, referring to Figure 1 As an embodiment of the present invention, a cable fault location method is provided, comprising: S100: Acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct the original dataset based on the current signals, process the original dataset, and obtain the sample matrix. S200: Calculate the statistical characteristics of each channel in the normal signal segment of the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix according to the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. In an optional embodiment, the time-domain outlier matrix can be constructed using a nonparametric thresholding method based on historical quantiles. Based on the normal signal segment, the high and low quantiles of the current in the historical data are calculated. If each data point in the sample matrix is ​​greater than the high quantile or less than the low quantile, the data point is marked as an anomaly; otherwise, it is normal. The marking results of all data points are used to generate a binary indicator matrix with the same size as the sample matrix, which serves as the time-domain outlier matrix. In another alternative embodiment, the temporal outlier matrix can be constructed using a dynamic thresholding method based on sliding window statistics. A local statistical window is defined within the normal signal segment. For the current data point to be detected, a window of data near its current time point and within the normal segment is selected. Within this local window, the local mean and local standard deviation of the current values ​​in the channel are calculated. A dynamic threshold is set; if the current value of a data point exceeds the corresponding dynamic threshold range, it is marked as abnormal; otherwise, it is considered normal. All data points are traversed to generate a binary indicator matrix, which serves as the temporal outlier matrix.

[0024] In this embodiment of the invention, constructing the time-domain outlier matrix includes calculating the mean and standard deviation of the normal signal segment of the cable to construct the time-domain outlier matrix. For each data point in the sample matrix, a judgment is made based on the degree of deviation from the channel mean, the standard deviation, and a threshold determined by the confidence coefficient. If the deviation exceeds the first threshold, it is marked as an anomaly, and a binary indicator matrix with the same size as the sample matrix is ​​generated as the time-domain outlier matrix.

[0025] It should be noted that by calculating the statistical characteristics of normal signals, a time-domain outlier matrix is ​​constructed, which can effectively identify abnormal regions in fault signals and improve fault detection accuracy.

[0026] S300: Based on the time-frequency fusion outlier prior matrix, feature extraction is performed on the sample matrix to obtain prior attention-enhanced features; S400: Based on prior attention enhancement features, the ranging result of the fault is calculated, the ranging result is quantified to obtain the reliability of the ranging result, the reliability is optimized, and the final ranging result is output.

[0027] It should be noted that by constructing a time-frequency fusion outlier prior matrix, the accuracy and noise resistance of feature extraction are enhanced; by introducing an attention mechanism and credibility quantification, the interpretability and ranging accuracy of the model are improved; and by dynamically optimizing the credibility threshold, the high reliability of the ranging results is ensured. This invention significantly improves the accuracy and stability of cable fault ranging, adapts to complex noise environments, and meets the real-time requirements of industrial scenarios.

[0028] In this embodiment of the invention, step S100 includes the following sub-steps A1-A2; In A1: acquire multi-channel current signals from monitoring points at both ends and midway of the cable, discretize them according to the set sampling interval, and construct an original dataset containing the sample vector of each channel at each discrete time and the corresponding state label; In A2: The original dataset is windowed, and the data in each window is stacked in order to obtain a two-dimensional sample matrix.

[0029] In one alternative embodiment, windowing processing can be fixed window segmentation processing, setting a fixed window width and window interval, with the window interval being greater than or equal to the window width. From the original dataset, a data segment is extracted every window interval sampling point, and each data segment is stacked into a two-dimensional matrix in chronological order. The rows of the matrix correspond to the time series, and the columns correspond to different channels. The steps are repeated until the entire dataset is processed to obtain the sample matrix. In another alternative embodiment, windowing can also be used for wavelet transform-based multi-resolution analysis. Appropriate wavelet basis functions are selected, and the original dataset is decomposed into wavelet coefficients at different resolutions. Specific features are selected at each scale and stacked into a two-dimensional matrix in chronological and channel order. The feature matrices at different scales are combined into a sequence of sample matrices, each corresponding to a specific resolution. This process is repeated to obtain a complete sample matrix. In this embodiment of the invention, windowing includes applying a sliding window; Specifically, the M-channel current signals at both ends and midway monitoring points of the cable are sampled at intervals. Data collection and recording of discrete time points. The original dataset is constructed as follows: in, For a moment The M-channel sample vector, The labels include Normal = 0 and Faulty = 1.

[0030] For the original dataset Apply sliding window The window width is Step size is This yields an image-based sample matrix, with rows arranged by time and columns arranged by channel, stacked as follows: in, For the first There are window samples, and the window sequence is... , For the number of windows, , This represents the total number of samples.

[0031] It should be noted that converting the one-dimensional current signal into a two-dimensional sample matrix through a sliding window facilitates subsequent feature extraction and analysis, while preserving the signal's time and channel information, thus improving the model's ability to detect fault signals.

[0032] In this embodiment of the invention, step S200 includes the following sub-steps B1-B6; In B1: Based on the normal signal segment, calculate the mean and standard deviation of the current signal for each channel; In B2: Perform a first judgment on the current value of each data point in the sample matrix and the mean value of the corresponding channel; In B3: Set the first threshold based on the standard deviation and confidence coefficient; In B4: If the deviation of the current value of each data point from the mean of the corresponding channel is greater than the first threshold, then the corresponding data point is marked as abnormal; In B5: Otherwise, mark the corresponding data point as normal; In B6: Data points marked as outliers are used to generate a binary indicator matrix with the same size as the sample matrix, which serves as the outlier matrix in the time domain.

[0033] In this embodiment of the invention, based on the normal signal segment, the mean and standard deviation of the current signal for each channel are calculated as follows: in, This represents the normal mean value for channel m. Let m be the standard deviation of channel m. For the normal index set, the first The channel is indexed in the normal index set as The current signal value at a given time.

[0034] For each window Define the outlier matrix in the time domain: in, For the first Window in line ,aisle The temporal outlier indicator (0 / 1), Here is the confidence coefficient. This is the first threshold.

[0035] The outlier matrix in the time domain is represented as: It should be noted that by statistically analyzing normal signals, abnormal areas in fault signals can be accurately identified, thereby improving the accuracy and reliability of fault detection.

[0036] In this embodiment of the invention, after completing steps B1-B6, step S200 also includes steps B7-B. In B7: Frequency domain analysis is performed on the data of each channel in each sample matrix to calculate the signal energy in multiple preset interest frequency bands and obtain the spectral energy time trajectory of each channel at different time points; In B8: Based on the normal signal segment, calculate the mean and standard deviation of the spectral energy of each channel; In B9: Set a second threshold based on the standard deviation and confidence coefficient of the spectral energy of each channel; In B10: If the deviation between the spectral energy time trajectory of each channel at different time points and the mean spectral energy of each channel is greater than the second threshold, the corresponding spectral energy is marked as an anomaly, and a binary frequency domain outlier indicator matrix is ​​generated. In B11: The time-domain outlier indicator matrix and the frequency-domain outlier indicator matrix are linearly combined according to preset weights and compared with a binarization threshold to generate a time-frequency fusion outlier prior matrix.

[0037] In one alternative embodiment, the frequency domain analysis can be wavelet transform. A suitable wavelet basis function is selected according to the signal characteristics, and wavelet transform is performed on each channel data in each sample matrix to obtain wavelet coefficients at different scales. The wavelet coefficient energy at each time point in the frequency band of interest is calculated. Based on the statistical characteristics of the normal signal segment, it is determined whether the spectral energy at each time point is abnormal, and a frequency domain outlier indicator matrix is ​​generated. In another alternative embodiment, frequency domain analysis can also be performed using the Hilbert-Huang transform. Empirical mode decomposition (EMD) is performed on each channel data in each sample matrix, decomposing it into several intrinsic mode functions (IMFs). A Hilbert transform is then applied to each IMF to obtain its instantaneous frequency and instantaneous amplitude. The instantaneous energy within the band of interest at each time point is calculated. Based on the statistical characteristics of normal signal segments, it is determined whether the spectral energy at each time point is abnormal, generating a frequency domain outlier indicator matrix. In this embodiment of the invention, frequency domain analysis includes short-time Fourier transform; Specifically, for the sample matrix Performing short-time Fourier transforms on each channel yields the spectral energy time trajectory, represented as follows: in, For the first Window in line ,aisle The total energy of the bandpass, To select the set of frequency bands of interest, one or two fixed operating frequency bands (such as mid-to-high frequency bands that avoid power frequency and common harmonics) are directly selected based on the nominal bandwidth of the cables and sensors, previous test data and on-site noise conditions. The frequency points corresponding to these frequency bands are recorded as the set of frequency bands of interest at once.

[0038] Statistics based on normal segments , The outlier matrix in the frequency domain is constructed as follows: in, For frequency domain outlier indication, Here is the confidence coefficient. This is the second threshold.

[0039] The time-domain outlier indicator matrix and the frequency-domain outlier indicator matrix are weighted according to a preset formula. After fusion and binarization, the time-frequency fusion outlier prior matrix is ​​represented as follows: in, For the first The final prior matrix of the window. For binary thresholds, It contributes weights to the time and frequency domains.

[0040] It should be noted that by fusing outlier information in the time and frequency domains, the abnormal regions of fault signals can be accurately located, effectively improving fault detection accuracy and anti-interference capabilities, and enhancing the robustness of the model in complex noise environments.

[0041] In this embodiment of the invention, step S300 includes the following sub-steps C1-C6; In C1: The sample matrix is ​​input into the neural network for forward propagation to obtain a total feature map composed of stacked feature maps from multiple channels; In C2: the time-frequency fusion outlier prior matrix is ​​used as the query matrix in the attention mechanism; In C3: Non-linear mapping is performed on the feature maps of each channel in the total feature map, and aggregation is performed along the channel dimension to generate a key matrix with the same size as the query matrix. In C4: Calculate the distance between the query matrix and the key matrix, and then calculate the attention weight matrix based on the distance using a normalized exponential function; In C5: The attention weight matrix is ​​used to weight the feature map of each channel in the total feature map element by element to obtain the prior attention-enhanced features; In C6: Based on prior attention enhancement features, intermediate results required for fault ranging are output through regression prediction head.

[0042] In one alternative embodiment, the neural network can be a recurrent neural network, taking a sample matrix as the input sequence, with each window of samples arranged in chronological order. A Long Short-Term Memory (LSTM) network or a gated recurrent unit (GRU) is used as the feature extractor. Each window of samples is input into the LSTM / GRU network, and the hidden states are extracted step-by-step. The final output hidden states or the sequence of hidden states at each time step is used as the feature representation. In another alternative embodiment, the neural network can also be a Transformer network, taking the sample matrix as the input sequence, with each window of samples arranged in temporal order. A Transformer encoder structure is used, incorporating a multi-head self-attention mechanism and a feedforward neural network. Each window of samples is input into the Transformer encoder, and the encoder's output feature representation includes global temporal dependencies and inter-channel relationships. In this embodiment of the invention, the neural network includes a convolutional neural network (CNN). Specifically, the sample matrix Input CNN; Suppose a feature map of a certain layer of output channel stacking ,by For querying, average and max pooling are performed along the channel direction to form bonds. Represented as: in, The key matrix, As a weighting factor, For element-wise S-shaped mapping .

[0043] The attention expression, obtained by using "similarity = 1 - distance" and softmax normalization, is as follows: in, To and Attention weights of the same size It is a matrix of the same type, consisting entirely of 1s.

[0044] Each channel feature is represented element-wise with weights as follows: in, For the a priori enhanced first Channel characteristics, Multiply by Hadamard.

[0045] exist The two key time-to-date sample indices within the lightweight regression head prediction window are then represented as follows: in, These are the row indices of the first arrival and the first strong reflection within the window, respectively. , For parameters The return of the head.

[0046] It should be noted that by combining CNN with the attention mechanism, the accuracy and interpretability of fault signal feature extraction are effectively enhanced, and the ranging performance and reliability of the model in complex noisy environments are improved.

[0047] In this embodiment of the invention, step S400 includes the following sub-steps D1-D5; In D1: The local index of the regression prediction head within each analysis window is combined with the starting position offset of each window to restore the sample index on the global time series. In D2: The global sample indices of all windows are fused to obtain the global keypoint index; In D3: Multiply the global key point index by the sampling interval to convert it into a physical time value to obtain the actual arrival time of the fault key signal; In D4: By applying excitation to a cable calibration section of known physical length, the actual arrival time difference of the fault-critical signal is measured and the equivalent wave velocity is calculated; In D5: Based on the equivalent wave velocity and the actual arrival time difference of the critical fault signal calculated, the distance between the fault point and the measurement port is calculated according to the traveling wave ranging principle.

[0048] In this embodiment of the invention, restoring the in-window index to global sample points and robustly fusing them across all windows is represented as follows: in, Key point Global sample index, Offset to the start of the window.

[0049] Converted to physical time, it is expressed as: in, For critical time (seconds).

[0050] Equivalent propagation speed of cable It can be obtained from the calibration section: Among them, the left end The wave velocity (m / s) obtained from the calibration. To determine the physical length of the calibration segment, , To obtain the first arrival / reflection time from the calibration waveform using the above formula, The difference between the two.

[0051] The final distance measurement is expressed as: in, To estimate the distance from the fault to the port, The time difference between the first reflection and the first arrival.

[0052] It should be noted that by using the robust fusion window index and converting it to physical time, combined with the wave velocity obtained from the calibration segment, the fault distance can be accurately calculated, significantly improving the ranging accuracy and reliability, and adapting to complex noise environments.

[0053] In this embodiment of the invention, after completing steps D1-D5, step S400 also includes steps D6-D9; In D6: the consistency ratio between the attention weight matrix and the time-frequency fusion outlier prior matrix is ​​calculated as the confidence level of the ranging result; In D7: The confidence level is compared with a preset confidence threshold; In D8: If the confidence level is lower than the confidence level threshold, the binarization threshold used to generate the time-frequency fusion outlier prior matrix is ​​adjusted, and the construction of the time-domain outlier matrix and the frequency-domain outlier matrix is ​​re-executed based on the adjusted parameters. In D9: If the confidence level reaches or exceeds the confidence threshold, the final ranging result and the corresponding confidence level will be output.

[0054] In this embodiment of the invention, to provide the online ranging confidence level, the consistency confidence level is defined as follows: in, The confidence coefficient for distance measurement. For attention weights, To integrate prior knowledge.

[0055] If confidence level If the value is less than the confidence threshold, the binarization threshold used to generate the time-frequency fusion outlier prior matrix is ​​increased, and the time-domain outlier matrix and frequency-domain outlier matrix are reconstructed, and the process is repeated. If confidence level If the distance is greater than or equal to the confidence threshold, then output the estimated distance from the fault to the port. confidence coefficient of distance measurement .

[0056] The confidence threshold can be 0.5-0.7.

[0057] It should be noted that by quantifying the reliability of the ranging results and dynamically adjusting the parameters to optimize the ranging accuracy, the high confidence of the output results is ensured, thereby improving the reliability and adaptability of the model.

[0058] The above is a schematic scheme of a cable fault location method according to this embodiment. It should be noted that the technical solution of this cable fault location system and the technical solution of the above-described cable fault location method belong to the same concept. For details not described in detail in the technical solution of the cable fault location system in this embodiment, please refer to the description of the technical solution of the above-described cable fault location method.

[0059] The cable fault location system in this embodiment includes: The data processing module is used to acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct an original dataset based on the current signals, and process the original dataset to obtain a sample matrix. The matrix construction and fusion module is used to calculate the statistical characteristics of each channel of the normal signal segment in the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix respectively based on the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. The feature extraction module is used to extract features from the sample matrix based on the time-frequency fusion outlier prior matrix to obtain prior attention-enhanced features; The calculation module is used to calculate the ranging result of the fault based on the prior attention enhancement feature, quantify the ranging result to obtain the reliability of the ranging result, optimize the reliability, and output the final ranging result.

[0060] This embodiment also provides a computer device suitable for cable fault location, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a cable fault location method as described in the above embodiments.

[0061] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a cable fault location method as described in the above embodiments.

[0062] The storage medium proposed in this embodiment belongs to the same inventive concept as the cable fault location method proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0063] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computing device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0064] Example 2, refer to Figures 2-5 This embodiment differs from the first embodiment, and provides a verification test for a cable fault location method, verifying and explaining the technical effects used in this method.

[0065] For fault location scenarios involving 10kV cross-linked polyethylene insulated cables, the method of this invention is implemented, and the core parameters and operation procedures are as follows: like Figure 2 As shown, current signals are collected from four sensing channels (M=4, channel 1 corresponds to end A, channel 2 to end B, channel 3 to point C, and channel 4 to point D) at both ends (end A and end B) and two monitoring points (point C and point D) along the cable, with a set sampling interval. (Sampling frequency 100kHz), continuously acquiring discrete time intervals. 10,000 sampling points (T=10,000); Constructing the original dataset ,in This is the 4-channel current sample vector (unit: A) at time t. Marked as 0 (normal, the first 2000 sampling points, i.e.) ) or 1 (fault, ); Apply a sliding window to D ( , (Window width) Sampling points, step size The sampling points are stacked in rows according to time and columns according to channels to obtain a "visualized" sample matrix. (The nth window sample) finally generates the window sequence. ( ).

[0066] like Figure 3As shown, with normal index set Estimate the normal mean and standard deviation of each channel, and calculate the channel 1. , Channel 2 , Channel 3 , Channel 4 , Taking a confidence coefficient θ=3 (corresponding to a 99.72% confidence level), for each window... Constructing the outlier matrix in the time domain ,in If and only if ( ).

[0067] right Perform a short-time Fourier transform (STFT, with a Hanning window function and a window length of 16 sampling points) on a channel-by-channel basis. Select the 2kHz-5kHz frequency band, which avoids the power frequency (50Hz) and the third harmonic (150Hz), as the set of indexes for the frequency bands of interest, and calculate the total bandpass energy of each window row r and channel m. Based on the normal segment S statistical frequency domain mean (aisle W, Channel W, Channel W, Channel W) and standard deviation (aisle W, Channel 2 W, Channel 3 W, Channel f W), also take Constructing frequency domain outlier matrix Set time-domain contribution weights binary Generate the time-frequency fusion outlier prior matrix.

[0068] Will Input CNN (structure: input layer) Convolutional layer 1 (3×3 convolutional kernel, 16 output channels, ReLU activation) → A-CM module → Convolutional layer 2 (3×3 convolutional kernel, 32 output channels, ReLU activation) A-CM module Fully connected regression head), extracting the feature map output from convolutional layer 2. ,by To query Q, calculate according to channel direction. (σ is the S-shaped mapping), let the tradeoff coefficients be... Get key pass A 32×4 attention weight matrix is ​​generated, and then multiplied by Hadamard to obtain the prior enhanced feature map. Att ( ), Input with parameters Regression head (initialized learning rate 0.0001, batch size 100) First wave arrival index within the prediction window n) and reflected wave index .

[0069] like Figure 4 As shown, robust fusion is performed on all windows, and a global sample index is calculated. n n))(k=1,2), the key to conversion is when μs, a 1000m long cable calibration section was selected ( ), t is calculated from the calibration waveform. ms, t =1.8ms, l , calibrating wave speed Finally, according to Calculate the distance to the fault.

[0070] Calculate the consistency confidence score: set up If <0.6, then Increase the value to 0.7 and recalculate the steps. If γ ≥ 0.6, output the fault location result L and the confidence coefficient γ.

[0071] like Figure 5 As shown, under all tested noise intensities, the ranging error of the method of the present invention is consistently lower than that of the other three comparative methods, indicating that its comprehensive noise resistance and ranging accuracy have significant advantages.

[0072] Especially in high-noise environments, the errors of traditional CNN, SE-Net and MCNN methods rise sharply, while the error growth of the method of this invention is relatively slow and maintains good stability. This proves that its design of integrating time-frequency priors and attention mechanisms effectively suppresses strong noise interference.

[0073] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for cable fault location, characterized in that, include: Acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct an original dataset based on the current signals, and process the original dataset to obtain a sample matrix; Calculate the statistical characteristics of each channel in the normal signal segment of the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix based on the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. Based on the time-frequency fusion outlier prior matrix, feature extraction is performed on the sample matrix to obtain prior attention enhancement features; Based on the prior attention enhancement features, the ranging result of the fault is calculated, the ranging result is quantified to obtain the reliability of the ranging result, the reliability is optimized, and the final ranging result is output.

2. The cable fault location method as described in claim 1, characterized in that, Data processing of the original dataset includes: Acquire multi-channel current signals from monitoring points at both ends and midway of the cable, discretize them according to the set sampling interval, and construct an original dataset containing the sample vector of each channel at each discrete time and the corresponding state label; The original dataset is windowed, and the data in each window are stacked in order to obtain a two-dimensional sample matrix.

3. The cable fault location method as described in claim 2, characterized in that, Constructing the time-domain outlier matrix includes: Based on the normal signal segment, calculate the mean and standard deviation of the current signal for each channel; The current value of each data point in the sample matrix is ​​compared with the mean value of the corresponding channel for the first judgment. Set the first threshold based on the standard deviation and confidence coefficient; If the deviation of the current value of each data point from the mean of the corresponding channel is greater than the first threshold, the corresponding data point will be marked as abnormal. Otherwise, mark the corresponding data point as normal; For data points marked as outliers, a binary indicator matrix with the same size as the sample matrix is ​​generated as the time-domain outlier matrix.

4. The cable fault location method as described in claim 3, characterized in that, Constructing the frequency domain outlier matrix includes: Frequency domain analysis is performed on the data of each channel in each sample matrix to calculate the signal energy in multiple preset interest frequency bands, and the spectral energy time trajectory of each channel at different time points is obtained. Based on the normal signal segment, calculate the mean and standard deviation of the spectral energy of each channel; A second threshold is set based on the standard deviation and confidence coefficient of the spectral energy of each channel; If the deviation between the spectral energy time trajectory of each channel at different time points and the mean spectral energy of each channel is greater than the second threshold, the corresponding spectral energy is marked as an anomaly, and a binary frequency domain outlier indicator matrix is ​​generated. The time-domain outlier indicator matrix and the frequency-domain outlier indicator matrix are linearly combined according to preset weights and compared with a binarization threshold to generate a time-frequency fusion outlier prior matrix.

5. The cable fault location method as described in claim 4, characterized in that, Feature extraction of the sample matrix includes: The sample matrix is ​​input into the neural network for forward propagation to obtain a total feature map composed of stacked feature maps from multiple channels. The time-frequency fusion outlier prior matrix is ​​used as the query matrix in the attention mechanism; A non-linear mapping is performed on the feature map of each channel in the overall feature map, and an aggregation operation is performed along the channel dimension to generate a key matrix with the same size as the query matrix. Calculate the distance between the query matrix and the key matrix, and then calculate the attention weight matrix based on the distance using a normalized exponential function; The attention weight matrix is ​​used to weight the feature map of each channel in the total feature map element by element to obtain the prior attention-enhanced features. Based on prior attention enhancement features, intermediate results required for fault location are output through a regression prediction head.

6. A cable fault location method as described in claim 1 or 5, characterized in that, The fault ranging results calculated include: The local index of the regression prediction head within each analysis window is combined with the starting position offset of each window to restore the sample index on the global time series. The global sample indices of all windows are fused to obtain the global keypoint index; Multiply the global key point index by the sampling interval to convert it into a physical time value, and obtain the actual arrival time of the fault key signal; By applying excitation to a cable calibration section of known physical length, the actual arrival time difference of the fault-critical signal is measured and the equivalent wave velocity is calculated. Based on the equivalent wave velocity and the calculated actual arrival time difference of the critical fault signal, the distance between the fault point and the measurement port is calculated according to the traveling wave ranging principle.

7. The cable fault location method as described in claim 6, characterized in that, The final ranging results are output as follows: The consistency ratio between the attention weight matrix and the time-frequency fusion outlier prior matrix is ​​calculated and used as the confidence level of the ranging result. The confidence level is compared with a preset confidence threshold. If the confidence level is lower than the confidence level threshold, the binarization threshold used to generate the time-frequency fusion outlier prior matrix is ​​adjusted, and the construction of the time-domain outlier matrix and the frequency-domain outlier matrix is ​​re-executed based on the adjusted parameters. If the confidence level reaches or exceeds the confidence threshold, the final ranging result and the corresponding confidence level will be output.

8. A cable fault location system, employing a cable fault location method as described in any one of claims 1 to 7, characterized in that, include: The data processing module is used to acquire the current signals of the normal signal segment and the fault signal segment of the cable, construct an original dataset based on the current signals, and process the original dataset to obtain a sample matrix. The matrix construction and fusion module is used to calculate the statistical characteristics of each channel of the normal signal segment in the sample matrix, construct the time-domain outlier matrix and the frequency-domain outlier matrix respectively based on the statistical characteristics, and fuse the time-domain outlier matrix and the frequency-domain outlier matrix to obtain the time-frequency fused outlier prior matrix. The feature extraction module is used to extract features from the sample matrix based on the time-frequency fusion outlier prior matrix to obtain prior attention-enhanced features; The calculation module is used to calculate the ranging result of the fault based on the prior attention enhancement feature, quantify the ranging result to obtain the reliability of the ranging result, optimize the reliability, and output the final ranging result.

9. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the cable fault location method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the steps of the cable fault location method according to any one of claims 1 to 7.