A building electrical safety detection method and detection system

By applying a combination technology of compression perception algorithm and morphological filters in high-rise buildings, the problem of fault detection accuracy of electrical equipment under the influence of electromagnetic interference is solved, and higher detection accuracy and reliability are achieved, ensuring the safe and stable operation of the electrical system.

CN119622604BActive Publication Date: 2025-06-10SHANDONG BOFENG ENG TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510154739.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-10
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

In high-rise buildings, the accuracy of electrical equipment failure detection is affected by electromagnetic interference, resulting in a decrease in the accuracy of the detection data, making it difficult to accurately judge the true operating status of electrical equipment.

Method used

The compression perception algorithm is used to compress and reconstruct real-time electrical equipment data, and combine morphological filters to remove noise and interference signals to build an electrical fault recognition model for training and identification.

Benefits of technology

By reducing the amount of data transmitted and processed, the impact of electromagnetic interference is reduced, the accuracy and reliability of electrical equipment fault detection is improved, electrical equipment faults are discovered in a timely manner and corresponding maintenance measures are taken to ensure the safe and stable operation of the electrical system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622604B_ABST
    Figure CN119622604B_ABST
Patent Text Reader

Abstract

The present application provides a method and a detection system for building electrical safety detection, which relates to the technical field of electrical detection. The method includes steps such as first acquisition, second acquisition, first processing, second processing, third processing, model construction, model training, and fault identification. By using the compressive sensing algorithm and the morphological filter, the present application effectively removes the noise and interference signals in the data, improves the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helps to timely detect the faults of electrical equipment and take corresponding maintenance measures, and ensures the safe and stable operation of the electrical system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of electrical detection, and particularly to a method and system for detecting the electrical safety of buildings. Background Art

[0002] Electrical systems are widely used in various fields such as industrial production, transportation, commercial operations, and daily life, and are key infrastructure for the normal operation of modern society. Once a fault occurs in an electrical system, it may cause production stagnation, equipment damage, and even endanger the safety of personnel. Therefore, electrical system detection, as the core means to ensure its safe and stable operation, is of extremely important significance. Nowadays, electrical system detection uses intelligent sensors to collect electrical parameters in real time and accurately, and based on the collected data, accurately evaluate the operating status of electrical equipment and determine whether there are potential fault hazards.

[0003] The Chinese invention patent with the application publication number CN117970005A provides a fault detection system for electrical automation equipment. This patent collects multiple different values, calculates the corresponding fluctuation values according to the values, and compares the fluctuation values with preset thresholds to determine whether the relevant values of the electrical automation equipment are abnormal. Thus, based on multiple values, the electrical automation equipment is analyzed, and the status of the electrical automation equipment is analyzed from multiple dimensions, and an early warning signal can be sent in time when the electrical automation equipment is about to have an abnormality or has an abnormality.

[0004] For the above technical solution, the fault detection of electrical equipment is realized. However, in actual application, traditional electrical detection technologies are mainly used. For example, electrical parameters are collected through various sensors to obtain detection data such as current and voltage values when the electrical equipment is operating, so as to initially judge whether the equipment is in a normal working state. When in a high-rise building, due to the large number of electrical equipment, electromagnetic interference will be generated between different equipment and lines, and the detected signals are extremely vulnerable to the influence of electromagnetic interference during the transmission process, resulting in a decrease in the accuracy of the detection data, making it difficult to accurately judge the true operating status of the electrical equipment, and further reducing the accuracy of the fault detection of the electrical equipment, posing a huge hidden danger to the normal operation of high-rise buildings and the safety of staff. Summary of the Invention

[0005] In order to reduce the influence of electromagnetic interference on detection data and improve the accuracy of fault detection of electrical equipment in high-rise buildings, this application provides a method and system for detecting the electrical safety of buildings.

[0006] In the first aspect, this application provides a method for detecting the electrical safety of buildings, adopting the following technical solution:

[0007] A method for detecting the electrical safety of buildings includes the following steps:

[0008] First collection: Collect real-time electrical equipment data;

[0009] Second collection: Collect historical electrical equipment data and corresponding fault type labels;

[0010] First processing: Based on a preset observation matrix and a preset sparse basis, use the compressive sensing algorithm to compress the collected real-time electrical equipment data to obtain first data;

[0011] Second processing: Based on the preset sparse basis, use the reconstruction algorithm to reconstruct the first data to obtain second data;

[0012] Third processing: Use a preset morphological filter to filter the second data to obtain third data;

[0013] Model construction: Construct an electrical fault identification model;

[0014] Model training: Input the collected historical electrical equipment data and corresponding fault type labels into the electrical fault identification model for model training to obtain an optimized electrical fault identification model, and use the optimized electrical fault identification model as the new electrical fault identification model;

[0015] Fault identification: Input the third data into the electrical fault identification model to obtain the fault type label of the third data.

[0016] By adopting the above technical solution, using the compressive sensing algorithm to collect data at a rate far lower than the Nyquist sampling rate, greatly reducing the amount of data that needs to be transmitted and processed, reducing the influence of electromagnetic interference and signal distortion on the data during the transmission process, and improving the transmission quality of the data. In addition, by reconstructing the compressed data through the reconstruction algorithm, the interference loss of the data is compensated. At the same time, using the morphological filter, the noise and interference signals in the data are effectively removed, highlighting the characteristics of the data, making the collected data smoother and clearer, improving the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helping to timely detect electrical equipment faults and take corresponding maintenance measures, and ensuring the safe and stable operation of the electrical system.

