Crop yield inversion method and device
By combining crop growth models with machine learning methods, a machine learning model with a sequence encoder and a fully connected layer was constructed, which solved the problem of obtaining input data for regional-scale crop growth models and achieved high-precision crop yield prediction and multi-source feature fusion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-05-08
AI Technical Summary
When existing crop growth models are extended to regional scales, the spatial heterogeneity of the surface and near-surface environment increases the difficulty of obtaining model input data and leads to uncertainty in simulation results. They are also difficult to effectively integrate high-resolution data such as remote sensing images and lack interpretability and transfer learning capabilities.
By combining crop growth models with machine learning methods, a machine learning model with sequence encoders, flattening layers, and fully connected layers is constructed. Supervised training is performed using meteorological data sequences, enabling the model to learn the internal knowledge of crop growth models and possess good transfer learning capabilities, thus faithfully reflecting the crop growth process.
It achieves high-precision crop yield prediction at the regional scale, and by combining multi-source features, it improves the interpretability and transfer learning ability of the model, and provides crop yield estimation with high spatiotemporal resolution.
Smart Images

Figure CN121998170A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of artificial intelligence, and more particularly to a method and apparatus for crop yield inversion. Background Technology
[0002] In the field of crop management, accurate crop yield estimation is of great significance for optimizing agricultural production. On the one hand, crop yield estimation helps to scientifically regulate the input of resources such as water, fertilizer, and pesticides, and to reasonably predict the market price trends of agricultural products, thus providing a basis for formulating sales strategies in advance and improving planting profits. On the other hand, high-precision crop yield estimation can also effectively reduce resource waste, improve the quality of agricultural products, the efficiency of arable land use, and the overall effectiveness of agricultural production. In addition, accurate crop yield information can optimize the spatial layout of crops at the regional scale, strengthen production process management, and further unleash the productive potential of the land.
[0003] Crop growth models are mathematical models based on plant physiological and ecological mechanisms. They integrate multiple environmental factors, including meteorological, soil, crop variety characteristics, and field management practices, to dynamically simulate the entire process of crop growth from sowing, emergence, vegetative growth, reproductive development, to maturity and harvest, revealing the intrinsic mechanisms and response patterns of crop growth and development. A typical example is the WOFOST (World Food Studies) model, which quantifies key physiological processes such as photosynthesis, respiration, dry matter distribution, and water and nutrient absorption to achieve a mechanistic simulation of yield formation. However, when these mechanistic models are extended from the field or site scale to the regional scale, the increased spatial heterogeneity of the surface and near-surface environment makes it more difficult to obtain key input data such as soil properties, crop parameters, and management information. Furthermore, the regionalization of model parameters becomes challenging, leading to a significant increase in the uncertainty of the simulation results. Summary of the Invention
[0004] In view of the above, one or more embodiments of this specification provide the following technical solutions: According to a first aspect of one or more embodiments of this specification, a crop yield inversion method is proposed, the method comprising: Obtain simulated crop yield by simulating crop growth based on meteorological data sequences of a target geographical region using a crop growth model; The meteorological data sequence is used as the model input, and the simulated crop yield is used as the label to construct training samples; The machine learning model is trained in a supervised manner based on the training samples, and the trained machine learning model is determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences. The machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. The sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model. The single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0005] According to a second aspect of one or more embodiments of this specification, a crop yield inversion device is provided, the device comprising: The acquisition module acquires simulated crop yields obtained by simulating crop growth based on meteorological data sequences of the target geographical region using a crop growth model. The construction module takes the meteorological data sequence as model input and the simulated crop yield as label to construct training samples; The training module performs supervised training on the machine learning model based on the training samples, and determines the trained machine learning model as a crop yield estimation model for predicting crop yield based on meteorological data sequences. The machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. The sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model. The single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0006] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, comprising: processor; Memory used to store processor-executable instructions; The processor executes the executable instructions to implement the steps of the method as described in any of the above embodiments.
[0007] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in any of the above embodiments.
[0008] According to a fifth aspect of one or more embodiments of this specification, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any of the above embodiments.
[0009] As can be seen from the above embodiments, for the simulated crop yield obtained by simulating crop growth based on meteorological data sequences of a specific geographical area using a crop growth model, the meteorological data sequence can be used as the model input, and the simulated crop yield can be used as a label to construct training samples. Then, the machine learning model can be trained in a supervised manner based on these training samples, and the trained machine learning model can be determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences. This machine learning model may include a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. Furthermore, the sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model, and the single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0010] By adopting the above method, the machine learning model can learn the internal knowledge of the crop growth model and faithfully reflect the internal calculation process of the crop growth model. At the same time, the machine learning model also has good transfer learning ability and can be fused with other multi-source features, which facilitates the combination of crop growth model and machine learning for yield estimation tasks. Attached Figure Description
[0011] Figure 1 This is a flowchart of a crop yield inversion method provided in an exemplary embodiment.
[0012] Figure 2 This is a schematic diagram of a crop yield estimation model architecture provided in an exemplary embodiment.
[0013] Figure 3 This is a schematic diagram of another crop yield estimation model architecture provided in an exemplary embodiment.
[0014] Figure 4 This is a schematic diagram of another crop yield estimation model architecture provided in an exemplary embodiment.
[0015] Figure 5 This is a schematic diagram of the structure of a device provided in an exemplary embodiment.
[0016] Figure 6 This is a block diagram of a crop yield inversion device provided in an exemplary embodiment. Detailed Implementation
[0017] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0018] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals shall be provided for users to choose to authorize or refuse.
[0019] Crop growth models are mathematical models based on plant physiological and ecological mechanisms. They integrate multiple environmental factors, including meteorological, soil, crop variety characteristics, and field management practices, to dynamically simulate the entire process of crop growth from sowing, emergence, vegetative growth, reproductive development, to maturity and harvest, revealing the intrinsic mechanisms and response patterns of crop growth and development. A typical example is the WOFOST (World Food Studies) model, which achieves mechanistic simulation of yield formation by quantifying key physiological processes such as phenological development, photosynthesis and dry matter production, dry matter distribution, leaf area index (LAI) dynamics, and water and nutrient absorption. However, when these mechanistic models are extended from the field or site scale to the regional scale, the increased spatial heterogeneity of the surface and near-surface environment makes it more difficult to obtain key input data such as soil properties, crop parameters, and management information. Furthermore, the regionalization of model parameters is challenging, leading to a significant increase in the uncertainty of the model simulation results.
[0020] It's important to note that mechanistic models are mathematical models built upon scientific principles such as physics, biology, or chemistry. They simulate the behavior of a system by describing the causal relationships between its internal processes. Their structure and parameters are typically determined by domain knowledge, possessing clear physical interpretability. Traditionally, they do not rely on end-to-end data training but are adjusted through parameter calibration or assimilation. Therefore, they generally lack the trainability of machine learning models. Machine learning models, on the other hand, are entirely data-driven, automatically learning the mapping relationship between inputs and outputs on a large number of samples through optimization algorithms. Their core characteristic is trainability, meaning that model parameters can be continuously updated through backpropagation of the loss function to improve predictive performance. However, they often lack the expression and interpretability of the underlying mechanisms.
[0021] In practical applications, crop growth models typically rely on high spatiotemporal resolution meteorological data, soil data, and crop genetic parameters for yield estimation. Among these, meteorological data, as a core driving variable, directly impacts simulation accuracy. However, existing meteorological observations or reanalysis data generally have low spatial resolution, making it difficult to meet the needs of refined regional yield estimation. Remote sensing imagery, due to its high spatiotemporal resolution and wide coverage, provides abundant surface biophysical information such as leaf area index, vegetation cover, and phenological characteristics, and is considered an important data source for improving the input accuracy of crop models. However, traditional crop growth models such as the WOFOST model have fixed input structures and cannot directly integrate unstructured, high-dimensional dynamic data such as remote sensing imagery, limiting their application in high-resolution yield estimation.
[0022] To balance interpretability of the mechanism with strong data-driven fitting capabilities, combining crop growth models with machine learning methods can be explored. However, existing fusion methods often employ post-processing correction or black-box replacement strategies. Post-processing correction involves adjusting the prediction results based on the existing model output using certain rules or algorithms to meet specific objectives (such as population fairness or calibration) without altering the original model itself. Black-box replacement involves using a new model (usually an interpretable or fairer model) to mimic or replace the behavior of the original "black-box" model while satisfying additional constraints (such as fairness or interpretability). This new model is trained only by observing the input-output behavior of the original model and does not require access to its internal structure or parameters. Both strategies are model-agnostic intervention methods that fail to fully preserve the stages and causal logic of the crop growth process and struggle to achieve effective collaboration of multi-source heterogeneous data. Therefore, there is a general expectation for a machine learning model architecture that faithfully reflects the internal computational flow of crop growth models while possessing good transfer learning capabilities.
[0023] This specification provides one or more embodiments of a technical solution for crop yield inversion. In this solution, for simulated crop yield obtained by simulating crop growth based on meteorological data sequences of a specific geographical region using a crop growth model, the meteorological data sequence can be used as model input, and the simulated crop yield as a label to construct training samples. Then, a supervised training of a machine learning model can be performed based on these training samples, and the trained machine learning model is determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences. The machine learning model may include a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. Furthermore, the sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model, and the single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0024] By adopting the above method, the machine learning model can learn the internal knowledge of the crop growth model and faithfully reflect the internal calculation process of the crop growth model. At the same time, the machine learning model also has good transfer learning ability and can be fused with other multi-source features, which facilitates the combination of crop growth model and machine learning for yield estimation tasks.
[0025] refer to Figure 1 , Figure 1 This is a flowchart of a crop yield inversion method provided in an exemplary embodiment.
[0026] In this embodiment, the above-mentioned crop yield inversion method can be applied to any computing device, such as: a server containing an independent physical host, a server cluster consisting of multiple independent physical hosts, a virtual server or cloud server hosted by a host cluster, a desktop computer, a laptop computer, a PC (Personal Computer), a PDA (Personal Digital Assistant), a tablet computer, etc.
[0027] The above-mentioned crop yield inversion method may specifically include the following steps: Step 102: Obtain simulated crop yield by simulating crop growth based on meteorological data sequences of the target geographic area using a crop growth model.
[0028] In this embodiment, since it is expected that the constructed machine learning model can learn the internal knowledge of the crop growth model, the simulated crop yield can first be obtained by simulating crop growth based on the meteorological data sequence of the target geographical area through the crop growth model.
[0029] The target geographic region refers to the geographic area where the impact of meteorological and other environmental factors on crop yield needs to be studied. The target geographic region can be selected according to actual conditions and needs. Specifically, it can be a geographic area with similar meteorological data, or it can be a city, a country, or even the whole world. This manual does not impose any special restrictions on this.
[0030] In one possible implementation, the crop growth model described above can be the WOFOST model. The WOFOST model is a crop growth simulation model widely used in agricultural ecosystems. This model is mainly used to simulate the growth dynamics and yield formation process of annual crops (such as wheat, corn, rice, potatoes, etc.) under different climatic, soil, and management conditions.
[0031] The core features of the WOFOST model include process-based mechanistic modeling, diurnal simulation, modular structure, applicability to multiple crops, and regional scale application. Process-based mechanistic modeling refers to simulating crop physiological and ecological processes, including photosynthesis, respiration, dry matter allocation, and developmental stage transitions. Diurnal simulation uses daily meteorological data (including temperature, wind speed, air pressure, precipitation, and radiation) as the time step. Modular structure refers to the inclusion of multiple sub-modules, such as developmental stage modules, photosynthesis modules, dry matter allocation modules, and water limitation modules. Applicability to multiple crops means that by adjusting crop parameters, the growth of different crops can be simulated. Regional scale application refers to its common use in regional crop yield prediction and agricultural monitoring systems.
[0032] It's important to note that the WOFOST model is essentially a process-driven crop growth model with a daily time step. A daily time step means the model is updated daily; for example, from sowing day, day 1, day 2, and so on until harvest, a complete set of physiological and ecological process calculations is performed each day. Process-driven means the model is not based on statistical relationships, but rather on mechanistic descriptions of crop physiological, ecological, meteorological, and soil processes (such as photosynthesis, respiration, water stress, and nitrogen uptake), simulating how crops grow through physical / biological laws.
[0033] In other words, the WOFOST model calculates state variables daily throughout the crop's entire growth period. The growth period refers to the time span from emergence to maturity; for winter wheat, this typically takes 240-300 days. State variables are key indicators describing the crop's current physiological state, including: LAI (Leaf Area Index), the total leaf area per unit surface area, which affects light interception; dry matter accumulation, the total amount of organic matter produced by the crop through photosynthesis (after deducting respiration); and DVS (Development Stage), a dimensionless continuous variable used to quantify the crop's developmental progress. The model updates these state variables daily, forming a dynamic curve that changes over time.
[0034] Although the WOFOST model introduces a continuous variable DVS to smoothly describe the entire development process, the final output of the WOFOST model is a single-valued scalar. This single-valued scalar is the final crop yield obtained after crop growth simulation using the WOFOST model. In this specification, the final crop yield obtained through the WOFOST model is referred to as the simulated crop yield.
[0035] In one possible implementation, the aforementioned meteorological data may include meteorological data such as solar irradiance, maximum temperature, minimum temperature, wind speed, air pressure, and precipitation; the aforementioned meteorological data sequence refers to a meteorological data sequence that can be used as computational input for a crop growth model. Taking the WOFOST model used for daily-scale crop growth simulation of annual crops as an example, the aforementioned meteorological data sequence may include a meteorological data sequence composed of meteorological data from each day of the year, specifically including multiple meteorological data sequences such as a solar irradiance sequence composed of daily solar irradiance, a maximum temperature sequence composed of daily maximum temperatures, a minimum temperature sequence composed of daily minimum temperatures, a wind speed sequence composed of daily wind speeds, an air pressure sequence composed of daily air pressures, and a precipitation sequence composed of daily precipitation amounts.
[0036] Step 104: Use the meteorological data sequence as model input and the simulated crop yield as label to construct training samples.
[0037] In this embodiment, for the simulated crop yield obtained by simulating crop growth based on meteorological data sequences of the target geographical area using a crop growth model, training samples for supervised training of the machine learning model can be constructed based on the meteorological data sequence and the simulated crop yield.
[0038] It should be noted that, in order to improve the accuracy of crop yield predictions based on meteorological data sequences by machine learning models, the training process for machine learning models can be divided into two stages: the training stage and the fine-tuning training stage. The training samples in the training stage can use a "meteorological data sequence - simulated crop yield" pair, where the simulated crop yield is the final crop yield obtained by simulating crop growth based on the meteorological data sequence using a crop growth model. The training samples in the fine-tuning training stage can use a "meteorological data sequence - actual crop yield" pair, where the actual crop yield is the meteorological data sequence during the real-world crop growth process and the final crop yield.
[0039] Step 106: Supervised training of the machine learning model based on the training samples, and the trained machine learning model is determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences; wherein, the machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence to a global feature vector, and a fully connected layer for mapping the global feature vector to a single numerical value; the sequence unit of the sequence encoder is aligned with the crop growth stage output unit of the crop growth model; the single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0040] In this embodiment, the machine learning model can be trained in a supervised manner based on the training samples, and the trained machine learning model can be used as a crop yield estimation model for predicting crop yield based on meteorological data sequences. This allows the machine learning model to learn the internal knowledge of the crop growth model, faithfully reflecting the internal calculation process of the crop growth model; at the same time, the machine learning model also possesses good transfer learning capabilities.
[0041] The model architecture of the above machine learning model will be explained in detail below.
[0042] refer to Figure 2 , Figure 2 This is a schematic diagram of a crop yield estimation model architecture provided in an exemplary embodiment.
[0043] like Figure 2 As shown, the above machine learning model includes at least a sequence encoder, a flattening layer, and a fully connected layer.
[0044] The aforementioned sequence encoder can be used to map the input sequence into a vector representation sequence, thereby modeling the long-term dependencies between meteorological variables at different growth stages through a self-attention mechanism. The input sequence of this sequence encoder can be the aforementioned meteorological data sequence, for example, it can be a (365, 6) sequence, which is regarded as 365 time steps (step size of 1 day) of tokens, each token having 6 dimensions (solar irradiance, maximum temperature, minimum temperature, wind speed, air pressure, and precipitation).
[0045] It should be noted that the sequence units (i.e., tokens) of the above sequence encoder are aligned with the crop growth stage output units of the crop growth model, making its structure more closely resemble the stage-based response mechanism of crop growth. For example, the sequence encoder has a total of 365 sequence units, corresponding to the daily DVS updated by the crop growth model.
[0046] The hidden layer dimension of the above sequence encoder (assumed to be 365) can be the same as the sequence length, so that the output of the sequence encoder is a vector representation sequence of (365, 365).
[0047] The flattening layer described above can be used to flatten a vector representation sequence into a global feature vector. For example, this flattening layer can flatten a vector representation sequence of (365, 365) into a long vector with a dimension of 365×365=133225, which is the global feature vector.
[0048] The fully connected layer described above can be used to map global feature vectors to a single numerical value, and the single numerical value output by the fully connected layer can be used as the crop yield predicted by the machine learning model described above.
[0049] In one possible implementation, the sequence encoder described above can be a Transformer encoder or an LSTM encoder.
[0050] refer to Figure 3 , Figure 3 This is a schematic diagram of another crop yield estimation model architecture provided in an exemplary embodiment.
[0051] like Figure 3 As shown, the above machine learning model may include convolutional layers, sequence encoders, flattening layers, attention-based spatial transformers, temporal transformers, and fully connected layers.
[0052] The convolutional layer described above can be used to extract features from the input sequence to obtain a feature data sequence, thereby performing local feature extraction in the time dimension and compressing the sequence length. The input sequence of this convolutional layer can be the aforementioned meteorological data sequence, and the feature data sequence output by this convolutional layer can be used as the input sequence of the aforementioned sequence encoder.
[0053] The number of input channels for the aforementioned convolutional layer can be 6, corresponding to the six meteorological variables: solar irradiance, maximum temperature, minimum temperature, wind speed, air pressure, and precipitation. The number of output channels can also be 6, the kernel size can be 10, and the stride can be 5. In this case, assuming the length of the meteorological sequence is 365, the length of the new sequence output by the convolutional layer is [(365-10) / 5]+1=72. Therefore, the feature data sequence output by the convolutional layer is a sequence of (72, 6).
[0054] It should be noted that at this time, the sequence encoder has a total of 72 sequence units, each of which corresponds to the aggregated DVS of the crop growth model every 5 days, so that the sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model.
[0055] The hidden layer dimension of the above sequence encoder can be 72, so that the output of the sequence encoder is a vector representation sequence of (72, 72) (which can also be regarded as a 72×72 two-dimensional feature matrix).
[0056] The flattening layer described above can flatten the vector representation sequence of (72, 72) into a 72×72=5184-dimensional long vector, which can be used as a global feature vector.
[0057] The aforementioned spatial transformer, combined with an attention mechanism, is used to weight the input vector within the feature space, thereby enhancing the model's sensitivity to key meteorological factors or growth stages and improving its feature representation capability. The input vector of this spatial transformer can be the global feature vector output by the aforementioned flattening layer.
[0058] The aforementioned temporal transformer can be used to perform temporal semantic modeling on the input vector (even if the original time series has been flattened). For example, it can be treated as a pseudo-time series and lightweight self-attention can be applied to obtain a context-optimized feature vector. This allows for the mining of implicit temporal logical relationships within the features through the self-attention mechanism, thereby enhancing the simulation of the dynamic process of crop growth. The input vector of this temporal transformer can be the weighted global feature vector output by the aforementioned spatial transformer.
[0059] In one possible implementation, the spatial transformer is a Transformer-based spatial transformer; and / or, the time transformer is a Transformer-based time transformer.
[0060] refer to Figure 4 , Figure 4 This is a schematic diagram of another crop yield estimation model architecture provided in an exemplary embodiment.
[0061] like Figure 4As shown, in order to ensure the performance of the above machine learning model, the machine learning model may include convolutional layers, batch normalization layers, sequence encoders, flattening layers, attention-based spatial transformers, fully connected layers, batch normalization layers, time transformers, pooling layers, and fully connected layers.
[0062] Among them, the convolutional layer can be used to extract local temporal features and compress the time dimension of the original meteorological sequence. By sliding and aggregating multi-day meteorological information through a convolutional kernel of size 10 and stride of 5, the input sequence is compressed from about 360 days to 72 time windows, each window representing a coarse-grained growth stage meteorological feature.
[0063] Batch normalization layers can be used to normalize each feature channel of the convolutional layer output to accelerate model training convergence and improve numerical stability.
[0064] Sequence coding layers can be used to model the long-range dependencies between different time windows in compressed meteorological sequences. By using a self-attention mechanism, the impact of key stages in crop growth on the final yield can be dynamically captured, thus aligning the neural network structure with the mechanism of the WOFOST crop growth model's time process.
[0065] The flattening layer can be used to convert the 72×72 two-dimensional temporal feature matrix output by the sequence coding layer into a 5184-dimensional fixed-length feature vector, which serves as a general semantic representation (global semantic encoding) of the crop growth process.
[0066] Rearrangement layers can be used to reorganize flattened high-dimensional vectors into tensor formats (e.g., (72,72) or other structured shapes) suitable for subsequent attention modules (especially spatial transformers) to introduce spatial or pseudo-temporal interaction mechanisms, reserving interfaces for introducing spatial attention mechanisms or for future fusion of spatially structured data such as remote sensing images.
[0067] The spatial transformer combined with the attention mechanism can be used to dynamically weight the importance of different sub-features in the feature space. Specifically, it can dynamically weight the structured tensor output by the rearrangement layer in the feature space, highlight the sub-feature regions that are most critical to yield prediction through attention weights, and output a reweighted tensor of the same dimension, thereby enhancing the model's sensitivity to key meteorological factors or growth stages and improving feature representation capabilities.
[0068] Fully connected layers and batch normalization layers can be used to perform nonlinear transformations and distribution normalization on the features output by the spatial transformer, further refine higher-order abstract representations, and output a fixed-length vector with compressed dimensions.
[0069] The time transformer can be used to perform secondary temporal semantic modeling on the above fixed-length vector (high-dimensional feature vector) (even if the original time series has been flattened). For example, it can be regarded as a pseudo-time series and a lightweight self-attention can be applied. The self-attention mechanism can be used to mine the implicit temporal logical correlations inside the features, enhance the simulation of the dynamic process of crop growth, and output a feature sequence or vector optimized by context.
[0070] Pooling layers can be used to globally aggregate the features output by the time transformer (e.g., global average pooling), compressing variable-length or high-dimensional feature vectors into a low-dimensional, compact feature vector, retaining the most discriminative information, reducing the input dimension of subsequent regression heads, and reducing the risk of overfitting.
[0071] The final fully connected layer can be used to map the pooled feature vectors into a single-valued scalar, i.e. the final crop yield predicted by the model, completing the end-to-end regression task from meteorological sequence to yield estimation.
[0072] In one possible implementation, after training the aforementioned machine learning model, meteorological data sequences can be used as model input, and the actual crop yields corresponding to these meteorological data sequences can be used as labels to construct fine-tuning training samples. Subsequently, the sequence encoder in the trained crop yield estimation model can be frozen, and supervised fine-tuning training can be performed on the frozen crop yield estimation model based on these fine-tuning training samples.
[0073] In one or more embodiments of this specification, for simulated crop yield obtained by simulating crop growth based on meteorological data sequences of a specific geographical area using a crop growth model, the meteorological data sequence can be used as model input, and the simulated crop yield can be used as a label to construct training samples. Then, a supervised training of the machine learning model can be performed based on these training samples, and the trained machine learning model can be determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences. This machine learning model may include a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. Furthermore, the sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model, and the single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0074] By adopting the above method, the machine learning model can learn the internal knowledge of the crop growth model and faithfully reflect the internal calculation process of the crop growth model. At the same time, the machine learning model also has good transfer learning ability and can be fused with other multi-source features, which facilitates the combination of crop growth model and machine learning for yield estimation tasks.
[0075] Corresponding to the embodiments of the aforementioned crop yield inversion method, this specification also provides embodiments of a crop yield inversion device.
[0076] refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of a device provided in an exemplary embodiment. For example... Figure 5 As shown, device 500 mainly consists of a communication interface 502, a user interface 504, a processor 506, and a data storage 508. These components are interconnected and communicate with each other via a system bus, network, or other connection mechanism 510. The communication interface 502 enables device 500 to communicate with other devices, access networks, and transmission networks via analog or digital modulation. For example, the communication interface 502 may include a chipset and antenna for wireless communication with a radio access network or access point. Furthermore, the communication interface 502 can be a wired interface such as Ethernet, Token Ring, or a USB port, or a wireless interface such as Wi-Fi, Bluetooth, Global Positioning System (GPS), or a wide-area wireless interface (e.g., WiMAX or LTE). Of course, the communication interface 502 can also support other forms of physical layer interfaces and standard or proprietary communication protocols. The communication interface 502 may also include multiple physical communication interfaces, such as Wi-Fi interfaces, Bluetooth interfaces, and wide-area wireless interfaces.
[0077] User interface 504 includes receiving user input and providing output to the user. Therefore, user interface 504 may include input components such as a keypad, keyboard, touch-sensitive or presence-sensitive panel, computer mouse, trackball, joystick, microphone, still camera, and video camera, and output components such as a display screen (which may be combined with a touch-sensitive panel), CRT, LCD, LED, display using DLP technology, printer, and other similar devices known or developed in the future. User interface 504 may also generate auditory output via speakers, speaker jacks, audio output ports, audio output devices, headphones, and other similar devices known or developed in the future. In some embodiments, user interface 504 may include software, circuitry, or other forms of logic capable of transmitting and receiving data from external user input / output devices. Additionally or alternatively, device 500 may support remote access from other devices via communication interface 502 or another physical interface (not shown). User interface 504 may be configured to receive user input, the position and movement of which may be indicated by indicators or cursors described herein. User interface 504 may also be configured as a display device for rendering or displaying text fragments.
[0078] Processor 506 may contain one or more general-purpose processors and / or special-purpose processors.
[0079] Data storage 508 may include one or more volatile and / or non-volatile storage components and may be integrated wholly or partially with processor 506. Data storage 508 may include removable and non-removable components.
[0080] Processor 506 is capable of executing program instructions 518 (e.g., compiled or uncompiled program logic and / or machine code) stored in data storage 508 to perform the various functions described herein. Data storage 508 may contain a non-transitory computer-readable medium on which program instructions are stored, which, when executed by device 500, enable device 500 to perform any methods, processes, or functions disclosed in this specification and / or the accompanying drawings. Execution of program instructions 518 by processor 506 may result in processor 506 using data 512.
[0081] For example, program instructions 518 may include an operating system 522 (e.g., an operating system kernel, device drivers, and / or other modules) installed on device 500 and one or more applications 520 (e.g., a browser, social application, or game application). Similarly, data 512 may include operating system data 516 and application data 514. Operating system data 516 is primarily accessible to the operating system 522, while application data 514 is primarily accessible to one or more applications 520. Application data 514 may reside in a file system visible or hidden from the user of device 500.
[0082] Application 520 can communicate with operating system 522 through one or more application programming interfaces (APIs). These APIs help application 520 read and / or write application data 514, transmit or receive information via communication interface 502, receive or display information on user interface 504, etc.
[0083] In some terminology, application 520 may be simply referred to as "app". Furthermore, application 520 can be downloaded to device 500 through one or more online app stores or app markets. However, applications can also be installed on device 500 in other ways, such as through a web browser or a physical interface on device 500 (e.g., a USB port).
[0084] refer to Figure 6 , Figure 6 This is a block diagram of a crop yield inversion device provided in an exemplary embodiment. This crop yield inversion device can be applied to, for example... Figure 5 The device shown is used to implement the technical solution described in this specification.
[0085] The aforementioned crop yield inversion device may include: Module 602 acquires simulated crop yield obtained by simulating crop growth based on meteorological data sequences of the target geographic region using a crop growth model. Module 604 constructs training samples by using the meteorological data sequence as model input and the simulated crop yield as labels. Training module 606 performs supervised training on the machine learning model based on the training samples, and determines the trained machine learning model as a crop yield estimation model for predicting crop yield based on meteorological data sequences; wherein, the machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence to a global feature vector, and a fully connected layer for mapping the global feature vector to a single numerical value; the sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model; the single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
[0086] In one possible implementation, the crop generation model is the WOFOST model.
[0087] In one possible implementation, the sequence encoder is a Transformer encoder or an LSTM encoder.
[0088] In one possible implementation, the machine learning model further includes a convolutional layer for extracting features from the input sequence to obtain a feature data sequence; the feature data sequence output by the convolutional layer is the input sequence of the sequence encoder.
[0089] In one possible implementation, the machine learning model further includes a spatial transformer based on an attention mechanism and a temporal transformer; the spatial transformer is used to weight the input vector in the feature space; the input vector of the spatial transformer is the global feature vector output by the flattening layer; the temporal transformer is used to perform temporal semantic modeling on the input vector to obtain a context-optimized feature vector; the input vector of the temporal transformer is the weighted global feature vector output by the spatial transformer.
[0090] In one possible implementation, the spatial transformer is a Transformer-based spatial transformer; and / or, the time transformer is a Transformer-based time transformer.
[0091] In one possible implementation, the device further includes: The fine-tuning training module takes the meteorological data sequence as model input and the actual crop yield corresponding to the meteorological data sequence as labels to construct fine-tuning training samples; and freezes the sequence encoder in the crop yield estimation model and performs supervised fine-tuning training on the frozen crop yield estimation model based on the fine-tuning training samples.
[0092] For ease of description, the above devices are described by dividing them into various modules or units based on their functions. Of course, when implementing one or more of these specifications, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0093] Based on the same concept as the methods described above, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the above embodiments by executing the executable instructions.
[0094] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
[0095] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
[0096] What those skilled in the art will understand is: In this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded.
[0097] In this specification, “a,” “an,” and “the” do not specifically refer to the singular, but may also include the plural.
[0098] In this specification, ordinal numbers such as "first," "second," etc., do not necessarily indicate order; they are often used to distinguish between objects. For example, "first server" and "second server" usually refer to two servers. To differentiate between these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.
[0099] In this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can also mean indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving the data sent by B, or it can be understood as A indirectly receiving the data sent by B through other entities such as C. Similarly, B sending data to A can be understood as B sending the data directly to A, or it can be understood as B indirectly sending the data to A through other entities such as C. Here, C can be one entity, or it can be two or more entities.
[0100] In this specification, unless explicitly stated otherwise, the relationships between structures can be direct or indirect. For example, when describing "A is connected to B," unless it is explicitly stated that A and B are directly connected, it should be understood that A can be directly connected to B or indirectly connected to B. Similarly, when describing "A is on top of B," unless it is explicitly stated that A is directly above B (AB is adjacent and A is above B), it should be understood that A can be directly above B or indirectly above B (AB is separated by other elements, and A is above B). And so on.
[0101] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.
[0102] Although one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is only one of many possible execution orders and does not represent the only execution order. Therefore, when the claims involve method steps, any changes or adjustments to the order of such steps, or the parallelism between steps, are also within the scope of protection of the claims.
Claims
1. A method for crop yield inversion, the method comprising: Obtain simulated crop yield by simulating crop growth based on meteorological data sequences of a target geographical region using a crop growth model; The meteorological data sequence is used as the model input, and the simulated crop yield is used as the label to construct training samples; The machine learning model is trained in a supervised manner based on the training samples, and the trained machine learning model is determined as a crop yield estimation model for predicting crop yield based on meteorological data sequences. The machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. The sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model. The single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
2. The method according to claim 1, wherein the crop generation model is the WOFOST model.
3. The method according to claim 1, wherein the sequence encoder is a Transformer encoder or an LSTM encoder.
4. The method according to claim 1, wherein the machine learning model further comprises a convolutional layer for extracting features from the input sequence to obtain a feature data sequence; the feature data sequence output by the convolutional layer is the input sequence of the sequence encoder.
5. The method according to claim 1, wherein the machine learning model further comprises a spatial transformer based on an attention mechanism and a temporal transformer; the spatial transformer is used to weight the input vector in the feature space; the input vector of the spatial transformer is the global feature vector output by the flattening layer; the temporal transformer is used to perform temporal semantic modeling on the input vector to obtain a context-optimized feature vector; the input vector of the temporal transformer is the weighted global feature vector output by the spatial transformer.
6. The method according to claim 5, wherein the spatial transformer is a Transformer-based spatial transformer; and / or, the time transformer is a Transformer-based time transformer.
7. The method according to claim 1, further comprising: The meteorological data sequence is used as the model input, and the actual crop yield corresponding to the meteorological data sequence is used as the label to construct a fine-tuning training sample; The sequence encoder in the crop yield estimation model is frozen, and the frozen crop yield estimation model is then subjected to supervised fine-tuning training based on the fine-tuning training samples.
8. A crop yield inversion device, the device comprising: The acquisition module acquires simulated crop yields obtained by simulating crop growth based on meteorological data sequences of the target geographical region using a crop growth model. The construction module takes the meteorological data sequence as model input and the simulated crop yield as label to construct training samples; The training module performs supervised training on the machine learning model based on the training samples, and determines the trained machine learning model as a crop yield estimation model for predicting crop yield based on meteorological data sequences. The machine learning model includes a sequence encoder for mapping the input sequence to a vector representation sequence, a flattening layer for flattening the vector representation sequence into a global feature vector, and a fully connected layer for mapping the global feature vector into a single numerical value. The sequence units of the sequence encoder are aligned with the crop growth stage output units of the crop growth model. The single numerical value output by the fully connected layer is the crop yield predicted by the machine learning model.
9. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor implements the steps of the method as described in any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1 to 7.
11. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1 to 7.