Crop quality prediction method and system based on meteorological data, and storage medium

By using the lightweight information exchange module in the lightweight quality prediction network model for continuous and interval sampling, combined with the weight sharing strategy, the problem of information loss in the CNN model when processing meteorological data is solved, and the accuracy and efficiency of crop quality prediction are improved. .

CN119293465AInactive Publication Date: 2025-01-10YUNNAN AGRICULTURAL UNIVERSITY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411836184.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional CNN convolutional neural models process meteorological data with time series, the downsampling method will eliminate the marks in the time series data, resulting in the loss of information in the output prediction data, affecting the accuracy of crop quality prediction.

Method used

In the lightweight information exchange module (IEBlock) is used to extract short-distance and long-distance features in meteorological data through continuous sampling and interval sampling methods, and convert them into non-overlapping subsequences to avoid information. Lost, and at the same time, the weight sharing strategy is adopted during the time mapping process to reduce the amount of model parameters.

Benefits of technology

The information completeness and prediction accuracy of the prediction data are improved, the problem of information loss in traditional methods is avoided, and the efficiency of the model and the utilization of parameter quantity is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293465A_ABST
    Figure CN119293465A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of deep learning, in particular to a crop quality prediction method and system based on meteorological data and a storage medium. A lightweight quality prediction network model provided with a lightweight information exchange module is adopted to extract time and dimension features in historical meteorological data with a time sequence, and the lightweight information exchange module can continuously extract a plurality of short-distance features in the historical meteorological data. And a plurality of long-distance features in a plurality of pieces of historical meteorological data can be sampled at a fixed time interval, so that the lightweight quality prediction network model keeps all marks in the historical meteorological data in the down-sampling process, and the historical meteorological data is converted into a plurality of non-overlapping subsequences. The invention aims to solve the problem of how to avoid information loss in output prediction data due to the fact that marks in time sequence data are removed when a neural network model carries out downsampling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning technology, and in particular to a crop quality prediction method, system and storage medium based on meteorological data. Background Art

[0002] With global climate change and changes in agricultural production methods, the quality of crops has received more and more attention. Meteorological factors, as important factors affecting crop growth, play an important role in predicting crop quality. Meteorological factors refer to various factors that affect atmospheric conditions and climate change, including but not limited to temperature, humidity, precipitation, wind speed, air pressure, cloud cover, radiation, etc., which can have a direct impact on crop growth, development and yield. For different crops, different meteorological factors may have different degrees of influence.

[0003] Traditional methods often rely on empirical judgment and simple statistical models when predicting crop quality. These methods have limitations when dealing with complex meteorological data and nonlinear relationships, resulting in inaccurate and inefficient prediction results. With the rapid development of computing and information technology, deep learning has demonstrated its great potential and efficiency in many fields, especially in dealing with complex data and nonlinear relationships, which can significantly improve computing speed.

[0004] In the relevant technical scheme, the Chinese patent with application number CN202410176207.8 discloses a method, device and storage medium for predicting the yield of characteristic crops. Its specification discloses the use of a convolutional neural network (CNN) to convert multi-dimensional meteorological data into a one-dimensional feature vector, while extracting spatial and temporal features from the data to complete the feature extraction of meteorological data.

[0005] The inventor discovered during the process of conceiving and implementing this application that when a conventional CNN convolutional neural model is used as a deep learning model, for time series data such as meteorological data, when downsampling is performed using a common downsampling method (such as uniform sampling) in a CNN convolutional neural model, the markers in the time series data will be removed, resulting in information loss in the output prediction data. Therefore, a new deep learning model and a corresponding crop quality prediction method are needed to accurately predict crop quality based on meteorological data.

[0006] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0007] The main purpose of this application is to provide a crop quality prediction method based on meteorological data, aiming to solve the problem of how to avoid the removal of labels in time series data when the neural network model is downsampled, which may lead to information loss in the output prediction data.

[0008] To achieve the above objectives, the present application provides a method for predicting crop quality based on meteorological data, the method comprising: Collecting historical daily meteorological data of the area where the target crop is located, and standardizing the historical daily meteorological data; Inputting the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, and the lightweight information exchange module can continuously extract multiple short-distance features in the historical daily meteorological data, and can sample multiple long-distance features in the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; The lightweight information exchange module includes a continuous sampling module and an interval sampling module, wherein the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; The quality prediction result corresponding to the target crop output by the lightweight quality prediction network is obtained.

