A smart socket calibration detection method and system

By analyzing the local fluctuation characteristics and amplitude of power consumption monitoring data from smart sockets, clustering and constructing hyperplane functions, the problem of selecting the optimal hyperplane in smart socket detection is solved, and more accurate power consumption data detection is achieved.

CN118779818BActive Publication Date: 2024-11-19SHENZHEN OUKANG PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411260218.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-11-19
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

In existing technologies, the randomness and discreteness of power consumption data from smart sockets make it difficult for support vector machines to select the optimal hyperplane, affecting the accuracy of detection results.

Method used

By acquiring the local fluctuation characteristics and amplitude prominence characteristics of the power consumption monitoring data of smart sockets, cluster analysis is performed to obtain the change characteristic values ​​and outlier parameters of the data points, and a hyperplane function of support vector machine is constructed. The support vector machine is then used for calibration and detection.

Benefits of technology

This improves the accuracy of power consumption data detection for smart sockets, avoids the impact of data randomness and dispersion on the detection results, and enhances the reliability of the detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779818B_ABST
    Figure CN118779818B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of smart socket electrical data detection, and specifically to a smart socket calibration detection method and system. The present invention first obtains the power consumption monitoring data of the smart socket; further obtains the change characteristic value of each data point; further clusters all data points according to the change characteristic value and amplitude; further obtains the overall change regularity of the power consumption monitoring data; further obtains the outlier parameter of each data point according to the clustering result and the change regularity; further adaptively constructs the hyperplane function of the support vector machine; and finally calibrates and detects the power consumption monitoring data. The present invention determines a suitable hyperplane function by analyzing the actual distribution characteristics of the current power consumption monitoring data, avoids the problem that the randomness and discreteness of the data affect the classification results of the support vector machine, and improves the reliability of the calibration detection, so the support vector machine is finally used to calibrate and detect the smart socket.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart socket electrical data detection, and in particular to a smart socket calibration detection method and system. Background Art

[0002] "Smart sockets" are one of the important products in the field of smart homes in recent years. They can remotely control the on / off of household appliances through smartphones or other smart devices, and even preset the on / off time and working mode of appliances. In addition, many smart sockets also have power detection functions, which can monitor the voltage, current, power and other information of the sockets in real time, and send the monitoring data to the user's mobile phone or other devices, helping users understand the power consumption of household appliances and achieve energy-saving management.

[0003] In the existing technology, support vector machines (SVM) are mainly used for classification and regression analysis. The core idea of ​​SVM is to maximize the interval between different categories by finding an optimal hyperplane, thereby achieving effective classification of data. However, because the power consumption data of the socket is random and the power consumption data in different periods are different, when using the SVM algorithm to classify the data, the large discreteness of the data will make it difficult to select the optimal hyperplane, which will lead to inaccurate detection results. Summary of the invention

[0004] In order to solve the technical problem that it is difficult to select the optimal hyperplane and affect the accuracy of smart socket detection, the purpose of the present invention is to provide a smart socket calibration detection method and system, and the technical solution adopted is as follows:

[0005] A smart socket calibration detection method, the method comprising:

[0006] Obtain power consumption monitoring data of smart sockets;

[0007] According to the local fluctuation characteristics and amplitude highlight characteristics of each data point in the power consumption monitoring data, the change characteristic value of each data point is obtained; according to the change characteristic value and amplitude of the data point, all data points are clustered; the change trend of the power consumption monitoring data is analyzed to obtain the degree of change regularity of the power consumption monitoring data;

[0008] According to the outlier characteristics of each data point in the clustering result, combined with the degree of change regularity, the outlier parameter of each data point is obtained; according to the change characteristics of the outlier parameters of all data points, combined with the change characteristics of the amplitude, the hyperplane function of the support vector machine is constructed;

[0009] Based on the hyperplane function, a support vector machine is used to calibrate and detect the power consumption monitoring data of the smart socket.

[0010] Furthermore, the method for obtaining the change characteristic value includes:

[0011] Taking each data point as the center, a local neighborhood of each data point is established with preset time domain neighborhood parameters; according to the drastic fluctuation characteristics of the amplitude of the data point in the local neighborhood of each data point, a local variation parameter of each data point is obtained;

