Rape phenotype inversion model generation method and device
By combining drones with manual sampling to acquire data, the main influencing factors of rapeseed phenotype were identified. Sample stratification and sampling were performed to optimize the rapeseed phenotype inversion model, which solved the problem of insufficient representativeness of the training set and improved the model's generalization ability and inversion accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- OIL CROPS RES INST CHINESE ACAD OF AGRI SCI
- Filing Date
- 2025-11-27
- Publication Date
- 2026-05-01
AI Technical Summary
The training set of existing rapeseed phenotypic inversion models is not representative enough, resulting in weak generalization ability and limited inversion accuracy.
By combining drones with manual sampling, vegetation index data and ground-measured phenotypic data of rapeseed growing areas were obtained, the main influencing factors of phenotypic characteristics were identified, and sample stratification and sampling were carried out based on these factors to construct training and testing sample sets and optimize the initial model.
This improved the representativeness and generalization ability of the model's training samples, ensuring the model's accuracy and reliability, and providing strong support for rapeseed growth assessment and field management.
Smart Images

Figure CN121960099A_ABST
Abstract
Description
Method and apparatus for generating rapeseed phenotypic inversion model Technical Field
[0001] This application relates to the field of model training technology, and in particular to a method and apparatus for generating rapeseed phenotypic inversion models. Background Technology
[0002] Rapeseed is an important oilseed crop in my country and a major source of domestically produced edible oil. Accurate and rapid acquisition of phenotypic information such as leaf area index, aboveground biomass, and chlorophyll content is crucial for efficiently assessing rapeseed growth, predicting yield, and guiding field management, which is of great significance for improving rapeseed yield and ensuring oilseed supply security. In recent years, with the popularization of UAV remote sensing technology, using UAVs equipped with multispectral sensors to quickly acquire field canopy spectral information, and then constructing crop phenotypic inversion models through machine learning methods to rapidly retrieve phenotypic parameters, has become a mainstream technical approach in smart agriculture research and application.
[0003] Current model training mainly uses simple random sampling when dividing the training and test sets. However, the training set obtained by this simple random sampling method is not representative enough, resulting in weak model generalization ability and limited inversion accuracy. Summary of the Invention
[0004] The main purpose of this application is to provide a method and apparatus for generating rapeseed phenotypic inversion models, which aims to solve the technical problem that the training set of current rapeseed phenotypic inversion models is not representative enough, resulting in weak model generalization ability and limited inversion accuracy.
[0005] To achieve the above objectives, this application proposes a method for generating a rapeseed phenotypic inversion model. The method includes: collecting rapeseed data in a predetermined area where rapeseed grows via drones and manual sampling over a predetermined time period, obtaining vegetation index data collected by the drones and measured ground phenotypic data collected manually; analyzing the measured ground phenotypic data to obtain the main influencing factors of the phenotype; matching and associating the vegetation index data with the corresponding measured ground phenotypic data to obtain an initial sample set; stratifying and sampling the initial sample set based on the main influencing factors of the phenotype to obtain a training sample set and a test sample set; training an initial machine learning model using the training sample set to obtain an initial rapeseed phenotypic inversion model; validating the initial rapeseed phenotypic inversion model using the test sample set to obtain a validation result; and optimizing the initial rapeseed phenotypic inversion model based on the validation result to obtain a target rapeseed phenotypic inversion model.
[0006] In one embodiment, the step of analyzing the ground-measured phenotypic data to obtain the main influencing factors of the phenotype includes: performing statistical description on the ground-measured phenotypic data to obtain the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data; removing outliers from the ground-measured phenotypic data based on the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data to obtain the removed ground-measured phenotypic data; and performing analysis of variance on the removed ground-measured phenotypic data to obtain the main influencing factors of the phenotype.
[0007] In one embodiment, the step of performing variance analysis on the removed ground-measured phenotypic data to obtain the phenotypic main influencing factors includes: grouping the removed ground-measured phenotypic data according to influencing factors based on the prior knowledge of rapeseed in the preset area to obtain multiple groups of data; performing one-way variance analysis on each group of data to obtain the influence factor value of each influencing factor; and when the influence factor value is less than a preset threshold, using the corresponding influence factor as the phenotypic main influencing factor.
[0008] In one embodiment, the step of stratifying and sampling the initial sample set based on the phenotypic main influencing factor to obtain a training sample set and a test sample set includes: classifying the phenotypic main influencing factor according to its influence on the phenotypic phenotype; when the type of the phenotypic main influencing factor is the first phenotypic main influencing factor, sorting the sample data in the initial sample set according to the phenotypic numerical value to obtain a sorted sample set; dividing the sorted sample set into a preset number of levels according to the principle of equal sample size, and setting stratification labels for the sample data in each level; sampling the sorted sample set according to the stratification labels using a proportional random sampling method to obtain a training sample set, and using the sample data in the sorted sample set after sampling as the test sample set.
[0009] In one embodiment, after the step of classifying the phenotypic main influencing factors according to their impact on the phenotype, the method further includes: when the type of the phenotypic main influencing factor is a second phenotypic main influencing factor, classifying the sample data in the initial sample set according to the number of variables in the phenotypic main influencing factor to obtain multiple types of sample data, wherein the impact of the first phenotypic main influencing factor on the phenotype can be quantified, while the impact of the second phenotypic main influencing factor on the phenotype cannot be quantified; setting classification labels for each type of sample data; sampling the multiple types of sample data according to the classification labels using a proportional sampling method to obtain a training sample set, and using the sample data from the sampled multiple types of sample data as a test sample set.
[0010] In one embodiment, the step of training an initial machine learning model based on the training sample set to obtain an initial rapeseed phenotypic inversion model includes: obtaining a preset machine learning algorithm; modeling using the preset machine learning algorithm to obtain an initial machine learning model; and training the initial machine learning model using vegetation indices in the training sample set as input features and ground-measured phenotypic values in the training sample set as target variables to obtain the initial rapeseed phenotypic inversion model.
[0011] In one embodiment, the step of obtaining vegetation index data collected by a drone includes: collecting rapeseed data in a preset area where rapeseed grows by using a drone equipped with a multispectral sensor for a preset time period to obtain canopy multispectral image data of the preset area; preprocessing the canopy multispectral image data to obtain orthophoto data; extracting the spectral reflectance of each sampling point or pixel in multiple bands based on the orthophoto data; and calculating the vegetation index based on the spectral reflectance to obtain vegetation index data.
[0012] In one embodiment, the step of optimizing the initial rapeseed phenotypic inversion model based on the verification result to obtain the target rapeseed phenotypic inversion model includes: when the verification result is that the accuracy evaluation result is less than a preset accuracy threshold, analyzing the reasons why the accuracy evaluation result is less than the preset accuracy threshold, and adjusting the stratification or sampling strategy according to the analysis results; returning to the step of performing sample stratification and sampling on the initial sample set based on the phenotypic main influencing factors to obtain a training sample set and a test sample set according to the adjusted strategy, and obtaining an updated training sample set and an updated test sample set; optimizing and training the initial rapeseed phenotypic inversion model based on the updated training sample set and the updated test sample set until the accuracy evaluation result is greater than or equal to the preset accuracy threshold, thereby generating the target rapeseed phenotypic inversion model.
[0013] In one embodiment, the method further includes: applying the target rapeseed phenotypic inversion model to UAV remote sensing imagery, performing pixel-level calculations using the target rapeseed phenotypic inversion model to obtain a spatial distribution map of rapeseed phenotypic parameters within the study area; and managing the rapeseed within the study area using the spatial distribution map.
[0014] Furthermore, to achieve the above objectives, this application also proposes a rapeseed phenotypic inversion model generation device, which includes: a data acquisition module, used to collect rapeseed data in a preset area where rapeseed grows by means of both drone and manual sampling within a preset time period, to obtain vegetation index data collected by drone and measured ground phenotypic data collected manually; an analysis module, used to analyze the measured ground phenotypic data to obtain the main influencing factors of the phenotypic; and an association module, used to match the vegetation index data with the corresponding measured ground phenotypic data. The system comprises the following modules: an initial sample set is obtained through association; a stratification and sampling module is used to stratify and sample the initial sample set based on the main influencing factors of the phenotype, thereby obtaining a training sample set and a test sample set; a training module is used to train the initial machine learning model based on the training sample set, thereby obtaining an initial rapeseed phenotypic inversion model; a validation module is used to validate the initial rapeseed phenotypic inversion model using the test sample set, thereby obtaining a validation result; and an optimization module is used to optimize the initial rapeseed phenotypic inversion model based on the validation result, thereby obtaining a target rapeseed phenotypic inversion model.
[0015] In addition, to achieve the above objectives, this application also proposes a rapeseed phenotypic inversion model generation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the rapeseed phenotypic inversion model generation method as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the rapeseed phenotypic inversion model generation method described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the rapeseed phenotypic inversion model generation method described above.
[0018] The proposed technical solutions, including one or more, first utilize a combination of drones and manual sampling to comprehensively acquire vegetation index data and ground-measured phenotypic data of rapeseed growing areas, ensuring data diversity and accuracy. Subsequently, through in-depth analysis of the ground-measured phenotypic data, key factors influencing rapeseed phenotypes, namely the main phenotypic influencing factors, are identified, providing a scientific basis for subsequent sample stratification and sampling. In the sample processing stage, this application innovatively stratifies and samples the initial sample set based on the main phenotypic influencing factors. This strategy significantly improves the representativeness of the training samples, thereby enhancing the model's generalization ability. The initial machine learning model is trained using the training sample set to obtain an initial rapeseed phenotypic inversion model, which is then validated using a test sample set, ensuring the model's accuracy and reliability. Finally, the model is optimized based on the validation results to obtain a target rapeseed phenotypic inversion model. This model can more accurately invert rapeseed phenotypic parameters, providing strong support for rapeseed growth assessment, yield prediction, and field management. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 is a flowchart illustrating the rapeseed phenotypic inversion model generation method according to Embodiment 1 of this application; Figure 2 is a flowchart illustrating the rapeseed phenotypic inversion model generation method according to Embodiment 2 of this application; Figure 3 is a flowchart illustrating the rapeseed phenotypic inversion model generation method according to Embodiment 3 of this application; Figure 4 is a simplified flowchart illustrating the rapeseed phenotypic inversion model generation method according to Embodiment 1 of this application; Figure 5 is a schematic diagram illustrating the module structure of the rapeseed phenotypic inversion model generation device according to an embodiment of this application; Figure 6 is a schematic diagram illustrating the hardware operating environment of the rapeseed phenotypic inversion model generation method according to an embodiment of this application.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] The main solution of this application embodiment is as follows: In a preset area where rapeseed grows, rapeseed data is collected in the preset area through drones and manual sampling within a preset time period, obtaining vegetation index data collected by drones and ground-measured phenotypic data collected manually; the ground-measured phenotypic data is analyzed to obtain the main influencing factors of the phenotype; the vegetation index data is matched and associated with the corresponding ground-measured phenotypic data to obtain an initial sample set; based on the main influencing factors of the phenotype, the initial sample set is stratified and sampled to obtain a training sample set and a test sample set; an initial machine learning model is trained based on the training sample set to obtain an initial rapeseed phenotypic inversion model; the initial rapeseed phenotypic inversion model is verified through the test sample set to obtain a verification result; the initial rapeseed phenotypic inversion model is optimized based on the verification result to obtain a target rapeseed phenotypic inversion model.
[0026] Because current technologies treat the construction of training sets as a purely statistical process independent of actual field conditions and phenotypic distribution patterns, they fail to integrate prior knowledge from fields such as crop cultivation into the front-end of machine learning modeling. Rapeseed field populations, influenced by factors such as variety, planting density, and soil fertility, typically exhibit significant spatial heterogeneity and imbalance in phenotypic parameter distribution, meaning there are distinct tiers of "good, medium, and poor growth." Simple random sampling ignores this inherent hierarchical structure, potentially leading to training samples that cannot evenly represent all characteristics of the overall field population. For example, it might miss samples with extreme growth (excellent or poor) or result in an excessively high proportion of one type of sample. Models built using such biased training sets often overfit the training data while exhibiting decreased prediction accuracy for data not used in training (especially underrepresented sample types), indicating insufficient model generalization ability. Because the training samples are randomly selected and lack clear structured information, when the model inversion accuracy is not ideal, researchers find it difficult to quickly and accurately analyze which feature intervals or types of samples the model performs poorly. This "black box" error analysis process makes iterative optimization of the model lack a clear direction, relying solely on blindly increasing the amount of data or adjusting model parameters, which is inefficient.
[0027] This application provides a solution that introduces a dynamically adjustable stratified sampling mechanism based on the main influencing factor of phenotype to construct a high-quality model training set, thereby solving the problem of insufficient model inversion accuracy and stability caused by uneven distribution of field phenotypes.
[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a rapeseed phenotypic inversion model generation device. The following description uses a rapeseed phenotypic inversion model generation device as an example to illustrate this embodiment and the subsequent embodiments.
[0029] Based on this, this application provides a method for generating a rapeseed phenotypic inversion model. Referring to Figure 1, Figure 1 is a flowchart of the first embodiment of the rapeseed phenotypic inversion model generation method of this application.
[0030] In this embodiment, the rapeseed phenotypic inversion model generation method includes steps S10 to S40: Step S10: In a preset area where rapeseed grows, rapeseed data in the preset area is collected by drone and manual sampling within a preset time period, respectively obtaining vegetation index data collected by drone and ground-measured phenotypic data collected by manual sampling.
[0031] It should be noted that during the critical growth period of rapeseed, data can be collected simultaneously through drones and manual sampling. The preset area can be the experimental or research area for rapeseed planting, and the preset time period can be the same time period, such as the same moment or the same day.
[0032] Drones can fly over a pre-defined area to acquire image data of the entire area. By preprocessing the image data, vegetation index data can be obtained.
[0033] In one feasible implementation, the steps for obtaining vegetation index data collected by a drone include: collecting rapeseed data in a preset area where rapeseed grows using a drone equipped with a multispectral sensor over a preset time period to obtain canopy multispectral image data of the preset area; preprocessing the canopy multispectral image data to obtain orthophoto data; extracting the spectral reflectance of each sampling point or pixel in multiple bands based on the orthophoto data; and calculating the vegetation index based on the spectral reflectance to obtain vegetation index data.
[0034] It should be noted that the drone is equipped with a multispectral sensor, enabling it to collect canopy multispectral image data of rapeseed in a predetermined area within a preset time period. Preprocessing of the canopy multispectral image data can eliminate interference factors such as distortion and noise. Preprocessing includes band registration, radiometric calibration, image stitching, orthorectification, and cropping. Band registration involves selecting a reference band, for example, using the green band of the drone's multispectral sensor as the reference band, and registering other bands with the reference band. The registration algorithm can employ automatic registration based on feature points, extracting stable features such as corners and edges in the image, calculating the geometric offset between bands, and then correcting and optimizing based on the geometric offset. Radiometric calibration controls the standard deviation of reflectance of the same uniform ground object within a specified threshold. Image stitching can be performed using a chosen stitching algorithm, such as a motion recovery structure based on bundle adjustment, which calculates camera pose through multi-view geometry, generates dense point clouds and digital surface models, and then performs image stitching.
[0035] After a series of preprocessing steps, orthophoto data is obtained. Based on this data, the spectral reflectance values of each sampling point or pixel in multiple bands, such as green, red, near-infrared, and red-edge bands, can be extracted. These spectral reflectance values can then be used to calculate vegetation indices for constructing phenotypic inversion models, such as the red-edge index (CIrededge), green index (CIgreen), and normalized difference vegetation index (NDVI). For example, the normalized difference vegetation index (NDVI) = (ρnir... ρred) / (ρnir+ρred), the red edge index CIrededge=ρnir / ρrededge 1. Green band index CIgreen = ρnir / ρgreen 1, where ρnir is the spectral reflectance value in the near-infrared band, ρred is the spectral reflectance value in the red band, ρrededge is the spectral reflectance value in the red edge band, and ρgreen is the spectral reflectance value in the green band.
[0036] Vegetation index data can quantitatively describe the growth status and phenotypic characteristics of rapeseed, such as chlorophyll content, providing important input for subsequent model training.
[0037] Within a preset time period, the ground-based phenotypic data of rapeseed in a preset area are accurately measured through manual sampling. These phenotypic parameters include aboveground biomass, leaf area index, and chlorophyll content.
[0038] Step S20: Analyze the measured phenotypic data on the ground to obtain the main influencing factors of the phenotypic data.
[0039] After obtaining ground-based phenotypic data, these data need to be analyzed in depth to identify the key factors affecting rapeseed phenotypes, i.e., the factors that have the most significant impact on phenotypic values, which are designated as the main phenotypic influencing factors. These main phenotypic influencing factors may include various factors such as variety, planting density, soil fertility, and climatic conditions. Through statistical analysis, machine learning, and other methods, the degree and direction of these factors' influence on rapeseed phenotypes can be determined, thereby screening out the main phenotypic influencing factors.
[0040] Step S30: Match and associate the vegetation index data with the corresponding ground measured phenotypic data to obtain an initial sample set.
[0041] After obtaining vegetation index data and ground-measured phenotypic data, these two types of data need to be matched and correlated to construct an initial sample set. During matching and correlation, it is essential to ensure that the vegetation index data and ground-measured phenotypic data correspond to the same sampling point or the same area to guarantee data accuracy and consistency. Through matching and correlation, an initial sample set containing vegetation index data and ground-measured phenotypic data can be obtained, providing a foundation for subsequent sample stratification and sampling.
[0042] In one feasible implementation, step S30 may include steps A11-A12: Step A11: Extracting phenotypic parameter values for the corresponding sampling points based on the measured ground phenotypic data; it is understood that the measured ground phenotypic data contains measured values of multiple phenotypic parameters of rapeseed, and extracting the phenotypic parameter values corresponding to each sampling point from these data, such as specific values for aboveground biomass, leaf area index, chlorophyll content, etc. These parameter values can intuitively reflect the growth status and phenotypic characteristics of rapeseed at the sampling point.
[0043] Step A12: Match and associate the phenotypic parameter values of the sampling points with the vegetation indices corresponding to the sampling points in the vegetation index data to obtain an initial sample set.
[0044] After extracting the phenotypic parameter values, it is necessary to find the corresponding vegetation index data. Since the vegetation index data collected by drones and the ground-based measured phenotypic data collected manually are measurement results of the same preset area in different dimensions, the two can be accurately matched and correlated using spatial location information, such as the coordinates of the sampling points. Integrating the matched vegetation index data and phenotypic parameter values together constitutes an initial sample set D containing N samples. This sample set contains rich information on rapeseed growth, providing a comprehensive data foundation for subsequent sample stratification and sampling, as well as model training.
[0045] Step S40: Based on the main influencing factor of the phenotype, perform sample stratification and sampling on the initial sample set to obtain the training sample set and the test sample set.
[0046] After obtaining the initial sample set, it is necessary to stratify and sample the initial sample set based on the main phenotypic influencing factors. When stratifying the sample, the initial sample set can be divided into multiple levels or categories according to the type and number of main phenotypic influencing factors.
[0047] For example, if the main influencing factors of phenotype include variety and soil fertility, the initial sample set can be divided into multiple strata under different varieties and different soil fertility conditions. During sampling, proportional sampling or other sampling methods can be used to draw a certain number of samples from each stratum or category to construct training and testing sample sets.
[0048] The training sample set is used to train the initial machine learning model, while the test sample set is used to verify the model's accuracy and reliability. By stratifying and sampling the samples, the representativeness and balance of the training and test sample sets can be ensured, thereby improving the model's generalization ability and prediction accuracy.
[0049] Step S50: Train the initial machine learning model based on the training sample set to obtain the initial rapeseed phenotypic inversion model.
[0050] The initial machine learning model can be selected in advance, such as a support vector machine model, a random forest model, or a neural network model. During training, vegetation index data from the training sample set are used as input features, and the corresponding measured ground phenotypic data are used as the target output to train the selected initial machine learning model, thereby obtaining a preliminary rapeseed phenotypic inversion model.
[0051] In one feasible implementation, step S50 may include steps A21 to A23: Step A21: Obtain a preset machine learning algorithm; one or more machine learning algorithms may be selected as the preset machine learning algorithm, such as random forest algorithm, support vector machine algorithm, artificial neural network algorithm or partial least squares regression algorithm, etc.
[0052] Step A22: Model using the preset machine learning algorithm to obtain an initial machine learning model; the preset machine learning algorithm can be used as a basic modeling tool to build the initial machine learning model. The architecture of the initial machine learning model can be set according to requirements, such as including an input layer, hidden layer and output layer, etc. The connection method and weight parameters between each layer can be adjusted according to the characteristics of the algorithm and the training data.
[0053] Step A23: Use the vegetation index in the training sample set as the input feature and the ground measured phenotypic values in the training sample set as the target variable to train the initial machine learning model to obtain the initial rapeseed phenotypic inversion model.
[0054] One or more vegetation indices from the constructed training sample set can be used as input features, and the ground-measured phenotypic values from the training sample set can be used as target variables to train the selected initial machine learning model and obtain a preliminary initial rapeseed phenotypic inversion model M.
[0055] Step S60: Validate the initial rapeseed phenotypic inversion model using the test sample set to obtain the validation results.
[0056] In practice, the test sample set V reserved in the above steps can be used to verify the accuracy of the initial rapeseed phenotypic inversion model M obtained through training, and specific verification results can be obtained.
[0057] Accuracy verification involves calculating accuracy indicators such as the coefficient of determination and root mean square error between the test sample set V and the measured values, and comparing the calculated accuracy indicators with preset accuracy thresholds. The comparison result is then used as the verification result. The verification result can be either an accuracy assessment result ≥ the preset accuracy threshold or an accuracy assessment result < the preset accuracy threshold.
[0058] Step S70: Optimize the initial rapeseed phenotypic inversion model based on the verification results to obtain the target rapeseed phenotypic inversion model.
[0059] Different operations can be performed based on the specific verification results. For example, if the verification result is that the accuracy assessment result is less than the preset accuracy threshold, the current initial rapeseed phenotypic inversion model can be used as the final target rapeseed phenotypic inversion model and applied to large-scale rapeseed phenotypic parameter inversion mapping. If the verification result is that the accuracy assessment result is greater than or equal to the preset accuracy threshold, the initial rapeseed phenotypic inversion model needs to be optimized to obtain a final target rapeseed phenotypic inversion model with an accuracy assessment result less than the preset accuracy threshold.
[0060] In one feasible implementation, step S70 may include steps A31 to A33: Step A31: When the verification result is that the accuracy evaluation result is less than the preset accuracy threshold, the reasons for the accuracy evaluation result being less than the preset accuracy threshold are analyzed, and the stratification or sampling strategy is adjusted according to the analysis results; if the verification result is that the accuracy evaluation result is less than the preset accuracy threshold, it indicates that the model accuracy does not meet the requirements, so it is necessary to re-extract training samples. At this time, the reasons for the accuracy not meeting the standard can be analyzed, and the stratification or sampling strategy can be adjusted according to the specific reasons.
[0061] For example, substandard accuracy might be due to outlier data or noise in the initial sample set, affecting the model's training performance. In this case, data cleaning can be performed on the initial sample set to remove outliers and noise, or a more robust machine learning algorithm can be used to improve the model's resistance to interference. Furthermore, if it is found that the interactions between certain phenotypic main influencing factors have not been fully considered, leading to a decrease in prediction accuracy in complex environments, more complex feature engineering methods, such as feature crossing and feature combination, can be introduced to capture these interactions, thereby improving the model's predictive performance.
[0062] Step A32: Return to the step of stratifying and sampling the initial sample set based on the phenotypic main influencing factor according to the adjusted strategy to obtain the training sample set and the test sample set, and obtain the updated training sample set and the updated test sample set; sampling can be re-performed according to the adjusted strategy, for example, re-selecting the number of strata or categories, changing the sampling ratio in each stratum or category of data, and re-performing sampling to generate the updated training sample set and the updated test sample set.
[0063] Step A33: Optimize and train the initial rapeseed phenotypic inversion model based on the updated training sample set and the updated test sample set until the accuracy evaluation result is greater than or equal to the preset accuracy threshold, and generate the target rapeseed phenotypic inversion model.
[0064] In practice, the initial rapeseed phenotypic inversion model can be retrained by updating the training sample set and the test sample set until the accuracy of the trained model meets the requirements, that is, the model accuracy is less than the preset accuracy threshold, and the final target rapeseed phenotypic inversion model is obtained.
[0065] After obtaining the target rapeseed phenotypic inversion model, it can be applied to the entire region to study rapeseed phenotypic parameters. Therefore, after step S70, steps S71-S72 are also included: S71: Apply the target rapeseed phenotypic inversion model to UAV remote sensing images, and perform pixel-by-pixel calculations using the target rapeseed phenotypic inversion model to obtain a spatial distribution map of rapeseed phenotypic parameters within the study area; specifically, the target rapeseed phenotypic inversion model can be applied to UAV remote sensing images of the entire experimental area or a new area, that is, the target rapeseed phenotypic inversion model is mounted on the UAV, so that after the UAV collects remote sensing images, pixel-by-pixel calculations are performed directly using the target rapeseed phenotypic inversion model to obtain a spatial distribution map of rapeseed phenotypic parameters within the study area, i.e., phenotypic inversion mapping.
[0066] S72: The rapeseed in the study area is managed using the spatial distribution map.
[0067] In practice, spatial distribution maps can be used to intuitively understand the growth status and phenotypic differences of rapeseed in different areas of the study area, providing a basis for decision-making in precision agriculture management.
[0068] This embodiment provides a method for generating a rapeseed phenotypic inversion model. First, a combination of drone and manual sampling is used to comprehensively acquire vegetation index data and ground-measured phenotypic data of the rapeseed growing area, ensuring data diversity and accuracy. Subsequently, through in-depth analysis of the ground-measured phenotypic data, key factors influencing rapeseed phenotypes, namely the main phenotypic influencing factors, are identified, providing a scientific basis for subsequent sample stratification and sampling. In the sample processing stage, this application innovatively stratifies and samples the initial sample set based on the main phenotypic influencing factors. This strategy significantly improves the representativeness of the training samples, thereby enhancing the model's generalization ability. The initial machine learning model is trained using the training sample set to obtain an initial rapeseed phenotypic inversion model, which is then validated using a test sample set to ensure the model's accuracy and reliability. Finally, the model is optimized based on the validation results to obtain the target rapeseed phenotypic inversion model. This model can more accurately invert rapeseed phenotypic parameters, providing strong support for rapeseed growth assessment, yield prediction, and field management.
[0069] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to Figure 2. Step S20 includes steps S201 to S203: Step S201: Statistically describe the measured ground phenotypic data to obtain the maximum value of the measured ground phenotypic, the minimum value of the measured ground phenotypic, the mean value of the measured ground phenotypic, and the standard deviation of the measured ground phenotypic.
[0070] After obtaining the ground-measured phenotypic data, statistical descriptions can be performed on the ground-measured phenotypic data to calculate the sample size N, the maximum and minimum values of the ground-measured phenotypic data, the arithmetic mean, and the standard deviation, etc.
[0071] Step S202: Remove outliers from the ground measured phenotypic data based on the maximum value, minimum value, mean, and standard deviation of the ground measured phenotypic data to obtain the removed ground measured phenotypic data.
[0072] After obtaining the maximum, minimum, mean, and standard deviation of the ground-measured phenotypic data, a reasonable threshold range can be set based on these statistics to eliminate the observation error of the ground-measured phenotypic data. Data exceeding this range are identified as outliers and removed, thus obtaining the ground-measured phenotypic data after outlier removal.
[0073] Step S203: Perform variance analysis on the removed ground-measured phenotypic data to obtain the main influencing factors of the phenotypic data.
[0074] After obtaining the ground-measured phenotypic data after removing outliers, further in-depth analysis is conducted. Various analytical methods can be employed, such as analysis of variance, correlation analysis, and principal component analysis. Correlation analysis reveals the degree of correlation between different phenotypic parameters and between phenotypic parameters and environmental factors, initially identifying factors closely related to phenotypic changes. Principal component analysis reduces the dimensionality of multiple phenotypic parameters, extracting principal components that best represent the original data. These principal components often reflect the key factors influencing the phenotypic behavior. By comprehensively applying these analytical methods, the factors most significantly affecting rapeseed phenotypic values are ultimately determined—the main phenotypic influencing factors. These factors may encompass multiple aspects such as variety, planting density, soil fertility, and climatic conditions, providing crucial basis for subsequent sample stratification and sampling.
[0075] In one feasible implementation, step S203 may include steps B11 to B13: Step B11: Based on the prior knowledge of rapeseed in the preset area, the measured ground phenotypic data after removal are grouped according to the influencing factors to obtain multiple groups of data; in specific implementation, the prior knowledge of rapeseed in the preset area may be prior knowledge such as the rapeseed variety, planting density, and fertilization level planted in the preset area.
[0076] Based on prior knowledge of rapeseed, the ground-measured phenotypic data after outlier removal were grouped according to influencing factors. For example, prior knowledge of rapeseed includes variety, planting density, and fertilization level. Thus, the ground-measured phenotypic data were divided into 3 groups based on variety and 2 groups based on planting density, etc.
[0077] Step B12: Perform one-way ANOVA on each group of data to obtain the impact factor value of each influencing factor; calculate the F-statistic and the corresponding impact factor value P of each influencing factor by performing one-way ANOVA on each group of data.
[0078] Step B13: When the impact factor value is less than the preset threshold, the corresponding impact factor is taken as the phenotypic main impact factor.
[0079] The preset threshold can be set according to needs, for example, set to 0.05. When the impact factor value P is less than 0.05, the impact factor is considered to have a significant impact on the phenotypic value and can be used as the main phenotypic impact factor. The effect size can also be further calculated for significant impact factors, and the main phenotypic impact factors can be further screened based on the effect size.
[0080] This embodiment statistically describes the measured ground phenotypic data to obtain the maximum, minimum, mean, and standard deviation of the measured ground phenotypic phenotypes. Outliers are then removed from the measured ground phenotypic data based on these values, resulting in the removed ground phenotypic data. Analysis of variance is performed on the removed ground phenotypic data to obtain the main influencing factors of the phenotype. Through in-depth analysis, the key factors influencing rapeseed phenotypes, namely the main influencing factors, are identified. The determination of these main influencing factors provides a scientific basis for subsequent sample stratification and sampling, ensuring the representativeness and balance of the training sample set, thereby enhancing the model's generalization ability and predictive accuracy.
[0081] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to Figure 3, step S40 includes steps S401 to S404: Step S401: Classify the main phenotypic influencing factors according to their influence on the phenotypic.
[0082] The impact of phenotypic main influencing factors on phenotype depends on whether their impact can be quantified. Phenotypic main influencing factors can be classified according to whether their impact on phenotype can be quantified. For example, influencing factors such as planting density or fertilization level can be quantified numerically, such as 10,000 plants / acre or 20,000 plants / acre, and are therefore judged to have a quantifiable impact on phenotype. Influencing factors such as variety or planting area are difficult to quantify numerically and are often described qualitatively using terms such as variety 1 or variety 2, and are therefore judged to have an unquantifiable impact on phenotype.
[0083] Step S402: When the type of the phenotypic main influencing factor is the first phenotypic main influencing factor, sort the sample data in the initial sample set according to the size of the phenotypic values to obtain a sorted sample set.
[0084] It should be noted that the primary influencing factor of the first phenotype is a factor whose influence on the phenotype can be quantified, such as planting density. The sorted sample set is obtained by sorting all sample data in the initial sample set D according to the phenotype setting size.
[0085] Step S403: Divide the sorted sample set into a preset number of levels according to the principle of equal sample quantity, and set the hierarchical labels for the sample data of each level.
[0086] Based on the sorted sample set, the overall sample is divided into a preset number of levels, namely K levels, according to the principle of equal sample size. At the same time, each sample in each level can be assigned a level label.
[0087] Step S404: Based on the hierarchical labels, the sorted sample set is sampled according to the proportional random sampling method to obtain the training sample set, and the sample data in the sorted sample set after sampling is used as the test sample set.
[0088] In practice, each level can sample the sorted sample set using a proportional random sampling method based on stratified labels. For example, if the preset number of levels is 5, the same number of sample data is sampled from each level. The sampled data is then combined to form the training sample set, while the unsampled data serves as the test sample set. This proportional random sampling method ensures that the training and test sample sets are distributed across all levels, thereby better reflecting the characteristics of the overall sample and improving the training effect and validation accuracy of the model.
[0089] In one feasible implementation, if the influence of the main influencing factor on the phenotype cannot be quantified, then after step S401, steps C11 to C13 are further included: Step C11: When the type of the phenotype main influencing factor is the second phenotype main influencing factor, the sample data in the initial sample set are classified according to the number of variables in the phenotype main influencing factor to obtain multiple types of sample data. Among them, the influence of the first phenotype main influencing factor on the phenotype can be quantified, while the influence of the second phenotype main influencing factor on the phenotype cannot be quantified. If the influence of the main influencing factor on the phenotype is difficult to quantify, then all sample data in the initial sample set D can be classified according to the variables contained in the main influencing factor to obtain multiple types of sample data. Let the number of classifications be K, then K types of sample data can be obtained.
[0090] Step C12: Set the classification labels for each type of sample data; in practice, each sample in the K types of sample data can be assigned a classification label.
[0091] Step C13: Based on the classification labels, sample the multi-class sample data in a proportional sampling manner to obtain the training sample set, and use the sample data from the sampled multi-class sample data as the test sample set.
[0092] In practice, data can be sampled according to the classification labels in a proportional sampling manner to construct a training sample set. For example, if the main influencing factor is variety, the dataset contains K varieties such as variety 1, variety 2, ..., variety k. The dataset D is divided into K classes according to the variety name, and each class is randomly sampled in a proportional manner to construct a training set T. The samples that are not selected constitute the model test set V.
[0093] This embodiment classifies the phenotypic main influencing factors based on their impact on the phenotype. When the type of the phenotypic main influencing factor is the first phenotypic main influencing factor, the sample data in the initial sample set are sorted according to the phenotypic numerical value to obtain a sorted sample set. The sorted sample set is divided into preset numerical levels according to the principle of equal sample size, and stratification labels are set for the sample data at each level. Based on the stratification labels, the sorted sample set is sampled using a proportional random sampling method to obtain the training sample set, and the sample data in the sorted sample set after sampling is used as the test sample set. This classification and stratified sampling method based on phenotypic main influencing factors effectively improves the representativeness and balance of the samples. When the impact of the phenotypic main influencing factors on the phenotype is quantifiable, sorting according to the phenotypic numerical value and then dividing into equal numerical levels and proportional random sampling ensures that the training and test sample sets are reasonably distributed at each quantification level, which can more comprehensively reflect the phenotypic characteristics of rapeseed at different quantification levels and provide rich and representative data for model training. When the influence of the main phenotypic factors on the phenotypic effect cannot be quantified, proportional sampling is performed after classifying the variables by number and setting classification labels. This ensures a reasonable distribution of samples of different categories in the training and test sets, avoids model training bias caused by category differences, enhances the model's ability to identify and predict phenotypic features of different categories, and thus enhances the model's generalization ability and prediction accuracy. This lays a solid foundation for obtaining an accurate and reliable target rapeseed phenotypic inversion model in the future.
[0094] For example, to help understand the implementation flow of the rapeseed phenotypic inversion model generation method obtained by combining this embodiment with the above embodiment one, please refer to Figure 4. Figure 4 provides a simplified flowchart of the rapeseed phenotypic inversion model generation method. Specifically: UAV multispectral images and rapeseed field phenotypes are obtained respectively. The remote sensing images are processed, including band registration → radiometric calibration → image stitching → orthorectification → cropping, etc., to obtain processed orthorectified images. Vegetation indices are extracted from the orthorectified images to obtain vegetation index data. The rapeseed field phenotypes are statistically described to obtain maximum, minimum, and mean values. Simultaneously, sample observation errors are eliminated based on the maximum, minimum, and mean values, and influencing factor analysis is performed. Based on prior influencing factors such as variety, planting density, fertilization level, and planting area, variance analysis is conducted to extract the main influencing factors of the phenotype. The data is then processed by... A rapeseed phenotypic-UAV multispectral dataset is constructed using phenotypic main influencing factors and vegetation index data. The phenotypic main influencing factors are classified to determine stratification boundaries, and a training set is built. If the influence of factors is quantifiable, such as planting density or fertilization level, the phenotypic samples are sorted according to phenotypic values, and samples are drawn at equal intervals to construct training and test sets. If the influence of factors is difficult to quantify, such as variety or planting area, the phenotypic samples are divided into different strata based on the variables contained in the influencing factors, and stratified sampling is used to construct training and test sets. The model is trained using the training set, and its accuracy is evaluated and judged based on the test set. If the accuracy evaluation result is greater than or equal to a preset accuracy threshold, the trained model is directly applied to phenotypic mapping. If the accuracy evaluation result is less than the preset accuracy threshold, the sample division step is returned until the model's accuracy evaluation result is greater than or equal to the preset accuracy threshold.
[0095] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the rapeseed phenotypic inversion model generation method of this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0096] This application also provides a rapeseed phenotypic inversion model generation device. Referring to Figure 5, the rapeseed phenotypic inversion model generation device includes: a data acquisition module 10, used to collect rapeseed data in a preset area where rapeseed grows, through drone and manual sampling over a preset time period, to obtain vegetation index data collected by the drone and manually sampled ground-measured phenotypic data, respectively; an analysis module 20, used to analyze the ground-measured phenotypic data to obtain the main influencing factors of the phenotypic pattern; and an association module 30, used to match and associate the vegetation index data with the corresponding ground-measured phenotypic data. An initial sample set is obtained; a stratification and sampling module 40 is used to stratify and sample the initial sample set based on the main influencing factors of the phenotype, to obtain a training sample set and a test sample set; a training module 50 is used to train the initial machine learning model based on the training sample set, to obtain an initial rapeseed phenotype inversion model; a verification module 60 is used to verify the initial rapeseed phenotype inversion model using the test sample set, to obtain a verification result; and an optimization module 70 is used to optimize the initial rapeseed phenotype inversion model based on the verification result, to obtain a target rapeseed phenotype inversion model.
[0097] The rapeseed phenotypic inversion model generation apparatus provided in this application employs the rapeseed phenotypic inversion model generation method described in the above embodiments, which can solve the technical problem that the insufficient representativeness of the training set of current rapeseed phenotypic inversion models leads to weak model generalization ability and limited inversion accuracy. Compared with the prior art, the beneficial effects of the rapeseed phenotypic inversion model generation apparatus provided in this application are the same as those of the rapeseed phenotypic inversion model generation method provided in the above embodiments, and other technical features in the rapeseed phenotypic inversion model generation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0098] In one embodiment, the analysis module 20 is further configured to perform statistical description on the ground-measured phenotypic data to obtain the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data; remove outliers from the ground-measured phenotypic data based on the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data to obtain the removed ground-measured phenotypic data; and perform analysis of variance on the removed ground-measured phenotypic data to obtain the main influencing factors of the phenotypic data.
[0099] In one embodiment, the analysis module 20 is further configured to group the removed ground-measured phenotypic data according to influencing factors based on the prior knowledge of rapeseed in the preset area, to obtain multiple groups of data; perform one-way ANOVA on each group of data to obtain the influencing factor value of each influencing factor; and when the influencing factor value is less than a preset threshold, use the corresponding influencing factor as the phenotypic main influencing factor.
[0100] In one embodiment, the stratification and sampling module 40 is further configured to classify the phenotypic main influencing factor according to its influence on the phenotypic phenotype; when the type of the phenotypic main influencing factor is the first phenotypic main influencing factor, sort the sample data in the initial sample set according to the phenotypic numerical value to obtain a sorted sample set; divide the sorted sample set into a preset number of levels according to the principle of equal sample quantity, and set stratification labels for the sample data in each level; sample the sorted sample set according to the stratification labels using a proportional random sampling method to obtain a training sample set, and use the sample data in the sorted sample set after sampling as a test sample set.
[0101] In one embodiment, the stratification and sampling module 40 is further configured to, when the type of the phenotypic main influencing factor is the second phenotypic main influencing factor, classify the sample data in the initial sample set according to the number of variables in the phenotypic main influencing factor to obtain multiple types of sample data, wherein the influence of the first phenotypic main influencing factor on the phenotype can be quantified, while the influence of the second phenotypic main influencing factor on the phenotype cannot be quantified; set classification labels for each type of sample data; and sample the multiple types of sample data according to the classification labels using a proportional sampling method to obtain a training sample set, and use the sample data from the sampled multiple types of sample data as a test sample set.
[0102] In one embodiment, the training module 50 is further configured to acquire a preset machine learning algorithm; to perform modeling using the preset machine learning algorithm to obtain an initial machine learning model; to train the initial machine learning model using the vegetation index in the training sample set as input features and the ground measured phenotypic values in the training sample set as target variables to obtain an initial rapeseed phenotypic inversion model.
[0103] In one embodiment, the acquisition module 10 is further configured to acquire rapeseed data in a preset area where rapeseed grows by using a drone equipped with a multispectral sensor for a preset time period, thereby obtaining canopy multispectral image data of the preset area; preprocess the canopy multispectral image data to obtain orthophoto image data; extract the spectral reflectance of each sampling point or pixel in multiple bands based on the orthophoto image data; and calculate the vegetation index based on the spectral reflectance to obtain vegetation index data.
[0104] In one embodiment, the optimization module 70 is further configured to: analyze the reasons why the accuracy evaluation result is less than the preset accuracy threshold when the verification result is less than the preset accuracy threshold; adjust the stratification or sampling strategy according to the analysis results; return to the step of stratifying and sampling the initial sample set based on the phenotypic main influencing factor to obtain the training sample set and the test sample set according to the adjusted strategy; obtain the updated training sample set and the updated test sample set; optimize and train the initial rapeseed phenotypic inversion model according to the updated training sample set and the updated test sample set until the accuracy evaluation result is greater than or equal to the preset accuracy threshold, and generate the target rapeseed phenotypic inversion model.
[0105] In one embodiment, the optimization module 70 is further configured to apply the target rapeseed phenotypic inversion model to UAV remote sensing imagery, perform pixel-level calculations using the target rapeseed phenotypic inversion model to obtain a spatial distribution map of rapeseed phenotypic parameters within the study area, and manage the rapeseed within the study area using the spatial distribution map.
[0106] This application provides a rapeseed phenotypic inversion model generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the rapeseed phenotypic inversion model generation method in the above embodiment 1.
[0107] Referring to Figure 6 below, a schematic diagram of a rapeseed phenotypic inversion model generation device suitable for implementing embodiments of this application is shown. The rapeseed phenotypic inversion model generation device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The rapeseed phenotypic inversion model generation device shown in Figure 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of this application.
[0108] As shown in Figure 6, the rapeseed phenotypic inversion model generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in ROM (Read Only Memory) 1002 or the program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the rapeseed phenotypic inversion model generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the rapeseed phenotypic inversion model generation device to exchange data wirelessly or via wired communication with other devices. Although rapeseed phenotypic inversion model generation devices with various systems are shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0110] The rapeseed phenotypic inversion model generation device provided in this application, employing the rapeseed phenotypic inversion model generation method described in the above embodiments, can solve the technical problem that the insufficient representativeness of the training set of current rapeseed phenotypic inversion models leads to weak model generalization ability and limited inversion accuracy. Compared with the prior art, the beneficial effects of the rapeseed phenotypic inversion model generation device provided in this application are the same as those of the rapeseed phenotypic inversion model generation method provided in the above embodiments, and other technical features in this rapeseed phenotypic inversion model generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0111] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0113] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the rapeseed phenotypic inversion model generation method in the above embodiments.
[0114] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0115] The aforementioned computer-readable storage medium may be included in the rapeseed phenotypic inversion model generation device; or it may exist independently and not be assembled into the rapeseed phenotypic inversion model generation device.
[0116] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the rapeseed phenotypic inversion model generation device, the rapeseed phenotypic inversion model generation device performs the following actions: In a preset area where rapeseed grows, it collects rapeseed data in the preset area through drones and manual sampling over a preset time period, obtaining vegetation index data collected by drones and measured ground phenotypic data collected manually; it analyzes the measured ground phenotypic data to obtain the main phenotypic influencing factors; it matches and associates the vegetation index data with the corresponding measured ground phenotypic data to obtain an initial sample set; it performs sample stratification and sampling on the initial sample set based on the main phenotypic influencing factors to obtain a training sample set and a test sample set; it trains an initial machine learning model using the training sample set to obtain an initial rapeseed phenotypic inversion model; it validates the initial rapeseed phenotypic inversion model using the test sample set to obtain validation results; and it optimizes the initial rapeseed phenotypic inversion model based on the validation results to obtain a target rapeseed phenotypic inversion model.
[0117] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0119] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0120] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described rapeseed phenotypic inversion model generation method. This solves the technical problem that the insufficient representativeness of the training set in current rapeseed phenotypic inversion models leads to weak model generalization ability and limited inversion accuracy. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the rapeseed phenotypic inversion model generation method provided in the above embodiments, and will not be repeated here.
[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the rapeseed phenotypic inversion model generation method described above.
[0122] The computer program product provided in this application can solve the technical problem that the insufficient representativeness of the training set of the current rapeseed phenotypic inversion model leads to weak model generalization ability and limited inversion accuracy. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the rapeseed phenotypic inversion model generation method provided in the above embodiments, and will not be repeated here.
[0123] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating a rapeseed phenotypic inversion model, characterized in that, The method for generating a rapeseed phenotypic inversion model includes: collecting rapeseed data in a preset area where rapeseed grows by means of drones and manual sampling within a preset time period, obtaining vegetation index data collected by drones and measured ground phenotypic data collected manually; analyzing the measured ground phenotypic data to obtain the main influencing factors of the phenotype; matching and associating the vegetation index data with the corresponding measured ground phenotypic data to obtain an initial sample set; performing sample stratification and sampling on the initial sample set based on the main influencing factors of the phenotype to obtain a training sample set and a test sample set; training an initial machine learning model based on the training sample set to obtain an initial rapeseed phenotypic inversion model; validating the initial rapeseed phenotypic inversion model using the test sample set to obtain a validation result; and optimizing the initial rapeseed phenotypic inversion model based on the validation result to obtain a target rapeseed phenotypic inversion model.
2. The method as described in claim 1, characterized in that, The step of analyzing the ground-measured phenotypic data to obtain the main influencing factors of the phenotype includes: performing statistical description on the ground-measured phenotypic data to obtain the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data; removing outliers from the ground-measured phenotypic data based on the maximum value, minimum value, mean, and standard deviation of the ground-measured phenotypic data to obtain the removed ground-measured phenotypic data; and performing analysis of variance on the removed ground-measured phenotypic data to obtain the main influencing factors of the phenotype.
3. The method as described in claim 2, characterized in that, The step of performing variance analysis on the removed ground-measured phenotypic data to obtain the main influencing factors of the phenotypic data includes: grouping the removed ground-measured phenotypic data according to the influencing factors based on the prior knowledge of rapeseed in the preset area to obtain multiple groups of data; performing one-way variance analysis on each group of data to obtain the influencing factor value of each influencing factor; and when the influencing factor value is less than a preset threshold, the corresponding influencing factor is taken as the main influencing factor of the phenotypic data.
4. The method as described in claim 1, characterized in that, The steps of stratifying and sampling the initial sample set based on the phenotypic main influencing factors to obtain a training sample set and a test sample set include: classifying the phenotypic main influencing factors according to their impact on the phenotype; when the type of the phenotypic main influencing factor is the first phenotypic main influencing factor, sorting the sample data in the initial sample set according to the phenotypic numerical value to obtain a sorted sample set; dividing the sorted sample set into a preset number of levels according to the principle of equal sample size, and setting stratification labels for the sample data in each level; sampling the sorted sample set according to the stratification labels using a proportional random sampling method to obtain a training sample set, and using the sample data in the sorted sample set after sampling as the test sample set.
5. The method as described in claim 4, characterized in that, After the step of classifying the phenotypic main influencing factors according to their impact on the phenotype, the method further includes: when the type of the phenotypic main influencing factor is the second phenotypic main influencing factor, classifying the sample data in the initial sample set according to the number of variables in the phenotypic main influencing factor to obtain multiple types of sample data, wherein the impact of the first phenotypic main influencing factor on the phenotype can be quantified, while the impact of the second phenotypic main influencing factor on the phenotype cannot be quantified; setting classification labels for each type of sample data; sampling the multiple types of sample data according to the classification labels using a proportional sampling method to obtain a training sample set, and using the sample data from the sampled multiple types of sample data as a test sample set.
6. The method as described in claim 1, characterized in that, The step of training the initial machine learning model based on the training sample set to obtain the initial rapeseed phenotypic inversion model includes: obtaining a preset machine learning algorithm; modeling using the preset machine learning algorithm to obtain the initial machine learning model; using the vegetation index in the training sample set as the input feature and the ground measured phenotypic value in the training sample set as the target variable to train the initial machine learning model to obtain the initial rapeseed phenotypic inversion model.
7. The method as described in claim 1, characterized in that, The steps for obtaining vegetation index data collected by drones include: collecting rapeseed data in a preset area where rapeseed grows using a drone equipped with a multispectral sensor within a preset time period to obtain canopy multispectral image data of the preset area; preprocessing the canopy multispectral image data to obtain orthophoto data; extracting the spectral reflectance of each sampling point or pixel in multiple bands based on the orthophoto data; and calculating the vegetation index based on the spectral reflectance to obtain vegetation index data.
8. The method as described in claim 1, characterized in that, The step of optimizing the initial rapeseed phenotypic inversion model based on the verification results to obtain the target rapeseed phenotypic inversion model includes: when the verification result is that the accuracy evaluation result is less than a preset accuracy threshold, analyzing the reasons why the accuracy evaluation result is less than the preset accuracy threshold, and adjusting the stratification or sampling strategy according to the analysis results; returning to the step of stratifying and sampling the initial sample set based on the phenotypic main influencing factors to obtain the training sample set and the test sample set according to the adjusted strategy, and obtaining the updated training sample set and the updated test sample set; optimizing and training the initial rapeseed phenotypic inversion model according to the updated training sample set and the updated test sample set until the accuracy evaluation result is greater than or equal to the preset accuracy threshold, thereby generating the target rapeseed phenotypic inversion model.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: applying the target rapeseed phenotypic inversion model to UAV remote sensing imagery, calculating pixel locations using the target rapeseed phenotypic inversion model to obtain a spatial distribution map of rapeseed phenotypic parameters within the study area; and managing the rapeseed within the study area using the spatial distribution map.
10. A rapeseed phenotypic inversion model generation device, characterized in that, The device includes: a data acquisition module for collecting rapeseed data in a preset area where rapeseed grows, using both drones and manual sampling over a preset time period, to obtain vegetation index data collected by the drones and measured ground phenotypic data collected manually; an analysis module for analyzing the measured ground phenotypic data to obtain the main influencing factors of the phenotype; an association module for matching and associating the vegetation index data with the corresponding measured ground phenotypic data to obtain an initial sample set; a stratification and sampling module for stratifying and sampling the initial sample set based on the main influencing factors of the phenotype to obtain a training sample set and a test sample set; a training module for training an initial machine learning model using the training sample set to obtain an initial rapeseed phenotypic inversion model; a verification module for verifying the initial rapeseed phenotypic inversion model using the test sample set to obtain verification results; and an optimization module for optimizing the initial rapeseed phenotypic inversion model based on the verification results to obtain a target rapeseed phenotypic inversion model.