Agricultural environment twin modeling method and system based on multi-source data fusion
Patent Information
- Application Number
- CN202611267003.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本发明提供了一种基于多源数据融合的农业环境孪生建模方法及系统,以解决多源数据因量纲差异与空间尺度失配而难以在统一框架下实现逐点精确映射的问题
[0016](1)本发明通过获取目标区域的空间影像与地面传感读数,对多源数据进行结构化提取以生成初始环境信息,并进一步分析各环境指标之间的关联特征,依据各指标对整体环境状态的实际贡献程度分配相应的转换权重,将不同物理量纲的监测数据映射至统一的数值基准区间。该方案使光照、温度、湿度、养分等来源不同、量纲各异的环境指标能够在统一的数值体系下参与后续的空间建模与运算,从而消除了多源异构数据之间的量纲壁垒。
Smart Images

Figure CN123013467A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural informatization and digital twin technology, and in particular to an agricultural environment twin modeling method and system based on multi-source data fusion. Background Technology
[0002] Currently, digital twin technology constructs virtual models that are one-to-one mapped to real farmland. It uses multi-source sensors, satellite remote sensing, UAV mapping, and IoT terminals to collect data on soil, crops, and weather in real time, and establishes dynamically updated virtual farmland in the cloud in a three-dimensional visualization form.
[0003] In one existing technology, taking the construction of a digital twin data base for irrigation districts as an example, the mapping relationship of various monitoring data is usually established first through a unified water conservancy object model, and then object fusion, feature fusion, and numerical fusion are performed separately. In the numerical fusion stage, the monitoring data of the stations are stored in separate databases and tables according to a unified time benchmark on an annual and monthly scale; for the spatial scale fusion of point data and grid data, traditional spatial interpolation methods are used for scale conversion. However, in practical applications, the above methods suffer from inherent mismatches in physical meaning and dimensions between data such as spectral indices obtained by satellite remote sensing, multispectral images collected by UAVs, and soil temperature and humidity (degrees Celsius) and nutrient content (milligrams per kilogram) measured by ground sensors, making it impossible to eliminate dimensional differences within a unified computational framework; at the same time, there is a significant spatial scale mismatch between discretely distributed sensor monitoring points and continuous grid nodes, making it difficult for traditional spatial interpolation to achieve accurate point-by-point numerical positioning.
[0004] In summary, existing technologies suffer from the problem that multi-source data are difficult to map accurately point-to-point within a unified framework due to differences in dimensions and spatial scale mismatch. Summary of the Invention
[0005] This invention provides a method and system for agricultural environment twin modeling based on multi-source data fusion, in order to solve the problem that multi-source data are difficult to map accurately point by point under a unified framework due to differences in dimensions and spatial scale mismatch.
[0006] Firstly, to address the aforementioned technical problems, this invention provides a method for agricultural environmental twin modeling based on multi-source data fusion, comprising:
[0007] Acquire spatial images and ground sensor readings of real fields, perform structured extraction on the spatial images and ground sensor readings, and generate initial environmental information;
[0008] Standard environmental data is obtained by unifying the dimensions of the initial environmental information, spatial coordinates are extracted from the standard environmental data, and a three-dimensional spatial model corresponding to the real field is constructed based on the spatial coordinates.
[0009] The three-dimensional spatial model is spatially discretized to obtain multiple grid nodes. The multiple grid nodes are then assigned values based on the standard environmental data to obtain the initial mapping features of the multiple grid nodes.
[0010] Construct the topological relationship between the multiple grid nodes, extract adjacent grid nodes according to the topological relationship, calculate the feature difference value between the adjacent grid nodes, and compare the feature difference value with a preset feature difference threshold;
[0011] If the feature difference value is greater than the feature difference threshold, the initial mapping feature of the corresponding grid node is corrected to obtain the target node feature; if the feature difference value is not greater than the feature difference threshold, the initial mapping feature is determined as the target node feature.
[0012] Based on the characteristics of the target nodes, a digital twin is constructed in the virtual farmland that is mapped point-by-point to the real field plot.
[0013] Secondly, the present invention provides an agricultural environment twin modeling system based on multi-source data fusion, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0014] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] (1) This invention acquires spatial images and ground sensor readings of the target area, performs structured extraction of multi-source data to generate initial environmental information, and further analyzes the correlation characteristics between various environmental indicators. Based on the actual contribution of each indicator to the overall environmental state, corresponding transformation weights are assigned, and monitoring data with different physical dimensions are mapped to a unified numerical reference range. This scheme enables environmental indicators with different sources and dimensions, such as light, temperature, humidity, and nutrients, to participate in subsequent spatial modeling and calculation under a unified numerical system, thereby eliminating the dimensional barriers between multi-source heterogeneous data.
[0017] (2) This invention extracts spatial coordinates from standardized environmental data with unified dimensions, constructs a three-dimensional spatial model corresponding to the real field, and spatially discretizes the model to determine grid nodes. Then, it assigns values to each grid node point by point according to the actual distribution of the standard environmental data in the spatial coordinates. This scheme maps discretely distributed sensor monitoring data to each grid node in a continuous three-dimensional space, so that each location point in the virtual space can obtain environmental attributes corresponding to the real field, thereby solving the scale mismatch problem between discrete monitoring points and continuous virtual space and realizing accurate numerical positioning at the spatial level.
[0018] (3) This invention calculates the feature difference values between adjacent grid nodes and compares them with a preset feature difference threshold. For regions where the feature difference value exceeds the threshold, local correction is performed using the spatial dependency relationship of neighboring nodes. For nodes where the feature difference value does not exceed the threshold, their mapping results are directly retained. This scheme identifies and suppresses local deviations generated during data acquisition and interpolation through local spatial neighborhood analysis, ensuring that the environmental data of adjacent areas in the virtual farmland remain continuous and reasonable in spatial distribution. Ultimately, a digital twin that is accurately mapped point-by-point to the real field is constructed in the virtual farmland. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the process of an agricultural environment twin modeling method based on multi-source data fusion provided in the first embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Reference Figure 1 The first embodiment of the present invention provides a method for agricultural environment twin modeling based on multi-source data fusion, comprising the following steps:
[0022] S11, acquire spatial images and ground sensor readings of real fields, perform structured extraction on the spatial images and ground sensor readings, and generate initial environmental information;
[0023] S12, standard environmental data is obtained by unifying the dimensions of the initial environmental information, spatial coordinates are extracted from the standard environmental data, and a three-dimensional spatial model corresponding to the real field is constructed based on the spatial coordinates.
[0024] S13, the three-dimensional spatial model is spatially discretized to obtain multiple grid nodes, and the multiple grid nodes are assigned values according to the standard environmental data to obtain the initial mapping features of the multiple grid nodes;
[0025] S14, construct the topological relationship between the multiple grid nodes, extract adjacent grid nodes according to the topological relationship, calculate the feature difference value between the adjacent grid nodes, and compare the feature difference value with a preset feature difference threshold;
[0026] S15, if the feature difference value is greater than the feature difference threshold, then the initial mapping feature corresponding to the grid node is corrected to obtain the target node feature; if the feature difference value is not greater than the feature difference threshold, then the initial mapping feature is determined as the target node feature.
[0027] S16, Based on the characteristics of the target node, construct a digital twin in the virtual farmland that is mapped point-by-point to the real field.
[0028] In step S11, spatial images and ground sensor readings of the actual field are acquired, and the spatial images and ground sensor readings are extracted in a structured manner to generate initial environmental information.
[0029] The process includes extracting structured data from the spatial imagery and ground sensor readings to generate initial environmental information, including:
[0030] Spatial features are extracted from the spatial imagery, and temporal features are extracted from the ground sensor readings;
[0031] The spatial features and the temporal features are concatenated to obtain a fused tensor;
[0032] A mapping map is generated based on the fusion tensor, and multi-source data is reconstructed based on the mapping map to generate initial environmental information.
[0033] In one implementation, spatial imagery refers to remote sensing images obtained by aerial photography of a real field using a multispectral camera mounted on a drone. In this embodiment, the drone flies at an altitude of 120 meters, with the camera lens pointing vertically downwards. The acquired spatial imagery has a resolution of 512 pixels × 512 pixels and includes four spectral bands: red, green, blue, and near-infrared. Ground sensor readings refer to time-series data collected and uploaded by soil monitoring sensors deployed within the real field at fixed sampling intervals. In this embodiment, soil monitoring sensors are evenly distributed within the real field at a grid spacing of 50 meters. Each sensor collects soil temperature and soil volumetric moisture content data at a sampling interval of 10 minutes and uploads them to a data aggregation node via a wireless communication module. The ground sensor readings include all soil temperature and soil volumetric moisture content sampling values uploaded by each sensor over the past 24 hours.
[0034] This embodiment extracts spatial features from the spatial image. Specifically, the normalized vegetation index (NDI) of each pixel in the spatial image is calculated. The NDI is calculated based on the ratio of the difference between the near-infrared reflectance and the red light reflectance to their sum. The NDIs of all pixels in the entire image are arranged according to their spatial location to obtain a two-dimensional spatial feature matrix, which serves as the spatial feature. This spatial feature is used to characterize the growth distribution of crops in the actual field. This embodiment also extracts temporal features from the ground sensor readings. Specifically, for the soil temperature and soil volumetric moisture content samples collected by each sensor over the past 24 hours, their arithmetic mean and standard deviation are calculated. The mean and standard deviation of all sensors are concatenated into a one-dimensional vector according to the sensor number order, which serves as the temporal feature. This temporal feature is used to characterize the dynamic change trend of the soil environment. The spatial feature matrix is expanded into a one-dimensional vector and then concatenated with the temporal feature vector in the channel dimension to obtain a fused tensor.
[0035] This embodiment employs principal component analysis (PCA) to reduce the dimensionality of the fused tensor. In the offline phase, multiple sets of historical fused tensor samples are collected. The mean vector and covariance matrix are calculated for each sample. Eigenvalue decomposition is performed on the covariance matrix to obtain eigenvalues and corresponding eigenvectors. The eigenvalues are sorted from largest to smallest. When the cumulative contribution rate reaches 95%, the corresponding eigenvector is selected to construct the projection matrix. In the online phase, the current fused tensor is subtracted from the mean vector calculated in the offline phase, and then multiplied by the projection matrix to output a dimensionality-reduced vector. This dimensionality-reduced vector is then reconstructed into a three-dimensional tensor, serving as a mapping map.
[0036] An inverse distance weighted interpolation algorithm is used to perform spatial reconstruction processing on the mapping map. Each element in the mapping map is used as the feature value of a known sampling point, and the position coordinates of each element in the 3D tensor are used as the spatial coordinates of the known sampling point. For the target spatial location, all known sampling points in the mapping map are traversed, and the Euclidean distance between each known sampling point and the target spatial location is calculated. The reciprocal of the square of the distance is used as the weight to perform a weighted summation of the feature values of each known sampling point, obtaining the reconstructed feature value at the target spatial location. The above interpolation calculation is performed sequentially on all target spatial locations, outputting reconstructed data with a resolution of 512 pixels × 512 pixels × 4 channels, which serves as the initial environmental information map.
[0037] It should be noted that the initial environmental information includes soil environmental data, microclimate data, and crop physiological data. The soil environmental data is derived from soil temperature and soil volumetric moisture content data from the ground sensor readings; the microclimate and crop physiological data are derived from the Normalized Difference Vegetation Index (NDVI) distribution data extracted from the spatial imagery. The NDVI values reflect the field's light and temperature conditions and crop growth status, respectively. These three types of data are presented together in numerical form across different channels in the initial environmental information map.
[0038] In step S12, the initial environmental information is standardized to obtain standard environmental data. Spatial coordinates are extracted from the standard environmental data, and a three-dimensional spatial model corresponding to the actual field is constructed based on the spatial coordinates, including:
[0039] Calculate the feature importance score of the initial environmental information, and generate the transformation weights for each feature dimension based on the feature importance score;
[0040] The initial environmental information is linearly mapped according to the transformation weights to obtain standard environmental data.
[0041] The planar coordinate set and the vertical elevation set are separated from the standard environmental data. A three-dimensional node matrix is constructed based on the planar coordinate set and the vertical elevation set. The three-dimensional node matrix is then reconstructed into a three-dimensional surface to obtain a three-dimensional spatial model.
[0042] In one implementation, the initial environmental information output by S11 is input into a pre-trained random forest model. The model processes the data and outputs feature importance scores for each feature dimension. The training process of the random forest model is as follows: Environmental information samples of the target field are collected over multiple historical monitoring periods. Each sample contains values for each feature dimension and corresponding crop growth anomaly probability labels. The crop growth anomaly probability labels are determined based on the actual crop growth status at the corresponding time and location. By recording the crop's leaf color, plant height, and the occurrence of pests and diseases, an anomaly probability value between 0 and 1 is comprehensively evaluated, where 0 indicates normal growth and 1 indicates abnormal growth. All samples are randomly divided into training and validation sets at an 8:2 ratio. The values for each feature dimension are used as input features, and the crop growth anomaly probability labels are used as target variables. The random forest algorithm is used for model training. The model is set with 100 decision trees, a minimum leaf node sample size of 5, no maximum depth limit, a feature subset size equal to the square root of the total number of features, and other parameters using default algorithm values. After training, the model parameters are fixed for online inference. The number of decision trees, the minimum number of leaf node samples, and the size of the feature subset are determined on the validation set by using a grid search method with the goal of minimizing the mean squared error. The number of decision trees is searched in the range of 50 to 200 with a step size of 10, and the minimum number of leaf node samples is searched in the range of 2 to 20 with a step size of 1. The parameter combination with the minimum mean squared error on the validation set is selected as the final model parameters.
[0043] After inputting the initial environmental information into the random forest model, the model outputs a corresponding feature importance score for each feature dimension. The feature importance score is determined based on the normalized sum of the Gini impurity decay amounts generated by each feature when splitting at all decision tree nodes. Specifically, for each feature dimension, the Gini impurity decay amounts generated by that feature when splitting at all nodes in each decision tree are summed to obtain the total decay amount of that feature. The total decay amounts of all features are then normalized so that the sum of the normalized values of each feature equals 1, resulting in the feature importance score for each feature dimension. The numerical range of each score is from 0 to 1.
[0044] Feature dimensions with feature importance scores greater than a preset importance threshold are extracted as the core feature set. The preset importance threshold is determined by collecting environmental information samples from real fields under historical stable operating conditions over 30 consecutive natural days, selecting 6 equally spaced times each day, resulting in 180 sets of samples. The feature importance score of each set of samples is calculated using the aforementioned method, yielding 180 feature importance score samples. The arithmetic mean and standard deviation of these 180 feature importance score samples are calculated. The preset importance threshold is set to the arithmetic mean plus twice the standard deviation. For feature dimensions with feature importance scores not greater than the preset importance threshold, their corresponding transformation weights are set to 0, and they are not included in the subsequent weighted summation and linear mapping process for dimensional unification. For each feature dimension in the core feature set, the maximum and minimum values of that feature in historical monitoring data are statistically analyzed, and the difference between the maximum and minimum values is calculated as the range value. The reciprocal of the range value of each feature dimension is taken, and a normalization method is used to process each reciprocal so that the sum of the reciprocals equals 1. The normalized values are then used as the transformation weights of the corresponding feature dimensions.
[0045] The values of each core feature dimension in the current initial environmental information are multiplied by the corresponding transformation weights of the feature dimensions and then summed using a weighted summation algorithm. The weighted summation result is then mapped to a baseline range of 0 to 100 using a linear interpolation algorithm, outputting standard environmental data. The spatial location attributes carried in the standard environmental data are analyzed. Longitude and latitude data are converted into planar projected coordinates through projection. The planar projected coordinates of each data point are extracted into a set of planar coordinates, and the elevation data is extracted into a set of vertical elevations. The planar coordinate sets are subjected to Delaunay triangulation to obtain a two-dimensional topological map covering the actual field area. The elevation values in the vertical elevation set are mapped one by one to the corresponding nodes in the two-dimensional topological map, expanding the two-dimensional planar structure into a three-dimensional node matrix. The elevation differences between all adjacent nodes in the three-dimensional node matrix are traversed. If the elevation difference is greater than a preset elevation difference threshold, the three-dimensional node matrix of the region is smoothed by spline surface fitting to eliminate abnormal geometric angles and output a continuous spatial surface. A drone orthophoto of a real field is acquired. The pixel coordinates of the orthophoto are aligned and wrapped with the geometric coordinates of the continuous spatial surface to generate a surface texture with realistic ground visual features, resulting in a 3D spatial model corresponding to the real field. A preset elevation difference threshold is set by collecting historical elevation data of the real field terrain, calculating the average and standard deviation of the elevation difference between adjacent sampling points, and setting the preset elevation difference threshold as the average value plus three times the standard deviation.
[0046] It should be noted that each data point in the standard environmental data contains spatial coordinate attributes and environmental numerical attributes. The spatial coordinate attributes include longitude, latitude, and altitude, while the environmental numerical attributes are comprehensive environmental characterization values within the reference range of 0 to 100. This data format simultaneously supports geometric positioning in subsequent 3D spatial model construction and data association in grid node assignment.
[0047] In step S13, the three-dimensional spatial model is spatially discretized to obtain multiple mesh nodes. Values are assigned to these multiple mesh nodes based on the standard environmental data to obtain the initial mapping features of the multiple mesh nodes, including:
[0048] The three-dimensional spatial model is spatially divided to obtain multiple grid nodes. For each grid node, a subset of environmental data located within a preset neighborhood of the grid node is selected from the standard environmental data.
[0049] Calculate the spatial distance between each sampling point in the environmental data subset and the grid node, and determine the spatial distance weight of each sampling point based on the spatial distance;
[0050] The initial mapping features of the grid nodes are obtained by weighting the spatial distance weights and corresponding values of each sampling point.
[0051] In one implementation, an axial bounding box that completely encloses the 3D spatial model is first constructed. The maximum and minimum values of the model in the length, width, and height dimensions are obtained to determine the boundary range of the bounding box. A voxelization method is used to uniformly divide the spatial bounding box according to a preset spatial step size, resulting in multiple voxel units of the same size. The spatial step size is determined based on the spatial dimensions of the actual field and the grid density requirements for subsequent model calculations. In this embodiment, the spatial step size is 2 meters, meaning that the division is performed at 2-meter intervals in the length, width, and height directions. All voxel units are traversed, and the 3D coordinates of the center position of each voxel unit are extracted to form a set of 3D coordinate points. The 3D coordinate point set is then spatially intersected with the 3D spatial model to determine whether each 3D coordinate point is located inside the 3D spatial model. Voxel units located inside the 3D spatial model are extracted, and the center position of each voxel unit is used as a grid node to obtain multiple grid nodes.
[0052] It should be noted that the spatial step size is determined by pre-testing the computing device on which the method of this embodiment is deployed, testing the total number of grid nodes and the corresponding time for a single complete modeling calculation under three step sizes: 1.5 meters, 2 meters, and 2.5 meters. When testing with a 1.5-meter step size, if the total number of grid nodes exceeds 8000 and the time for a single modeling calculation exceeds 30 seconds, the computational cost at this step size is considered too high. When testing with a 2.5-meter step size, if the total number of grid nodes is less than 3000 or the spatial interpolation accuracy (measured by the average absolute error at 36 verification points uniformly selected according to a 10-meter by 10-meter grid in a real field) decreases by more than 10% compared to the 2-meter step size, the modeling accuracy at this step size is considered insufficient. The maximum step size that satisfies the requirement of a computation time not exceeding 30 seconds and a spatial interpolation accuracy not lower than that of the 2-meter step size is selected as the preset spatial step size. In this embodiment, the total number of grid nodes corresponding to a step size of 2 meters is 4860, the time for a single modeling calculation is 18 seconds, and the spatial interpolation accuracy meets the requirements. Therefore, 2 meters is selected as the preset spatial step size.
[0053] For each grid node, a subset of environmental data located within a preset neighborhood of the grid node is selected from the standard environmental data. The standard environmental data, generated in step S12, contains multiple sampling points, each with spatial coordinates and environmental numerical values. For each of the multiple grid nodes, a preset neighborhood is defined centered on the grid node's three-dimensional spatial coordinates. All sampling points in the standard environmental data are traversed, and sampling points whose spatial coordinates fall within the preset neighborhood are selected. The spatial coordinates and corresponding environmental values of the selected sampling points are combined to form the environmental data subset of the grid node. The preset neighborhood is a spherical space with a radius of 5 meters centered on the grid node. This neighborhood is determined based on the sensor deployment density; specifically, the average spacing between sensors within a real field plot is calculated, and the preset neighborhood is set to half of this average spacing, ensuring that each grid node's neighborhood contains at least two sampling points.
[0054] It should be noted that when the number of sampling points in the environmental data subset is less than 2, the preset neighborhood range is expanded to 1.5 times the current value, and the filtering and calculation are re-executed. If the number of sampling points in the expanded neighborhood range is not less than 2, the subsequent calculations are continued according to the method described in this step. If the number of sampling points is still less than 2 after the neighborhood range is expanded, the neighborhood range is expanded by a factor of 1.5 until the condition of not less than 2 sampling points is met, or until the number of expansions reaches the preset maximum number of expansions. The preset maximum number of expansions is set to 6 times. If the number of sampling points in the neighborhood is still less than 2 after reaching the preset maximum number of expansions, all sampling points in the current neighborhood range are used in the subsequent calculations, and the initial mapping feature of the grid node is marked as a low reliability feature. The low reliability feature does not participate in the error statistics in the twin entity model matching determination in S16.
[0055] The Euclidean distance between the 3D spatial coordinates of each sampling point in the environmental data subset and the 3D spatial coordinates of the grid node is calculated to obtain the spatial distance between each sampling point and the grid node. An inverse distance weighted interpolation algorithm is used to determine the spatial distance weight of each sampling point based on the spatial distance, wherein the spatial distance weight is inversely proportional to the square of the spatial distance; that is, sampling points with smaller spatial distances are assigned larger spatial distance weights, and sampling points with larger spatial distances are assigned smaller spatial distance weights.
[0056] The environmental values of each sampling point in the environmental data subset are weighted and summed with their corresponding spatial distance weights to obtain the environmental estimate of the grid node. This environmental estimate is used as the initial mapping feature of the grid node. This process is repeated for all grid nodes, performing the neighborhood filtering, spatial distance weight calculation, and weighting operations on each node to obtain the initial mapping feature for each grid node. The initial mapping feature is a numerical attribute value, bound to the attribute field of the corresponding grid node, and used to characterize the comprehensive environmental state at the location of that grid node.
[0057] In step S14, the topological relationship between the plurality of grid nodes is constructed, adjacent grid nodes are extracted based on the topological relationship, and the feature difference value between the adjacent grid nodes is calculated, including:
[0058] Spatial triangulation is performed on the plurality of grid nodes to obtain the topological relationship between the plurality of grid nodes;
[0059] Calculate the numerical differences of each feature dimension of the initial mapping features of the adjacent grid nodes, and calculate the spatial distance between the adjacent grid nodes;
[0060] Calculate the ratio of the numerical difference to the spatial distance to obtain the feature gradient vector;
[0061] The Manhattan distance of the feature gradient vector is calculated to obtain the feature difference value.
[0062] In one implementation, the plurality of mesh nodes are a set of discrete points in three-dimensional space obtained after spatial discretization in S13. Each mesh node has three-dimensional spatial coordinates and initial mapping characteristics. The Bowyer-Watson incremental algorithm is used to perform three-dimensional Delaunay triangulation on all mesh nodes. This algorithm dynamically maintains the triangulation structure by inserting points one by one, connecting each mesh node to form a tetrahedral mesh, and recording the connection relationships between each mesh node as a spatial connectivity matrix. The spatial connectivity matrix is a two-dimensional matrix, where the rows and columns correspond to the numbers of the plurality of mesh nodes. If two mesh nodes have a direct connection edge in the tetrahedral mesh, the value at the corresponding position in the matrix is set to 1; otherwise, it is set to 0. The spatial connectivity matrix represents the topological relationships between the plurality of mesh nodes.
[0063] Traverse each row of the spatial connectivity matrix, extract the grid node numbers corresponding to all columns with a value of 1 in that row, and form adjacent grid node pairs with the extracted grid nodes corresponding to the current row, resulting in multiple sets of adjacent grid nodes. For each set of adjacent grid nodes, read the initial mapping feature values of the two grid nodes. The initial mapping features are the comprehensive environmental characterization values assigned to each grid node in S13. Calculate the absolute value of the difference between the two values as the numerical difference of each feature dimension. Simultaneously, calculate the Euclidean distance between the two grid nodes based on their three-dimensional spatial coordinates as the spatial distance between the adjacent grid nodes. Divide the numerical difference by the spatial distance, and the resulting ratio is the gradient component of the adjacent grid node in that feature dimension. The feature gradient vector is formed by concatenating the gradient components of each feature dimension in a fixed order, and is used to characterize the degree of spatial change in environmental features between adjacent grid nodes. Sum the absolute values of the gradient components of each dimension in the feature gradient vector to obtain the Manhattan distance, which is used as the feature difference value between adjacent grid nodes. The feature difference value is a non-negative value. The larger the value, the more drastic the spatial change in environmental features between adjacent grid nodes.
[0064] It should be noted that the feature difference value is used to compare with a preset feature difference threshold to determine whether there is a significant abrupt change in the environmental characteristics between adjacent grid nodes. The preset feature difference threshold is obtained by selecting data from adjacent grid nodes of a real field under historical stable operating conditions over 30 consecutive natural days, with 6 equally spaced times each day, resulting in 180 sets of data samples. The selection of 6 times is based on testing with 4, 6, 8, and 12 equally spaced times each day. With 4 times, the sample size is insufficient to stably represent daily cycle fluctuations, and with 8 or more times, the threshold accuracy improvement slows down while the data processing cost increases significantly. Therefore, 6 times is selected. The feature difference value of each set of data samples is calculated according to the method described in this step, resulting in 180 feature difference value samples; the arithmetic mean and standard deviation of the 180 feature difference value samples are calculated; and the preset feature difference threshold is set as the arithmetic mean plus three times the standard deviation.
[0065] In step S15, if the feature difference value is greater than the feature difference threshold, the initial mapping feature corresponding to the grid node is corrected to obtain the target node feature; if the feature difference value is not greater than the feature difference threshold, the initial mapping feature is determined as the target node feature.
[0066] Wherein, if the feature difference value is greater than the feature difference threshold, the initial mapping features of the grid node are corrected to obtain the target node features, including:
[0067] The grid nodes whose feature difference values are greater than the feature difference threshold are marked as nodes to be corrected.
[0068] Obtain the initial mapping features and spatial coordinates of the neighboring nodes of the node to be corrected;
[0069] Calculate the spatial distance between each neighboring node and the node to be corrected based on the spatial coordinates, and determine the spatial dependency weight of each neighboring node based on the spatial distance.
[0070] The target node features are obtained by weighting the spatial dependency weights and the initial mapping features.
[0071] In one implementation, step S14 calculates the feature difference values between adjacent grid nodes in each group and obtains a preset feature difference threshold. The feature difference values of each group of data samples are calculated according to the method described in S14, resulting in 180 feature difference value samples. The arithmetic mean and standard deviation of the 180 feature difference value samples are then calculated. The preset feature difference threshold is set to the arithmetic mean plus three times the standard deviation.
[0072] Iterate through all adjacent grid node pairs, and mark both grid nodes involved in adjacent grid node pairs whose feature difference value is greater than a preset feature difference threshold as nodes to be corrected. Nodes to be corrected refer to grid nodes whose initial mapping features exhibit significant abrupt changes in spatial distribution, and will be corrected subsequently. It should be noted that for adjacent grid nodes whose feature difference value is greater than the preset feature difference threshold, each of the two adjacent grid nodes is processed separately; when a grid node forms a threshold-exceeding node pair with multiple adjacent grid nodes, that grid node is marked only once.
[0073] For each node to be corrected, a predetermined number of grid nodes with the closest spatial distance to the node to be corrected are selected as neighboring nodes from among the multiple grid nodes, centered on the three-dimensional spatial coordinates of the node to be corrected. The predetermined number is determined by testing the spatial continuity effect of the corrected target node features when 4, 6, 8, and 10 neighboring nodes are selected respectively. For each value of the number of neighboring nodes, the standard deviation of the feature difference values of all grid nodes after correction is calculated. The number of neighboring nodes corresponding to the smallest standard deviation is taken as the number that makes the spatial distribution smoothest. In this embodiment, the standard deviation is the smallest when 8 neighboring nodes are selected, so the predetermined number is set to 8. The initial mapping features and three-dimensional spatial coordinates of each neighboring node are read respectively. According to the three-dimensional spatial coordinates of the node to be corrected and the three-dimensional spatial coordinates of each neighboring node, the Euclidean distance between each neighboring node and the node to be corrected is calculated to obtain the spatial distance of each neighboring node. The inverse distance weighting method is used to normalize the spatial distance of each neighboring node by taking the reciprocal of the spatial distance of each neighboring node, so that the sum of the reciprocals of each neighboring node is equal to 1. The normalized values are used as the spatial dependency weights of each neighboring node. The spatial dependency weights reflect the degree of influence of each neighboring node on the node to be corrected.
[0074] The initial mapping feature values of each neighboring node are weighted and summed with their corresponding spatial dependency weights to obtain a spatially smoothed estimate of the location of the node to be corrected. This spatially smoothed estimate is then used as the target node feature for the node to be corrected, replacing the original initial mapping feature of that node. For grid nodes whose feature difference value is not greater than a preset feature difference threshold, the initial mapping feature is directly determined as the target node feature without any correction processing.
[0075] In step S16, based on the characteristics of the target node, a digital twin is constructed in the virtual farmland that is mapped point-by-point to the real field plot, including:
[0076] Obtain the surface texture map, crop growth status parameters, and environmental perception data of the real field plot;
[0077] A three-dimensional mesh skeleton is constructed based on the target node features and the topological relationships;
[0078] The three-dimensional mesh skeleton is rendered based on the surface texture map and the crop growth status parameters to generate a twin entity model;
[0079] If the twin entity model meets the preset matching conditions, a digital twin is generated based on the twin entity model.
[0080] In one implementation, the surface texture map is obtained by acquiring orthophotos of the real field using unmanned aerial vehicles (UAVs). These orthophotos contain color and texture information of the real field surface. Crop growth status parameters are obtained through field surveys, including crop type, leaf area index, and plant height. Environmental perception data, including soil temperature and soil volumetric moisture content, are collected in real time by IoT sensors deployed within the real field.
[0081] Subsequently, a three-dimensional mesh skeleton is constructed based on the target node features and the topological relationships. The target node features, generated in step S15, include the spatial coordinates of each mesh node in three-dimensional space and its corresponding environmental numerical attributes. The topological relationships, generated in step S14, record the connection relationships between each mesh node. Three-dimensional spatial coordinates are extracted from the target node features of each mesh node, and the three-dimensional mesh skeleton is constructed based on these coordinates and the topological relationships. Specifically, based on the spatial connectivity matrix in the topological relationships, mesh nodes with directly connected edges are connected to form triangular facet meshes, resulting in the three-dimensional mesh skeleton.
[0082] The surface texture map is mapped onto the surface of the 3D mesh skeleton as the diffuse color input. Based on the crop type and plant height in the crop growth status parameters, a simplified crop geometry is generated at the corresponding spatial location on the 3D mesh skeleton. The simplified crop geometry is a cone, and the height of the cone is directly taken as the value of the plant height parameter, converted to meters. The base radius of the cone is calculated based on the total leaf area of a single crop using the leaf area index. The total leaf area is divided by the product of the generatrix length and pi in the cone's lateral surface area formula to obtain the base radius, ensuring that the lateral surface area of the cone equals the total leaf area of a single crop. The color of the cone is obtained from a preset color mapping table based on the crop type; in this embodiment, corn is preset to green, wheat to yellowish-green, and rice to light green. The 3D mesh skeleton with surface texture and crop geometry is then used in a rendering engine for lighting calculations and material rendering to generate a twin entity model consistent with the appearance of a real field.
[0083] Obtain the measured values of soil temperature and soil volumetric moisture content from the environmental perception data. Extract the simulated values of soil temperature and soil volumetric moisture content at the spatial coordinates corresponding to the acquisition locations of the environmental perception data in the twin entity model. Calculate the absolute errors between the measured and simulated soil temperature values, and the absolute errors between the measured and simulated soil volumetric moisture content values. If both absolute errors are less than a preset tolerance threshold, the twin entity model is determined to meet the preset matching conditions. Write the global vertex coordinates and attribute data of the twin entity model into the underlying database of the virtual farmland scene, establish a one-to-one correspondence between the physical coordinates of the real field and the logical coordinates of the virtual space, and generate a digital twin that is mapped point-by-point to the real field.
[0084] If either the absolute error of soil temperature or the absolute error of soil volumetric moisture content is greater than or equal to the preset tolerance threshold, the twin entity model is determined not to meet the preset matching conditions, and it is further determined whether the current iteration number has reached the preset maximum iteration number. If the preset maximum iteration number has not been reached, the following steps are performed for correction and re-verification. The current iteration number is initialized to 0 before the first execution of the matching determination. First, the current iteration number is incremented by 1; second, the preset number of neighboring nodes in S15 is increased to 1.5 times the current value; third, the correction steps in S15 are re-executed based on the increased number of neighboring nodes, and the target node features of each node to be corrected are updated; fourth, the three-dimensional mesh skeleton construction, twin entity model generation, and matching determination steps in S16 are re-executed based on the updated target node features. If the corrected twin entity model meets the preset matching conditions, a digital twin is generated based on the twin entity model. If the twin entity model still does not meet the preset matching conditions after reaching the preset maximum number of iterations, the current twin entity model is output as the final result, and the confidence level of the digital twin is marked as low confidence. The preset maximum number of iterations is obtained by collecting 50 matching failure cases from real fields during historical operation, recording the number of iterations required for successful convergence after correction for each case, and obtaining 50 iteration number samples. The distribution of each sample is statistically analyzed, and the 90th percentile is taken as the maximum number of iterations, that is, ensuring that 90% of the matching failure cases can successfully converge within the current number of iterations. In this embodiment, the 90th percentile of the 50 historical cases is 3, so the preset maximum number of iterations is set to 3.
[0085] It should be noted that the preset tolerance threshold is determined by dividing the actual field into 6 equal parts along its length and width (6 segments along the 100-meter length and 6 segments along the 80-meter width), forming 36 intersection points (6×6) as verification points. Environmental perception data is collected at each verification point, and environmental simulation data at the corresponding spatial coordinates of each verification point is extracted from the twin entity model. The absolute error of soil temperature and the absolute error of soil volumetric moisture content at each verification point are calculated, resulting in 36 sets of error samples. The selection of 36 points is based on the fact that 25, 36, and 49 intersection points were tested respectively. 25 points resulted in insufficient spatial coverage, and 49 points increased the verification workload by approximately 36% compared to 36 points, but the improvement in matching accuracy was less than 2%. Therefore, 36 points were selected. Using a tolerance threshold as a variable, each candidate value is iterated within a range of 1% to 5% with a step size of 0.1%. The proportions of points where the absolute error of soil temperature and the absolute error of soil volumetric moisture content are both less than the tolerance threshold are statistically analyzed for each candidate value. The tolerance threshold with the smallest value and both proportions exceeding 95% is selected as the preset tolerance threshold. In this embodiment, the soil temperature tolerance threshold is 2℃, and the soil volumetric moisture content tolerance threshold is 2%.
[0086] In summary, this invention constructs a three-dimensional spatial grid by unifying the dimensions of multi-source heterogeneous data and assigning values point by point. Then, it performs local correction on areas where the deviation exceeds the threshold, and finally constructs a spatially continuous digital twin in the virtual farmland that is accurately mapped point by point to the real field.
[0087] The second embodiment of the present invention provides an agricultural environment twin modeling system based on multi-source data fusion, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0088] It should be noted that the agricultural environment twin modeling system based on multi-source data fusion provided in this embodiment of the invention is used to execute all the process steps of the agricultural environment twin modeling method based on multi-source data fusion in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0089] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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.
[0090] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for agricultural environmental twin modeling based on multi-source data fusion, characterized in that, include: Acquire spatial images and ground sensor readings of real fields, perform structured extraction on the spatial images and ground sensor readings, and generate initial environmental information; Standard environmental data is obtained by unifying the dimensions of the initial environmental information, spatial coordinates are extracted from the standard environmental data, and a three-dimensional spatial model corresponding to the real field is constructed based on the spatial coordinates. The three-dimensional spatial model is spatially discretized to obtain multiple grid nodes. The multiple grid nodes are then assigned values based on the standard environmental data to obtain the initial mapping features of the multiple grid nodes. Construct the topological relationship between the multiple grid nodes, extract adjacent grid nodes according to the topological relationship, calculate the feature difference value between the adjacent grid nodes, and compare the feature difference value with a preset feature difference threshold; If the feature difference value is greater than the feature difference threshold, the initial mapping feature of the corresponding grid node is corrected to obtain the target node feature; if the feature difference value is not greater than the feature difference threshold, the initial mapping feature is determined as the target node feature. Based on the characteristics of the target nodes, a digital twin is constructed in the virtual farmland that is mapped point-by-point to the real field plot.
2. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The step of extracting structured data from the spatial imagery and the ground sensor readings to generate initial environmental information includes: Spatial features are extracted from the spatial imagery, and temporal features are extracted from the ground sensor readings; The spatial features and the temporal features are concatenated to obtain a fused tensor; A mapping map is generated based on the fusion tensor, and multi-source data is reconstructed based on the mapping map to generate initial environmental information.
3. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The process of unifying the dimensions of the initial environmental information to obtain standard environmental data, extracting spatial coordinates from the standard environmental data, and constructing a three-dimensional spatial model corresponding to the actual field plot based on the spatial coordinates includes: Calculate the feature importance score of the initial environmental information, and generate the transformation weights for each feature dimension based on the feature importance score; The initial environmental information is linearly mapped according to the transformation weights to obtain standard environmental data. The planar coordinate set and the vertical elevation set are separated from the standard environmental data. A three-dimensional node matrix is constructed based on the planar coordinate set and the vertical elevation set. The three-dimensional node matrix is then reconstructed into a three-dimensional surface to obtain a three-dimensional spatial model.
4. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The process involves spatially discretizing the three-dimensional spatial model to obtain multiple mesh nodes, assigning values to these mesh nodes based on the standard environmental data, and obtaining the initial mapping features of the multiple mesh nodes, including: The three-dimensional spatial model is spatially divided to obtain multiple grid nodes. For each grid node, a subset of environmental data located within a preset neighborhood of the grid node is selected from the standard environmental data. Calculate the spatial distance between each sampling point in the environmental data subset and the grid node, and determine the spatial distance weight of each sampling point based on the spatial distance; The initial mapping features of the grid nodes are obtained by weighting the spatial distance weights and corresponding values of each sampling point.
5. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The process of constructing the topological relationships between the multiple grid nodes, extracting adjacent grid nodes based on the topological relationships, and calculating the feature difference values between adjacent grid nodes includes: Spatial triangulation is performed on the plurality of grid nodes to obtain the topological relationship between the plurality of grid nodes; Calculate the numerical differences of each feature dimension of the initial mapping features of the adjacent grid nodes, and calculate the spatial distance between the adjacent grid nodes; Calculate the ratio of the numerical difference to the spatial distance to obtain the feature gradient vector; The Manhattan distance of the feature gradient vector is calculated to obtain the feature difference value.
6. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, If the feature difference value is greater than the feature difference threshold, the initial mapping features of the grid node are corrected to obtain the target node features, including: The grid nodes whose feature difference values are greater than the feature difference threshold are marked as nodes to be corrected. Obtain the initial mapping features and spatial coordinates of the neighboring nodes of the node to be corrected; Calculate the spatial distance between each neighboring node and the node to be corrected based on the spatial coordinates, and determine the spatial dependency weight of each neighboring node based on the spatial distance. The target node features are obtained by weighting the spatial dependency weights and the initial mapping features.
7. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The step of constructing a digital twin in the virtual farmland that maps point-by-point to the real field plot based on the characteristics of the target node includes: Obtain the surface texture map, crop growth status parameters, and environmental perception data of the real field plot; A three-dimensional mesh skeleton is constructed based on the target node features and the topological relationships; The three-dimensional mesh skeleton is rendered based on the surface texture map and the crop growth status parameters to generate a twin entity model; If the twin entity model meets the preset matching conditions, a digital twin is generated based on the twin entity model.
8. The agricultural environment twin modeling method based on multi-source data fusion according to claim 1, characterized in that, The initial environmental information includes soil environmental data, microclimate data, and crop physiological data.
9. An agricultural environmental twin modeling system based on multi-source data fusion, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 8.