[0017] Optionally, after performing the step of the second collection and before performing the step of the first processing, it further includes:

[0018] Matrix modeling: Based on the collected real-time electrical equipment data, construct an electrical vector matrix;

[0019] First decomposition: Use the component analysis method to decompose the electrical vector matrix to obtain a component matrix;

[0020] Generate basis vectors: Denote the vectors in the component matrix as candidate basis vectors;

[0021] Screening basis vectors: Using a clustering algorithm to cluster the candidate basis vectors, and based on the clustering results, screening out the candidate basis vectors, and denoting the screened candidate basis vectors as the screened basis vectors;

[0022] Combining basis vectors: Performing a combination process on the screened basis vectors, and using the combined basis vectors as the preset sparse basis.

[0023] By adopting the above technical solution, using the component analysis method to construct candidate basis vectors helps to remove the noise and redundant information contained in the collected data, realizing the filtering and feature extraction of electromagnetic interference data. Then, based on the clustering algorithm, the candidate basis vectors are clustered and screened to further remove the abnormal basis vectors that may be affected by electromagnetic interference, and retain the basis vectors that can best represent the essential characteristics of the data, improving the quality and stability of the basis vectors. Optimizing the sparse basis based on the screened basis vectors helps to make the collected data have a sparser representation under the optimized sparse basis, and also helps to accurately retain the key information related to the operating state and faults of electrical equipment during the data compression process, filtering out the redundant and noise information generated by electromagnetic interference. In addition, the optimized sparse basis can correct the errors caused by electromagnetic interference during the subsequent reconstruction process, making the reconstructed data closer to the real device operating data, improving the anti-interference ability during the reconstruction process, and making the reconstruction result more stable and accurate, thereby improving the reliability of fault detection.

[0024] Optionally, after performing the step of the second acquisition and before performing the step of the first processing, it further includes:

[0025] Dimension setting: Setting the dimension of the original signal and the dimension of the measurement value;

[0026] Ratio setting: Setting the ratio of random elements to deterministic elements, and based on the preset number of elements, calculating the number of random elements and the number of deterministic elements;

[0027] First generation: Based on the number of random elements, using a random matrix generation method to generate random elements;

[0028] Second generation: Associating the important features of the preset electrical equipment with the deterministic elements correspondingly, and assigning values to the deterministic elements;

[0029] Constructing a matrix: Based on the random elements and the deterministic elements after assignment, constructing an observation matrix, and using the constructed observation matrix as the new observation matrix.

[0030] By adopting the above technical solution, corresponding associations are made based on the important features and deterministic elements of the preset electrical equipment, and values are assigned to the deterministic elements, enabling the observation matrix to focus on the key features of the electrical equipment, more targeted collection of information closely related to the operating state of the equipment among numerous interference signals, enhancing the ability to capture effective signals, and improving the accuracy of detection data. At the same time, random elements and deterministic elements are set to construct the observation matrix, making the observation matrix less susceptible to the influence of specific pattern electromagnetic interference during data collection, further enhancing the ability to extract effective signals from electromagnetic interference, improving the anti-interference ability of data collection, reducing errors and uncertainties caused by electromagnetic interference, providing a more accurate data basis for subsequent fault detection, thereby improving the accuracy of electrical equipment fault detection, helping to more timely and accurately discover potential faults of electrical equipment, and ensuring the safe operation of the high-rise building electrical system.

[0031] Optionally, after performing the step of constructing the matrix and before performing the step of the first processing, it further includes:

[0032] First calculation: Calculate the cross-correlation coefficient between the observation matrix and the sparse basis;

[0033] First optimization: Define the optimization objective as minimizing the cross-correlation coefficient, define the objective function based on the optimization objective, use the optimization algorithm to minimize the objective function, iteratively optimize the observation matrix, and use the optimized observation matrix as the new observation matrix.

[0034] By adopting the above technical solution, calculating and optimizing the cross-correlation coefficient between the observation matrix and the sparse basis can make the correlation between the observation matrix and the sparse basis reach the optimal state, helping to more accurately extract effective information related to the operating state of the electrical equipment, reducing the interference of irrelevant information and noise, thereby improving the accuracy of detection data and making the data more truly reflect the actual operating conditions of the electrical equipment.

[0035] Optionally, after performing the step of the second processing and before performing the step of the third processing, it further includes:

[0036] Third collection: Collect different types of compressed sensing reconstruction data and the corresponding optimal structural element parameters;

[0037] First annotation: Use the collected optimal structural element parameters as structural labels to annotate the compressed sensing reconstruction data, and record the annotated data as structural data;

[0038] Model construction: Construct a structure selection model;

[0039] First training: Input the structural data into the structure selection model for model training to obtain the optimized structure selection model, and use the optimized structure selection model as the new structure selection model;

[0040] Structure selection: Input the second data into the structure selection model to obtain the structure element parameters of the second data;

[0041] Structure optimization: Optimize the morphological filter based on the structure element parameters of the second data, and use the optimized morphological filter as the new morphological filter.

[0042] By adopting the above technical solution, the accurate structure element parameters are selected for the collected data based on the structure selection model, which can capture the fault signal more accurately and reduce the occurrence of misjudgment and missed judgment caused by electromagnetic interference. Moreover, based on the structure selection model, accurate structure element parameters are selected for the collected data, so that the optimized morphological filter can better highlight the data features related to faults and suppress the interference features, thereby improving the recognition accuracy of the fault features of electrical equipment and helping to more accurately judge the true operating state of electrical equipment.

