A method and device for determining irrigation electricity consumption of a mixed agricultural drainage user

CN117521025BActive Publication Date: 2026-10-27国网河北省电力有限公司营销服务中心 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311576578.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-10-27
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

[0004]然而,由于农业灌溉机井档案中一些农排用户的实际用电量并非是纯灌溉用电,而是包括了生活用电,我们把这类用户称为混合农排用户,由于混合农排用的实际用电量中包含了非灌溉用电,这就导致以混合农排用户的实际用电量乘以“以电折水”系数最终得到的灌溉水量的计算结果是不准确的,如果要精准统计混合农排用户的灌溉电量,可能需要为混合农排用户的单独附加智能电表进行计量,但从全国范围来看,混合农排用户数量较大,这显然会提高成本,或者增加用户负担

Benefits of technology

[0016]综上,本发明提供一种混合农排用户灌溉电量确定方法及装置,通过分析历史用电数据,利用纯农排用户和非农排用户两个类型的历史用电数据分别形成数据集训练得到两个基学习器,以两个基学习器和一个元学习器组成分层模型,通过混合农排用户的历史用电数据训练分层模型,最终得到混合农排用户用电量与灌溉电量和非灌溉电量的线性关系,在实际应用时,以混合农排用户的待预测用电数据为输入,利用预测纯农排用户用电量的第一模型进行预测,根据预测结果和上述得到的混合农排用户用电量与灌溉电量和非灌溉电量的线性关系,最终确定混合农排用户灌溉电量。从而可以较为准确的对混合农排用户的非农业灌溉用电进行识别,准确确定其灌溉用电量,进而能够提高“以电折水”的测算准确率,为相关部门提供数据支撑,辅助政策精准实施,且本发明无需混合农排用户额外附加电力计量设备,节省了设备成本,不增加混合农排用户负担。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117521025B_ABST
    Figure CN117521025B_ABST
Patent Text Reader

Abstract

The application belongs to the computer field and provides a mixed agricultural user irrigation power determination method, a first data set is generated based on the power consumption data of pure agricultural users, a second data set is generated based on the power consumption data of non-agricultural users, and a third data set is generated based on the power consumption data of mixed agricultural users; regression models are trained based on the first data set and the second data set respectively to obtain a first model and a second model; the first model and the second model are used as base learners, the outputs of the two base learners are used as the inputs of a meta-learner, the third data set is used for training, and the linear relationship between the power consumption of the mixed agricultural user and the irrigation power and the non-irrigation power is obtained; finally, the to-be-predicted power consumption data of the mixed agricultural user is used as the input, the first model is used for prediction, and the irrigation power of the mixed agricultural user is obtained based on the prediction result and the linear relationship. The application can more accurately determine the irrigation power of the mixed agricultural user, and is beneficial to improving the accuracy of the electricity-to-water calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for determining irrigation power consumption for mixed agricultural drainage users. Background Technology

[0002] Currently, farmland irrigation mainly relies on groundwater extraction. However, some areas suffer from severe over-extraction of groundwater and low rainfall, leading to a shortage of surface water. This may trigger a series of ecological and environmental problems and threaten national agricultural product security and local economic development.

[0003] The key to comprehensive management of groundwater over-extraction lies in accurately calculating groundwater usage. However, accurate groundwater usage is difficult to achieve in practice and may require significant costs. Therefore, some regions have begun to adopt the "electricity-to-water" scheme. This scheme calculates groundwater usage by converting the electricity consumption of agricultural drainage users into the actual groundwater usage. For example, the scheme for determining irrigation water volume of agricultural wells disclosed in Chinese patent document CN112945329A determines the "electricity-to-water" coefficient of irrigation wells by using some equipment parameters of the well equipment of agricultural drainage users. The actual electricity consumption of agricultural drainage users is multiplied by the "electricity-to-water" coefficient to obtain the groundwater usage of the agricultural drainage user.

[0004] However, because the actual electricity consumption of some agricultural irrigation well users in the agricultural irrigation well records is not purely for irrigation but also includes domestic electricity consumption, we call these users mixed agricultural irrigation users. Since the actual electricity consumption of mixed agricultural irrigation users includes non-irrigation electricity, the calculation result of the irrigation water volume obtained by multiplying the actual electricity consumption of mixed agricultural irrigation users by the "electricity-to-water" coefficient is inaccurate. If we want to accurately count the irrigation electricity consumption of mixed agricultural irrigation users, it may be necessary to install separate smart meters for these users. However, considering the large number of mixed agricultural irrigation users nationwide, this would obviously increase costs or burden users. Summary of the Invention

[0005] This invention provides a method and apparatus for determining the irrigation power consumption of mixed agricultural and drainage users. It can accurately determine the irrigation power consumption of mixed agricultural and drainage users without requiring additional electricity metering equipment. Based on the determined irrigation power consumption, the water volume is converted and a "electricity-to-water" scheme is implemented, which can ultimately obtain a relatively accurate amount of irrigation water for mixed agricultural and drainage users.

