Wiring error visual analysis method and system based on data processing
By collecting meter data through sensors and analyzing it using the CNN-BiLSTM-GWO-SVM model, combined with 3D topology maps and heat maps for display, the problem of low efficiency and poor accuracy in traditional meter wiring error detection is solved, achieving efficient and accurate wiring error identification and visualization.
Patent Information
- Application Number
- CN202511493087.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-11-18
- 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 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, analyzes wiring error types using a CNN-BiLSTM-GWO-SVM model, 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 CN120972045A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power equipment detection, and particularly relates to a wiring error visual analysis method and system based on data processing. BACKGROUND
[0002] In the power system, meter wiring error is a common problem, which may cause inaccurate metering, equipment damage and even safety accidents; the traditional wiring error detection method mainly relies on manual inspection, which is low in efficiency and easy to miss; with the development of smart grid, the accuracy and real-time performance of meter wiring are increasingly required, so an efficient and accurate wiring error analysis method is needed; at present, the existing wiring error analysis method is mainly based on simple rule judgment or single algorithm model, which has problems of low recognition accuracy and slow analysis efficiency. SUMMARY
[0003] The present application aims to solve the above problems, and designs a wiring error visual analysis method and system based on data processing.
[0004] The first aspect of the present application provides a wiring error visual analysis method based on data processing, which comprises the following steps: Real-time acquisition of meter wiring data by a sensor, wherein the meter wiring data at least includes voltage, current and phase; Denoising, normalization and outlier processing of the collected meter wiring data to obtain preprocessed data; Extraction of wiring features from the preprocessed data, wherein the wiring features at least include wiring mode and current-voltage characteristics; Inputting the wiring features into a CNN-BiLSTM-GWO-SVM model to analyze the extracted wiring features and identify wiring error types, wherein the wiring error types at least include short circuit, open circuit and reverse connection; Displaying the error position and wiring error type through three-dimensional topology map and heat map linkage.
[0005] Optionally, in the first implementation manner of the first aspect of the present application, the denoising, normalization and outlier processing of the collected meter wiring data to obtain preprocessed data comprises: Multi-scale decomposition of the meter wiring data using db4 wavelet basis to obtain approximate coefficients and detail coefficients at each scale, wherein the threshold is dynamically adjusted by BayesShrink algorithm; Soft threshold function processing of the detail coefficients, and wavelet inverse transform to complete denoising; According to the data sampling frequency and the dynamic response characteristics of the wiring system, an initial window length is set to 100 sampling points, a dynamic step mechanism is adopted, when the signal change rate exceeds a preset threshold, the step is 1 sampling point, otherwise the step is 10 sampling points; For the time series data in each sliding window, the maximum and minimum values of the current window are calculated in real time, and normalized mapping is performed; The de-noised and normalized time series data are input into the isolated forest to identify abnormal points, and the abnormal values are processed to obtain preprocessed data.
[0006] Optionally, in the second implementation manner of the first aspect of the present application, the de-noised and normalized time series data are input into the isolated forest to identify abnormal points, and the abnormal values are processed to obtain preprocessed data, including: The de-noised and normalized time series data are taken as samples in the feature vectors in the sliding window, 100 isolated trees are set, 256 samples are randomly selected for each tree to perform training, and the maximum depth of the tree is 8; For each sample, the average path length in all isolated trees is calculated and converted into an abnormal score, when the abnormal score is greater than 0.7, it is determined as an abnormal point; The continuous abnormal points are determined as real wiring errors, and the isolated abnormal points are determined as interference, and are repaired by using cubic spline interpolation.
[0007] Optionally, in the third implementation manner of the first aspect of the present application, the wiring features are extracted from the preprocessed data, including: A double window mechanism is adopted based on the fluctuation characteristics of the preprocessed data, wherein the main window captures the medium and short-term trend, and the sub-window captures the instantaneous mutation; For the time series data including voltage, current and phase in each main window, statistical features are calculated, and the statistical features are screened by using mutual information to obtain final statistical features, wherein the statistical features at least include basic statistical quantities, time series trend features and sub-window aggregation features; The preprocessed data are subjected to FFT transformation to extract fundamental wave features and harmonic features, db6 wavelet packet is selected to perform 4-layer decomposition on the preprocessed data to obtain 16 frequency bands, and the energy proportion and frequency band entropy of each frequency band are calculated; The features extracted by FFT and the features extracted by wavelet packet are spliced, and the frequency domain features are obtained by principal component analysis dimension reduction; Hilbert transformation is introduced to use the double clamp volt-ampere phase table algorithm to extract phase features, the meter wiring topology is represented as a graph structure, and the topology features are extracted by a graph convolution network; The final wiring features are obtained by combining the statistical features, the frequency domain features, the phase features and the topology features.
[0008] Optionally, in a fourth implementation form of the first aspect of the present application, the introducing Hilbert transform uses a double clamp voltammetry phase table algorithm for phase feature extraction, represents the electric meter wiring topology as a graph structure, and extracts the topology features through a graph convolution network, including: The preprocessed data is subjected to EMD decomposition to obtain a plurality of IMFs and a residual term, and the IMFs are screened through a correlation coefficient method; A Hilbert transform is performed on each valid IMF to obtain an analytic signal, and the mean and standard deviation of the instantaneous phase, the deviation amount of the instantaneous frequency from the fundamental frequency, and the phase-frequency coupling coefficient are calculated; Based on the double clamp voltammetry phase table algorithm, the phase difference between the voltage and the current in the same phase, the phase difference between the three-phase voltages, and the phase difference between the three-phase voltages are calculated, and a sliding average filter is used to smooth the phase difference; The results obtained by the Hilbert transform and the results obtained by the double clamp voltammetry phase table algorithm are fused to obtain the final phase features; The electric meter, circuit breaker, transformer, and wiring terminal are taken as graph nodes, and the physical connection lines are taken as graph edges to obtain a graph structure, which is input into a graph convolution network to obtain topology features through convolution and pooling processing.
[0009] Optionally, in a fifth implementation form of the first aspect of the present application, the wiring feature is input into a CNN-BiLSTM-GWO-SVM model to analyze the extracted wiring feature and identify the wiring error type, including: The wiring feature is converted into a two-dimensional feature matrix and input into the CNN-BiLSTM-GWO-SVM model, three convolution layers in the CNN network are used to capture features, and a max-pooling layer is used to reduce the dimension of the features to output a local feature vector, wherein a ReLU activation function is connected after each convolution layer; The local feature vector output by the CNN network is input into the BiLSTM network to capture the time sequence dependency in the features, and the feature vectors output by the forward LSTM and backward LSTM sub-networks are spliced to obtain a comprehensive feature vector; The comprehensive feature vector output by the BiLSTM network is fused and dimensionally reduced, and the reduced feature vector is input into the SVM with parameters optimized by the GWO algorithm, the input features are mapped to a high-dimensional feature space through an RBF function, and based on the optimized penalty factor and kernel function parameters, an optimal classification hyperplane is found in the high-dimensional space, and based on the position of the input features relative to the hyperplane, the corresponding wiring error type is output.
[0010] Optionally, in a sixth implementation form of the first aspect of the present application, the optimization process of the GWO algorithm includes the following steps: Determine the to-be-optimized parameters as the penalty factor and the kernel function parameter of the SVM, set the parameter search range, and initialize 30 gray wolf individuals, wherein each wolf represents a set of parameter combinations; Calculate the fitness of each wolf, and filter out the optimal solution, the suboptimal solution and the third optimal solution with the highest fitness, update the positions of other wolves by simulating the behaviors of the gray wolf group in tracking, surrounding and attacking prey; After 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of the SVM.
[0011] The second aspect of the present application provides a wiring error visualization analysis system based on data processing, which comprises: A collection model is used to collect meter wiring data in real time through a sensor, wherein the meter wiring data at least includes voltage, current and phase; A pretreatment model is used to perform denoising processing, normalization processing and outlier processing on the collected meter wiring data to obtain preprocessed data; A feature extraction model is used to extract wiring features from the preprocessed data, wherein the wiring features at least include wiring mode and current-voltage characteristics; An identification model is used to input the wiring features into a CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features, and identify wiring error types, wherein the wiring error types at least include short circuit, open circuit and reverse connection; A visualization model is used to visualize error positions and wiring error types through three-dimensional topology graph and heat map linkage.
[0012] The third aspect of the present application provides a wiring error visualization analysis device based on data processing, which comprises a memory and at least one processor, and the memory stores instructions; the at least one processor calls the instructions in the memory, so that the wiring error visualization analysis device based on data processing performs each step of the wiring error visualization analysis method based on data processing as described in any one of the above.
[0013] The fourth aspect of the present application provides a computer readable storage medium, which stores instructions, and the instructions are executed by a processor to realize each step of the wiring error visualization analysis method based on data processing as described in any one of the above.
[0014] In the technical scheme provided by the application, the sensor is used to collect the meter wiring data in real time, the collected meter wiring data is subjected to denoising processing, normalization processing and abnormal value processing to obtain preprocessed data, the wiring features are extracted from the preprocessed data, the wiring features are input into a CNN-BiLSTM-GWO-SVM model, the extracted wiring features are analyzed, the wiring error type is recognized, and the error position and the wiring error type are visualized through the linkage of the three-dimensional topology graph and the heat map. The application realizes accurate identification and intuitive display of the wiring error, can be widely applied to meter wiring detection of a power system, improves detection efficiency and accuracy, reduces metering errors and safety accidents caused by wiring errors, and the visual display mode facilitates users to quickly locate and solve problems, and reduces operation difficulty. BRIEF DESCRIPTION OF DRAWINGS
[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are included only to illustrate preferred embodiments and are not to be considered as limiting of the application.
[0016] Figure 1 A flowchart of a wiring error visual analysis method based on data processing provided by an embodiment of the application is shown in FIG. 1. Figure 2 A structural schematic diagram of a wiring error visual analysis system based on data processing provided by an embodiment of the application is shown in FIG. 2. Figure 3 A structural schematic diagram of a wiring error visual analysis device based on data processing provided by an embodiment of the application is shown in FIG. 3. DETAILED DESCRIPTION
[0017] The terms "first", "second", "third", "fourth" and the like in the description, claims, and drawings of the application, and those above and below (if any) are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is not to be construed as implying a specific order or sequence except where called for by common usage or context. The drawings and the associated descriptions are provided to illustrate preferred embodiments of the application and are not intended to limit the scope of the application, which is defined by the appended claims.
[0018] For the convenience of understanding, the specific flow of the embodiments of the application is described below. Please refer to Figure 1 The flowchart of the wiring error visual analysis method based on data processing provided by the embodiment of the application specifically includes the following steps: Step 101, collecting meter connection data in real time through sensors, wherein the meter connection data at least includes voltage, current and phase; In this embodiment, the meter connection data is collected in real time by means of high-precision Hall voltage sensor, Hall current sensor and high-precision phase sensor; wherein the voltage sensor and the current sensor accurately capture the dynamic changes of voltage and current signals at a sampling frequency of 1 kHz, ensuring that key information such as sudden increase of current during short circuit and sudden drop of current during open circuit can be obtained in time; the phase sensor is specially used to collect phase difference data between voltage and current, and its measurement accuracy can reach 0.1°, which can sensitively detect the phase abnormalities caused by connection errors; these collected data cover the voltage, current and phase information of the meter connection under different working conditions.
[0019] Step 102, denoising, normalizing and outlier processing the collected meter connection data to obtain preprocessed data; In this embodiment, the original signal of the meter connection is decomposed by multi-scale wavelet to obtain approximate coefficients and detail coefficients of different frequency bands; then the highest frequency detail coefficient is selected as the noise dominant component, the median absolute value is calculated, and the standard deviation of the noise is estimated; then based on the Bayesian least mean square error criterion, the optimal threshold value is dynamically calculated for each decomposition layer of the detail coefficient, which is determined by the noise standard deviation and the standard deviation of the detail coefficient of the layer, ensuring that the threshold value can adaptively change with the signal frequency characteristics and noise intensity; finally, the dynamic threshold value is used for soft threshold processing of each layer of detail coefficient, which not only effectively filters out high-frequency noise, but also maximizes the preservation of characteristic mutations such as current spikes during short circuit and voltage drop during open circuit, improving the purity of the denoised signal and the integrity of the key features; according to the data sampling frequency and the dynamic response characteristics of the connection system, the initial window length is set to 100 sampling points, and a dynamic step mechanism is adopted, when the signal change rate exceeds the preset threshold, the step is 1 sampling point, otherwise the step is 10 sampling points; for the time series data in each sliding window, the maximum and minimum values of the current window are calculated in real time, and normalized mapping is performed; the time series data after denoising and normalization are taken as samples in the feature vector of the sliding window, 100 isolated trees are set, each tree randomly selects 256 samples for training, and 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 determined as an abnormal point; the continuous abnormal points are determined as real connection errors, and the isolated abnormal points are determined as interference, which are repaired by cubic spline interpolation to obtain the preprocessed data.
[0020] Step 103, extracting connection features from the preprocessed data, wherein the connection features at least include connection mode and current-voltage characteristics; In this embodiment, a double-window mechanism is adopted based on the fluctuation characteristics of the pre-processed data, wherein the main window captures the medium and short-term trend, and the sub-window captures the instantaneous mutation; the length of the main window is set to 500 sampling points corresponding to 0.5 seconds, covering 5 power frequency cycles, and the time series data is covered by continuous sliding to capture the medium and short-term change trend of parameters such as voltage, current and phase, for example, the gradual change of voltage caused by slow load change; the sub-window is nested in the main window, and the length is 50 sampling points corresponding to 0.05 seconds, so as to track the instantaneous mutation of the data at a higher time resolution, such as the instantaneous drop of current caused by loose connection or the voltage spike caused by poor contact, and the synergistic effect of the double windows can extract both the trend and the burst characteristics; The main window is comprehensive and efficient in capturing the medium and short-term trend, and the sliding step is set to 100 sampling points, that is, a new 100 sampling point data is processed every time the main window slides, and the time series data is gradually covered. The length of the sub-window nested in the main window is 50 sampling points, corresponding to 0.05 seconds. The sliding step of the sub-window is 10 sampling points, so as to accurately track the instantaneous mutation of the data at a higher time resolution, and the two windows work together to extract the trend and burst characteristics of the connection; For the time series data including voltage, current and phase in each main window, statistical features are calculated, and mutual information is used to screen the statistical features to obtain the final statistical features, wherein the statistical features at least include basic statistical quantities, time series trend features and sub-window aggregation features; the basic statistical quantities include mean, median, standard deviation, range, kurtosis and skewness, which respectively reflect the concentration trend, dispersion degree and distribution form of the data, for example, the kurtosis of the current will increase significantly when short-circuiting; the time series trend features include linear fitting slope, first-order difference of sliding mean, zero-crossing number and maximum continuous rising and falling segment length, which are used to capture the overall change direction and fluctuation rule of the data; the sub-window aggregation features are the maximum value, minimum value and mean value of the above-mentioned basic statistical quantities in the 10 sub-windows included in the main window, so as to retain the local characteristics of instantaneous mutation; then, mutual information algorithm is used to screen all statistical features, and the features with mutual information value higher than 0.3 with connection error types such as short circuit and open circuit are retained, to finally form a statistical feature set that can reflect both the overall trend and the local details; When mutual information is used to screen the statistical features, the specific calculation process is as follows: first, the connection error type (such as short circuit, open circuit, etc.) is taken as the target variable Y , and the calculated statistical features of various types are taken as the feature variables X . For each pair of ( X , Y ), the joint probability distribution P ( X , Y ) and the marginal probability distribution P (X ) and P ( Y ), the mutual information value is calculated by using the mutual information formula: ; The screening threshold is set according to the fact that, through a large number of experiments and data analysis, when the mutual information value is higher than 0.3, there is a strong correlation between the statistical characteristics and the wiring error type. If the mutual information value is lower than this threshold, it means that the feature has less contribution to distinguishing the wiring error type, and may contain more noise or irrelevant information. Therefore, the statistical feature set that can reflect the overall trend and contain local details and is closely related to the wiring error type is finally formed by retaining the statistical features with mutual information values higher than 0.3 and removing the features with values lower than this value.
[0021] The preprocessed data is subjected to FFT transformation to extract fundamental wave features and harmonic wave features. The preprocessed data is subjected to 4-layer decomposition by using db6 wavelet packet to obtain 16 frequency bands, and the energy proportion and frequency band entropy of each frequency band are calculated. The fundamental wave features include fundamental wave frequency 50Hz or 60Hz, fundamental wave amplitude and fundamental wave phase, which are used to judge the basic stability of the power signal. The harmonic wave features include the amplitude proportion of 2-5th harmonic, the ratio of each harmonic amplitude to the fundamental wave amplitude and the total harmonic distortion rate THD, which are used to identify the waveform distortion caused by wiring errors. At the same time, the preprocessed data is subjected to 4-layer decomposition by using db6 wavelet packet to obtain 16 continuous frequency bands covering 0-500Hz, and the energy proportion and frequency band entropy of each frequency band are calculated. The energy proportion is the ratio of the energy of the frequency band to the total energy, and the frequency band entropy is the Shannon entropy based on the energy proportion. The energy proportion reflects the distribution characteristics of the signal at different frequencies, and the frequency band entropy reflects the degree of disorder of the frequency distribution. The features extracted by FFT and the features extracted by wavelet packet are spliced, and the frequency domain features are obtained by principal component analysis dimension reduction; The preprocessed data is subjected to EMD decomposition to obtain a plurality of IMFs and a residual term, and the IMFs are screened by using the correlation coefficient method. The Hilbert transformation is performed on each effective IMF to obtain an analytical signal, and the mean and standard deviation of the instantaneous phase, the deviation amount of the instantaneous frequency from the fundamental wave frequency and the phase-frequency coupling coefficient are calculated. Based on the double-clamp volt-ampere phase table algorithm, the phase difference between the voltage and the current in the same phase, the phase difference between the three-phase voltages and the phase difference between the three-phase voltages are calculated, and the phase difference is smoothed by using the sliding average filter. The results obtained by the Hilbert transformation and the results obtained by the double-clamp volt-ampere phase table algorithm are fused to obtain the final phase features. The dual-clamp volt-amp phase table algorithm is an effective method for accurately measuring the phase relationship of electrical signals. This algorithm uses two clamp-on current transformers to clamp the voltage and current terminals of the line to be measured, and synchronously acquires the voltage and current signals. After obtaining the discrete sequence of signals using high-speed sampling technology, digital signal processing techniques such as fast Fourier transform (FFT) are used to convert the time-domain signals to frequency-domain signals. By analyzing the phase spectrum of the voltage and current in the frequency domain, the phase difference between the voltage and current in the same phase, as well as the phase difference between the three-phase voltage and the three-phase current, can be directly calculated, providing key data for subsequent phase feature analysis.
[0022] The phase-frequency coupling coefficient is used to quantify the degree of correlation between the instantaneous phase and the instantaneous frequency. After obtaining the instantaneous phase and instantaneous frequency of each valid IMF through Hilbert transform, the cross-correlation analysis method is used to calculate the coefficient. Specifically, the instantaneous phase sequence and the instantaneous frequency sequence are standardized to eliminate the dimensional influence, and then the cross-correlation function is calculated. By selecting an appropriate lag point, the maximum value of the cross-correlation function is obtained, which is normalized to obtain the phase-frequency coupling coefficient. Its value ranges from 0 to 1, and the closer the value is to 1, the tighter the coupling relationship between the instantaneous phase and the instantaneous frequency, and the more effectively it can reflect the dynamic interaction characteristics of the phase and the frequency in the signal.
[0023] The connection reliability weight is used to measure the stability of the connection between devices. It is calculated based on historical fault data by counting the number of faults, fault types and severity of a certain wire connection within a certain period of time. The fault frequency, impact range and other indicators are quantified and comprehensively calculated to obtain a weight value in 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, which can provide a key reference for the quality assessment of the connection.
[0024] The final wiring feature is obtained by setting the core devices such as ammeter, circuit breaker, mutual inductor, wiring terminal as nodes in the graph structure, each node is endowed with a multi-dimensional attribute vector containing device type represented by one-hot encoding, rated voltage, rated current, real-time monitored voltage value, real-time monitored current value and running state identification normal / abnormal; at the same time, the physical wires connecting these devices are defined as edges of the graph, the attributes of each edge include impedance parameters corresponding to the wire type, actual length, real-time measured current value, voltage difference of the two end nodes and connection reliability weight range 0-1 calculated based on historical fault data; based on the above definition of nodes and edges, a weighted adjacency matrix is constructed to quantify the connection strength between nodes, and then a complete graph structure is formed; the graph structure is input into the graph convolution network, first through the first layer convolution operation, combining the adjacency matrix and the node attribute vector, the local feature of each node is calculated by fusing its own attributes and the associated information of adjacent nodes; then through the second layer convolution, the feature extraction is further deepened to capture more extensive inter-node dependency; finally, through the global average pooling operation, the features of all nodes are aggregated into a fixed-dimensional vector, which is the topological feature that can comprehensively reflect the rationality of the overall topology structure of the ammeter wiring, which can effectively depict the compactness of node connection, impedance matching degree of critical path and symmetry of three-phase nodes and other key information; combined with statistical features, frequency domain features, phase features and topological features.
[0025] The graph convolution network used is a two-layer structure. The first layer convolution operation adopts a convolution method based on the spatial domain, which expands the calculation based on the weighted adjacency matrix and the node attribute vector. Specifically, for each target node, its own attribute vector and the attribute vectors of adjacent nodes are weighted and summed according to the connection strength in the adjacency matrix to fuse its own attributes and the associated information of adjacent nodes to obtain the local feature of each node. The second layer convolution is also based on the spatial domain and further deepens the feature extraction based on the local features obtained in the first layer. It captures more extensive inter-node dependency through a more complex weighted aggregation method, expands the receptive field, and makes the node feature cover more graph structure information in a larger range. After the two layers of convolution, through the global average pooling operation, the features of all nodes are aggregated into a fixed-dimensional vector, which is the topological feature that can comprehensively reflect the rationality of the overall topology structure of the ammeter wiring.
[0026] In step 104, the wiring feature is input into the CNN-BiLSTM-GWO-SVM model, and the extracted wiring feature is analyzed to identify the wiring error type, wherein the wiring error type at least includes short circuit, open circuit and reverse connection; In this embodiment, the wiring feature is converted into a two-dimensional feature matrix input into the CNN-BiLSTM-GWO-SVM model, the CNN network is used to strengthen the local features of the adjusted two-dimensional feature matrix, and the features are processed by three convolutional layers in turn: the first layer uses 16 3x1 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 2x1 convolutional kernels to further extract deeper local feature patterns; the third layer uses 64 1x1 convolutional kernels to compress the feature dimension while retaining key local information; a ReLU activation function is connected after each convolutional layer to enhance the non-linear fitting ability of the model, and then a max-pooling layer with a 2x1 pooling window is used to reduce the dimension of the features, reduce redundant information, and finally output a 64-dimensional feature vector that has been locally strengthened; The local feature vector output by the CNN network is input into the BiLSTM network to capture the time sequence dependency in the features. The BiLSTM includes a forward LSTM and a backward LSTM subnetwork: the forward LSTM processes the feature sequence from early to late in time order to capture the influence of historical features on the current state; the backward LSTM processes the feature sequence from late to early in time reverse order to capture the influence of future features on the current state; the hidden layers of the two subnetworks are both set to 64 neurons, which dynamically adjust the memory and forgetting of the features through the gating mechanism of the input gate, the forget gate, and the output gate, and finally the feature vectors output by the forward and backward are spliced to obtain a 128-dimensional comprehensive feature vector containing complete time sequence association; The comprehensive feature vector output by the BiLSTM network is fused and dimensionally reduced, and the reduced feature vector is input into the SVM with parameters optimized by the GWO algorithm. The input features are mapped to a high-dimensional feature space through the RBF function, and the optimal classification hyperplane is found in the high-dimensional space based on the optimized penalty factor and kernel function parameters. Based on the position of the input features relative to the hyperplane, the corresponding wiring error type is output.
[0027] CNN convolution kernel parameters In the model, the specific parameters of the three layers of CNN convolution kernel are set as follows: the first layer uses 16 3x1 convolution kernels, the step is set to 1, and the zero padding (padding) method is adopted, and the padding value is 1, so that the feature matrix size can be kept relatively stable after processing by the layer in the sliding convolution process, while effectively capturing the local correlation between adjacent features, such as the coupling relationship between voltage and current characteristics. The second layer uses 32 2x1 convolution kernels, the step is 1, and the zero padding is also used, and the padding value is 0.5 (rounded up to 1), which further extracts deeper local feature patterns. The third layer uses 64 1x1 convolution kernels, the step is 1, and the zero padding value is 0, which compresses the feature dimension while preserving key local information. Each convolution layer is connected to a ReLU activation function to enhance the non-linear fitting ability of the model, and then the feature is reduced in dimension through the maximum pooling layer (pooling window is 2x1, step is 2) to reduce redundant information, and finally a 64-dimensional feature vector is output after local reinforcement.
[0028] BiLSTM hidden layer node number, the BiLSTM network includes two sub-networks of forward LSTM and backward LSTM. In order to fully capture the time sequence dependence in the feature, 64 neurons are set in the hidden layer of the two sub-networks. The forward LSTM processes the feature sequence from early to late in time sequence, capturing the influence of historical features on the current state; the backward LSTM processes the feature sequence from late to early in time sequence, capturing the influence of future features on the current state. Through the dynamic adjustment of the memory and forgetting of the features in the input gate, the forgetting gate and the output gate in the gating mechanism, the feature vectors output by the forward and backward are spliced to obtain a 128-dimensional comprehensive feature vector containing complete time sequence association.
[0029] Feature fusion and dimension reduction, the 128-dimensional comprehensive feature vector output by the BiLSTM network is fused and dimensionally reduced. The principal component analysis (PCA) method is used to select the first 32 principal components according to the feature value contribution rate, and the feature vector is reduced to 32 dimensions to reduce the amount of calculation and improve the efficiency of the model.
[0030] 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.
[0031] 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.
[0032] 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 ( delta The positions of the wolves are respectively Xα , Xβ , X delta Other wolves ( omega The wolf's position update formula is: ; in, Dα for omega The distance between the wolf and the alpha wolf. Dβ for omega wolves and β The distance of the wolves D delta for omega wolves and delta 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.
[0033] 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: ; 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.
[0034] Step 105: Display the location and type of wiring error by linking the 3D topology map and heat map.
[0035] 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.
[0036] 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.
[0037] The error location and the wiring error type are displayed through the linkage of the three-dimensional topology map and the heat map. The three-dimensional topology map can intuitively display the physical connection relationship between the electric meter, the circuit breaker and other devices. When the wiring error occurs, the error location is marked in a prominent way in the topology map. The heat map represents different colors according to the type and severity of the wiring error, so that the staff can quickly understand the wiring error distribution of the entire commercial complex. For example, in the three-dimensional topology map, the electric meter node of a certain area is displayed in red, indicating that there is a wiring error at the electric meter. At the same time, the heat map also displays the area in deep red, indicating that the error type is short circuit and the severity is high. The staff can quickly locate the error location and perform maintenance processing according to these visual information.
[0038] Please refer to Figure 2 The structure diagram of the wiring error visualization analysis system based on data processing provided by the embodiment of the application, the system comprises: A collection model is configured to collect electric meter wiring data in real time through a sensor, wherein the electric meter wiring data at least includes voltage, current and phase; A preprocessing model is configured to perform denoising processing, normalization processing and outlier processing on the collected electric meter wiring data to obtain preprocessed data; A feature extraction model is configured to extract wiring features from the preprocessed data, wherein the wiring features at least include wiring mode and current-voltage characteristics; An identification model is configured to input the wiring features into a CNN-BiLSTM-GWO-SVM model, analyze the extracted wiring features and identify the wiring error type, wherein the wiring error type at least includes short circuit, open circuit and reverse connection; A visualization model is configured to visually display the error location and the wiring error type through the linkage of the three-dimensional topology map and the heat map.
[0039] Figure 3is a structural schematic view of a data processing-based wiring error visualization analysis device provided by an embodiment of the present application. The data processing-based wiring error visualization analysis device 300 can have great differences in configuration or performance, and can include one or more central processing units (CPUs) 310 (for example, one or more processors) and a memory 320, one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and the storage media 330 can be temporary storage or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), each of which can include a series of instruction operations in the data processing-based wiring error visualization analysis device 300. Further, the processor 310 can be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the data processing-based wiring error visualization analysis device 300 to implement the method provided by the above embodiment.
[0040] The data processing-based wiring error visualization analysis device 300 can further 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, and the like. Those skilled in the art can understand that the data processing-based wiring error visualization analysis device 300 can further include other components that are not shown in the figure, such as a bus, an input / output controller, a memory controller, a storage controller, a display controller, a peripheral interface, and the like. Figure 3 The data processing-based wiring error visualization analysis device structure shown does not constitute a limitation on the computer device provided by the present application, and can include more or fewer components than shown, or combine certain components, or have a different arrangement of components.
[0041] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium has instructions stored therein, and when the instructions are run on a computer, the computer executes the steps of the data processing-based wiring error visualization analysis method provided by the above embodiments.
[0042] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device or apparatus, unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0043] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0044] The basic principles, main features and advantages of the present application are shown and described above. Those skilled in the art should understand that the present application is not limited by the above embodiments, and the above embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application 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.
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. The wiring error visualization analysis method based on data processing as described in claim 1, characterized in that, 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 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.
7. The wiring error visualization analysis method based on data processing as described in claim 6, characterized in that, The optimization process of the GWO algorithm includes the following steps: 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, where each wolf represents a set of parameter combinations. 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. After 50 iterations, the parameters corresponding to the optimal solution are taken as the optimal parameters of the SVM.
8. A data processing-based visualization analysis system for wiring errors, 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.
9. 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-7.
10. 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-7.
Citation Information
Patent Citations
System and method for detecting false wiring of electric energy meter in big data and cloud environment
CN113687292A
Intelligent detection system and method for abnormal wiring of electric energy metering device before power transmission
CN114966475A
Electric energy meter wiring state type identification system based on fuzzy algorithm
CN115510619A
Judgment method for wrong wiring abnormity based on different phases of voltage and current
CN116106627A
Fusion algorithm-based three-phase three-wire electric energy meter wrong wiring diagnosis method
CN117491912A
Cited By
Power distribution automatic monitoring and early warning method and system based on voltage measurement
CN121172994A