Data processing-based wiring error visual analysis method and system
By collecting and processing meter wiring data in real time, using the CNN-BiLSTM-GWO-SVM model to identify wiring errors, and combining it with a 3D topology map and heat map for display, the problem of low efficiency and low accuracy in traditional methods is solved, achieving efficient and accurate wiring error detection.
Patent Information
- Application Number
- CN202511493087.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Traditional methods for detecting wiring errors in electricity meters rely on manual inspection, which is inefficient and prone to missing errors. Existing wiring error analysis methods have low accuracy and slow analysis efficiency, and cannot meet the requirements of smart grids for wiring accuracy and real-time performance.
The system collects real-time wiring data from electricity meters using sensors, performs noise reduction, normalization, and outlier processing, extracts wiring features, uses a CNN-BiLSTM-GWO-SVM model to identify wiring error types, and displays the error location and type through a linkage between a 3D topology map and a heat map.
It enables accurate identification and intuitive display of wiring errors, improves detection efficiency and accuracy, reduces measurement errors and safety accidents, and lowers the difficulty of operation.
Smart Images

Figure CN120972045B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment testing technology, specifically to a data processing-based visualization analysis method and system for wiring errors. Background Technology
[0002] In power systems, meter wiring errors are a common problem that can lead to inaccurate metering, equipment damage, and even safety accidents. Traditional wiring error detection methods mainly rely on manual inspection, which is inefficient and prone to missing errors. With the development of smart grids, the requirements for the accuracy and real-time performance of meter wiring are becoming increasingly stringent, thus necessitating an efficient and accurate wiring error analysis method. Currently, existing wiring error analysis methods are mainly based on simple rule-based judgments or single algorithm models, which suffer from low recognition accuracy and slow analysis efficiency. Summary of the Invention
[0003] The purpose of this invention is to solve the above problems by designing a data processing-based visualization analysis method and system for wiring errors.
[0004] The first aspect of this invention provides a method for visual analysis of wiring errors based on data processing, the method comprising the following steps:
[0005] The meter wiring data is collected in real time by sensors, and the meter wiring data includes at least voltage, current and phase.
[0006] The collected meter wiring data is subjected to noise reduction, normalization, and outlier handling to obtain preprocessed data.
[0007] Extract wiring features from the preprocessed data, where the wiring features include at least wiring pattern and current and voltage features;
[0008] The wiring features are input into the CNN-BiLSTM-GWO-SVM model to analyze the extracted wiring features and identify wiring error types, which include at least short circuit, open circuit and reverse connection.
[0009] The location and type of wiring error are displayed by linking a 3D topology map with a heat map.
[0010] Optionally, in a first implementation of the first aspect of the present invention, the step of performing noise reduction, normalization, and outlier processing on the collected meter wiring data to obtain preprocessed data includes:
[0011] The db4 wavelet basis is used to decompose the meter wiring data into multiple scales to obtain the approximation coefficients and detail coefficients at each scale. The threshold is dynamically adjusted by the BayesShrink algorithm.
[0012] The detail coefficients are processed using a soft thresholding function and then subjected to inverse wavelet transform to complete the denoising process.
[0013] Based on the data sampling frequency and the dynamic response characteristics of the wiring system, the initial window length is set to 100 sampling points. A dynamic step size mechanism is adopted, with the step size being 1 sampling point when the signal change rate exceeds the preset threshold, and otherwise the step size being 10 sampling points.
[0014] For the time series data within each sliding window, the maximum and minimum values of the current window are calculated in real time and normalized and mapped.
[0015] The denoised and normalized time-series data is input into the isolated forest to identify outliers, and the outliers are processed to obtain preprocessed data.
[0016] Optionally, in a second implementation of the first aspect of the present invention, the step of inputting the denoised and normalized time-series data into an isolated forest to identify outliers and processing the outliers to obtain preprocessed data includes:
[0017] The time series data after denoising and normalization is used as samples by the feature vectors within the sliding window. 100 isolated trees are set up, and 256 samples are randomly selected for training in each tree. The maximum depth of the tree is 8.
[0018] For each sample, calculate its average path length in all isolated trees and convert it into an anomaly score. When the anomaly score is greater than 0.7, it is identified as an anomaly.
[0019] Continuous anomalies are identified as genuine wiring errors, while isolated anomalies are identified as interference. Cubic spline interpolation is used for repair.
[0020] Optionally, in a third implementation of the first aspect of the present invention, the step of extracting wiring features from the preprocessed data includes:
[0021] Based on the fluctuation characteristics of the preprocessed data, a dual-window mechanism is adopted, in which the main window captures short- and medium-term trends, and the sub-window captures instantaneous changes.
[0022] For the time series data including voltage, current and phase in each main window, statistical features are calculated, and mutual information is used to filter the statistical features to obtain the final statistical features. The statistical features include at least basic statistics, time series trend features and sub-window aggregation features.
[0023] FFT transformation was performed on the preprocessed data to extract fundamental and harmonic features. The db6 wavelet packet was selected to perform a 4-level decomposition on the preprocessed data to obtain 16 frequency bands. The energy proportion and frequency band entropy of each frequency band were calculated.
[0024] The dimensional features extracted by FFT are concatenated with the features extracted by wavelet packets, and the frequency domain features are obtained by dimensionality reduction through principal component analysis.
[0025] Hilbert transform is introduced, and a dual-clamp volt-ampere phase table algorithm is used to extract phase features. The meter wiring topology is represented as a graph structure, and topological features are extracted through a graph convolutional network.
[0026] The final wiring characteristics are obtained by combining statistical characteristics, frequency domain characteristics, phase characteristics, and topological characteristics.
[0027] Optionally, in a fourth implementation of the first aspect of the present invention, the introduction of Hilbert transform uses a dual-clamp volt-ampere phase table algorithm to extract phase features, represents the meter wiring topology as a graph structure, and extracts topological features through a graph convolutional network, including:
[0028] The preprocessed data is decomposed using EMD to obtain several IMFs and residual terms. The IMFs are then screened using the correlation coefficient method.
[0029] Perform Hilbert transform on each valid IMF to obtain the analytical signal, and calculate the instantaneous phase and instantaneous frequency. Extract the mean and standard deviation of the instantaneous phase, the deviation of the instantaneous frequency from the fundamental frequency, and the phase-frequency coupling coefficient.
[0030] Based on the dual-clamp volt-ampere phase meter algorithm, the phase difference between voltage and current in the same phase, the phase difference between three-phase voltages, and the phase difference between three-phase voltages are calculated, and the phase difference is smoothed by moving average filtering.
[0031] The results obtained from the Hilbert transform and the results obtained from the dual-clamp volt-ampere phase table algorithm are fused to obtain the final phase characteristics;
[0032] By using meters, circuit breakers, transformers, and terminals as graph nodes and physical connection lines as graph edges, a graph structure is obtained. This structure is then input into a graph convolutional network, where convolution and pooling processes are used to obtain topological features.
[0033] Optionally, in a fifth implementation of the first aspect of the present invention, the step of inputting the wiring features into the CNN-BiLSTM-GWO-SVM model, analyzing the extracted wiring features, and identifying the wiring error type includes:
[0034] The wiring features are converted into a two-dimensional feature matrix and input into the CNN-BiLSTM-GWO-SVM model. The features are captured by three convolutional layers in the CNN network, and then the features are reduced in dimensionality by a max pooling layer to output a local feature vector. Each convolutional layer is followed by a ReLU activation function.
[0035] The local feature vectors output by the CNN network are input into the BiLSTM network to capture the temporal dependencies in the features. By concatenating the feature vectors output by the two sub-networks, the forward LSTM and the backward LSTM, a comprehensive feature vector is obtained.
[0036] The comprehensive feature vector output by the BiLSTM network is fused and dimensionality reduced. The dimensionality-reduced feature vector is then input into an SVM with optimized parameters using the GWO algorithm. The input features are mapped to a high-dimensional feature space using the RBF function. Based on the optimized penalty factor and kernel function parameters, the optimal classification hyperplane is found in the high-dimensional space. Based on the position of the input features relative to the hyperplane, the corresponding wiring error type is output.
[0037] Optionally, in a sixth implementation of the first aspect of the present invention, the optimization process of the GWO algorithm includes the following steps:
[0038] The parameters to be optimized are determined to be the penalty factor and kernel function parameters of SVM, and the parameter search range is set. 30 gray wolves are initialized, with each wolf representing a set of parameter combinations.
[0039] Calculate the fitness of each wolf and select the best, second-best, and third-best solutions with the highest fitness. Update the positions of other wolves by simulating the behavior of gray wolf packs tracking, surrounding, and attacking prey.
[0040] After 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of the SVM.
[0041] A second aspect of the present invention provides a data processing-based wiring error visualization and analysis system, the system comprising:
[0042] The data acquisition model is used to collect meter wiring data in real time through sensors, wherein the meter wiring data includes at least voltage, current and phase;
[0043] The preprocessing model is used to perform noise reduction, normalization, and outlier handling on the collected meter wiring data to obtain preprocessed data.
[0044] A feature extraction model is used to extract wiring features from preprocessed data, wherein the wiring features include at least wiring patterns and current and voltage features.
[0045] The identification model is used to input wiring features into the CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features, and identify wiring error types, which include at least short circuit, open circuit, and reverse connection.
[0046] A visualization model is used to visualize the location and type of wiring errors by linking a 3D topology map with a heat map.
[0047] A third aspect of the present invention provides a data processing-based wiring error visualization analysis device, the data processing-based wiring error visualization analysis device comprising a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to cause the data processing-based wiring error visualization analysis device to perform the various steps of the data processing-based wiring error visualization analysis method as described in any of the preceding claims.
[0048] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the data processing-based wiring error visualization analysis method as described in any of the preceding claims.
[0049] The technical solution provided by this invention involves real-time acquisition of meter wiring data via sensors. The acquired wiring data undergoes denoising, normalization, and outlier handling to obtain preprocessed data. Wiring features are extracted from the preprocessed data and input into a CNN-BiLSTM-GWO-SVM model for analysis. This identifies wiring error types and visualizes the error location and type through a 3D topology map linked with a heatmap. This invention achieves accurate identification and intuitive display of wiring errors, and can be widely applied in meter wiring inspection in power systems. It improves inspection efficiency and accuracy, reduces metering errors and safety accidents caused by wiring errors, and the visualized display facilitates quick problem location and resolution for users, reducing operational difficulty. Attached Figure Description
[0050] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.
[0051] Figure 1 A flowchart of a data processing-based wiring error visualization analysis method provided in an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of the structure of a data processing-based wiring error visualization analysis system provided in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of the structure of a wiring error visualization analysis device based on data processing provided in an embodiment of the present invention. Detailed Implementation
[0054] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0055] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 A flowchart of a wiring error visualization analysis method based on data processing provided in this embodiment of the invention is shown. The method specifically includes the following steps:
[0056] Step 101: Collect meter wiring data in real time using sensors, where the meter wiring data includes at least voltage, current and phase;
[0057] In this embodiment, high-precision Hall voltage sensors, Hall current sensors, and high-precision phase sensors are used to collect meter wiring data in real time. The voltage and current sensors accurately capture the dynamic changes of voltage and current signals at a sampling frequency of 1kHz, ensuring timely acquisition of critical information such as sudden current increases during short circuits and sudden current drops during open circuits. The phase sensor is specifically used to collect phase difference data between voltage and current, with a measurement accuracy of up to 0.1°, which can keenly detect phase anomalies that may be caused by wiring errors. The collected data covers the voltage, current, and phase information of the meter wiring under different operating conditions.
[0058] Step 102: Perform noise reduction, normalization, and outlier handling on the collected meter wiring data to obtain preprocessed data;
[0059] In this embodiment, the original signal from the meter wiring is decomposed using multi-scale wavelet decomposition to obtain approximation coefficients and detail coefficients for different frequency bands. Then, the highest frequency detail coefficient is selected as the dominant noise component, and its median absolute value is calculated to estimate the noise standard deviation. Subsequently, based on the Bayesian minimum mean square error criterion, an optimal threshold is dynamically calculated for the detail coefficients of each decomposition layer. This threshold is determined by both the noise standard deviation and the standard deviation of the detail coefficients at that layer, ensuring that the threshold adapts to the signal frequency band characteristics and noise intensity. Finally, this dynamic threshold is used to perform soft thresholding on the detail coefficients of each layer, effectively filtering out high-frequency noise while preserving, to the greatest extent possible, the characteristic abrupt changes during wiring faults, such as current spikes during short circuits and voltage drops during open circuits, improving the purity and integrity of the key features of the denoised signal. This process is based on the data sampling frequency and the wiring system. To assess the dynamic response characteristics, an initial window length of 100 sampling points was set, employing a dynamic step-size mechanism. The step size was 1 sampling point when the signal change rate exceeded a preset threshold, and 10 sampling points otherwise. For the time-series data within each sliding window, the maximum and minimum values of the current window were calculated in real-time and normalized. The denoised and normalized time-series data, using the feature vectors within the sliding window as samples, was used to create 100 isolated trees. Each tree randomly selected 256 samples for training, with a maximum tree depth of 8. For each sample, its average path length across all isolated trees was calculated and converted into an anomaly score. An anomaly score greater than 0.7 was considered an anomaly. Continuous anomalies were identified as genuine wiring errors, while isolated anomalies were identified as interference. Cubic spline interpolation was used for repair, resulting in preprocessed data.
[0060] Step 103: Extract wiring features from the preprocessed data, wherein the wiring features include at least the wiring pattern and current and voltage features;
[0061] In this embodiment, a dual-window mechanism is adopted based on the fluctuation characteristics of the preprocessed data. The main window captures short- to medium-term trends, while the sub-window captures instantaneous changes. The main window is set to a length of 500 sampling points corresponding to 0.5 seconds, covering 5 power frequency cycles. By continuously sliding and covering the time series data, it captures the short- to medium-term changing trends of parameters such as voltage, current, and phase, such as voltage changes caused by slow load changes. The sub-window is nested inside the main window and has a length of 50 sampling points corresponding to 0.05 seconds. It tracks instantaneous changes in data with higher time resolution, such as instantaneous current drops caused by loose wiring or voltage spikes caused by poor contact. The synergistic effect of the dual windows can take into account both trend and sudden features.
[0062] The main window is designed to comprehensively and efficiently capture short- to medium-term trends. Its sliding step is set to 100 sampling points, meaning that each slide processes a new segment of 100 sampling points, gradually covering the time-series data. The sub-window is nested within the main window, with a length of 50 sampling points, corresponding to 0.05 seconds. The sub-window's sliding step is 10 sampling points, allowing for more precise tracking of instantaneous data changes at a higher temporal resolution. Together, they extract trend-based and sudden data transition features.
[0063] For each main window containing time-series data including voltage, current, and phase, statistical features are calculated and filtered using mutual information to obtain the final statistical features. These features include at least basic statistics, time-series trend features, and sub-window aggregation features. Basic statistics cover mean, median, standard deviation, range, kurtosis, and skewness, reflecting the central tendency, dispersion, and distribution pattern of the data, respectively. For example, the kurtosis of the current increases significantly during a short circuit. Time-series trend features include the linear fitting slope, the first difference of the moving average, the number of zero crossings, and the length of the maximum continuous rise and fall segment, used to capture the overall direction of data change and fluctuation patterns. Sub-window aggregation features are obtained by taking the maximum, minimum, and mean values of the above basic statistics in the 10 sub-windows contained in the main window, thus preserving local features of instantaneous changes. Subsequently, a mutual information algorithm is used to filter all statistical features, retaining features with mutual information values higher than 0.3 related to wiring error types such as short circuits and open circuits. This ultimately forms a statistical feature set that reflects both the overall trend and local details.
[0064] When using mutual information to filter statistical features, the specific calculation process is as follows: First, the wiring error type (such as short circuit, open circuit, etc.) is taken as the target variable. Y The calculated statistical characteristics are used as characteristic variables. X For each pair ( X , Y ), by calculating their joint probability distribution P ( X , Y and marginal probability distribution P ( X ) and P ( Y The mutual information value is calculated using the mutual information formula:
[0065] ;
[0066] The selection threshold was set based on the findings from extensive experiments and data analysis. When the mutual information value is higher than 0.3, this statistical feature shows a strong correlation with wiring error types. If the mutual information value is lower than this threshold, it indicates that the feature contributes little to distinguishing wiring error types and may contain a lot of noise or irrelevant information. Therefore, statistical features with mutual information values higher than 0.3 are retained, while those lower are removed, ultimately forming a set of statistical features that reflects both overall trends and local details, and is closely related to wiring error types.
[0067] The preprocessed data is subjected to FFT transformation to extract fundamental and harmonic features. The db6 wavelet packet is used to perform a four-level decomposition of the preprocessed data, resulting in 16 frequency bands. The energy proportion and entropy of each band are calculated. Fundamental features include the fundamental frequency (50Hz or 60Hz), fundamental amplitude, and fundamental phase, used to determine the basic stability of the power signal. Harmonic features cover the amplitude proportions of the 2nd to 5th harmonics, the ratio of each harmonic amplitude to the fundamental amplitude, and the total harmonic distortion (THD), used to identify waveform distortions that may be caused by wiring errors. Simultaneously, the db6 wavelet packet is used to perform a four-level decomposition of the preprocessed data, resulting in 16 continuous frequency bands covering 0-500Hz. The energy proportion of each band (the ratio of its energy to the total energy) and the band entropy are calculated based on the Shannon entropy of the energy proportion. The energy proportion reflects the signal distribution characteristics at different frequencies, while the band entropy reflects the degree of disorder in the frequency distribution. The dimensionality features extracted by FFT are concatenated with those extracted by wavelet packets, and principal component analysis is used to reduce the dimensionality and obtain the frequency domain features.
[0068] The preprocessed data is decomposed using EMD to obtain several IMFs and residual terms. IMFs are then selected using the correlation coefficient method. For each valid IMF, a Hilbert transform is performed to obtain the analytical signal, and the instantaneous phase and frequency are calculated. The mean and standard deviation of the instantaneous phase, the deviation of the instantaneous frequency from the fundamental frequency, and the phase-frequency coupling coefficient are extracted. Based on the dual-clamp voltammeter phase table algorithm, the phase difference between voltage and current within the same phase, the phase difference between three-phase voltages, and the phase difference between three-phase voltages are calculated. A moving average filter is used to smooth the phase differences. The results obtained from the Hilbert transform and the dual-clamp voltammeter phase table algorithm are fused to obtain the final phase characteristics.
[0069] The dual-clamp volt-ampere phase meter algorithm is an effective method for accurately measuring the phase relationship of electrical signals. This algorithm uses two clamp-on current transformers, one at the voltage end and the other at the current end of the circuit under test, to simultaneously acquire voltage and current signals. After obtaining the discrete sequence of the signal using high-speed sampling technology, digital signal processing techniques, such as Fast Fourier Transform (FFT), are employed to convert the time-domain signal into a frequency-domain signal. By analyzing the phase spectra of voltage and current in the frequency domain, the phase difference between voltage and current within the same phase, as well as the phase differences between three-phase voltages and three-phase currents, are directly calculated, providing crucial data for subsequent phase characteristic analysis.
[0070] The phase-frequency coupling coefficient is used to quantify the correlation between instantaneous phase and instantaneous frequency. After obtaining the instantaneous phase and instantaneous frequency of each effective IMF through Hilbert transform, the coefficient is calculated using cross-correlation analysis. Specifically, the instantaneous phase and instantaneous frequency sequences are standardized to eliminate the influence of dimensions, and then their cross-correlation function is calculated. By selecting an appropriate lag point, the maximum value of the cross-correlation function is obtained, and this maximum value, after normalization, becomes the phase-frequency coupling coefficient. Its value ranges from 0 to 1; the closer the value is to 1, the tighter the coupling relationship between the instantaneous phase and instantaneous frequency, and the more effectively it reflects the dynamic interaction characteristics of phase and frequency in the signal.
[0071] Connection reliability weights are used to measure the stability of wire connections between devices. They are calculated based on historical fault data, by statistically analyzing the number of faults, fault types, and severity at a particular wire connection within a specific time period. The frequency of fault occurrence and the scope of impact are quantified and comprehensively calculated to obtain a weight value within the range of 0-1. The closer the weight is to 1, the more reliable the connection; the closer it is to 0, the worse the connection reliability, providing a crucial reference for assessing wiring quality.
[0072] The final wiring characteristics are obtained by defining core equipment such as meters, circuit breakers, transformers, and terminals as nodes in a graph structure. Each node is assigned a multi-dimensional attribute vector containing the equipment type (represented by a unique hot code), rated voltage, rated current, real-time monitored voltage value, real-time monitored current value, and an operating status indicator (normal / abnormal). Simultaneously, the physical wires connecting these devices are defined as edges of the graph. Each edge's attributes include the impedance parameter corresponding to the wire type, actual length, real-time measured current value, voltage difference between the two ends, and a connection reliability weight range of 0-1 calculated based on historical fault data. Based on the above node and edge definitions, a weighted adjacency matrix is constructed to quantify the connection strength between nodes. This leads to a complete graph structure. The graph structure is then input into a graph convolutional network. First, through the first convolutional layer, combining the adjacency matrix and node attribute vectors, the local features of each node are calculated, fusing its own attributes with the association information of neighboring nodes. Then, the second convolutional layer further deepens feature extraction, capturing a wider range of inter-node dependencies. Finally, through global average pooling, the features of all nodes are aggregated into a fixed-dimensional vector, which is the topological feature that comprehensively reflects the rationality of the overall topology of the meter wiring. This feature effectively characterizes key information such as the compactness of node connections, the impedance matching degree of critical paths, and the symmetry of three-phase nodes. This is combined with statistical features, frequency domain features, phase features, and topological features.
[0073] The graph convolutional network used has a two-layer structure. The first convolutional layer employs a spatial domain-based approach, using a weighted adjacency matrix as a guide and combining it with node attribute vectors for computation. Specifically, for each target node, its own attribute vector and the attribute vectors of its neighboring nodes are weighted and summed according to the corresponding connection strength in the adjacency matrix, thus fusing the association information between its own attributes and neighboring nodes to obtain the local features of each node. The second convolutional layer is also based on the spatial domain, further deepening feature extraction based on the local features obtained in the first layer. It captures a wider range of inter-node dependencies through a more complex weighted aggregation method, expanding the receptive field so that the node features can cover a larger range of graph structure information. After these two convolutional layers, a global average pooling operation aggregates the features of all nodes into a fixed-dimensional vector, which is the topological feature that comprehensively reflects the rationality of the overall topological structure of the meter wiring.
[0074] Step 104: Input the wiring features into the CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features, and identify the wiring error types, which include at least short circuit, open circuit, and reverse connection.
[0075] In this embodiment, the wiring features are converted into a two-dimensional feature matrix and input into the CNN-BiLSTM-GWO-SVM model. The CNN network is used to enhance the local features of the adjusted two-dimensional feature matrix. The features are processed sequentially through three convolutional layers: the first layer uses 16 3×1 convolutional kernels to perform sliding convolution on the feature matrix to capture the local correlation between adjacent features, such as the coupling relationship between voltage and current features; the second layer uses 32 2×1 convolutional kernels to further extract deeper local feature patterns; the third layer uses 64 1×1 convolutional kernels to compress the feature dimension while retaining key local information; a ReLU activation function is applied after each convolutional layer to enhance the nonlinear fitting ability of the model, and then the features are reduced in dimensionality by a max pooling layer with a pooling window of 2×1 to reduce redundant information. Finally, a 64-dimensional feature vector with local enhancement is output.
[0076] The local feature vectors output by the CNN network are input into the BiLSTM network to capture the temporal dependencies in the features. The BiLSTM consists of two sub-networks: a forward LSTM and a backward LSTM. The forward LSTM processes the feature sequence in chronological order from early to late to capture the influence of historical features on the current state. The backward LSTM processes the feature sequence in reverse chronological order from late to early to capture the influence of future features on the current state. The hidden layers of both sub-networks have 64 neurons. The memory and forgetting of features are dynamically adjusted through gating mechanisms such as input gate, forget gate, and output gate. Finally, the feature vectors output by the forward and backward networks are concatenated to obtain a 128-dimensional comprehensive feature vector containing complete temporal relationships.
[0077] The comprehensive feature vector output by the BiLSTM network is fused and dimensionality reduced. The dimensionality-reduced feature vector is then input into an SVM with optimized parameters using the GWO algorithm. The input features are mapped to a high-dimensional feature space using the RBF function. Based on the optimized penalty factor and kernel function parameters, the optimal classification hyperplane is found in the high-dimensional space. Based on the position of the input features relative to the hyperplane, the corresponding wiring error type is output.
[0078] In this model, the specific parameter settings for the three convolutional kernels of the CNN are as follows: The first layer uses 16 3×1 convolutional kernels with a stride of 1 and zero padding of 1. This ensures that the feature matrix size remains relatively stable after processing by this layer during sliding convolution, while effectively capturing local correlations between adjacent features, such as the coupling relationship between voltage and current features. The second layer uses 32 2×1 convolutional kernels with a stride of 1 and zero padding of 0.5 (rounded up to 1), further extracting deeper local feature patterns. The third layer uses 64 1×1 convolutional kernels with a stride of 1 and zero padding of 0, compressing the feature dimension while retaining key local information. Each convolutional layer is followed by a ReLU activation function to enhance the model's non-linear fitting ability. Then, a max pooling layer (pooling window of 2×1, stride of 2) is used to reduce the dimensionality of the features, reducing redundant information, and finally outputting a locally enhanced 64-dimensional feature vector.
[0079] The BiLSTM network comprises two sub-networks: a forward LSTM and a backward LSTM. To fully capture the temporal dependencies in the features, each sub-network has 64 neurons in its hidden layer. The forward LSTM processes the feature sequence chronologically from earliest to latest, capturing the influence of historical features on the current state; the backward LSTM processes the feature sequence in reverse chronological order from latest to earliest, capturing the influence of future features on the current state. The gating mechanism dynamically adjusts the memory and forgetting of features through input, forget, and output gates. Finally, the feature vectors from the forward and backward outputs are concatenated to obtain a 128-dimensional comprehensive feature vector containing complete temporal relationships.
[0080] The dimensionality of the 128-dimensional comprehensive feature vector output by the BiLSTM network is reduced by fusing and dimensionality reduction. Principal component analysis (PCA) is used to select the top 32 principal components based on the contribution rate of the eigenvalues, reducing the feature vector to 32 dimensions to reduce computation and improve model efficiency.
[0081] The training process of the CNN-BiLSTM-GWO-SVM model involves inputting the dimensionality-reduced 32-dimensional feature vector into the SVM whose parameters are optimized using the GWO algorithm. First, the parameters to be optimized are determined as the penalty factor and kernel function parameters of the SVM, and the parameter search range is set. Thirty individual gray wolves are initialized, each representing a set of parameter combinations. The fitness of each wolf is calculated, and the optimal, second-best, and third-best solutions are selected based on the model's classification accuracy on the validation set. The behavior of a gray wolf pack tracking, surrounding, and attacking prey is simulated to update the positions of other wolves. After 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of the SVM. Finally, the entire hybrid model is trained using the training set, employing the cross-entropy loss function and stochastic gradient descent (SGD) optimization algorithm. The learning rate is set to 0.01, the batch size to 32, and the number of training epochs to 100, until the model converges.
[0082] In this embodiment, the parameters to be optimized are determined to be the penalty factor and kernel function parameters of SVM, and the parameter search range is set. Thirty individual gray wolves are initialized, with each wolf representing a set of parameter combinations. The fitness of each wolf is calculated, and the optimal, second-best, and third-best solutions with the highest fitness are selected. The positions of other wolves are updated by simulating the behavior of gray wolf packs tracking, surrounding, and attacking prey. After 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of SVM.
[0083] In the gray wolf optimization algorithm, let the position of the individual gray wolf be... X Optimal solution ( α Wolf), suboptimal solution ( β (wolf) and the third optimal solution ( δ The positions of the wolves are respectively Xα , Xβ , Xδ Other wolves ( ω The wolf's position update formula is:
[0084] ;
[0085] in, Dα for ω The distance between the wolf and the alpha wolf. Dβ for ω wolves and β The distance of the wolves Dδ for ω wolves and δ The distance of the wolves A and C It is a coefficient vector. t Let X(t+1) be the current iteration number. X(t+1) represents the position of the ω-th wolf updated according to the above step size.
[0086] Convergence factor aIt plays a crucial role in the algorithm's iterative process, controlling the shift from global exploration to local development. Its calculation formula is:
[0087] ;
[0088] in, T The maximum number of iterations set for the algorithm. In the initial stage of the algorithm, t Smaller a The value is close to 2, at which point A The vector has a large range of values, giving the algorithm strong global exploration capabilities, enabling it to search extensively for potential optimal solutions within the search space. As the number of iterations increases, t Gradually increase a The value decreases linearly to 0. A With the vector's range of values reduced, the algorithm focuses on local exploration, performing a fine search on the regions where better solutions have been discovered, in order to improve the accuracy of the solutions.
[0089] Step 105: Display the location and type of wiring error by linking the 3D topology map and heat map.
[0090] In this embodiment, a 3D topology map proportional to the actual meter wiring structure is constructed to accurately reproduce the physical layout of terminals, wire routes, and equipment connections. Each wiring node and wire segment is assigned an independent identification code. Simultaneously, a dynamic heatmap is generated based on error identification results, presenting different types of wiring errors, such as short circuits, open circuits, and reverse connections, with differentiated color gradients. Short circuit areas are highlighted in bright red, open circuit locations are marked in dark blue, and reversed phase connections are indicated by flashing yellow. The intensity of the heatmap value is positively correlated with the severity of the error. Through a real-time linkage mechanism between the 3D topology map and the heatmap, when a user clicks on any highlighted area in the 3D map, the heatmap simultaneously zooms in on the corresponding local area and pops up a detailed information box, clearly explaining the error type, duration, and associated equipment parameters. Conversely, selecting a color block in the heatmap automatically locates the error in the 3D map and guides the user with a dynamic arrow, while hiding irrelevant areas to focus on the displayed area. This allows users to grasp the overall distribution of wiring errors macroscopically and quickly locate specific fault points and types, significantly improving troubleshooting efficiency.
[0091] In the power monitoring system of a large commercial complex, a data processing-based visualization analysis method for wiring errors was adopted to monitor and identify meter wiring errors in real time, ensuring power safety and stability. This commercial complex contains numerous shops, office areas, and public facilities, with a complex and diverse range of electrical equipment, a large number of meters, and intricate wiring patterns. Traditional manual inspection methods are not only inefficient but also struggle to detect potential wiring errors in a timely manner. Therefore, introducing advanced wiring error identification technology is of significant practical importance.
[0092] The system uses a combination of a 3D topology map and a heat map to visually represent the location and type of wiring errors. The 3D topology map visually displays the physical connections between devices such as meters and circuit breakers; when a wiring error occurs, its location is prominently marked on the topology map. The heat map uses different colors to represent the type and severity of the wiring error, allowing staff to quickly understand the distribution of wiring errors throughout the commercial complex. For example, in the 3D topology map, a meter node in a certain area is displayed in red, indicating a wiring error at that meter; simultaneously, this area is also displayed in dark red on the heat map, indicating a short circuit with high severity. Staff can quickly locate the error and perform repairs based on this visual information.
[0093] Please see Figure 2 A schematic diagram of the structure of a wiring error visualization analysis system based on data processing provided in this embodiment of the invention. The system includes:
[0094] The data acquisition model is used to collect meter wiring data in real time through sensors, wherein the meter wiring data includes at least voltage, current and phase;
[0095] The preprocessing model is used to perform noise reduction, normalization, and outlier handling on the collected meter wiring data to obtain preprocessed data.
[0096] A feature extraction model is used to extract wiring features from preprocessed data, wherein the wiring features include at least wiring patterns and current and voltage features.
[0097] The identification model is used to input wiring features into the CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features, and identify wiring error types, which include at least short circuit, open circuit, and reverse connection.
[0098] A visualization model is used to visualize the location and type of wiring errors by linking a 3D topology map with a heat map.
[0099] Figure 3This is a schematic diagram of the structure of a wiring error visualization analysis device based on data processing provided in an embodiment of the present invention. The wiring error visualization analysis device 300 based on data processing can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the wiring error visualization analysis device 300 based on data processing. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the wiring error visualization analysis device 300 based on data processing to implement the method provided in the above embodiment.
[0100] The data processing-based wiring error visualization analysis device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The structure of the data processing-based wiring error visualization analysis device shown does not constitute a limitation on the computer device provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0101] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the various steps of the data processing-based wiring error visualization analysis method provided in the above embodiments.
[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A data processing-based visualization analysis method for wiring errors, characterized in that, The method includes the following steps: The meter wiring data is collected in real time by sensors, and the meter wiring data includes at least voltage, current and phase. The collected meter wiring data is subjected to noise reduction, normalization, and outlier handling to obtain preprocessed data. Extract wiring features from the preprocessed data, where the wiring features include at least wiring pattern and current and voltage features; The wiring features are input into the CNN-BiLSTM-GWO-SVM model to analyze the extracted wiring features and identify wiring error types, which include at least short circuit, open circuit and reverse connection. The location and type of wiring error are displayed by linking a 3D topology map with a heat map; The step of inputting wiring features into the CNN-BiLSTM-GWO-SVM model, analyzing the extracted wiring features, and identifying wiring error types includes: converting the wiring features into a two-dimensional feature matrix and inputting it into the CNN-BiLSTM-GWO-SVM model; using three convolutional layers in the CNN network to capture the features; then using a max pooling layer to reduce the dimensionality of the features and outputting a local feature vector; wherein a ReLU activation function is connected after each convolutional layer. The local feature vectors output by the CNN network are input into the BiLSTM network to capture the temporal dependencies in the features. By concatenating the feature vectors output by the two sub-networks, the forward LSTM and the backward LSTM, a comprehensive feature vector is obtained. The comprehensive feature vector output by the BiLSTM network is fused and dimensionality reduced. The dimensionality-reduced feature vector is then input into an SVM whose parameters are optimized by the GWO algorithm. The input features are mapped to a high-dimensional feature space through the RBF function. Based on the optimized penalty factor and kernel function parameters, the optimal classification hyperplane is found in the high-dimensional space. Based on the position of the input features relative to the hyperplane, the corresponding wiring error type is output. The specific parameter settings for the three convolutional kernels in the CNN are as follows: The first layer uses 16 3×1 convolutional kernels with a stride of 1 and zero padding of 1. This ensures that the feature matrix size remains relatively stable after processing by this layer during the sliding convolution process, while effectively capturing the local correlation between adjacent features. The second layer uses 32 2×1 convolutional kernels with a stride of 1 and zero padding of 0.5, extracting deeper local feature patterns. The third layer uses 64 1×1 convolutional kernels with a stride of 1 and zero padding of 0, compressing the feature dimension while retaining key local information. Each convolutional layer is followed by a ReLU activation function to enhance the model's non-linear fitting ability. Then, a max pooling layer with a pooling window of 2×1 and a stride of 2 is used to reduce the dimensionality of the features and reduce redundant information. Finally, a locally enhanced 64-dimensional feature vector is output. The BiLSTM network consists of two sub-networks: a forward LSTM and a backward LSTM. Each sub-network has 64 neurons in its hidden layer. The forward LSTM processes the feature sequence chronologically from earliest to latest, capturing the influence of historical features on the current state. The backward LSTM processes the feature sequence chronologically from latest to earliest, capturing the influence of future features on the current state. The gating mechanism dynamically adjusts the memory and forgetting of features through input, forget, and output gates. Finally, the feature vectors from the forward and backward outputs are concatenated to obtain a 128-dimensional comprehensive feature vector containing complete temporal correlations. The 128-dimensional comprehensive feature vector output by the BiLSTM network is fused and dimensionality reduced. Principal component analysis is used to select the top 32 principal components based on the contribution rate of the eigenvalues, thereby reducing the feature vector to 32 dimensions. The 32-dimensional feature vector after dimensionality reduction is input into the SVM with optimized parameters using the GWO algorithm: First, the parameters to be optimized are determined as the penalty factor and kernel function parameters of the SVM, and the parameter search range is set; 30 individual gray wolves are initialized, with each wolf representing a set of parameter combinations; the fitness of each wolf is calculated, and the optimal, second-best, and third-best solutions with the highest fitness are selected by evaluating the classification accuracy of the model on the validation set; the behavior of gray wolf packs tracking, surrounding, and attacking prey is simulated to update the positions of other wolves, and after 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of the SVM; finally, the entire hybrid model is trained using the training set, employing the cross-entropy loss function and stochastic gradient descent optimization algorithm, with a learning rate of 0.01, a batch size of 32, and 100 training epochs, until the model converges.
2. The wiring error visualization analysis method based on data processing as described in claim 1, characterized in that, The process of denoising, normalizing, and handling outliers in the collected meter wiring data to obtain preprocessed data includes: The db4 wavelet basis is used to decompose the meter wiring data into multiple scales to obtain the approximation coefficients and detail coefficients at each scale. The threshold is dynamically adjusted by the BayesShrink algorithm. The detail coefficients are processed using a soft thresholding function and then subjected to inverse wavelet transform to complete the denoising process. Based on the data sampling frequency and the dynamic response characteristics of the wiring system, the initial window length is set to 100 sampling points. A dynamic step size mechanism is adopted, with the step size being 1 sampling point when the signal change rate exceeds the preset threshold, and otherwise the step size being 10 sampling points. For the time series data within each sliding window, the maximum and minimum values of the current window are calculated in real time and normalized and mapped. The denoised and normalized time-series data is input into the isolated forest to identify outliers, and the outliers are processed to obtain preprocessed data.
3. The wiring error visualization analysis method based on data processing as described in claim 2, characterized in that, The process involves inputting the denoised and normalized time-series data into an isolated forest to identify outliers, and processing the outliers to obtain preprocessed data, including: The time series data after denoising and normalization is used as samples by the feature vectors within the sliding window. 100 isolated trees are set up, and 256 samples are randomly selected for training in each tree. The maximum depth of the tree is 8. For each sample, calculate its average path length in all isolated trees and convert it into an anomaly score. When the anomaly score is greater than 0.7, it is identified as an anomaly. Continuous anomalies are identified as genuine wiring errors, while isolated anomalies are identified as interference. Cubic spline interpolation is used for repair.
4. The wiring error visualization analysis method based on data processing as described in claim 1, characterized in that, The extraction of wiring features from the preprocessed data includes: Based on the fluctuation characteristics of the preprocessed data, a dual-window mechanism is adopted, in which the main window captures short- and medium-term trends, and the sub-window captures instantaneous changes. For the time series data including voltage, current and phase in each main window, statistical features are calculated, and mutual information is used to filter the statistical features to obtain the final statistical features. The statistical features include at least basic statistics, time series trend features and sub-window aggregation features. FFT transformation was performed on the preprocessed data to extract fundamental and harmonic features. The db6 wavelet packet was selected to perform a 4-level decomposition on the preprocessed data to obtain 16 frequency bands. The energy proportion and frequency band entropy of each frequency band were calculated. The dimensional features extracted by FFT are concatenated with the features extracted by wavelet packets, and the frequency domain features are obtained by dimensionality reduction through principal component analysis. Hilbert transform is introduced, and a dual-clamp volt-ampere phase table algorithm is used to extract phase features. The meter wiring topology is represented as a graph structure, and topological features are extracted through a graph convolutional network. The final wiring characteristics are obtained by combining statistical characteristics, frequency domain characteristics, phase characteristics, and topological characteristics.
5. The wiring error visualization analysis method based on data processing as described in claim 4, characterized in that, The introduced Hilbert transform uses a dual-clamp volt-ampere phase table algorithm for phase feature extraction, representing the meter wiring topology as a graph structure, and extracting topological features through a graph convolutional network, including: The preprocessed data is decomposed using EMD to obtain several IMFs and residual terms. The IMFs are then screened using the correlation coefficient method. Perform Hilbert transform on each valid IMF to obtain the analytical signal, and calculate the instantaneous phase and instantaneous frequency. Extract the mean and standard deviation of the instantaneous phase, the deviation of the instantaneous frequency from the fundamental frequency, and the phase-frequency coupling coefficient. Based on the dual-clamp volt-ampere phase meter algorithm, the phase difference between voltage and current in the same phase, the phase difference between three-phase voltages, and the phase difference between three-phase voltages are calculated, and the phase difference is smoothed by moving average filtering. The results obtained from the Hilbert transform and the results obtained from the dual-clamp volt-ampere phase table algorithm are fused to obtain the final phase characteristics; By using meters, circuit breakers, transformers, and terminals as graph nodes and physical connection lines as graph edges, a graph structure is obtained. This structure is then input into a graph convolutional network, where convolution and pooling processes are used to obtain topological features.
6. A data processing-based wiring error visualization analysis system, used to implement the data processing-based wiring error visualization analysis method as described in claim 1, characterized in that, The system includes: The data acquisition model is used to acquire meter wiring data in real time through sensors, wherein the meter wiring data includes at least voltage, current and phase; The preprocessing model is used to perform noise reduction, normalization, and outlier handling on the collected meter wiring data to obtain preprocessed data. A feature extraction model is used to extract wiring features from preprocessed data, wherein the wiring features include at least wiring patterns and current and voltage features. The identification model is used to input wiring features into the CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features, and identify wiring error types, which include at least short circuit, open circuit, and reverse connection. A visualization model is used to visualize the location and type of wiring errors by linking a 3D topology map with a heat map.
7. A data processing-based visualization analysis device for wiring errors, characterized in that, The data processing-based wiring error visualization analysis device includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the data processing-based wiring error visualization analysis device to perform the various steps of the data processing-based wiring error visualization analysis method as described in any one of claims 1-5.
8. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the data processing-based wiring error visualization analysis method as described in any one of claims 1-5.
Citation Information
Patent Citations
Intelligent detection system and method for abnormal wiring of electric energy metering device before power transmission
CN114966475A
Fusion algorithm-based three-phase three-wire electric energy meter wrong wiring diagnosis method
CN117491912A