Agricultural irrigation and drainage user default electricity consumption behavior identification method, system and device and medium
Through data analysis and machine learning technology, an identification model for default electricity use by agricultural irrigation users has been built, which solves the problem that traditional manual inspections are difficult to effectively screen for violations, and has achieved efficient and accurate screening of default electricity use, which has improved the efficiency of power use inspections.
Patent Information
- Application Number
- CN202510156548.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-30
AI Technical Summary
In order to seek benefits, agricultural irrigation and irrigation users will use agricultural irrigation and irrigation electricity for other production services, resulting in economic losses of power supply companies and interference with the order of the power market. It is difficult for traditional manual investigations to effectively and comprehensively screen such violations.
By obtaining the electricity consumption data and weather data of agricultural irrigation users from multiple databases, cleaning and group division, establishing a default electricity consumption evaluation index system, building a power consumption behavior feature vector, and using the XGBoost model for training, finding the most suitable default electricity consumption behavior classifier, and generating a user investigation list of suspected default electricity consumption.
It has achieved efficient and accurate screening of agricultural irrigation users who are suspected of defaulting on electricity, saved a lot of human resources, and the investigation process is more accurate and efficient, promoting the digital transformation of the business.
Smart Images

Figure CN120069323A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power big data, and specifically relates to a method, system, device and medium for identifying the default electricity consumption behavior of agricultural irrigation and drainage users. Background Art
[0002] The applicable scope of the agricultural irrigation and drainage electricity price refers to the electricity used for providing irrigation and drainage for the production services of food crops. This electricity price policy is a special electricity price policy formulated by the state to support agricultural development, ensure the stable progress of agricultural production and improve agricultural production efficiency. When the electricity consumption of power users implementing the agricultural irrigation and drainage electricity price is large, their implemented electricity price is still relatively low. Some users, in order to seek benefits, will use agricultural irrigation and drainage electricity for other production services, which not only causes economic losses to the power supply company, but also disturbs the order of the power market. Due to the large number of agricultural irrigation and drainage users and the high concealment of this behavior, it is difficult to effectively and comprehensively investigate this kind of illegal behavior by using the traditional manual investigation method. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, system, device and medium for identifying the default electricity consumption behavior of agricultural irrigation and drainage users, which is beneficial to efficiently and accurately screening out agricultural irrigation and drainage users suspected of default electricity consumption.
[0004] To achieve the above purpose, the technical solution adopted by the present invention is: a method for identifying the default electricity consumption behavior of agricultural irrigation and drainage users, including the following steps:
[0005] Step A: Obtain the electricity consumption data and weather data of agricultural irrigation and drainage users from multiple databases and perform cleaning to obtain effective data for subsequent analysis of user electricity consumption behavior;
[0006] Step B: Divide different electricity consumption behaviors of agricultural irrigation and drainage users into groups, and at the same time establish an evaluation index system for user default electricity consumption, and construct an electricity consumption behavior feature vector of agricultural irrigation and drainage users for subsequent training, evaluation and identification of user electricity consumption behavior;
[0007] Step C: Use XGBoost to train the electricity consumption behavior feature vector of agricultural irrigation and drainage users, find the most suitable classifier for the default electricity consumption behavior of agricultural irrigation and drainage users through parameter tuning, and finally obtain a list of users to be investigated with suspected abnormal agricultural irrigation and drainage electricity consumption behavior through model prediction.
[0008] Further, step A includes the following steps:
[0009] Step A1: Data acquisition: Obtain agricultural irrigation and drainage users from the energy Internet marketing service system; obtain the monthly electricity consumption and monthly electricity consumption days of agricultural irrigation and drainage users in the past two years from the electricity information collection system; obtain the daily precipitation and weather data in this area in the past two years from the smart energy service platform;
[0010] Step A2, Data cleaning: User data with monthly electricity consumption all being 0 or all being null values is regarded as users with no electricity consumption and no analytical value, and this part of the data is excluded.
[0011] Furthermore, Step B includes the following steps:
[0012] Step B1, Divide user groups: Divide agricultural irrigation users in the past year into groups, with the division labels being default electricity users and non-default electricity users; Let y i be the group label of the i-th agricultural irrigation user in the past year. If it is verified that the agricultural irrigation user uses electricity in default, it is marked as 1; otherwise, it is marked as 0;
[0013] Step B2, Establish an evaluation index system for default electricity consumption: According to the electricity consumption characteristics, weather factors, and seasonal factors of agricultural irrigation users during normal irrigation electricity consumption, establish an evaluation index system for default electricity consumption for target users from six aspects: agricultural irrigation user month, monthly electricity consumption, monthly water use days, monthly precipitation, weather, and temperature, and construct the electricity consumption behavior feature vector of agricultural irrigation users; Let x n : {x 1 , x 2 ,..., x n} be the electricity consumption behavior feature vector, where n is the number of feature types; Furthermore, through the electricity consumption behavior feature vector, perform the next step of data analysis on target users, that is, train, evaluate, and predict the default electricity consumption suspicion coefficient of users.
[0014] Furthermore, Step C includes the following steps:
[0015] Step C1, Use XGBoost to train the electricity consumption behavior feature vector of agricultural irrigation users; In the XGBoost model, each regression tree is trained on the basis of the residual of the previous tree, and the loss function is gradually reduced by continuously iterating and optimizing;
[0016] Let be the predicted value of the training sample x i for the k-th tree, and f k (x) be a regression tree, then the objective function is:
[0017]
[0018] where n is the number of users in training, K is the number of trees in training, y i is the label of the sample x i ; The first part l of the objective function is the loss for a single sample, used to measure the gap between the predicted score and the true score; The second part of the objective function is the regularization term Ω(f k), reducing the overfitting risk by controlling the complexity of the tree and the regularization term;
[0019]
[0020] where T is the number of leaf nodes, w is the weight of all leaf nodes of the decision tree, and γ and λ are regularization parameters;
[0021] Step C2: Based on Step C1, adjust the parameters to obtain a better classifier; perform cross-validation on the learning rate, number of trees, depth of trees, and child node weight threshold in the model to find the optimal parameter combination;
[0022] Step C3: Obtain the optimal classifier based on Step C2; let X 1 :{X 1 ,X 2 ,...,X n} be the electricity consumption behavior characteristics of agricultural irrigation users in the past year, where n is the number of feature types; input the electricity consumption behavior characteristics into the classifier, and the output
[0023] predicted value is the probability of suspected default electricity consumption; when the predicted value is larger, the suspicion of the user having default electricity consumption
[0024] is larger; set a threshold to obtain a list of agricultural irrigation users suspected of default electricity consumption for subsequent on-site inspections.
[0025] The present invention also provides a system for identifying default electricity consumption behavior of agricultural irrigation users for implementing the above method, including:
[0026] A data collection and preprocessing module for obtaining electricity consumption data and weather data of agricultural irrigation users from multiple databases and cleaning them to obtain effective data for subsequent user electricity consumption behavior analysis;
[0027] A user portrait establishment module for grouping different electricity consumption behaviors of agricultural irrigation users, establishing an evaluation index system for user default electricity consumption at the same time, and constructing an electricity consumption behavior feature vector of agricultural irrigation users for subsequent training, evaluation, and identification of user electricity consumption behavior;
[0028] A user analysis and identification module for training the electricity consumption behavior feature vector of agricultural irrigation users using XGBoost, finding the most suitable classifier for default electricity consumption behavior of agricultural irrigation users through parameter tuning, and finally obtaining a list of users suspected of abnormal electricity consumption behavior of agricultural irrigation through model prediction.
[0029] The present invention also provides a computer device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which implement the above method when executed by the processor.
[0030] The present invention also provides a computer-readable storage medium, on which computer program instructions are stored, which implement the above method when executed by a processor.
[0031] Compared with the prior art, the present invention has the following beneficial effects: The present invention combines and analyzes the electricity consumption data and weather information of agricultural irrigation users through a data analysis method, and screens out a list of users suspected of default electricity consumption of agricultural irrigation users in three stages for subsequent on-site investigation. Compared with the traditional method of relying on electricity inspection staff to conduct on-site inspections household by household, the present invention innovatively applies machine learning to the electricity inspection work, constructs a model that can effectively screen out default electricity consumption, effectively improves the efficiency of electricity inspection work, and promotes the digital transformation of the business. The entire analysis process of the method proposed by the present invention does not require manual intervention, saves a large amount of human resources, and the investigation process is more accurate and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a block diagram of the principle of the method implementation of an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0034] It should be noted that the following detailed description is exemplary and is intended to provide further description of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0035] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless otherwise clearly specified in the context, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0036] As Figure 1 shown, this embodiment provides a method for identifying default electricity consumption behavior of agricultural irrigation users, and the specific implementation steps are as follows.
[0037] Step A: Obtain the electricity consumption data and weather data of agricultural irrigation users from multiple databases and perform cleaning to obtain valid data for subsequent analysis of user electricity consumption behavior.
[0038] In this embodiment, step A specifically includes the following steps:
[0039] Step A1, data acquisition: obtain agricultural irrigation and drainage users from the energy Internet marketing service system; obtain the monthly electricity consumption and monthly electricity consumption days of agricultural irrigation and drainage users in the past two years from the electricity consumption information collection system; obtain the daily precipitation and weather data of the area in the past two years from the smart energy service platform.
[0040] Step A2, data cleaning: user data with monthly electricity consumption of all zeros or all null values are regarded as users who have not used electricity and have no analysis value, and this part of the data is eliminated.
[0041] Step B: Divide the different electricity consumption behaviors of agricultural irrigation and drainage users into groups, establish an evaluation index system for users' electricity consumption violations, and construct a characteristic vector of agricultural irrigation and drainage users' electricity consumption behaviors for subsequent training, evaluation and identification of users' electricity consumption behaviors.
[0042] In this embodiment, step B specifically includes the following steps:
[0043] Step B1, divide user groups: divide agricultural irrigation and drainage users in the past year into groups, and label them as default electricity users and non-default electricity users. Let y i is the group label of the i-th agricultural irrigation and drainage user in the past year. If it is verified that the agricultural irrigation and drainage user violates the electricity contract, it is marked as 1; otherwise, it is marked as 0.
[0044] Step B2, establish a breach of contract electricity consumption evaluation index system: According to the electricity consumption characteristics, weather factors and seasonal factors of agricultural irrigation and drainage users during normal irrigation and drainage, establish a breach of contract electricity consumption evaluation index system for target users from six aspects, including agricultural irrigation and drainage user month, monthly electricity consumption, monthly water use days, monthly precipitation, weather and temperature, and construct the electricity consumption behavior feature vector of agricultural irrigation and drainage users. Let x n :{x 1 ,x 2 ,...,x n} is the electricity consumption behavior feature vector, where n is the number of feature types. Then, the next step of data analysis is carried out on the target user through the electricity consumption behavior feature vector, that is, training, evaluation and prediction of the user's electricity consumption suspicion coefficient of breach of contract.
[0045] Step C: Use XGBoost to train the characteristic vectors of electricity usage behavior of agricultural irrigation and drainage users, and find the most suitable classifier of agricultural irrigation and drainage users' default electricity usage behavior through parameter tuning. Finally, obtain the user investigation list with suspected abnormal agricultural irrigation and drainage electricity usage behavior through model prediction.
[0046] In this embodiment, step C includes the following steps:
[0047] Step C1, Model Training: Use XGBoost to train the power consumption behavior feature vectors of agricultural irrigation and drainage users. The core idea of the XGBoost model is to combine multiple weak classifiers into a strong classifier. Here, the classifier is the CART regression tree model. Each regression tree in the XGBoost model is trained based on the residuals of the previous tree, and the loss function is gradually optimized through continuous iteration to gradually reduce the residuals.
[0048] Let be the predicted value of the training sample x i for the k-th tree, and f k (x) be a regression tree. Then the objective
[0049] function is:
[0050]
[0051] where n is the number of users in training, K is the number of trees in training, y i is the label of the sample x i ; the first part l of the objective function is the loss for a single sample, used to measure the gap between the predicted score and the true score; the second part of the objective function is the regularization term Ω(f k ), which reduces the overfitting risk by controlling the complexity of the tree and the regularization term.
[0052]
[0053] where T is the number of leaf nodes, w is the weight of all leaf nodes of the decision tree, and γ and λ are regularization parameters.
[0054] Step C2, Model Tuning and Evaluation: According to the above settings, adjust the parameters on the basis of Step C1 to obtain a better classifier. Conduct cross-validation on the learning rate, number of trees, depth of trees, and child node weight threshold in the model to find the optimal parameter combination.
[0055] Step C3, Application of the Model: According to the above settings, obtain the optimal classifier on the basis of Step C2. Let X 1 :{X 1 , X 2 ,..., X n} be the power consumption behavior features of agricultural irrigation and drainage users in the past year, where n is the number of feature types. Input the power consumption behavior features into the classifier, and the output predicted value is the probability of suspected default power consumption. When the predicted value is larger, the user has a greater suspicion of default power consumption. Set a threshold for to obtain a list of inspections for suspected default power consumption of agricultural irrigation and drainage users for subsequent on-site inspections.
[0056] This embodiment also provides an agricultural irrigation and drainage user default electricity consumption behavior identification system for implementing the above method, including: a data collection and preprocessing module, a user portrait establishment module, and a user analysis and identification module.
[0057] The data collection and preprocessing module is used to obtain the electricity consumption data and weather data of agricultural irrigation and drainage users from multiple databases and perform cleaning to obtain effective data for subsequent user electricity consumption behavior analysis.
[0058] The user portrait establishment module is used to group different electricity consumption behaviors of agricultural irrigation and drainage users, establish an evaluation index system for user default electricity consumption, and construct an electricity consumption behavior feature vector of agricultural irrigation and drainage users for subsequent training, evaluation, and identification of user electricity consumption behaviors.
[0059] The user analysis and identification module is used to train the electricity consumption behavior feature vector of agricultural irrigation and drainage users using XGBoost, find the most suitable agricultural irrigation and drainage user default electricity consumption behavior classifier through parameter tuning, and finally obtain a list of users suspected of abnormal agricultural irrigation and drainage electricity consumption behavior through model prediction.
[0060] This embodiment also provides a computer device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the above method is implemented.
[0061] This embodiment also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
[0062] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0063] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0064] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0065] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0066] As mentioned above, it is only the preferred embodiments of the present invention, and it is not a limitation of the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical content of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for identifying the electricity usage behavior of agricultural irrigation and drainage users in breach of contract, characterized in that: The following steps are involved: Step A: Obtain electricity consumption data and weather data of agricultural irrigation and drainage users from multiple databases and clean them to obtain valid data for subsequent analysis of user electricity consumption behavior; Step B: Divide the different electricity consumption behaviors of agricultural irrigation and drainage users into groups, establish an evaluation index system for users' electricity consumption in violation of the contract, and construct a characteristic vector of the electricity consumption behavior of agricultural irrigation and drainage users for subsequent training, evaluation and identification of users' electricity consumption behaviors; Step C: Use XGBoost to train the characteristic vectors of electricity usage behavior of agricultural irrigation and drainage users, and find the most suitable classifier of agricultural irrigation and drainage users' default electricity usage behavior through parameter tuning. Finally, obtain the user investigation list with suspected abnormal agricultural irrigation and drainage electricity usage behavior through model prediction.
2. The method for identifying the electricity usage behavior of agricultural irrigation and drainage users in violation of the contract according to claim 1 is characterized in that: Step A includes the following steps: Step A1, data acquisition: obtain agricultural irrigation and drainage users from the energy internet marketing service system; obtain the monthly electricity consumption and monthly electricity consumption days of agricultural irrigation and drainage users in the past two years from the electricity consumption information collection system; obtain the daily precipitation and weather data of the region in the past two years from the smart energy service platform; Step A2, data cleaning: user data with monthly electricity consumption of all zeros or all null values are regarded as users who have not used electricity and have no analysis value, and this part of the data is removed.
3. The method for identifying the electricity usage behavior of agricultural irrigation and drainage users in violation of the contract according to claim 1 is characterized in that: Step B includes the following steps: Step B1, divide user groups: divide agricultural irrigation and drainage users in the past year into groups, and label them as default electricity users and non-default electricity users; let y i is the group label of the i-th agricultural irrigation and drainage user in the past year. If it is verified that the agricultural irrigation and drainage user violates the electricity contract, it is marked as 1; otherwise, it is marked as 0; Step B2, establish a breach of contract electricity consumption evaluation index system: according to the electricity consumption characteristics, weather factors and seasonal factors of agricultural irrigation and drainage users during normal irrigation and drainage, establish a breach of contract electricity consumption evaluation index system for target users from six aspects: month, monthly electricity consumption, monthly water use days, monthly precipitation, weather and temperature, and construct the electricity consumption behavior feature vector of agricultural irrigation and drainage users; let x n :{x1,x2,...,x n } is the electricity usage behavior feature vector, where n is the number of feature types; the electricity usage behavior feature vector is then used to perform the next step of data analysis on the target user, i.e., to train, evaluate and predict the user’s electricity usage suspicion coefficient.
4. The method for identifying the electricity usage behavior of agricultural irrigation and drainage users in violation of the contract according to claim 1 is characterized in that: Step C includes the following steps: Step C1, using XGBoost to train the electricity consumption behavior feature vectors of agricultural irrigation and drainage users; each regression tree in the XGBoost model is trained based on the residual of the previous tree, and the residual is gradually reduced by continuously iteratively optimizing the loss function; make Training sample x for the kth tree i The predicted value, f k (x) is a regression tree, then the objective function is: Where n is the number of users trained, K is the number of trees trained, and y i is the sample x i The first part of the objective function l is the loss of a single sample, which is used to measure the gap between the predicted score and the true score; the second part of the objective function is the regularization term Ω(f k ), reduce the risk of overfitting by controlling the complexity of the tree and the regularization term; Where T is the number of leaf nodes, w is the weight of all leaf nodes in the decision tree, and γ and λ are regularization parameters; Step C2: Based on step C1, adjust the parameters to obtain a better classifier; cross-validate the learning rate, number of trees, tree depth and child node weight threshold in the model to find the optimal parameter combination; Step C3, based on step C2, obtain the optimal classifier; let X1:{X1,X2,...,X n } is the electricity consumption behavior characteristics of agricultural irrigation and drainage users in the past year, where n is the number of feature types; the electricity consumption behavior characteristics are input into the classifier, and the output prediction value That is, the probability of suspected violation of electricity use; when the predicted value The larger the value is, the more likely the user is to violate the electricity use contract. By setting thresholds, we can obtain a list of suspected electricity violations by agricultural irrigation and drainage users for subsequent on-site inspections.
5. A system for identifying the electricity usage behavior of agricultural irrigation and drainage users in violation of the contract for implementing the method as described in any one of claims 1 to 4, characterized in that: include: The data collection and preprocessing module is used to obtain the electricity consumption data and weather data of agricultural irrigation and drainage users from multiple databases and clean them to obtain effective data for subsequent analysis of user electricity consumption behavior; The user portrait building module is used to group agricultural irrigation and drainage users according to their different electricity consumption behaviors. At the same time, it establishes an evaluation index system for users’ electricity consumption violations and constructs a characteristic vector of agricultural irrigation and drainage users’ electricity consumption behaviors for subsequent training, evaluation and identification of users’ electricity consumption behaviors. The user analysis and identification module is used to use XGBoost to train the characteristic vectors of electricity consumption behavior of agricultural irrigation and drainage users, and find the most suitable classifier of agricultural irrigation and drainage users' default electricity consumption behavior through parameter tuning. Finally, a list of users suspected of abnormal agricultural irrigation and drainage electricity consumption behavior is obtained through model prediction.
6. A computer device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.