Method and device for calculating pure irrigation electricity consumption of mixed agricultural drainage users

By training the pure irrigation electricity consumption of hybrid agricultural arrangers users, the accuracy problem of the accuracy of the electricity volume recognition of hybrid agricultural row users is solved, and the amount of irrigation water consumption is measured at high accuracy, providing data support for agricultural discharge irrigation management Essence

CN117540141BActive Publication Date: 2025-01-28国网河北省电力有限公司营销服务中心 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311496385.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-01-28
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify the pure irrigation electricity consumption of mixed agricultural discharge users, which affects the accuracy of irrigation water consumption measurement.

Method used

By using pure agricultural row users' pure irrigation related business data to train self -encoders, distinguish pure irrigation data and non -pure irrigation data, determine the reconstruction error score threshold, and distinguish the pure irrigation related business data of the target user according to the threshold. Data and non -pure irrigation data, calculate the pure irrigation electricity consumption of target users.

Benefits of technology

In the absence of training data with labels, accurately identify and calculate the pure irrigation electricity consumption of hybrid agricultural row users, increase the accuracy of irrigation water volume, and provide data support for agricultural discharge and irrigation power management and groundwater hypoplasia control. Essence

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117540141B_ABST
    Figure CN117540141B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for calculating the pure irrigation power consumption of a mixed agricultural drainage user, and belongs to the field of agricultural drainage user data processing. The method comprises: using the pure irrigation-related business data of the pure agricultural drainage user, training a first autoencoder and a second autoencoder with the goal of minimizing the reconstruction error; using the reconstructed data output by the first autoencoder, training a second target autoencoder with the goal of maximizing the reconstruction error; determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder; distinguishing target pure irrigation data and target non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold; calculating the pure irrigation power consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data. The present invention can accurately distinguish pure irrigation data from non-pure irrigation data, and then accurately calculate the pure irrigation power consumption of the mixed agricultural drainage user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural drainage user data processing, and in particular to a method and device for calculating pure irrigation electricity consumption of mixed agricultural drainage users. Background Art

[0002] Agricultural drainage users refer to users who use agricultural drainage and irrigation. In order to conduct comprehensive management of groundwater over-exploitation, it is necessary to use the "electricity-to-water" coefficient to indirectly calculate their water consumption through the well electricity consumption of agricultural drainage users. However, some users in the agricultural irrigation well archives have non-irrigation electricity consumption behaviors, which makes it difficult to accurately calculate the pure irrigation electricity consumption of such mixed agricultural drainage users with non-irrigation electricity consumption behaviors, thereby affecting the accuracy of irrigation water consumption measurement.

[0003] At present, in the accurate calculation of irrigation water consumption, most of the methods are to improve the accuracy of irrigation water consumption from the perspective of improving the "electricity-to-water" coefficient, and rarely involve the identification of pure irrigation electricity consumption before calculating irrigation water consumption using the "electricity-to-water" coefficient. The current electricity consumption identification problem is mainly concentrated in scenarios such as power supply systems. Its data is usually collected directly from electricity meters, contains more feature information, is easy to obtain labeled abnormal data, and is relatively simple to process. Feature engineering methods can be used to extract features for supervised learning.

[0004] However, for the problem of pure irrigation electricity consumption identification of mixed agricultural drainage users, due to the complex business data acquisition process and the difficulty in obtaining labeled training data, which contains fewer features, the general machine learning method is used to identify the pure irrigation electricity consumption of mixed agricultural drainage users, which is ineffective and costly. Summary of the invention

[0005] The embodiment of the present invention provides a method and device for calculating pure irrigation electricity consumption of a mixed agricultural drainage user, so as to solve the problem that the current electricity consumption identification method is not suitable for the identification of pure irrigation electricity consumption of a mixed agricultural drainage user.

[0006] In a first aspect, an embodiment of the present invention provides a method for calculating pure irrigation electricity consumption of a hybrid agricultural drainage user, comprising:

[0007] Using the pure irrigation-related business data of pure agricultural drainage users, the first preset autoencoder and the second preset autoencoder are trained with the goal of minimizing the reconstruction error to obtain the first autoencoder and the second autoencoder;

[0008] Using the reconstructed data output by the first autoencoder, the second autoencoder is trained with the reconstruction error as the goal to obtain a second target autoencoder;