[0006] In a first aspect, the present invention provides a method for determining irrigation electricity consumption for mixed agricultural drainage users, comprising:

[0007] The first dataset is generated based on the electricity consumption data of pure agricultural drainage users, the second dataset is generated based on the electricity consumption data of non-agricultural drainage users, and the third dataset is generated based on the electricity consumption data of mixed agricultural drainage users.

[0008] Based on the first dataset and the second dataset, pre-built regression models are trained to obtain a first model for predicting the electricity consumption of pure agricultural drainage users and a second model for predicting the electricity consumption of non-agricultural drainage users.

[0009] Using the first and second models as base learners, and the outputs of the two base learners as the input of the meta learner, the third dataset is used for training to obtain a linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation.

[0010] Using the electricity consumption data to be predicted for mixed agricultural and drainage users as input, the first model is used for prediction, and the irrigation electricity consumption of mixed agricultural and drainage users is obtained based on the prediction results and the linear relationship.

[0011] Secondly, the present invention provides a device for determining irrigation power consumption for mixed agricultural drainage users, comprising:

[0012] The dataset generation module is used to generate a first dataset based on the electricity consumption data of pure agricultural drainage users, a second dataset based on the electricity consumption data of non-agricultural drainage users, and a third dataset based on the electricity consumption data of mixed agricultural drainage users.

[0013] The first model training module is used to train pre-built regression models based on the first dataset and the second dataset respectively, to obtain a first model for predicting the electricity consumption of pure agricultural drainage users and a second model for predicting the electricity consumption of non-agricultural drainage users.

[0014] The second model training module is used to train the first and second models as base learners, and the outputs of the two base learners as the inputs of the meta learners, using the third dataset to obtain the linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation.

[0015] The irrigation power calculation module is used to take the predicted power consumption data of mixed agricultural and drainage users as input, make predictions using the first model, and obtain the irrigation power of mixed agricultural and drainage users based on the prediction results and the linear relationship.

[0016] In summary, this invention provides a method and apparatus for determining irrigation electricity consumption for mixed agricultural and drainage users. By analyzing historical electricity consumption data, two base learners are trained using historical electricity consumption data from both pure and non-agricultural and drainage users. These two base learners, along with a meta-learner, form a hierarchical model. This hierarchical model is trained using historical electricity consumption data from mixed agricultural and drainage users, ultimately obtaining a linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity. In practical applications, the predicted electricity consumption data of mixed agricultural and drainage users is used as input, and the first model for predicting the electricity consumption of pure agricultural and drainage users is used for prediction. Based on the prediction results and the aforementioned linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity, the irrigation electricity consumption of mixed agricultural and drainage users is finally determined. This allows for more accurate identification of non-agricultural irrigation electricity consumption by mixed agricultural and drainage users, accurately determining their irrigation electricity consumption, thereby improving the accuracy of "electricity-to-water" calculations, providing data support for relevant departments, and assisting in the precise implementation of policies. Furthermore, this invention eliminates the need for additional electricity metering equipment for mixed agricultural and drainage users, saving equipment costs and not increasing their burden. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the implementation of the method for determining irrigation power consumption for mixed agricultural drainage users provided in this embodiment of the invention.

[0019] Figure 2 This is a model architecture diagram of the method for determining irrigation power consumption for mixed agricultural drainage users provided in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of the structure of the device for determining irrigation power consumption for mixed agricultural drainage users provided in an embodiment of the present invention. Detailed Implementation

[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0023] Figure 1 This is a flowchart illustrating the implementation of the method for determining irrigation electricity consumption for mixed agricultural drainage users provided in an embodiment of the present invention. Figure 2 This is a model architecture diagram of the method for determining irrigation power consumption for mixed agricultural drainage users provided in an embodiment of the present invention.

[0024] like Figure 1 As shown, the method may include:

[0025] Step 101: Generate a first dataset based on the electricity consumption data of pure agricultural drainage users, a second dataset based on the electricity consumption data of non-agricultural drainage users, and a third dataset based on the electricity consumption data of mixed agricultural drainage users.

[0026] In this embodiment of the invention, electricity consumption data typically includes customer number, date, electricity consumption, rainfall, and user type. The user type includes three categories: pure agricultural drainage users, non-agricultural drainage users, and mixed agricultural drainage users. Pure agricultural drainage users are those whose electricity consumption is entirely for irrigation; non-agricultural drainage users are those whose electricity consumption is entirely for domestic use; and mixed agricultural drainage users are those whose electricity consumption includes both irrigation and domestic use. The purpose of this invention is to analyze the irrigation electricity consumption of mixed agricultural drainage users.