[0043] Optionally, after performing the step of the third acquisition and before performing the step of the first annotation, it further includes:

[0044] Fourth acquisition: Acquire the compressed sensing reconstruction data of different scales and the corresponding optimal structure element parameters;

[0045] Data merging: Merge the collected compressed sensing reconstruction data of different types with the compressed sensing reconstruction data of different scales, and use the merged data as the new compressed sensing reconstruction data;

[0046] First labeling: Based on the type and scale of the compressed sensing reconstruction data, label the corresponding compressed sensing reconstruction data type label and compressed sensing reconstruction data scale label for the compressed sensing reconstruction data, and use the labeled data as the new compressed sensing reconstruction data.

[0047] By adopting the above technical solution, accurate structure element parameters are selected for the collected data by using the compressed sensing reconstruction data of different scales and different types. Based on the structure element parameters, a multi-scale morphological filter is constructed, which can filter different scales of interference as the operating state of the electrical equipment and the electromagnetic interference environment are constantly changing, making the characteristic signal more obvious, improving the accuracy of the data, facilitating the analysis and judgment of the subsequent fault recognition model, and helping to improve the accuracy of fault detection.

[0048] Optionally, after performing the step of the second processing and before performing the step of the third processing, it further includes:

[0049] Wavelet decomposition: Decompose the second data by using wavelet transform, and use the decomposed data as the new second data.

[0050] By adopting the above technical solutions, it helps to separate the electromagnetic interference signals and the detection data of electrical equipment at different scales, helps to clearly display the data characteristics of the signals and interference signals, and improves the purity of the detection data. Moreover, the wavelet decomposition method helps to reduce the dimension of the collected data, reduces the computational amount and storage requirements of the data, and improves the processing speed.

[0051] Optionally, after performing the step of building the model and before performing the step of model training, it further includes:

[0052] First acquisition: Collect electrical equipment data when the electrical equipment is in normal operation, and record it as the first reference data;

[0053] First sorting: Sort the first reference data in chronological order to obtain a reference sequence;

[0054] Second sorting: Sort the collected historical electrical equipment data in chronological order to obtain a number of comparison sequences;

[0055] Second calculation: Calculate the grey relational degree between the reference sequence and the comparison sequences;

[0056] First judgment: Judge whether the calculated grey relational degree is greater than a preset relational degree threshold:

[0057] If so, no processing is performed;

[0058] If not, mark the comparison sequences with grey relational degrees not greater than the preset relational degree threshold as interference sequences, and then perform the data elimination step;

[0059] Data elimination: Delete the historical electrical equipment data corresponding to the marked interference sequences, and use the remaining historical electrical equipment data after deletion as the new historical electrical equipment data.

[0060] By adopting the above technical solutions, the noise and outliers in the data are removed, the purity and quality of the collected historical electrical equipment data are improved, the interference of the noise data on the training of the electrical fault identification model is reduced, and the accuracy and reliability of the model are improved.

[0061] In a second aspect, the present application provides a building electrical safety detection system, and the system is applicable to the building electrical safety detection method described in any one of the above first aspects. The system includes: adopting the following technical solutions:

[0062] A building electrical safety detection system, the system includes:

[0063] A first acquisition module, configured to acquire real-time electrical equipment data;

[0064] The second acquisition module is used to acquire historical electrical equipment data and the corresponding fault type labels;

[0065] The first processing module is used to compress the acquired real-time electrical equipment data by using a compressive sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data;

[0066] The second processing module is used to reconstruct the first data by using a reconstruction algorithm based on the preset sparse basis to obtain second data;

[0067] The third processing module is used to filter the second data by using a preset morphological filter to obtain third data;

[0068] The model construction module is used to construct an electrical fault identification model;

[0069] The model training module is used to input the acquired historical electrical equipment data and the corresponding fault type labels into the electrical fault identification model for model training to obtain an optimized electrical fault identification model, and use the optimized electrical fault identification model as a new electrical fault identification model;

[0070] The fault identification module is used to input the third data into the electrical fault identification model to obtain the fault type label of the third data.

[0071] By adopting the above technical solution, based on the first processing module using the compressive sensing algorithm, data is acquired at a rate far lower than the Nyquist sampling rate, greatly reducing the amount of data that needs to be transmitted and processed, reducing the influence of electromagnetic interference and signal distortion on the data during the transmission process, and improving the transmission quality of the data. In addition, based on the second processing module, the compressed data is reconstructed by using a reconstruction algorithm to make up for the interference loss of the data. At the same time, based on the third processing module using a morphological filter, the noise and interference signals in the data are effectively removed, highlighting the characteristics of the data, making the acquired data smoother and clearer, improving the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helping to timely discover electrical equipment faults and take corresponding maintenance measures, and ensuring the safe and stable operation of the electrical system.

[0072] In summary, the present application includes at least one of the following beneficial technical effects:

[0073] 1. Using the compressive sensing algorithm, data is collected far below the Nyquist sampling rate, greatly reducing the amount of data that needs to be transmitted and processed, reducing the impact of electromagnetic interference and signal distortion during data transmission, and improving the data transmission quality. In addition, the compressed data is reconstructed through a reconstruction algorithm to compensate for the interference loss of the data. At the same time, morphological filters are used to effectively remove noise and interference signals in the data, highlight the features of the data, make the collected data smoother and clearer, improve the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, help to detect electrical equipment faults in a timely manner and take corresponding maintenance measures, and ensure the safe and stable operation of the electrical system.