[0009] Determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder;

[0010] Distinguishing pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtaining target pure irrigation data and target non-pure irrigation data;

[0011] The pure irrigation electricity consumption of the target user is calculated based on the target pure irrigation data and the target non-pure irrigation data.

[0012] In a possible implementation, determining a reconstruction error score threshold for distinguishing pure irrigation data and non-pure irrigation data according to the first autoencoder and the second target autoencoder includes:

[0013] The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are used to form a test set, and the test set is divided according to a preset time window to obtain a window data set;

[0014] Inputting each window data in the window data set into a first autoencoder and a second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data;

[0015] Obtain a result score for each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data;

[0016] The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

[0017] In a possible implementation, obtaining a result score of each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data includes:

[0018] according to Get the result score of each window data;

[0019] in, For each window data, the result score is For each window data, is the first reconstruction result corresponding to each window data, is the second reconstruction result corresponding to each window data, and α and β are hyperparameters for adjusting the sensitivity of the model.

[0020] In a possible implementation, classifying the result scores of all window data and determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the classification results includes:

[0021] Cluster the result scores of all window data into two categories according to the number of clusters to obtain the clustering results;

[0022] The reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is calculated based on the scores of the two categories of results in the clustering results.

[0023] In a possible implementation, the test set is formed by using the pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users, including:

[0024] Pre-process the pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users;

[0025] The preprocessed data are standardized to form a test set.

[0026] In a possible implementation, the step of distinguishing pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold to obtain target pure irrigation data and target non-pure irrigation data includes:

[0027] Divide the irrigation-related business data of the target user according to the preset time window to obtain the target window data set;

[0028] Input each target window data in the target window data set into the first autoencoder and the second target autoencoder respectively to obtain a target result score for each target window data;

[0029] The target result score is compared with the reconstruction error score threshold, and the target window data corresponding to the target result score is marked as pure irrigation data or impure irrigation data according to the comparison result to obtain target pure irrigation data and target impure irrigation data.

[0030] In a possible implementation, calculating the pure irrigation power consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data includes:

[0031] Inputting each target non-pure irrigation data into a preset irrigation data fitting model for fitting, and obtaining target fitting irrigation data corresponding to each target non-pure irrigation data;

[0032] The sum of the power consumption corresponding to each target pure irrigation data and each target fitting irrigation data is calculated to obtain the pure irrigation power consumption of the target user.

[0033] In a possible implementation, the training process of the preset irrigation data fitting model includes:

[0034] Use the pure irrigation-related business data of pure agricultural drainage users to build a fitting training set;

[0035] Using the fitting training set to train the initial time series fitting model to obtain a target time series fitting model;

[0036] When the mean absolute percentage error and the mean absolute error of the target time series fitting model meet preset conditions, a preset irrigation data fitting model is obtained.

[0037] In a second aspect, an embodiment of the present invention provides a device for calculating pure irrigation power consumption of a hybrid agricultural drainage user, comprising:

[0038] The first processing module is used to use the pure irrigation-related business data of the pure agricultural drainage users to train the first preset autoencoder and the second preset autoencoder with the goal of minimizing the reconstruction error, so as to obtain the first autoencoder and the second autoencoder;

[0039] A second processing module is used to train a second autoencoder using the reconstructed data output by the first autoencoder with the reconstruction error as the goal, so as to obtain a second target autoencoder;

[0040] A third processing module is used to determine a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder;

[0041] A fourth processing module is used to distinguish pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtain target pure irrigation data and target non-pure irrigation data;

[0042] The calculation module is used to calculate the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data.

[0043] In a possible implementation manner, the third processing module is specifically configured to:

[0044] The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are used to form a test set, and the test set is divided according to a preset time window to obtain a window data set;

[0045] Inputting each window data in the window data set into a first autoencoder and a second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data;

[0046] Obtain a result score for each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data;

[0047] The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