[0009] Optionally, the lightweight information exchange module includes a continuous sampling module, which can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and each subsequence constitutes a two-dimensional data matrix The expression in the jth column is: in, , T is the total length of the historical daily meteorological data, t is the last moment of the historical daily meteorological data, and R is a real number set.

[0010] Optionally, the lightweight information exchange module includes an interval sampling module, and the interval sampling module samples C token subsequences at a fixed time interval each time. The j-th column of the downsampling matrix is: .

[0011] Optionally, the calculation process of sampling the short-distance feature and the long-distance feature by the lightweight information exchange module includes: in, is a short-range feature. For long-distance features, is the output feature of the continuous sampling branch IEBlock, is the output feature of the interval sampling branch IEBlock, Characterize the feature extraction process of IEBlock, is a fully connected layer, T is the total length of the historical daily meteorological data, C is the number of sampled sequences, N is the meteorological factor dimension, F is the time series channel dimension, and R is a real number set.

[0012] Optionally, the step of using the lightweight quality prediction network model to predict the quality of target crops includes: The short-range features and the long-range features are fused in series and reshaped into a two-dimensional form. ; Through lightweight information exchange module Perform channel and time feature extraction: ,in, right Sum in the time dimension to get the final feature ,in, ; Will Substitute into the MLP function to get the final quality prediction result Q: in, , , , N is the meteorological factor dimension, is the time series channel dimension, and S is the number of quality indicators.

[0013] Optionally, the lightweight information exchange module adopts a weight sharing strategy for all columns during the time mapping process, and the dimension of the intermediate feature layer of the lightweight information exchange module is smaller than the dimension of the output feature layer.

[0014] Optionally, after the step of obtaining the quality prediction result corresponding to the target crop output by the lightweight quality prediction network, the step further includes: Using the fitting coefficients The quality prediction result is evaluated, wherein: The calculation formula is as follows: in, is the i-th indicator value of the predicted value, is the i-th indicator value of the true value, is the mean of the prediction vector, is the mean of the true value vector, is the number of quality indicators.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a crop quality prediction device based on meteorological data, the crop quality prediction device comprising: A data collection module, used to collect historical daily meteorological data of the area where the target crop is located, and standardize the historical daily meteorological data; A deep learning module, used for inputting the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, the lightweight information exchange module can continuously extract multiple short-distance features in the historical daily meteorological data, and can sample multiple long-distance features in the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; the lightweight information exchange module includes a continuous sampling module and an interval sampling module, the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; The quality prediction module is used to obtain the quality prediction result corresponding to the target crop output by the lightweight quality prediction network.

[0016] In addition, to achieve the above-mentioned purpose, the present application also provides a crop quality prediction system, which includes: a lightweight quality prediction network model, a memory, a processor, and a crop quality prediction program based on meteorological data stored on the memory and executable on the processor. When the crop quality prediction program based on meteorological data is executed by the processor, the steps of the crop quality prediction method based on meteorological data as described in any of the above items are implemented.

[0017] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a crop quality prediction program based on meteorological data is stored. When the crop quality prediction program based on meteorological data is executed by a processor, the steps of the crop quality prediction method based on meteorological data as described above are implemented.