[0012] According to the amplitude of each data point, an amplitude highlighting parameter of each data point is obtained; the amplitude highlighting parameter is positively correlated with the amplitude of the data point;

[0013] According to the local change parameter and the amplitude highlight parameter, a change characteristic value of each data point is obtained; the local change parameter and the amplitude highlight parameter are both positively correlated with the change characteristic value.

[0014] Furthermore, the method of clustering all data points according to the change characteristic values ​​and amplitudes of the data points includes:

[0015] A two-dimensional distribution diagram of the electricity consumption monitoring data is constructed with the change characteristic value of the data point as the ordinate and the amplitude of the data point as the abscissa; in the two-dimensional distribution diagram, the data points are density clustered.

[0016] Furthermore, the method for obtaining the degree of change regularity includes:

[0017] Performing STL decomposition on the power consumption monitoring data to obtain trend terms, periodic terms and residual terms of the power consumption monitoring data; obtaining the angle of the principal component direction of the trend term;

[0018] According to the minimum positive period of the periodic term, the fluctuation stability characteristics of the residual term and the angle between the principal component directions, the degree of change regularity of the electricity consumption monitoring data is obtained; the minimum positive period is negatively correlated with the degree of change regularity; the fluctuation stability characteristics of the residual term and the angle between the principal component directions are both positively correlated with the degree of change regularity.

[0019] Furthermore, the method for obtaining the fluctuation stability characteristics of the residual term includes:

[0020] After the variance of the residual term is negatively mapped, the mapped value is used as the fluctuation stability feature of the residual term.

[0021] Furthermore, the method for obtaining the outlier parameter includes:

[0022] Obtain the Euclidean distance from each data point to the centroid of the cluster as the first distance; obtain the Euclidean distance from the centroid of each cluster to the centroid of the two-dimensional plane as the second distance; obtain the distance outlier coefficient of each data point according to the first distance and the second distance corresponding to each data point;

[0023] Obtaining a change outlier coefficient for each data point according to a deviation characteristic between the change characteristic value of each data point and the overall change characteristic value of the cluster in which the data point is located;

[0024] According to the distance outlier coefficient and the change outlier coefficient of each data point, combined with the degree of change regularity, the outlier parameter of each data point is obtained; the distance outlier coefficient and the change outlier coefficient are both positively correlated with the outlier parameter; the degree of change regularity is negatively correlated with the outlier parameter.

[0025] Furthermore, the method for obtaining the hyperplane function includes:

[0026] According to the drastic change characteristics of the amplitude of all data points, the intercept parameter is obtained; according to the change amplitude of the outlier parameter and the change amplitude of the amplitude of all data points, the slope parameter is obtained; according to the intercept parameter and the slope parameter, a hyperplane function is fitted; the hyperplane function is a straight line.

[0027] Furthermore, the method for obtaining the slope parameter includes:

[0028] The ratio of the range of the outlier parameter to the range of the amplitude of all data points is taken as the slope parameter.

[0029] Furthermore, the method for calibrating and detecting the power consumption monitoring data of the smart socket using a support vector machine based on the hyperplane function includes:

[0030] Based on the hyperplane function, the initial abnormal data in the electricity consumption monitoring data is obtained by using a support vector machine; the isolated data points in the initial abnormal data are removed, and the remaining initial abnormal data is used as the abnormal data.

[0031] The present invention also proposes a smart socket calibration detection system, 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 the smart socket calibration detection method.

[0032] The present invention has the following beneficial effects:

[0033] The present invention first obtains the power consumption monitoring data of the smart socket to provide a basis for data analysis; further obtains the change characteristic value of each data point to characterize the local change characteristics of the data point, and prepares for the subsequent analysis of the outlier characteristics of the data point; further clusters all data points according to the change characteristic value and amplitude of the data point to facilitate the distinction between different power consumption modes, and analyzes the outlier characteristics of the power consumption data by means of clustering; further analyzes the change trend of the power consumption monitoring data to reflect the abnormal outlier situation of the data from an overall perspective, obtains the degree of change regularity of the power consumption monitoring data, and characterizes the degree of regularity of the power consumption monitoring data, and prepares for the subsequent analysis. Provide more basis for analyzing the outliers of data; further integrate local and overall multiple angles, obtain the outlier parameters of each data point, characterize the more accurate outlier distribution characteristics of the data point, and facilitate the subsequent construction of a more suitable hyperplane of the support vector machine to improve the accuracy of the detection results; further according to the change characteristics of the outlier parameters of all data points, combined with the change characteristics of the amplitude, deeply analyze the distribution of electricity monitoring data, and construct the optimal hyperplane function of the support vector machine to provide a basis for accurately detecting the electricity data of the smart socket; finally, based on the hyperplane function, use the support vector machine to calibrate and detect the electricity monitoring data of the smart socket. The present invention determines a suitable hyperplane function by analyzing the actual distribution characteristics of the current electricity monitoring data, avoids the problem that the randomness and discreteness of the data affect the classification results of the support vector machine, and improves the reliability of calibration detection, so the support vector machine is finally used to calibrate and detect the smart socket. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 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.

[0035] Figure 1 A flow chart of a smart socket calibration detection method provided by one embodiment of the present invention;

[0036] Figure 2 A flowchart of a method for obtaining outlier parameters provided by an embodiment of the present invention;

[0037] Figure 3 A system block diagram of a smart socket calibration detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] 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 the intelligent socket calibration detection method and system proposed by the present invention, its specific implementation, structure, features and effects, in combination 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.

[0039] 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.

[0040] The specific scheme of a smart socket calibration detection method and system provided by the present invention is described in detail below with reference to the accompanying drawings.

[0041] See also Figure 1 , which shows a flow chart of a smart socket calibration detection method provided by an embodiment of the present invention, specifically comprising:

[0042] Step S1: Obtaining the power consumption monitoring data of the smart socket.

[0043] The present invention mainly analyzes the power consumption data of the smart socket and then calibrates the socket. Therefore, it is necessary to first collect the power consumption monitoring data of the smart socket to provide a basis for data analysis. Intelligent interpolation can monitor the current and voltage passing through the socket in real time, so it can obtain real-time power data of power consumption, and upload the obtained power data to the data processing system of the background terminal device, and then analyze the power consumption monitoring data.

[0044] In one embodiment of the present invention, what is analyzed is the power data of the smart socket in the most recent month, and the collection frequency is once per second; wherein, when the power of the smart socket is zero for 5 seconds, the smart socket is considered to be in no-load sleep, and no data collection is performed. The power data of the smart socket when working is connected in time series to constitute electricity consumption monitoring data.

[0045] Step S2: According to the local fluctuation characteristics and amplitude highlight characteristics of each data point in the electricity consumption monitoring data, obtain the change characteristic value of each data point; cluster all data points according to the change characteristic value and amplitude of the data point; analyze the change trend of the electricity consumption monitoring data to obtain the degree of change regularity of the electricity consumption monitoring data.

[0046] In the binary classification problem, SVM separates data of different categories through an optimal hyperplane, which can effectively reduce the risk of overfitting. However, because the power consumption data of the socket is random and the power consumption data in different periods are different, when the SVM algorithm is used to classify the data, the data is highly discrete, which makes it difficult to select the optimal hyperplane, resulting in inaccurate detection results. Therefore, it is necessary to obtain the optimal hyperplane based on the actual characteristics of the power consumption monitoring data, so as to calibrate and detect the smart socket.

[0047] Taking into account the different electricity consumption behaviors in different periods, different data points in the electricity monitoring data have different change characteristics and abnormal characteristics. When the electricity consumption data is abnormal, it is usually a sudden increase in current, power and other data. At this time, the amplitude of the abnormal data point is more prominent, and the local fluctuation is abnormal. Therefore, according to the local fluctuation characteristics and amplitude highlight characteristics of each data point in the electricity monitoring data, the change characteristic value of each data point is obtained to characterize the local change characteristics of the data point, so as to prepare for the subsequent analysis of the outlier characteristics of the data point.

