Wheat filling period watering and fertilizing prediction method, device, equipment and medium based on multi-period multi-layer sparse sampling
Patent Information
- Application Number
- CN202511862449.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-12-11
AI Technical Summary
在农业预测领域,传统的统计学模型(ARIMA等)、循环神经网络、卷积神经网络以及Transformer等为代表的深度学习模型运用较多,但传统的统计学模型难以捕获数据的动态特性而导致精度较低;循环神经网络、卷积神经网络、Transformer以及相关变体的模型复杂度较高,计算资源占用大导致效率较低
本申请能够适配多场景需求,实现节本增效与增产双赢方案可针对盐碱田、干旱田等不同场景的周期特征,定制模型参数与预测策略,既能为盐碱田提供微咸水灌溉量的精准预测,又能为干旱田提前规划补水方案;且浇水量与施肥量模型独立训练、协同输出,既保证了预测针对性,又实现同一时间节点的水肥同步决策,最终提升水肥利用率,减少化肥挥发污染,助力达成经济与生态效益的统一。
Smart Images

Figure CN121666966B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of agricultural production, and in particular to a method for predicting irrigation and fertilization during the grain-filling stage of wheat based on multi-period, multi-layer, sparse sampling, as well as corresponding devices, electronic equipment, and computer-readable storage media. Background Technology
[0002] Wheat is a widely cultivated cereal crop worldwide, a nutritious and economically valuable commodity. Not only is wheat one of humanity's most important food crops, but its rich nutritional value also makes it a staple on people's tables. Wheat grains, after being ground into flour, can be used to make bread, steamed buns, noodles, and other foods; after fermentation, they can be used to produce beer, alcoholic beverages, and other spirits.
[0003] From sowing to maturity, wheat goes through several stages, including emergence, tillering, jointing, booting, heading, flowering, grain filling, and maturity. Among these, the grain filling stage is the critical period for wheat growth, the most important period determining grain weight and quality, and the most direct prerequisite for a bumper harvest. The grain filling period of wheat occurs approximately 10 to 15 days after flowering. Therefore, management during the grain filling period is particularly important.
[0004] Wheat grain-filling management is divided into three key parts: watering, fertilization, and pest and disease control. Among them, watering and fertilization are affected by many factors and vary greatly, including the wheat's own water and fertilizer content, rainfall, soil fertilizer content, soil water retention, and wind. These factors will affect the timing, amount, and quantity of watering and fertilization during the grain-filling period. The combination of multiple factors makes it difficult to control the timing and total amount of watering and fertilization during the grain-filling period.
[0005] Currently, watering and fertilization during the grain-filling stage mostly rely on traditional planting experience, failing to achieve truly precise watering and fertilization during this period. In the field of agricultural forecasting, traditional statistical models (ARIMA, etc.), recurrent neural networks, convolutional neural networks, and deep learning models such as Transformer are widely used. However, traditional statistical models struggle to capture the dynamic characteristics of data, resulting in low accuracy. Recurrent neural networks, convolutional neural networks, Transformer, and their variants have high model complexity and consume significant computational resources, leading to low efficiency.
[0006] In summary, existing technologies for predicting water and fertilizer amounts during the grouting period largely rely on traditional planting experience, failing to achieve truly accurate watering and fertilization during the grouting period. Furthermore, traditional models suffer from high complexity in predicting water and fertilizer amounts, high computational resource consumption leading to low efficiency. To address these issues, the applicant has undertaken corresponding explorations. Summary of the Invention
[0007] The purpose of this application is to solve the above problems by providing a method, device, electronic equipment and computer-readable storage medium for predicting irrigation and fertilization during the wheat grain-filling stage based on multi-period multi-layer sparse sampling.
[0008] To achieve the various objectives of this application, the following technical solution is adopted: A method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling, proposed to meet one of the purposes of this application, includes: A first sample dataset and a second sample dataset are obtained for the target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels. The second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent the first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling period of a single wheat planting area. The second training samples represent the second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling period of a single wheat planting area. Fourier transforms are performed on the first time-series data and the second time-series data respectively, converting the first time-series data and the second time-series data into frequency domain data respectively. Based on the frequency domain data, the time period length and period weight of the first training sample and the second training sample are calculated respectively. The number of feature extraction layers in the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample is determined according to the number of time period lengths. The kernel size of each feature extraction layer is calculated according to its corresponding time period length, and combined with the period weights, one-dimensional convolution aggregation operations are performed on the first time series data and the second time series data respectively. For the aggregated first time series data and second time series data, downsampling is performed according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample. The first subsequence and the second subsequence are respectively input into a preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample. Based on the watering amount prediction model and the fertilizer amount prediction model, the watering amount and fertilizer amount corresponding to each time node are predicted respectively, so as to complete the prediction of wheat watering and fertilization during the grain filling period based on multi-cycle multi-layer sparse sampling.
[0009] Optionally, the meteorological data includes daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, and daily reference evapotranspiration; the soil moisture data includes soil volumetric water content and soil water potential; and the soil nutrient data includes soil pH value and ammonium nitrogen content.
[0010] Optionally, the steps of performing Fourier transforms on the first time-series data and the second time-series data respectively, converting the first time-series data and the second time-series data into frequency domain data, and calculating the time period length and period weight of the first training sample and the second training sample based on the frequency domain data, include: Fourier transforms are performed on the first time series data and the second time series data respectively to determine the amplitude corresponding to each data dimension in the first time series data and the second time series data; Calculate the average amplitude of different data dimensions at the same frequency in the first time series data and the second time series data to determine the average amplitude of each frequency in multiple data dimensions. Select multiple frequencies with the most prominent average amplitude for the first training sample and the second training sample respectively. Invert the selected frequencies and round up to obtain the time period length of the first training sample and the second training sample respectively. The average amplitude corresponding to the selected frequency of the first training sample and the second training sample is normalized to obtain the period weights of the first training sample and the second training sample, respectively.
[0011] Optionally, the step of determining the number of feature extraction layers in the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample based on the number of time period lengths, and calculating the convolution kernel size for each feature extraction layer according to its corresponding time period length, includes: Match the corresponding time period length for each feature extraction layer; For each feature extraction layer of the multi-layer sparse sampling MLP model, half of the time period length corresponding to the feature extraction layer is rounded down to determine the intermediate calculation result. The first sum between twice the intermediate calculation result and the value one is calculated to determine the convolution kernel size.
[0012] Optionally, the steps of downsampling the aggregated first and second time-series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training samples and multiple sets of second subsequences corresponding to the second training samples include: The first time period length corresponding to the first time series data and the second time period length corresponding to the second time series data are obtained respectively. For the aggregated first time series data, a downsampling operation is performed according to the first time period length. Starting from the first data point of the first time series data, a data point is selected every first time period length to divide the first time series data into multiple first subsequences. For the aggregated second time series data, a downsampling operation is performed according to the second time period length. Starting from the first data point of the second time series data, a data point is selected every second time period length to divide the second time series data into multiple second subsequences.
[0013] Optional steps for training the watering amount prediction model and the fertilizer application amount prediction model include: Configure a preset multilayer sparse sampling MLP model, wherein the number of input layer nodes of the multilayer sparse sampling MLP model is consistent with the subsequence length, the hidden layer adopts the GELU activation function and the Dropout parameter is set to 0.1, the initial learning rate is 0.3 to 0.5, the loss function is mean squared error, and an early stopping convergence judgment strategy is set to terminate if the accuracy does not decrease for 5 consecutive epochs. Multiple sets of first subsequences are input into the multi-layer sparse sampling MLP model for training until the convergence judgment condition is met, and the watering volume prediction model corresponding to the first training sample is obtained, wherein the number of output layer nodes of the watering volume prediction model matches the number of watering volume prediction steps. Multiple sets of second subsequences are input into the multilayer sparse sampling MLP model for training until the convergence criterion is met, thereby obtaining the fertilizer application prediction model corresponding to the second training sample, wherein the number of output layer nodes of the fertilizer application prediction model matches the number of fertilizer application prediction steps.
[0014] Optionally, based on the irrigation amount prediction model and the fertilizer amount prediction model, the corresponding irrigation amount and fertilizer amount at each time node are predicted respectively to complete the step of predicting irrigation and fertilization during the wheat grain-filling period based on multi-period, multi-layer sparse sampling, including: Obtain meteorological data, soil moisture data, and soil nutrient data corresponding to the current time point; The meteorological data and soil moisture data corresponding to the current time node are input into the pre-trained irrigation volume prediction model to determine the predicted irrigation volume value corresponding to the target time node. The soil nutrient data corresponding to the current time node is input into the pre-trained fertilizer application prediction model to determine the predicted fertilizer application value corresponding to the target time node. The accuracy of the predicted watering and fertilizer amounts at the target time point is jointly evaluated based on the mean absolute error and the mean square error. The joint prediction results where the mean absolute error and the mean square error meet the preset threshold are used as the decision reference for watering and fertilization behavior at the target time point, so as to complete the synchronous prediction of watering and fertilizer amounts at the same time point during the wheat grain filling period.
[0015] A wheat grain-filling stage irrigation and fertilization prediction device based on multi-period, multi-layer sparse sampling, provided for another purpose of this application, includes: The dataset acquisition module is configured to acquire a first sample dataset and a second sample dataset of a target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels, and the second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling period of a single wheat planting area, and the second training samples represent second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling period of a single wheat planting area. The time period length determination module is configured to perform Fourier transform on the first time series data and the second time series data respectively, convert the first time series data and the second time series data into frequency domain data respectively, and calculate the time period length and period weight of the first training sample and the second training sample respectively based on the frequency domain data. The convolution aggregation module is configured to determine the number of feature extraction layers of the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample according to the number of time period lengths. Each feature extraction layer calculates the convolution kernel size according to its corresponding time period length, and performs one-dimensional convolution aggregation operations on the first time series data and the second time series data respectively in combination with the period weights. The subsequence partitioning module is configured to downsample the aggregated first time series data and second time series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample. The model prediction module is configured to input the first subsequence and the second subsequence into a preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample; based on the watering amount prediction model and the fertilizer amount prediction model, the watering amount and fertilizer amount corresponding to each time node are predicted respectively, so as to complete the prediction of wheat watering and fertilization during the grain filling period based on multi-period multi-layer sparse sampling.
[0016] An electronic device provided for another purpose of this application includes a central processing unit and a memory, the central processing unit being configured to invoke and run a computer program stored in the memory to perform the steps of the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period multi-layer sparse sampling described in this application.
[0017] A computer-readable storage medium is provided for another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period multi-layer sparse sampling, which, when called by a computer, executes the steps included in the corresponding method.
[0018] Compared to existing technologies, this application addresses the problems of traditional methods for predicting watering and fertilization during the grouting period, which largely rely on traditional planting experience and fail to achieve truly accurate watering and fertilization, as well as the high complexity and computational resource consumption leading to low efficiency of traditional models in predicting watering and fertilization amounts. This application offers the following benefits, including but not limited to: This application can adapt to the needs of multiple scenarios and achieve a win-win solution of cost reduction, efficiency improvement and increased production. It can customize model parameters and prediction strategies for the periodic characteristics of different scenarios such as saline-alkali fields and arid fields. It can provide accurate prediction of the amount of slightly saline water irrigation for saline-alkali fields and plan water replenishment schemes in advance for arid fields. Moreover, the irrigation and fertilization models are trained independently and output collaboratively, which not only ensures the relevance of the prediction, but also enables simultaneous decision-making on water and fertilizer at the same time point, ultimately improving the water and fertilizer utilization rate, reducing fertilizer volatilization pollution, and helping to achieve the unity of economic and ecological benefits. Attached Figure Description
[0019] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period, multi-layer sparse sampling proposed in this application. Figure 2 This is an exemplary network architecture for a multi-layer sparse sampling MLP model in the embodiments of this application; Figure 3 This is a schematic diagram of the wheat grain-filling stage irrigation and fertilization prediction device based on multi-cycle multi-layer sparse sampling in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0022] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.
[0023] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should understand such modifications.
[0024] Please see Figure 1 In one embodiment of the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period multi-layer sparse sampling of this application, the method includes: Step S10: Obtain a first sample dataset and a second sample dataset of the target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels. The second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent the first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling period of a single wheat planting area. The second training samples represent the second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling period of a single wheat planting area. The wheat grain-filling irrigation and fertilization prediction system based on multi-period, multi-layer sparse sampling in the terminal device can acquire a first sample dataset and a second sample dataset for a target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels, while the second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent first time-series data constructed from meteorological data and soil moisture data corresponding to each time point during the grain-filling period of a single wheat planting area. The second training samples represent second time-series data constructed from soil nutrient data corresponding to each time point during the grain-filling period of a single wheat planting area. The meteorological data includes daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, and daily reference evapotranspiration. The soil moisture data includes soil volumetric water content and soil water potential. The soil nutrient data includes soil pH and ammonium nitrogen content.
[0025] In some embodiments, a target wheat planting experimental area can be set. On the one hand, sensors are used to collect meteorological characteristics of the wheat planting area's growing environment, and the sensing results are transmitted wirelessly to a data terminal. On the other hand, historical data is collected through agricultural meteorological observation stations or automatic weather stations deployed in the fields. The meteorological data needs to include information such as light intensity, temperature, humidity, and wind speed. The collected meteorological data can be further subdivided into daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, daily reference evapotranspiration, etc. The data collection frequency can be hourly, etc., for subsequent data preprocessing and feature engineering.
[0026] For the collection of soil moisture data, soil moisture data can be continuously monitored directly through soil moisture sensors and transmitted to the data terminal wirelessly. Soil moisture data includes soil volumetric water content, soil water potential, etc.
[0027] For soil nutrient data, electrochemical sensors can be used to measure soil nutrients directly in the field, and the data can also be transmitted wirelessly to a data terminal. Soil nutrient data includes pH value, ammonium nitrogen, etc. The data acquisition frequency can be hourly, which can be used for subsequent data preprocessing and feature engineering.
[0028] In some embodiments, the collection of wheat growth stage data is primarily aimed at determining when wheat enters the grain-filling stage. The main data collected is the grain length data from the middle of the wheat ear. A coefficient, length, can be set as the ratio between the grain length and the maximum grain length. When the coefficient length exceeds 3 / 4, it indicates that the wheat has entered the grain-filling stage.
[0029] In a further embodiment, for subsequent modeling and other operations, the data needs to be preprocessed and segmented, creating a dataset containing multidimensional data. Two datasets can be created based on watering and fertilization behavior during the grain-filling period: a first sample dataset including multiple first training samples and their corresponding first sample labels, and a second sample dataset including multiple second training samples and their corresponding second sample labels. The first training samples represent a first time-series data constructed from meteorological and soil moisture data corresponding to various time points during the grain-filling period in a single wheat-growing area. The second training samples represent a second time-series data constructed from soil nutrient data corresponding to various time points during the grain-filling period in a single wheat-growing area. The meteorological data includes daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, and daily reference evapotranspiration. The soil moisture data includes soil volumetric water content and soil water potential. The soil nutrient data includes soil pH and ammonium nitrogen content.
[0030] The meteorological data in the first sample dataset during the wheat grain-filling period should include daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, daily reference evapotranspiration, etc.; the soil moisture data in the first sample dataset during the wheat grain-filling period should include soil volumetric water content, soil water potential, etc. The second sample dataset for wheat during the grain-filling stage needs to include soil pH and ammonium nitrogen content, among other things. For missing and outlier values in both the first and second sample datasets, the moving average of adjacent normal values should be used for replacement. It's important to note that each dataset also needs to record the total amount of watering and fertilization performed that day. Data on daily agricultural operations, if verified to be correct, does not require handling of missing values and is considered as if no operations were performed that day. When creating the datasets, it's crucial to ensure that all data have a consistent timestamp format (e.g., YYYY-MM-DD), consistent spatial identifiers (e.g., consistent field ID or latitude and longitude), and consistent units for similar data (e.g., temperature in degrees Celsius, precipitation in ml). For subsequent prediction modeling and validation steps, the first and second sample datasets should be divided into training, validation, and test sets in a 6:2:2 ratio.
[0031] Step S20: Perform Fourier transform on the first time series data and the second time series data respectively, convert the first time series data and the second time series data into frequency domain data respectively, and calculate the time period length and period weight of the first training sample and the second training sample respectively based on the frequency domain data. After obtaining the first sample dataset and the second sample dataset of the target wheat planting area during the grain-filling period, Fourier transform is performed on the first time series data and the second time series data respectively, and the first time series data and the second time series data are converted into frequency domain data respectively. Based on the frequency domain data, the time period length and period weight of the first training sample and the second training sample are calculated respectively. In some embodiments, the steps of performing Fourier transforms on the first time-series data and the second time-series data respectively, converting the first time-series data and the second time-series data into frequency domain data respectively, and calculating the time period length and period weight of the first training sample and the second training sample respectively based on the frequency domain data include: Step S201: Perform Fourier transform on the first time series data and the second time series data respectively to determine the amplitude corresponding to each data dimension in the first time series data and the second time series data; Step S202: Calculate the average amplitude of different data dimensions at the same frequency in the first time series data and the second time series data to determine the average amplitude of each frequency in multiple data dimensions. Select multiple frequencies with the most prominent average amplitude for the first training sample and the second training sample respectively. Invert the selected frequencies and round up to obtain the time period length of the first training sample and the second training sample respectively. Step S203: Normalize the average amplitude corresponding to the selected frequency of the first training sample and the second training sample to obtain the period weights of the first training sample and the second training sample respectively.
[0032] Specifically, for an original length of Data dimensions are The Fourier transform of the first and second time-series data is expressed as follows: , in, Indicates the original length is Data dimensions are The first or second time series data; This represents the Fourier transform, used to transform the time domain... Convert to frequency domain data; This indicates that the frequency domain data after Fourier transform is used to calculate the amplitude corresponding to each frequency. This indicates the averaging operation, for The average amplitude of the same frequency across all data dimensions is used to obtain the result. ; Indicates the same frequency at Average amplitude across each data dimension; , in, Indicates from the average amplitude The first selected The frequency with the most prominent amplitude can be 2; The range of values for the frequency is limited by the Nyquist sampling theorem of the Fourier transform, and the effective frequency does not exceed half the length of the sequence. Indicates a filtering operation, from Select the one with the largest average amplitude Each frequency.
[0033] Furthermore, considering that retaining an appropriate number of frequencies and their corresponding amplitude components can adequately represent the original timing information, while maintaining reasonable computational overhead, generally only the first few frequencies are selected. Each frequency and its corresponding average amplitude These are values pre-set according to actual application scenarios, corresponding to the selection of the previous values. The number of main time periods, that is, the number of time period lengths. When When set to 1, the model defaults to single-cycle processing. For example, saline-alkali fields need to focus on the 5-day salt accumulation cycle (dominant) and the 15-day grain filling period (secondary dominant), corresponding to 2 feature extraction layers; arid fields need to capture the 3-day short-term drought fluctuation (dominant) and the 7-day phased water replenishment cycle (secondary dominant), which are also processed separately using 2 feature extraction layers.
[0034] Furthermore, the average amplitude corresponding to the selected frequencies of the first training sample and the second training sample corresponds to different time period lengths. and periodic weights By inverting the frequency and normalizing the amplitude, the time period length of multiple cycles and the corresponding cycle weight of each cycle can be directly obtained. The amplitude normalization process is more direct, has less computational overhead, and does not change the original multi-cycle characteristics. The corresponding conversion formula is as follows: , in, Indicates the first The time period length corresponding to each frequency, that is, the time period of the frequency fluctuation; Indicates the first The selected prominent frequencies; This indicates that the reciprocal of the frequency is rounded up to obtain the time period length. ; , in, and They represent the results obtained after the previous Fourier transform. The frequency of each and its corresponding average amplitude, Indicates the preceding The sum of the average amplitudes corresponding to each frequency; Indicates the first The time period length corresponding to each frequency, that is, the time period of the frequency fluctuation; After amplitude normalization, the first By determining the weight of the amplitude at each frequency, the time period length and period weight of the first and second time series data are obtained through this transformation.
[0035] As shown in steps S201 to S203 above, converting time-domain data to the frequency domain via Fourier transform accurately extracts latent cycles from meteorological and soil data (such as the 5-day salt accumulation cycle in saline-alkali land), providing core feature support for subsequent modeling. Calculating multi-dimensional average amplitudes at the same frequency and integrating multi-source data such as meteorological (e.g., temperature, precipitation) and soil (e.g., water content, ammonium nitrogen) avoids the influence of single-indicator biases while selecting prominent frequencies, controlling computational costs while retaining key cycle information. Normalizing the amplitude to obtain cycle weights clarifies the priority of different cycles, providing a basis for the hierarchical division of multi-layer sparse sampling MLP models, ensuring that model resources are tilted towards key cycles, and improving prediction targeting. The obtained time cycle length and cycle weights directly guide subsequent convolution kernel calculations and downsampling operations, significantly shortening subsequence lengths and reducing the computational resource consumption of MLP modeling.
[0036] Step S30: Determine the number of feature extraction layers of the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample according to the number of time period lengths. Calculate the convolution kernel size of each feature extraction layer according to its corresponding time period length, and combine it with the period weights to perform one-dimensional convolution aggregation operations on the first time series data and the second time series data respectively. Step S40: For the aggregated first time series data and second time series data, downsample according to their corresponding time period length to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample. Step S50: Input the first subsequence and the second subsequence into a preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample; based on the watering amount prediction model and the fertilizer amount prediction model, predict the watering amount and fertilizer amount corresponding to each time node, so as to complete the prediction of wheat grain filling period watering and fertilization based on multi-cycle multi-layer sparse sampling.
[0037] In some embodiments, the step of determining the number of feature extraction layers in the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample according to the number of time period lengths, and calculating the convolution kernel size of each feature extraction layer according to its corresponding time period length, includes: Step S301: Match the corresponding time period length for each feature extraction layer; Step S302: For each feature extraction layer of the multi-layer sparse sampling MLP model, round down half of the time period length corresponding to the feature extraction layer to determine the intermediate calculation result. Step S303: Calculate the first sum between twice the intermediate calculation result and the value one, to determine the convolution kernel size.
[0038] Each feature extraction layer is matched with a corresponding time period length, ensuring a one-to-one correspondence between model layers and core data periods (e.g., a 5-day salt accumulation period in saline-alkali land and a 3-day drought fluctuation period in arid regions). This guarantees that temporal patterns at different scales can be specifically captured, solving the problem of disconnect between traditional model periodic features and model structure, and laying a solid foundation for accurate time series modeling. For each feature extraction layer of the multi-layer sparse sampling MLP model, half of the time period length corresponding to the feature extraction layer is rounded down to determine the intermediate calculation result. The first sum between twice the intermediate calculation result and the numerical value one is calculated to determine the convolution kernel size. This achieves symmetrical aggregation of time series data, enhances the perception of the correlation between a single time point and surrounding data, effectively reduces the interference of outliers on the sequence, improves the stability of data representation, and aligns with the characteristic that agricultural time series data is susceptible to environmental fluctuations.
[0039] Furthermore, the convolution kernel size, determined collaboratively in three steps to balance prediction accuracy and computational resource overhead, is suitable for the corresponding time scale (e.g., a 15-day period corresponds to a 15-size convolution kernel), fully covering key information within the period, without increasing the computational burden due to excessively large kernel size; it also provides reasonable pre-parameters for subsequent downsampling to shorten the subsequence length, reducing the resource consumption of MLP modeling and achieving the model design goal of "high accuracy and low overhead".
[0040] Furthermore, to enhance the model's scenario adaptability and generalization capabilities, this process can flexibly adjust the convolution kernel parameters according to the time cycle of different planting scenarios (saline-alkali fields, arid fields) without reconstructing the overall model architecture. This allows the multilayer sparse sampling MLP model to adapt to diverse water and fertilizer prediction needs during the wheat grain-filling period, providing technical support for precise agricultural decision-making in different regions.
[0041] In some embodiments, the step of downsampling the aggregated first time-series data and second time-series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample includes: Step S401: Obtain the first time period length corresponding to the first time series data and the second time period length corresponding to the second time series data respectively; Step S402: For the aggregated first time series data, perform a downsampling operation according to the first time period length. Starting from the first data point of the first time series data, select one data point every first time period length to divide the first time series data into multiple first subsequences. Step S403: For the aggregated second time series data, perform a downsampling operation according to the second time period length. Starting from the first data point of the second time series data, select one data point every second time period length to divide the second time series data into multiple second subsequences.
[0042] As can be seen from steps S401 to S403 above, the first time period length corresponding to the first time series data and the second time period length corresponding to the second time series data are obtained respectively, so that the downsampling operation anchors the core time pattern of the data (such as the 5-day salt accumulation cycle of saline-alkali land and the 3-day drought fluctuation cycle of arid areas), avoids the loss of periodic features caused by indiscriminate sampling, and ensures that the core time series patterns related to watering and fertilization can be accurately decomposed into subsequences, thus laying a solid foundation for periodic features for subsequent modeling.
[0043] By selecting points at intervals based on time period length to divide the data into subsequences, the periodic features of the original time series data can be separated into subsequences while the trend features are retained within the subsequences, thus achieving effective decoupling of the two types of features. At the same time, the length of the subsequences is significantly shortened (e.g., the original 75-day series can be divided into 15 subsequences with a time period length of 5 days), which solves the problem of high computational cost in modeling long time series data and significantly reduces the training overhead of the MLP model.
[0044] To ensure the integrity of multi-source data features and improve the targeting of predictions, the downsampling selects complete multi-dimensional data points (such as the first time series data point containing all indicators of meteorology and soil moisture), which can retain the multi-dimensional features of each time node and avoid information loss caused by sampling a single indicator; and the time series data of watering and fertilization tasks are sampled separately, so that the first subsequence focuses on water-related features and the second subsequence focuses on nutrient features, thereby improving the targeting of subsequent model training.
[0045] Enhancing model adaptability to different scenarios while balancing accuracy and efficiency, this process allows for flexible adjustment of sampling parameters based on the time cycle of different planting scenarios. For example, it can adapt to a 3-day cycle in dry fields and a 7-day cycle in rainy fields without reconstructing the sampling logic. At the same time, the number of subsequences is consistent with the length of the time cycle, which ensures full coverage of the cycle features and balances prediction accuracy and computational efficiency by reducing the sequence length, thus meeting the "low cost and high accuracy" requirements for smart agriculture.
[0046] In some embodiments, the steps of training the watering amount prediction model and the fertilizer application amount prediction model include: Step S501: Configure a preset multilayer sparse sampling MLP model, wherein the number of input layer nodes of the multilayer sparse sampling MLP model is consistent with the length of the subsequence, the hidden layer uses the GELU activation function and the Dropout parameter is set to 0.1, the initial learning rate is 0.3 to 0.5, the loss function is mean squared error, and an early stopping convergence judgment strategy is set to terminate if the accuracy does not decrease for 5 consecutive epochs. Step S502: Input multiple sets of first sub-sequences into the multi-layer sparse sampling MLP model for training until the convergence judgment condition is met, and obtain the watering volume prediction model corresponding to the first training sample, wherein the number of output layer nodes of the watering volume prediction model matches the number of watering volume prediction steps. Step S503: Input multiple sets of second sub-sequences into the multi-layer sparse sampling MLP model for training until the convergence judgment condition is met, and obtain the fertilizer application prediction model corresponding to the second training sample, wherein the number of output layer nodes of the fertilizer application prediction model matches the number of fertilizer application prediction steps.
[0047] In some embodiments, the irrigation amount prediction model and the fertilizer application amount prediction model are used to predict the irrigation amount and fertilizer application amount corresponding to each time node, respectively, to complete the step of predicting irrigation and fertilization during the wheat grain-filling period based on multi-period, multi-layer sparse sampling, including: Step S5001: Obtain meteorological data, soil moisture data, and soil nutrient data corresponding to the current time point; Step S5002: Input the meteorological data and soil moisture data corresponding to the current time node into the pre-trained irrigation volume prediction model to determine the predicted irrigation volume value corresponding to the target time node. Step S5003: Input the soil nutrient data corresponding to the current time node into the pre-trained fertilizer application prediction model to determine the predicted fertilizer application value corresponding to the target time node. Step S5004: Based on the mean absolute error and mean square error, perform a joint accuracy assessment on the predicted values of watering and fertilization at the target time node. Use the joint prediction results where the mean absolute error and mean square error meet the preset threshold as a decision reference for watering and fertilization behavior at the target time node, so as to complete the synchronous prediction of watering and fertilization at the same time node during the wheat grain filling period.
[0048] In a specific embodiment, a multi-layer sparse sampling MLP model is built based on the time period length and period weight obtained in the above embodiment. After extracting the time period length and period weight of the first time series data and the second time series data, the model is first based on... The number of feature extraction layers is determined by the number of convolutional aggregation, downsampling, MLP modeling, and upsampling operations performed depending on the cycle. The processes and formulas involved in these operations are as follows: The first step is the convolutional aggregation operation. Each layer uses a one-dimensional convolutional kernel to aggregate the original sequence. This operation allows the aggregation at a given time point to obtain more information about the surrounding area and can reduce the impact of outliers on the sequence and subsequent modeling.
[0049] The size of the one-dimensional convolution kernel is Where p is the time period length corresponding to each feature extraction layer; the formula for convolution aggregation operation is as follows: in, Indicates either the first time series data or the second time series data. This indicates that a one-dimensional convolution operation is performed on either the first or second time-series data. After the convolution aggregation is completed, the convolutional sequence will be obtained. .
[0050] After performing the convolutional aggregation operation, the next step is to process the sequence. The downsampling operation requires each layer to aggregate the convolutional data for a time length of [time value missing]. First time series data or second time series data According to the length of the time period downsampling The number of subsequences, the interval length after taking the first data point. Then take the next data point, and so on, with the length of each subsequence being... This operation can significantly reduce the length of each subsequence compared to the original sequence, thereby reducing the computational resources required for the next step of MLP modeling and lowering the computational overhead of the modeling step.
[0051] After completing the downsampling step, the next step is to input the downsampled subsequence into the multilayer sparse sampling MLP model for training. The basic structure of the multilayer sparse sampling MLP model includes: 1. Input layer: Responsible for receiving the raw input data and mapping it to the first layer of neurons in the network. The number of nodes in the input layer is equal to the length of the input subsequence.
[0052] 2. Hidden layer: Composed of multiple neurons, each neuron receives a weighted result of the output of the previous layer and generates an output through an activation function.
[0053] 3. Output Layer: The last layer of the MLP, the output layer generates the corresponding type of prediction result. The number of nodes in the output layer is equal to the number of prediction steps in each layer.
[0054] The forward propagation process of the multi-layer sparse sampling MLP model is shown below: (1) Calculation of input to the hidden layer: in, It is the hidden layer. The output value of each neuron is an intermediate feature of the input data after weight calculation and activation function processing. It is an activation function, which can be the GELU activation function, etc. This represents the number of time points in the input layer, which is equal to the length of the downsampled subsequence. It is the input layer. The time node is connected to the hidden layer. The connection weights of the nth neuron are used to measure the connection weights of the input layer. The first feature affects the hidden layer. The degree of influence on each neuron. It is the input layer. The input value at the nth time point, i.e., the nth time point in the subsequence after downsampling. Feature data for each time point; Indicates the hidden layer number 1 The bias term for each neuron is used to adjust the activation threshold of the neuron and improve the model's adaptability to the data. It is the input layer. The input of each node, It is the hidden layer. Bias terms for each neuron.
[0055] (2) Calculation from hidden layer to output layer: in, It is the output layer. The output value at each time point, that is, the prediction result of the model, represents the predicted value of watering amount or fertilizer amount. This indicates the number of neurons in the hidden layer, which can be set to 64, 128, 256, etc., depending on the actual application scenario. Indicates the hidden layer number 1 The nth neuron to the output layer The connection weights at each time point are used to measure the connection weights of the hidden layer at the 1st time point. The degree of influence of each intermediate feature on the output result; It is the hidden layer. The output value of each neuron; Indicates the output layer number The bias term at each time point is used to adjust the baseline value of the output result and improve the prediction accuracy.
[0056] In the hidden layer, this application uses the GELU activation function and incorporates Dropout. The GELU activation function can effectively accelerate the convergence speed of the training process, as shown in the following formula: in, This represents the input value of the activation function; This represents the hyperbolic tangent function, with a value range of [-1, 1]. It is used to perform nonlinear transformations on input values, enhancing the model's ability to fit the data.
[0057] Adding Dropout to the hidden layer effectively prevents overfitting in the MLP model; the Dropout value is set to 0.1. The initial learning rate is set to 0.3, the training epochs are 50, and the loss function used is the mean squared error loss (MSE). The formula for calculating the mean squared error loss (MSE) is as follows: , in, The loss value represents the degree of deviation between the model's prediction and the actual value. The smaller the loss value, the higher the model's prediction accuracy. The data dimension of the first or second sample dataset, that is, the number of indicators contained in the dataset; Representing the model's prediction of the future A sequence of predicted values for watering or fertilization from time point (t+1) to (t+H); Indicates the future A sequence of actual values for watering or fertilization at each time point; express The square of the norm is used to calculate the squared error between the predicted and the true values, amplifying the impact of larger deviations and making the model pay more attention to samples with significant errors. This indicates the prediction window length, which is the number of time points the model predicts in one go, and is equal to the number of time points in the output layer.
[0058] After completing model training and outputting prediction results using the above embodiments, the predicted subsequences are upsampled, and then concatenated into a complete sequence using inverse downsampling. Finally, the predicted complete sequence is obtained, with a length of [length missing]. , which represents the length of the prediction window.
[0059] During training, the model automatically adjusts and optimizes parameters, including the learning rate, based on backpropagation of the loss function results. The training process uses an early stopping strategy, which can reduce redundant training time and prevent overfitting. In this application, training is stopped after the accuracy has not decreased for 5 consecutive epochs.
[0060] The trained model is evaluated on a test set, and the prediction error is calculated using mean absolute error (MAE) and mean squared error (MSE). A smaller error indicates better performance. The optimized model is then deployed to relevant systems and integrated with other systems to predict watering and fertilization amounts during the grouting period. This assists users in adjusting their watering and fertilization practices based on the predicted watering and fertilization amounts.
[0061] In some embodiments, 1. Data acquisition configuration includes: (1) Meteorological and soil data: Soil moisture sensors (1 per 30 mu) were deployed in a saline-alkali experimental field to collect the daily maximum / minimum temperature, daily precipitation, soil volumetric water content (0 to 40 cm soil layer) and soil ammonium nitrogen content every hour.
[0062] (2) Growth stage data: Starting from the 8th day after wheat flowering, the length of grains in the middle of the wheat ear was measured daily and the coefficient length was calculated. When the coefficient length ≥ 0.75, the starting date of the grain filling period was marked.
[0063] Agricultural records: Daily irrigation water volume (ml) and fertilizer application rate (pure nitrogen kg / ha) are automatically recorded via IoT devices. 2. Pretreatment and characterization processes include: (1) Handling missing values: When soil nutrient data is missing, the moving average of the most recent 7 days is used; when meteorological data is missing, interpolation between adjacent stations is used.
[0064] (2) Feature engineering: Add lag features (average temperature of the previous 3 days, cumulative precipitation of the previous 7 days) and grouting process features (days_since_filling_start).
[0065] (3) Data set division: divided according to the growth season: 2015-2021 is the training set, 2022 is the validation set, and 2023-2024 is the test set.
[0066] 3. Multi-period feature extraction includes: (1) Fourier transform parameters: input sequence length T=75 (the longest number of days in the grouting period), dimension C=15 (including meteorological, soil and derivative features), extract the first k=2 main periods.
[0067] (2) Results of cycle conversion: The dominant cycle p1 = 5 days (weight w1 = 0.67, the salt reaccumulation cycle after brackish water irrigation), and the secondary cycle p2 = 15 days (weight w2 = 0.33, corresponding to the stage fluctuation of grouting rate).
[0068] 4. Modeling of multi-layer sparse sampling MLP models includes: (1) Hierarchical structure: Two feature extraction layers are designed with k=2, which include: The first feature extraction layer has a period of p1=5, a kernel size of 2×⌊5 / 2⌋+1=5, and is downsampled into 5 subsequences with a length of n=15 for each sequence.
[0069] The second feature extraction layer has a period of p2=15, a kernel size of 2×⌊15 / 2⌋+1=15, and is downsampled into 15 subsequences with a length of n=5 for each sequence.
[0070] (2) Multi-layer sparse sampling MLP model structure: Number of nodes in the input layer: n (length of the subsequence) Hidden layer: 1 layer, 256 nodes, GELU activation function, Dropout=0.1 Output layer: 7 nodes (predicts irrigation / fertilization amounts for the next week) The loss functions are mean absolute error (MAE) and mean squared error (MSE), the optimizer is Adam, the initial learning rate is 0.5, and an early stopping strategy is used (termination occurs when the loss on the validation set does not decrease after 5 consecutive rounds).
[0071] 5. Prediction Results It provides accurate forecast results, assists in the precise control of irrigation and fertilization, and achieves the effect of increasing wheat yield.
[0072] In some embodiments, 1. Data acquisition configuration includes: (1) Meteorological and soil data: A meteorological station (collecting temperature, humidity, wind speed and precipitation) and a soil moisture sensor (1 per 30 mu) were deployed in a certain experimental field to collect the daily maximum / minimum temperature, daily precipitation, soil volumetric water content (0 to 20 cm soil layer) and soil ammonium nitrogen content every hour.
[0073] (2) Growth stage data: Starting from the 8th day after wheat flowering, the length of grains in the middle of the wheat ear was measured daily and the length coefficient was calculated. When the length ≥ 0.75, the starting date of the grain filling period was marked.
[0074] (3) Agricultural records: Daily irrigation water volume (ml) and fertilizer application volume (pure nitrogen kg / ha) are automatically recorded through IoT devices.
[0075] 2. Preprocessing and feature engineering include: (1) Handling missing values: When soil nutrient data is missing, the moving average of the most recent 7 days is used; when meteorological data is missing, interpolation between adjacent stations is used.
[0076] (2) Feature engineering: Add lag features (average temperature of the previous 3 days, cumulative precipitation of the previous 7 days) and grouting process features (days_since_filling_start).
[0077] (3) Data set division: divided according to the growth season: 2015-2021 is the training set, 2022 is the validation set, and 2023-2024 is the test set.
[0078] 3. Multi-period feature extraction includes: (1) Fourier transform parameters: input sequence length T=90 (the longest number of days in the grouting period), dimension C=15 (including meteorological, soil and derivative features), extract the first k=2 main periods.
[0079] (2) Cycle conversion results: the dominant cycle p1 = 7 days (weight w1 = 0.62, corresponding to weekly weather fluctuations), and the secondary cycle p2 = 15 days (weight w2 = 0.38, corresponding to the grouting stage division).
[0080] 4. Multi-level sparse sampling MLP model modeling (1) Hierarchical structure: Two feature extraction layers are designed with k=2: The first feature extraction layer has a period of p1=7, a kernel size of 2×⌊7 / 2⌋+1=7, and is downsampled into 7 subsequences with a length of n=12 for each sequence.
[0081] The second feature extraction layer has a period of p2=15, a kernel size of 15, and is downsampled into 15 subsequences, with each sequence having a length of n=6.
[0082] (2) Multi-layer sparse sampling MLP model structure: Number of input layer nodes: n (subsequence length); Hidden layer: 1 layer, 128 nodes, GELU activation function, Dropout=0.1; Output layer: 1 node (predicts the amount of irrigation water / fertilizer to be applied the next day); The loss function is mean squared error (MSE), the optimizer is Adam, the initial learning rate is 0.3, and an early stopping strategy is used (termination occurs when the loss on the validation set does not decrease after 5 consecutive rounds).
[0083] 5. Prediction Results It provides accurate forecast results to assist in decision-making regarding irrigation behavior during the wheat grain-filling stage, thereby achieving water-saving irrigation and increased yield.
[0084] In some embodiments, 1. Data acquisition configuration includes: (1) Meteorological and soil data: Soil moisture sensors were deployed in a dry field (1 sensor per 5 mu) to collect daily maximum / minimum temperature and daily precipitation hourly based on local meteorological data. Soil moisture data was collected as soil volumetric water content (10cm soil layer). The soil moisture sensor sampling frequency was twice a day (8:00 and 14:00).
[0085] (2) Growth stage data: Starting from the 8th day after wheat flowering, the length of grains in the middle of the wheat ear was measured daily and the length coefficient was calculated. When the length ≥ 0.75, the starting date of the grain filling period was marked.
[0086] (3) Agricultural records: Daily irrigation volume (ml) is automatically recorded through IoT devices.
[0087] 2. Preprocessing and Feature Engineering (1) Missing value handling: For missing meteorological data, interpolation between adjacent stations is used.
[0088] (2) Feature engineering: Add lag features (average temperature of the previous 3 days, cumulative precipitation of the previous 7 days) and grouting process features (days_since_filling_start).
[0089] (3) Data set division: divided according to the growth season: 2015-2021 is the training set, 2022 is the validation set, and 2023-2024 is the test set.
[0090] 3. Multi-period feature extraction (1) Fourier transform parameters: input sequence length T=90 (the longest number of days in the grouting period), dimension C=10 (including meteorological, soil and derivative features), extract the first k=2 main periods.
[0091] (1) Cycle conversion results: the dominant cycle p1 = 3 days (weight w1 = 0.71, corresponding to short-term drought fluctuations), and the secondary cycle p2 = 7 days (weight w2 = 0.29, corresponding to weekly phased water replenishment).
[0092] 4. Multi-level sparse sampling MLP model modeling (1) Hierarchical structure: Two feature extraction layers are designed with k=2: The first feature extraction layer has a period of p1=3, a kernel size of 2×⌊3 / 2⌋+1=7, and is downsampled into 3 subsequences with a length of n=30 for each sequence.
[0093] The second feature extraction layer has a period of p2=7, a kernel size of 2×⌊7 / 2⌋+1=7, and is downsampled into 7 subsequences with a length of n=12 for each sequence.
[0094] (2) Multi-layer sparse sampling MLP model structure: Number of nodes in the input layer: n (length of the subsequence) Hidden layer: 1 layer, 64 nodes, GELU activation function, Dropout=0.1 Output layer: 3 nodes (predicts daily irrigation volume for the next three days) The loss function is the mean absolute error (MAE), the optimizer is Adam, the initial learning rate is 0.5, and an early stopping strategy is used (termination occurs when the loss on the validation set does not decrease after 5 consecutive rounds).
[0095] 5. Prediction Results It provides accurate forecast results, assists in decision-making regarding wheat irrigation in drought-stricken areas, and helps users store water in advance to prevent drought.
[0096] As can be seen from the above embodiments, compared with the prior art, this application addresses the problems that the traditional watering and fertilization amounts during the grouting period in the prior art still mostly rely on traditional planting experience, failing to achieve truly accurate watering and fertilization during the grouting period, and that traditional models have high complexity in predicting watering and fertilization amounts, resulting in low efficiency due to large computational resource consumption. This application has, but is not limited to, the following beneficial effects: This application can adapt to the needs of multiple scenarios and achieve a win-win solution of cost reduction, efficiency improvement and yield increase. It can customize model parameters and prediction strategies for the cycle characteristics of different scenarios such as saline-alkali fields and arid fields. It can provide accurate prediction of the amount of slightly saline water irrigation for saline-alkali fields and plan water replenishment schemes in advance for arid fields. Moreover, the irrigation and fertilization models are trained independently and output collaboratively, which not only ensures the relevance of the prediction, but also realizes the synchronous decision-making of water and fertilizer at the same time point, ultimately improving the water and fertilizer utilization rate, reducing fertilizer volatilization pollution, and helping to achieve the unity of economic and ecological benefits.
[0097] Please see Figure 3A wheat grain-filling stage irrigation and fertilization prediction device based on multi-cycle multi-layer sparse sampling is provided to meet one of the purposes of this application, including a dataset acquisition module 1100, a time cycle length determination module 1200, a convolution aggregation module 1300, a subsequence partitioning module 1400, and a model prediction module 1500. The dataset acquisition module 1100 is configured to acquire a first sample dataset and a second sample dataset of a target wheat planting area during the grain-filling stage. The first sample dataset includes multiple first training samples and their corresponding first sample labels, and the second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling stage of a single wheat planting area. The second training samples represent second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling stage of a single wheat planting area. The time period length determination module 1200 is configured to perform Fourier transforms on the first and second time-series data respectively, converting them into frequency domain data, and calculating the time period length and period weight of the first and second training samples based on the frequency domain data. The convolution aggregation module 1300 is configured to determine the first training sample and the second training sample based on the number of time period lengths. The first training sample and the second training sample correspond to the number of feature extraction layers in the multi-layer sparse sampling MLP model. Each feature extraction layer calculates the convolution kernel size according to its corresponding time period length, and combines the period weights to perform one-dimensional convolution aggregation operations on the first time series data and the second time series data respectively. The subsequence partitioning module 1400 is configured to downsample the aggregated first time series data and the second time series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample respectively. The model prediction module 1500 is configured to input the first subsequences and the second subsequences into the preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample. Based on the watering amount prediction model and the fertilizer amount prediction model, the watering amount and fertilizer amount corresponding to each time node are predicted respectively to complete the wheat grain-filling period watering and fertilization prediction based on multi-period multi-layer sparse sampling.
[0098] Based on any embodiment of this application, please refer to Figure 4 Another embodiment of this application also provides an electronic device, which can be implemented by a computer device, such as... Figure 4The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database stores control information sequences. When the processor executes the computer-readable instructions, it enables the processor to implement a method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling. The processor provides computational and control capabilities, supporting the operation of the entire computer device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to execute the wheat irrigation and fertilization prediction method based on multi-period, multi-layer sparse sampling described in this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0099] In this embodiment, the processor is used to execute... Figure 3 The memory stores the specific functions of each module, and stores the program code and various data required to execute the above modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules in the wheat grain-filling stage irrigation and fertilization prediction device based on multi-period multi-layer sparse sampling of this application. The server can call the server's program code and data to execute the functions of all modules.
[0100] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period multi-layer sparse sampling as described in any embodiment of this application.
[0101] This application also provides a computer program product, including a computer program / instruction that, when executed by one or more processors, implements the steps of the wheat grain-filling stage irrigation and fertilization prediction method based on multi-period multi-layer sparse sampling as described in any embodiment of this application.
[0102] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0103] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for predicting irrigation and fertilization during the grain-filling stage of wheat based on multi-period, multi-layer sparse sampling, characterized in that, include: A first sample dataset and a second sample dataset are obtained for the target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels. The second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent the first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling period of a single wheat planting area. The second training samples represent the second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling period of a single wheat planting area. Fourier transforms are performed on the first time-series data and the second time-series data respectively, converting the first time-series data and the second time-series data into frequency domain data respectively. Based on the frequency domain data, the time period length and period weight of the first training sample and the second training sample are calculated respectively. The number of feature extraction layers in the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample is determined according to the number of time period lengths. The kernel size of each feature extraction layer is calculated according to its corresponding time period length, and combined with the period weights, one-dimensional convolution aggregation operations are performed on the first time series data and the second time series data respectively. For the aggregated first time series data and second time series data, downsampling is performed according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample. The first subsequence and the second subsequence are respectively input into a preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample. Based on the watering amount prediction model and the fertilizer amount prediction model, the watering amount and fertilizer amount corresponding to each time node are predicted respectively, so as to complete the prediction of wheat watering and fertilization during the grain filling period based on multi-cycle multi-layer sparse sampling.
2. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to claim 1, characterized in that, The meteorological data includes daily maximum temperature, daily minimum temperature, daily average temperature, daily cumulative precipitation, daily cumulative sunshine hours, daily average relative humidity, daily average wind speed, and daily reference evapotranspiration; the soil moisture data includes soil volumetric water content and soil water potential; the soil nutrient data includes soil pH value and ammonium nitrogen content.
3. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to claim 1, characterized in that, The steps of performing Fourier transforms on the first time-series data and the second time-series data respectively, converting the first time-series data and the second time-series data into frequency domain data, and calculating the time period length and period weight of the first training sample and the second training sample respectively based on the frequency domain data include: Fourier transforms are performed on the first time series data and the second time series data respectively to determine the amplitude corresponding to each data dimension in the first time series data and the second time series data; Calculate the average amplitude of different data dimensions at the same frequency in the first time series data and the second time series data to determine the average amplitude of each frequency in multiple data dimensions. Select multiple frequencies with the most prominent average amplitude for the first training sample and the second training sample respectively. Invert the selected frequencies and round up to obtain the time period length of the first training sample and the second training sample respectively. The average amplitude corresponding to the selected frequency of the first training sample and the second training sample is normalized to obtain the period weights of the first training sample and the second training sample, respectively.
4. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to claim 1, characterized in that, The number of feature extraction layers in the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample is determined according to the number of time period lengths, and the step of calculating the convolution kernel size of each feature extraction layer according to its corresponding time period length includes: Match the corresponding time period length for each feature extraction layer; For each feature extraction layer of the multi-layer sparse sampling MLP model, half of the time period length corresponding to the feature extraction layer is rounded down to determine the intermediate calculation result. The first sum between twice the intermediate calculation result and the value one is calculated to determine the convolution kernel size.
5. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to claim 1, characterized in that, The steps of downsampling the aggregated first and second time-series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample include: The first time period length corresponding to the first time series data and the second time period length corresponding to the second time series data are obtained respectively. For the aggregated first time series data, a downsampling operation is performed according to the first time period length. Starting from the first data point of the first time series data, a data point is selected every first time period length to divide the first time series data into multiple first subsequences. For the aggregated second time series data, a downsampling operation is performed according to the second time period length. Starting from the first data point of the second time series data, a data point is selected every second time period length to divide the second time series data into multiple second subsequences.
6. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to claim 1, characterized in that, The steps for training watering and fertilizer application prediction models include: Configure a preset multilayer sparse sampling MLP model, wherein the number of input layer nodes of the multilayer sparse sampling MLP model is consistent with the subsequence length, the hidden layer adopts the GELU activation function and the Dropout parameter is set to 0.1, the initial learning rate is 0.3 to 0.5, the loss function is mean squared error, and an early stopping convergence judgment strategy is set to terminate if the accuracy does not decrease for 5 consecutive epochs. Multiple sets of first subsequences are input into the multi-layer sparse sampling MLP model for training until the convergence judgment condition is met, and the watering volume prediction model corresponding to the first training sample is obtained, wherein the number of output layer nodes of the watering volume prediction model matches the number of watering volume prediction steps. Multiple sets of second subsequences are input into the multilayer sparse sampling MLP model for training until the convergence criterion is met, thereby obtaining the fertilizer application prediction model corresponding to the second training sample, wherein the number of output layer nodes of the fertilizer application prediction model matches the number of fertilizer application prediction steps.
7. The method for predicting wheat irrigation and fertilization during the grain-filling stage based on multi-period, multi-layer sparse sampling according to any one of claims 1 to 6, characterized in that, Based on the irrigation amount prediction model and the fertilizer application amount prediction model, the corresponding irrigation amount and fertilizer application amount at each time node are predicted respectively to complete the steps of predicting irrigation and fertilization during the wheat grain-filling period based on multi-period, multi-layer, sparse sampling, including: Obtain meteorological data, soil moisture data, and soil nutrient data corresponding to the current time point; The meteorological data and soil moisture data corresponding to the current time node are input into the pre-trained irrigation volume prediction model to determine the predicted irrigation volume value corresponding to the target time node. The soil nutrient data corresponding to the current time node is input into the pre-trained fertilizer application prediction model to determine the predicted fertilizer application value corresponding to the target time node. The accuracy of the predicted watering and fertilizer amounts at the target time point is jointly evaluated based on the mean absolute error and the mean square error. The joint prediction results where the mean absolute error and the mean square error meet the preset threshold are used as the decision reference for watering and fertilization behavior at the target time point, so as to complete the synchronous prediction of watering and fertilizer amounts at the same time point during the wheat grain filling period.
8. A wheat irrigation and fertilization prediction device based on multi-period, multi-layer sparse sampling, characterized in that, include: The dataset acquisition module is configured to acquire a first sample dataset and a second sample dataset of a target wheat planting area during the grain-filling period. The first sample dataset includes multiple first training samples and their corresponding first sample labels, and the second sample dataset includes multiple second training samples and their corresponding second sample labels. The first training samples represent first time-series data constructed from meteorological data and soil moisture data corresponding to each time node during the grain-filling period of a single wheat planting area, and the second training samples represent second time-series data constructed from soil nutrient data corresponding to each time node during the grain-filling period of a single wheat planting area. The time period length determination module is configured to perform Fourier transform on the first time series data and the second time series data respectively, convert the first time series data and the second time series data into frequency domain data respectively, and calculate the time period length and period weight of the first training sample and the second training sample respectively based on the frequency domain data. The convolution aggregation module is configured to determine the number of feature extraction layers of the multi-layer sparse sampling MLP model corresponding to the first training sample and the second training sample according to the number of time period lengths. Each feature extraction layer calculates the convolution kernel size according to its corresponding time period length, and performs one-dimensional convolution aggregation operations on the first time series data and the second time series data respectively in combination with the period weights. The subsequence partitioning module is configured to downsample the aggregated first time series data and second time series data according to their corresponding time period lengths to obtain multiple sets of first subsequences corresponding to the first training sample and multiple sets of second subsequences corresponding to the second training sample. The model prediction module is configured to input the first subsequence and the second subsequence into a preset multi-layer sparse sampling MLP model for training until convergence is achieved, so as to determine the watering amount prediction model corresponding to the first training sample and the fertilizer amount prediction model corresponding to the second training sample; based on the watering amount prediction model and the fertilizer amount prediction model, the watering amount and fertilizer amount corresponding to each time node are predicted respectively, so as to complete the prediction of wheat watering and fertilization during the grain filling period based on multi-period multi-layer sparse sampling.
9. An electronic device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 7, which, when invoked by a computer, executes the steps included in the corresponding method.
Citation Information
Patent Citations
Optimization system for growing plants in hothouses
SU1371569A1
Field monitoring and data collection systems and methods for a precision agriculture system
US20220346303A1