[0018] This application has at least the following technical effects: (1) In the present application, a lightweight quality prediction network (LQPN) model provided with a lightweight information exchange block (IEBlock) is used to extract time and dimension features from historical meteorological data with time series. The lightweight information exchange module can continuously extract multiple short-distance features from the historical meteorological data, and can sample multiple long-distance features from multiple historical meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all the marks in the historical meteorological data during the downsampling process, and converts the historical meteorological data into a number of non-overlapping subsequences, thereby avoiding the phenomenon of removing marks in the time series data during downsampling in the traditional CNN convolutional neural model, and improving the information integrity in the output prediction data; (2) The lightweight information exchange module adopts a weight sharing strategy for all columns during the time mapping process, eliminating the weight configuration step during the mapping process, thereby improving the efficiency of the time mapping process; (3) The dimension of the intermediate feature layer of the lightweight information exchange module is smaller than that of the output feature layer, forming a bottleneck structure. Through the bottleneck structure and the weight sharing strategy in (2), the number of model parameters is reduced, so that the lightweight information exchange module can effectively extract short-range features and long-range features from historical meteorological data with time series. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of the architecture of the hardware operating environment of the crop quality prediction system involved in the embodiment of the present application; Figure 2 This is a flow chart of a first embodiment of the crop quality prediction method based on meteorological data of the present application; Figure 3 A schematic diagram of the overall framework of the LQPN network involved in the embodiment of the present application; Figure 4 This is a schematic diagram of the architecture of the IEBlock module involved in the embodiment of the present application; Figure 5 A schematic diagram of a curve showing changes in air temperature during a period in Yunlong County according to an embodiment of the present application; Figure 6 A schematic diagram of a curve showing changes in light intensity during a period in Yunlong County according to an embodiment of the present application; Figure 7 A schematic diagram of a curve showing changes in air humidity during a period in Yunlong County according to an embodiment of the present application; Figure 8 This is a schematic diagram of the quality index data of tea leaves in Yunlong County involved in the embodiment of this application; Fig. 9 A network training loss curve diagram involved in an embodiment of the present application; Fig.10 A schematic diagram of a curve showing changes in air temperature within a period in Zhaoyang District involved in an embodiment of the present application; Fig.11 A schematic diagram of a curve showing changes in light intensity during a period in Zhaoyang District according to an embodiment of the present application; Fig.12 A schematic diagram of a curve showing changes in air humidity during a period in Zhaoyang District according to an embodiment of the present application; Fig.13 This is a schematic diagram of apple quality index data in Zhaoyang District involved in the embodiment of the present application; Fig.14 This is a network training loss curve diagram involved in an embodiment of the present application.

[0020] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0022] As an implementation plan, Figure 1 This is a schematic diagram of the architecture of the hardware operating environment of the crop quality prediction system involved in the embodiment of the present application.

[0023] like Figure 1As shown, the crop quality prediction system may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0024] Those skilled in the art will understand that Figure 1 The crop quality prediction system architecture shown in the figure does not constitute a limitation on the crop quality prediction system, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0025] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a crop quality prediction program based on meteorological data. The operating system is a program that manages and controls the hardware and software resources of the crop quality prediction system, the crop quality prediction program based on meteorological data, and the operation of other software or programs.

[0026] exist Figure 1 In the crop quality prediction system shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the crop quality prediction program based on meteorological data stored in the memory 1005.

[0027] In this embodiment, the crop quality prediction system includes: a memory 1005, a processor 1001, and a crop quality prediction program based on meteorological data stored in the memory and executable on the processor, wherein: When the processor 1001 calls the crop quality prediction program based on meteorological data stored in the memory 1005, the following operations are performed: Collecting historical daily meteorological data of the area where the target crop is located, and standardizing the historical daily meteorological data; Inputting the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, and the lightweight information exchange module can continuously extract multiple short-distance features in the historical daily meteorological data, and can sample multiple long-distance features in the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; The lightweight information exchange module includes a continuous sampling module and an interval sampling module, wherein the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; The quality prediction result corresponding to the target crop output by the lightweight quality prediction network is obtained.

[0028] When the processor 1001 calls the crop quality prediction program based on meteorological data stored in the memory 1005, the following operations are performed: in, is a short-range feature. For long-distance features, is the output feature of the continuous sampling branch IEBlock, is the output feature of the interval sampling branch IEBlock, Characterize the feature extraction process of IEBlock, is a fully connected layer, T is the total length of the historical daily meteorological data, C is the number of sampled sequences, N is the meteorological factor dimension, F is the time series channel dimension, and R is a real number set.

[0029] When the processor 1001 calls the crop quality prediction program based on meteorological data stored in the memory 1005, the following operations are performed: The short-range features and the long-range features are fused in series and reshaped into a two-dimensional form. ; Through lightweight information exchange module Perform channel and time feature extraction: ,in, right Sum in the time dimension to get the final feature ,in, ; Will Substitute into the MLP function to get the final quality prediction result Q: in, , , , N is the meteorological factor dimension, is the temporal channel dimension, , n is the number of quality indicators, and R is a set of real numbers.

[0030] When the processor 1001 calls the crop quality prediction program based on meteorological data stored in the memory 1005, the following operations are performed: Using the fitting coefficients The quality prediction result is evaluated, wherein: The calculation formula is as follows: in, is the i-th indicator value of the predicted value, is the i-th indicator value of the true value, is the mean of the prediction vector, is the mean of the true value vector, is the number of quality indicators.