[0048] Preferably, in one embodiment of the present invention, in order to facilitate the analysis of the local fluctuation characteristics of the data points, a local neighborhood of each data point is established with each data point as the center and with preset time domain neighborhood parameters; considering that when the power data is abnormal, a sudden increase in power will cause a sharp fluctuation in the amplitude of the data points in the local neighborhood, the local change parameter of each data point is obtained according to the sharp fluctuation characteristics of the amplitude of the data points in the local neighborhood of each data point; at the same time, in order to avoid the situation that the power data suddenly drops due to the shutdown of the electric equipment, etc., being identified as abnormal, the amplitude highlight parameter of each data point is obtained according to the amplitude of each data point;

[0049] According to the local variation parameter and the amplitude highlight parameter, the variation characteristic value of each data point is obtained; the local variation parameter and the amplitude highlight parameter are both positively correlated with the variation characteristic value.

[0050] As an example, the preset time domain neighborhood parameter is 11, and the local neighborhood of the data point includes 5 adjacent data in the negative direction of the time series, 5 adjacent data in the positive direction of the time series, and the data point itself; the variance of the amplitude of the data point in the local neighborhood is used to represent the drastic fluctuation characteristics of the amplitude, and the variance of the amplitude of the data point in the local neighborhood is used as the local change parameter of the corresponding data point. The larger the variance, the more drastic the fluctuation of the data amplitude in the local neighborhood of the data point, the more obvious the drastic fluctuation characteristics, the more likely it is abnormal data, and the larger the change characteristic value;

[0051] The amplitude of the data point is used as the amplitude highlighting parameter. The larger the amplitude of the data point, the more obvious the amplitude highlighting feature is, the more likely it is abnormal data, and the larger the change feature value is;

[0052] The product of the amplitude highlight parameter and the local variation parameter of the data point is taken as the variation feature value.

[0053] As another example, considering that the larger the amplitude of the data point, the larger the variance of the amplitude of the data point in the corresponding local neighborhood, the more drastic the fluctuation of the data amplitude in the local neighborhood of the data point and the more likely it is caused by the current data point, the greater the possibility of abnormality, so the sum of the variance and amplitude corresponding to the data point is used as the local change parameter to obtain the change characteristic value.

[0054] In other embodiments of the present invention, the implementer may also use absolute deviation or other alternative variance to represent the violent fluctuation characteristics of the amplitude, or use other negative correlation functions or methods, such as adding the maximum amplitude to the minimum positive value 0.1, taking the difference from the amplitude, and taking the inverse of the difference to perform negative correlation mapping.

[0055] Since electricity consumption monitoring data of different amplitudes may belong to different electricity consumption modes, and the change characteristic values ​​under different electricity consumption modes are different, all data points are clustered according to the change characteristic values ​​and amplitudes of the data points, and the outlier characteristics of the electricity consumption data are analyzed by clustering.

[0056] Preferably, in one embodiment of the present invention, a two-dimensional distribution diagram of electricity consumption monitoring data is constructed with the change characteristic value of the data point as the vertical coordinate and the amplitude of the data point as the horizontal coordinate; in the two-dimensional distribution diagram, the data points are density clustered.

[0057] As an example, the DBSCAN density clustering algorithm is used, and the cluster radius is set to 3 and the minimum number of clusters is set to 5. In other embodiments of the present invention, the implementer can set it by himself or choose other methods such as K-means clustering, which are technical means well known to those skilled in the art and will not be described in detail here.

[0058] Taking into account the overall changing trend of electricity consumption monitoring data, the abnormal outliers of the data can also be reflected from an overall perspective. Therefore, the changing trend of the electricity consumption monitoring data is analyzed to obtain the degree of regularity of the changes in the electricity consumption monitoring data and characterize the regularity of the electricity consumption monitoring data, so as to provide more basis for the subsequent analysis of the outliers of the data.

