Remote electricity utilization charging system
By using LOF values and clustering algorithms to identify abnormal electricity use in remote power charging systems, the problem of difficulty in monitoring and identifying abnormal electricity use in existing systems is solved, detection accuracy and service response efficiency are improved, and the interests of users and power companies are protected.
Patent Information
- Application Number
- CN202411636543.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-07
AI Technical Summary
The existing remote power charging system is difficult to monitor the user's electricity usage, resulting in the inability to detect abnormal electricity usage in time, resulting in a surge in user's monthly electricity bills and an increase in power supply costs for power companies.
A remote electricity consumption charging system is adopted to collect electricity consumption data through the user's end and respond to user requests. The system stores and analyzes electricity consumption data, uses local outlier factor (LOF) values and clustering algorithms to identify abnormal electricity consumption behaviors, correct the electricity consumption data set, and draw the electricity consumption trend chart to predict the user's monthly electricity bill.
The accuracy of abnormal electricity use detection is improved, ensuring that only the real abnormal points are marked as abnormal, the corrected electricity use data set more realistically reflects the user's electricity use situation, and promptly notify staff for on-site verification, reduce losses between users and the power company, and safeguard the interests of both parties.
Smart Images

Figure CN119577645A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power supply services, and in particular relates to a remote electricity charging system. Background Art
[0002] The electricity billing system is an important part of power supply services, mainly used to manage and collect electricity charges from users. It involves multiple links such as electricity metering, billing, bill generation, and payment processing. Usually, the electricity billing system collects the user's electricity consumption in real time through the electricity meter, and after obtaining the user's electricity consumption, it issues a corresponding bill based on the electricity price. The bill usually includes user information, electricity consumption, fee details, payment deadline, etc. In addition, the electricity billing system needs to maintain and manage the user's basic information and electricity consumption information, etc. At the same time, the electricity billing system also needs to provide services such as user consultation, complaint handling, and service support.
[0003] The electricity billing system is an indispensable part of power supply services. It not only affects the revenue management of power supply companies, but also directly relates to the user's electricity experience. When dealing with problems of electricity users, it was found that the power supply unit received more complaints about the sudden increase in electricity bills in a certain month. Most of the customers who complained about this were because they used more high-energy-consuming electrical appliances in that month, such as more air conditioners during the season change. However, some customers did have a sudden increase in electricity bills due to problems such as electrical equipment failure, meter failure, and power theft. Therefore, how to effectively monitor users' abnormal electricity usage and safeguard the interests of users has become an important issue in power services.
[0004] The patent with publication number CN105932773A discloses an intelligent charging and anti-electricity theft system, which includes a high-voltage side system, a low-voltage side system and a monitoring and management system. The three are connected by GPRS, CDMA, optical fiber, and mobile phone APP. By collecting the user's electricity consumption data on the high and low voltage sides respectively, abnormal electricity consumption is monitored through real-time comparison, which makes up for the fact that the existing anti-electricity theft means can only monitor the low-voltage side. This anti-electricity theft monitoring can effectively monitor abnormal electricity consumption, but this monitoring method has the problem of high sensitivity. It is easy to make misjudgments when users use electrical appliances with high energy consumption, and each misjudgment requires staff to verify, so there will be a problem of low work efficiency. Summary of the invention
[0005] The purpose of the present invention is to provide a remote electricity billing system to solve the following technical problems raised in the background technology:
[0006] The existing remote electricity billing system has difficulty monitoring users' electricity usage, resulting in the inability to detect abnormal electricity usage behavior in a timely manner; for users, abnormal electricity usage may cause a surge in monthly electricity bills; for power companies, abnormal electricity usage may cause an increase in statistical line losses, leading to increased power supply costs.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A remote electricity charging system includes a user end and a system end;
[0009] The user end collects the user's electricity consumption data and responds to the user's request to provide electricity charge recharge and electricity charge inquiry; the electricity consumption data includes the electricity consumption information at each time point;
[0010] The system side stores the electricity consumption data collected by the user side and analyzes the user's electricity consumption; based on the electricity consumption situation, it determines whether the user has abnormal electricity consumption behavior;
[0011] The electricity consumption analysis method is as follows:
[0012] A. Obtain a data set of user electricity consumption data, and for each data point of the electricity consumption data, calculate its local outlier factor LOF value LOF(x i ), set the judgment threshold t.
[0013] If LOF(x i ) is greater than t, it is marked as an outlier.
[0014] B. Calculate the distance matrix of all data points in the user's electricity consumption data; use the clustering algorithm to perform cluster analysis based on the obtained distance matrix, and after clustering, obtain the cluster identifier to which each data point belongs; check the status of the data points that are abnormal points in the cluster.
[0015] If the outlier point is in a cluster and is consistent with the characteristics of the cluster, it is judged to be normal; if the outlier point is isolated and does not conform to any clustering characteristics, or deviates from the properties of the cluster, it is judged to be an abnormal data point.
[0016] C. Remove abnormal points that are judged to be abnormal from the data set of user electricity consumption data to obtain the data set to be filled.
[0017] Prepare a list of missing data points, including all points in the original dataset, while marking those locations that were temporarily excluded due to outliers.
[0018] The data set to be filled is completed to obtain the revised electricity consumption data set.
[0019] D. Draw an electricity consumption trend chart based on the revised electricity consumption data set.
[0020] The electricity consumption trend chart is used to determine whether the corrected electricity consumption trend has returned to the normal fluctuation range. If the filled data still shows an upward or downward trend, the user is judged to have abnormal electricity consumption behavior.
[0021] Furthermore, the system predicts the user's monthly electricity bill based on the user's electricity usage data and the latest charging plan.
[0022] The user side obtains the predicted monthly electricity bill of the user and feeds it back to the user.
[0023] Among them, the method for predicting the user's monthly electricity bill is as follows:
[0024] S1, the electricity fee prediction system obtains the latest charging plan from the cloud.
[0025] S2, calculates the average electricity consumption of the user for each hour in a day.
[0026] S3, combining the average power consumption per hour and the charging standards for each time period, calculates the electricity fee for each hour.
[0027] S4, accumulating the electricity charges for each hour to obtain the user's daily average electricity charge, and predicting the user's monthly electricity charge based on the user's daily average electricity charge.
[0028] Furthermore, the LOF value is calculated as follows:
[0029] Calculate the k nearest neighbors for each data point;
[0030] For each pair of electricity consumption data points x i and x j , calculate the difference between the two points; the calculated difference represents the difference in electricity consumption at different time points;
[0031] d(x i , x j )=|x i -x j |
[0032] The calculated differences are sorted from small to large. For each data point x i , find the distance x based on the calculated distance i The nearest k neighboring points are stored in the set N k (i) in;
[0033] N k (x i )={x m1 , x m2 ,…x mk}
[0034] Calculate the reachable distance, for any data point xi and its neighboring point xmn , x mn ∈N k (x i );
[0035] reach_dist(x i , x mn )=max(k_dist(x mn ), d(x i , x mn ))
[0036] Among them, reach_dist(x i , x mn ) represents the reachable distance; k_dist(x mn ) is the data point x mn and its kth neighbor x mnk The distance, k_dist(x mn )=d(x mn , x mnk );d(x i , x mn )) represents the data point x i With x mn The reachable distance here is used to simulate the variable amplitude of the user's electricity consumption at a certain point in time.
[0037] Calculate the local reachability density LRD;
[0038]
[0039] Here, the accessible density is used to simulate the average variable amplitude of the user's electricity consumption in a certain period of time.
[0040] The significance of LRD is to evaluate the local density of a point. The higher the density, the larger the LRD value.
[0041] Calculate the data point x i LOF value;
[0042]
[0043] The LOF value here is used to simulate the range of variation of a user's electricity consumption within a certain period of time.
[0044] Furthermore, K is 2 or 3
[0045] Furthermore, in step A, the threshold t ranges from 1.2 to 1.8.
[0046] Further, in step B,
[0047] The DBSCAN clustering algorithm is used for cluster analysis, where the neighborhood radius ε is set to 3 and the minimum number of points minPts is set to 2.
[0048] For each point x in the data set i , find the points in its ε neighborhood. If the number of points in the ε neighborhood is greater than or equal to minPts, mark these points as a cluster and continue to expand. If the point does not meet the requirements, it is marked as noise.
[0049] After clustering is completed, the cluster identifier of each data point is obtained. Check the status of the data points belonging to the outliers in the cluster.
[0050] If the outlier is in a cluster and is consistent with the characteristics of the cluster, it is considered normal. If the outlier is isolated and does not conform to any clustering characteristics, it is considered abnormal.
[0051] Furthermore, in step D, for each cluster, the outliers included in the analysis are evaluated as follows:
[0052] Calculate the average power consumption of each cluster, compare the power consumption of the abnormal point with the average value of the cluster, and determine whether it deviates. Observe the distribution of the abnormal point in the time series to confirm whether it is related to holidays.
[0053] If the outlier is in a cluster and is consistent with the characteristics of the cluster, and there are no external abnormal factors, it is judged to be normal.
[0054] Furthermore, in step E, the removed data are divided into short-term missing and long-term missing according to the length of missing time. For short-term missing, interpolation is used to fill it. For long-term missing, the time series prediction model is used to fill it.
[0055] Missing time of no more than 48 hours is considered short-term missing, and missing time of more than 48 hours is considered long-term missing.
[0056] Furthermore, the imputation method using the time prediction model includes using a unit root test to check the stationarity of the data. The (p, d, q) parameters are selected using the ACF and PACF plots, the model is trained based on the data after removing the outliers, and the trained model is used to predict the values at the locations of the removed outliers.
[0057] Furthermore, the model selected is the autoregressive integrated moving average model.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] In the present invention, by calculating the LOF value of each data point, potential abnormal electricity consumption behavior can be effectively identified, and then the data points are classified by a clustering algorithm, the status of the abnormal points can be further verified to ensure that only the real abnormal points are marked as abnormal. This double verification mechanism improves the accuracy of anomaly detection. By eliminating abnormal points judged to be abnormal, the corrected electricity consumption data set obtained can more realistically reflect the user's electricity consumption. The corrected electricity consumption data set can be used to draw a trend chart, so that users and power supply companies can intuitively observe the changing trend of electricity consumption. By comparing with the user's historical electricity consumption trend, abnormal fluctuations, such as a sharp increase or decrease, can be clearly identified.
[0060] When the system detects abnormal power usage, it can promptly notify relevant staff to conduct on-site verification to ensure that the problem is quickly resolved. This efficient service response mechanism improves the overall service quality. It can effectively reduce the losses of users and power companies caused by abnormal power usage and effectively safeguard the interests of both parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 The power consumption analysis flow chart of the present invention;
[0062] Figure 2 It is a flow chart of the LOF value calculation method of the present invention;
[0063] Figure 3 It is a cluster analysis flow chart of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Example:
[0066] A remote electricity charging system includes a user end and a system end;
[0067] The user end collects user electricity consumption data and responds to user requests to provide electricity charge recharge and electricity charge inquiry; the electricity consumption data includes electricity consumption information at each time point. The user end can be a smart meter or a terminal interaction platform, such as a mobile phone or tablet computer.
[0068] The system stores the electricity consumption data collected by the user and analyzes the user's electricity consumption; based on the electricity consumption, it determines whether the user has abnormal electricity consumption behavior. Electricity consumption data refers to the user's electricity consumption information, in kilowatt-hours.
[0069] The electricity consumption analysis method is as follows:
[0070] A. Obtain a data set of user electricity consumption data, and for each data point of the electricity consumption data, calculate its local outlier factor LOF value LOF(x i ), set the judgment threshold t;
[0071] If LOF(x i ) is greater than t, it is marked as an outlier. In this embodiment, the threshold can be set to 1.5. The LOF value is used to measure whether a data point is an outlier in its neighborhood. The larger the value, the more likely the point is an outlier. In other words, for the output LOF value, once it exceeds 1.5, it is very likely to be an outlier. For the judgment of outliers, this step only makes a preliminary judgment, and there are further verification steps later.
[0072] B. Calculate the distance matrix of all data points in the user's electricity consumption data; use the clustering algorithm to perform cluster analysis based on the obtained distance matrix, and after clustering, obtain the cluster identifier to which each data point belongs; check the status of the data points belonging to abnormal points in the cluster. Among them, calculate the distance between each data point to determine which data points can be regarded as adjacent points, and the adjacent points are judged by the distance between two data points.
[0073] If the abnormal point is in a cluster and is consistent with the characteristics of the cluster, it is judged to be normal; if the abnormal point is isolated and does not conform to any clustering characteristics, or deviates from the nature of the cluster, it is judged to be an abnormal data point. In other words, the output data points have cluster identification, which means that each data point will be assigned an identifier to indicate the cluster to which it belongs. Points in the same cluster have the same cluster identification. If the abnormal point determined in step 1 is not assigned any cluster identification in this step, it can be determined that it is truly abnormal.
[0074] C. Remove abnormal points from the user's electricity consumption data set to obtain a data set to be filled; prepare a list of missing data to be filled, which includes all points in the original data set, and mark those positions that are temporarily removed due to abnormal points; fill the data set to be filled to obtain a corrected electricity consumption data set. The purpose of this step is to obtain a relatively clean data set to reflect the user's simulated electricity consumption. Since the interference of abnormal points has been removed, this data set will reflect the user's actual electricity consumption more realistically and obviously.
[0075] D. Draw an electricity consumption trend chart based on the revised electricity consumption data set; judge whether the revised electricity consumption trend returns to the normal fluctuation range based on the electricity consumption trend chart. If the filled data still shows a significant upward or downward trend, the user is judged to have abnormal electricity consumption behavior. Drawing an electricity consumption trend chart using the revised electricity consumption data set can reflect the user's intuitive electricity consumption trend. Since the interference of abnormal points is eliminated, the graph is less affected. At this time, the graph reflected can more realistically express the user's actual electricity consumption. By comparing with the user's historical electricity consumption trend chart, if the user's new electricity consumption trend chart shows obvious upward and downward trends, it is likely to be abnormal. For example, if the electricity consumption trend shows a clear downward trend, there may be electricity theft, and special staff are required to verify it on site. If the electricity consumption trend shows a clear upward trend, there may be leakage, and similarly, special staff are required to verify it on site. Through this method, not only the rights and interests of users are effectively protected, but also the rights and interests of power companies are protected. A healthy power supply and power consumption relationship is guaranteed, and the quality of power sales services is improved. It can also effectively reduce the losses of users and power companies caused by abnormal electricity consumption, and effectively safeguard the interests of both parties.
[0076] In a preferred embodiment, the system predicts the user's monthly electricity bill based on the user's electricity usage data and the latest charging plan;
[0077] The user end obtains the predicted monthly electricity bill of the user and feeds it back to the user;
[0078] Among them, the method for predicting the user's monthly electricity bill is as follows:
[0079] S1, the electricity fee prediction system obtains the latest charging plan from the cloud; this step ensures the accuracy of the electricity fee prediction, because the charging plan may change due to power supply company policies, market changes and policy adjustments. By obtaining the latest charging plan, the system can calculate the electricity fee according to the actual charging standards, avoiding errors caused by using outdated plans.
[0080] S2, calculates the average electricity consumption of the user every hour in a day; the purpose of this step is to refine the user's electricity consumption behavior and ensure that the user's electricity consumption habits and patterns at different times of the day can be accurately grasped. By analyzing the average electricity consumption per hour, the system can reveal the peaks and valleys of the user's electricity consumption, laying the foundation for the next step of cost calculation.
[0081] S3, combining the average power consumption per hour and the charging standards for each time period, calculates the electricity charges for each hour; in this step, the system uses the acquired charging standards and the calculated hourly power consumption to specifically calculate the electricity charges corresponding to each hour.
[0082] S4, accumulates the electricity charges for each hour to obtain the user's daily average electricity charge, and predicts the user's monthly electricity charge based on the user's daily average electricity charge. The last step is to summarize the electricity charges calculated for each hour to obtain the user's daily average electricity charge. This is a key comprehensive analysis process, and then the monthly electricity charge is calculated based on the daily average charge, providing users with an advance estimate of electricity costs.
[0083] In a preferred embodiment,
[0084] The LOF value is calculated as follows:
[0085] Calculate the k nearest neighbors of each data point; the k value is selected to be 2 or 3, and in this embodiment, k is selected to be 3.
[0086] For each pair of electricity consumption data points x i and x j , calculate the difference between the two points; the calculated difference represents the difference in electricity consumption at different time points.
[0087] d(x i ,x j )=|x i -x j |
[0088] Among them, m is the feature dimension of each data point;
[0089] For each data point x i , find the distance x based on the calculated distance i The nearest k neighboring points are stored in the set N k (i) in;
[0090] N k (x i )={x m1 , x m2 ,...,x mk}
[0091] Calculate the reachable distance, for any data point xi and its neighboring point x mn , x mn ∈N k (x i );
[0092] reach_dist(x i , x mn )=max(k_dist(x mn ), d(x i , x mn )
[0093] Among them, reach_dist(x i , xmn ) represents the reachable distance. k_dist(x mn ) Here it means x mn The local density of itself, more specifically, is the value of point x mn To the kth nearest neighbor x mnk The distance, k_dist(x mn )=d(x mn , x mnk );d(x i , x mn )) represents the data points xi and x mn The distance between.
[0094] The reachable distance here is used to simulate the variable amplitude of the user's electricity consumption at a certain point in time.
[0095] Calculate the local reachability density LRD;
[0096]
[0097] The significance of LRD is to evaluate the local density of a point. The higher the density, the larger the LRD value.
[0098] Calculate the data point x i LOF value;
[0099]
[0100] Here, the reachable density is used to simulate the average change in the power consumption of a user within a certain period of time. In the LOF calculation, the LOF value represents the density of the point relative to the density of its neighbors. The LOF value is used to measure whether a data point is an outlier in its neighborhood. The larger the value, the more likely the point is an outlier.
[0101] For example, a set of electricity data for a user represents the user's electricity consumption for half a month. The specific data is as follows:
[0102]
[0103]
[0104] Among them, X i Indicates a certain day.
[0105] Set the parameter k=3, that is, calculate the three nearest neighbors of each data point.
[0106] For any pair of data points x i and x j , calculate the difference between two points.
[0107] After calculating the difference of all data points, the three nearest neighbors of each data point are stored in ascending order according to the difference. Due to the large amount of data, we will not go into details here. k (i) As shown in the following table:
[0108] <![CDATA[x i ]]> <![CDATA[Neighboring point x j > 1 3,2,5 2 3,1,5 3 2,1,5 4 8,9,14 5 6,2,3 6 5,2,3 7 11,15,10 8 4,9,14 9 14,15,11 10 11,12,7 11 10,7,15 12 10,11,7 13 6,12,5 14 15,9,7 15 7,11,14
[0109] For example, for a data point X 10 The calculated LOF value is 8.94, which is much larger than 1.5. Therefore, data point 10 can be marked as an outlier. For other outliers, the values can be substituted into the formula for calculation.
[0110] In a preferred embodiment, as shown in the above calculation process, K is 2 or 3. In this embodiment, K is 3.
[0111] In a preferred embodiment, in the above-implemented step A, the threshold value t is in the range of 1.2-1.8. In this embodiment, the threshold value t is specifically 1.5.
[0112] In a preferred embodiment, in step B,
[0113] The DBSCAN clustering algorithm is used for cluster analysis, where the neighborhood radius ε is set to 3 and the minimum number of points minPts is set to 2;
[0114] For each point x in the data set i , find the points in its ε neighborhood; if the number of points in the ε neighborhood is greater than or equal to minPts, mark these points as a cluster and continue to expand; if the point does not meet the requirements, mark it as noise;
[0115] After clustering is completed, the cluster identifier of each data point is obtained; the status of the data points belonging to the outliers in the cluster is checked;
[0116] If the outlier is in a cluster and is consistent with the characteristics of the cluster, it is judged to be normal; if the outlier is isolated and does not conform to any clustering characteristics, or obviously deviates from the properties of the cluster, it is judged to be abnormal.
[0117] Further optimized, in step B, for each cluster, the outliers included in the analysis are evaluated as follows:
[0118] Calculate the average power consumption of each cluster, compare the power consumption of the abnormal point with the average value of the cluster, and determine whether it deviates; observe the distribution of the abnormal point in the time series to confirm whether it is related to holidays;
[0119] If the outlier is in a cluster and is consistent with the characteristics of the cluster, and there are no external abnormal factors, it is judged to be normal.
[0120] By calculating the average power usage of each cluster, we can get a baseline for the normal power usage pattern in that cluster. This baseline will be used for subsequent comparative analysis to help us understand whether the outliers deviate significantly from the normal level. By comparing the power usage of the outliers with the average power usage of the cluster they belong to, we can identify which outliers deviate from the overall trend of the cluster. This assessment of the degree of deviation can help determine whether the outliers are accidental fluctuations or reflect a deeper problem. If there is a significant deviation, it means that the power usage of the outliers is much higher than the average, indicating that the user may have abnormal power usage behavior. If there is a slight deviation, it may just be a normal fluctuation or even a seasonal change. Analyzing the distribution of outliers in the time series can help confirm whether these abnormal power usage behaviors are related to specific events. For example, certain holidays, promotions, or weather changes may cause significant fluctuations in power usage. If the outliers appear in the time period of a specific event, it may be normal power usage behavior rather than an anomaly. If the appearance of the outliers is not related to a specific event, it is necessary to further investigate its cause. When analyzing outliers, it is crucial to consider external abnormal factors (such as holidays). These factors may have a significant impact on electricity consumption, so they need to be excluded to avoid misjudgment. The role of step D is to more accurately determine whether the user's electricity consumption behavior is abnormal by comprehensively analyzing the abnormal points in the cluster, combining the average electricity consumption, time series distribution, and the impact of external events. This detailed analysis helps to improve the accuracy of anomaly detection and reduce misjudgment.
[0121] In a preferred embodiment, in step E, the removed data are divided into short-term missing and long-term missing according to the length of missing time; short-term missing is filled by interpolation; long-term missing is filled by using a time series prediction model;
[0122] Missing data that does not exceed 48 hours are considered short-term missing data, and missing data that exceeds 48 hours are considered long-term missing data. Further optimized, the filling method using the time prediction model includes using a unit root test to check the stationarity of the data; using ACF and PACF graphs to select (p, d, q) parameters, training the model based on the data after removing the outliers, and using the trained model to predict the values at the location of the removed outliers. Further optimized, if the data exhibits seasonal effects, the seasonal ARIMA model is selected. For short-term missing data, interpolation methods such as linear interpolation and Lagrange interpolation are used to fill in the missing data. This method relies on the values of adjacent known data points to estimate the missing values and is suitable for short-term missing data because its data changes are relatively smooth and continuous. This filling method helps maintain the continuity and consistency of the data. For long-term missing data, time series prediction models such as ARIMA and seasonal decomposition are used to fill in the missing data. This method can take into account the historical trends, seasonality, and cyclical changes of the data, and therefore can provide missing value estimates that are more in line with the actual situation. This filling method can use the trend information of historical data to produce more reasonable predictions when the missing time is long. After filling the missing data, the data set is more complete, which is helpful for subsequent analysis and modeling, and reduces the bias or erroneous conclusions caused by missing data. Especially when conducting time series analysis, continuous time series are essential for model fitting and prediction. Complete and accurate data will help generate more reliable reports and analysis results. The design of step E handles missing data by classification, and adopts different filling strategies for short-term and long-term missing data. Effective use of interpolation and time series prediction models can significantly improve the integrity and quality of data, ensure the accuracy of analysis and model prediction, and thus provide a solid data foundation for subsequent business decisions. The filling method using the time prediction model includes using unit root test to check the stationarity of data; using ACF and PACF graphs to select appropriate (p, d, q) parameters, training the model based on the data after removing the outliers, and using the trained model to predict the value of the location of the removed outliers. Here, the model selects the autoregressive integrated moving average model. Using unit root tests, such as ADF tests, to check the stationarity of time series data is an important step in time series analysis. The mean and variance of stationary data remain unchanged, and the autocorrelation structure does not change over time. Because many time series models, such as ARIMA, require the input data to be stationary. : The autocorrelation function (ACF) and partial autocorrelation function (PACF) plots are key tools for selecting the parameters (p, d, q) of the ARIMA model. The number of autoregressive terms is determined by the PACF plot. It is determined by the results of the unit root test, usually the number of differences required to make the data stationary. The number of moving average terms is determined by the ACF plot. By analyzing the ACF and PACF plots, appropriate parameters can be effectively selected to build a suitable ARIMA or other time series model.Using stationary data after outliers have been removed to train the model can learn the potential patterns, trends and seasonality of the data, thus providing a basis for subsequent predictions. When outliers are removed from the data, the impact of noise is reduced, allowing the model to better capture the changing patterns of normal data. This step achieves in-depth analysis and reasonable filling of time series data through unit root tests, analysis of ACF and PACF graphs, model training and outlier prediction. This not only solves the gaps in the data, but also provides a reliable historical basis for further analysis and decision-making, enhancing the systematic and scientific nature of data processing.
[0123] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A remote electricity billing system, characterized in that: The user end is a terminal device that collects user electricity consumption data and responds to user requests to provide electricity charge recharge and electricity charge inquiry; the electricity consumption data includes electricity consumption information at each time point; The system side stores the power consumption data collected by the user side and analyzes the user's power consumption; based on the power consumption, it determines whether the user has abnormal power consumption behavior, and sends the user's power consumption and judgment results to the user side; The electricity consumption analysis method is as follows: A. Obtain a data set of user electricity consumption data and calculate the local outlier factor LOF value LOF(x i ), set the judgment threshold t, if LOF(x i ) is greater than t, it is marked as an outlier; B. Calculate the distance matrix of all data points in the user's electricity consumption data; Use clustering algorithm to perform cluster analysis. After clustering is completed, the cluster identifier of each data point is obtained; Determine abnormal data points through cluster identification; C. Remove abnormal points that are judged to be abnormal from the data set of user electricity consumption data to obtain a data set to be filled; Complete the data set to be filled to obtain a revised electricity consumption data set; D. Draw a power consumption trend chart based on the revised power consumption data set; The electricity consumption trend chart is used to determine whether the corrected electricity consumption trend has returned to the normal fluctuation range. If the filled data still shows an upward or downward trend, the user is judged to have abnormal electricity consumption behavior.
2. A remote electricity billing system according to claim 1, characterized in that: The system predicts the user's monthly electricity bill based on the user's electricity consumption data and the latest charging plan; The user end obtains the predicted monthly electricity bill of the user and feeds it back to the user; Among them, the method for predicting the user's monthly electricity bill is as follows: S1, the electricity fee prediction system obtains the latest charging plan; S2, calculates the average electricity consumption of the user in each hour of the day; S3, combining the average power consumption per hour and the charging standards for each time period, calculates the electricity fee for each hour; S4, accumulating the electricity charges for each hour to obtain the user's daily average electricity charge, and predicting the user's monthly electricity charge based on the user's daily average electricity charge.
3. A remote electricity billing system according to claim 1, characterized in that: The LOF value is calculated as follows: Calculate the k nearest neighbors for each data point; For each pair of electricity consumption data points x i and x j , calculate the difference between two points; d(x i ,x j )=|x i -x j | Calculate the difference and sort it from small to large. For each data point x i , find the k nearest neighboring points to xi according to the calculated distance, and store these neighboring points in the set N k (i) in; N k (x i )={x m1 ,x m2 ,...,x mk } Calculate the reachable distance, for any data point x i and its neighboring point x mn , x mn ∈N k (x i ); reach_dist(x i ,x mn )=max(k_dist(x mn ),d(x i ,x mn )) Among them, reach_dist(x i , x mn ) represents the reachable distance; k_dist(x mn ) is the data point x mn and its kth neighbor x mnk The distance, k_dist(x mn )=d(x mn , x mnk );d(x i , x mn )) represents the data point x i With x mn The distance between Calculate the local reachability density LRD; Calculate the data point x i LOF value; 4. A remote electricity billing system according to claim 3, characterized in that: K is 2 or 3.
5. A remote electricity billing system according to claim 1, characterized in that: In step A, the threshold t ranges from 1.2 to 1.
8.
6. A remote electricity billing system according to claim 5, characterized in that: In step B, the DBSCAN clustering algorithm is used for cluster analysis, where the neighborhood radius ε is set to 3 and the minimum number of points minPts is set to 2; For each point x in the data set i , find the points in its ε neighborhood; if the number of points in the ε neighborhood is greater than or equal to 2, mark these points as a cluster and continue to expand; if the point does not meet the requirements, mark it as noise; After clustering is completed, the cluster identifier of each data point is obtained; the status of the data points belonging to the outliers in the cluster is checked; If the outlier is in a cluster and is consistent with the characteristics of the cluster, it is considered normal; If the outlier point is isolated and does not conform to any clustering characteristics, or deviates from the nature of the cluster, it is judged to be abnormal.
7. A remote electricity billing system according to claim 6, characterized in that: In step D, for each cluster, the outliers included in the analysis are evaluated as follows: Calculate the average power consumption of each cluster, compare the power consumption of the abnormal point with the average value of the cluster, and determine whether it deviates; observe the distribution of the abnormal point in the time series to confirm whether it is related to holidays; If the outlier is in a cluster and is consistent with the characteristics of the cluster, and there are no external abnormal factors, it is judged to be normal.
8. A remote electricity billing system according to claim 1, characterized in that: In step C, the removed data are divided into short-term missing and long-term missing according to the length of missing time; short-term missing is filled by interpolation; long-term missing is filled by time series prediction model; Missing time of no more than 48 hours is considered short-term missing, and missing time of more than 48 hours is considered long-term missing.
9. A remote electricity billing system according to claim 8, characterized in that: The imputation method using the time prediction model includes using the unit root test to check the stationarity of the data; using the ACF and PACF graphs to select the (p, d, q) parameters, training the model based on the data after removing the outliers, and using the trained model to predict the values at the locations of the removed outliers.
10. A remote electricity billing system according to claim 8, characterized in that: The model selected is the autoregressive integrated moving average model.
Citation Information
Patent Citations
Intelligent charging electricity larceny prevention system
CN105932773A