A method and device for identifying abnormal electricity pricing for agricultural irrigation and drainage.
By identifying anomalies and matching user information in historical electricity consumption data of agricultural irrigation and drainage meters, and by using an anomaly identification model and clustering algorithm based on electricity prices, the problem of inspecting agricultural irrigation and drainage electricity consumption in remote areas has been solved, and the efficiency and accuracy of identifying and recovering illegal electricity use has been improved.
Patent Information
- Application Number
- CN202211419418.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-11-14
AI Technical Summary
Because agricultural irrigation and drainage electricity is largely distributed in remote areas, the cost and difficulty of conducting on-site inspections of abnormal electricity prices have increased. Existing technologies are insufficient to effectively identify and recover illegal electricity use, which affects the interests of power companies.
By acquiring historical electricity consumption data from agricultural irrigation and drainage meters, an anomaly identification model is used to identify anomalies through electricity price execution. An anomaly meter set is constructed, and user information is matched to generate an anomaly user list. Anomaly identification models for electricity price execution during both the non-irrigation season and the irrigation season are used, combined with outlier analysis and clustering algorithms, to identify abnormal electricity consumption behavior.
It reduces the difficulty of conducting on-site inspections of abnormal electricity prices, improves the accuracy and comprehensiveness of identification, enhances the automation and intelligence level of marketing inspections, and helps power companies recover operating losses.
Smart Images