[0059] Preferably, in one embodiment of the present invention, considering that the data is decomposed, the complex change law contained in the time series data can be systematically deconstructed through the trend term, the period term and the residual term, and the degree of change law of the data as a whole can be analyzed. Therefore, the power consumption monitoring data is subjected to STL decomposition to obtain the trend term, the period term and the residual term of the power consumption monitoring data; considering that the smaller the minimum positive period of the periodicity is, the stronger the periodicity of the data is, the more regular the change is, and the greater the degree of change law is; the more stable the fluctuation of the residual term is, the smaller the random fluctuation of the power consumption data is, the stronger the periodic regularity is, and the greater the degree of change law is; the smaller the angle of the principal component direction of the trend term is, the more difficult it is to distinguish the change trend of the data in different directions, the less obvious the change trend of the data is, and the smaller the degree of change law is;

[0060] Based on this, the angle of the principal component direction of the trend item is obtained;

[0061] According to the minimum positive period of the periodic term, the fluctuation stability characteristics of the residual term and the angle between the principal component directions, the degree of change regularity of the electricity consumption monitoring data is obtained; the minimum positive period is negatively correlated with the degree of change regularity; the fluctuation stability characteristics of the residual term and the angle between the principal component directions are both positively correlated with the degree of change regularity.

[0062] Preferably, in one embodiment of the present invention, after the variance of the residual term is negatively correlated mapped, the mapped value is used as the fluctuation stability feature of the residual term.

[0063] As an example, the STL algorithm is used to decompose the power consumption monitoring data to obtain the trend item, period item and residual item of the power consumption monitoring data; the PCA principal component analysis algorithm is used to obtain the principal component direction of the trend item; the calculation formula of the degree of change regularity includes:

[0064] ;in, Indicates the degree of change in the current power consumption monitoring data; represents the minimum positive period of the periodic term; Expressed as a natural constant The exponential function with base ; represents the variance of the residual term; The angle representing the direction of the principal components of the trend term.

[0065] In the calculation formula of the degree of change regularity, the variance of the residual term is transformed using the negative correlation mapping function After negative correlation mapping, the fluctuation stability characteristics of the residual term are indicated. The larger the variance, the greater the random fluctuation or noise in the data, and the smaller the overall regularity of the data change. Therefore, negative correlation correction is required. The angles of the principal component directions are normalized and the units are converted to facilitate direct comparison with and Direct multiplication; The smaller it is, the more difficult it is to distinguish the changing trends of the data in different directions, the less obvious the changing trends of the data are, and the smaller the degree of the changing regularity is; The larger it is, the stronger the periodicity of the data, the more regular the changes, and the greater the degree of regularity of the changes.

[0066] In other embodiments of the present invention, the minimum positive period may be multiplied by the variance of the residual term and then negative correlation mapping may be performed, such as ; You can also use the weighted summation method to obtain the degree of change rule, for example, , and Assign weights of 0.3, 0.3, and 0.4 respectively, and sum the results as the degree of change rule; other methods such as inverse proportional negative correlation can also be used for negative correlation mapping, for example , where adding 0.1 to the denominator prevents the denominator from being zero.

[0067] It should be noted that a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the power of an exponential function, which is determined by actual application; a negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.

[0068] Step S3: According to the outlier characteristics of each data point in the clustering results, combined with the degree of change regularity, the outlier parameters of each data point are obtained; according to the change characteristics of the outlier parameters of all data points, combined with the change characteristics of the amplitude, the hyperplane function of the support vector machine is constructed.

[0069] The clustering results obtained based on the amplitude and change characteristic value of the data points reflect the outlier characteristics of the data points from a local perspective, while the degree of change regularity reflects the regularity of the data from an overall perspective, and also indicates the outlier situation of the data. Therefore, according to the outlier characteristics of each data point in the clustering results, combined with the degree of change regularity, the local and overall multiple angles are integrated to obtain the outlier parameters of each data point, characterize the more accurate outlier distribution characteristics of the data points, and finally construct a more suitable hyperplane of the support vector machine to improve the accuracy of the detection results.

[0070] Preferably, in one embodiment of the present invention, the method for obtaining outlier parameters includes: Figure 2 , which shows a flow chart of a method for obtaining outlier parameters provided by an embodiment of the present invention, specifically comprising:

[0071] Step S201: Obtain the Euclidean distance from each data point to the centroid of the cluster as the first distance; obtain the Euclidean distance from the centroid of each cluster to the centroid of the two-dimensional plane as the second distance; obtain the distance outlier coefficient of each data point according to the first distance and the second distance corresponding to each data point.