[0031] Based on the hardware architecture of the above-mentioned crop quality prediction system based on deep learning technology, an embodiment of the crop quality prediction method based on meteorological data of the present application is proposed.

[0032] Reference Figure 2 In a first embodiment, the crop quality prediction method based on meteorological data comprises the following steps: Step S10, collecting historical meteorological data of the area where the target crop is located, and standardizing the historical meteorological data; In this embodiment, after receiving the query instruction for the target crop input by the user, the crop quality prediction system collects the historical meteorological data in the planting area where the target crop is located, and standardizes the historical meteorological data so that the data have the same scale to facilitate subsequent analysis.

[0033] The historical meteorological data refers to the meteorological data that affects the quality of the target crop in the past period of time. Optionally, the historical meteorological data may include but is not limited to temperature, humidity, precipitation, wind speed, air pressure, cloud cover, and radiation.

[0034] Optionally, the expression for normalized historical meteorological data is as follows: Where T is the historical meteorological data, is the standardized historical meteorological data. is the smallest scale of historical meteorological data, It is the largest scale of historical meteorological data.

[0035] Step S20, inputting the standardized historical meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, and the lightweight information exchange module can continuously extract multiple short-distance features from the historical meteorological data, and can sample multiple long-distance features from the historical meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical meteorological data during the downsampling process, and converts the historical meteorological data into a number of non-overlapping subsequences; the lightweight information exchange module includes a continuous sampling module and an interval sampling module, the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; In this embodiment, after the standardized historical meteorological data is obtained, the historical meteorological data is input into a trained Lightweight Quality Prediction Network (LQPN) model for prediction.

[0036] In this embodiment, before the time series data is input into the lightweight information exchange module to extract features, the historical daily meteorological data is converted into a number of non-overlapping subsequences. The conversion methods include continuous sampling and interval sampling. The continuous sampling conversion can continuously select C tokens with a length of T / C as subsequences from each meteorological factor dimension of the historical daily meteorological data. The interval sampling module samples C token subsequences at a fixed time interval each time.

[0037] For example, refer to Figure 3 The overall framework diagram of the LQPN network in Figure 1 shows that the architecture can exchange information between different sequences and time steps, and adaptively select useful information for prediction from local and global information. A lightweight information exchange block (IEBlock) is set in the overall framework of the LQPN network. The overall framework of the LQPN network consists of two parts.

[0038] In the first part, a plurality of short-range features in the historical meteorological data are continuously extracted by IEBlock, and a plurality of long-range features in the historical meteorological data are sampled at a fixed time interval by IEBlock.

[0039] In the second part, the LQPN model combines the short-range features and long-range features extracted in the first part in series and reshapes them into a two-dimensional form. , through IEBlock Perform channel and time feature extraction, and then Sum in the time dimension to get the final feature ,Will Substitute into the MLP function to obtain the final quality prediction result Q.

[0040] Among them, the above parameters meet: , , , N is the meteorological factor dimension, is the temporal channel dimension, , S is the number of quality indicators, and R is a set of real numbers.

[0041] Further and optionally, compared with other sequential data (such as natural language and audio data), time series is a special sequence because downsampling of time series usually retains most of its information. However, common downsampling methods of CC (such as uniform sampling) may lead to information loss. Inspired by this, continuous and interval sampling are designed in this application, which helps the model capture short-distance and long-distance time patterns without eliminating any marks. Short-distance features reflect local trends and fluctuations in the data, while long-distance features contain seasonality, periodicity or long-term trends in the data. Combining these two features can improve the model's overall understanding of the data, thereby making more accurate predictions. Therefore, the lightweight information exchange module includes a continuous sampling module, which can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and each subsequence constitutes a two-dimensional data matrix The expression in the jth column is: in, , T is the total length of the historical daily meteorological data, and t is the last moment of the historical daily meteorological data.

[0042] The lightweight information exchange module includes an interval sampling module, which samples C token subsequences at a fixed time interval each time. The j-th column of the downsampling matrix is: It should be noted that for continuous sampling, the time series is divided into continuous segments without long-range information, so the model will pay more attention to short-range short-distance features. For interval sampling, the model pays more attention to long-range long-distance features. This design makes the model training more effective. It should be noted that, unlike conventional downsampling methods, LQPN does not remove any tags. Instead, LQPN retains all original tags and converts them into several non-overlapping subsequences.