Figure CN115689374B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity, and in particular to a method and apparatus for identifying abnormal electricity pricing for agricultural irrigation and drainage. Background Technology
[0002] With the development of my country's power system and socio-economic progress, power companies classify electricity prices according to different electricity usage areas. One such electricity price is for agricultural irrigation and drainage, which refers to temporary electricity used for irrigation and drainage of grain crops, flood control, and drought relief. Compared to other electricity usage types, agricultural irrigation and drainage electricity is more affordable. Some users, due to a lack of understanding of electricity pricing policies, believe that agricultural irrigation and drainage electricity can be used arbitrarily as long as there are needs such as animal husbandry, house construction, photography, or workshop production. This leads to frequent illegal electricity use practices such as paying high prices for low-priced connections, which harms the interests of power companies.
[0003] Since agricultural irrigation and drainage electricity is largely distributed in remote areas, the cost and difficulty of conducting on-site inspections of abnormal electricity prices have increased. Therefore, there is an urgent need for a method to identify abnormal electricity price implementation for agricultural irrigation and drainage electricity, to discover abnormal electricity users, to improve the accuracy and comprehensiveness of abnormal electricity price inspections, to enhance the automation and intelligence of marketing inspections, and to provide data support for the company to prevent marketing risks and recover operating losses. Summary of the Invention
[0004] In view of this, this application provides a method and device for identifying abnormal electricity pricing for agricultural irrigation and drainage, with the aim of reducing the difficulty of on-site inspection of abnormal electricity pricing.
[0005] The first aspect of this application provides a method for identifying abnormal electricity pricing for agricultural irrigation and drainage, characterized by comprising:
[0006] Obtain historical electricity consumption data from multiple agricultural irrigation and drainage meters;
[0007] An anomaly detection model based on electricity price execution is used to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, thereby obtaining a set of anomaly meters.
[0008] By matching user information with the set of abnormal meters, a list of abnormal users is obtained.
[0009] Optionally, the historical electricity consumption data includes historical daily electricity consumption sequences and / or historical daily power generation curves.
[0010] Optionally, the historical electricity consumption data includes historical daily electricity consumption sequences and historical daily power curves, and the electricity price execution anomaly identification model includes a non-irrigation season electricity price execution anomaly identification model;
[0011] The method utilizes an anomaly detection model based on electricity pricing to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, thereby obtaining a set of anomaly meters, including:
[0012] Calculate the dates in the historical daily electricity consumption sequence where the daily electricity consumption is greater than zero;
[0013] From the historical daily power generation curves of agricultural irrigation and drainage meters where the number of days with daily electricity consumption greater than zero is greater than a first preset threshold, extract the daily power generation curve to be identified, wherein the daily power generation curve to be identified is the daily power generation curve corresponding to the days with daily electricity consumption greater than zero in the historical daily electricity consumption sequence.
[0014] Calculate the average power of the daily power generation curve to be identified during the early morning period, the average power during the daytime period, and the average power during the nighttime period;
[0015] Agricultural irrigation and drainage meters whose daily power generation curves to be identified have an average power output greater than one-third of the average power output during the daytime period, or whose average power output during the nighttime period is greater than one-half of the average power output during the daytime period, or whose average power output during the early morning period is greater than the average power output during the nighttime period, are added to the abnormal meter set.
[0016] Optionally, after extracting the daily power generation curve to be identified, the method further includes:
[0017] The agricultural irrigation and drainage meters to which the power generation curve of the day to be identified belongs, whose power generation value is greater than zero at all time points, are added to the abnormal meter set.
[0018] Optionally, the historical electricity consumption data includes historical daily power generation curves, and the electricity price execution anomaly identification model includes an irrigation season electricity price execution anomaly identification model;
[0019] The method utilizes an anomaly detection model based on electricity pricing to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, thereby obtaining a set of anomaly meters, including:
[0020] A feature vector is constructed for the historical daily power generation curves of each agricultural irrigation and drainage meter. The feature vector includes: electricity continuity index, number of complete electricity consumptions, average duration of complete electricity consumption, average of multiple complete electricity consumption start times included in the complete electricity consumption start time series, standard deviation of multiple complete electricity consumption start times included in the complete electricity consumption start time series, average of multiple complete electricity consumption end times included in the complete electricity consumption end time series, standard deviation of multiple complete electricity consumption end times included in the complete electricity consumption end time series, ratio of daytime average power to nighttime average power, ratio of daytime average power to early morning average power, and ratio of nighttime average power to early morning average power.
[0021] Agricultural irrigation and drainage meters with an electricity continuity index greater than or equal to the second preset threshold are designated as continuous electricity meters, while agricultural irrigation and drainage meters with an electricity continuity index less than the second preset threshold are designated as intermittent electricity meters.
[0022] A continuous power consumption vector set is established for each of the continuous power consumption meters, and an intermittent power consumption vector set is established for each of the intermittent power consumption meters. The feature vectors in the continuous power consumption vector set include: the ratio of average power during the day to average power at night, the ratio of average power during the day to average power at dawn, and the ratio of average power at night to average power at dawn. The feature vectors in the intermittent power consumption vector set include: the number of complete power consumption cycles, the average duration of a complete power consumption cycle, the average of multiple complete power consumption start times included in the complete power consumption start time series, the standard deviation of multiple complete power consumption start times included in the complete power consumption start time series, the average of multiple complete power consumption end times included in the complete power consumption end time series, and the standard deviation of multiple complete power consumption end times included in the complete power consumption end time series.
[0023] Perform a first outlier analysis on the continuous electricity consumption vector set of each of the continuous electricity consumption meters, and add the continuous electricity consumption meters to which the feature vectors belonging to the outliers belong to the abnormal meter set;
[0024] A second outlier analysis is performed on the intermittent electricity consumption vector set of each of the intermittent electricity consumption meters, and the intermittent electricity consumption meters to which the feature vectors belonging to the outliers belong are added to the abnormal meter set.
[0025] Optionally, the first outlier analysis of the continuous electricity consumption vector set of each of the continuous electricity consumption meters includes:
[0026] A first sample matrix is constructed based on the continuous electricity consumption vector set of each of the continuous electricity consumption meters;
[0027] The first sample matrix is normalized to obtain the second sample matrix;
[0028] The second sample matrix is clustered using a clustering algorithm to obtain clustering results, resulting in at least one target cluster, and the centroid of each target cluster is obtained.
[0029] Calculate the first distance between the feature vectors in each of the target clusters and their respective nearest centroids;
[0030] Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance;
[0031] Feature vectors whose second distance is greater than a third preset threshold are considered outliers.
[0032] Optionally, the second outlier analysis of the intermittent electricity consumption vector sets of each of the intermittent electricity meters includes:
[0033] A third sample matrix is constructed based on the intermittent electricity consumption vector set of each of the intermittent electricity consumption meters;
[0034] The fourth sample matrix is obtained by normalizing the third sample matrix.
[0035] The fourth sample matrix is clustered using a clustering algorithm to obtain at least one target cluster, and the centroid of each target cluster is obtained.
[0036] Calculate the first distance between the feature vectors in each of the target clusters and their respective nearest centroids;
[0037] Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance;
[0038] Feature vectors whose second distance is greater than the fourth preset threshold are considered outliers.
[0039] Optionally, the second outlier analysis of the intermittent electricity consumption vector sets of each of the intermittent electricity consumption meters further includes:
[0040] After normalizing the third sample matrix, principal component analysis is performed to obtain the principal components of the third sample matrix.
[0041] Construct a fourth sample matrix based on the principal components of the third sample matrix.
[0042] Optionally, the clustering algorithm is a K-means clustering algorithm.
[0043] A second aspect of this application provides a device for identifying abnormal electricity pricing for agricultural irrigation and drainage, characterized in that the device comprises:
[0044] The data acquisition unit is used to acquire historical electricity consumption data from multiple agricultural irrigation and drainage meters;
[0045] An abnormal electricity meter identification unit is used to use an electricity price to execute an abnormal identification model to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, and to obtain a set of abnormal electricity meters.
[0046] An abnormal user matching unit is used to match user information based on the set of abnormal electricity meters to obtain a list of abnormal users.
[0047] This application obtains historical electricity consumption data from multiple agricultural irrigation and drainage meters, and uses an electricity price execution anomaly identification model to identify anomalies in the historical electricity consumption data of these meters, thereby obtaining a set of abnormal meters. The electricity price execution anomaly identification model includes a non-irrigation season electricity price execution anomaly identification model and an irrigation season electricity price execution anomaly identification model. Based on the set of abnormal meters, user information is matched to obtain a list of abnormal users. This application uses the electricity price execution anomaly identification model to identify anomalies in the historical electricity consumption data of agricultural irrigation and drainage meters, adding agricultural irrigation and drainage meters with abnormal electricity price execution to the abnormal meter set. Based on the abnormal meter set, a list of abnormal users is obtained. Inspectors can conduct on-site inspections based on the list of abnormal users, thereby reducing the difficulty of on-site inspections for abnormal electricity prices. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 A flowchart illustrating a method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0050] Figure 2 A flowchart illustrating another method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0051] Figure 3 A flowchart illustrating another method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0052] Figure 4 A flowchart illustrating another method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0053] Figure 5 A flowchart illustrating another method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0054] Figure 6 A flowchart illustrating another method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, provided as an embodiment of this application;
[0055] Figure 7 This is a schematic diagram of an abnormal electricity price enforcement identification device for agricultural irrigation and drainage provided as an embodiment of this application. Detailed Implementation
[0056] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this invention.
[0057] See Figure 1 As shown, this application provides a method for identifying abnormal electricity pricing for agricultural irrigation and drainage. This method is applicable to electronic devices capable of data processing, such as mobile phones, tablets, all-in-one machines, computers, servers, etc., and specifically includes the following steps:
[0058] Step S101: Obtain historical electricity consumption data from multiple agricultural irrigation and drainage meters.
[0059] In the embodiments of this application, the agricultural irrigation and drainage meter refers to the meter that records the electricity used for agricultural irrigation and drainage, which refers to the temporary electricity used for irrigation and drainage of grain crops, agricultural flood control, and agricultural drought relief.
[0060] As an optional implementation method, the historical electricity consumption data can be a historical daily electricity consumption sequence, or a historical daily electricity consumption sequence and a historical daily power generation curve. The historical daily electricity consumption sequence includes information on the daily electricity consumption of agricultural irrigation and drainage meters within a certain period. The historical daily power generation curve includes information on the daily power generation curve of agricultural irrigation and drainage meters within a certain period. The daily power generation curve refers to a 96-point power generation curve. In this 96-point power generation curve, the power generation is recorded every 15 minutes starting from midnight each day to obtain the power generation values at 96 time points within a day.
[0061] Step S102: Use the electricity price anomaly detection model to identify anomalies in the historical electricity consumption data of multiple agricultural irrigation and drainage meters, and obtain a set of abnormal meters.
[0062] In the embodiments of this application, the electricity price execution anomaly identification model is used to identify anomalies in the historical electricity consumption data of agricultural irrigation and drainage meters, and output an abnormal meter set containing agricultural irrigation and drainage meters with abnormal electricity consumption, so as to match abnormal users based on the abnormal meter set.
[0063] As an optional implementation method, based on different electricity consumption scenarios of agricultural irrigation and drainage meters, the electricity price execution anomaly identification model is divided into an irrigation season electricity price execution anomaly identification model and a non-irrigation season electricity price execution anomaly identification model. The irrigation season electricity price execution anomaly identification model is established based on historical electricity consumption sequences, while the non-irrigation season electricity price execution anomaly identification model is established based on historical daily power generation curves and historical daily electricity consumption sequences. It should be noted that the non-irrigation season electricity price execution anomaly identification model is also applicable to agricultural irrigation and drainage meters in the irrigation season, and the irrigation season electricity price execution anomaly identification model is also applicable to agricultural irrigation and drainage meters in the non-irrigation season.
[0064] As an optional implementation method, both the irrigation season electricity price execution anomaly identification model and the non-irrigation season electricity price execution anomaly identification model can be used simultaneously for identification. Finally, the abnormal meters obtained from the two electricity price execution identification models are combined to improve the accuracy of the screening results. As another optional implementation method, the non-irrigation season electricity price execution anomaly identification model can be used first to perform the first anomaly identification to obtain the first set of abnormal meters. Then, the irrigation season electricity price execution anomaly identification model can be used to perform the second anomaly identification on the electricity consumption data of agricultural irrigation and drainage meters in the first set of abnormal meters to obtain the second set of abnormal meters, thereby further improving the accuracy of the screening results.
[0065] Step S103: Match user information with the abnormal meter set to obtain a list of abnormal users.
[0066] In the embodiments of this application, the user information of the user to whom the abnormal agricultural irrigation and drainage meter belongs is matched in the power company's system based on the abnormal meter set. The user information includes, but is not limited to, user name, address, and power supply unit. This application does not limit this aspect.
[0067] See Figure 2 As shown, when the electricity consumption scenario is during the non-irrigation season, using the non-irrigation season electricity price to implement the anomaly identification model is a preferred choice. The historical electricity consumption data obtained in step S101 includes the historical daily electricity consumption sequence and the historical daily power generation curve. At this time, step S102 specifically includes the following steps:
[0068] Step S201: Calculate the dates in the historical daily electricity consumption sequence where the daily electricity consumption is greater than zero.
[0069] As an optional implementation, for example, the historical daily electricity consumption sequence of agricultural irrigation and drainage meter A is {0, 45, 48, 111, 0, 0, 152}, and the time range of the historical daily electricity consumption sequence is from September 1st to September 7th. Then, the dates with daily electricity consumption greater than zero are September 2nd, September 3rd, September 4th, and September 7th.
[0070] Step S202: Extract the daily power generation curve to be identified from the historical daily power generation curves of agricultural irrigation and drainage meters where the number of days with daily electricity consumption greater than zero is greater than a first preset threshold. The daily power generation curve to be identified is the daily power generation curve corresponding to the days with daily electricity consumption greater than zero in the historical daily electricity consumption sequence.
[0071] In the embodiments of this application, the specific parameters of the first preset threshold are set by technicians according to the actual situation or converted according to the sampling time range, and this application does not limit them in this respect.
[0072] As an optional implementation, for example, if the first preset threshold is set to 3, then the number of days when the daily electricity consumption of agricultural irrigation and drainage meter A is greater than the first preset threshold, and the daily power generation curves for September 2, September 3, September 4 and September 7 are extracted from the historical daily power generation curves of agricultural irrigation and drainage meter A based on the days when the daily electricity consumption is greater than zero.
[0073] As an optional implementation method, after extracting the power generation curve of the day to be identified, the agricultural irrigation and drainage meters to which the power generation curve of the day to be identified belongs at each time point is all greater than zero can be added to the abnormal meter set. For example, if the power generation values of 96 points of the power generation curve of agricultural irrigation and drainage meter A on September 11 are all greater than zero, it can be determined that agricultural irrigation and drainage meter A has abnormal electricity price execution behavior and is added to the abnormal meter set.
[0074] Step S203: Calculate the average power of the daily power generation curve to be identified during the early morning period, the average power during the daytime period, and the average power during the nighttime period.
[0075] In the embodiments of this application, the daily power generation curve is divided into the early morning period, the daytime period, and the nighttime period based on the electricity consumption characteristics of each type of electricity consumption. The early morning period is from 0:00 to 5:00, the daytime period is from 5:00 to 17:00, and the nighttime period is from 17:00 to 24:00.
[0076] The electricity consumption characteristics of each type of electricity consumption are as follows:
[0077] Electricity used in agricultural production: Fish farms, commercial fishing parks, chicken farms, etc., may use electricity both day and night;
[0078] Residential electricity consumption: including lighting, electricity consumption for staff on duty at drainage stations, etc. Lighting is usually used between night and early morning, while household appliances such as refrigerators use electricity 24 hours a day in standby mode.
[0079] 3. Commercial electricity: Factories, small workshops, etc. consume a lot of electricity during the day when they are working, and consume electricity at night when the machines are in standby mode.
[0080] In the embodiments of this application, the early morning period corresponds to the power generation values from point 1 to point 20 on the power generation curve to be identified, and the average power during the early morning period is the average power generation values from point 1 to point 20. The daytime period corresponds to the power generation values from point 21 to point 68 on the power generation curve to be identified, and the average power during the daytime period is the average power generation values from point 21 to point 68. The nighttime period corresponds to the power generation values from point 69 to point 96 on the power generation curve to be identified, and the average power during the nighttime period is the average power generation values from point 69 to point 96.
[0081] Step S204: Add the agricultural irrigation and drainage meters whose daily power generation curves to be identified, where the average power during the early morning period is greater than one-third of the average power during the daytime period, or the average power during the nighttime period is greater than half of the average power during the daytime period, or the average power during the early morning period is greater than the average power during the nighttime period, to the abnormal meter set.
[0082] In this application embodiment, three conditions are listed for determining whether agricultural irrigation and drainage meters have abnormal electricity price execution. As an optional implementation method, agricultural irrigation and drainage meters added to the abnormal meter set can be classified into abnormal levels. Specifically, agricultural irrigation and drainage meters that meet all three judgment conditions are classified as level A, those that meet two judgment conditions are classified as level B, and those that meet only one judgment condition are classified as level C. The priority from high to low is level A, level B, and level C, respectively. Inspectors can carry out inspection work according to the priority. For example, on-site inspection work of agricultural irrigation and drainage meters with an abnormal level of level A is given priority.
[0083] See Figure 3 As shown, although the non-irrigation season electricity price execution anomaly identification model can still be used during the irrigation season, its accuracy will be lower. This is because the electricity consumption of agricultural irrigation and drainage meters increases significantly during the irrigation season, with various application scenarios such as crop irrigation, flood control and drainage, and temporary electricity use for drought relief. The electricity consumption patterns are more complex. To further improve the accuracy of the screening results, when the electricity consumption scenario is the irrigation season, using the irrigation season electricity price execution anomaly identification model is a better choice. The historical electricity consumption data obtained in step S101 is the historical daily power generation curve. At this time, step S102 specifically includes the following steps:
[0084] Step S301: Construct feature vectors for the historical daily power generation curves of each agricultural irrigation and drainage meter. The feature vectors include: electricity continuity index, number of complete electricity consumptions, average duration of complete electricity consumption, average of multiple complete electricity consumption start times included in the complete electricity consumption start time series, standard deviation of multiple complete electricity consumption start times included in the complete electricity consumption start time series, average of multiple complete electricity consumption end times included in the complete electricity consumption end time series, standard deviation of multiple complete electricity consumption end times included in the complete electricity consumption end time series, ratio of daytime average power to nighttime average power, ratio of daytime average power to early morning average power, and ratio of nighttime average power to early morning average power.
[0085] In the embodiments of this application, feature vectors are constructed from aspects such as electricity consumption time, electricity consumption duration, and fluctuation of electricity consumption curve. Taking a time range of one month as an example, the definitions of each feature vector are as follows:
[0086] Electricity continuity index: the maximum duration for which power generation is continuously greater than 0 within a month, divided by the total cycle length;
[0087] Complete electricity usage count: Electricity usage from start to finish is considered a complete electricity usage count. The number of complete electricity usage counts within a month is counted. The start of electricity usage refers to the power generation value of the daily power generation curve being greater than zero, and the end of electricity usage refers to the power generation value of the daily power generation curve being equal to zero.
[0088] Average complete electricity usage duration: The average duration of complete electricity usage within one month;
[0089] The average of multiple complete electricity consumption start times included in the complete electricity consumption start time series: a series consisting of the start times of each complete electricity consumption within a month, and the average of the start times of complete electricity consumption in the series;
[0090] The standard deviation of multiple complete electricity consumption start times included in the complete electricity consumption start time series: the sequence consisting of the start times of each complete electricity consumption within a month, and the standard deviation of the start times of complete electricity consumption in the sequence;
[0091] The average of multiple complete electricity consumption end times included in the complete electricity consumption end time series: the average of the start times of each complete electricity consumption within a month, forming a series of complete electricity consumption end times;
[0092] The standard deviation of multiple complete electricity consumption end times included in the complete electricity consumption end time series: the standard deviation of the start time of each complete electricity consumption within a month, which constitutes the series of end times of each complete electricity consumption.
[0093] Ratio of average daytime power to average nighttime power: The ratio of the average power during the daytime period to the average power during the early morning period within a month;
[0094] Ratio of average daytime power to average nighttime power: The ratio of the average power during the daytime period to the average power during the nighttime period within a month;
[0095] Nighttime average power to early morning average power ratio: The ratio of the average power value during the nighttime period to the average power value during the early morning period within a month.
[0096] Step S302: Agricultural irrigation and drainage meters with an electricity continuity index greater than or equal to the second preset threshold are designated as continuous electricity meters, and agricultural irrigation and drainage meters with an electricity continuity index less than the second preset threshold are designated as intermittent electricity meters.
[0097] In the embodiments of this application, agricultural irrigation and drainage meters are classified into intermittent electricity meters and continuous electricity meters according to the electricity continuity index. The value of the second preset threshold is generally set to 1. Optionally, the second preset threshold can be set by itself or calculated based on the time range of historical electricity data. This application does not limit this aspect.
[0098] Step S303: Establish a continuous power consumption vector set for each continuous power consumption meter and a continuous power consumption vector set for each intermittent power consumption meter. The feature vectors in the continuous power consumption vector set include: the ratio of average power during the day to average power at night, the ratio of average power during the day to average power at dawn, and the ratio of average power at night to average power at dawn. The feature vectors in the intermittent power consumption vector set include: the number of complete power consumption cycles, the average duration of a complete power consumption cycle, the average of multiple complete power consumption start times included in the complete power consumption start time series, the standard deviation of multiple complete power consumption start times included in the complete power consumption start time series, the average of multiple complete power consumption end times included in the complete power consumption end time series, and the standard deviation of multiple complete power consumption end times included in the complete power consumption end time series.
[0099] Step S304: Perform the first outlier analysis on the continuous electricity consumption vector set of each continuous electricity consumption meter, and add the continuous electricity consumption meter to which the feature vector of the outlier belongs to the abnormal meter set.
[0100] In the embodiments of this application, outliers refer to feature vectors that deviate from most feature vectors, i.e., abnormal feature vectors. The first outlier analysis refers to the process of finding abnormal feature vectors in each continuous electricity consumption vector set. If a feature vector of a continuous electricity consumption meter belongs to an outlier, it can be determined that the continuous electricity consumption meter has an abnormal electricity price execution situation, and it is added to the abnormal meter set.
[0101] Step S305: Perform a second outlier analysis on the intermittent power consumption vector set of each intermittent power consumption meter, and add the intermittent power consumption meter to which the feature vector of the outlier belongs to the abnormal meter set.
[0102] In the embodiments of this application, the second outlier analysis refers to the process of finding abnormal feature vectors in each set of intermittent electricity consumption vectors. If a feature vector of an intermittent electricity consumption meter belongs to an outlier, it can be determined that the intermittent electricity consumption meter has an abnormal electricity price execution situation, and it is added to the set of abnormal meters.
[0103] See Figure 4 As shown, in step S304, the first outlier analysis is performed on the continuous electricity consumption vector set of each continuous electricity consumption meter, specifically including the following steps:
[0104] Step S401: Construct the first sample matrix based on the continuous electricity consumption vector set of each continuous electricity meter.
[0105] In embodiments of this application, the first sample matrix contains feature vectors of all continuous power consumption vector sets.
[0106] Step S402: Normalize the first sample matrix to obtain the second sample matrix.
[0107] In the embodiments of this application, normalizing the first sample matrix is to make the numerical magnitude and dimension of the feature vectors more consistent, thereby improving the convergence speed of the irrigation season electricity price execution anomaly identification model.
[0108] Step S403: Use a clustering algorithm to cluster the second sample matrix to obtain at least one target cluster and obtain the centroid of each target cluster.
[0109] In the embodiments of this application, clustering refers to the process of classifying and organizing feature vectors that are similar in some aspects in a sample matrix. Optionally, the clustering algorithm adopts the k-means clustering algorithm. The k-means clustering algorithm is an iterative clustering analysis algorithm. Its steps are as follows: first, the data is divided into k groups, where the value of k can be determined by the silhouette coefficient method; then, k objects are randomly selected as initial cluster centers; then, the distance between each object and each seed cluster center is calculated, and each object is assigned to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster centers of the cluster are recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met, where the termination condition is as follows:
[0110] 1. No (or minimal) number of objects were reassigned to different clusters;
[0111] 2. No (or the minimum number) cluster centers changed;
[0112] 3. The sum of squared errors is locally minimized.
[0113] In the embodiments of this application, at least one target cluster can be obtained through a clustering algorithm. Each feature vector in the second sample matrix after clustering has its own target cluster, and each target cluster has a corresponding centroid.
[0114] Step S404: Calculate the first distance between the feature vectors in each target cluster and their respective nearest centroids.
[0115] In the embodiments of this application, the nearest centroid refers to the centroid of the target cluster to which the feature vector belongs, and the first distance refers to the Euclidean distance. In addition, the first distance can also be the Manhattan distance, the Minkowski distance, etc., and this application does not limit it in this respect.
[0116] Step S405: Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance.
[0117] In the embodiments of this application, the second distance refers to the relative distance, specifically, the ratio of the first distance of the feature vector to its nearest centroid to the median of the first distances of other feature vectors in the target cluster to their nearest centroids.
[0118] Step S406: The feature vector with a second distance greater than the third preset threshold is taken as an outlier.
[0119] In the embodiments of this application, the specific value of the third preset threshold is set by the technician according to the actual situation. This application does not limit it in this respect. It should be noted that within a certain range, the smaller the third preset threshold, the higher the accuracy of the final screening result. Optionally, the second distance can be used as the outlier score. The technician can set the third preset threshold based on the overall outlier score.
[0120] See Figure 5 As shown, the second outlier analysis for the intermittent electricity consumption vector set of each intermittent electricity meter specifically includes the following steps:
[0121] Step S501: Construct a third sample matrix based on the intermittent electricity consumption vector set of each intermittent electricity meter.
[0122] In the embodiments of this application, the first sample matrix contains the feature vectors of all continuous electricity consumption vector sets. As an optional implementation, when the number of intermittent electricity meters is too large, a third sample matrix can be constructed based on a preset number of intermittent electricity consumption vector sets, and an anomaly identification model can be used in batches to perform anomaly identification using irrigation season electricity prices.
[0123] Step S502: Normalize the third sample matrix to obtain the fourth sample matrix.
[0124] As an optional implementation, the large number of feature vectors in the intermittent electricity consumption vector sets leads to a large spatial dimension of the constructed fourth sample matrix. For example, assuming there are n intermittent electricity consumption vector sets, each containing k indicators, the dimension of the third sample matrix is n×k. Furthermore, some feature vectors exhibit high similarity, which can interfere with the accuracy of the irrigation season electricity price anomaly identification model. Therefore, principal component analysis can be further used to reduce the dimensionality of the fourth sample matrix. See [link to relevant documentation]. Figure 6 As shown, step S502 includes the following steps:
[0125] Step S601: After standardizing the third sample matrix, perform principal component analysis to obtain the principal components of the third sample matrix.
[0126] In the embodiments of this application, principal component analysis is used to analyze the principal components in the third sample matrix. The purpose is to reduce the dimensionality of the third sample matrix. It is a commonly used linear dimensionality reduction method. This method maps high-dimensional data to a low-dimensional space through a certain linear projection, and expects the information content of the data to be maximized in the projected dimension, so as to use fewer data dimensions while retaining more characteristics of the original data points.
[0127] In the embodiments of this application, the specific steps of this step are as follows:
[0128] The first step is to assume that the standardized third sample matrix is the sample matrix X, where the expression for the sample matrix X is as follows:
[0129]
[0130] Where, n is the set number of the intermittent power consumption vector set, and k is the index number of the intermittent power consumption vector set.
[0131] The second step is to calculate the correlation coefficient matrix R based on the sample matrix X. The expression for the correlation coefficient matrix R is as follows:
[0132]
[0133] The third step is to solve for the k eigenvalues λ1, λ2, λ3, ..., λ of the correlation matrix R. k And the corresponding feature vectors e1, e2, e3, ..., e k , where, λ1>λ2>λ3>...>λ k e i =[e 1i ,e 2i ,....,e ki ] TNew indicator variables are obtained through linear transformation, and the expressions for each new indicator variable are as follows:
[0134]
[0135] Where y1 refers to the first principal component, y2 refers to the second principal component, y3 refers to the third principal component, ..., y k This refers to the k-th principal component, e ik Let x be the k-dimensional eigenvector corresponding to the i-th eigenvalue of the correlation coefficient matrix R, and let x be the k-dimensional initial input variable of the third sample matrix.
[0136] The fourth step involves calculating the variance contribution rate of each principal component and then accumulating the variance contribution rates in descending order of eigenvalues. It should be noted that in this application, a cumulative variance contribution rate of 85% is sufficient to meet the accuracy requirements for reflecting the indicator information. Therefore, when the cumulative variance contribution rate reaches 85%, m principal components y1, y2, y3, ..., y4 are obtained. m .
[0137] The variance contribution rate refers to the proportion of variance explained by a principal component relative to the total variance. The larger this value, the stronger the ability of the principal component to synthesize information from the original variables. Its calculation formula is as follows:
[0138]
[0139] The cumulative variance contribution rate refers to the proportion of the total variance explained by the top m principal components identified in the principal component screening process. Its calculation formula is as follows:
[0140]
[0141] Step S602: Construct the fourth sample matrix based on the principal components of the third sample matrix.
[0142] In the embodiments of this application, for the fourth sample matrix, principal component analysis is performed on the third sample matrix, so that the dimension of the fourth sample matrix is changed from n×k dimensions to n×m dimensions, where k>m, thus achieving the purpose of reducing the dimension of the fourth sample matrix.
[0143] Step S503: Use a clustering algorithm to cluster the fourth sample matrix to obtain at least one target cluster and obtain the centroid of each target cluster.
[0144] Step S504: Calculate the first distance between the feature vectors in each target cluster and their respective nearest centroids.
[0145] In the embodiments of this application, the specific implementation of steps S504 to S506 is the same as that of steps S404 to S406, and will not be repeated here.
[0146] Step S505: Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance.
[0147] Step S506: The feature vector with a second distance greater than the fourth preset threshold is taken as an outlier.
[0148] In the embodiments of this application, the specific value of the fourth preset threshold is set by the technician according to the actual situation, and this application does not limit it in this respect.
[0149] Corresponding to the method for identifying abnormal electricity pricing for agricultural irrigation and drainage provided in the embodiments of this application above, see also... Figure 7 The embodiments of this application also provide an electricity price execution anomaly identification device for agricultural irrigation and drainage users, the device including: a data acquisition unit 701, an abnormal electricity meter identification unit 702, and an abnormal user matching unit 703.
[0150] The data acquisition unit 701 is used to acquire historical electricity consumption data from multiple agricultural irrigation and drainage meters.
[0151] The abnormal electricity meter identification unit 702 is used to perform an anomaly identification model based on electricity price to identify anomalies in the historical electricity consumption data of multiple agricultural irrigation and drainage meters, and to obtain a set of abnormal electricity meters.
[0152] The abnormal user matching unit 703 is used to match user information based on the abnormal meter set to obtain a list of abnormal users.
[0153] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0154] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying anomalies in electricity pricing for agricultural irrigation and drainage, characterized in that, include: Acquire historical electricity consumption data from multiple agricultural irrigation and drainage meters; the historical electricity consumption data includes historical daily electricity consumption sequences and / or historical daily power generation curves; An anomaly detection model for electricity price execution is used to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters to obtain a set of anomaly meters; the anomaly detection model for electricity price execution includes a non-irrigation season electricity price execution anomaly detection model and an irrigation season electricity price execution anomaly detection model; The method utilizes an anomaly detection model based on electricity pricing to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, thereby obtaining a set of anomaly meters, including: Calculate the dates in the historical daily electricity consumption sequence where the daily electricity consumption is greater than zero; From the historical daily power generation curves of agricultural irrigation and drainage meters where the number of days with daily electricity consumption greater than zero is greater than a first preset threshold, extract the daily power generation curve to be identified, wherein the daily power generation curve to be identified is the daily power generation curve corresponding to the days with daily electricity consumption greater than zero in the historical daily electricity consumption sequence. Calculate the average power of the daily power generation curve to be identified during the early morning period, the average power during the daytime period, and the average power during the nighttime period; The agricultural irrigation and drainage meters to which the daily power generation curve to be identified belongs, whose average power during the early morning period is greater than one-third of the average power during the daytime period, or whose average power during the nighttime period is greater than one-half of the average power during the daytime period, or whose average power during the early morning period is greater than the average power during the nighttime period, are added to the abnormal meters. By matching user information with the set of abnormal meters, a list of abnormal users is obtained.
2. The method according to claim 1, characterized in that, After extracting the daily power generation curve to be identified, the method further includes: The agricultural irrigation and drainage meters to which the power generation curve of the day to be identified belongs, whose power generation value is greater than zero at all time points, are added to the abnormal meter set.
3. The method according to claim 1, characterized in that, The step of using an electricity price anomaly detection model to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters, and obtaining a set of anomaly meters, further includes: A feature vector is constructed for the historical daily power generation curves of each agricultural irrigation and drainage meter. The feature vector includes: electricity continuity index, number of complete electricity consumptions, average duration of complete electricity consumption, average of multiple complete electricity consumption start times included in the complete electricity consumption start time series, standard deviation of multiple complete electricity consumption start times included in the complete electricity consumption start time series, average of multiple complete electricity consumption end times included in the complete electricity consumption end time series, standard deviation of multiple complete electricity consumption end times included in the complete electricity consumption end time series, ratio of daytime average power to nighttime average power, ratio of daytime average power to early morning average power, and ratio of nighttime average power to early morning average power. Agricultural irrigation and drainage meters with an electricity continuity index greater than or equal to the second preset threshold are designated as continuous electricity meters, while agricultural irrigation and drainage meters with an electricity continuity index less than the second preset threshold are designated as intermittent electricity meters. A continuous power consumption vector set is established for each of the continuous power consumption meters, and an intermittent power consumption vector set is established for each of the intermittent power consumption meters. The feature vectors in the continuous power consumption vector set include: the ratio of average power during the day to average power at night, the ratio of average power during the day to average power at dawn, and the ratio of average power at night to average power at dawn. The feature vectors in the intermittent power consumption vector set include: the number of complete power consumption cycles, the average duration of a complete power consumption cycle, the average of multiple complete power consumption start times included in the complete power consumption start time series, the standard deviation of multiple complete power consumption start times included in the complete power consumption start time series, the average of multiple complete power consumption end times included in the complete power consumption end time series, and the standard deviation of multiple complete power consumption end times included in the complete power consumption end time series. Perform a first outlier analysis on the continuous electricity consumption vector set of each of the continuous electricity consumption meters, and add the continuous electricity consumption meters to which the feature vectors belonging to the outliers belong to the abnormal meter set; A second outlier analysis is performed on the intermittent electricity consumption vector set of each of the intermittent electricity consumption meters, and the intermittent electricity consumption meters to which the feature vectors belonging to the outliers belong are added to the abnormal meter set.
4. The method according to claim 3, characterized in that, The first outlier analysis of the continuous electricity consumption vector set of each of the continuous electricity consumption meters includes: A first sample matrix is constructed based on the continuous electricity consumption vector set of each of the continuous electricity consumption meters; The first sample matrix is normalized to obtain the second sample matrix; The second sample matrix is clustered using a clustering algorithm to obtain clustering results, resulting in at least one target cluster, and the centroid of each target cluster is obtained. Calculate the first distance between the feature vectors in each of the target clusters and their respective nearest centroids; Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance; Feature vectors whose second distance is greater than a third preset threshold are considered outliers.
5. The method according to claim 3, characterized in that, The second outlier analysis of the intermittent electricity consumption vector set of each of the intermittent electricity consumption meters includes: A third sample matrix is constructed based on the intermittent electricity consumption vector set of each of the intermittent electricity consumption meters; The fourth sample matrix is obtained by normalizing the third sample matrix. The fourth sample matrix is clustered using a clustering algorithm to obtain at least one target cluster, and the centroid of each target cluster is obtained. Calculate the first distance between the feature vectors in each of the target clusters and their respective nearest centroids; Calculate the second distance between the feature vectors in each target cluster and their nearest centroids based on the first distance; Feature vectors whose second distance is greater than the fourth preset threshold are considered outliers.
6. The method according to claim 5, characterized in that, The second outlier analysis of the intermittent electricity consumption vector sets of each of the intermittent electricity consumption meters further includes: After normalizing the third sample matrix, principal component analysis is performed to obtain the principal components of the third sample matrix. Construct a fourth sample matrix based on the principal components of the third sample matrix.
7. The method according to any one of claims 4 to 6, characterized in that, The clustering algorithm is the K-means clustering algorithm.
8. A device for identifying abnormal electricity pricing for agricultural irrigation and drainage, characterized in that, The device includes: The data acquisition unit is used to acquire historical electricity consumption data from multiple agricultural irrigation and drainage meters; the historical electricity consumption data includes historical daily electricity consumption sequences and / or historical daily power generation curves. An abnormal electricity meter identification unit is used to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters using an electricity price execution anomaly identification model, and to obtain a set of abnormal electricity meters. The electricity price execution anomaly identification model includes a non-irrigation season electricity price execution anomaly identification model and an irrigation season electricity price execution anomaly identification model. The step of using the electricity price execution anomaly identification model to identify anomalies in the historical electricity consumption data of the multiple agricultural irrigation and drainage meters and to obtain a set of abnormal electricity meters includes: Calculate the dates in the historical daily electricity consumption sequence where the daily electricity consumption is greater than zero; From the historical daily power generation curves of agricultural irrigation and drainage meters where the number of days with daily electricity consumption greater than zero is greater than a first preset threshold, extract the daily power generation curve to be identified, wherein the daily power generation curve to be identified is the daily power generation curve corresponding to the days with daily electricity consumption greater than zero in the historical daily electricity consumption sequence. Calculate the average power of the daily power generation curve to be identified during the early morning period, the average power during the daytime period, and the average power during the nighttime period; The agricultural irrigation and drainage meters to which the daily power generation curve to be identified belongs, whose average power during the early morning period is greater than one-third of the average power during the daytime period, or whose average power during the nighttime period is greater than one-half of the average power during the daytime period, or whose average power during the early morning period is greater than the average power during the nighttime period, are added to the abnormal meters. An abnormal user matching unit is used to match user information based on the set of abnormal electricity meters to obtain a list of abnormal users.
Citation Information
Patent Citations
Electrovalence execution exception judgment method, device and system
CN106204335A
An electric price inspection execution method based on deep learning of big data
CN109543943A