[0072] Considering that the more a data point deviates from its cluster, the more obvious the outlier characteristics of the data point in the cluster; at the same time, the farther the cluster is from the overall data in the two-dimensional plane, the more obvious the outlier characteristics of the entire cluster are, so the first distance and the second distance are obtained respectively, and the first distance and the second distance are fused to obtain the distance outlier coefficient of each data point, so as to measure the outlier characteristics of the data point from the perspective of distribution distance.

[0073] As an example, the sum of the first distance and the second distance is used as the distance outlier coefficient of the corresponding data point.

[0074] It should be noted that the centroid point of the cluster is the centroid of the two-dimensional figure formed by the data points included in the cluster in the two-dimensional distribution map, and the centroid point of the two-dimensional plane is the centroid of the two-dimensional figure formed by all data points in the two-dimensional distribution map. The Euclidean distance is calculated in the two-dimensional distribution map, and the method for obtaining the centroid of the two-dimensional figure is a technical means well known to technical personnel in this field, and will not be repeated here.

[0075] As another example, considering that the farther the distance between the data point and the centroid of the two-dimensional plane is, the more outlier the data point is, the Euclidean distance between the data point and the centroid of the two-dimensional plane can be obtained as the third distance, and the sum of the third distance, the first distance and the second distance can be taken as the distance outlier coefficient.

[0076] In other embodiments of the present invention, different weight coefficients may be set to perform weighted summation. For example, the weights of the first distance, the second distance, and the third distance are 0.3, 0.2, and 0.5, respectively.

[0077] Step S202: Obtain the change outlier coefficient of each data point according to the deviation characteristics of the change characteristic value of each data point and the overall change characteristic value of the cluster in which it belongs.

[0078] Considering that the greater the difference between the overall change characteristics of a data point and all the data points in the cluster, the more the data point deviates from the cluster and the more obvious the outlier characteristics are, the change outlier coefficient of each data point is obtained.

[0079] As an example, the mean of the change characteristic values ​​of all data points in the cluster reflects the overall change characteristic value in the cluster, and the absolute value of the difference between the change characteristic value of the data point and the mean of the corresponding change characteristic value of the cluster to which it belongs is used as the change outlier coefficient of the data point.

[0080] As another example, the variation characteristic value representing the whole may be obtained by performing weighted summation on the mean, median and mode of the variation characteristic values ​​of all data points in the cluster.

[0081] Step S203: Obtain the outlier parameter of each data point according to the distance outlier coefficient and the change outlier coefficient of each data point in combination with the degree of change regularity; the distance outlier coefficient and the change outlier coefficient are both positively correlated with the outlier parameter; the degree of change regularity is negatively correlated with the outlier parameter.

[0082] Considering that the greater the degree of change regularity, the stronger the overall change regularity of the electricity consumption monitoring data, the less likely the data will be outliers, so the degree of change regularity is negatively correlated with the outlier parameter.

[0083] As an example, the reciprocal of the degree of change regularity plus the zero division parameter 0.1 is taken as the regular outlier coefficient, and negative correlation mapping is performed in an inverse proportional manner; the product of the regular outlier coefficient, the distance outlier coefficient and the change outlier coefficient is taken as the outlier parameter of the corresponding data point.

[0084] In other embodiments of the present invention, negative correlation mapping functions such as , negative correlation mapping is performed on the degree of change regularity; positive correlation mapping functions such as , map the distance outlier coefficient or the change outlier coefficient, and adjust the sensitivity of the distance outlier coefficient or the change outlier coefficient.

[0085] After obtaining the outlier parameters of all data points, we can deeply analyze the distribution of electricity monitoring data based on the change characteristics of the outlier parameters of all data points and the change characteristics of the amplitude, and construct the optimal hyperplane function of the support vector machine to provide a basis for accurately detecting the electricity consumption data of smart sockets.