[0074] 2. Using the component analysis method to construct candidate basis vectors helps to remove the noise and redundant information contained in the collected data, and realizes the filtering and feature extraction of electromagnetic interference data. Then, based on the clustering algorithm, the candidate basis vectors are clustered and screened to further remove the abnormal basis vectors that may be affected by electromagnetic interference, and retain the basis vectors that can best represent the essential characteristics of the data, improving the quality and stability of the basis vectors. Optimizing the sparse basis based on the selected basis vectors helps to make the collected data have a sparser representation under the optimized sparse basis, and also helps to accurately retain the key information related to the operating state and faults of electrical equipment during the data compression process, and filter out the redundant and noise information generated by electromagnetic interference. In addition, the optimized sparse basis can correct the errors caused by electromagnetic interference during the subsequent reconstruction process, make the reconstructed data closer to the real device operation data, improve the anti-interference ability during the reconstruction process, and make the reconstruction result more stable and accurate, thus improving the reliability of fault detection.

[0075] 3. Based on the important features and deterministic elements of the preset electrical equipment, corresponding associations are made, and the deterministic elements are assigned values, so that the observation matrix can focus on the key features of the electrical equipment, collect information closely related to the equipment operating state more targeted among many interference signals, enhance the ability to capture effective signals, and improve the accuracy of the detected data. At the same time, random elements and deterministic elements are set to construct the observation matrix, so that the observation matrix is not easily affected by specific pattern electromagnetic interference during data collection, further enhancing the ability to extract effective signals from electromagnetic interference, improving the anti-interference ability of data collection, reducing the errors and uncertainties caused by electromagnetic interference, providing a more accurate data basis for subsequent fault detection, thus improving the accuracy of electrical equipment fault detection, helping to discover potential faults of electrical equipment more timely and accurately, and ensuring the safe operation of the high-rise building electrical system.

[0076] 4. Calculate the cross - correlation coefficient between the observation matrix and the sparse basis and optimize it, which can make the correlation between the observation matrix and the sparse basis reach the optimal state, contribute to more accurately extracting the effective information related to the operating state of electrical equipment, reduce the interference of irrelevant information and noise, thereby improving the accuracy of detection data and enabling the data to more truly reflect the actual operating conditions of electrical equipment. Description of the Drawings

[0077] Figure 1 is the flowchart of Embodiment 1 of the present application;

[0078] Figure 2 is the flowchart of S31 Sparse Basis Setting in Embodiment 1 of the present application;

[0079] Figure 3 is the flowchart of S32 Observation Matrix Setting in Embodiment 1 of the present application;

[0080] Figure 4 is the flowchart of S52 Morphological Filter Setting in Embodiment 1 of the present application;

[0081] Figure 5 is the flowchart of S71 Rejection Setting in Embodiment 1 of the present application. Detailed Description of the Invention

[0082] The following is combined with Figures 1 to 5 to further elaborate on the present application in detail.

[0083] Embodiment 1: This embodiment discloses a method for detecting the safety of building electricity. As Figure 1 shown, the method includes: collecting real - time electrical equipment data, collecting historical electrical equipment data and corresponding fault type labels, compressing the collected real - time electrical equipment data using the compressive sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain the first data; reconstructing the first data using a reconstruction algorithm based on the preset sparse basis to obtain the second data; filtering the second data using a preset morphological filter to obtain the third data; constructing an electrical fault recognition model; inputting the collected historical electrical equipment data and corresponding fault type labels into the electrical fault recognition model for model training to obtain an optimized electrical fault recognition model, and using the optimized electrical fault recognition model as a new electrical fault recognition model; inputting the third data into the electrical fault recognition model to obtain the fault type label of the third data. This embodiment includes the following steps:

[0084] S1 First Collection: Collect real - time electrical equipment data.

[0085] The real - time electrical equipment data includes voltage data, current data, power data, temperature data, humidity data, pressure data, switch status data, and equipment vibration data.

[0086] S2 Second data collection: Collect historical electrical equipment data and corresponding fault type labels.

[0087] The historical real-time electrical equipment data includes historical voltage data, historical current data, historical power data, historical temperature data, historical humidity data, historical pressure data, historical switch status data, and historical equipment vibration data.

[0088] The fault type labels include: short circuit fault, overload fault, overheat fault, insulation fault, mechanical fault, overvoltage fault.

[0089] In this embodiment, data preprocessing is performed on the collected data. The data preprocessing includes cleaning, and the cleaning includes removing missing values and outliers.

[0090] S3 Basic settings: Include S31 sparse basis settings and S2 observation matrix settings.

[0091] S31 Sparse basis settings: Include S311 matrix modeling, S312 first decomposition, S313 generating basis vectors, S314 screening basis vectors, and S315 combining basis vectors, as Figure 2 shown.

[0092] S311 Matrix modeling: Construct an electrical vector matrix based on the collected real-time electrical equipment data. The corresponding electrical vector matrix can be constructed according to the component analysis method used in S312 first decomposition.

[0093] In this embodiment, based on the collection time and the measured values of the collected real-time electrical equipment data, the collected real-time electrical equipment data is constructed into an electrical vector matrix in tensor form.

