A method and system for automatic detection of electrical equipment
By analyzing the degree and change of electrical noise interference, calculating abnormal characteristic values and optimal distances for electrical data cleaning, the problem of electrical noise interference in electrical equipment detection is solved, and detection accuracy and data quality are improved.
Patent Information
- Application Number
- CN202410888198.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Electrical equipment is interfered by electrical noise during the detection process, resulting in poor quality of electrical data collected and reducing the accuracy of automated detection.
By obtaining the degree of electrical noise interference and change in each dimension, calculating abnormal feature values and optimal distances, cleaning electrical data, and obtaining pure electrical data to improve detection accuracy.
It effectively eliminates electrical noise interference and improves the accuracy and data quality of automated detection of electrical equipment.
Smart Images

Figure CN118427535B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic detection of electrical equipment, and in particular to an automatic detection method and system for electrical equipment. Background Art
[0002] Electrical equipment refers to the generators, transformers, power lines, circuit breakers and other equipment used to generate, transmit, distribute and control electrical energy in the power system. The stable operation of electrical equipment is of great significance to the safety of the power grid, so the stability and fault detection of electrical equipment is indispensable in the operation of electrical equipment.
[0003] In the related technology, various sensors are usually used to collect various electrical data of electrical equipment and analyze the electrical data to realize automatic detection of electrical equipment. However, in the actual detection process, various electrical data will inevitably be interfered by electrical noise, resulting in poor quality of the collected electrical data, thereby reducing the accuracy of automatic detection of electrical equipment. Summary of the invention
[0004] In order to solve the technical problem that electrical data will inevitably be interfered by electrical noise, resulting in poor quality of collected electrical data, thereby reducing the accuracy of automatic detection of electrical equipment, the purpose of the present invention is to provide an automatic detection method and system for electrical equipment, and the technical solutions adopted are as follows:
[0005] The present invention proposes an automatic detection method for electrical equipment, the method comprising:
[0006] Obtain electrical data of each dimension of the electrical equipment under test at different times within a preset period;
[0007] Taking any dimension as the target dimension, according to the change of electrical data at different moments in the target dimension and the distribution of electrical data at each moment in a preset time window at each moment, the degree of electrical noise interference in the target dimension and the degree of change of electrical data at each moment in the target dimension are obtained;
[0008] Take any moment as the target moment, and take the points formed by the electrical data of all dimensions at the target moment as the electrical data points at the target moment; in the preset time window of the target moment, obtain the abnormal characteristic value of the electrical data point at the target moment according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension; obtain the optimal distance between any two electrical data points according to the difference in the electrical data of the same dimension and the difference in the time, the degree of electrical noise interference in each dimension, and the abnormal characteristic value of the electrical data point; clean the electrical data based on the optimal distance to obtain pure electrical data;
[0009] The electrical equipment to be tested is automatically tested based on the pure electrical data.
[0010] Further, obtaining the degree of electrical noise interference in the target dimension and the degree of change of electrical data at each moment in the target dimension includes:
[0011] Map the electrical data at each moment in the target dimension into a two-dimensional coordinate system to obtain different two-dimensional data points;
[0012] According to the difference in the positions of the two-dimensional data points, the degree of change of the electrical data at each moment in the target dimension is obtained;
[0013] Performing negative correlation normalization processing on the degree of change to obtain weight parameters of electrical data at each moment in the target dimension;
[0014] The electrical noise interference degree of the target dimension is obtained according to the weight parameters of the electrical data at each moment in the target dimension and the distribution of the electrical data at each moment within the preset time window of each moment.
[0015] Further, obtaining the electrical noise interference degree of the target dimension according to the weight parameter of the electrical data at each moment in the target dimension and the distribution of the electrical data at each moment within the preset time window of each moment includes:
[0016] Take any moment as the moment to be tested;
[0017] In a preset time window of the time to be tested, according to the difference between the electrical data at the time to be tested in the target dimension and the electrical data at other times except the time to be tested, the mutation degree of the electrical data at the time to be tested in the target dimension is obtained;
[0018] The electrical noise interference degree of the target dimension is obtained by weighting and adjusting the mutation degree using the weight parameter of the electrical data at each moment in the target dimension and performing normalization processing.
[0019] Further, the obtaining of abnormal characteristic values of electrical data points at the target time includes:
[0020] In a preset time window at the target moment, according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension, an initial abnormal value of the electrical data at the target moment in each dimension is obtained;
[0021] The initial abnormal values of the electrical data of all dimensions at the target time are integrated and normalized to obtain the abnormal characteristic values of the electrical data points at the target time.
[0022] Further, obtaining the optimal distance between any two electrical data points includes:
[0023] Taking any two electrical data points as the first data point and the second data point;
[0024] Obtaining a data distance value of the same dimension between the first data point and the second data point according to a difference in electrical data of the same dimension between the first data point and the second data point;
[0025] Obtaining a time distance value between the first data point and the second data point according to a difference in time between the first data point and the second data point;
[0026] According to the abnormal characteristic values of the first data point and the second data point and the degree of electrical noise interference in each dimension, the data distance value and the time distance value are adjusted to obtain the optimal distance between the first data point and the second data point.
[0027] Furthermore, the calculation formula for the optimal distance between the first data point and the second data point is:
[0028]
[0029] in, represents the optimal distance between the first data point and the second data point; represents the average of the abnormal feature values of the first data point and the second data point; Indicates The degree of electrical noise interference in each dimension; Indicates the first data point Dimensions of electrical data; Indicates the second data point Dimensions of electrical data; The distance between the first data point and the second data point The data distance value of the dimension; Indicates the number of dimensions; Indicates the time at which the first data point is located; Indicates the time at which the second data point is located; Represents the temporal distance value between the first data point and the second data point.
[0030] Furthermore, the cleaning of the electrical data based on the optimal distance to obtain pure electrical data includes:
[0031] Iteratively optimize the parameter K in the LOF algorithm according to the difference of the optimal distance between each electrical data point and the Euclidean distance between each electrical data point to obtain the optimal K distance neighborhood of each electrical data point;
[0032] Based on the LOF algorithm, obtaining outlier electrical data points according to the optimal K distance neighborhood of each electrical data point and the optimal distance between electrical data points;
[0033] The time when the outlier data point is located is regarded as the abnormal time, the electrical data of each dimension at the abnormal time is removed, and interpolation processing is performed to obtain pure electrical data of each dimension.
[0034] Further, obtaining the optimal K distance neighborhood of each electrical data point includes:
[0035] Take any electrical data point as the target data point and initialize the parameter K;
[0036] If the parameter K is not greater than a preset value, a K distance neighborhood of the target data point is constructed based on the parameter K, and the Euclidean distance between the target data point and the electrical data point on the edge of the K distance neighborhood is used as the K neighborhood distance of the target data point; according to the difference between the optimal distances between the target data point and other electrical data points in the K distance neighborhood except the target data point, and the K neighborhood distance of the target data point, an evaluation parameter of the K distance neighborhood is obtained, the parameter K is increased, and the iterative process is continued;
[0037] The calculation formula of the evaluation parameter is:
[0038]
[0039] in, represents the evaluation parameter of the K distance neighborhood; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; represents the number of electrical data points in the K-distance neighborhood; Represents the K neighboring distances of the target data point; represents the normalization function;
[0040] If the parameter K is greater than a preset value, the iterative process is stopped, and the K distance neighborhood corresponding to the minimum value of the evaluation parameter is used as the optimal K distance neighborhood of the target data point.
[0041] Furthermore, the automatic detection of the electrical equipment to be tested based on the pure electrical data includes:
[0042] The pure electrical data of each dimension is input into the electrical equipment fault analysis model to perform automated detection on the electrical equipment to be tested.
[0043] The present invention also proposes an automatic detection system for electrical equipment, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any one of the steps of an automatic detection method for electrical equipment.
[0044] The present invention has the following beneficial effects:
[0045] The present invention takes into account that in the actual detection process, various electrical data will inevitably be interfered by electrical noise, resulting in poor quality of the collected electrical data, thereby reducing the accuracy of automatic detection of electrical equipment. Therefore, the present invention first collects the electrical data of each dimension of the electrical equipment to be tested at different times. Taking into account that the electrical data in different dimensions are affected by electrical noise to different degrees, the degree of electrical noise interference in each dimension can be reflected by the obtained electrical noise interference degree, and the influence of non-electrical noise factors on the change of electrical data is eliminated, so that the analysis of the degree of electrical noise interference is more accurate. At the same time, the change trend of the electrical data at each moment is reflected by the obtained change degree, which is convenient for the subsequent analysis of abnormal characteristic values of electrical data points based on the change degree; considering that the existing methods usually The local density is determined based on the Euclidean distance between each point, and data cleaning is achieved. However, only the Euclidean distance is considered without considering the normal changes in electrical data, which will result in the cleaning of the electrical data failing to achieve the desired effect. Therefore, the present invention first reflects the possibility of abnormality in each electrical data point through abnormal characteristic values, and combines the differences in electrical data of the same dimension between electrical data points and the differences at the time, the degree of electrical noise interference in each dimension, and the abnormal characteristic values of the electrical data points to eliminate the influence of the normal changes in electrical data on the distance measurement between electrical data points, so that the electrical data can be cleaned more effectively based on the optimal distance between electrical data points, thereby obtaining higher quality pure electrical data, thereby improving the accuracy of automated detection of electrical equipment to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A flow chart of an automatic detection method for electrical equipment provided by one embodiment of the present invention;
[0048] Figure 2 A flow chart of a method for obtaining the degree of electrical noise interference in a target dimension and the degree of change of electrical data at each moment in the target dimension provided by an embodiment of the present invention;
[0049] Figure 3 A flow chart of a method for obtaining an optimal distance between any two electrical data points provided by an embodiment of the present invention;
[0050] Figure 4 A flow chart of an electrical data cleaning method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of an electrical equipment automatic detection method and system proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0052] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0053] The specific scheme of an automatic detection method and system for electrical equipment provided by the present invention is described in detail below with reference to the accompanying drawings.
[0054] See also Figure 1 , which shows a flow chart of an electrical equipment automatic detection method provided by an embodiment of the present invention, the method comprising:
[0055] Step S1: Acquire electrical data of each dimension of the electrical equipment to be tested at different times within a preset period.
[0056] Electrical equipment refers to the general term for generators, transformers, power lines, circuit breakers and other equipment used to generate, transmit, distribute and control electrical energy in the power system. The stable operation of electrical equipment is of great significance to the security of the power grid. Therefore, the stability and fault detection of electrical equipment is indispensable in the operation of electrical equipment. In the related technology, various sensors are usually used to collect various electrical data of electrical equipment and analyze the electrical data to realize automatic detection of electrical equipment. However, in the actual detection process, various electrical data will inevitably be interfered by electrical noise, resulting in poor quality of the collected electrical data, thereby reducing the accuracy of automatic detection of electrical equipment. Therefore, an embodiment of the present invention proposes an automatic detection method for electrical equipment to solve this problem.
[0057] The embodiment of the present invention first determines the electrical equipment to be tested, which may be a generator, a transformer, a power line or a circuit breaker. In one embodiment of the present invention, a transformer is selected as the electrical equipment to be tested, and related sensors such as a current sensor and a voltage sensor are used to collect electrical data of each dimension of the electrical equipment to be tested at different times within a preset period, wherein the range of the preset period is generally , the unit is hour. In one embodiment of the present invention, the preset period is set to 2 hours. The specific value of the preset period can also be set by the implementer according to the specific implementation scenario, which is not limited here. Each dimension corresponds to a type of electrical parameter. The electrical parameters include at least current, voltage, resistance, electric power and reactance, etc. In actual scenarios, the type of dimension can also be appropriately expanded. When using relevant sensors to collect electrical data of each dimension, it is necessary to ensure that the collection frequency of each sensor is the same so that the electrical data of all dimensions are included at the same time. In one embodiment of the present invention, the collection frequency of each type of sensor is set to 1KHz. The collection frequency can also be set by the implementer according to the specific implementation scenario, which is not limited here.
[0058] At this point, the electrical data of each dimension of the electrical equipment to be tested at different times have been collected, and the collected electrical data can be used to perform automated testing on the electrical equipment to be tested.
[0059] Step S2: Take any dimension as the target dimension, and obtain the degree of electrical noise interference in the target dimension and the degree of change of the electrical data at each moment in the target dimension according to the changes in the electrical data at different moments in the target dimension and the distribution of the electrical data at each moment in the preset time window of each moment.
[0060] In the actual acquisition process, the electrical noise in the electrical equipment to be tested will interfere with the electrical data of each dimension collected by the sensor, so that there are more electrical data in each dimension that are affected by the electrical noise. The electrical data needs to be cleaned later to improve the quality of the electrical data, thereby improving the accuracy of automatic detection of electrical equipment. Data cleaning mainly includes the removal and filling of abnormal data. In existing methods, such as the Local Outlier Factor (LOF) algorithm, it is usually based on the characteristics of large differences between abnormal data and normal data affected by electrical noise, and analyzes the local density of data to extract outlier data. However, since the electrical equipment to be tested will change with the actual operation requirements during operation, there are also electrical data with normal changes in each dimension. If only the characteristics of large differences between abnormal data and normal data are considered, the effect of subsequent data cleaning will be reduced. Therefore, the embodiment of the present invention subsequently analyzes the changes and distribution characteristics of the electrical data in each dimension, thereby improving the effect of final data cleaning and the accuracy of automatic detection of the electrical equipment to be tested.
[0061] Since the electrical data in different dimensions are affected by electrical noise to different degrees, and the electrical data affected by electrical noise is quite different from the normal electrical data, and considering that the electrical data is not only affected by electrical noise, but also changes with the actual operation requirements of the electrical equipment, so that there are certain differences between the normal electrical data, in order to accurately analyze the degree to which the electrical data of each dimension is disturbed by electrical noise, it is necessary to eliminate the influence of the factor that the electrical data in each dimension has normal changes. Therefore, the embodiment of the present invention first takes any one dimension as the target dimension, and analyzes the changes of the electrical data at different times in the target dimension, as well as the changes of each dimension in the preset time window at each time. The distribution of electrical data at each moment is analyzed, and the degree of electrical noise interference obtained reflects the degree to which the target dimension is interfered by electrical noise, and eliminates the influence of changes in electrical data as the actual operation requirements of electrical equipment change, making the calculation and analysis of the degree of electrical noise interference more accurate. At the same time, the obtained degree of change reflects the change trend of electrical data at each moment in the target dimension, which is convenient for subsequent analysis of abnormal characteristic values of electrical data points based on the degree of change. The length of the preset time window is set to 3, that is, the preset time window contains electrical data at 3 different moments. The specific length of the preset time window can also be set by the implementer according to the specific implementation scenario, which is not limited here.
[0062] Preferably, in one embodiment of the present invention, the method for obtaining the degree of electrical noise interference in the target dimension and the degree of change of electrical data at each moment in the target dimension specifically includes:
[0063] See also Figure 2, which shows a flow chart of a method for obtaining the degree of electrical noise interference in a target dimension and the degree of change of electrical data at each moment in the target dimension provided by an embodiment of the present invention.
[0064] Step S201: In order to more accurately analyze the changing characteristics of the data in the target dimension, the electrical data at each moment in the target dimension can be mapped to a two-dimensional coordinate system to obtain different two-dimensional data points. It should be noted that the horizontal axis of the two-dimensional coordinate system represents time, and the vertical axis represents the electrical data of the target dimension.
[0065] Step S202: Since electrical noise and changes in the operating requirements of the electrical equipment to be tested will cause changes in electrical data, the changes caused by electrical noise are abnormal changes, and the changes caused by changes in the operating requirements of the electrical equipment to be tested are normal changes. In addition, the degree of change in the electrical data caused by normal changes is greater than that caused by abnormal changes, that is, the degree of change in the relative position of each two-dimensional data point caused by normal changes is greater. Therefore, the degree of change of the electrical data at each moment in the target dimension can be obtained according to the difference in the positions of each two-dimensional data point. The change trend of the electrical data at each moment in the target dimension can be reflected by the degree of change. In the subsequent analysis of the degree of interference of the target dimension with electrical noise, the influence of changes in the electrical data as the actual operating requirements of the electrical equipment change can be eliminated based on the change trend, so that the calculation and analysis of the degree of interference of the electrical noise is more accurate. At the same time, in the subsequent steps, the abnormal characteristic values of the electrical data points can also be analyzed based on the degree of change.
[0066] In one embodiment of the present invention, curve fitting can be performed on all two-dimensional data points to obtain a fitting curve; the absolute value of the slope of the point corresponding to the fitting curve at each moment is used as the degree of change of the electrical data at each moment in the target dimension, wherein the curve fitting method can be selected from the least squares method or polynomial curve fitting, etc., which is not limited or elaborated here.
[0067] In other embodiments of the present invention, the absolute value of the slope of the line between the two-dimensional data point at each moment and the two-dimensional data point at the next adjacent moment may be used as the degree of change of the electrical data at each moment in the target dimension.
[0068] Step S203: The greater the degree of change of each electrical data, the more likely the change in the electrical data is caused by changes in normal operating requirements, and the less likely it is caused by electrical noise. Therefore, the degree of change can be negatively correlated and normalized to obtain the weight parameters of the electrical data at each moment in the target dimension. The weight parameters can then be used to optimize and adjust the analysis of the degree of electrical noise interference, eliminate the impact of changes in operating requirements on electrical data changes, and improve the accuracy of the analysis of electrical noise interference on the target dimension.
[0069] Step S204: Since electrical noise may cause mutations in electrical data locally, and in order to eliminate the impact of changes in electrical equipment operating requirements that may also cause changes in electrical data, the degree of electrical noise interference in the target dimension can be obtained based on the weight parameters of the electrical data at each moment in the target dimension and the distribution of the electrical data at each moment within a preset time window at each moment. The obtained degree of electrical noise interference reflects the degree to which the electrical data in the target dimension is interfered by electrical noise. Subsequently, the distance measurement between electrical data points can be optimized and adjusted based on the degree of electrical noise interference, thereby improving the effect of electrical data cleaning.
[0070] Preferably, in one embodiment of the present invention, the method for obtaining the degree of electrical noise interference in the target dimension specifically includes:
[0071] Take any moment as the moment to be tested, and within the preset time window of the moment to be tested, obtain the degree of mutation of the electrical data at the moment to be tested in the target dimension based on the difference between the electrical data at the moment to be tested in the target dimension and the electrical data at other moments except the moment to be tested. The greater the degree of mutation, the greater the difference between the electrical data at the moment to be tested and other electrical data in the preset time window.
[0072] In one embodiment of the present invention, within a preset time window of the time to be tested, the absolute value of the difference between the electrical data at the time to be tested in the target dimension and each other electrical data except the time to be tested can be used as the data difference between the electrical data at the time to be tested and each other electrical data in the preset time window, and the average value of the data difference between the electrical data at the time to be tested and all other electrical data in the preset time window can be used as the mutation degree of the electrical data at the time to be tested in the target dimension.
[0073] In other embodiments of the present invention, the degree of mutation can also be calculated based on the deviation of the electrical data at the target dimension at the time to be measured relative to the overall data in the preset time window, that is, the average value of all electrical data in the preset time window at the time to be measured in the target dimension is used as the overall data value of the target dimension in the preset time window, and the absolute value of the difference between the electrical data at the time to be measured in the target dimension and the overall data value is used as the degree of mutation of the electrical data in the target dimension at the time to be measured.
[0074] The degree of electrical noise interference in the target dimension is obtained by weighting and adjusting the mutation degree using the weight parameter of the electrical data at each moment in the target dimension and performing normalization processing. The expression of the degree of electrical noise interference can be specifically, for example, as follows:
[0075]
[0076]
[0077] in, Indicates the degree of electrical noise interference in the target dimension; Indicates the first The weight parameter of the electrical data at each moment; Indicates the first The degree of mutation of electrical data at a certain moment; Indicates the first The degree of change of electrical data at each moment; represents the hyperbolic tangent function; represents the normalization function, then Represents the normalization treatment of negative correlation.
[0078] In the process of obtaining the electrical noise interference degree of the target dimension, the electrical noise interference degree The larger it is, the greater the degree to which the electrical data in the target dimension is disturbed by electrical noise. The larger the value, the greater the difference between the electrical data at each moment and other electrical data within the preset time window, indicating that the electrical data at that moment has changed more. The larger the value, the more likely the change in electrical data at that moment is caused by changes in the operating requirements of the electrical equipment, and the less likely it is caused by electrical noise. Therefore, when calculating the degree of electrical noise interference, When the mutation degree Larger weights are smaller, so the degree of change needs to be Perform negative correlation normalization and use weight parameters The degree of mutation Perform weighted adjustments to reduce the degree of interference of electrical data changes caused by non-electrical noise factors on the calculated electrical noise The influence of electrical noise interference is calculated by using the hyperbolic tangent function. Limited to range, which is convenient for subsequent calculation and analysis.
[0079] In one embodiment of the present invention, the normalization processing can be specifically, for example, maximum and minimum value normalization processing, and the normalization in subsequent steps can all adopt maximum and minimum value normalization processing. In other embodiments of the present invention, other normalization methods can be selected according to the specific range of numerical values, which will not be described in detail.
[0080] The electrical noise interference level in each dimension can be obtained by the same method as above.
[0081] Step S3: Take any moment as the target moment, and take the points formed by the electrical data of all dimensions at the target moment as the electrical data points at the target moment; in the preset time window of the target moment, obtain the abnormal characteristic value of the electrical data point at the target moment according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension; obtain the optimal distance between any two electrical data points according to the difference in the electrical data of the same dimension between any two electrical data points and the difference in the moments, the degree of electrical noise interference in each dimension, and the abnormal characteristic value of the electrical data point; clean the electrical data based on the optimal distance to obtain pure electrical data.
[0082] Among the existing methods, for example, the Local Outlier Factor (LOF) algorithm is an algorithm for detecting outliers in a data set. The basic principle is to identify outliers based on the local density of data points. Therefore, the embodiment of the present invention first takes any moment as the target moment, and takes the point composed of electrical data of all dimensions at the target moment as the electrical data point at the target moment. The electrical data point is a point in a multidimensional space. Subsequently, the local density of each electrical data point can be analyzed, thereby achieving electrical data cleaning, improving the quality of electrical data and the accuracy of automated detection of electrical equipment.
[0083] Since the electrical data in each dimension may be affected by electrical noise, the electrical data points composed of electrical data in different dimensions at the same time may also be disturbed by electrical noise and become abnormal. Since the degree of change obtained in the above steps can reflect the change trend of the electrical data at each moment in the target dimension, when a certain electrical data in each dimension is disturbed by noise, the difference in the degree of change between the electrical data and other electrical data in the surrounding neighborhood is large. Therefore, the difference in the degree of change between the electrical data at the target moment in each dimension and other electrical data except the target moment can be analyzed, and the degree to which the electrical data points at the target moment are affected by electrical noise can be reflected by the obtained abnormal characteristic values. Subsequently, the distance measurement between the electrical data points can be optimized by combining the abnormal characteristic values of the electrical data points and the degree of electrical noise interference in each dimension obtained above, thereby improving the accuracy of the local density analysis of the electrical data points and improving the effect of electrical data cleaning.
[0084] Preferably, in one embodiment of the present invention, the method for obtaining the abnormal characteristic value of the electrical data point at the target time specifically includes:
[0085] In a preset time window at the target moment, according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension, an initial abnormal value of the electrical data at the target moment in each dimension is obtained;
[0086] In one embodiment of the present invention, within a preset time window of the target moment, the absolute value of the difference in the degree of change between the electrical data at the target moment and each other electrical data except the target moment in each dimension can be used as the difference in the degree of change between the electrical data at the target moment and each other electrical data in the preset time window, and the average value of the difference in the degree of change between the electrical data at the target moment and all other electrical data in the preset time window can be used as the initial outlier value of the electrical data at the target moment in each dimension.
[0087] In other embodiments of the present invention, the average value of the degree of change of all electrical data within a preset time window at the target moment in each dimension can be used as the overall degree of change of each dimension in the preset time window, and the absolute value of the difference between the degree of change of the electrical data at the target moment in each dimension and the overall degree of change can be used as the initial abnormal value of the electrical data at the target moment in each dimension.
[0088] The initial abnormal values of the electrical data of all dimensions at the target time are integrated and normalized to obtain the abnormal characteristic values of the electrical data points at the target time.
[0089] In one embodiment of the present invention, the initial outliers can be integrated in the form of cumulative multiplication, that is, the cumulative values of the initial outliers of the electrical data of all dimensions at the target time are normalized to obtain the abnormal characteristic values of the electrical data points at the target time.
[0090] In other embodiments of the present invention, the initial outliers may be integrated in a cumulative form, that is, the accumulated values of the initial outliers of the electrical data of all dimensions at the target time are normalized to obtain the abnormal characteristic values of the electrical data points at the target time.
[0091] The calculation formula for the abnormal characteristic value of the electrical data point at the target time is:
[0092]
[0093] in, Indicates the abnormal characteristic value of the electrical data point at the target time; The target time Initial outliers in the electrical data for the dimensions; Indicates the symbol for cumulative multiplication; represents the hyperbolic tangent function.
[0094] In the process of obtaining the abnormal characteristic value of the electrical data point at the target time, the abnormal characteristic value The larger the value, the greater the degree to which the electrical data in the electrical data point is affected by electrical noise. The larger the value is, the greater the difference in the degree of change between the electrical data at the target moment in each dimension and other electrical data in the preset time window is, which further indicates that the electrical data at the target moment in each dimension is more affected by electrical noise, and the larger the abnormal characteristic value is. The larger the value, the greater the initial outlier value of the electrical data of all dimensions at the target time. , get the abnormal characteristic value of the electrical data point , and use the hyperbolic tangent function to convert the electrical noise interference degree Limited to range, which is convenient for subsequent calculation and analysis.
[0095] In the process of analyzing the local density of electrical data points and realizing electrical data cleaning, it is usually necessary to determine the distance measurement between each electrical data point. The existing distance measurement method usually uses the Euclidean distance. However, since the change of the operating requirements of the electrical equipment to be tested will also cause the normal change of the electrical data, if the Euclidean distance between the electrical data points is directly used to analyze the local density, it is impossible to effectively distinguish the normally changing electrical data from the electrical data affected by electrical noise, thereby reducing the effect of subsequent data cleaning. Therefore, the embodiment of the present invention analyzes the difference in electrical data of the same dimension and the difference at the time between any two electrical data points, the degree of electrical noise interference in each dimension, and the abnormal characteristic values of the electrical data points, optimizes the traditional distance measurement method between electrical data points, and obtains the optimal distance between electrical data points.
[0096] Preferably, in one embodiment of the present invention, the method for obtaining the optimal distance between any two electrical data points specifically includes:
[0097] See also Figure 3 , which shows a flow chart of a method for obtaining the optimal distance between any two electrical data points provided by an embodiment of the present invention.
[0098] Step S301: In order to facilitate a clearer subsequent analysis, any two electrical data points may be used as the first data point and the second data point.
[0099] Step S302: obtaining a data distance value of the same dimension between the first data point and the second data point according to a difference in electrical data of the same dimension between the first data point and the second data point.
[0100] Step S303: Obtaining a time distance value between the first data point and the second data point according to the difference in time between the first data point and the second data point.
[0101] Step S304: According to the abnormal characteristic values of the first data point and the second data point and the degree of electrical noise interference in each dimension, the data distance value and the time distance value are adjusted to obtain the optimal distance between the first data point and the second data point. The expression of the optimal distance can be specifically, for example, as follows:
[0102]
[0103] in, represents the optimal distance between the first data point and the second data point; represents the average of the abnormal feature values of the first data point and the second data point; Indicates The degree of electrical noise interference in each dimension; Indicates the first data point Dimensions of electrical data; Indicates the second data point Dimensions of electrical data; The distance between the first data point and the second data point The data distance value of the dimension; Indicates the number of dimensions; Indicates the time at which the first data point is located; Indicates the time at which the second data point is located; Represents the temporal distance value between the first data point and the second data point.
[0104] In the process of obtaining the optimal distance, the embodiment of the present invention uses the optimal distance Instead of the traditional Euclidean distance measurement method between electrical data points, the degree of electrical noise interference The larger the value is, the greater the degree to which the electrical data of each dimension is disturbed by electrical noise. Therefore, the degree of electrical noise interference is used to Amplify the calculation results of dimensional data with high noise levels, highlight the difference between data affected by electrical noise and normal data, and The larger the value, the greater the abnormality of the first data point and the second data point. Therefore, when performing distance measurement, we use Enlarge the distance of the electrical data between the first data point and the second data point. When the degree of abnormality between the first data point and the second data point is small, Larger, this can be achieved through Zoom in on the time distance value The measurement of the distance between the first data point and the second data point makes the time distance value account for a larger proportion in the calculation process, thereby reducing the impact of normal changes in electrical data on distinguishing abnormal data.
[0105] The same method as above can be used to obtain the optimal distance between any two electrical data points. The optimal distance is used instead of the traditional Euclidean distance to measure the distance between electrical data points. The electrical data can then be cleaned based on the optimal distance to obtain pure electrical data, thereby improving the quality of the electrical data and improving the accuracy of subsequent automated testing of the electrical equipment to be tested.
[0106] Preferably, in one embodiment of the present invention, the method for cleaning electrical data specifically includes:
[0107] See also Figure 4 , which shows a flow chart of an electrical data cleaning method provided by an embodiment of the present invention.
[0108] Step S311: Data cleaning mainly includes detecting abnormal data, removing and filling the abnormal data. In one embodiment of the present invention, the LOF algorithm can be used to detect abnormal electrical data affected by electrical noise. The parameter K in the LOF algorithm is used to construct the K distance neighborhood of the electrical data point, and the extraction of abnormal data is achieved by analyzing the local density of each electrical data point in the K distance neighborhood. Therefore, the parameter K is a key parameter that affects the final detection result. In order to improve the effect of subsequent data cleaning, the embodiment of the present invention first iteratively optimizes the parameter K in the LOF algorithm according to the difference in the optimal distance between each electrical data point and the Euclidean distance between each electrical data point, and obtains the optimal K distance neighborhood of each electrical data point. Subsequently, based on the LOF algorithm, the local density of each electrical data point can be accurately analyzed in the optimal K distance neighborhood, thereby accurately extracting the outlier electrical data points.
[0109] Preferably, in one embodiment of the present invention, the method for obtaining the optimal K distance neighborhood of each electrical data point specifically includes:
[0110] Any electrical data point is taken as the target data point, and the parameter K is initialized. The initial value of the parameter K usually needs to be a smaller value, generally an integer of 1 to 3. In one embodiment of the present invention, the parameter K is initialized to 1. In other embodiments of the present invention, the parameter K can also be set by the implementer according to the specific implementation scenario, which is not limited here.
[0111] If the parameter K is not greater than the preset value, a K distance neighborhood of the target data point is constructed based on the parameter K. This construction process is a link in the LOF algorithm and will not be described in detail here. The Euclidean distance between the target data point and the electrical data point on the edge of the K distance neighborhood is used as the K neighborhood distance of the target data point; based on the difference in the optimal distance between the target data point and other electrical data points in the K distance neighborhood except the target data point, and the K neighborhood distance of the target data point, the evaluation parameters of the K distance neighborhood are obtained, the parameter K is increased, and the iterative process is continued, wherein the value of the parameter K increased each iteration is set to 1.
[0112] The calculation formula of the evaluation parameters is:
[0113]
[0114] in, represents the evaluation parameter of the K distance neighborhood; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; Represents the number of electrical data points in the K distance neighborhood. Since the initial value of parameter K is 1 and parameter K increases continuously during the iteration process, ; Represents the K neighboring distances of the target data point; Represents the normalization function.
[0115] In the process of obtaining the evaluation parameters of the K distance neighborhood, the evaluation parameters The smaller it is, the better the K distance neighborhood is. Since the electrical data of each dimension changes continuously during the operation of the electrical equipment to be tested, in order to ensure that the local density of normal electrical data points is relatively large, it is necessary to make the difference in the optimal distance between the target data point and other electrical data points in the K distance neighborhood is smaller, so is added to the calculation process of the evaluation parameters. At the same time, in order to further avoid the small difference in local density between normal electrical data points and abnormal electrical data points, As another parameter for calculating the evaluation parameter, the K neighbor distances of the target data point The smaller it is, the smaller the calculated evaluation parameter is.
[0116] If the parameter K is greater than a preset value, the iteration process is stopped, and the K distance neighborhood corresponding to the minimum value of the evaluation parameter is used as the optimal K distance neighborhood of the target data point. The preset value is generally an integer between 20 and 50. In one embodiment of the present invention, the preset value is set to 30. The preset value can also be set by the implementer according to the specific implementation scenario, and is not limited here.
[0117] Step S312: Based on the LOF algorithm, outlier electrical data points are obtained according to the optimal K distance neighborhood of each electrical data point and the optimal distance between electrical data points. The LOF algorithm is a technical means well known to those skilled in the art and will not be described in detail here.
[0118] Step S313: The time when the outlier data point is located is regarded as the abnormal time, the electrical data of each dimension at the abnormal time is removed, and interpolation processing is performed to obtain pure electrical data of each dimension. The interpolation method can be selected, for example, spline interpolation method or bilinear interpolation method, which is not limited or elaborated here.
[0119] At this point, the cleaning of electrical data has been achieved and the quality of electrical data has been improved. Subsequently, the electrical equipment to be tested can be automatically tested based on the pure electrical data, thereby improving the accuracy of automated testing.
[0120] Step S4: Performing automated testing on the electrical equipment to be tested based on the pure electrical data.
[0121] After cleaning the electrical data of each dimension, the interference of electrical noise is eliminated, so that the quality of the electrical data of each dimension is greatly improved. Therefore, the electrical equipment to be tested can be automatically tested based on the pure electrical data, thereby improving the accuracy of fault detection of the electrical equipment to be tested.
[0122] Preferably, in one embodiment of the present invention, pure electrical data of each dimension can be input into an electrical equipment fault analysis model, thereby realizing automated detection of the electrical equipment to be tested, wherein the electrical equipment fault analysis model can predict and diagnose faults in the operation of the electrical equipment based on the input electrical data, which is a technical means well known to those skilled in the art and will not be elaborated here.
[0123] An embodiment of the present invention provides an automatic detection system for electrical equipment, which includes a memory, a processor and a computer program, wherein the memory is used to store the corresponding computer program, and the processor is used to run the corresponding computer program. When the computer program runs in the processor, it can implement the method described in steps S1 to S4.
[0124] In summary, the embodiment of the present invention first obtains the electrical data of each dimension of the electrical equipment to be tested at different times within a preset period; takes any one dimension as the target dimension, and obtains the degree of electrical noise interference in the target dimension and the degree of change of the electrical data at each moment in the target dimension according to the change of the electrical data at different times in the target dimension and the distribution of the electrical data at each moment in the preset time window of each moment; takes any one moment as the target moment, and uses the points formed by the electrical data of all dimensions at the target moment as the electrical data points at the target moment; in the preset time window of the target moment, according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension, obtains the abnormal characteristic value of the electrical data point at the target moment; obtains the optimal distance between any two electrical data points according to the difference in the electrical data of the same dimension and the difference in the time between any two electrical data points, the degree of electrical noise interference in each dimension, and the abnormal characteristic value of the electrical data point; cleans the electrical data based on the optimal distance to obtain pure electrical data; and performs automatic detection on the electrical equipment to be tested based on the pure electrical data.
[0125] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. An automatic detection method for electrical equipment, characterized in that: The method comprises: Obtain electrical data of each dimension of the electrical equipment under test at different times within a preset period; Taking any dimension as the target dimension, according to the change of electrical data at different moments in the target dimension and the distribution of electrical data at each moment in a preset time window at each moment, the degree of electrical noise interference in the target dimension and the degree of change of electrical data at each moment in the target dimension are obtained; Take any moment as the target moment, and take the points formed by the electrical data of all dimensions at the target moment as the electrical data points at the target moment; in the preset time window of the target moment, obtain the abnormal characteristic value of the electrical data point at the target moment according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension; obtain the optimal distance between any two electrical data points according to the difference in the electrical data of the same dimension and the difference in the time, the degree of electrical noise interference in each dimension, and the abnormal characteristic value of the electrical data point; clean the electrical data based on the optimal distance to obtain pure electrical data; The electrical equipment to be tested is automatically tested based on the pure electrical data.
2. An automatic detection method for electrical equipment according to claim 1, characterized in that: The step of obtaining the electrical noise interference degree of the target dimension and the variation degree of the electrical data at each moment in the target dimension includes: Map the electrical data at each moment in the target dimension into a two-dimensional coordinate system to obtain different two-dimensional data points; According to the difference in the positions of the two-dimensional data points, the degree of change of the electrical data at each moment in the target dimension is obtained; Performing negative correlation normalization processing on the degree of change to obtain weight parameters of electrical data at each moment in the target dimension; The electrical noise interference degree of the target dimension is obtained according to the weight parameters of the electrical data at each moment in the target dimension and the distribution of the electrical data at each moment within the preset time window of each moment.
3. An automatic detection method for electrical equipment according to claim 2, characterized in that: The obtaining of the electrical noise interference degree of the target dimension according to the weight parameter of the electrical data at each moment in the target dimension and the distribution of the electrical data at each moment within the preset time window of each moment includes: Take any moment as the moment to be tested; In a preset time window of the time to be tested, according to the difference between the electrical data at the time to be tested in the target dimension and the electrical data at other times except the time to be tested, the mutation degree of the electrical data at the time to be tested in the target dimension is obtained; The electrical noise interference degree of the target dimension is obtained by weighting and adjusting the mutation degree using the weight parameter of the electrical data at each moment in the target dimension and performing normalization processing.
4. The method for automatic detection of electrical equipment according to claim 1, characterized in that: The abnormal characteristic value of the electrical data point at the target time is obtained by: In a preset time window at the target moment, according to the difference in the degree of change between the electrical data at the target moment and other electrical data except the target moment in each dimension, an initial abnormal value of the electrical data at the target moment in each dimension is obtained; The initial abnormal values of the electrical data of all dimensions at the target time are integrated and normalized to obtain the abnormal characteristic values of the electrical data points at the target time.
5. The method for automatic detection of electrical equipment according to claim 1, characterized in that: The obtaining of the optimal distance between any two electrical data points comprises: Taking any two electrical data points as the first data point and the second data point; Obtaining a data distance value of the same dimension between the first data point and the second data point according to a difference in electrical data of the same dimension between the first data point and the second data point; Obtaining a time distance value between the first data point and the second data point according to a difference in time between the first data point and the second data point; According to the abnormal characteristic values of the first data point and the second data point and the degree of electrical noise interference in each dimension, the data distance value and the time distance value are adjusted to obtain the optimal distance between the first data point and the second data point.
6. An automatic detection method for electrical equipment according to claim 5, characterized in that: The calculation formula for the optimal distance between the first data point and the second data point is: in, represents the optimal distance between the first data point and the second data point; represents the average of the abnormal feature values of the first data point and the second data point; Indicates The degree of electrical noise interference in each dimension; Indicates the first data point Dimensions of electrical data; Indicates the second data point Dimensions of electrical data; The distance between the first data point and the second data point The data distance value of each dimension; Indicates the number of dimensions; Indicates the time at which the first data point is located; Indicates the time at which the second data point is located; Represents the temporal distance value between the first data point and the second data point.
7. An automatic detection method for electrical equipment according to claim 1, characterized in that: The cleaning of the electrical data based on the optimal distance to obtain pure electrical data includes: Iteratively optimize the parameter K in the LOF algorithm according to the difference of the optimal distance between each electrical data point and the Euclidean distance between each electrical data point to obtain the optimal K distance neighborhood of each electrical data point; Based on the LOF algorithm, obtaining outlier electrical data points according to the optimal K distance neighborhood of each electrical data point and the optimal distance between electrical data points; The time when the outlier data point is located is regarded as the abnormal time, the electrical data of each dimension at the abnormal time is removed, and interpolation processing is performed to obtain pure electrical data of each dimension.
8. An automatic detection method for electrical equipment according to claim 7, characterized in that: The method of obtaining the optimal K distance neighborhood of each electrical data point includes: Take any electrical data point as the target data point and initialize the parameter K; If the parameter K is not greater than a preset value, a K distance neighborhood of the target data point is constructed based on the parameter K, and the Euclidean distance between the target data point and the electrical data point on the edge of the K distance neighborhood is used as the K neighborhood distance of the target data point; according to the difference between the optimal distances between the target data point and other electrical data points in the K distance neighborhood except the target data point, and the K neighborhood distance of the target data point, an evaluation parameter of the K distance neighborhood is obtained, the parameter K is increased, and the iterative process is continued; The calculation formula of the evaluation parameter is: in, represents the evaluation parameter of the K distance neighborhood; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; Indicates the distance between the target data point and the nearest neighbor to the target data point in the K distance neighborhood. The optimal distance between electrical data points; represents the number of electrical data points in the K-distance neighborhood; Represents the K neighboring distances of the target data point; represents the normalization function; If the parameter K is greater than a preset value, the iterative process is stopped, and the K distance neighborhood corresponding to the minimum value of the evaluation parameter is used as the optimal K distance neighborhood of the target data point.
9. The method for automatic detection of electrical equipment according to claim 1, characterized in that: The automatic detection of the electrical equipment to be tested based on the pure electrical data includes: The pure electrical data of each dimension is input into the electrical equipment fault analysis model to perform automated detection on the electrical equipment to be tested.
10. An automatic detection system for electrical equipment, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