[0086] Preferably, in one embodiment of the present invention, considering that the intercept parameter is used to define the starting point of the hyperplane, by obtaining the drastic change characteristics of the amplitude of all data points, the change trend and starting position of the data points can be determined, ensuring that the hyperplane can effectively reflect the overall trend of the data; considering that the slope parameter is used to define the inclination of the hyperplane, by analyzing the change amplitude of the outlier parameters of all data points and the change amplitude of the amplitude range, the relative relationship between the outlier degree of the data point and the amplitude change can be reflected, so that the hyperplane can better separate normal data points from abnormal data points;

[0087] Based on this, the intercept parameter is obtained according to the drastic change characteristics of the amplitude of all data points; the slope parameter is obtained according to the change amplitude of the outlier parameters and the change amplitude of the amplitude of all data points; the hyperplane function is fitted according to the intercept parameter and the slope parameter; the hyperplane function is a straight line.

[0088] As an example, the ratio of the range of the outlier parameters of all data points to the range of the amplitude is used as the slope parameter; the variance of the amplitude of all data points represents the drastic change characteristics of the amplitude, and the variance is used as the intercept parameter to obtain a hyperplane function in the form of a straight line, which is already known in the prior art and will not be described in detail.

[0089] It should be noted that the hyperplane is a decision boundary used to separate data points of different categories. In two-dimensional space, the hyperplane is a straight line that maximizes the interval between two categories. Therefore, only the intercept parameter and the slope parameter need to be obtained. The coordinate system corresponding to the hyperplane function is the coordinate system in the two-dimensional distribution diagram.

[0090] Step S4: Based on the hyperplane function, the support vector machine is used to calibrate and detect the power consumption monitoring data of the smart socket.

[0091] By analyzing the actual distribution characteristics of the current electricity consumption monitoring data, the appropriate hyperplane function is determined to avoid the problem that the randomness and discreteness of the data affect the classification results of the support vector machine, and improve the reliability of calibration detection. Therefore, based on the hyperplane function, the support vector machine is used to calibrate and detect the smart socket.

[0092] Preferably, in one embodiment of the present invention, taking into account the possibility of noise interference during data collection, when abnormal data exists in isolation in time series, it is considered to be an isolated noise point. Therefore, based on the hyperplane function, a support vector machine is used to obtain the initial abnormal data in the electricity consumption monitoring data; the isolated data points in the time series in the initial abnormal data are eliminated, and the remaining initial abnormal data are used as abnormal data.

[0093] It should be noted that obtaining the initial abnormal data in the electricity consumption monitoring data through the SVM algorithm is a routine operation and will not be described in detail here.

[0094] An embodiment of the present invention also provides a smart socket calibration detection system, see Figure 3 The system includes a memory 301, a processor 302 and a computer program 303, wherein the memory is used to store the corresponding computer program, the processor is used to run the corresponding computer program, and when the computer program runs in the processor, it can implement a smart socket calibration detection method described in steps S1-S4.

[0095] In summary, in order to solve the technical problem that the optimal hyperplane is difficult to select and affects the accuracy of smart socket detection, the purpose of the present invention is to provide a smart socket calibration detection method and system. The present invention first obtains the power consumption monitoring data of the smart socket; further obtains the change characteristic value of each data point according to the local fluctuation characteristics and amplitude highlighting characteristics of each data point in the power consumption monitoring data; further clusters all data points according to the change characteristic value and amplitude of the data point; further analyzes the change trend of the power consumption monitoring data to obtain the degree of change regularity of the power consumption monitoring data; further obtains the outlier parameter of each data point according to the outlier characteristics shown in the clustering results, combined with the degree of change regularity; further constructs the hyperplane function of the support vector machine according to the change characteristics of the outlier parameters of all data points, combined with the change characteristics of the amplitude; finally, based on the hyperplane function, the support vector machine is used to calibrate and detect the smart socket. The present invention determines a suitable hyperplane function by analyzing the actual distribution characteristics of the current power consumption monitoring data, avoids the problem that the randomness and discreteness of the data affect the classification results of the support vector machine, and improves the reliability of calibration detection, so the support vector machine is finally used to calibrate and detect the smart socket.

[0096] 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.