[0094] Construct an electrical vector matrix. Each row of the matrix represents the measurement value sequence of a certain type of electrical equipment data at a certain moment, and each column represents the set of measurement values of all electrical equipment data at a certain moment.

[0095] S312 First decomposition: Use component analysis methods such as independent component analysis, tensor principal component analysis, and kernel principal component analysis to decompose the electrical vector matrix to obtain a component matrix.

[0096] In this embodiment, tensor principal component analysis is used. Tensor principal component analysis includes methods such as high-order singular value decomposition and Tucker decomposition. In this embodiment, high-order singular value decomposition is used.

[0097] Expand each electrical vector matrix, perform singular value decomposition on each expanded electrical vector matrix to obtain the corresponding left singular matrix, singular value matrix, and right singular matrix. According to the size of the preset singular values, select the main singular values and their corresponding left singular vectors, and form a component matrix based on the left singular vectors.

[0098] S313 Generate basis vectors: Denote the vectors in the component matrix as candidate basis vectors.

[0099] S314 Screen basis vectors: Use clustering algorithms such as the K-means clustering algorithm and hierarchical clustering algorithm to cluster the candidate basis vectors. According to the clustering results, select the most representative candidate basis vectors from each cluster, and denote the selected candidate basis vectors as screened basis vectors.

[0100] In this embodiment, the K-means clustering algorithm is used for clustering. For example, divide the candidate basis vectors into 5 clusters through the K-means clustering algorithm, and select the candidate basis vector closest to the cluster center from each cluster as the most representative candidate basis vector, and denote the selected candidate basis vectors as screened basis vectors.

[0101] S315 Combine basis vectors: Process the screened basis vectors by combination, and use the combined basis vectors as the preset sparse basis. The basis vectors can be directly concatenated or the concatenation order and weights between the basis vectors can be screened by optimization methods such as genetic algorithms and particle swarm optimization algorithms for concatenation to obtain the sparse basis.

[0102] In this embodiment, the screened basis vectors are concatenated, and the concatenated basis vectors are used as the preset sparse basis.

[0103] S32 Observation matrix setting: Includes S321 dimension setting, S322 ratio setting, S323 first generation, S324 second generation, S325 matrix construction, S326 first calculation, and S327 first optimization, as Figure 3 shown.

[0104] S321 Dimension setting: Set the dimension of the original signal and the dimension of the measurement value.

[0105] The dimension of the original signal is the dimension before compression, and the dimension of the measurement value is the dimension after compression.

[0106] S322 Ratio setting: Set the ratio of random elements to deterministic elements, and calculate the number of random elements and the number of deterministic elements based on the preset number of elements.

[0107] Set the ratio of random elements to deterministic elements in the observation matrix. Generally speaking, the proportion of random elements is relatively large, and the generality and reconfigurability of the matrix are high; while the proportion of deterministic elements is small, but it can highlight specific signal characteristics, and the ratio of random elements to deterministic elements can be set according to needs.

[0108] S323 First generation: Based on the number of random elements, use random matrix generation methods such as Gaussian random matrices or Bernoulli random matrices to generate random elements.

[0109] S324 Second Generation: Correspondingly associate the important features of the preset electrical equipment with the deterministic elements, and assign values to the deterministic elements.

[0110] Based on the structure and working principle of the electrical equipment, determine the important features of the electrical equipment, establish a corresponding relationship between the determined important features of the electrical equipment and the deterministic elements, and then use the physical principles and operating laws of the electrical equipment or historical electrical equipment data to assign values to the deterministic elements.

[0111] S325 Matrix Construction: Based on the random elements and the assigned deterministic elements, construct an observation matrix, and use the constructed observation matrix as the new observation matrix.

[0112] S326 First Calculation: Calculate the inner product of the column vectors of the observation matrix and the sparse basis, take the absolute value of all the inner products of the column vectors, and take the maximum value as the cross-correlation coefficient between the observation matrix and the sparse basis.

[0113] S327 First Optimization: Define the optimization objective as minimizing the cross-correlation coefficient, define the objective function based on the optimization objective, use optimization algorithms such as the gradient descent method or the genetic algorithm to solve it, and iteratively update the observation matrix until the change amount of the objective function is less than a certain threshold or reaches the maximum number of iterations, then stop the iterative optimization, obtain the optimized observation matrix, and use the optimized observation matrix as the new observation matrix.

[0114] In this embodiment, the gradient descent method is used for optimization.

[0115] S4 First Processing: Based on the preset observation matrix and the preset sparse basis, use the compressive sensing algorithm to compress the collected real-time electrical equipment data to obtain the first data.

[0116] Sparsely represent the collected real-time electrical equipment data based on the sparse basis, project the real-time electrical equipment data using the preset observation matrix to obtain a low-dimensional observation vector, denoted as the first data.

[0117] S5 Second Processing: Based on the preset sparse basis, use reconstruction algorithms such as the orthogonal matching pursuit algorithm or the basis pursuit algorithm to reconstruct the first data to obtain the second data.

[0118] In this embodiment, the orthogonal matching pursuit algorithm is used to reconstruct the first data. Set the initial residual, initialize the support set and the current solution, calculate the inner product of the current residual and each atom in the dictionary matrix, select the atom most relevant to the current residual, obtain the index of the atom in the dictionary matrix, and add the obtained index to the support set. On the current support set, solve the coefficient vector by the least squares method, calculate the signal estimate value under the current support set according to the solved coefficient vector, and update the residual by subtracting the calculated signal estimate value from the first data until the residual is less than the preset threshold or the maximum number of iterations is reached, and the iteration terminates. The coefficient vector is used as the obtained second data.