[0027] The electricity consumption data collected in this invention includes the electricity consumption data of the three user types mentioned above. This invention adopts the idea of ​​a hierarchical model to analyze the characteristics of electricity consumption data of different user types, and then determines the ratio of irrigation electricity and domestic electricity consumption in mixed agricultural and drainage users. Therefore, it is necessary to divide the electricity consumption data according to different user types, and to train the model separately for the electricity consumption data of each type of user. Therefore, before step 101, the method shown in this invention may further include: dividing the electricity consumption data into electricity consumption data of pure agricultural and drainage users, electricity consumption data of non-agricultural and drainage users, and electricity consumption data of mixed agricultural and drainage users based on the user type.

[0028] Since the data features of the initial electricity consumption data obtained above are not obvious enough, the present invention also performs feature derivation on the initial electricity consumption data, sorts out and extracts data features that directly affect the analysis results of the present invention, so as to improve the speed and accuracy of subsequent model training.

[0029] This invention generates corresponding datasets based on electricity consumption data of three types of users. The steps for generating datasets based on electricity consumption data include: deriving general features from the electricity consumption data to obtain general features, which include: monthly number of rainy days, monthly rainfall, monthly maximum daily rainfall, monthly number of electricity consumption days, monthly number of rainy days, and monthly maximum daily electricity consumption; deriving specific features from the electricity consumption data to obtain specific features, which include: whether it is an irrigation month; the irrigation months are March to June and October to November of each year; generating an initial dataset based on the general features and the specific features, and performing missing value imputation and normalization on the initial dataset to obtain a training dataset.

[0030] In this embodiment, firstly, general monthly features are derived based on actual electricity consumption data. Then, specific features are added on top of these general features. For example, this scheme is applied to the determination of irrigation electricity consumption, and the month of irrigation has a significant impact on this result. However, this feature is not reflected in the original electricity consumption data. In order to improve the training speed and the accuracy of the prediction results, the specific feature of "whether it is an irrigation month" which is suitable for the application purpose of this scheme is added to the dataset. Furthermore, according to the actual situation, March to June and October to November of each year are defined as irrigation months. Of course, the irrigation months can be adaptively adjusted according to different situations in different regions. The irrigation months in this scheme are used for North China.

[0031] like Figure 2 As shown, the collected electricity consumption data, which includes three types of users, can be used as the training set. After grouping users based on user type, we can obtain a pure agricultural drainage user dataset (first dataset), a non-agricultural drainage user dataset (second dataset), and a mixed agricultural drainage user dataset (third dataset).

[0032] Step 102: Train the pre-built regression models based on the first dataset and the second dataset respectively to obtain the first model for predicting the electricity consumption of pure agricultural drainage users and the second model for predicting the electricity consumption of non-agricultural drainage users.

[0033] The first model is the regression model with the best prediction result among the four regression models for predicting the electricity consumption of pure agricultural drainage users, where the electricity consumption of pure agricultural drainage users represents irrigation electricity.

[0034] The second model is the regression model with the best prediction results among the four regression models for predicting the electricity consumption of non-agricultural drainage users, where the electricity consumption of non-agricultural drainage users refers to non-irrigation electricity.

[0035] In this embodiment of the invention, multiple pre-built regression models can be used, including random forest regression models, ridge regression models, LightGBM regression models, and associative regression models. Different regression models employ different algorithms, each with its own advantages and disadvantages. In this invention, all four regression models are used, and the one with the best prediction result can be selected based on the training and testing results.

[0036] Using the first dataset, namely the electricity consumption data of pure agricultural drainage users, we divided it into a training set and a test set, and trained and tested the above four regression models respectively until the output result of each regression model was optimal. Then we compared the output results of the above four regression models and selected the optimal one as the prediction model for electricity consumption of pure agricultural drainage users, that is, the first model.

[0037] Using the second dataset, namely the electricity consumption data of non-agricultural and drainage users, we divided it into a training set and a test set, and trained and tested the above four regression models respectively until the output result of each regression model was optimal. Then we compared the output results of the above four regression models and selected the optimal one as the prediction model for the electricity consumption of non-agricultural and drainage users, which is the second model.

[0038] The above training and testing process can refer to existing technologies and will not be repeated here. During the training process, the input of the first model is the data features corresponding to the monthly electricity consumption data of pure agricultural drainage users, and the prediction result of the first model is the monthly electricity consumption of pure agricultural drainage users; the input of the second model is the data features corresponding to the monthly electricity consumption data of non-agricultural drainage users, and the prediction result of the second model is the monthly electricity consumption of the non-agricultural drainage users.

[0039] like Figure 2 As shown, Model 1, Model 2, Model 3, and Model 4 can be represented as a random forest regression model, a ridge regression model, a LightGBM regression model, and an associative regression model, respectively. The model with the best prediction result can be selected from the trained models. The first model is a pure agricultural and drainage user electricity consumption prediction model in the base learner, and the second model is a non-agricultural and drainage user electricity consumption prediction model in the base learner.