[0097] 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. A smart socket calibration detection method, characterized in that: The method comprises: Obtain power consumption monitoring data of smart sockets; According to the local fluctuation characteristics and amplitude highlight characteristics of each data point in the power consumption monitoring data, the change characteristic value of each data point is obtained; according to the change characteristic value and amplitude of the data point, all data points are clustered; the change trend of the power consumption monitoring data is analyzed to obtain the degree of change regularity of the power consumption monitoring data; According to the outlier characteristics of each data point in the clustering result, combined with the degree of change regularity, the outlier parameter of each data point is obtained; according to the change characteristics of the outlier parameters of all data points, combined with the change characteristics of the amplitude, the hyperplane function of the support vector machine is constructed; Based on the hyperplane function, a support vector machine is used to calibrate and detect the power consumption monitoring data of the smart socket; The method for obtaining the change characteristic value includes: Taking each data point as the center, a local neighborhood of each data point is established with preset time domain neighborhood parameters; the variance of the amplitude of the data point in the local neighborhood is used as the local variation parameter of the corresponding data point; The amplitude of the data point is used as the amplitude highlighting parameter; According to the local change parameter and the amplitude highlight parameter, a change characteristic value of each data point is obtained; the local change parameter and the amplitude highlight parameter are both positively correlated with the change characteristic value; The method of clustering all data points according to the change characteristic values ​​and amplitudes of the data points includes: Using the change characteristic value of the data point as the ordinate and the amplitude of the data point as the abscissa, construct a two-dimensional distribution map of the power consumption monitoring data; in the two-dimensional distribution map, density clustering is performed on the data points; The method for obtaining the degree of change regularity includes: Performing STL decomposition on the power consumption monitoring data to obtain trend terms, periodic terms and residual terms of the power consumption monitoring data; obtaining the angle of the principal component direction of the trend term; According to the minimum positive period of the periodic term, the fluctuation stability characteristics of the residual term and the angle of the principal component direction, the degree of change regularity of the power consumption monitoring data is obtained; the minimum positive period is negatively correlated with the degree of change regularity; the fluctuation stability characteristics of the residual term and the angle of the principal component direction are both positively correlated with the degree of change regularity; The method for obtaining the outlier parameter includes: Obtain the Euclidean distance from each data point to the centroid of the cluster as the first distance; obtain the Euclidean distance from the centroid of each cluster to the centroid of the two-dimensional plane as the second distance; and use the sum of the first distance and the second distance as the distance outlier coefficient of the corresponding data point; The absolute value of the difference between the change characteristic value of the data point and the mean of the corresponding change characteristic value of the cluster to which it belongs is taken as the change outlier coefficient of the data point; According to the distance outlier coefficient and the change outlier coefficient of each data point, combined with the degree of change regularity, the outlier parameter of each data point is obtained; the distance outlier coefficient and the change outlier coefficient are both positively correlated with the outlier parameter; the degree of change regularity is negatively correlated with the outlier parameter.

2. The smart socket calibration detection method according to claim 1, characterized in that: The method for obtaining the fluctuation stability characteristics of the residual term includes: After the variance of the residual term is negatively mapped, the mapped value is used as the fluctuation stability feature of the residual term.

3. The smart socket calibration detection method according to claim 1, characterized in that: The method for obtaining the hyperplane function includes: According to the drastic change characteristics of the amplitude of all data points, the intercept parameter is obtained; according to the change amplitude of the outlier parameter and the change amplitude of the amplitude of all data points, the slope parameter is obtained; according to the intercept parameter and the slope parameter, a hyperplane function is fitted; the hyperplane function is a straight line.

4. The smart socket calibration detection method according to claim 3, characterized in that: The method for obtaining the slope parameter includes: The ratio of the range of the outlier parameter to the range of the amplitude of all data points is taken as the slope parameter.

5. The smart socket calibration detection method according to claim 1, characterized in that: The method for calibrating and detecting the power consumption monitoring data of the smart socket using a support vector machine based on the hyperplane function includes: Based on the hyperplane function, the initial abnormal data in the electricity consumption monitoring data is obtained by using a support vector machine; the isolated data points in the initial abnormal data are removed, and the remaining initial abnormal data is used as the abnormal data.

6. A smart socket calibration detection system, 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 smart socket calibration detection method as described in any one of claims 1 to 5 are implemented.