[0048] The embodiment of the present invention provides a method and device for calculating the pure irrigation electricity consumption of a mixed agricultural drainage user. The method first uses the pure irrigation-related business data of the pure agricultural drainage user to train a first preset autoencoder and a second preset autoencoder with the goal of minimizing the reconstruction error, thereby obtaining a first autoencoder and a second autoencoder; then uses the reconstructed data output by the first autoencoder to train the second autoencoder with the goal of maximizing the reconstruction error, thereby obtaining a second target autoencoder; since the reconstructed data output by the first autoencoder is data with a very small error with the pure irrigation-related business data, the second target autoencoder can be effectively distinguished between the pure irrigation-related business data and the non-pure irrigation-related business data (that is, the irrigation-related business data of the mixed agricultural drainage user), and therefore, without the need for labeled training data, the reconstruction error score threshold for distinguishing between the pure irrigation data and the non-pure irrigation data can be determined according to the first autoencoder and the second target autoencoder. On this basis, the pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user are distinguished according to the reconstruction error score threshold, and the target pure irrigation data and the target non-pure irrigation data are obtained. The pure irrigation electricity consumption of the target user can be accurately calculated according to the target pure irrigation data and the target non-pure irrigation data. Therefore, the irrigation electricity consumption can be accurately calculated without high requirements on training data, thereby improving the measurement accuracy of irrigation water consumption, providing data support for relevant departments to carry out agricultural irrigation and drainage electricity management and agricultural irrigation and drainage facilities management, and assisting in the precise implementation of relevant groundwater over-exploitation control plans. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is a flow chart of the implementation of the method for calculating the pure irrigation electricity consumption of a hybrid agricultural drainage user provided by an embodiment of the present invention;

[0051] Figure 2 2 is a schematic diagram of the structure of a device for calculating pure irrigation power consumption of a hybrid agricultural drainage user provided by an embodiment of the present invention;

[0052] Figure 3 It is a processing flow chart of a device for calculating pure irrigation power consumption of a hybrid agricultural drainage user provided by an embodiment of the present invention;

[0053] Figure 4 It is a structural schematic diagram of a device for calculating pure irrigation electricity consumption of a hybrid agricultural drainage user provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0055] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0056] Figure 1 The implementation flow chart of the method for calculating the pure irrigation electricity consumption of a hybrid agricultural drainage user provided in an embodiment of the present invention is described in detail as follows:

[0057] Step 101 , using the pure irrigation-related business data of pure agricultural drainage users, a first preset autoencoder and a second preset autoencoder are trained with the goal of minimizing reconstruction error to obtain a first autoencoder and a second autoencoder.

[0058] Step 102: using the reconstructed data output by the first autoencoder, training the second autoencoder with the goal of maximizing the reconstruction error, to obtain a second target autoencoder.

[0059] In this embodiment, in order to reduce the requirements for training data, Figure 2 and Figure 3 As shown, the data input and processing module can be used to first obtain the irrigation-related business data of the agricultural drainage users and perform preprocessing operations, and then the agricultural drainage users can be divided into pure agricultural drainage users, mixed agricultural drainage users and non-agricultural drainage users according to the electricity consumption characteristics through, for example, a Gaussian mixture clustering method, and a training set is constructed with the pure irrigation-related business data corresponding to the pure agricultural drainage users, and a test set is constructed with the irrigation-related business data corresponding to the mixed agricultural drainage users and the pure irrigation-related business data corresponding to the pure agricultural drainage users, so as to train an irrigation electricity recognition model that can distinguish between the pure irrigation data and non-pure irrigation data of the target user (that is, the agricultural drainage user to be identified).

[0060] It should be noted that Figure 2 The hybrid agricultural drainage user pure irrigation electricity consumption calculation device shown in the figure is Figure 4 There is no essential difference between the pure irrigation electricity consumption calculation devices for the mixed agricultural drainage users shown, except for the difference in module division.

[0061] Among them, the irrigation-related business data of agricultural drainage users can be obtained from relevant databases, which generally include water conservancy archives, daily electricity consumption archives and electricity information collection system archives, mainly including precipitation, electricity consumption, well location and planting area. Considering that there are few optional features in this information, precipitation, electricity consumption, well location and planting area (optional) are taken as feature items for subsequent processing. This helps to identify which section is pure irrigation electricity data and which section is non-pure irrigation electricity data.

[0062] For example, there is a certain correlation between precipitation and irrigation behavior. When precipitation is large, irrigation behavior is generally less, and when precipitation is small, irrigation behavior is generally more. Based on this feature, pure irrigation power data and non-pure irrigation power data can be distinguished.