[0043] Further and optionally, IEBlock is used for feature extraction. The IEBlock module can take into account the feature extraction of both the channel dimension and the time dimension, and it is itself a lightweight module. The IEBlock module can effectively extract the short-range features and long-range time features in the downsampling matrix as the two output features of the first part. The calculation process is described as follows: in, is a short-range feature. For long-distance features, is the output feature of the continuous sampling branch IEBlock, is the output feature of the interval sampling branch IEBlock, Characterize the feature extraction process of IEBlock, is a fully connected layer, T is the total length of the historical daily meteorological data, C is the number of sampled sequences, N is the meteorological factor dimension, F is the time series channel dimension, and R is a real number set.

[0044] Furthermore, in this embodiment, the lightweight information exchange module adopts a weight sharing strategy for all columns during the time mapping process, and the dimension of the intermediate feature layer of the lightweight information exchange module is smaller than the dimension of the output feature layer.

[0045] It should be noted that, refer to Figure 4 The schematic diagram of the IEBlock module is shown in Figure 1. The IEBlock module is a key component of LQPN and is used for feature extraction in the downsampling part (part 1) and the prediction part (part 2). For the two-dimensional features of the input, H is the time dimension and W is the channel dimension. The role of IEBlock is to exchange information in different dimensions and output feature maps. The obtained features can be regarded as the time and channel features extracted from the input features.

[0046] The following is an example of the working process of the IEBlock module: First, IEBlock applies an MLP on each column of the input features ( ),in . This operation is called time mapping: in, . Time projection extracts features along the time dimension. IEBlock adopts a weight sharing strategy for all columns in the time map to improve efficiency. Next, IEBlock applies MLP on each row ( ) to extract channel information, a process called channel mapping: in, . Channel mapping exchanges information between different channels while keeping the input shape unchanged. Finally, IEBlock applies another MLP on each column ( ) Change the feature dimension from Map to , this process is called output projection: It can be seen that the dimension of the intermediate feature layer is much smaller than that of the output feature layer, which constitutes a bottleneck structure. The adoption of the bottleneck structure and the weight sharing strategy make the model parameters smaller. It can be seen that IEBlock can effectively extract short-distance and long-distance features in multivariate time series data.

[0047] Optionally, in this embodiment, when training the lightweight quality prediction network model, the collected data is divided into a training set and a validation set, the training set is used for model training, and the validation set is used to evaluate the performance of model parameters. Optionally, the LQPN model is trained using a stochastic gradient descent algorithm to establish a correlation model between meteorological data and crop quality.

[0048] Step S30, obtaining the quality prediction result corresponding to the target crop output by the lightweight quality prediction network.

[0049] In this embodiment, after prediction is performed using a trained lightweight quality prediction network model, a quality prediction result corresponding to the target crop output by the lightweight quality prediction network is obtained.

[0050] Optionally, in order to ensure the accuracy of the quality prediction results predicted by the model, the fitting coefficient The prediction results are evaluated to assess the performance and reliability of the model. The calculation formula is as follows: in, is the i-th indicator value of the predicted value, is the i-th indicator value of the true value, is the mean of the prediction vector, is the mean of the true value vector, is the number of quality indicators.

[0051] In the technical solution provided in this embodiment, a lightweight quality prediction network (LQPN) model provided with a lightweight information exchange module (IEBlock) is used to extract time and dimensional features from historical meteorological data with time series. The lightweight information exchange module can continuously extract multiple short-distance features from historical meteorological data, and can sample multiple long-distance features from multiple historical meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all marks in the historical meteorological data during the downsampling process, and converts the historical meteorological data into several non-overlapping subsequences, thereby avoiding the phenomenon of removing marks in time series data during downsampling in the traditional CNN convolutional neural model, improving the information completeness in the output prediction data, and thus improving the accuracy of the prediction data.

[0052] Second embodiment Based on the method proposed in the first embodiment, in this embodiment, tea quality indicators are predicted in Yunlong County, Dali Prefecture, and a small meteorological station is selected to collect historical meteorological data to predict the quality indicators of tea, a target crop.