[0119] S51 Wavelet decomposition: The second data is decomposed by wavelet transform, and the decomposed data is used as the new second data.

[0120] Based on the second data, select the wavelet basis function, define the decomposition layer of the wavelet basis function, and use the discrete wavelet transform algorithm to decompose the second data. Convolve the second data with the low-pass filter to obtain the low-frequency part; convolve the second data with the high-pass filter to obtain the high-frequency part. Downsample the obtained low-frequency part and high-frequency part to obtain the approximation coefficient and the detail coefficient. Continue to perform the next layer of wavelet decomposition on the obtained low-frequency part, repeat the above operations until the predetermined decomposition layer number is reached, complete the iterative decomposition, and collect all the obtained approximation coefficients and detail coefficients as the new second data.

[0121] S52 Morphological filter setting: It includes S521 Third acquisition, S522 Fourth acquisition, S523 Data merging, S524 First label, S525 First annotation, S526 Model construction, S527 First training, S528 Structure selection, and S529 Structure optimization, as Figure 4 shown.

[0122] S521 Third acquisition: Acquire different types of compressed sensing reconstruction data and the corresponding optimal structural element parameters.

[0123] Determine the type of compressed sensing reconstruction data to be acquired. Based on the determined type of compressed sensing reconstruction data, prepare the corresponding original signal, and perform the corresponding compressed sensing reconstruction algorithm for reconstruction. For the obtained compressed sensing reconstruction data, perform morphological operations on it using different structural element parameters. Preset the evaluation criteria, and by traversing different structural element parameters, select the structural element parameter that makes the evaluation index optimal as the optimal structural element parameter for this type of reconstruction data.

[0124] S522 Fourth acquisition: Acquire different scales of compressed sensing reconstruction data and the corresponding optimal structural element parameters.

[0125] Determine the scale range of the compressed sensing reconstruction data to be collected, perform compressed sensing sampling on the original signal at different scales, and then perform reconstruction through a reconstruction algorithm to obtain compressed sensing reconstruction data at different scales. For the obtained compressed sensing reconstruction data, perform morphological operations on it using different structural element parameters, preset an evaluation criterion, and by traversing different structural element parameters, select the structural element parameter that makes the evaluation index optimal as the best structural element parameter for the reconstruction data at this scale.

[0126] S523 Data merging: Merge the collected different types of compressed sensing reconstruction data with the compressed sensing reconstruction data at different scales, and use the merged data as the new compressed sensing reconstruction data.

[0127] S524 First labeling: Based on the type and scale of the compressed sensing reconstruction data, label the corresponding compressed sensing reconstruction data type label and compressed sensing reconstruction data scale label for the compressed sensing reconstruction data, and use the labeled data as the new compressed sensing reconstruction data. Each compressed sensing reconstruction data is labeled with the corresponding compressed sensing reconstruction data scale label and compressed sensing reconstruction data type label.

[0128] S525 First annotation: Use the best structural element parameter collected as the structural label to annotate the compressed sensing reconstruction data, and record the annotated data as structural data. Each structural data is labeled with the corresponding compressed sensing reconstruction data scale label, compressed sensing reconstruction data type label, and structural label.

[0129] S526 Model construction: A structure selection model can be constructed based on a machine learning model or a deep learning model as the basic model.

[0130] In this embodiment, a convolutional neural network model is used to construct the structure selection model.

[0131] S527 First training: Input the structural data into the structure selection model for model training to obtain an optimized structure selection model, and use the optimized structure selection model as the new structure selection model.

[0132] Construct a structure selection sample training set based on the structural data, use the structure selection sample training set as a sample to input into the structure selection model, perform forward propagation and backward propagation, define the mean square error function as the loss function, use stochastic gradient descent to update the model parameters of the structure selection model, repeat the above steps for iterative training until the preset number of iterative training times is reached, complete the model training, obtain an optimized structure selection model, and use the optimized structure selection model as the new structure selection model.

[0133] S528 Structure selection: Input the second data into the structure selection model to obtain the structural element parameter of the second data.

[0134] S529 Structure optimization: Apply the structural element parameters of the second data to the morphological filter to obtain an optimized morphological filter, and use the optimized morphological filter as the new morphological filter.

[0135] S6 Third processing: Use a preset morphological filter to perform an opening operation on the second data to obtain a filtering result, denoted as the third data.

[0136] S7 Model construction: Construct an electrical fault identification model. The electrical fault identification model can use decision tree models, support vector machine models, multi-layer perceptrons, convolutional neural networks, recurrent neural networks, random forest models, and gradient boosting models as basic models.

[0137] In this embodiment, a multi-layer perceptron is used to construct an electrical fault identification model.

[0138] S71 Rejection setting: Includes S711 First acquisition, S712 First sorting, S713 Second sorting, S714 Second calculation, S715 First judgment, and S716 Data rejection, as Figure 5 shown.

[0139] S711 First acquisition: Collect electrical equipment data when the electrical equipment is in a normal operating state, denoted as the first reference data. When all the data of the electrical equipment fluctuates within the specified normal range, it indicates that the electrical equipment is in a normal state.