[0040] Step 103: Using the first and second models as base learners, and the outputs of the two base learners as the inputs of the meta learner, train the system using the third dataset to obtain the linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation.

[0041] In this embodiment of the invention, a hierarchical prediction model consisting of two base learners and one meta-learner is employed, also known as a Stacking architecture. The first and second models mentioned above correspond to the two base learners in this architecture. The meta-learner can be constructed using a linear regression algorithm or a ridge regression algorithm, and then trained and tested using a third dataset corresponding to mixed agricultural and drainage users. During testing, the first model predicts the irrigation electricity consumption of pure agricultural and drainage users under the data characteristics of mixed agricultural and drainage users, while the second model predicts the domestic electricity consumption of non-agricultural and drainage users under the data characteristics of mixed agricultural and drainage users. The prediction results of the two models are then used as input to the meta-learner, which is trained and tested to output the total electricity consumption of mixed agricultural and drainage users until the meta-learner can output the optimal result, thus obtaining a linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity.

[0042] Since the electricity consumption of mixed agricultural and drainage users mainly comes from two sources—irrigation electricity and domestic electricity—and there is a certain linear relationship between the two, this invention defines the monthly electricity consumption of mixed agricultural and drainage users as the research objective. By weighted summing of irrigation electricity and domestic electricity, the monthly electricity consumption of mixed users can be predicted. The aforementioned linear relationship is expressed as follows:

[0043] y = ω1x1 + ω2x2

[0044] Where y represents the monthly electricity consumption of mixed agricultural and drainage users, ω1x1 represents the monthly irrigation electricity consumption of mixed agricultural and drainage users, ω2x2 represents the monthly non-irrigation electricity consumption of mixed agricultural and drainage users, ω1 represents the first weighting coefficient, and ω2 represents the second weighting coefficient.

[0045] In this embodiment of the invention, after the meta-learner is trained and the linear relationship is determined, the parameters ω1 and ω2 mentioned above can be determined.

[0046] like Figure 2 As shown, a mixed user training set is formed using a mixed agricultural and drainage user dataset. The monthly irrigation electricity consumption of pure agricultural and drainage users under the mixed user characteristics is predicted, as well as the monthly domestic electricity consumption of non-agricultural and drainage users under the mixed user characteristics is predicted. The two prediction results are used as the input of the meta-learner, and the total monthly electricity consumption of mixed agricultural and drainage users is used as the output of the meta-learner. The meta-learner is trained and tested until its output result is optimal.

[0047] Step 104: Using the electricity consumption data to be predicted for mixed agricultural and drainage users as input, the first model is used to make predictions, and the irrigation electricity consumption of mixed agricultural and drainage users is obtained based on the prediction results and the above linear relationship.

[0048] In one implementation, the monthly electricity consumption data of mixed agricultural and drainage users is used as input, and a first model is used to make a prediction to obtain the initial value of irrigation electricity for the current month; a first weighting coefficient is obtained based on a linear relationship; and the initial value of irrigation electricity is multiplied by the first weighting coefficient to obtain the monthly irrigation electricity for mixed agricultural and drainage users.

[0049] In this embodiment of the invention, after determining the linear relationship, when it is necessary to determine the irrigation power of a mixed agricultural and drainage user in a certain month, the electricity consumption data of the mixed agricultural and drainage user in that month can be input into the first model, and the output result of the first model can be multiplied by the parameter ω1 in the above linear relationship to obtain the irrigation power of the mixed agricultural and drainage user in that month.

[0050] In another implementation, the monthly electricity consumption data of mixed agricultural and drainage users can be used as input, and the second model can be used to make predictions to obtain the initial value of the non-irrigation electricity consumption for the month. Then, the second weighting coefficient is obtained based on the linear relationship. The initial value of non-irrigation electricity consumption is multiplied by the second weighting coefficient to obtain the monthly non-irrigation electricity consumption of mixed agricultural and drainage users. Finally, the monthly irrigation electricity consumption of mixed agricultural and drainage users is obtained by subtracting the monthly non-irrigation electricity consumption.

[0051] In this embodiment of the invention, when the training data is not yet perfect and the amount of data is not large enough, the prediction results may be abnormal. Therefore, the anomaly detection module can be used to make anomaly judgment on the monthly irrigation power of the determined mixed agricultural drainage users. If there is an anomaly, it can be corrected and the corrected value can be used as the final monthly irrigation power. If there is no anomaly, it can be directly determined as the final monthly irrigation power.

[0052] Specifically, after obtaining the irrigation electricity consumption of mixed agricultural drainage users based on the prediction results and the linear relationship mentioned above, the process further includes:

[0053] If there is an anomaly in the irrigation power of mixed agricultural and drainage users, a similarity algorithm is used to correct the irrigation power of mixed agricultural and drainage users based on historical electricity consumption data to obtain the normal value of irrigation power of mixed agricultural and drainage users.

[0054] Accordingly, the above-mentioned method of obtaining the irrigation power of mixed agricultural drainage users based on the prediction results and the linear relationship includes: obtaining the irrigation power of mixed agricultural drainage users based on the normal value of irrigation power of mixed agricultural drainage users and the linear relationship.

[0055] Accordingly, in the above steps, if the irrigation power consumption of the mixed agricultural and drainage users is abnormal, a similarity algorithm is used to correct the irrigation power consumption of the mixed agricultural and drainage users based on historical electricity consumption data. Obtaining a normal value for the irrigation power consumption of the mixed agricultural and drainage users may include:

[0056] If the irrigation electricity consumption of mixed agricultural and drainage users exceeds the total monthly electricity consumption of mixed agricultural and drainage users, then it is determined that the irrigation electricity consumption of mixed agricultural and drainage users is abnormal.

[0057] The predicted monthly electricity consumption data of the mixed agricultural drainage users is compared with the monthly data in the historical electricity consumption data. Based on the Euclidean distance, a preset number of monthly data that are closest to the predicted monthly electricity consumption data are selected as the predicted monthly electricity consumption data to determine the approximate irrigation electricity consumption.

[0058] The average value of the pre-determined preset number of approximate irrigation power is used as the normal value of irrigation power for the mixed agricultural drainage users.

[0059] In this embodiment of the invention, it can be determined whether the irrigation power of mixed agricultural drainage users is abnormal by comparing the size of the irrigation power and the total power consumption. When the irrigation power is not greater than the total power consumption, the irrigation power of mixed agricultural drainage users is considered to be normal and is directly used as the final determined irrigation power.

[0060] When irrigation electricity consumption exceeds total electricity consumption, it is considered an anomaly in the irrigation electricity consumption of mixed agricultural and drainage users. In this case, the predicted monthly electricity consumption data for mixed agricultural and drainage users can be compared with historical monthly electricity consumption data. For example, the Euclidean distance of the data vectors can be used to find several historical monthly data points most similar to the predicted monthly electricity consumption data. These historical monthly data points are then used as the predicted monthly electricity consumption data to calculate several approximate irrigation electricity consumptions using a model. Finally, the average of these approximate irrigation electricity consumptions is taken as the final determined irrigation electricity consumption for mixed agricultural and drainage users. Of course, the selected most similar historical monthly data points, after model prediction and calculation using the first weight parameter, must be normal values, i.e., less than the total electricity consumption. Outliers exceeding the total electricity consumption need to be removed. This further improves the accuracy of the final determined irrigation electricity consumption.

[0061] like Figure 2 As shown, the abnormal result determination and calibration steps described above in this invention can be performed using the abnormal result calibration model.

[0062] In this embodiment of the invention, the monthly water consumption of the mixed agricultural drainage user can be obtained by multiplying the irrigation electricity consumption of the mixed agricultural drainage user determined by the invention by the corresponding "electricity-to-water" coefficient.

[0063] As described above, this invention provides a method for determining irrigation electricity consumption for mixed agricultural and drainage users. By analyzing historical electricity consumption data, two base learners are trained using historical electricity consumption data from both pure and non-agricultural and drainage users. These two base learners, along with a meta-learner, form a hierarchical model. This hierarchical model is trained using historical electricity consumption data from mixed agricultural and drainage users, ultimately obtaining a linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity. In practical applications, the predicted electricity consumption data of mixed agricultural and drainage users is used as input, and the first model for predicting the electricity consumption of pure agricultural and drainage users is used for prediction. Based on the prediction results and the aforementioned linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity, the irrigation electricity consumption of mixed agricultural and drainage users is finally determined. This allows for more accurate identification of non-agricultural irrigation electricity consumption by mixed agricultural and drainage users, accurately determining their irrigation electricity consumption, thereby improving the accuracy of "electricity-to-water" calculations, providing data support for relevant departments, and assisting in the precise implementation of policies. Furthermore, this invention eliminates the need for additional electricity metering equipment for mixed agricultural and drainage users, saving equipment costs and not increasing their burden.

[0064] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0065] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0066] Figure 3 A schematic diagram of the structure of the irrigation power determination device for mixed agricultural drainage users provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below:

[0067] like Figure 3 As shown, the irrigation power determination device 3 for mixed agricultural drainage users includes: a dataset generation module 31, a first model training module 32, a second model training module 33, and an irrigation power calculation module 34.