[0063] Among the selected data such as precipitation, electricity consumption, well location and planting area, some data may be more accurate and reliable, while some data may be missing or have collection errors, so a series of preprocessing operations can be performed. For example, preprocessing operations such as data cleaning, data integration, data transformation, and interpolation of missing data values ​​can be performed on each data.

[0064] After the preprocessing operation, in order to unify data of different magnitudes to the same magnitude, various data after preprocessing may be standardized, for example, by using a z-score method to standardize various data after preprocessing.

[0065] On this basis, in order to meet the input requirements of the irrigation electricity recognition model obtained by the first preset autoencoder and the second preset autoencoder based on unsupervised learning, the standardized training set is divided according to the preset time window to obtain the training window data set.

[0066] For example, if the training set in time series form is T = {x1, x2, ... x T}, since there is a dependency relationship between each time point in the training set, it is split into window data W of length K t ={x t-K+1 ,x t-K+2 ,…,x t-1 ,x t} is used as the training input of the first preset autoencoder and the second preset autoencoder, so that when the electricity consumption is subsequently identified according to the trained irrigation electricity recognition model, each window data can be distinguished as pure irrigation data or non-pure irrigation data. That is, a label y is added to each window data. For example, the label y∈(0,1), when y=0, it can indicate that the window data is pure irrigation data, and when y=1, it can indicate that the window data is non-pure irrigation data.

[0067] Considering that the autoencoder is an unsupervised artificial neural network composed of an encoder and a decoder. The encoder part maps the input x to a set of latent variables z, and the decoder maps z back to the input space as the reconstruction R. Its training goal is to minimize the reconstruction error between the input x and the reconstruction R. For pure irrigation electricity recognition, the autoencoder can reconstruct pure irrigation-related business data well, but cannot effectively reconstruct non-pure irrigation-related business data. However, when the difference between the two is small, the autoencoder cannot be effectively identified because its goal is to reconstruct the input data as much as possible, and its reconstruction error will be very small. For this reason, the autoencoder is trained based on the adversarial generative network.

[0068] For example, the trained irrigation electricity recognition model can adopt the architecture of variational autoencoder (VAE) + generative adversarial network (GAN) as a whole.

[0069] The first preset autoencoder AE1 and the second preset autoencoder AE2 can share an encoder network E. The training is carried out in two stages. In the first stage, AE1 and AE2 are trained to reconstruct normal data (that is, pure irrigation-related business data). In the second stage, adversarial training is performed, and the reconstructed data output by AE1 is re-input into AE2 as deception data, and AE2 is trained to distinguish normal data from deception data.

[0070] Then, the stochastic gradient descent method can be used for multiple rounds of iterative training until the model converges to obtain the trained first autoencoder and the second target autoencoder, and then an irrigation electricity recognition model is constructed based on the trained first autoencoder and the second target autoencoder to perform subsequent recognition of pure irrigation data and non-pure irrigation data.

[0071] Step 103: determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder.

[0072] In this embodiment, in order to distinguish pure irrigation data from impure irrigation data according to the first autoencoder and the second target autoencoder, a reconstruction error score threshold for distinguishing pure irrigation data from impure irrigation data may be determined according to the first autoencoder and the second target autoencoder.

[0073] Specifically, in order to reduce the requirements for input data, the test set can be preprocessed, standardized, and windowed, and the processed window data sets are respectively input into the first autoencoder and the second target autoencoder to determine the reconstruction error score threshold that can distinguish between pure irrigation data and non-pure irrigation data.

[0074] Optionally, determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder may include:

[0075] The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are used to form a test set, and the test set is divided according to the preset time window to obtain a window data set.

[0076] Each window data in the window data set is input into the first autoencoder and the second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data.

[0077] A result score for each window data is obtained according to the first reconstruction result and the second reconstruction result corresponding to each window data.

[0078] The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

[0079] Optionally, the test set is composed of the pure irrigation-related business data of the pure agricultural drainage users and the irrigation-related business data of the mixed agricultural drainage users, which may include:

[0080] The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are preprocessed; the preprocessed data are standardized to form a test set.

[0081] Optionally, obtaining a result score of each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data may include:

[0082] according to Get the result score for each window data.

[0083] in, For each window data, the result score is For each window data, is the first reconstruction result corresponding to each window data, is the second reconstruction result corresponding to each window data, and α and β are hyperparameters for adjusting the sensitivity of the model.