[0053] The weather station monitors three types of meteorological data in Yunlong County from May 23, 2024 to May 29, 2024: air humidity, light intensity and air humidity. Figure 5 The schematic diagram of the change curve of air temperature in Yunlong County during the period is shown. Figure 6 The schematic diagram of the change curve of light intensity in Yunlong County during the cycle is shown, and Figure 7 The diagram shows the cyclical variation curve of air humidity in Yunlong County.

[0054] Furthermore, a tea quality experiment was conducted by picking 20 leaves from May 23, 2024 to May 29, 2024, and the following results were obtained: Figure 8 The tea quality index data of Yunlong County is shown.

[0055] Furthermore, the collected data was cleaned to remove outliers and duplicate data in the tea quality index data. The data was standardized or normalized to have the same scale, and the tea quality prediction LQPN model was constructed. The data was divided into training set, validation set and test set in a ratio of 8:1:1. The LQPN model was trained using the stochastic gradient descent algorithm to establish a correlation model between meteorological data and tea quality indicators. During the model training process, optimization algorithms such as stochastic gradient descent were used to improve the performance and generalization ability of the model. The training loss results were obtained by referring to Fig. 9 A graph of the network training loss is shown.

[0056] Furthermore, the trained model is used to predict the quality of tea leaves. It reaches 0.93, indicating that there is a high correlation between the model's prediction results and the actual observations.

[0057] Third embodiment Based on the method proposed in the first embodiment, in this embodiment, apple quality indicators are predicted in Zhaoyang District, Zhaotong City, and a small meteorological station is selected to collect historical meteorological data to predict the quality indicators of apples, a target crop.

[0058] The weather station monitors three types of meteorological data in Zhaoyang District from January 22, 2024 to January 30, 2024: air humidity, light intensity and air humidity. Fig.10 The schematic diagram of the change curve of air temperature in Zhaoyang District during the period is shown in the figure. Fig.11 The schematic diagram of the change curve of the light intensity in Zhaoyang District during the cycle is shown, and Fig.12 Shown is a schematic diagram of the periodic variation curve of air humidity in Zhaoyang District.

[0059] Furthermore, 15 apples were picked from January 22, 2024 to January 30, 2024 to conduct apple quality experiments. Fig.13 The apple quality index data of Zhaoyang District is shown.

[0060] Furthermore, the collected data was cleaned to remove outliers and duplicate data in the apple quality index data. The data was standardized or normalized to have the same scale, and the apple quality prediction LQPN model was constructed. The data was divided into training set, validation set and test set in a ratio of 8:1:1. The LQPN model was trained using the stochastic gradient descent algorithm to establish a correlation model between meteorological data and tea quality indicators. During the model training process, optimization algorithms such as stochastic gradient descent were used to improve the performance and generalization ability of the model. The training loss results were obtained by referring to Fig.14A graph of the network training loss is shown.

[0061] Furthermore, the trained model is used to predict the quality of apples. It reaches 0.86, indicating that there is a high correlation between the model's prediction results and the actual observations.

[0062] In addition, this embodiment also proposes a crop quality prediction device based on meteorological data, and the crop quality prediction device includes: The data collection module 100 is used to collect the historical daily meteorological data of the area where the target crop is located, and standardize the historical daily meteorological data; A deep learning module 200 is used to input the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, and the lightweight information exchange module can continuously extract multiple short-distance features from the historical daily meteorological data, and can sample multiple long-distance features from the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; the lightweight information exchange module includes a continuous sampling module and an interval sampling module, the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; The quality prediction module 300 is used to obtain the quality prediction result corresponding to the target crop output by the lightweight quality prediction network.

[0063] In addition, it can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the crop quality prediction system to implement the process steps of the embodiment of the above method.

[0064] Therefore, the present application also provides a computer-readable storage medium, which stores a crop quality prediction program based on meteorological data. When the crop quality prediction program based on meteorological data is executed by a processor, it implements the various steps of the crop quality prediction method based on meteorological data described in the above embodiment.

[0065] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0066] It should be noted that since the storage medium provided in the embodiment of the present application is the storage medium used to implement the method of the embodiment of the present application, based on the method introduced in the embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the method of the embodiment of the present application belong to the scope of protection of this application.