[0068] The dataset generation module 31 is used to generate a first dataset based on the electricity consumption data of pure agricultural drainage users, a second dataset based on the electricity consumption data of non-agricultural drainage users, and a third dataset based on the electricity consumption data of mixed agricultural drainage users.

[0069] The first model training module 32 is used to train pre-built regression models based on the first dataset and the second dataset respectively, to obtain a first model for predicting the electricity consumption of pure agricultural drainage users and a second model for predicting the electricity consumption of non-agricultural drainage users.

[0070] The second model training module 33 is used to train the first and second models as base learners, and the outputs of the two base learners as the inputs of the meta learners, using the third dataset to obtain the linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation.

[0071] The irrigation power calculation module 34 is used to take the predicted power consumption data of mixed agricultural and drainage users as input, make predictions using the first model, and obtain the irrigation power of mixed agricultural and drainage users based on the prediction results and the linear relationship.

[0072] In one implementation, the electricity consumption data may include customer number, date, electricity consumption, rainfall, and user type, which may include pure agricultural drainage users, non-agricultural drainage users, and mixed agricultural drainage users.

[0073] Correspondingly, the device 3 for determining the irrigation power consumption of mixed agricultural and drainage users may also include: a data division module, used to divide the electricity consumption data into electricity consumption data of pure agricultural and drainage users, electricity consumption data of non-agricultural and drainage users, and electricity consumption data of mixed agricultural and drainage users based on user type before the data set generation module 31 generates a first data set based on the electricity consumption data of pure agricultural and drainage users, generates a second data set based on the electricity consumption data of non-agricultural and drainage users, and generates a third data set based on the electricity consumption data of mixed agricultural and drainage users.

[0074] In one implementation, the device 3 for determining the irrigation power consumption of mixed agricultural drainage users may further include: a feature derivation module and a data processing module.

[0075] The feature derivation module is used to perform general feature derivation on electricity consumption data to obtain general features of the electricity consumption data, including: monthly number of rainy days, monthly rainfall, monthly maximum daily rainfall, monthly number of electricity consumption days, monthly number of rainy days, and monthly maximum daily electricity consumption; and to perform specific feature derivation on electricity consumption data to obtain specific features of the electricity consumption data, including: whether it is an irrigation month; the irrigation months are March to June and October to November of each year.

[0076] The data processing module is used to generate an initial dataset based on the general features and the specific features, and to perform missing value imputation and normalization on the initial dataset to obtain a training dataset.

[0077] In one implementation, the regression models include random forest regression, ridge regression, LightGBM regression, and associative regression; the first model is the regression model with the best prediction result among the four regression models for electricity consumption of pure agricultural drainage users, where the electricity consumption of pure agricultural drainage users represents irrigation electricity; the second model is the regression model with the best prediction result among the four regression models for electricity consumption of non-agricultural drainage users, where the electricity consumption of non-agricultural drainage users represents non-irrigation electricity; and the meta-learner adopts a linear regression algorithm or a ridge regression algorithm.

[0078] In one implementation, the input of the first model is the data features corresponding to the monthly electricity consumption data of pure agricultural drainage users, and the prediction result of the first model is the monthly electricity consumption of the pure agricultural drainage users; the input of the second model is the data features corresponding to the monthly electricity consumption data of non-agricultural drainage users, and the prediction result of the second model is the monthly electricity consumption of the non-agricultural drainage users.

[0079] In one implementation, the above linear relationship is expressed as:

[0080] y = ω1x1 + ω2x2

[0081] Where y represents the monthly electricity consumption of mixed agricultural and drainage users, ω1x1 represents the monthly irrigation electricity consumption of mixed agricultural and drainage users, ω2x2 represents the monthly non-irrigation electricity consumption of mixed agricultural and drainage users, ω1 represents the first weighting coefficient, and ω2 represents the second weighting coefficient.

[0082] In one implementation, the irrigation power calculation module 34 is specifically used to: take the monthly electricity consumption data to be predicted for the mixed agricultural and drainage users as input, use the first model to make predictions, and obtain the initial value of the monthly irrigation power; obtain the first weighting coefficient based on the linear relationship; and multiply the initial value of the irrigation power by the first weighting coefficient to obtain the monthly irrigation power of the mixed agricultural and drainage users.

[0083] In one implementation, the mixed agricultural and drainage user irrigation power determination device 3 further includes: an anomaly processing module, which is used to correct the mixed agricultural and drainage user irrigation power based on historical electricity consumption data using a similarity algorithm after the irrigation power calculation module 34 obtains the mixed agricultural and drainage user irrigation power based on the prediction result and the linear relationship, so as to obtain a normal value of the mixed agricultural and drainage user irrigation power if the mixed agricultural and drainage user irrigation power is abnormal.

[0084] Correspondingly, the mixed agricultural drainage user irrigation power determination device 3 obtains the mixed agricultural drainage user irrigation power based on the normal value of the mixed agricultural drainage user irrigation power and the linear relationship.