[0084] Optionally, classifying the result scores of all window data and determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the classification results may include:

[0085] The result scores of all window data are clustered into two categories according to the number of clusters to obtain the clustering results; the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is calculated based on the two categories of result scores in the clustering results.

[0086] In this embodiment, in order to obtain the reconstruction error score threshold, the test set also needs to be preprocessed, standardized and other operations.

[0087] After processing, each window data is input into the first autoencoder and the second target autoencoder, which can be The result score of each window data is obtained. Since the test set includes pure irrigation-related business data and non-pure irrigation-related business data, and the first autoencoder can reconstruct the pure irrigation-related business data very well, the second target autoencoder has a large reconstruction error for the non-pure irrigation-related business data. Therefore, the result scores of the pure irrigation-related business data and the non-pure irrigation-related business data after reconstruction by the first autoencoder and the second target autoencoder will have a relatively clear difference. Therefore, the reconstruction error score threshold can be determined by classifying the result scores of all window data.

[0088] Exemplarily, a k-means method may be used to cluster the result scores of each window data, and calculate the reconstruction error score threshold.

[0089] Then, each window data can be labeled using the result score of each window data and the reconstruction error score threshold, and the labeling result can be combined with the receiver operating characteristic curve (ROC) to measure the performance of the reconstruction error score threshold in distinguishing pure irrigation data from non-pure irrigation data. When the performance meets the requirements, the irrigation electricity recognition model can be obtained.

[0090] Step 104 , distinguishing pure irrigation data and impure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtaining target pure irrigation data and target impure irrigation data.

[0091] In the stage of identifying the agricultural drainage users, i.e., the target users, the irrigation-related business data of the target users can be input into the first autoencoder and the second target autoencoder after preprocessing, standardization, window division and other operations, and then The result score is obtained, and the target pure irrigation data and the target non-pure irrigation data are marked and output according to the result score.

[0092] Optionally, distinguishing pure irrigation data and impure irrigation data in the irrigation-related business data of the target user according to a reconstruction error score threshold to obtain target pure irrigation data and target impure irrigation data may include: dividing the irrigation-related business data of the target user according to a preset time window to obtain a target window data set; inputting each target window data in the target window data set into a first autoencoder and a second target autoencoder respectively to obtain a target result score for each target window data; comparing the target result score with the reconstruction error score threshold, and marking the target window data corresponding to the target result score as pure irrigation data or impure irrigation data according to the comparison result to obtain target pure irrigation data and target impure irrigation data.

[0093] Combination Figure 3 As shown in the figure, after obtaining the target result score of each target window data, if the target result score is greater than the reconstruction error score threshold, the target window data corresponding to the target result score is marked as non-pure irrigation data. If the target result score is less than the reconstruction error score threshold, the target window data corresponding to the target result score is marked as pure irrigation data, thereby obtaining target pure irrigation data and target non-pure irrigation data. Among them, since each target window data is a time series, the target pure irrigation data can reflect the pure irrigation electricity consumption time of the target user, and the target non-pure irrigation data can reflect the mixed electricity consumption time of the target user.

[0094] Step 105, calculating the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data.

[0095] In this embodiment, after the target pure irrigation data and the target non-pure irrigation data of the target user are distinguished, the pure irrigation power consumption of the target user can be accurately calculated according to the target pure irrigation data and the target non-pure irrigation data.

[0096] Optionally, calculating the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data may include:

[0097] Input each target non-pure irrigation data into the preset irrigation data fitting model for fitting, and obtain the target fitting irrigation data corresponding to each target non-pure irrigation data; calculate the sum of the power consumption corresponding to each target pure irrigation data and each target fitting irrigation data, and obtain the pure irrigation power consumption of the target user.

[0098] Combination Figure 3As shown, in order to accurately calculate the pure irrigation electricity consumption of the target user based on the target pure irrigation data and the target non-pure irrigation data, the preset irrigation data fitting model can be used to fit the irrigation data in each target non-pure irrigation data to obtain the target fitting irrigation data corresponding to each target non-pure irrigation data, and then the sum of the electricity consumption corresponding to each target pure irrigation data and each target fitting irrigation data is calculated to obtain the pure irrigation electricity consumption of the target user.

[0099] Optionally, the training process of the preset irrigation data fitting model may include:

[0100] A fitting training set is constructed using the pure irrigation-related business data of pure agricultural drainage users. The initial time series fitting model is trained using the fitting training set to obtain the target time series fitting model. When the mean absolute percentage error and mean absolute error of the target time series fitting model meet the preset conditions, the preset irrigation data fitting model is obtained.

[0101] Exemplarily, the initial time series fitting model can be a prophet time series model. The pure irrigation-related business data of pure agricultural drainage users can be used to construct a fitting training set, and the data in the fitting training set can be preprocessed and standardized using the data input and processing module (without window division). Then, the prophet time series model is used to fit the input pure agricultural drainage irrigation electricity time series, and the sequence data is input to obtain the upper and lower bounds of the fitting curve and the prediction. The seasonal characteristics of the irrigation electricity time series are viewed through the prophet built-in command. The performance of the model is evaluated by the mean absolute percentage error (MAPE) and the mean absolute error (MAE) until a prophet time series model that meets the requirements is obtained as the preset irrigation data fitting model.

[0102] When the pure irrigation electricity consumption of the target user is obtained, the mixed electricity consumption time series of the target user (that is, the target non-pure irrigation data) is input into the trained prophet time series model to predict its irrigation electricity consumption. Then, the electricity consumption of the pure irrigation electricity consumption time corresponding to its pure irrigation data is summed up to calculate the pure irrigation electricity consumption of the target user, and the calculation results are saved and output.

[0103] Combination Figure 2 and Figure 3 As shown in the figure, after obtaining the pure irrigation electricity consumption of the target user, the calculation results of the irrigation electricity calculation module can be input into the result analysis and visualization module, and the result analysis and visualization module can be used to perform statistical analysis and visualization of the data from a single user and global level. The echarts chart can be used on the page to display the total electricity consumption, monthly average, daily average electricity consumption, proportion of pure irrigation electricity consumption, electricity consumption trend chart, electricity consumption area heat map and other information.

[0104] The embodiment of the present invention aims at the problem of identifying the pure irrigation electricity consumption of hybrid agricultural drainage users in the application scenario of electricity-to-water conversion, and proposes a method for calculating the pure irrigation electricity consumption of hybrid agricultural drainage users. The pure irrigation data and non-pure irrigation data of the hybrid agricultural drainage users are identified by a neural network model based on a VAE autoencoder and a GAN generative adversarial network, and a prophet time series model is used to fit and decompose the identified hybrid electricity consumption part, that is, the non-pure irrigation data, so as to accurately calculate the pure irrigation electricity consumption of the hybrid agricultural drainage users. The method has stronger computing performance and higher accuracy, and can provide data support for relevant departments to manage agricultural irrigation and drainage electricity consumption and agricultural irrigation and drainage facilities, and assist in the accurate implementation of relevant groundwater over-exploitation control plans. Moreover, the embodiment of the present invention can realize automated execution from online data acquisition to result analysis and visualization, and has a higher level of automation and execution efficiency.

[0105] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean 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 embodiment of the present invention.

[0106] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0107] Figure 4 The schematic diagram of the structure of the device for calculating the pure irrigation power consumption of a hybrid agricultural drainage user provided by an embodiment of the present invention is shown. For the sake of convenience, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0108] like Figure 4 As shown, the device for calculating pure irrigation electricity consumption of a hybrid agricultural drainage user includes: a first processing module 41, a second processing module 42, a third processing module 43, a fourth processing module 44 and a calculation module 45.

[0109] The first processing module 41 is used to train the first preset autoencoder and the second preset autoencoder with the goal of minimizing the reconstruction error by using the pure irrigation-related business data of the pure agricultural drainage users, so as to obtain the first autoencoder and the second autoencoder;

[0110] A second processing module 42 is used to use the reconstructed data output by the first autoencoder to train the second autoencoder with the reconstruction error as the goal, so as to obtain a second target autoencoder;

[0111] A third processing module 43 is used to determine a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder;

[0112] A fourth processing module 44 is used to distinguish pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtain target pure irrigation data and target non-pure irrigation data;

[0113] The calculation module 45 is used to calculate the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data.

