Fruit and vegetable early spring freeze injury space-time early warning method, system, equipment and medium
By constructing a spatiotemporal early warning system for early spring frost damage to fruits and vegetables, and utilizing deep learning models combined with real-time meteorological data and the physiological characteristics of fruits and vegetables, the system solves the problems of insufficient timeliness and accuracy of traditional early warning methods, and achieves precise early warning and disaster prevention decision support at the orchard level.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWEST A & F UNIV
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional methods for early warning of freezing damage to fruits and vegetables lack timeliness and accuracy, lack dynamic risk assessment, cannot provide accurate early warnings for specific orchards, and fail to make full use of real-time meteorological data combined with fruit tree physiological models.
By integrating multi-source real-time meteorological observation data and combining them with the physiological characteristics of fruits and vegetables, a spatiotemporal early warning system for early spring frost damage to fruits and vegetables is constructed through a deep learning model. This system includes data preprocessing, spatial interpolation, 3D convolutional layer feature extraction, bidirectional LSTM layer to capture temporal dependencies, and fully connected layer to output frost damage levels, thereby achieving high spatiotemporal resolution early warning.
It provides more accurate and intelligent early spring frost damage warnings for fruits and vegetables, supporting fruit farmers and agricultural management departments to take effective disaster prevention measures, reduce frost damage losses, and ensure industry safety.
Smart Images