[0067] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0068] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0069] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0071] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0072] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0073] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for predicting crop quality based on meteorological data, characterized in that: The method comprises the following steps: Collecting historical daily meteorological data of the area where the target crop is located, and standardizing the historical daily meteorological data; Inputting the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, and the lightweight information exchange module can continuously extract multiple short-distance features in the historical daily meteorological data, and can sample multiple long-distance features in the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; The lightweight information exchange module includes a continuous sampling module and an interval sampling module, wherein the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; Obtain a quality prediction result corresponding to the target crop output by the lightweight quality prediction network.

2. The method according to claim 1, characterized in that The lightweight information exchange module includes a continuous sampling module, which can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and each subsequence constitutes a two-dimensional data matrix The expression in the jth column is: in, , T is the total length of the historical daily meteorological data, t is the last moment of the historical daily meteorological data, and R is a real number set.

3. The method according to claim 2, characterized in that The lightweight information exchange module includes an interval sampling module, which samples C token subsequences at a fixed time interval each time. The j-th column of the downsampling matrix is: 。 4. The method according to claim 3, characterized in that The calculation process of the lightweight information exchange module sampling the short-distance feature and the long-distance feature includes: in, is a short-range feature. For long-distance features, is the output feature of the continuous sampling branch IEBlock, is the output feature of the interval sampling branch IEBlock, Characterize the feature extraction process of IEBlock, is a fully connected layer, T is the total length of the historical daily meteorological data, C is the number of sampled sequences, N is the meteorological factor dimension, F is the time series channel dimension, and R is a real number set.

5. The method according to claim 1, characterized in that The steps of performing quality prediction corresponding to the target crop by the lightweight quality prediction network model include: The short-range features and the long-range features are fused in series and reshaped into a two-dimensional form. ; Through lightweight information exchange module Perform channel and time feature extraction: ,in, right Sum in the time dimension to get the final feature ,in, ; Will Substitute into the MLP function to get the final quality prediction result Q: in, , , , R is a real number set, N is the dimension of meteorological factors, is the time series channel dimension, and S is the number of quality indicators.

6. The method according to any one of claims 1 to 5, characterized in that: The lightweight information exchange module adopts a weight sharing strategy for all columns during the time mapping process, and the dimension of the intermediate feature layer of the lightweight information exchange module is smaller than the dimension of the output feature layer.

7. The method according to claim 1, characterized in that After the step of obtaining the quality prediction result corresponding to the target crop output by the lightweight quality prediction network, the method further includes: Using the fitting coefficients The quality prediction result is evaluated, wherein: The calculation formula is as follows: in, is the i-th indicator value of the predicted value, is the i-th indicator value of the true value, is the mean of the prediction vector, is the mean of the true value vector, is the number of quality indicators.

8. A crop quality prediction device based on meteorological data, characterized in that: The crop quality prediction device comprises: A data collection module, used to collect historical daily meteorological data of the area where the target crop is located, and standardize the historical daily meteorological data; A deep learning module, used for inputting the standardized historical daily meteorological data into a trained lightweight quality prediction network model for prediction, wherein the lightweight quality prediction network model is provided with a lightweight information exchange module, the lightweight information exchange module can continuously extract multiple short-distance features in the historical daily meteorological data, and can sample multiple long-distance features in the historical daily meteorological data at a fixed time interval, so that the lightweight quality prediction network model retains all tags in the historical daily meteorological data during the downsampling process, and converts the historical daily meteorological data into a number of non-overlapping subsequences; the lightweight information exchange module includes a continuous sampling module and an interval sampling module, the continuous sampling module can continuously select C tokens of length T / C from the historical daily meteorological data as subsequences, and the interval sampling module samples C token subsequences at a fixed time interval each time; The quality prediction module is used to obtain the quality prediction result corresponding to the target crop output by the lightweight quality prediction network.

9. A crop quality prediction system, characterized in that: The crop quality prediction system includes: a lightweight quality prediction network model, a memory, a processor, and a crop quality prediction program based on meteorological data stored in the memory and executable on the processor. When the crop quality prediction program based on meteorological data is executed by the processor, the steps of the crop quality prediction method based on meteorological data as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a crop quality prediction program based on meteorological data, and when the crop quality prediction program based on meteorological data is executed by a processor, the steps of the crop quality prediction method based on meteorological data as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Characteristic crop yield prediction method, device and storage medium

    CN117726051B

  • Characteristic crop yield prediction method and device and storage medium

    CN117726051A

  • Crop disease monitoring method and system based on Internet of Things

    CN118395735A