[0140] S712 First sorting: Record the timestamps corresponding to the first reference data, and sort the first reference data in chronological order to obtain a reference sequence.

[0141] S713 Second sorting: Sort the historical electrical equipment data collected at different times in chronological order to obtain several comparison sequences.

[0142] S714 Second calculation: Calculate the correlation coefficient between each reference sequence and the comparison sequence at each moment, and perform a weighted average of the correlation coefficients at each moment to obtain the grey correlation degree between the reference sequence and the comparison sequence.

[0143] S715 First judgment: Set a preset correlation degree threshold according to the actual situation, and judge whether the calculated grey correlation degree is greater than the preset correlation degree threshold.

[0144] If so, no processing is performed.

[0145] If not, mark the comparison sequences with grey correlation degrees not greater than the preset correlation degree threshold as interference sequences, and then perform the data rejection step;

[0146] S716 Data Exclusion: According to the marked interference sequences, delete the data corresponding to the marked interference sequences from the historical electrical equipment data, and use the remaining historical electrical equipment data after deletion as the new historical electrical equipment data.

[0147] S72 Historical Data Processing: Based on a preset observation matrix and a preset sparse basis, use the compressive sensing algorithm to compress the collected historical electrical equipment data to obtain the first historical data. Based on the preset sparse basis, use the orthogonal matching pursuit algorithm to reconstruct the first historical data to obtain the second historical data. Use the discrete wavelet transform algorithm to decompose the second historical data, and use the decomposed data as the new second historical data. Use a preset morphological filter to perform an opening operation on the second historical data to obtain the filtering result, denoted as the third historical data, and use the third historical data as the new historical electrical equipment data.

[0148] S8 Model Training: Input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault identification model for model training. Define the cross-entropy loss function as the loss function of the electrical fault identification model. By minimizing the cross-entropy loss function, obtain the optimized electrical fault identification model, and use the optimized electrical fault identification model as the new electrical fault identification model.

[0149] S9 Fault Identification: Input the third data into the electrical fault identification model to obtain the fault type label of the third data.

[0150] In this embodiment, the compressive sensing algorithm is used to collect data at a rate far lower than the Nyquist sampling rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the influence of electromagnetic interference and signal distortion on the data during transmission, and improves the transmission quality of the data. In addition, the compressed data is reconstructed through the reconstruction algorithm to make up for the interference loss of the data. At the same time, the morphological filter is used to effectively remove the noise and interference signals in the data, highlight the characteristics of the data, make the collected data smoother and clearer, improve the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, help to detect electrical equipment faults in a timely manner and take corresponding maintenance measures, and ensure the safe and stable operation of the electrical system.

[0151] Embodiment 2: This embodiment discloses a building electrical safety detection system, and the system includes:

[0152] The first acquisition module is used to acquire real-time electrical equipment data.

[0153] The second acquisition module is used to acquire historical electrical equipment data and the corresponding fault type labels.

[0154] The first processing module is used to compress the collected real-time electrical equipment data by using a compressive sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data.

[0155] The second processing module is used to reconstruct the first data by using a reconstruction algorithm based on the preset sparse basis to obtain second data.

[0156] The wavelet decomposition module is used to decompose the second data by using wavelet transform, and use the decomposed data as the new second data.

[0157] The third processing module is used to filter the second data by using a preset morphological filter to obtain third data.

[0158] The model construction module is used to construct an electrical fault identification model.

[0159] The model training module is used to input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault identification model for model training to obtain an optimized electrical fault identification model, and use the optimized electrical fault identification model as the new electrical fault identification model.

[0160] The fault identification module is used to input the third data into the electrical fault identification model to obtain the fault type label of the third data.

[0161] In this embodiment, based on the first processing module using a compressive sensing algorithm, data is collected at a rate far lower than the Nyquist sampling rate, greatly reducing the amount of data that needs to be transmitted and processed, reducing the influence of electromagnetic interference and signal distortion on the data during transmission, and improving the transmission quality of the data. In addition, based on the second processing module, the compressed data is reconstructed by using a reconstruction algorithm to make up for the interference loss of the data. At the same time, based on the third processing module using a morphological filter, the noise and interference signals in the data are effectively removed, highlighting the characteristics of the data, making the collected data smoother and clearer, improving the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helping to timely detect electrical equipment faults and take corresponding maintenance measures, and ensuring the safe and stable operation of the electrical system.

[0162] The above are all the preferred embodiments of this application. The protection scope of this application is not limited by this. Therefore, all equivalent changes made according to the structure, shape, and principle of this application should be covered within the protection scope of this application.

Claims

1. A building electrical safety detection method, characterized in that: include: First collection: collect real-time electrical equipment data; Second collection: collect historical electrical equipment data and corresponding fault type labels; Matrix modeling: Building electrical vector matrices based on collected real-time electrical equipment data; First decomposition: Use component analysis to decompose the electrical vector matrix to obtain the component matrix; Generate basis vectors: record the vectors in the component matrix as candidate basis vectors; Filtering basis vectors: clustering the candidate basis vectors using a clustering algorithm, and filtering out the candidate basis vectors based on the clustering results. The filtered candidate basis vectors are recorded as filtered basis vectors. Combined basis vectors: Combine the filtered basis vectors and use the combined basis vectors as the preset sparse basis; First processing: based on a preset observation matrix and a preset sparse basis, a compressed sensing algorithm is used to compress the collected real-time electrical equipment data to obtain first data; Second processing: reconstructing the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; Third processing: using a preset morphological filter to filter the second data to obtain third data; Build model: Build electrical fault identification model; Model training: Input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; Fault identification: The third data is input into the electrical fault identification model to obtain a fault type label of the third data.