[0085] The anomaly handling module is specifically used to: determine that the irrigation power consumption of the mixed agricultural and drainage users is abnormal if the irrigation power consumption of the mixed agricultural and drainage users is greater than the total monthly power consumption of the mixed agricultural and drainage users; compare the monthly electricity consumption data to be predicted for the mixed agricultural and drainage users with the monthly data in the historical electricity consumption data; select a preset number of monthly data that are closest to the monthly electricity consumption data to be predicted based on the Euclidean distance, and use them as the monthly electricity consumption data to determine the approximate irrigation power consumption; calculate the average of the determined preset number of approximate irrigation power consumption as the normal value of the irrigation power consumption of the mixed agricultural and drainage users.

[0086] As described above, this invention provides a device for determining the irrigation electricity consumption of mixed agricultural and drainage users. By analyzing historical electricity consumption data, two base learners are trained using historical electricity consumption data from both pure and non-agricultural and drainage users. These two base learners, along with a meta-learner, form a hierarchical model. This hierarchical model is trained using historical electricity consumption data from mixed agricultural and drainage users, ultimately obtaining a linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity. In practical applications, the predicted electricity consumption data of mixed agricultural and drainage users is used as input, and the first model for predicting the electricity consumption of pure agricultural and drainage users is used for prediction. Based on the prediction results and the aforementioned linear relationship between the electricity consumption of mixed agricultural and drainage users and irrigation and non-irrigation electricity, the irrigation electricity consumption of mixed agricultural and drainage users is finally determined. This allows for more accurate identification of non-agricultural irrigation electricity consumption by mixed agricultural and drainage users, accurately determining their irrigation electricity consumption, thereby improving the accuracy of "electricity-to-water" calculations, providing data support for relevant departments, and assisting in the precise implementation of policies. Furthermore, this invention eliminates the need for additional electricity metering equipment for mixed agricultural and drainage users, saving equipment costs and not increasing their burden.

[0087] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0088] Those skilled in the art will recognize that the templates, units, and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0089] If the module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above embodiments of the method for determining irrigation electricity consumption for mixed agricultural and drainage users. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0090] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for determining irrigation electricity consumption for mixed agricultural drainage users, characterized in that, include: The first dataset is generated based on the electricity consumption data of pure agricultural drainage users, the second dataset is generated based on the electricity consumption data of non-agricultural drainage users, and the third dataset is generated based on the electricity consumption data of mixed agricultural drainage users. Based on the first dataset and the second dataset, pre-built regression models are trained to obtain a first model for predicting the electricity consumption of pure agricultural drainage users and a second model for predicting the electricity consumption of non-agricultural drainage users. Using the first and second models as base learners, and the outputs of the two base learners as the input of the meta learner, the third dataset is used for training to obtain a linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation. Using the electricity consumption data to be predicted for mixed agricultural and drainage users as input, the first model is used for prediction, and the irrigation electricity consumption of mixed agricultural and drainage users is obtained based on the prediction results and the linear relationship. The process of using the predicted electricity consumption data of mixed agricultural and drainage users as input, performing predictions using the first model, and obtaining the irrigation electricity consumption of mixed agricultural and drainage users based on the prediction results and the linear relationship includes: Using the monthly electricity consumption data of mixed agricultural drainage users as input, the first model is used to make predictions and obtain the initial value of irrigation electricity for the current month; The first weighting coefficient is obtained based on the linear relationship; Multiply the initial value of irrigation power by the first weighting coefficient to obtain the monthly irrigation power of the mixed agricultural drainage user.

2. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 1, characterized in that, The electricity consumption data includes customer number, date, electricity consumption, rainfall, and user type. The user type includes pure agricultural drainage users, non-agricultural drainage users, and mixed agricultural drainage users. Before generating the first dataset based on electricity consumption data from pure agricultural drainage users, the second dataset based on electricity consumption data from non-agricultural drainage users, and the third dataset based on electricity consumption data from mixed agricultural drainage users, the following steps are included: Based on the user type, the electricity consumption data is divided into electricity consumption data of pure agricultural drainage users, electricity consumption data of non-agricultural drainage users, and electricity consumption data of mixed agricultural drainage users.

3. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 2, characterized in that, The steps involved in generating a dataset based on electricity consumption data include: The electricity consumption data is subjected to general feature derivation to obtain general features of the electricity consumption data. The general features include: monthly number of rainy days, monthly rainfall, monthly maximum daily rainfall, monthly number of electricity consumption days, and monthly maximum daily electricity consumption. The electricity consumption data is subjected to specific feature derivation to obtain specific features of the electricity consumption data. The specific features include: whether it is an irrigation month; the irrigation months are March to June and October to November of each year. An initial dataset is generated based on the general features and the specific features, and the initial dataset is then imputed and normalized to obtain a training dataset.

4. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 3, characterized in that, The regression models include random forest regression model, ridge regression model, LightGBM regression model and Lasso regression model; The first model is the regression model with the best prediction result among the four regression models for predicting the electricity consumption of pure agricultural drainage users, where the electricity consumption of pure agricultural drainage users represents irrigation electricity. The second model is the regression model with the best prediction result among the four regression models for predicting the electricity consumption of non-agricultural drainage users, where the electricity consumption of non-agricultural drainage users represents non-irrigation electricity. The meta-learner employs either linear regression or ridge regression.

5. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 4, characterized in that, The input to the first model is the data features corresponding to the monthly electricity consumption data of the pure agricultural drainage users, and the prediction result of the first model is the monthly electricity consumption of the pure agricultural drainage users. The input to the second model is the data features corresponding to the monthly electricity consumption data of the non-agricultural and drainage users, and the prediction result of the second model is the monthly electricity consumption of the non-agricultural and drainage users.

6. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 5, characterized in that, The linear relationship is expressed as follows: in, This indicates the monthly electricity consumption of mixed agricultural and drainage users. This represents the monthly irrigation electricity consumption of mixed agricultural drainage users. This represents the monthly non-irrigation electricity consumption of mixed agricultural drainage users. This represents the first weighting coefficient. This represents the second weighting coefficient.

7. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in any one of claims 1 to 6, characterized in that, After obtaining the irrigation electricity consumption of mixed agricultural drainage users based on the prediction results and the linear relationship, the following is also included: If the irrigation power consumption of the mixed agricultural and drainage users is abnormal, a similarity algorithm is used to correct the irrigation power consumption of the mixed agricultural and drainage users based on historical electricity consumption data to obtain the normal value of the irrigation power consumption of the mixed agricultural and drainage users. Accordingly, the process of obtaining the irrigation electricity consumption of mixed agricultural drainage users based on the prediction results and the linear relationship includes: The irrigation power of mixed agricultural and drainage users is obtained based on the normal value of irrigation power and the linear relationship.

8. The method for determining irrigation electricity consumption for mixed agricultural drainage users as described in claim 7, characterized in that, If the irrigation power consumption of the mixed agricultural and drainage users is abnormal, a similarity algorithm is used to correct the irrigation power consumption of the mixed agricultural and drainage users based on historical electricity consumption data, and the normal value of the irrigation power consumption of the mixed agricultural and drainage users includes: If the irrigation electricity consumption of the mixed agricultural and drainage users is greater than the total monthly electricity consumption of the mixed agricultural and drainage users, then it is determined that the irrigation electricity consumption of the mixed agricultural and drainage users is abnormal; The predicted monthly electricity consumption data of the mixed agricultural drainage users is compared with the monthly data in the historical electricity consumption data. Based on the Euclidean distance, a preset number of monthly data that are closest to the predicted monthly electricity consumption data are selected as the predicted monthly electricity consumption data to determine the approximate irrigation electricity consumption. The average value of the pre-determined preset number of approximate irrigation power is used as the normal value of irrigation power for the mixed agricultural drainage users.

9. A device for determining irrigation power consumption for mixed agricultural drainage users, characterized in that, include: The dataset generation module is used to generate a first dataset based on the electricity consumption data of pure agricultural drainage users, a second dataset based on the electricity consumption data of non-agricultural drainage users, and a third dataset based on the electricity consumption data of mixed agricultural drainage users. The first model training module is used to train pre-built regression models based on the first dataset and the second dataset respectively, to obtain a first model for predicting the electricity consumption of pure agricultural drainage users and a second model for predicting the electricity consumption of non-agricultural drainage users. The second model training module is used to train the first and second models as base learners, and the outputs of the two base learners as the inputs of the meta learners, using the third dataset to obtain the linear relationship between the electricity consumption of mixed agricultural drainage users and the electricity consumption of irrigation and non-irrigation. The irrigation power calculation module is used to take the predicted power consumption data of mixed agricultural and drainage users as input, make predictions using the first model, and obtain the irrigation power of mixed agricultural and drainage users based on the prediction results and the linear relationship. The irrigation power calculation module is specifically used for: Using the monthly electricity consumption data of mixed agricultural drainage users as input, the first model is used to make predictions and obtain the initial value of irrigation electricity for the current month; The first weighting coefficient is obtained based on the linear relationship; Multiply the initial value of irrigation power by the first weighting coefficient to obtain the monthly irrigation power of the mixed agricultural drainage user.

Citation Information

Patent Citations

  • Method, device and terminal for determining irrigation water quantity of agricultural motor-pumped well

    CN112945329A

  • Denitration system outlet nitride concentration prediction method, device, medium and equipment

    CN116486925A

  • Agricultural irrigation rolls over water algorithm management and control system with electricity

    CN207147564U