Figure CN121961237A_ABST
Abstract
Description
Spatiotemporal early warning methods, systems, equipment, and media for early spring frost damage to fruits and vegetables Technical Field
[0001] This application relates to the field of agricultural production technology, and in particular to a method, system, equipment and medium for early spring frost damage warning of fruits and vegetables. Background Technology
[0002] Traditional frost damage early warning and prevention mainly rely on the individual experience of fruit growers, seasonal patterns, and regional frost weather forecasts. These methods generally have the following limitations: First, insufficient timeliness and accuracy. Conventional weather forecasts have coarse spatial resolution (usually at the city or county level), making it difficult to accurately reflect the local microclimate differences caused by the complex terrain (such as plateaus and gullies) within Xianyang. Furthermore, the timing of forecasts does not match the actual needs of orchards, failing to provide precise early warnings for specific orchards. Second, the early warning indicators are singular. Previously, the daily minimum temperature was often used as the primary criterion, but frost damage during apple blossom season is the result of the combined effects of multiple factors, including temperature intensity, duration, humidity, wind speed, and plant development. Relying solely on a single temperature indicator can easily lead to missed or false reports, affecting the timeliness and effectiveness of disaster prevention measures. Third, a lack of dynamic risk assessment models. Traditional methods are mostly based on static historical meteorological data and phenological periods, failing to fully utilize real-time, continuous meteorological observation data combined with fruit tree physiological models, thus failing to achieve dynamic, quantitative assessment and advanced early warning of frost damage risk.
[0003] With the development of information technology and precision agriculture, agricultural disaster early warning based on real-time meteorological data has become a research hotspot. Existing general models often fail to fully consider the differences in cold resistance of major apple varieties (such as Fuji and Gala) at different stages of flower organ development (budding, flowering, and young fruit stages) in Xianyang, and also lack effective characterization of orchard micro-topography and underlying surface properties. Therefore, to solve the problems of inaccurate early warning, delayed timeliness, and passive measures in the prevention of early spring frost damage to apples in Xianyang, it is urgent to develop a dynamic early warning model for early spring frost damage to apples specifically for the Xianyang area, based on real-time meteorological data with high spatiotemporal resolution. Summary of the Invention
[0004] This application provides a spatiotemporal early warning method, system, equipment, and medium for early spring frost damage to fruits and vegetables. It can integrate multi-source real-time meteorological observations, combine the physiological characteristics of fruit and vegetable (such as apple) flowering period with localized frost damage indicators, and achieve accurate identification, classification, and early warning of frost damage risk through scientific algorithms. This provides key decision support for fruit farmers and agricultural management departments to take disaster prevention measures such as fumigation, irrigation, and spraying antifreeze, thereby minimizing frost damage losses and ensuring the safety of the target fruit and vegetable industry.
[0005] Firstly, this application provides a spatiotemporal early warning method for early spring frost damage to fruits and vegetables. The method includes: acquiring real-time meteorological data from multiple monitoring points within a target fruit and vegetable planting area, preprocessing and spatially interpolating the data to generate a four-dimensional data tensor containing temporal, spatial, and multiple meteorological feature dimensions; establishing a multi-factor comprehensive frost damage level index based on the physiological characteristics of the target fruits and vegetables during their flowering period, wherein the frost damage level index is based on a threshold combination of daily minimum temperature and duration of low temperature, classifying frost damage into multiple levels; calibrating historical meteorological data based on the frost damage level index to obtain a labeled training dataset; and constructing a spatiotemporal early warning model for frost damage during the fruit and vegetable flowering period, using the labeled training dataset to train the spatiotemporal early warning model. The spatiotemporal early warning model learns the mapping relationship from meteorological data to frost damage levels. The spatiotemporal early warning model includes: an input layer for receiving the four-dimensional data tensor; a 3D convolutional layer for channel dimensionality reduction and spatiotemporal feature extraction; a 3D pooling layer for downsampling in time and / or spatial dimensions; a dimensionality reorganization layer and a flattening layer for converting the feature tensor into sequential data format; a bidirectional LSTM layer for capturing temporal dependencies; and a fully connected layer and an output layer for outputting the predicted frost damage level corresponding to each spatial location. The four-dimensional data tensor is input into the trained spatiotemporal early warning model to obtain the predicted frost damage level for each spatial location within the target fruit and vegetable planting area, and the results are then visualized.
[0006] In one possible design, real-time meteorological data from multiple monitoring points within the target fruit and vegetable growing area is acquired. The data is then preprocessed and spatially interpolated to generate a four-dimensional data tensor containing temporal, spatial, and multiple meteorological feature dimensions. Specifically, this includes: deploying meteorological monitoring equipment at key locations in the fruit and vegetable growing area to collect multiple meteorological parameters in real time, including temperature, humidity, and wind speed; imputing missing values in the collected data using an LSTM-based time series prediction model; and mapping the data from multiple monitoring points to a regular grid using spatial interpolation methods to form a four-dimensional data tensor, whose dimensions include time step, number of meteorological features, number of grid rows, and number of columns.
[0007] In one possible design, the frost damage level index includes at least four levels: no frost damage, mild frost damage, moderate frost damage, and severe frost damage. Each level is defined by a combination of different daily minimum temperature ranges and low temperature duration ranges.
[0008] In one possible design, the 3D convolutional layer includes: a first 3D convolutional layer using a 1×1×1 convolutional kernel for channel dimensionality reduction; a second 3D convolutional layer using a 3×3×3 convolutional kernel to extract local spatiotemporal features; and a third 3D convolutional layer using a 3×3×3 convolutional kernel to extract deep spatiotemporal features. The 3D pooling layer includes: a first 3D pooling layer performing 2×1×1 downsampling in the temporal dimension; and a second 3D pooling layer performing 1×2×2 downsampling in the spatial dimension. The first 3D pooling layer is located between the second and third 3D convolutional layers, and the second 3D pooling layer is located after the third 3D convolutional layer.
[0009] In one possible design, the loss function used during the training of the early warning model is a weighted cross-entropy loss function, and the category weights are set inversely according to the frequency of occurrence of each frost damage level in historical data.
[0010] In one possible design, the method further includes: training a spatiotemporal early warning model for frost damage using meteorological data covering the target area and a larger surrounding area, so that the spatiotemporal early warning model for frost damage learns the correlation between large-scale meteorological models and small-scale frost damage, thereby enhancing the predictive ability for the target area.
[0011] In one possible design, the visualization output is to map the prediction results to a geographic information system to generate a spatial distribution map of frost damage levels, where different levels are distinguished by different colors.
[0012] Secondly, this application provides a spatiotemporal early warning system for early spring frost damage to fruits and vegetables. The system includes: a data acquisition and processing module configured to acquire real-time meteorological data from multiple monitoring points within a target fruit and vegetable planting area, and to preprocess and spatially interpolate the data to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions; a frost damage level classification module configured to establish a multi-factor comprehensive frost damage level index based on the physiological characteristics of the target fruits and vegetables during the flowering period, wherein the frost damage level index is based on a threshold combination of daily minimum temperature and the duration of low temperature, classifying frost damage into multiple levels; and a model construction and training module configured to calibrate historical meteorological data based on the frost damage level index to obtain a labeled training dataset; and to construct a spatiotemporal early warning model for frost damage during the fruit and vegetable flowering period using the labeled training data. The system trains a spatiotemporal early warning model to learn the mapping relationship between meteorological data and frost damage levels. The spatiotemporal early warning model includes: an input layer for receiving the four-dimensional data tensor; a 3D convolutional layer for channel dimensionality reduction and spatiotemporal feature extraction; a 3D pooling layer for downsampling in time and / or spatial dimensions; a dimensionality reorganization layer and a flattening layer for converting the feature tensor into sequential data format; a bidirectional LSTM layer for capturing temporal dependencies; a fully connected layer and an output layer for outputting the predicted frost damage level corresponding to each spatial location; and a prediction and visualization module configured to input the four-dimensional data tensor into the trained spatiotemporal early warning model to obtain the predicted frost damage level for each spatial location within the target fruit and vegetable planting area, and then visualize the results.
[0013] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to execute the spatiotemporal early warning method for early spring frost damage to fruits and vegetables as described in the first aspect and various possible designs of the first aspect.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the spatiotemporal early warning method for early spring frost damage to fruits and vegetables as described in the first aspect and various possible designs of the first aspect.
[0015] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the spatiotemporal early warning method for early spring frost damage to fruits and vegetables as described in the first aspect and various possible designs of the first aspect.
[0016] The spatiotemporal early warning method, system, equipment, and medium for early spring frost damage of fruits and vegetables provided in this application have at least the following beneficial effects: This application organically combines high-density Internet of Things monitoring, crop physiological indicators, spatiotemporal deep learning models, and regional extended learning strategies, overcoming the shortcomings of traditional methods such as poor accuracy, short timeliness, and insufficient intelligence. It provides a more accurate, intelligent, and practical early spring frost damage early warning solution for apples, which has important practical application value for ensuring stable production and increased income of the Xianyang apple industry. Attached Figure Description
[0017] 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.
[0018] Figure 1 is a schematic diagram of the overall process of a spatiotemporal early warning method for early spring frost damage to fruits and vegetables provided in an embodiment of this application; Figure 2 is a flowchart of the acquisition of four-dimensional data tensors provided in an embodiment of this application; Figure 3 is a schematic diagram of the structure of a spatiotemporal early warning model for early spring frost damage to apples provided in an embodiment of this application; Figure 4 is a structural diagram of a spatiotemporal early warning system for early spring frost damage to fruits and vegetables provided in an embodiment of this application.
[0019] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with some aspects of this application as detailed in the appended claims.
[0021] The collection, storage, use, processing, transmission, provision, and disclosure of user data and other information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0022] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0023] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0024] This application provides a spatiotemporal early warning method for early spring frost damage to fruits and vegetables. It should be noted that this embodiment uses apples as an example of the target fruit and vegetable. Understandably, the method can be applied to various fruit and vegetable types, including but not limited to apples, such as other fruit trees that are also susceptible to low-temperature frost damage during their spring flowering period, such as pears, peaches, cherries, and other Rosaceae fruit trees, or other economic crops sensitive to flowering temperature. Those skilled in the art can adaptively adjust the temperature and duration parameters in the frost damage level index according to the specific physiological characteristics and frost damage tolerance threshold of the target fruit and vegetable, and use the method of this application for training and prediction, thereby achieving accurate early warning of flowering frost damage for different fruits and vegetables. Therefore, the scope of protection of this application should not be limited to the specific embodiment of apples. Any scheme based on the concept of this application and employing similar spatiotemporal feature fusion and deep learning modeling methods to achieve early warning of fruit and vegetable frost damage falls within the scope of protection claimed in this application.
[0025] This embodiment uses apples as the target fruit and vegetable, and the target fruit and vegetable planting area is Xianyang City. Xianyang City is located in a continental monsoon climate zone. The apple flowering period (usually in early to mid-April) coincides with a period of drastic temperature fluctuations in spring, making it extremely susceptible to "late spring frost" or "late spring freezing" disasters. When such early spring frost damage occurs, it is at a critical stage of apple bud, flower and young fruit development. The tissues and organs have extremely weak cold resistance. Short-term low temperatures can cause the flowers to freeze and the fruit setting rate to drop sharply, resulting in a sharp reduction in the yield or even a complete crop failure, posing a major threat to the apple industry.
[0026] As shown in Figure 1, the spatiotemporal early warning method for early spring frost damage to fruits and vegetables is implemented through the following steps S10-S40.
[0027] S10: Acquire real-time meteorological data from multiple monitoring points within the target fruit and vegetable planting area, and perform preprocessing and spatial interpolation on the data to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions.
[0028] In some embodiments, as shown in FIG2, a four-dimensional data tensor is obtained through the following steps S101-S103.
[0029] S101: Deploy meteorological monitoring equipment at key locations in fruit and vegetable growing areas to collect multiple meteorological parameters in real time, including temperature, humidity, and wind speed.
[0030] In this embodiment, high-precision meteorological monitoring equipment was deployed at 16 key locations in the Xianyang apple planting area to collect six core meteorological parameters in real time, including temperature, air pressure, relative humidity, precipitation, wind direction, and wind speed. Based on the meteorological stations built, meteorological information on the apple frost-prone period in March and April over the past five years was collected to obtain the corresponding meteorological parameters.
[0031] S102: Complete the missing values of the collected data by using an LSTM-based time series prediction model for data imputation.
[0032] In this embodiment, the acquired meteorological data from multiple periods is supplemented by using an LSTM-based time series prediction model, which predicts and supplements the data based on the correlation between the preceding and following data.
[0033] S103: Data from multiple monitoring points are mapped to a regular grid using spatial interpolation to form a four-dimensional data tensor, whose dimensions include time step, number of meteorological features, number of grid rows and columns.
[0034] In this embodiment, the data from multiple monitoring points are mapped to a regular grid using spatial interpolation. This is done based on the preprocessed data obtained in step S102, according to the frost damage level index (as shown in Table 1). For example, based on the latitude and longitude coordinates of 16 points, the Kriging interpolation method is used to distribute them into a 4×4 regular grid, forming a four-dimensional data tensor with dimensions of 4 (rows) × 4 (columns) × 6 (features) × 168 (time steps). Simultaneously, the above four-dimensional data tensor is spatiotemporally aligned to ensure that the timestamps of all data points are strictly synchronized and their spatial locations remain fixed.
[0035] S20: Based on the physiological characteristics of the target fruits and vegetables during the flowering period, a multi-factor comprehensive frost damage level index is established. The frost damage level index is based on a threshold combination of daily minimum temperature and duration of low temperature, and frost damage is divided into multiple levels.
[0036] In this embodiment, based on the physiological characteristics of early and mid-maturing Fuji apples during flowering in Xianyang area, a multi-factor comprehensive frost damage level index was established, as shown in Table 1.
[0037] Table 1. Multi-factor comprehensive frost damage level index
[0038] S30: Based on the frost damage level index, historical meteorological data is calibrated to obtain a labeled training dataset; and a spatiotemporal early warning model for frost damage during fruit and vegetable flowering period is constructed. The spatiotemporal early warning model is trained using the labeled training dataset so that the spatiotemporal early warning model learns the mapping relationship from meteorological data to frost damage level.
[0039] In this embodiment, the obtained fused multi-period meteorological data and latitude and longitude information are imported into the constructed spatiotemporal early warning model for early spring frost damage to apples (i.e., spatiotemporal early warning model for fruit and vegetable flowering period frost damage). Its structure is shown in Figure 3. The model includes an input layer, a first 3D convolutional layer, a second 3D convolutional layer, a first 3D pooling layer, a third 3D convolutional layer, a second 3D pooling layer, a dimension recombination layer, a flattening operation layer, a bidirectional LSTM layer, a fully connected layer, and an output layer, which are connected in sequence.
[0040] The input layer is responsible for receiving and defining the structure and dimensions of the raw input data. The input is a four-dimensional tensor with dimensions (168, 6, 4, 4), carrying the core spatiotemporal meteorological information: it contains a continuous 168-hour (7-day) time series, with each time point recording six different meteorological characteristics (such as temperature and humidity). This data is spatially organized in a regular 4x4 grid, representing 16 monitoring areas in the Xianyang apple-producing region. This layer does not perform any computational transformations; its main function is to establish a standardized data entry point for the subsequent complex feature extraction and learning processes.
[0041] The first 3D convolutional layer (1x1x1 kernel) is the first feature processing layer, mainly performing dimensionality reduction and feature fusion in the channel dimension. It operates using a miniature 3D convolutional kernel of size 1x1x1. The input dimension is (168, 6, 4, 4), where the first dimension 168 represents the initial, potentially redundant or high-dimensional feature channels. Through the operation of this set of convolutional kernels, this layer efficiently compresses and fuses the original 168 channels into 64 new feature channels that are more representative and have higher information density. The output dimension becomes (64, 6, 4, 4), which significantly reduces the subsequent computational cost while preserving the temporal depth (6) and spatial size (4x4) of the original data, laying a concise and effective foundation for the next step of more complex feature extraction.
[0042] The second 3D convolutional layer (3x3x3 kernel) aims to extract local spatiotemporal correlation features. It receives a (64, 6, 4, 4)-dimensional tensor from the previous layer and scans it using a 3x3x3 three-dimensional convolutional kernel. These kernels slide simultaneously across three dimensions (feature channels, temporal depth, and spatial height / width), enabling them to capture the coordinated temporal and spatial changes and dependencies of meteorological elements within a small area. For example, they can identify the local features of a "cold front" where temperature and humidity drop sharply in a region over several consecutive hours. After processing, the output dimension is (128, 6, 4, 4), and the number of feature channels increases to 128, meaning that a richer and more complex representation of local spatiotemporal features has been learned.
[0043] The first 3D pooling layer (2x1x1 pooling) performs downsampling in the temporal dimension, aiming to compress the data size, enhance feature robustness, and expand the receptive field of subsequent layers. It uses a 2x1x1 pooling window, specifically (usually max pooling) merging feature maps from two consecutive time steps into one, selecting the most representative feature values. With an input of (128, 6, 4, 4), after pooling, the temporal depth is halved from 6 to 3, while the number of feature channels (128) and spatial size (4x4) remain unchanged, resulting in an output dimension of (128, 3, 4, 4). This effectively reduces the temporal resolution of the data, highlights important temporal features, and helps prevent overfitting.
[0044] The third 3D convolutional layer (3x3x3 kernel) serves as another 3D convolutional layer, responsible for deeper spatiotemporal feature extraction. It operates on the temporally downsampled feature map (128, 3, 4, 4), continuing to use a 3x3x3 convolutional kernel. Because the temporal depth of the input has been reduced, the convolutional kernel is able to learn and combine more abstract and global spatiotemporal patterns over a relatively longer time span (combining information from multiple original time steps merged in previous downsampling) and within the spatial neighborhood. The output dimension of this layer is (256, 3, 4, 4), further expanding the number of feature channels to 256, generating a highly refined deep feature representation for the final prediction.
[0045] The second 3D pooling layer (1x2x2 pooling) focuses on downsampling in the spatial dimension. It uses a 1x2x2 pooling window to operate in the row and column directions of space, integrating features from adjacent 2x2 spatial grids into one. The input dimension is (256, 3, 4, 4). After pooling, the spatial size is reduced from 4x4 to 2x2, while the number of feature channels (256) and the temporal depth (3) remain unchanged, and the output dimension becomes (256, 3, 2, 2). This step not only significantly reduces the number of parameters but also makes the features more invariant to small changes in spatial location, helping the model to grasp the overall risk trend of the region rather than being fixated on overly detailed grid locations.
[0046] The dimensionality remodeling layer is a data reshaping operation designed to prepare a suitable data format for the subsequent sequence modeling layer (LSTM). It receives a tensor of dimension (256, 3, 2, 2) and rearranges it to (3, 256, 2, 2) by permuting the order of the dimensions. The core purpose of this transformation is to move the temporal depth dimension (3 at this moment) to the first dimension, making it the sequence length (3 time steps) that the LSTM can handle. Simultaneously, the feature channel dimension (256) is combined with the flattened spatial features (2x2=4) in subsequent steps to form the input feature vector for each time step.
[0047] The flattening operation layer performs spatial feature flattening, a crucial step in converting multi-dimensional spatial features into a one-dimensional vector. The input dimension is (3, 256, 2, 2), where the latter three dimensions (256, 2, 2) represent the feature map at each time step. The flattening operation merges the 256 channels at each time step with a 2x2 spatial grid, forming a vector of length 256. 2 The feature vector is 2 = 1024. Therefore, the output dimension becomes (3, 1024). This is equivalent to compressing the complex information of all spatial locations and channels at each time step into a comprehensive feature vector so that the LSTM unit can process it in time step order.
[0048] The bidirectional LSTM layer (two stacked layers) is the core of the network for modeling temporal dependencies, employing a two-layer stacked bidirectional long short-term memory network. It receives flattened sequence data with dimensions (3, 1024), representing a sequence of length 3 (corresponding to 3 deep time steps), where the input at each time point is a 1024-dimensional feature vector. The bidirectional LSTM can scan the sequence in both forward and backward directions, thus fully capturing the temporal dependencies and dynamic evolution trends of features (such as the accumulation or dissipation of frost damage risk). After two deep processing layers, the output dimension remains (3, 1024), but the output at each time step now incorporates the contextual information of the entire sequence.
[0049] The fully connected layer acts as a feature space mapping and dimension transformer. It typically receives the output from the last time step of the LSTM (a 1024-dimensional vector summarizing the essence of the entire sequence) and maps the high-dimensional temporal-spatial fusion features to the target spatial dimension through a linear transformation. The input can be viewed as a 1024-dimensional feature vector, and the output is a 16-dimensional vector. These 16 values initially correspond to the predicted frost damage risk potential values of the final 4x4=16 spatial grids, completing the transformation from abstract features to a concrete prediction target.
[0050] The output layer (Reshape) is the last layer, responsible for generating the final prediction matrix. It receives the 16-dimensional vector output from the fully connected layer and rearranges it into a 4x4 two-dimensional matrix through a simple shape reshaping operation, resulting in an output dimension of (4, 4). Each element in this matrix corresponds to the predicted frost damage level (e.g., 0 - no risk, 1 - mild, 2 - moderate, 3 - severe) at each location in the 16 spatial grids of the Xianyang apple-producing area, thus completing the end-to-end prediction from multidimensional spatiotemporal input to spatialized risk level distribution in an intuitive grid format.
[0051] In some embodiments, the spatiotemporal early warning model for early spring frost damage to apples employs a weighted cross-entropy loss function during training to address the class imbalance problem. The weighted cross-entropy loss function is expressed as follows: In the formula, Let 'i' be the loss value, 'i' be the pixel index (traversing all spatial locations in the image), and 'j' be the category index (traversing all frost damage levels). The weights assigned to the true class j of pixel i are reversed based on the frequency of occurrence of each class to mitigate the class imbalance problem. The probability value predicted by the model for pixel i to belong to its true class j is obtained by normalizing the logits output by the network using the softmax function. Let i be the true label of pixel i with respect to category j.
[0052] Among them, weight The settings are reversed based on the frequency of frost damage levels to ensure that the model pays attention to a minority of types (severe frost damage).
[0053] S40: Input the four-dimensional data tensor into the trained spatiotemporal early warning model for frost damage to obtain the predicted frost damage level for each spatial location within the target fruit and vegetable planting area, and then visualize the result.
[0054] In some embodiments, the prediction results are presented as follows: the spatiotemporal prediction results after spatial interpolation and georeferencing are imported into the ArcGIS system to generate a color spatial distribution map of frost damage levels based on a 4×4 grid, which visually displays the spatial pattern risk values of frost damage risk in different regions, with higher risk areas represented in red and low risk areas represented in green.
[0055] In some embodiments, the method further includes a regional expansion forecasting strategy. To compensate for the limitations of limited monitoring points, a large-area forecasting mechanism for small-area data is introduced: data from 16 core monitoring points are expanded to similar observational data in neighboring counties and cities (such as Liquan, Qianxian, and Yongshou), constructing a forecasting paradigm of large area (e.g., the entire Xianyang region) → small area (16 core monitoring points). During the learning process, the model automatically captures the correlation between large-scale meteorological models and the occurrence of small-scale frost damage, utilizing the meteorological evolution trends of surrounding areas to enhance the predictive ability for frost damage in the target area.
[0056] This application embodiment also provides a spatiotemporal early warning system for early spring frost damage to fruits and vegetables, as shown in Figure 4. This system includes: a data acquisition and processing module 401, configured to acquire real-time meteorological data from multiple monitoring points within the target fruit and vegetable planting area, and preprocess and spatially interpolate the data to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions; a frost damage level classification module 402, configured to establish a multi-factor comprehensive frost damage level index based on the physiological characteristics of the target fruits and vegetables during the flowering period. The frost damage level index is based on a threshold combination of daily minimum temperature and the duration of low temperature, classifying frost damage into multiple levels; and a model construction and training module 403, configured to calibrate historical meteorological data based on the frost damage level index to obtain a labeled training dataset; and to construct a spatiotemporal early warning model for frost damage during the fruit and vegetable flowering period. The labeled training dataset is used to train the spatiotemporal early warning model, enabling the model to learn the mapping relationship from meteorological data to frost damage levels. The spatiotemporal early warning model includes: an input layer for receiving the four-dimensional data tensor; a 3D convolutional layer for channel dimensionality reduction and spatiotemporal feature extraction; a 3D pooling layer for downsampling in time and / or spatial dimensions; a dimensionality reorganization layer and a flattening layer for converting the feature tensor into a sequence data format; a bidirectional LSTM layer for capturing temporal dependencies; a fully connected layer and an output layer for outputting the predicted level of each spatial location corresponding to the frost damage level index; and a prediction and visualization module 404 configured to input the four-dimensional data tensor into the trained spatiotemporal early warning model for frost damage, obtain the predicted frost damage level for each spatial location within the target fruit and vegetable planting area, and perform visualization output.
[0057] This application provides an electronic device. The electronic device may include a processor and a memory, wherein the processor and the memory can communicate; exemplarily, the processor and the memory communicate via a communication bus.
[0058] The processor executes computer execution instructions stored in memory, causing the processor to perform the scheme in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0059] The communication bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. Transceivers are used to enable communication between the database access system and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0060] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.
[0061] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the above-described method for early spring frost damage warning of fruits and vegetables.
[0062] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the spatiotemporal early warning method for early spring frost damage to fruits and vegetables in the above embodiments.
[0063] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.
[0064] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0065] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0066] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0067] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0068] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0069] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Architecture (EISA) buses, etc. Buses can be categorized into address buses, data buses, control buses, etc.
[0070] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0071] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0072] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A spatiotemporal early warning method for early spring frost damage to fruits and vegetables, characterized in that, The method includes: acquiring real-time meteorological data from multiple monitoring points within the target fruit and vegetable planting area, preprocessing and spatially interpolating the data to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions; establishing a multi-factor comprehensive frost damage level index based on the physiological characteristics of the target fruits and vegetables during the flowering period, wherein the frost damage level index is based on a threshold combination of daily minimum temperature and low temperature duration, classifying frost damage into multiple levels; calibrating historical meteorological data based on the frost damage level index to obtain a labeled training dataset; and constructing a spatiotemporal early warning model for frost damage during the fruit and vegetable flowering period, using the labeled training dataset to train the spatiotemporal early warning model, enabling the spatiotemporal early warning model to learn from meteorological data. The mapping relationship between data and frost damage levels; the spatiotemporal early warning model includes: an input layer for receiving the four-dimensional data tensor; a 3D convolutional layer for channel dimensionality reduction and spatiotemporal feature extraction; a 3D pooling layer for downsampling in time and / or spatial dimensions; a dimensionality reorganization layer and a flattening layer for converting the feature tensor into a sequence data format; a bidirectional LSTM layer for capturing temporal dependencies; and a fully connected layer and an output layer for outputting the predicted level of each spatial location corresponding to the frost damage level index; the four-dimensional data tensor is input into the trained spatiotemporal early warning model for frost damage to obtain the predicted frost damage level of each spatial location within the target fruit and vegetable planting area, and the results are visualized.
2. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, Real-time meteorological data from multiple monitoring points within the target fruit and vegetable planting area are acquired, and the data is preprocessed and spatially interpolated to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions. Specifically, this includes: deploying meteorological monitoring equipment at key locations in the fruit and vegetable planting area to collect multiple meteorological parameters in real time, including temperature, humidity, and wind speed; imputing missing values in the collected data using an LSTM-based time series prediction model; and mapping the data from multiple monitoring points to a regular grid using spatial interpolation methods to form a four-dimensional data tensor, whose dimensions include time step, number of meteorological features, number of grid rows, and number of columns.
3. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, The frost damage level index includes at least four levels: no frost damage, mild frost damage, moderate frost damage, and severe frost damage. Each level is defined by a combination of different daily minimum temperature ranges and low temperature duration ranges.
4. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, The 3D convolutional layer includes: a first 3D convolutional layer, which uses a 1×1×1 convolutional kernel for channel dimensionality reduction; a second 3D convolutional layer, which uses a 3×3×3 convolutional kernel to extract local spatiotemporal features; and a third 3D convolutional layer, which uses a 3×3×3 convolutional kernel to extract deep spatiotemporal features. The 3D pooling layer includes: a first 3D pooling layer, which performs 2×1×1 downsampling in the temporal dimension; and a second 3D pooling layer, which performs 1×2×2 downsampling in the spatial dimension. The first 3D pooling layer is located between the second and third 3D convolutional layers, and the second 3D pooling layer is located after the third 3D convolutional layer.
5. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, The loss function used in training the early warning model is the weighted cross-entropy loss function, and its category weights are set inversely according to the frequency of occurrence of each frost damage level in historical data.
6. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, The method further includes: training a spatiotemporal early warning model for frost damage using meteorological data covering the target area and a larger surrounding area, so that the spatiotemporal early warning model for frost damage learns the correlation between large-scale meteorological models and small-scale frost damage, thereby enhancing the predictive ability for the target area.
7. The spatiotemporal early warning method for early spring frost damage to fruits and vegetables according to claim 1, characterized in that, The visualization output maps the prediction results to a geographic information system to generate a spatial distribution map of frost damage levels, where different levels are distinguished by different colors.
8. A spatiotemporal early warning system for early spring frost damage to fruits and vegetables, characterized in that, The system includes: a data acquisition and processing module, configured to acquire real-time meteorological data from multiple monitoring points within the target fruit and vegetable planting area, and preprocess and spatially interpolate the data to generate a four-dimensional data tensor containing time, space, and multiple meteorological feature dimensions; a frost damage level classification module, configured to establish a multi-factor comprehensive frost damage level index based on the physiological characteristics of the target fruits and vegetables during the flowering period, wherein the frost damage level index is based on a threshold combination of daily minimum temperature and duration of low temperature, classifying frost damage into multiple levels; and a model construction and training module, configured to calibrate historical meteorological data based on the frost damage level index to obtain a labeled training dataset; and to construct a spatiotemporal early warning model for frost damage during the fruit and vegetable flowering period, using the labeled training dataset to train the spatiotemporal early warning model. The spatiotemporal early warning model learns the mapping relationship from meteorological data to frost damage levels. The spatiotemporal early warning model includes: an input layer for receiving the four-dimensional data tensor; a 3D convolutional layer for channel dimensionality reduction and spatiotemporal feature extraction; a 3D pooling layer for downsampling in time and / or spatial dimensions; a dimensionality reorganization layer and a flattening layer for converting the feature tensor into a sequence data format; a bidirectional LSTM layer for capturing temporal dependencies; a fully connected layer and an output layer for outputting the predicted frost damage level corresponding to each spatial location; and a prediction and visualization module configured to input the four-dimensional data tensor into the trained spatiotemporal early warning model to obtain the predicted frost damage level for each spatial location within the target fruit and vegetable planting area, and to output the visualization results.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the spatiotemporal early warning method for early spring frost damage to fruits and vegetables as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the spatiotemporal early warning method for early spring frost damage to fruits and vegetables as described in any one of claims 1-7.