2. The building electrical safety detection method according to claim 1, characterized in that: After executing the second acquisition step and before executing the first processing step, the method further includes: Dimension setting: set the original signal dimension and measurement value dimension; Ratio setting: Set the ratio of random elements and deterministic elements, and calculate the number of random elements and the number of deterministic elements based on the preset number of elements; First generation: Based on the number of random elements, random elements are generated using a random matrix generation method; Second generation: Corresponding and associating important features of preset electrical equipment with deterministic elements, and assigning values ​​to the deterministic elements; Construct a matrix: Based on the random elements and the assigned deterministic elements, construct an observation matrix, and use the constructed observation matrix as the new observation matrix.

3. The building electrical safety detection method according to claim 2, characterized in that: After executing the step of constructing the matrix and before executing the step of the first processing, the method further includes: First calculation: calculate the mutual correlation coefficient between the observation matrix and the sparse basis; First optimization: define the optimization goal as minimizing the mutual correlation coefficient, define the objective function based on the optimization goal, use the optimization algorithm to minimize the objective function, iteratively optimize the observation matrix, and use the optimized observation matrix as the new observation matrix.

4. The building electrical safety detection method according to claim 1, characterized in that: After executing the second processing step and before executing the third processing step, the method further includes: The third collection: collecting different types of compressed sensing reconstruction data and the corresponding optimal structural element parameters; First labeling: using the best structural element parameters collected as structural labels, labeling the compressed sensing reconstruction data, and recording the labeled data as structural data; Model construction: construct a structural selection model; First training: input the structural data into the structure selection model for model training to obtain an optimized structure selection model, and use the optimized structure selection model as a new structure selection model; Structure selection: inputting the second data into the structure selection model to obtain the structural element parameters of the second data; Structural optimization: The morphological filter is optimized based on the structural element parameters of the second data, and the optimized morphological filter is used as a new morphological filter.

5. The building electrical safety detection method according to claim 4, characterized in that: After executing the third acquisition step and before executing the first marking step, the method further includes: Fourth collection: collecting compressed sensing reconstruction data of different scales and the corresponding optimal structural element parameters; Data merging: merging the collected compressed sensing reconstruction data of different types with compressed sensing reconstruction data of different scales, and using the merged data as new compressed sensing reconstruction data; First label: Based on the type and scale of the compressed sensing reconstructed data, the compressed sensing reconstructed data is labeled with the corresponding compressed sensing reconstructed data type label and compressed sensing reconstructed data scale label, and the labeled data is used as new compressed sensing reconstructed data.

6. The building electrical safety detection method according to claim 1, characterized in that: After executing the second processing step and before executing the third processing step, the method further includes: Wavelet decomposition: The second data is decomposed by wavelet transform, and the decomposed data is used as new second data.

7. The building electrical safety detection method according to claim 1, characterized in that: After executing the step of building the model and before executing the step of model training, it also includes: First acquisition: collecting electrical equipment data when the electrical equipment is in normal operation and recording it as first reference data; First sorting: sorting the first reference data in chronological order to obtain a reference sequence; Second sorting: sorting the collected historical electrical equipment data in chronological order to obtain several comparison sequences; Second calculation: calculate the grey correlation degree between the reference sequence and the comparison sequence; First judgment: judge whether the calculated grey correlation degree is greater than the preset correlation degree threshold: If so, no action will be taken; If not, the comparison sequence whose grey correlation degree is not greater than the preset correlation degree threshold is marked as an interference sequence, and then the step of data elimination is performed; Data elimination: Delete the historical electrical equipment data corresponding to the sequence marked as interference, and use the remaining historical electrical equipment data after deletion as new historical electrical equipment data.

8. A building electrical safety detection system, characterized in that: The system is applicable to the method according to any one of claims 1 to 7, and the system comprises: The first acquisition module is used to collect real-time electrical equipment data; The second acquisition module is used to collect historical electrical equipment data and corresponding fault type labels; Matrix modeling module, used to build electrical vector matrices based on collected real-time electrical equipment data; The first decomposition module is used to decompose the electrical vector matrix by using a component analysis method to obtain a component matrix; A basis vector generation module is used to record the vectors in the component matrix as candidate basis vectors; A basis vector screening module is used to cluster the candidate basis vectors using a clustering algorithm, and screen out the candidate basis vectors according to the clustering results, and record the screened candidate basis vectors as screening basis vectors; A combined basis vector module is used to combine the filtered basis vectors and use the combined basis vectors as a preset sparse basis; A first processing module, configured to compress the collected real-time electrical equipment data using a compression sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data; A second processing module, configured to reconstruct the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; A third processing module, used for filtering the second data using a preset morphological filter to obtain third data; A model building module for building an electrical fault identification model; A model training module is used to input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; The fault identification module is used to input the third data into the electrical fault identification model to obtain a fault type label of the third data.

Citation Information

Patent Citations

  • Electric automation equipment fault detection system

    CN117970005A

  • Edge computing data processing method, device and equipment and readable storage medium

    CN114491403A

  • Data compression method for wireless sensing network of power distribution network

    CN116089384A

  • Battery replacement cabinet fault diagnosis method and device, electronic equipment and storage medium

    CN118427690A