[0114] In the embodiment of the present invention, the pure irrigation-related business data of pure agricultural drainage users is first used to train the first preset autoencoder and the second preset autoencoder with the goal of minimizing the reconstruction error, so as to obtain the first autoencoder and the second autoencoder; and then the reconstructed data output by the first autoencoder is used to train the second autoencoder with the goal of maximizing the reconstruction error, so as to obtain the second target autoencoder; since the reconstructed data output by the first autoencoder is data with a very small error with the pure irrigation-related business data, the second target autoencoder can be effectively distinguished between the pure irrigation-related business data and the non-pure irrigation-related business data (that is, the irrigation-related business data of the mixed agricultural drainage users), and therefore, without the need for labeled training data, the reconstruction error score threshold for distinguishing the pure irrigation data from the non-pure irrigation data can be determined according to the first autoencoder and the second target autoencoder. On this basis, the pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user are distinguished according to the reconstruction error score threshold, and the target pure irrigation data and the target non-pure irrigation data are obtained. The pure irrigation electricity consumption of the target user can be accurately calculated according to the target pure irrigation data and the target non-pure irrigation data. Therefore, the irrigation electricity consumption can be accurately calculated without high requirements on training data, thereby improving the measurement accuracy of irrigation water consumption, providing data support for relevant departments to carry out agricultural irrigation and drainage electricity management and agricultural irrigation and drainage facilities management, and assisting in the precise implementation of relevant groundwater over-exploitation control plans.

[0115] In a possible implementation, the third processing module 43 may be used to form a test set using the pure irrigation-related business data of the pure agricultural drainage users and the irrigation-related business data of the mixed agricultural drainage users, and divide the test set according to a preset time window to obtain a window data set;

[0116] Inputting each window data in the window data set into a first autoencoder and a second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data;

[0117] Obtain a result score for each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data;

[0118] The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

[0119] In a possible implementation, the third processing module 43 may be configured to: Get the result score of each window data;

[0120] in, For each window data, the result score is For each window data, is the first reconstruction result corresponding to each window data, is the second reconstruction result corresponding to each window data, and α and β are hyperparameters for adjusting the sensitivity of the model.

[0121] In a possible implementation, the third processing module 43 may be used to cluster the result scores of all window data into two categories according to the number of clusters to obtain a clustering result;

[0122] The reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is calculated based on the scores of the two categories of results in the clustering results.

[0123] In a possible implementation, the third processing module 43 may be used to pre-process the pure irrigation-related business data of the pure agricultural drainage users and the irrigation-related business data of the mixed agricultural drainage users;

[0124] The preprocessed data are standardized to form a test set.

[0125] In a possible implementation, the fourth processing module 44 may be used to divide the irrigation-related business data of the target user according to a preset time window to obtain a target window data set;

[0126] Input each target window data in the target window data set into the first autoencoder and the second target autoencoder respectively to obtain a target result score for each target window data;

[0127] The target result score is compared with the reconstruction error score threshold, and the target window data corresponding to the target result score is marked as pure irrigation data or impure irrigation data according to the comparison result to obtain target pure irrigation data and target impure irrigation data.

[0128] In a possible implementation, the calculation module 45 may be used to input each target non-pure irrigation data into a preset irrigation data fitting model for fitting, and obtain target fitting irrigation data corresponding to each target non-pure irrigation data;

[0129] The sum of the power consumption corresponding to each target pure irrigation data and each target fitting irrigation data is calculated to obtain the pure irrigation power consumption of the target user.

[0130] In a possible implementation, the training process of the preset irrigation data fitting model includes:

[0131] Use the pure irrigation-related business data of pure agricultural drainage users to build a fitting training set;

[0132] Using the fitting training set to train the initial time series fitting model to obtain a target time series fitting model;

[0133] When the mean absolute percentage error and the mean absolute error of the target time series fitting model meet preset conditions, a preset irrigation data fitting model is obtained.

[0134] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0135] Those of ordinary skill in the art will appreciate that the templates, units, and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0136] If the module / unit is implemented in the form of 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, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned embodiments of the method for calculating the pure irrigation electricity consumption of each mixed agricultural drainage user. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium.

[0137] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for calculating pure irrigation electricity consumption of mixed agricultural drainage users, characterized in that: include: Using the pure irrigation-related business data of pure agricultural drainage users, the first preset autoencoder and the second preset autoencoder are trained with the goal of minimizing the reconstruction error to obtain the first autoencoder and the second autoencoder; Using the reconstructed data output by the first autoencoder, the second autoencoder is trained with the reconstruction error as the goal to obtain a second target autoencoder; Determining a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder; Distinguishing pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtaining target pure irrigation data and target non-pure irrigation data; Calculate the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data; Wherein, determining the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder comprises: The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are used to form a test set, and the test set is divided according to a preset time window to obtain a window data set; Inputting each window data in the window data set into a first autoencoder and a second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data; Obtain a result score for each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data; The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

2. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to claim 1 is characterized in that: The step of obtaining a result score of each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data comprises: according to Get the result score of each window data; in, For each window data, the result score is For each window data, is the first reconstruction result corresponding to each window data, is the second reconstruction result corresponding to each window data, and α and β are hyperparameters for adjusting the sensitivity of the model.

3. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to claim 1 is characterized in that: The method of classifying the result scores of all window data and determining the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the classification results includes: Cluster the result scores of all window data into two categories with the number of clusters to obtain the clustering results; The reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is calculated based on the scores of the two categories of results in the clustering results.

4. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to claim 1 is characterized in that: The test set is composed of the pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users, including: Pre-process the pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users; The preprocessed data are standardized to form a test set.

5. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to any one of claims 1 to 4, characterized in that: The step of distinguishing pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold to obtain target pure irrigation data and target non-pure irrigation data includes: Divide the irrigation-related business data of the target user according to the preset time window to obtain the target window data set; Input each target window data in the target window data set into the first autoencoder and the second target autoencoder respectively to obtain a target result score for each target window data; The target result score is compared with the reconstruction error score threshold, and the target window data corresponding to the target result score is marked as pure irrigation data or impure irrigation data according to the comparison result to obtain target pure irrigation data and target impure irrigation data.

6. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to any one of claims 1 to 4, characterized in that: The method of calculating the pure irrigation power consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data includes: Inputting each target non-pure irrigation data into a preset irrigation data fitting model for fitting, and obtaining target fitting irrigation data corresponding to each target non-pure irrigation data; The sum of the power consumption corresponding to each target pure irrigation data and each target fitting irrigation data is calculated to obtain the pure irrigation power consumption of the target user.

7. The method for calculating pure irrigation electricity consumption of hybrid agricultural drainage users according to claim 6 is characterized in that: The training process of the preset irrigation data fitting model includes: Use the pure irrigation-related business data of pure agricultural drainage users to build a fitting training set; Using the fitting training set to train the initial time series fitting model to obtain a target time series fitting model; When the mean absolute percentage error and the mean absolute error of the target time series fitting model meet preset conditions, a preset irrigation data fitting model is obtained.

8. A device for calculating pure irrigation electricity consumption of mixed agricultural drainage users, characterized in that: include: The first processing module is used to train the first preset autoencoder and the second preset autoencoder by using the pure irrigation-related business data of the pure agricultural drainage users with the goal of minimizing the reconstruction error, so as to obtain the first autoencoder and the second autoencoder; A second processing module is used to train a second autoencoder using the reconstructed data output by the first autoencoder with the reconstruction error as the goal, so as to obtain a second target autoencoder; A third processing module is used to determine a reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data according to the first autoencoder and the second target autoencoder; A fourth processing module is used to distinguish pure irrigation data and non-pure irrigation data in the irrigation-related business data of the target user according to the reconstruction error score threshold, and obtain target pure irrigation data and target non-pure irrigation data; A calculation module, used for calculating the pure irrigation electricity consumption of the target user according to the target pure irrigation data and the target non-pure irrigation data; The third processing module is specifically used for: The pure irrigation-related business data of pure agricultural drainage users and the irrigation-related business data of mixed agricultural drainage users are used to form a test set, and the test set is divided according to a preset time window to obtain a window data set; Inputting each window data in the window data set into a first autoencoder and a second target autoencoder respectively to obtain a first reconstruction result and a second reconstruction result corresponding to each window data; Obtain a result score for each window data according to the first reconstruction result and the second reconstruction result corresponding to each window data; The result scores of all window data are classified, and the reconstruction error score threshold for distinguishing pure irrigation data from non-pure irrigation data is determined based on the classification results.

Citation Information

Patent Citations

  • Motor-pumped well irrigation water quantity control method, device and system

    CN111414018A

  • Agricultural underground water exploitation quantity measuring method based on dynamic measurement and calculation of electricity-water conversion coefficient

    CN113432666A