Agricultural data processing method and device, electronic equipment, storage medium and product
By aligning spatial and temporal data and standardizing data, a high-quality spatiotemporally coupled agricultural planting dataset is constructed, which solves the problem of insufficient data quality in existing technologies and enables precise analysis and decision support of data throughout the entire life cycle of crop growth.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SINOCHEM AGRI HLDG
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies fail to deeply mine the intrinsic value of agricultural planting datasets, resulting in poor data quality.
By aligning spatial locations based on geographic information and aligning time series based on crop phenological periods, a spatiotemporally coupled target agricultural planting dataset is constructed, including semantic association alignment of image and text data. A contextualized dataset is generated using a large language model, and data standardization is performed.
It improves the quality and accuracy of agricultural planting datasets, realizes the spatial and temporal coupling of data, and supports precise crop planting decisions and model training.
Smart Images

Figure CN122046202A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an agricultural data processing method, apparatus, electronic device, storage medium, and product. Background Technology
[0002] With the deepening application of the Internet of Things, remote sensing technology, and information technology in agriculture, agricultural production and management processes have generated a wide range of diverse and massive data resources. This data encompasses multi-source, multi-modal information, ranging from macro-level meteorological data, satellite remote sensing, and soil moisture data to micro-level field records, crop phenotypic images, and even agricultural scientific literature. Effectively integrating and utilizing this agricultural planting data has become a crucial foundation for unlocking the value of agricultural data and driving the development of smart agriculture.
[0003] Currently, when constructing agricultural planting datasets for analysis and modeling, existing methods typically only perform basic data cleaning and format standardization, or only conduct single-dimensional analysis. These data processing methods do not delve into the intrinsic value of agricultural data, resulting in agricultural planting datasets of poor quality.
[0004] Therefore, how to construct a high-quality agricultural planting dataset is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This invention provides an agricultural data processing method, apparatus, electronic device, storage medium, and product, which can realize the spatial and temporal coupling of agricultural planting data, greatly improving the quality and accuracy of agricultural planting datasets.
[0006] This invention provides an agricultural data processing method, comprising: Obtain raw agricultural planting data; Based on the geographical location information in the original agricultural planting data, the original agricultural planting data is spatially aligned to obtain an intermediate agricultural planting dataset. Using crop phenological periods as a benchmark, the intermediate agricultural planting dataset is time-series aligned to obtain the target agricultural planting dataset.
[0007] According to an agricultural data processing method provided by the present invention, the step of performing spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain an intermediate agricultural planting dataset includes: Analyze the geographic location information in the original agricultural planting data; If the geographic location information is a single latitude and longitude coordinate, then the corresponding original agricultural planting data will be classified as point-level spatial data; If the geographic location information is a continuous latitude and longitude coordinate sequence, then the corresponding original agricultural planting data will be classified as plot-level spatial data; If the geographic location information is a description of a region, then the corresponding original agricultural planting data will be classified as regional spatial data. Based on geospatial relationships, the point-level spatial data is associated with the corresponding plot-level spatial data to obtain updated plot-level spatial data; The intermediate agricultural planting dataset includes the point-level spatial data, the region-level spatial data, and the updated plot-level spatial data.
[0008] According to an agricultural data processing method provided by the present invention, the step of performing time series alignment processing on the intermediate agricultural planting dataset based on crop phenological periods to obtain a target agricultural planting dataset includes: Analyze the crop type and time information corresponding to each data point in the intermediate agricultural planting dataset; Obtain the growth period timeline of the crop type and determine the phenological period of the target crop corresponding to the time information; Based on the phenological period of the target crop, each data point in the intermediate agricultural planting dataset is embedded into the growth period time axis to obtain the target agricultural planting dataset.
[0009] According to an agricultural data processing method provided by the present invention, the original agricultural planting data includes image data and text data, and the agricultural data processing method further includes: Based on a preset scenario, the image data is labeled to obtain labeling information; Extract visual features from the image data and entity features from the text data; Using an agricultural knowledge graph, semantic association and alignment are performed on the labeled information, the visual features, and the entity features.
[0010] According to an agricultural data processing method provided by the present invention, after performing time series alignment processing on the intermediate agricultural planting dataset based on crop phenological periods to obtain the target agricultural planting dataset, the method further includes: Obtain contextualized prompts, which include target crop type and contextual parameters; wherein, the contextual parameters include at least one of planting area, planting target, and growth period constraints. Using a large language model, an agricultural planting scenario dataset is generated based on the contextualized prompt words and the target agricultural planting dataset.
[0011] According to an agricultural data processing method provided by the present invention, before performing spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain an intermediate agricultural planting dataset, the method further includes: Based on preset data standards, the original agricultural planting data is standardized to obtain standardized agricultural planting data; wherein, the standardization process includes at least one of the following processes: Based on preset classification and grading standards, the original agricultural planting data is classified and graded. The original agricultural planting data is formatted using a pre-established data dictionary. The formatting process includes at least one of the following dimensions: field type, encoding rules, and unit of measurement. The original agricultural planting data is cleaned using a data cleaning algorithm, which includes at least one of outlier handling, missing value handling, and duplicate data handling.
[0012] The present invention also provides an agricultural data processing device, comprising: The data acquisition module is used to acquire raw agricultural planting data; The spatial alignment module is used to perform spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain an intermediate agricultural planting dataset. The time alignment module is used to perform time series alignment processing on the intermediate agricultural planting dataset based on the phenological period of crops to obtain the target agricultural planting dataset.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the agricultural data processing method described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the agricultural data processing method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the agricultural data processing method as described above.
[0016] The agricultural data processing method, apparatus, electronic device, storage medium, and product provided by this invention acquire raw agricultural planting data; then, based on the geographical location information in the raw agricultural planting data, spatial alignment processing is performed on the agricultural planting data to integrate the data onto a unified geospatial benchmark, resulting in a spatially aligned intermediate agricultural planting dataset; further, using crop phenological periods as a benchmark, time-series alignment processing is performed on the intermediate agricultural planting dataset to further integrate the data onto a unified crop physiological time benchmark, resulting in a spatiotemporally coupled target agricultural planting dataset. The target agricultural planting dataset constructed through this systematic approach not only focuses on the entire life cycle data of crops but also on their spatial differences, achieving spatial and temporal coupling of agricultural planting data and significantly improving the quality and accuracy of the agricultural planting dataset. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts of the agricultural data processing method provided by the present invention.
[0019] Figure 2 This is the second flowchart of the agricultural data processing method provided by the present invention.
[0020] Figure 3 This is the third flowchart of the agricultural data processing method provided by the present invention.
[0021] Figure 4 This is the fourth flowchart of the agricultural data processing method provided by the present invention.
[0022] Figure 5 This is a schematic diagram of the structure of the agricultural data processing device provided by the present invention.
[0023] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] This invention proposes an agricultural data processing method, apparatus, electronic device, storage medium, and product, which are described below in conjunction with... Figures 1-6 Describe it.
[0026] Figure 1 This is one of the flowcharts illustrating the agricultural data processing method provided by the present invention, such as... Figure 1 As shown, the agricultural data processing method includes steps S110, S120 and S130.
[0027] Step S110: Obtain raw agricultural planting data.
[0028] Agricultural planting-related data are obtained through multi-source data collection methods and recorded as raw agricultural planting data.
[0029] Considering that existing high-quality agricultural planting datasets serving agricultural analysis models heavily rely on online resources, professional books, and literature, primarily consisting of text data, they fail to fully leverage the value of data collected by farmers in traditional agricultural scenarios—including both structured monitoring data and unstructured experience data. Therefore, in this embodiment of the invention, the original agricultural planting data can specifically originate from the following three types of data sources: Literature data: Data related to agricultural planting processes extracted from agricultural monographs, experimental reports, and academic literature constitute the basic dataset; Field record data: Process data recorded by agricultural growers throughout the entire crop growing season, specifically covering data from land preparation, sowing, crop nutrient regulation, plant protection, growth status monitoring, and harvesting. Hardware sensor data: Environmental and biological indicator data collected in real time through sensing devices such as soil moisture meters, weather stations, and insect pest meters.
[0030] Step S120: Based on the geographical location information in the original agricultural planting data, perform spatial location alignment processing on the original agricultural planting data to obtain an intermediate agricultural planting dataset.
[0031] After obtaining the original agricultural planting data, spatial alignment processing is performed on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain a spatially aligned agricultural planting dataset, which is denoted as the intermediate agricultural planting dataset.
[0032] In one embodiment, the process of obtaining the intermediate agricultural planting dataset is as follows: parsing the geographic location information in the original agricultural planting data; if the geographic location information is a single latitude and longitude coordinate, the corresponding original agricultural planting data is classified as point-level spatial data; if the geographic location information is a continuous latitude and longitude coordinate sequence, the corresponding original agricultural planting data is classified as plot-level spatial data; if the geographic location information is regional range description information, the corresponding original agricultural planting data is classified as regional spatial data; wherein, the intermediate agricultural planting dataset includes point-level spatial data, regional spatial data, and plot-level spatial data.
[0033] In another embodiment, the process of obtaining the intermediate agricultural planting dataset is as follows: parsing the geographic location information in the original agricultural planting data; if the geographic location information is a single latitude and longitude coordinate, the corresponding original agricultural planting data is classified as point-level spatial data; if the geographic location information is a continuous latitude and longitude coordinate sequence, the corresponding original agricultural planting data is classified as plot-level spatial data; if the geographic location information is regional range description information, the corresponding original agricultural planting data is classified as regional-level spatial data; based on geospatial relationships, the point-level spatial data is associated with the corresponding plot-level spatial data to obtain updated plot-level spatial data; wherein, the intermediate agricultural planting dataset includes point-level spatial data, regional-level spatial data, and updated plot-level spatial data.
[0034] The specific spatial alignment process can be referred to in the following embodiments, which will not be elaborated here.
[0035] Step S130: Based on the phenological period of crops, perform time series alignment processing on the intermediate agricultural planting dataset to obtain the target agricultural planting dataset.
[0036] Based on the spatially aligned agricultural planting dataset (i.e., intermediate agricultural planting dataset) constructed above, the data in the intermediate agricultural planting dataset are time-series aligned with the crop phenological period as the benchmark to obtain a spatiotemporally coupled agricultural planting dataset, denoted as the target agricultural planting dataset.
[0037] Among them, the phenological period refers to the stage in which crops undergo significant changes in morphological and physiological characteristics due to environmental influences during their growth process, such as the sowing period, seedling emergence period, jointing period, heading period, and maturity period.
[0038] Specifically, the process of obtaining the target agricultural planting dataset is as follows: Parse the crop type and its time information corresponding to each data point in the intermediate agricultural planting dataset; obtain the growth period timeline of the crop type and determine the phenological period of the target crop corresponding to the time information; based on the phenological period of the target crop, embed each data point in the intermediate agricultural planting dataset into the growth period timeline to obtain the target agricultural planting dataset. The specific time series alignment process can be found in the following embodiment, and will not be elaborated here.
[0039] Through the above methods, the original agricultural planting data is coupled in time and space to form a structured dataset indexed by "specific space (such as plot) - phenological period", which is the target agricultural planting dataset.
[0040] The agricultural data processing method provided in this invention obtains raw agricultural planting data; then, based on the geographical location information in the raw agricultural planting data, it performs spatial location alignment processing on the agricultural planting data to integrate the data onto a unified geospatial benchmark, obtaining a spatially aligned intermediate agricultural planting dataset; further, using crop phenological periods as a benchmark, it performs time series alignment processing on the intermediate agricultural planting dataset to further integrate the data onto a unified crop physiological time benchmark, obtaining a spatiotemporally coupled target agricultural planting dataset. The target agricultural planting dataset constructed through this systematic approach not only focuses on the entire life cycle data of crops but also on their spatial differences, achieving spatial and temporal coupling of agricultural planting data and greatly improving the quality and accuracy of the agricultural planting dataset.
[0041] Based on any of the above embodiments, step S120 includes: step S121, step S122, step S123, step S124 and step S125.
[0042] It should be noted that the execution order of steps S122, S123 and S124 is not important and they can be executed in parallel.
[0043] Step S121: Analyze the geographical location information in the original agricultural planting data.
[0044] Given the general lack of spatial location information in publicly available agricultural production and planting data, the guiding value of this data for specific agricultural practices is limited. While some data do record spatial locations, the accuracy suffers from scale bias. For example, in disease records, most data only pinpoints administrative regions such as counties, townships, or villages, lacking more refined spatial scale annotations. When an administrative region spans multiple agricultural micro-ecosystems, accumulated temperature zones, or other natural geographical divisions, such coarse location information is insufficient to effectively support refined agricultural production decisions. For instance, Province A encompasses six different accumulated temperature zones; crops suitable only for the first zone cannot be promoted in other zones. Therefore, if the data only labels the broad location "Province A," its guiding significance for specific planting decisions is extremely limited. Furthermore, while data with coordinates provides highly accurate spatial locations, the range it represents is uncertain, reducing data accuracy. For example, a single point might represent data for 10 mu, 100 mu, or 300 mu of land. Therefore, in this embodiment of the invention, data from different sources and with different levels of precision are spatially aligned under a unified geographic coordinate system to construct a spatially aligned agricultural planting dataset.
[0045] First, analyze the geographic location information in each piece of original agricultural planting data. The geographic location information can be specific latitude and longitude coordinates or location description information.
[0046] Based on the accuracy of the spatial information representation contained in the data, the data is divided into the following three types of spatial data: parcel-level spatial data, regional-level spatial data, and regional-level spatial data.
[0047] Among them, plot-level spatial data, which is farm plot data collected through digital surveying tools, uses continuous latitude and longitude coordinates to define plot boundaries, achieving precise matching of data with spatial location and scale.
[0048] Point-level spatial data refers to data collected and recorded manually in scenarios such as agricultural operations and field inspections. This type of data contains precise spatial coordinates and is generally data on the microscopic characteristics of crops.
[0049] Regional spatial data are generalized data that use administrative units such as provinces, cities, counties, and villages or road locations as the basis for spatial description. They have regional relevance but low spatial accuracy.
[0050] Step S122: If the geographic location information is a single latitude and longitude coordinate, then the corresponding original agricultural planting data is classified into point-level spatial data.
[0051] If the geographic location information is a single latitude and longitude coordinate, for example, [longitude 116.3, latitude 39.9], then the corresponding original agricultural planting data is classified as point-level spatial data.
[0052] Step S123: If the geographic location information is a continuous latitude and longitude coordinate sequence, then the corresponding original agricultural planting data is classified as plot-level spatial data.
[0053] If the geographic location information is a continuous sequence of latitude and longitude coordinates, i.e., a closed polygonal latitude and longitude sequence, such as {[longitude 116.3, latitude 39.9], [longitude 116.4, latitude 39.9], [longitude 116.4, latitude 40.0], [longitude 116.3, latitude 40.0]}, this usually represents a specific farmland plot. Therefore, the corresponding raw agricultural planting data is classified as plot-level spatial data.
[0054] Step S124: If the geographic location information is regional range description information, then the corresponding original agricultural planting data is classified as regional spatial data.
[0055] If the geographic location information is a description of a region, such as Province A, City B, County C, and Village D, then the corresponding original agricultural planting data is classified as regional spatial data.
[0056] Step S125: Based on geospatial relationships, associate the point-level spatial data with the corresponding plot-level spatial data to obtain updated plot-level spatial data.
[0057] The intermediate agricultural planting dataset includes the point-level spatial data, the region-level spatial data, and the updated plot-level spatial data.
[0058] Furthermore, based on the accuracy of the spatial information, a hierarchical and classification processing strategy is adopted.
[0059] For precise coordinate data, namely point-level spatial data and plot-level spatial data, association can be based on geospatial relationships. Specifically, based on the geographical location information of point-level spatial data, the plot to which it belongs is determined, and then it is associated with the corresponding plot-level spatial data, making the updated plot-level spatial data information richer.
[0060] For example, if a point-level soil temperature sensor (coordinate point P) is found to be located inside a wheat field polygon Q defined by plot-level data, the following association is established: all observation data from sensor P are merged into the dataset of plot Q. In this way, the dataset of plot Q can further include detailed environmental monitoring data within it, making the data richer.
[0061] It should be noted that the updated plot-level spatial data mentioned above has richer data dimensions, allowing for the acquisition of plot details for pre-planting crop planning. Furthermore, based on this updated plot-level spatial data, a spatiotemporal coupling algorithm can be used to fuse it with planting process data for regional crop planting decision-making and execution plan generation, such as developing precise fertilization plans.
[0062] Descriptive data, i.e., regional spatial data, can serve as a data source for constructing agricultural common sense bases and basic knowledge bases.
[0063] Ultimately, the resulting intermediate agricultural planting dataset includes point-level spatial data, regional-level spatial data, and updated plot-level spatial data.
[0064] The agricultural data processing method provided in this invention spatially aligns and merges data from different sources and with different levels of precision under a unified geographic coordinate system, thereby constructing a multi-level spatial data structure. This provides a foundation for subsequent precise management and spatiotemporal analysis with different levels of precision and purposes.
[0065] Based on any of the above embodiments Figure 2 This is a second flowchart illustrating the agricultural data processing method provided by the present invention, as shown below. Figure 2 As shown, step S130 includes: step S131, step S132 and step S133.
[0066] Step S131: Analyze the crop type and time information corresponding to each data point in the intermediate agricultural planting dataset.
[0067] Crop growth is a dynamic and continuous process. Influenced by multiple factors such as crop type, natural conditions, and management practices, even within the same region, crop growth trajectories exhibit significant spatiotemporal differences. From a data science perspective, this process is essentially a multi-dimensional data set unfolding along the growth timeline. It systematically integrates key information from each stage of the entire agricultural production process, forming a time-series dataset that spans the crop growth cycle. This type of data is of significant value for training agricultural analysis models, simulating growth processes, and conducting analysis, decision-making, and optimization in specific scenarios.
[0068] In this embodiment of the invention, the crop type and time information corresponding to each data point in the intermediate agricultural planting dataset are first analyzed.
[0069] Step S132: Obtain the growth period time axis of the crop type and determine the phenological period of the target crop corresponding to the time information.
[0070] Then, obtain the growth period timeline of the crop type and determine the phenological period of the crop corresponding to the time information, which is recorded as the target crop phenological period.
[0071] For example, taking corn as an example, its growth cycle includes: sowing period, emergence period, three-leaf stage, jointing stage, small trumpet stage, large trumpet stage, tasseling stage, silking stage, grain formation stage, milk stage, waxy stage, sunken stage, and maturity stage. Taking fertilization as an example, since corn may be fertilized multiple times at different growth stages, the timing information of these multiple fertilizations can be analyzed. Then, the phenological period corresponding to each fertilization time can be determined. For example, if the first fertilization is on April 25, 2025, this date falls within the time period corresponding to the corn sowing period; therefore, the phenological period corresponding to the first fertilization is the sowing period.
[0072] Step S133: Based on the phenological period of the target crop, embed each data point in the intermediate agricultural planting dataset into the growth period time axis to obtain the target agricultural planting dataset.
[0073] Based on the phenological periods of the target crops identified above, each data point in the intermediate agricultural planting dataset is embedded into the corresponding growth period time axis to finally obtain the target agricultural planting dataset.
[0074] For example, taking the corn fertilization operation in the above example as an example, the corn fertilization operation record table can be generated as shown in Table 1 below.
[0075] Table 1 For other agricultural operations and field monitoring and survey data, similar to fertilization records, they are systematically collected and archived based on the crop growth period. On the basis of spatial alignment, a dataset with complete temporal sequence and information alignment is formed, which also achieves strict synchronization and matching in the crop growth cycle and time dimension.
[0076] The agricultural data processing method provided in this invention aligns data along the crop growth cycle by using phenological periods instead of calendar time as the baseline, making crop planting data from different plots and sowing dates comparable. Furthermore, training the model based on this dataset improves its generalization ability and robustness.
[0077] Based on any of the above embodiments, the original agricultural planting data includes image data and text data. Figure 3 This is the third flowchart of the agricultural data processing method provided by the present invention, as shown below. Figure 3 As shown, the agricultural data processing method further includes steps S140, S150 and S160.
[0078] Step S140: Based on a preset scenario, the image data is labeled to obtain labeling information.
[0079] Considering that agricultural planting data often encompasses multimodal data such as text and images recorded during agricultural production, while traditional agricultural data processing methods typically focus on processing single-modal data, this invention achieves deep association of multimodal agricultural planting data by performing semantic association alignment on image and text data related to agricultural planting.
[0080] Raw agricultural planting data includes image data and text data.
[0081] Image data includes, but is not limited to, remote sensing images and RGB images. Remote sensing images, based on their spatial resolution, can reflect the comprehensive characteristics of crop populations and are used to monitor growth dynamics and trends. RGB images collected during field inspections focus more on individual plant and organ scales, such as stem and leaf morphology, and microscopic features like pest and disease symptoms. Through these two types of images, a multi-level, multi-modal visual data chain, from the macroscopic population to the microscopic organs, can be formed on a single plot of land, constructing a three-dimensional information system covering different spatial scales and observation dimensions.
[0082] To enable the model to learn the features of data from specific scenarios in agricultural planting processes for subsequent applications on the dataset, image data can be labeled accordingly based on preset scenarios to obtain annotation information. Specifically, a mapping relationship between different scenarios and annotation information can be established, and the annotation information can be determined based on this mapping relationship. For example, in the scenario of identifying crop diseases and pests, the annotation information for a certain corn image data could be corn leaf blight.
[0083] Step S150: Extract the visual features of the image data and extract the entity features from the text data.
[0084] Then, visual features are extracted from the image data, and entity features are extracted from the text data.
[0085] Visual features include, but are not limited to, texture features, shape features, and color features. Visual features can be extracted using pre-trained computer vision models, such as Convolutional Neural Network (CNN) models.
[0086] For example, visual features are extracted from the corn image data in step S140 to obtain the following visual features: the lesion shape is spindle-shaped or cigar-shaped, the lesion color is grayish-brown, and the edge of the lesion has a dark outline.
[0087] Entity features refer to the attributes, properties, or data dimensions that describe or define a specific entity, including but not limited to: time, phenological period, symptoms, and triggering conditions. Entity features can be extracted using Natural Language Processing (NLP) models.
[0088] For example, entity features are extracted from the text "It's been raining and humid for the past week...", resulting in the following entity features: continuous rain and high humidity.
[0089] Step S160: Using an agricultural knowledge graph, semantic association and alignment are performed on the annotation information, the visual features, and the entity features.
[0090] Labeling information, visual features, and entity features are input into a pre-built agricultural knowledge graph, which is then used for querying and reasoning to achieve semantic alignment.
[0091] For example, suppose an agricultural knowledge graph contains the following triples: [Maize leaf spot, symptoms, cigar-shaped lesions], [Maize leaf spot, inducing conditions, high humidity environment], [continuous rain, leading to high humidity environment], [Maize leaf spot, susceptible period, large trumpet stage].
[0092] Through graph reasoning algorithms, a complete logical chain was discovered: continuous rainy weather led to a high humidity environment, which happens to be the inducing condition for corn leaf blight. The crop was in a susceptible period (large trumpet stage), and the cigar-shaped lesions it exhibited were also the typical symptoms of the disease.
[0093] The above process no longer views image and text data in isolation, but rather aligns them semantically within a framework of agricultural knowledge. This approach enables pest and disease identification models in applications to not only confirm disease diagnoses but also understand the causal pathways of disease occurrence, thus improving model effectiveness and interpretability.
[0094] The agricultural data processing method provided in this invention achieves deep semantic fusion of cross-modal data by standardizing image data with fine granularity and combining it with agricultural knowledge graphs. This enables subsequent agricultural analysis models to comprehensively understand the same agronomic phenomenon behind image representations and textual descriptions, significantly improving the model's effectiveness and interpretability.
[0095] Based on any of the above embodiments Figure 4 This is the fourth flowchart of the agricultural data processing method provided by the present invention, as shown below. Figure 4 As shown, after step S130, the agricultural data processing method further includes steps S170 and S180.
[0096] Step S170: Obtain contextualized prompts, which include target crop type and contextual parameters; wherein, the contextual parameters include at least one of planting area, planting target and growth period constraints.
[0097] Traditional agricultural planting data, whether structured or unstructured, is typically not processed into high-quality datasets and cannot be directly used to train large models. Therefore, in this embodiment of the invention, the spatiotemporally coupled agricultural planting dataset (i.e., the target agricultural planting dataset) is further intelligently transformed into a scenario-based agricultural planting dataset. This provides a high-quality dataset with both domain-specific expertise and scenario generalizability for subsequent agricultural analysis model training, contributing to the further development of intelligent agriculture.
[0098] Since different crops have unique planting characteristics, in order to improve the accuracy of the dataset, in this embodiment of the invention, a detailed prompt word for the scene is first constructed, which is denoted as the scene-specific prompt word.
[0099] The scenario-based prompts include the target crop type and scenario parameters. The target crop type is the type of crop to be analyzed; scenario parameters include, but are not limited to, planting area, planting objectives, and growth period constraints; planting objectives are the measurable results that agricultural planting ultimately aims to achieve, which may include, but are not limited to, yield targets, quality targets, efficiency and cost targets, and ecological and environmental protection targets; growth period constraints are parameters that limit the entire growth cycle or specific phenological stages of the crop.
[0100] For example, a scenario-based prompt could be: "Design a high-yield, water-saving fertilization and irrigation scheme for summer maize in the Huang-Huai-Hai Plain, focusing on the jointing to tasseling stage." In this prompt, the planting area is the Huang-Huai-Hai Plain, the target crop type is summer maize, the planting objective is high yield and water saving, and the growth period constraint is the jointing to tasseling stage.
[0101] Step S180: Using a large language model, based on the contextualized prompt words and the target agricultural planting dataset, generate an agricultural planting contextualized dataset.
[0102] Based on the generative capabilities of large language models, the aforementioned contextualized prompts can drive the automated generation of contextualized datasets for agricultural planting.
[0103] In one implementation, contextualized prompts are input into a Large Language Model (LLM). The LLM retrieves the target agricultural planting dataset based on the contextualized prompts and generates a contextualized agricultural planting dataset based on the retrieval results.
[0104] In another implementation, a large language model is fine-tuned based on a target agricultural planting dataset. Then, contextualized prompts are input into the fine-tuned large language model. The fine-tuned large language model generates an agricultural planting contextualized dataset based on the contextualized prompts and the knowledge learned from the target agricultural planting dataset.
[0105] The agricultural data processing method provided in this invention, based on the powerful generation and reasoning capabilities of a large language model and the aforementioned spatiotemporally coupled target agricultural planting dataset, can generate high-quality datasets for various scenarios on demand and at low cost, providing reliable and efficient data for various analysis, decision-making and execution applications in smart agriculture.
[0106] Based on any of the above embodiments, before step S110, the agricultural data processing method further includes step S190.
[0107] Step S190: Based on preset data standards, the original agricultural planting data is standardized to obtain standardized agricultural planting data.
[0108] In the field of agricultural planting, although national, industry, and local standards have been established to regulate the relevant content of agricultural data, these standards focus on data informatization and lack data standards for each stage of the field planting process. Therefore, the existing agricultural data standard system remains incomplete, with high dispersion of individual data points. Thus, this invention constructs a unified data standard system to standardize raw agricultural planting data.
[0109] After obtaining the raw agricultural planting data, it is first standardized based on preset data standards to obtain standardized agricultural planting data. Then, spatial alignment processing is performed based on the geographical location information in the raw agricultural planting data to obtain an intermediate agricultural planting dataset.
[0110] Preset data standards include, but are not limited to: classification and grading standards, data field processing standards, and data labeling standards. Among them, data field processing standards may include, but are not limited to: format standardization standards and data cleaning standards.
[0111] Further, step S190 includes at least one of step S191, step S192 and step S193.
[0112] Step S191: Based on preset classification and grading standards, classify and grade the original agricultural planting data.
[0113] Preset classification and grading standards, including preset classification standards and preset grading standards, can be built around the needs of agricultural production and planting as well as large-scale model construction.
[0114] The pre-defined classification standards can include, but are not limited to: basic knowledge, agricultural natural resources, agricultural social resources, agricultural production, agricultural management, and agricultural products. The pre-defined grading standards further subdivide these categories into one or more levels. For example, the basic knowledge category can be further subdivided into second-level categories, including laws and regulations, policies and systems, and basic agricultural knowledge. Similarly, the natural resources category can be subdivided into second-level categories: land, meteorology, water resources, and biology. Furthermore, each second-level category can be further subdivided into corresponding third-level categories. For example, the third-level category for land includes topography, geographical location, and soil properties; the third-level category for meteorology includes numerical analysis and forecast products and surface meteorological data; the third-level category for water resources includes surface water and groundwater; and the third-level category for biology includes beneficial organisms and microorganisms.
[0115] Step S192: The original agricultural planting data is formatted using a pre-established data dictionary. The formatting process includes at least one of field type, encoding rules, and unit of measurement.
[0116] The pre-built data dictionary defines the standard format of all fields, including but not limited to: field type, encoding rules, and unit of measurement.
[0117] For standardized formatting of field types, the data type and format of each field can be specified. For example, the date field can be in the format "YYYY-MM-DD", and the data type of daily precipitation can be numeric.
[0118] For the standardization of encoding rules, encoding tables for each category can be specified to convert different categories into corresponding identifiers. For example, the identifier for daily precipitation is B02010101, and the identifier for daily maximum temperature is B02010201.
[0119] For example, the format of measurement units is standardized by automatically converting "mu" to "hectare", "jin" to "kilogram", and "Fahrenheit" to "Celsius", etc., to eliminate ambiguity in data encoding and units and ensure the accuracy of subsequent calculations.
[0120] Data format consistency can be achieved through format standardization.
[0121] Step S193: The original agricultural planting data is cleaned using a data cleaning algorithm. The data cleaning process includes at least one of outlier handling, missing value handling, and duplicate data handling.
[0122] For different types of data cleaning processes, corresponding data cleaning algorithms can be set.
[0123] For handling outliers, threshold rules can be set to identify them, mark them for verification, or they can be directly deleted. For example, if weather station data shows a temperature of 200℃ for the day, this value is far beyond the normal range and is therefore considered an outlier.
[0124] For handling missing values, nearest neighbor interpolation or linear interpolation can be used to supplement them.
[0125] For processing duplicate data, deduplication can be performed based on dimensions such as time information, location information, and data source.
[0126] Data cleaning processes can ensure the integrity and accuracy of data.
[0127] The agricultural data processing method provided in this invention establishes a unified data standard system. Through the above-mentioned standardization process, the consistency, high quality, and integrity of the data used in all subsequent processing steps are ensured, thereby improving the quality and reliability of subsequent datasets from the source.
[0128] The agricultural data processing apparatus provided by the present invention is described below. The agricultural data processing apparatus described below and the agricultural data processing method described above can be referred to in correspondence.
[0129] Figure 5 This is a schematic diagram of the agricultural data processing device provided by the present invention, as shown below. Figure 5 As shown, the device includes a data acquisition module 510, a spatial alignment module 520, and a time alignment module 530; wherein: Data acquisition module 510 is used to acquire raw agricultural planting data; The spatial alignment module 520 is used to perform spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain an intermediate agricultural planting dataset. The time alignment module 530 is used to perform time series alignment processing on the intermediate agricultural planting dataset based on the phenological period of crops to obtain the target agricultural planting dataset.
[0130] The agricultural data processing apparatus provided in this embodiment of the invention acquires raw agricultural planting data; then, based on the geographical location information in the raw agricultural planting data, it performs spatial location alignment processing on the agricultural planting data to integrate the data onto a unified geospatial benchmark, obtaining a spatially aligned intermediate agricultural planting dataset; further, using crop phenological periods as a benchmark, it performs time series alignment processing on the intermediate agricultural planting dataset to further integrate the data onto a unified crop physiological time benchmark, obtaining a spatiotemporally coupled target agricultural planting dataset. The target agricultural planting dataset constructed through this systematic approach not only focuses on the entire life cycle data of crops but also on their spatial differences, achieving spatial and temporal coupling of agricultural planting data and greatly improving the quality and accuracy of the agricultural planting dataset.
[0131] According to an agricultural data processing device provided by the present invention, the spatial alignment module 520 is specifically used for: Analyze the geographic location information in the original agricultural planting data; If the geographic location information is a single latitude and longitude coordinate, then the corresponding original agricultural planting data will be classified as point-level spatial data; If the geographic location information is a continuous latitude and longitude coordinate sequence, then the corresponding original agricultural planting data will be classified as plot-level spatial data; If the geographic location information is a description of a region, then the corresponding original agricultural planting data will be classified as regional spatial data. Based on geospatial relationships, the point-level spatial data is associated with the corresponding plot-level spatial data to obtain updated plot-level spatial data; The intermediate agricultural planting dataset includes the point-level spatial data, the region-level spatial data, and the updated plot-level spatial data.
[0132] According to an agricultural data processing device provided by the present invention, the time alignment module 530 is specifically used for: Analyze the crop type and time information corresponding to each data point in the intermediate agricultural planting dataset; Obtain the growth period timeline of the crop type and determine the phenological period of the target crop corresponding to the time information; Based on the phenological period of the target crop, each data point in the intermediate agricultural planting dataset is embedded into the growth period time axis to obtain the target agricultural planting dataset.
[0133] According to an agricultural data processing apparatus provided by the present invention, the raw agricultural planting data includes image data and text data, and the agricultural data processing apparatus further includes: The image annotation module is used to annotate the image data based on a preset scene to obtain annotation information; The feature extraction module is used to extract visual features from the image data and entity features from the text data; The semantic association module is used to perform semantic association and alignment of the annotation information, the visual features, and the entity features using an agricultural knowledge graph.
[0134] According to an agricultural data processing device provided by the present invention, the agricultural data processing device further includes: The prompt word acquisition module is used to acquire contextual prompt words, which include target crop type and scenario parameters; wherein, the scenario parameters include at least one of planting area, planting target and growth period constraints; The dataset generation module is used to generate an agricultural planting scenario dataset based on the scenario-based prompt words and the target agricultural planting dataset using a large language model.
[0135] According to an agricultural data processing device provided by the present invention, the agricultural data processing device further includes: A standardization processing module is used to standardize the original agricultural planting data based on a preset data standard to obtain standardized agricultural planting data; wherein the standardization processing includes at least one of the following processes: Based on preset classification and grading standards, the original agricultural planting data is classified and graded. The original agricultural planting data is formatted using a pre-established data dictionary. The formatting process includes at least one of the following dimensions: field type, encoding rules, and unit of measurement. The original agricultural planting data is cleaned using a data cleaning algorithm, which includes at least one of outlier handling, missing value handling, and duplicate data handling.
[0136] It should be noted that the agricultural data processing device provided in this embodiment of the invention can implement all the method steps implemented in the above-mentioned agricultural data processing method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0137] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute an agricultural data processing method. This method includes: acquiring raw agricultural planting data; performing spatial alignment processing on the raw agricultural planting data based on geographical location information to obtain an intermediate agricultural planting dataset; and performing time series alignment processing on the intermediate agricultural planting dataset based on crop phenological periods to obtain a target agricultural planting dataset. Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0138] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the agricultural data processing method provided by the above methods. The method includes: acquiring raw agricultural planting data; performing spatial alignment processing on the raw agricultural planting data based on the geographical location information in the raw agricultural planting data to obtain an intermediate agricultural planting dataset; and performing time series alignment processing on the intermediate agricultural planting dataset based on the phenological period of crops to obtain a target agricultural planting dataset.
[0139] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the agricultural data processing method provided by the above methods. The method includes: acquiring raw agricultural planting data; performing spatial alignment processing on the raw agricultural planting data based on the geographical location information in the raw agricultural planting data to obtain an intermediate agricultural planting dataset; and performing time series alignment processing on the intermediate agricultural planting dataset based on the phenological period of crops to obtain a target agricultural planting dataset.
[0140] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units 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 achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An agricultural data processing method, characterized in that, include: Obtain raw agricultural planting data; Based on the geographical location information in the original agricultural planting data, the original agricultural planting data is spatially aligned to obtain an intermediate agricultural planting dataset. Using crop phenological periods as a benchmark, the intermediate agricultural planting dataset is time-series aligned to obtain the target agricultural planting dataset.
2. The agricultural data processing method according to claim 1, characterized in that, The intermediate agricultural planting dataset is obtained by spatially aligning the original agricultural planting data based on the geographic location information in the original agricultural planting data, including: Analyze the geographic location information in the original agricultural planting data; If the geographic location information is a single latitude and longitude coordinate, then the corresponding original agricultural planting data will be classified as point-level spatial data; If the geographic location information is a continuous latitude and longitude coordinate sequence, then the corresponding original agricultural planting data will be classified as plot-level spatial data; If the geographic location information is a description of a region, then the corresponding original agricultural planting data will be classified as regional spatial data. Based on geospatial relationships, the point-level spatial data is associated with the corresponding plot-level spatial data to obtain updated plot-level spatial data; The intermediate agricultural planting dataset includes the point-level spatial data, the region-level spatial data, and the updated plot-level spatial data.
3. The agricultural data processing method according to claim 1, characterized in that, The intermediate agricultural planting dataset is time-series aligned based on crop phenological periods to obtain the target agricultural planting dataset, which includes: Analyze the crop type and time information corresponding to each data point in the intermediate agricultural planting dataset; Obtain the growth period timeline of the crop type and determine the phenological period of the target crop corresponding to the time information; Based on the phenological period of the target crop, each data point in the intermediate agricultural planting dataset is embedded into the growth period time axis to obtain the target agricultural planting dataset.
4. The agricultural data processing method according to any one of claims 1 to 3, characterized in that, The original agricultural planting data includes image data and text data, and the agricultural data processing method further includes: Based on a preset scenario, the image data is labeled to obtain labeling information; Extract visual features from the image data and entity features from the text data; Using an agricultural knowledge graph, semantic association and alignment are performed on the labeled information, the visual features, and the entity features.
5. The agricultural data processing method according to any one of claims 1 to 3, characterized in that, After performing time-series alignment processing on the intermediate agricultural planting dataset based on crop phenological periods to obtain the target agricultural planting dataset, the process further includes: Obtain contextualized prompts, which include target crop type and contextual parameters; wherein, the contextual parameters include at least one of planting area, planting target, and growth period constraints. Using a large language model, an agricultural planting scenario dataset is generated based on the contextualized prompt words and the target agricultural planting dataset.
6. The agricultural data processing method according to any one of claims 1 to 3, characterized in that, Before performing spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain the intermediate agricultural planting dataset, the process further includes: Based on preset data standards, the original agricultural planting data is standardized to obtain standardized agricultural planting data; wherein, the standardization process includes at least one of the following processes: Based on preset classification and grading standards, the original agricultural planting data is classified and graded. The original agricultural planting data is formatted using a pre-established data dictionary. The formatting process includes at least one of the following dimensions: field type, encoding rules, and unit of measurement. The original agricultural planting data is cleaned using a data cleaning algorithm, which includes at least one of outlier handling, missing value handling, and duplicate data handling.
7. An agricultural data processing device, characterized in that, include: The data acquisition module is used to acquire raw agricultural planting data; The spatial alignment module is used to perform spatial alignment processing on the original agricultural planting data based on the geographical location information in the original agricultural planting data to obtain an intermediate agricultural planting dataset. The time alignment module is used to perform time series alignment processing on the intermediate agricultural planting dataset based on the phenological period of crops to obtain the target agricultural planting dataset.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the agricultural data processing method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the agricultural data processing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the agricultural data processing method as described in any one of claims 1 to 6.