Soil parameter anomaly early warning method and system based on multi-source data fusion
By using multi-source data fusion technology, combined with self-attention mechanism and dynamic threshold early warning model, the problems of insufficient information coverage and early warning accuracy of traditional soil parameter monitoring methods have been solved, realizing comprehensive monitoring and timely early warning of soil parameters, and improving the stability and efficiency of agricultural production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING INST OF GEOLOGY & MINERAL RESOURCES
- Filing Date
- 2026-05-13
- Publication Date
- 2026-06-09
Smart Images

Figure CN122174135A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural intelligent monitoring technology, and in particular relates to a method and system for early warning of soil parameter anomalies based on multi-source data fusion. Background Technology
[0002] Soil, as the foundation for crop growth, plays a decisive role in agricultural production due to the stability of its various parameters. Soil nutrients such as nitrogen, phosphorus, and potassium are the "food" for crop growth, directly affecting crop yield and quality. Traditional soil parameter monitoring methods mainly rely on manual sampling combined with laboratory analysis. While this method can provide relatively accurate data, it has significant limitations: manual sampling is cumbersome, consuming a lot of manpower, resources, and time; moreover, the number of sampling points is limited, making it difficult to comprehensively reflect the true condition of large areas of soil; and when faced with sudden anomalies in soil parameters, traditional monitoring methods cannot detect and warn in a timely manner, leading to losses in agricultural production.
[0003] With the rapid development of technologies such as the Internet of Things, big data, and artificial intelligence, multi-source data fusion technology has emerged. For example, soil moisture sensors based on frequency domain reflectance (FDR) technology and high-precision meteorological sensors have enabled real-time monitoring of meteorological elements such as soil moisture, air temperature, and precipitation. Alternatively, in farmland soil nutrient monitoring, comprehensive monitoring of soil nutrients has been achieved by integrating multispectral remote sensing data, hyperspectral remote sensing data, and radar remote sensing data.
[0004] However, current research still has some gaps and shortcomings: on the one hand, the algorithms and models for multi-source data fusion are not yet perfect, and their accuracy and stability need to be improved when dealing with complex and variable soil data; on the other hand, most existing early warning systems focus on the monitoring and early warning of single soil parameters, such as single sensor data or single remote sensing data, and lack the ability to comprehensively analyze multiple soil parameters, making it difficult to fully reflect the true condition of the soil. Summary of the Invention
[0005] The technical problem solved by this invention is to provide a method and system for early warning of soil parameter anomalies based on multi-source data fusion, so as to solve the problems of single data source, low fusion efficiency and insufficient accuracy of anomaly early warning in existing soil parameter monitoring methods.
[0006] The basic solution provided by this invention is a method for early warning of soil parameter anomalies based on multi-source data fusion, comprising: S1: Based on soil sensors, remote sensing platforms, weather stations and geographic information databases in the target area, multi-source fused soil data is collected and preprocessed to obtain a standardized dataset; S2: The standardized dataset is divided into a high-frequency node set and a low-frequency node set using a preset collection frequency threshold. After calculating the correlation weights between nodes based on a self-attention mechanism, features are extracted from the high-frequency node set and the low-frequency node set respectively, and then fused to obtain the fused soil parameter sequence; specifically: Based on the self-attention mechanism to capture the dynamic correlation between nodes, the correlation weight of the high-frequency node matrix and the cross-modal correlation weight of the interaction between high-frequency and low-frequency nodes are calculated and normalized to obtain the high-frequency internal weight and cross-modal weight. A high-frequency node feature extraction model and a low-frequency node feature extraction model are constructed. The high-frequency data is weighted according to the internal weight of the high-frequency data and then input into the high-frequency node feature extraction model. A 1D convolutional neural network is used to extract the time series features of the high-frequency data and output the high-frequency features. The low-frequency data is weighted according to the cross-modal weights and then input into the low-frequency node feature extraction model. The multilayer perceptron is used to extract the nonlinear features of the low-frequency data and output the low-frequency features. High-frequency and low-frequency features are fused using element-weighted fusion to output the fused soil parameter sequence. S3: Construct a soil parameter anomaly early warning model. The fused soil parameter sequence is used as the input of the soil parameter anomaly early warning model. The soil parameter anomaly early warning model outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. S4: Based on the early warning results, the early warning display module is used to push early warning information and perform data visualization interaction.
[0007] Furthermore, S1 includes: S1-1: Soil parameter data is collected based on a multi-parameter soil sensor array deployed in the target area, and high-resolution soil physical parameter grids are output after preprocessing. S1-2: Based on the multispectral image data and radar image data of the target area, optical remote sensing data processing and radar remote sensing data processing are performed respectively to output multi-dimensional soil and surface feature raster. S1-3: Collect meteorological station data based on the target area and surrounding meteorological stations, perform normalization and spatial rasterization processing, and output meteorological driven raster; S1-4: Based on the soil survey database and geospatial database of the target area, extract soil type, soil texture, soil organic matter content and digital elevation model, encode soil type, soil texture code and calculate topographic parameters, and output the corresponding codes and topographic feature raster; S1-5: High-resolution soil physical parameter raster, multi-dimensional soil and surface feature raster, meteorological driven raster, coded and topographic feature raster are integrated into a standardized dataset by processing according to spatial consistency, unified format and associated metadata.
[0008] Furthermore, S2 includes: S2-1: Preset the acquisition frequency, divide the high-resolution soil physical parameter raster in the standardized dataset into a high-frequency node set, and divide the multi-dimensional soil and surface feature raster data, meteorological driven raster data, coded and topographic feature raster data in the standardized dataset into a low-frequency node set; S2-2: Construct a high-frequency node matrix with time step t as the dimension, expressed as:
[0009] in, For time step t, At the grid cell, the raw acquisition value of the p-th type parameter in the k-th acquisition; This refers to the general type of high-frequency parameters; For a high-frequency node matrix, the mapping is as follows: ; S2-3: Interpolate and match the low-frequency node set according to the time step to construct the low-frequency node matrix, the expression of which is:
[0010] in, For low-frequency node matrix, For low-frequency data types, For low-frequency data, the adjacent acquisition times before and after time step t are... For (x, y) raster cells in Low-frequency data values at any given time. For (x, y) raster cells in The low-frequency data values at time points are mapped to ; S2-4: Based on the self-attention mechanism, capture the dynamic correlation between nodes, calculate the correlation weight of the high-frequency node matrix and the cross-modal correlation weight of the interaction between high-frequency and low-frequency nodes, and perform normalization to obtain the high-frequency internal weight and cross-modal weight. S2-5: Construct a high-frequency node feature extraction model and a low-frequency node feature extraction model. Weight the high-frequency data according to the internal weights of the high-frequency data and input it into the high-frequency node feature extraction model to output high-frequency features. Weight the low-frequency data according to the cross-modal weights and input it into the low-frequency node feature extraction model to output low-frequency features. S2-6: The high-frequency and low-frequency features are fused using element-level weighting to output the fused soil parameter sequence.
[0011] Furthermore, in S2-4, the dynamic correlation between nodes is captured based on the self-attention mechanism. Specifically, the correlation weights of the high-frequency node matrix and the cross-modal correlation weights of interactions between high-frequency and low-frequency nodes are calculated and normalized. Construct a Query, Key, and Value matrix, and analyze the high-frequency node matrix. ,generate , , ;in , , These are the Q matrix, K matrix, and V matrix corresponding to the high-frequency node matrix, respectively. , , All are learnable weight matrices, and all belong to M represents the high-frequency data source type, and d represents the attention dimension; For low-frequency node matrix ,generate , , ;in , , These are the Q matrix, K matrix, and V matrix corresponding to the low-frequency node matrix, respectively. , , All are learnable weight matrices, and all belong to , For low-frequency data sources, d represents the attention dimension; The relevance weights of the high-frequency node matrix are calculated using the following expression:
[0012] in, for transpose, The attention score, which represents the high-frequency node matrix, reflects the correlation strength of different high-frequency data at that moment. The cross-modal correlation weights for interactions between high-frequency and low-frequency nodes are calculated using the following expression:
[0013] in, Attention scores, which characterize interactions between high- and low-frequency nodes, are used to capture the correlation between high-frequency and low-frequency data. To each and The high-frequency internal weights are obtained through softmax normalization. and cross-modal weights .
[0014] Furthermore, in steps S2-5, the high-frequency data is weighted according to its internal weights and then input into the high-frequency node feature extraction model to output high-frequency features, specifically as follows: A 1D convolutional neural network is used to extract high-frequency time series features, and the high-frequency features are output as follows:
[0015] in, For convolution kernel weights, For bias, This is the weighted high-frequency data; This represents the high-frequency feature map of the c-th feature channel at time step t. For the feature channel, Mapped to high-frequency features with time step t ; In step S2-5, the low-frequency data is weighted according to cross-modal weights and then input into the low-frequency node feature extraction model. The output low-frequency features are as follows: A multilayer perceptron is used to extract the nonlinear features of low-frequency data, and the low-frequency features are output as follows:
[0016] in, , For the weights of the multilayer perceptron, , For bias, The low-frequency data is weighted. The low-frequency feature of the c-th feature channel at time step t is mapped to a low-frequency feature with time step length t. ; In S2-6, the expression for the fused soil parameter sequence is: ; Represents the weights of high-frequency features. This represents the weight of low-frequency features.
[0017] Furthermore, S3 includes: S3-1: Constructing an early warning model for soil parameter anomalies based on dynamic threshold determination and an improved integrated multi-classifier; S3-2: Input the fused soil parameter sequence into the soil parameter anomaly early warning model. The soil parameter anomaly early warning model calls the dynamic threshold judgment to calculate the threshold range of each soil parameter feature based on the historical dataset, and uses EWMA to capture real-time data trends. Based on the EWMA trend, the threshold is corrected to obtain the final dynamic threshold range. S3-3: The soil parameter anomaly early warning model is based on the soil parameter sequence. It calls an improved optimization algorithm to optimize the parameters of the ensemble multi-classifier and outputs the soil anomaly probability according to the final ensemble multi-classifier. S3-4: The soil parameter anomaly early warning model determines the early warning level based on the output soil anomaly probability and the final dynamic threshold range, and outputs the early warning level determination result.
[0018] Furthermore, in step S3-2, the fused soil parameter sequence is input into the soil parameter anomaly early warning model. The soil parameter anomaly early warning model calls the dynamic threshold determination to calculate the threshold range for each soil parameter feature based on the historical dataset, and uses EWMA to capture real-time data trends. Based on the EWMA trend, the threshold is corrected to obtain the final dynamic threshold range, which is as follows: Historical datasets were extracted from the fused soil parameter sequences. ; Calculate the historical quantiles of each feature dimension c in the soil parameter sequence, take the 95% confidence interval as the normal threshold range, and then determine the upper threshold. Lower threshold ; The exponentially weighted moving average is used to capture real-time data trends. The expression is:
[0019] in, This represents the EWMA value at time t. For smoothing coefficients, This represents the sequence of fused soil parameters at time t. This represents the EWMA value at time t-1; based on Trend correction threshold, if The upper threshold is then corrected as follows:
[0020] like The lower threshold is then corrected as follows:
[0021] The final dynamic threshold range is obtained as follows Furthermore, the final dynamic threshold range satisfies the threshold boundary constraints of each parameter.
[0022] Furthermore, the soil parameter anomaly early warning model in S3-3 is based on the soil parameter sequence. It uses an improved optimization algorithm to optimize the parameters of the ensemble multi-classifier, and the soil anomaly probability is output by the final ensemble multi-classifier as follows: Random forest Gradient boosting tree and Support Vector Machine Build an ensemble multi-classifier; The parameters of the ensemble multi-classifier are optimized based on the improved antlion optimization algorithm, including: Get Random Forest The parameters to be optimized include the number of decision trees. Maximum depth Minimum number of samples for node splitting Obtain the gradient boosting tree The parameters to be optimized include the learning rate. Maximum depth Minimum number of samples for node splitting Obtaining Support Vector Machines The parameters to be optimized, including the penalty coefficient. Kernel function parameters And construct an optimization vector based on the above parameters. The range of values for each parameter is constrained based on the range of values for the parameters to be optimized in each classifier; Based on the anomaly sample recall rate of optimized vectors and soil parameter anomaly early warning, a fitness function is constructed. The expression is:
[0023]
[0024]
[0025] in, To improve the overall classification accuracy of the integrated multi-classifiers, The recall rate for samples with abnormal soil parameters. These are the weighting coefficients. A true positive result indicates that the actual abnormality was correctly detected and warned. A true negative result indicates that the actual normal condition was correctly identified. A false positive indicates that a normal result is misdiagnosed as abnormal. A false negative indicates that an actual abnormality is misdiagnosed as normal. Based on the statistical characteristics of soil parameters, the optimization vector is... Perform mixed initialization, and set the initial population size to [value]. The initial antlion population was obtained. ; Time autocorrelation coefficient based on soil parameter series The expression for calculating the random walk step size of an ant is:
[0026]
[0027] in, Let the random walk step size of the ant be . For the number of iterations, For cumulative operation, To optimize variable dimensions, It is a random number; This represents the covariance of the soil parameter sequences at time t and time t-1. This represents the soil parameter sequence at time t. This represents the soil parameter sequence at time t-1. This represents the variance of the soil parameter sequence at time t. The variance of the soil parameter sequence at time t-1; The ant random walk results are mapped to the range of values of the optimization vector. The positions of the ants' random walks are obtained and normalized. The trap radius is calculated based on the fitness value of the antlion, and the position of the ant in the antlion trap is corrected. Calculate the fitness values of all antlions and ants, and select the top K optimal solutions as elite antlions, denoted as . And introduce anomaly sample weighting factors. The expression for updating the position of elite antlions is:
[0028] in, This represents the j-th dimension parameter value of the k-th elite antlion in the (t+1)-th generation. This represents the j-th dimension parameter value of the k-th elite antlion in the t-th generation. Indicates the weighting factor for outlier samples. Represents the learning factor. This indicates that the mean is 0 and the standard deviation is... Normally distributed random numbers, Indicates the standard deviation of elite variation. , , This indicates the upper and lower limits of the value of the j-th parameter; After each iteration, the corrected ant positions are merged with the original antlion population, sorted by fitness value, and the top N optimal solutions are retained as the (t+1)th generation antlion population. This process continues until the preset number of iterations is reached, at which point the optimal solution in the population is output. Random forest as an ensemble of multi-classifiers Gradient boosting tree and Support Vector Machine The optimal combination of parameters is found, and these are substituted into each classifier to obtain the parameter-optimized ensemble multi-classifier. The optimized ensemble multi-classifier outputs soil anomaly probability results for the soil parameter sequence.
[0029] Furthermore, the soil parameter anomaly early warning model in S3-4 determines the early warning level based on the output soil anomaly probability and the final dynamic threshold range. The specific output early warning level determination result is as follows: Random forest based on parameter optimization Output soil anomaly probability for soil parameter sequence ; Gradient boosting tree with optimized parameters Output soil anomaly probability for soil parameter sequence ; Support Vector Machine with Optimized Parameters Output soil anomaly probability for soil parameter sequence ; The probability of a single classifier is fused using weighted voting, and the expression is:
[0030] in, Let be the probability that the sample belongs to class y. The values are 0 for normal, 1 for mild abnormality, and 2 for severe abnormality. Random Forest Weight, Gradient boosting tree Weight, For Support Vector Machines Weight, , , Assignment based on the classifier's F1 score on the validation set, and ; Based on anomaly probability and dynamic threshold range Based on the core objective of prioritizing the recall rate of abnormal samples, the warning level is determined according to the following rules: The preset abnormal probability thresholds are: a normal state determination threshold of 0.7 and an abnormal state determination threshold of 0.5. Define deviation threshold , This represents the historical threshold of feature c. The historical threshold value represents feature c; the fused soil parameter value is... The judgment rules follow the principle of severe abnormality priority > mild abnormality priority > normal priority, and the following judgments are made: Severe abnormality: If or If so, it is determined to be a severe abnormality, and a level two warning is issued; Mild abnormality: If or If so, it is determined to be a mild abnormality, and a Level 1 warning is issued; normal: like and ; and and ,at the same time ; If any of the above conditions are met, the system is considered normal and no warning is issued. If multiple anomaly probability thresholds are met simultaneously, the one with the highest priority is directly judged as a severe anomaly. If the probability determination and the threshold determination are inconsistent, a logic check will be triggered.
[0031] A multi-source data fusion-based soil parameter anomaly early warning system, applied to the aforementioned multi-source data fusion-based soil parameter anomaly early warning method, includes a data acquisition module, a preprocessing module, a data fusion module, a soil parameter early warning module, and an early warning visualization module, wherein: The data acquisition module collects multi-source fused soil data based on soil sensors, remote sensing platforms, weather stations, and geographic information databases in the target area. The preprocessing module preprocesses the multi-source fused soil data to obtain a standardized dataset; The data fusion module is used to divide the standardized dataset into high-frequency node sets and low-frequency node sets by calling the preset collection frequency threshold. After calculating the correlation weight between nodes based on the self-attention mechanism, features are extracted from the high-frequency node sets and low-frequency node sets respectively and then fused to obtain the fused soil parameter sequence. The soil parameter early warning module constructs a soil parameter anomaly early warning model. The soil parameter early warning module is also used to take the fused soil parameter sequence as input to the soil parameter anomaly early warning model. The soil parameter anomaly early warning model outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. The early warning visualization module is used to push early warning information and provide visual interaction based on the early warning results.
[0032] The principles and advantages of this invention are as follows: The technical solution of this application revolves around a complete process of multi-source data fusion and intelligent early warning. First, soil-related data of the target area is collected through multiple channels, including physical parameters acquired by soil sensors, image data provided by remote sensing platforms, meteorological information recorded by meteorological stations, and basic data in geographic information databases. These multi-source data are preprocessed, including standardization and rasterization, to form a standardized dataset with uniform format and spatial consistency. Then, based on a preset acquisition frequency threshold, the standardized dataset is divided into a high-frequency node set and a low-frequency node set. The high-frequency node set mainly contains soil physical parameter data acquired at a higher frequency, while the low-frequency node set covers soil characteristics, meteorological driving forces, and topographic-related data acquired at a lower frequency. Based on a self-attention mechanism, the correlation weights within high-frequency nodes and between high- and low-frequency nodes are calculated respectively. The time series features of the high-frequency node set are extracted through a 1D convolutional neural network, and the nonlinear features of the low-frequency node set are extracted with the help of a multilayer perceptron. Finally, the two types of features are fused element-wise to obtain a complete soil parameter sequence. Finally, a soil parameter anomaly early warning model is constructed. On the one hand, the initial threshold range is determined by using historical data quantiles, and the threshold is corrected by combining exponentially weighted moving average to capture real-time data trends, forming a dynamic threshold range. On the other hand, an ensemble multi-classifier is constructed using random forest, gradient boosting tree, and support vector machine, and the classifier parameters are optimized by an improved antlion optimization algorithm. This optimization process combines the statistical characteristics of soil parameters for mixed initialization, introduces the time autocorrelation coefficient of soil parameters to correct the ant random walk step size, and uses the weight factor of abnormal samples to optimize the position of elite antlions, finally outputting the optimal parameter combination. The soil parameter sequence is input into the optimized ensemble multi-classifier to obtain the anomaly probability, and the warning level is determined by combining the dynamic threshold range, thus completing the anomaly early warning.
[0033] The advantages are: the technical solution of this application addresses the technical problems it solves, including: 1. Addressing the limitations of traditional monitoring methods that rely on single manual sampling or sensors and cannot cover multi-dimensional soil information, this solution integrates four data sources: soil sensors, remote sensing platforms, weather stations, and geographic information databases. Through standardized preprocessing and multimodal fusion, a complete soil parameter sequence is formed, encompassing soil physical parameters, surface features, meteorological drivers, and topographic attributes. High-frequency node sets capture real-time changes in dynamic parameters such as soil moisture and nutrients, while low-frequency node sets supplement basic information on static features such as soil type and topography. A self-attention mechanism is then used to accurately calculate data association weights, avoiding information bias from a single data source. Compared to traditional single-data-source monitoring, the coverage of soil parameter information is significantly improved, providing a more comprehensive reflection of the true state of the soil at different spatiotemporal scales and solving the problems of "limited sampling points and incomplete information."
[0034] 2. Addressing the shortcomings of current multi-source data fusion algorithms in processing complex soil data, such as poor stability and inaccurate feature extraction, this solution adopts a "node-level feature extraction + element-level weighted fusion" strategy: For high-frequency data, a 1D convolutional neural network is used to extract time-series features, adapting to its continuous variation characteristics; for low-frequency data, a multilayer perceptron is used to extract nonlinear features, avoiding redundancy in the time dimension; simultaneously, a self-attention mechanism dynamically adjusts the weights within high-frequency data and across high and low frequencies, replacing the traditional fixed-weight fusion method. This fusion method can accurately capture the correlation strength between different data sources, reduce noise interference, and improve the feature signal-to-noise ratio of the fused soil parameter sequence compared to traditional fusion algorithms, providing a more reliable data foundation for subsequent anomaly early warning and solving the problems of "low fusion efficiency and feature distortion".
[0035] 3. To address the shortcomings of existing early warning systems, which rely on single parameters, fixed thresholds, and limited classifier performance, this solution improves early warning accuracy in two ways: First, it constructs a dynamic threshold range, determining the initial threshold based on historical quantiles and using Exponentially Weighted Moving Average (EWMA) to capture real-time data trends and correct the threshold. This avoids the problem of fixed thresholds failing to adapt to dynamic changes in soil parameters and reduces false alarms caused by threshold rigidity. Second, it employs an improved Antlion optimization algorithm to optimize a multi-classifier ensemble of Random Forest, XGBoost, and SVM. This is achieved by using hybrid initialization to adapt to soil parameter distribution, adjusting the search step size using time autocorrelation coefficients, and optimizing elite solutions with anomaly sample weight factors, prioritizing the recall rate of anomaly samples. Compared to traditional single-classifier and fixed-threshold early warning systems, this solution significantly improves the anomaly sample recall rate and overall classification accuracy, effectively reducing missed and false alarm rates and solving the problem of "insufficient early warning accuracy and difficulty in responding to sudden anomalies." Attached Figure Description
[0036] Figure 1 This is a flowchart of an embodiment of the present invention; Figure 2 This is a schematic diagram of the multi-source data fusion process according to an embodiment of the present invention; Figure 3 This is a system functional block diagram according to an embodiment of the present invention. Detailed Implementation
[0037] The following detailed description illustrates the specific implementation method: The basic implementation examples are as follows: Figure 1 As shown: A method for early warning of soil parameter anomalies based on multi-source data fusion, including: S1: Based on soil sensors, remote sensing platforms, weather stations, and geographic information databases of the target area, multi-source fused soil data is collected and preprocessed to obtain a standardized dataset; wherein, S1 includes: S1-1: Soil parameter data is collected based on a multi-parameter soil sensor array deployed in the target area. After preprocessing, high-resolution soil physical parameter grids are output. In this embodiment, the multi-parameter soil sensor array deployed in the target area includes a soil moisture sensor, a conductivity sensor, a temperature sensor, and a pore water pressure sensor. By setting the sampling frequency to 15 minutes / time and continuously collecting data for 30 days, four core physical parameters—soil volumetric water content, soil conductivity, soil temperature, and pore water pressure—are collected. After performing conventional outlier removal and time series smoothing on the collected parameters, using the latitude and longitude coordinates of the sensor deployment area as control points, ordinary Kriging interpolation is used to interpolate the discrete point data into spatially continuous grid data with a spatial resolution of 10m. Four types of high-resolution soil physical parameter grids are output: soil volumetric water content grid (unit: %), value range: [The text abruptly ends here, so the translation stops here as well.] Soil electrical conductivity grid (units) Range of values Soil temperature grid (unit: °C, range of values) ) and soil pore water pressure grid (unit: kPa, value range) ).
[0038] S1-2: Based on the multispectral image data and radar image data of the target area, optical remote sensing data processing and radar remote sensing data processing are performed respectively to output multi-dimensional soil and surface feature raster. In this embodiment, multispectral image data and radar image data of the target area are acquired through a satellite platform or an airborne platform. Multispectral image data and radar image data belong to remote sensing image data. Amplitude calibration and geometric correction are performed on different remote sensing image data. Radiometric calibration linearly normalizes pixel grayscale based on the sensor response function. Geometric correction uses ground control points to perform affine or polynomial transformations to align the images to a unified coordinate system. After correction, the images are cropped to the system's working area and invalid pixels are removed. Finally, multispectral image raster and radar image raster are output.
[0039] S1-3: Based on meteorological station data collected from the target area and surrounding meteorological stations, normalization and spatial rasterization processing are performed to output a meteorological driving raster; in this embodiment, the output meteorological driving raster is, for example, a cumulative rainfall raster (unit: mm, value...). Maximum 1-hour rainfall intensity grid (unit) Values Daily average wind speed grid (unit) Values ), Daily potential evapotranspiration grid (units) Values ).
[0040] S1-4: Based on the soil survey database and geospatial database of the target area, extract soil type, soil texture, soil organic matter content, and digital elevation model; calculate soil type code, soil texture code, and topographic parameters; and output the corresponding code and topographic feature raster. In this embodiment, the soil type code is mapped to an integer code according to the "Chinese Soil Classification and Codes" and takes the following values. Soil texture coding classifies soil texture into six categories, including sandy soil, loam, and clay, based on the content of gravel, silt, and clay particles. These categories are mapped to integer codes with values... The calculation of terrain parameters includes calculating slope, curvature and elevation based on the elevation model to obtain the corresponding raster data.
[0041] S1-5: High-resolution soil physical parameter raster, multi-dimensional soil and surface feature raster, meteorological driven raster, coded and topographic feature raster are processed according to spatial consistency, unified format and associated metadata, and integrated into a standardized dataset; in this embodiment, all raster data are unified to WGS84 / UTM projection coordinate system, 10m spatial resolution, and invalid areas are marked with NoData value; in the data format, raster data is saved in GeoTIFF format, and coded data is simultaneously saved in vector shp format; at the same time, each data file is accompanied by metadata, including acquisition time, preprocessing method, parameter unit, and accuracy index, to ensure traceability.
[0042] S2: The standardized dataset is divided into a high-frequency node set and a low-frequency node set by applying a preset collection frequency threshold. After calculating the correlation weights between nodes based on a self-attention mechanism, features are extracted from the high-frequency node set and the low-frequency node set respectively, and then fused to obtain the fused soil parameter sequence; among which, such as Figure 2 As shown, S2 includes: S2-1: The sampling frequency is preset. High-resolution soil physical parameter raster data in the standardized dataset is divided into a high-frequency node set, while multi-dimensional soil and surface feature raster data, meteorological driven raster data, and coded and topographic feature raster data in the standardized dataset are divided into a low-frequency node set. In this embodiment, based on the dynamic characteristics of soil parameters and the needs of agricultural production monitoring, the preset sampling frequency threshold is 1 time / hour. The classification logic for the high-frequency and low-frequency node sets is as follows: High-frequency node set: sampling frequency The parameters per hour correspond to the high-resolution soil physical parameter grids output by S1-1, specifically including: soil volumetric water content grid (acquisition frequency 15 minutes / time); soil electrical conductivity grid (acquisition frequency 15 minutes / time); soil temperature grid (acquisition frequency 15 minutes / time); and soil pore water pressure grid (acquisition frequency 15 minutes / time). Low-frequency node set: sampling frequency The parameters per hour include raster data output from S1-2 to S1-4, specifically including: multispectral image raster (3 days / time), radar image raster (7 days / time); cumulative rainfall raster (24 hours / time), daily average wind speed raster (24 hours / time); soil type coding raster (static data), and topographic parameter raster (quarterly update).
[0043] S2-2: A high-frequency node matrix is constructed with time step t as the dimension. In this application, the length of time step t is set to 1 hour, which matches the acquisition frequency threshold. Since the high-frequency data acquisition frequency is 15 minutes / time, each time step contains 4 high-frequency data acquisitions. At the same time, according to the needs of agricultural monitoring, the time step range is set from t=1 to t=720, covering a continuous monitoring cycle of 30 days.
[0044] For any grid cell ,in , , , The total number of rows and columns of the raster is calculated from the area of the target region and a resolution of 10m, for example, a 100-acre area. , For high-frequency parameters ,include Indicates water content; Indicates electrical conductivity; Indicates temperature; This represents the pore water pressure; therefore, for any grid cell... and the For high-frequency parameters, acquire 4 raw data points within time step t. , , , Substitute into the following formula to calculate the elements of the high-frequency node matrix. The expression is:
[0045] in, For time step t, At the grid cell, the raw acquisition value of the p-th type parameter in the k-th acquisition; For high-frequency parameter types, in this embodiment... ; For time step t, The grid cells and the high-frequency node matrix elements of the p-th class parameter together constitute the high-frequency node matrix. , dimension ; S2-3: Interpolate and match the low-frequency node set according to the time step to construct the low-frequency node matrix. In this embodiment, the low-frequency data acquisition frequency is lower than the time step length. For example, multispectral images are acquired every 3 days, corresponding to 72 time steps. Therefore, it is necessary to match the low-frequency data to each time step t through linear interpolation to ensure that it is consistent with the time dimension of the high-frequency node matrix and to meet the spatiotemporal alignment requirements of subsequent cross-modal fusion. And for any grid cell , No. Low-frequency parameters, such as Multispectral data; For radar data; This refers to cumulative rainfall. Encode soil type; The slope is used to determine the adjacent low-frequency data acquisition times before and after time step t. (Previous collection time) and (Last acquisition time), obtain the low-frequency data value at the corresponding moment. and Substitute this into the following linear interpolation formula:
[0046] in, For low-frequency node matrix, For low-frequency data types, For low-frequency data, the adjacent acquisition times before and after time step t are... For (x, y) raster cells in Low-frequency data values at any given time. For (x, y) raster cells in The low-frequency data values at time points are mapped to ; In addition, for static low-frequency parameters, such as soil type coding ,at this time ,therefore = The encoded value remains unchanged.
[0047] S2-4: Based on the self-attention mechanism, the dynamic associations between nodes are captured. The correlation weights of the high-frequency node matrix and the cross-modal correlation weights of the interaction between high-frequency and low-frequency nodes are calculated and normalized to obtain the high-frequency internal weights and cross-modal weights. In this embodiment, the self-attention mechanism is to construct a Query(Q), Key(K), Value(V) matrix to generate a network to capture the dynamic associations between nodes. The model structure and parameters are as follows: Network structure: 3-layer fully connected network. The number of neurons in the input layer corresponds to the data source dimension, with M=4 for high frequency and N=5 for low frequency. The number of neurons in the hidden layer is 64. The number of neurons in the output layer is determined by 5-fold cross-validation and is the attention dimension d=32. Weight initialization: Learnable weight matrix for high-frequency data , , All belong to Learnable weight matrix for low-frequency data , , All belong to Xavier initialization is used for the learnable weight matrix of high-frequency data and the learnable weight matrix of low-frequency data to avoid gradient vanishing in the early stage of training.
[0048] Based on the self-attention mechanism network described above, high-frequency intra-modal correlation weights and high- and low-frequency cross-modal correlation weights are calculated respectively. The calculation process for high-frequency intra-modal correlation weights is as follows: First, generate the Q, K, and V matrices, and then process the high-frequency node matrix. For each time step t, the extracted dimension is... The tensor is input into the self-attention mechanism network to compute... , , ; Next, the attention score is calculated using a scaled dot product attention mechanism, expressed as:
[0049] in, for Transpose of; ;right Softmax normalization is performed along the high-frequency parameter dimension to obtain the high-frequency internal weights. ,satisfy .
[0050] The calculation process for the high- and low-frequency cross-modal correlation weights is as follows: First, generate the Q, K, and V matrices, and then process the low-frequency node matrix. For each time step t, the extracted dimension is... The tensor is input into the self-attention mechanism network to compute... , , ; Next, the attention score is calculated using a scaled dot product attention mechanism, expressed as:
[0051] in, Using the high-frequency internal calculation results, For matrix The transpose of, for Softmax normalization is performed along the low-frequency parameter dimension to obtain the low-frequency internal weights. ,satisfy .
[0052] S2-5: Construct a high-frequency node feature extraction model and a low-frequency node feature extraction model. High-frequency data is weighted according to its internal weights and then input into the high-frequency node feature extraction model to output high-frequency features. Low-frequency data is weighted according to its cross-modal weights and then input into the low-frequency node feature extraction model to output low-frequency features. In this embodiment, the high-frequency node feature extraction model uses a 1D-CNN model, whose structure is: input layer dimension is 3. Convolutional layer 1 has 32 layers. The convolutional kernel has a stride of 1 and the activation function is ReLU; the max pooling layer 1 is... Pooling kernel with a stride of 2; convolutional layer 2 has 64 pooling kernels. The convolutional kernel has a stride of 1 and the activation function is ReLU; the max pooling layer 2 is... Pooling kernel with a stride of 2; fully connected layer with 128 neurons and ReLU activation function; output layer with 32 neurons; The training process of the model is as follows: 80% of the high-frequency node matrix H generated by S2-2 is used as the training set and 20% is used as the validation set. In the training parameters, the loss function is the mean squared error, the optimizer is Adam, the learning rate is 0.001, the training rounds are 50, and training stops if the mean squared error of the validation set does not decrease for 5 consecutive rounds. Based on the 1D-CNN model trained as described above, the weighted high-frequency data... Input, the expression is:
[0053] in, These are the kernel weights of convolutional layer 1. For bias, This is the weighted high-frequency data; This represents the high-frequency feature map of the c-th feature channel at time step t. For the feature channel, Mapped to high-frequency features with time step t ; The low-frequency node feature extraction model adopts a multilayer perceptron, or MLP model. The structure of this model is as follows: the input layer has a dimension of 5, the first hidden layer has 64 neurons with the activation function ReLU; the second hidden layer has 32 neurons with the activation function ReLU; and the output layer has 32 neurons. During the training of the MLP model, the dataset uses the low-frequency node matrix generated by S2-3. 80 20% was used as the training set and 20% as the validation set. In the training parameters, the loss function was mean squared error, the optimizer was Adam, the learning rate was 0.001, and the training epochs were 30.
[0054] Based on the trained MLP model described above, the weighted low-frequency data Input, the expression is:
[0055] in, , These are the hidden layer weights of the multilayer perceptron. , For bias, The low-frequency data is weighted. The low-frequency feature of the c-th feature channel at time step t is mapped to a low-frequency feature with time step length t. ; S2-6: The high-frequency and low-frequency features are fused using element-level weighting to output the fused soil parameter sequence; in this embodiment, the expression for the fused soil parameter sequence is: Among them, high-frequency feature weights and low-frequency feature weights The random forest feature importance algorithm is used to calculate the contribution of high-frequency features and low-frequency features to soil anomaly early warning. If the importance of high-frequency features accounts for 60%, the importance of low-frequency features accounts for... ,but , The rationality of the weights is verified through 5-fold cross-validation, and the early warning accuracy of the fused features is required to be ≥89%.
[0056] S3: Construct a soil parameter anomaly early warning model. The fused soil parameter sequence is used as input to the model, which outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. S3 includes: S3-1: Constructing a soil parameter anomaly early warning model based on dynamic threshold determination and an improved integrated multi-classifier; In this embodiment, the soil parameter anomaly early warning model adopts a parallel architecture of a dynamic threshold module + an improved integrated multi-classifier module. The output results of both are jointly determined to determine the early warning level after logical verification. The specific architecture is as follows: Dynamic threshold module: Based on historical data quantiles and exponentially weighted moving average (EWMA), it corrects the normal threshold range of each feature dimension in real time; Improved integrated multi-classifier module: Based on random forest (RF), gradient boosting tree (XGBoost), and support vector machine (SVM), the parameters are optimized by improving the antlion optimization algorithm to output the probability of soil anomalies; Logical verification layer: Performs consistency verification on the output results of the two types of modules. If the results conflict (e.g., the probability determination is normal but the threshold exceeds the range), the historical similar sample library is called for secondary correction.
[0057] S3-2: The fused soil parameter sequence is input into the soil parameter anomaly early warning model. The soil parameter anomaly early warning model calls the dynamic threshold determination to calculate the threshold range of each soil parameter feature based on the historical dataset, and uses EWMA to capture real-time data trends. The threshold is then corrected based on the EWMA trend to obtain the final dynamic threshold range. In this embodiment, the detailed process of calculating and correcting the dynamic threshold range is as follows: The input data is the fused soil parameter sequence S output from step S2, with a feature dimension of 32 and a time step of [missing information]. Spatial resolution .
[0058] The first 600 time steps of the fused soil parameter sequence S were extracted as the historical dataset. , dimension And outlier removal is performed on the historical dataset.
[0059] Processed historical dataset Calculate the 95% confidence interval for each feature dimension c as the normal threshold range, and use it as the initial threshold. Then, the upper threshold... Lower threshold ; Next, an exponentially weighted moving average (EWMA) is used to capture real-time data trends and dynamically adjust the initial threshold. During adjustment, the EWMA is first calculated, with the expression:
[0060] in, This represents the EWMA value at time t. For smoothing coefficients, This represents the sequence of fused soil parameters at time t. This represents the EWMA value at time t-1; The rule for correcting the threshold is as follows: like The upper threshold is then corrected as follows:
[0061] like The lower threshold is then corrected as follows:
[0062] The final dynamic threshold range is obtained as follows The revised threshold still needs to satisfy the physical constraints of each soil parameter, such as the range of soil volumetric water content. .
[0063] S3-3: The soil parameter anomaly early warning model is based on soil parameter sequences. It uses an improved optimization algorithm to optimize the parameters of an ensemble multi-classifier and outputs the soil anomaly probability based on the final ensemble multi-classifier output; specifically: Random forest Gradient boosting tree and Support Vector Machine Constructing an ensemble multi-classifier; in this embodiment, a random forest is selected. Gradient boosting tree and Support Vector Machine The initial parameter settings are as follows: Random Forest Number of decision trees The range of values is Initial value is 100; maximum depth The range of values is The initial value is 5; the minimum number of samples required for node splitting. The range of values is The initial value is 2.
[0064] Gradient boosting tree Learning rate The range of values is The initial value is 0.1; the maximum depth The range of values is The initial value is 4; minimum number of samples required for node splitting. The range of values is The initial value is 2.
[0065] Support Vector Machine Penalty coefficient The range of values is The initial value is 1; kernel function parameters The range of values is The initial value is 0.1.
[0066] The parameters of the ensemble multi-classifier are optimized based on the improved antlion optimization algorithm, including: Prioritizing outlier recall while maintaining overall classification accuracy, a random forest is obtained. The parameters to be optimized include the number of decision trees. Maximum depth Minimum number of samples for node splitting Obtain the gradient boosting tree The parameters to be optimized include the learning rate. Maximum depth Minimum number of samples for node splitting Obtaining Support Vector Machines The parameters to be optimized, including the penalty coefficient. Kernel function parameters And construct an optimization vector based on the above parameters. The value range of each parameter is constrained according to the value range of the parameters to be optimized for each of the above classifiers; optimization vector The expression is:
[0067] in, The number of decision trees in the random forest; The maximum depth of a single decision tree in a random forest; This represents the minimum number of samples required for node splitting in a random forest. To increase the learning rate of the tree using gradient gradation, To determine the maximum depth of a single tree in a gradient boosting tree. Minimum number of samples required to split a node in a gradient boosting tree; The penalty coefficient for the support vector machine. These are the kernel function parameters for the support vector machine.
[0068] Based on the anomaly sample recall rate of optimized vectors and soil parameter anomaly early warning, a fitness function is constructed. The expression is:
[0069]
[0070]
[0071] in, To improve the overall classification accuracy of the integrated multi-classifiers, The recall rate for samples with abnormal soil parameters. These are the weighting coefficients. Cross-validation is used to determine the priority for ensuring recall rate; A true positive result indicates that the actual abnormality was correctly detected and warned. A true negative result indicates that the actual normal condition was correctly identified. A false positive indicates that a normal result is misdiagnosed as abnormal. A false negative indicates that an actual abnormality is misdiagnosed as normal. Based on the statistical characteristics of soil parameters, the optimization vector is... Perform mixed initialization, and set the initial population size to [value]. , =50; For each parameter dimension, the initial antlion population is obtained by initializing 30% randomly and 70% based on statistical characteristics. Random initialization is based on uniform random sampling within the defined scope; statistical characteristic initialization is based on the time autocorrelation coefficient of soil parameter sequences. Sampling is performed near the historical optimal parameters; for example, the number of decision trees. Initial value 100, sampling range .
[0072] Time autocorrelation coefficient based on soil parameter series The expression for calculating the random walk step size of an ant is:
[0073]
[0074] in, Let the random walk step size of the ant be . For the number of iterations, For cumulative operation, To optimize variable dimensions, , For random numbers, in Evenly distributed between them; This represents the covariance of the soil parameter sequences at time t and time t-1. This represents the soil parameter sequence at time t. This represents the soil parameter sequence at time t-1. This represents the variance of the soil parameter sequence at time t. The variance of the soil parameter sequence at time t-1; The ant random walk results are mapped to the range of values of the optimization vector. After obtaining the ant's random walk position and normalizing it, the trap radius is calculated based on the antlion's fitness value, and the ant's position within the antlion trap is corrected. The trap radius expression is:
[0075] in, , where is the initial maximum radius. The attenuation coefficient is... ; This represents the fitness value of the antlion. , These are the maximum and minimum fitness values of the current population, respectively.
[0076] Calculate the fitness values of all antlions and ants, and select the top K optimal solutions as elite antlions, denoted as . And introduce anomaly sample weighting factors. The expression for updating the position of elite antlions is:
[0077] in, This represents the j-th dimension parameter value of the k-th elite antlion in the (t+1)-th generation. This represents the j-th dimension parameter value of the k-th elite antlion in the t-th generation. Indicates the weighting factor for outlier samples. Represents the learning factor. This indicates that the mean is 0 and the standard deviation is... Normally distributed random numbers, Indicates the standard deviation of elite variation. , , This indicates the upper and lower limits of the value of the j-th parameter; After each iteration, the corrected ant positions are merged with the original antlion population, sorted by fitness value, and the top N=50 optimal solutions are retained as the (t+1)th generation antlion population. This process continues until the preset number of iterations is reached, at which point the optimal solution in the population is output. Random forest as an ensemble of multi-classifiers Gradient boosting tree and Support Vector Machine The optimal combination of parameters is found, and these are substituted into each classifier to obtain the parameter-optimized ensemble multi-classifier. The optimized ensemble multi-classifier outputs soil anomaly probability results for the soil parameter sequence.
[0078] S3-4: The soil parameter anomaly early warning model determines the early warning level based on the output soil anomaly probability and the final dynamic threshold range, and outputs the early warning level determination result; where: Random forest based on parameter optimization Output soil anomaly probability for soil parameter sequence ; Gradient boosting tree with optimized parameters Output soil anomaly probability for soil parameter sequence ; Support Vector Machine with Optimized Parameters Output soil anomaly probability for soil parameter sequence ; The probability of a single classifier is fused using weighted voting, and the expression is:
[0079] in, Let be the probability that the sample belongs to class y. The values are 0 for normal, 1 for mild abnormality, and 2 for severe abnormality. Random Forest Weight, Gradient boosting tree Weight, For Support Vector Machines Weight, , , Assignment based on the classifier's F1 score on the validation set, and ; Based on anomaly probability and dynamic threshold range Based on the core objective of prioritizing the recall rate of abnormal samples, the warning level is determined according to the following rules: First, regarding the method for determining the anomaly probability threshold, in this invention, the normal state judgment threshold is 0.7, and the minimum anomaly state judgment threshold is 0.5. These are the optimal decision thresholds determined through 5-fold cross-validation and ROC curve optimal threshold analysis. The specific determination process is as follows: Randomly divide the historical labeled dataset into 80% as the training set and 20% as the validation set, and repeat the cross-validation 5 times. Iterate through probability thresholds in the range of 0.1-0.9 on the validation set, and calculate the outlier recall, overall classification precision, and F1 score for each threshold. Using the constraint of "abnormal sample recall rate ≥ 90% and overall classification accuracy ≥ 85%", select the threshold combination that meets the requirements; Final determination: The high confidence threshold for normal status is 0.7: to ensure the accuracy of normal status determination and control the false positive rate to within 5%; The minimum confidence threshold for abnormal states is 0.5: priority is given to ensuring that abnormal samples are not missed and the false negative rate is controlled within 10%.
[0080] Next, define the deviation threshold. , This represents the historical threshold of feature c. The historical threshold value represents feature c; the fused soil parameter value is... The judgment rules follow the principle of severe abnormality priority > mild abnormality priority > normal priority, and the following judgments are made: Severe abnormality (Level 2 warning): If or If so, it is determined to be a severe abnormality, and a level two warning is issued; Mild abnormality (Level 1 warning): If or If so, it is determined to be a mild abnormality, and a Level 1 warning is issued; Normal (no warning): 1. If and ; 2. and and ,at the same time ; If any of the above conditions are met, the system is considered normal and no warning is issued. If multiple anomaly probability thresholds are met simultaneously, for example and It was directly classified as a severe anomaly according to the highest priority. If the probability determination and the threshold determination conclusion are inconsistent, for example but Then, a logical check will be triggered: 1. Call the historical similar sample library and calculate the cosine similarity between the current sample and the historical labeled samples; 2. Select the top 5 samples with the highest similarity, and use the label of the majority sample as the corrected judgment result; 3. If the similarity is below 0.6, it is judged as "abnormal and pending confirmation", and a manual review reminder will be sent.
[0081] The final warning results are output in the form of spatiotemporal label + level + confidence score, specifically including: Spatial information: raster cell coordinates Time information: Warning time step t; Warning level: No warning / Level 1 warning / Level 2 warning; Confidence level: Anomaly probability after fusion. The maximum value; Reason for the anomaly: Feature dimensions exceeding the threshold, such as soil volumetric water content exceeding the upper threshold by 35%; S4: Based on the transmission of early warning results to the early warning display module, early warning information is pushed and data visualization interaction is performed. In this embodiment, it includes three major steps: early warning information preprocessing and rule matching, multi-channel push, and multi-dimensional visualization interaction. First, the early warning information is standardized, the integrity of the required fields is verified, the WGS84 coordinates of the abnormal location are converted into a coordinate system adapted to the user terminal (such as GCJ02), and the preset agricultural suggestion measures library is matched according to the "early warning level + abnormal parameters". Then, based on the user configuration dataset, the target users are associated by the managed plots, and the push rules and content are customized according to the early warning level (level 2 early warning is pushed by "APP + SMS + email" triple push, level 1 early warning is pushed according to user preferences) and user roles (growers simplify content, agricultural technicians supplement professional data, and administrators add regional statistics).
[0082] Next, early warning information is pushed through multiple channels: APP push notifications are based on the JPush service, transmitting JSON format content containing core early warning information, automatically retrying and triggering SMS backups upon failure; SMS push notifications rely on Alibaba Cloud SMS service, using a registered template and limiting the number of times the same user, the same plot, and the same type of early warning can be sent within one hour; email push notifications generate content in HTML format including detailed tables and map screenshots, with an attached Excel file containing soil parameters for the past 24 hours. Finally, a multi-dimensional visualization and interactive system is constructed. Spatially, different colored abnormal plot icons are marked on maps across multiple terminals, supporting area filtering and location; temporally, ECharts is used to draw parameter trend charts containing dynamic threshold intervals and early warning points; statistically, multi-dimensional reports are generated and can be exported, while providing interactive functions such as detailed query, historical backtracking, and processing status feedback to ensure users can efficiently obtain and utilize early warning information.
[0083] like Figure 3 As shown, in another embodiment of this example, a soil parameter anomaly early warning system based on multi-source data fusion is also included, applied to the above-mentioned soil parameter anomaly early warning method based on multi-source data fusion. This system includes a data acquisition module, a preprocessing module, a data fusion module, a soil parameter early warning module, and an early warning visualization module, wherein: The data acquisition module collects multi-source fused soil data based on soil sensors, remote sensing platforms, weather stations, and geographic information databases in the target area. The preprocessing module preprocesses the multi-source fused soil data to obtain a standardized dataset; The data fusion module is used to divide the standardized dataset into high-frequency node sets and low-frequency node sets by calling the preset collection frequency threshold. After calculating the correlation weight between nodes based on the self-attention mechanism, features are extracted from the high-frequency node sets and low-frequency node sets respectively and then fused to obtain the fused soil parameter sequence. The soil parameter early warning module constructs a soil parameter anomaly early warning model. The soil parameter early warning module is also used to take the fused soil parameter sequence as input to the soil parameter anomaly early warning model. The soil parameter anomaly early warning model outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. The early warning visualization module is used to push early warning information and provide visual interaction based on the early warning results.
[0084] The above are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.
Claims
1. A method for early warning of soil parameter anomalies based on multi-source data fusion, characterized in that: include: S1: Based on soil sensors, remote sensing platforms, weather stations and geographic information databases in the target area, multi-source fused soil data is collected and preprocessed to obtain a standardized dataset; S2: The standardized dataset is divided into a high-frequency node set and a low-frequency node set using a preset collection frequency threshold. After calculating the correlation weights between nodes based on a self-attention mechanism, features are extracted from the high-frequency node set and the low-frequency node set respectively, and then fused to obtain the fused soil parameter sequence; specifically: Based on the self-attention mechanism to capture the dynamic correlation between nodes, the correlation weight of the high-frequency node matrix and the cross-modal correlation weight of the interaction between high-frequency and low-frequency nodes are calculated and normalized to obtain the high-frequency internal weight and cross-modal weight. A high-frequency node feature extraction model and a low-frequency node feature extraction model are constructed. The high-frequency data is weighted according to the internal weight of the high-frequency data and then input into the high-frequency node feature extraction model. A 1D convolutional neural network is used to extract the time series features of the high-frequency data and output the high-frequency features. The low-frequency data is weighted according to the cross-modal weights and then input into the low-frequency node feature extraction model. The multilayer perceptron is used to extract the nonlinear features of the low-frequency data and output the low-frequency features. High-frequency and low-frequency features are fused using element-weighted fusion to output the fused soil parameter sequence. S3: Construct a soil parameter anomaly early warning model. The fused soil parameter sequence is used as the input of the soil parameter anomaly early warning model. The soil parameter anomaly early warning model outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. S4: Based on the early warning results, the early warning display module is used to push early warning information and perform data visualization interaction.
2. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 1, characterized in that: S1 includes: S1-1: Soil parameter data is collected based on a multi-parameter soil sensor array deployed in the target area, and high-resolution soil physical parameter grids are output after preprocessing. S1-2: Based on the multispectral image data and radar image data of the target area, optical remote sensing data processing and radar remote sensing data processing are performed respectively to output multi-dimensional soil and surface feature raster. S1-3: Collect meteorological station data based on the target area and surrounding meteorological stations, perform normalization and spatial rasterization processing, and output meteorological driven raster; S1-4: Based on the soil survey database and geospatial database of the target area, extract soil type, soil texture, soil organic matter content and digital elevation model, encode soil type, soil texture code and calculate topographic parameters, and output the corresponding codes and topographic feature raster; S1-5: High-resolution soil physical parameter raster, multi-dimensional soil and surface feature raster, meteorological driven raster, coded and topographic feature raster are integrated into a standardized dataset by processing according to spatial consistency, unified format and associated metadata.
3. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 2, characterized in that: S2 includes: S2-1: Preset the acquisition frequency, divide the high-resolution soil physical parameter raster in the standardized dataset into a high-frequency node set, and divide the multi-dimensional soil and surface feature raster data, meteorological driven raster data, coded and topographic feature raster data in the standardized dataset into a low-frequency node set; S2-2: Construct a high-frequency node matrix with time step t as the dimension, expressed as: in, For time step t, At the grid cell, the raw acquisition value of the p-th type parameter in the k-th acquisition; This refers to the general type of high-frequency parameters; For a high-frequency node matrix, the mapping is as follows: ; S2-3: Interpolate and match the low-frequency node set according to the time step to construct the low-frequency node matrix, the expression of which is: in, For low-frequency node matrix, For low-frequency data types, For low-frequency data, the adjacent acquisition times before and after time step t are... For (x, y) raster cells in Low-frequency data values at any given time. For (x, y) raster cells in The low-frequency data values at time points are mapped to ; S2-4: Based on the self-attention mechanism, capture the dynamic correlation between nodes, calculate the correlation weight of the high-frequency node matrix and the cross-modal correlation weight of the interaction between high-frequency and low-frequency nodes, and perform normalization to obtain the high-frequency internal weight and cross-modal weight. S2-5: Construct a high-frequency node feature extraction model and a low-frequency node feature extraction model. Weight the high-frequency data according to the internal weights of the high-frequency data and input it into the high-frequency node feature extraction model to output high-frequency features. Weight the low-frequency data according to the cross-modal weights and input it into the low-frequency node feature extraction model to output low-frequency features. S2-6: The high-frequency and low-frequency features are fused using element-level weighting to output the fused soil parameter sequence.
4. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 3, characterized in that: In S2-4, the dynamic correlation between nodes is captured based on the self-attention mechanism. Specifically, the correlation weights of the high-frequency node matrix and the cross-modal correlation weights of interactions between high-frequency and low-frequency nodes are calculated and normalized. Construct a Query, Key, and Value matrix, and analyze the high-frequency node matrix. ,generate , , ;in , , These are the Q matrix, K matrix, and V matrix corresponding to the high-frequency node matrix, respectively. , , All are learnable weight matrices, and all belong to M represents the high-frequency data source type, and d represents the attention dimension; For low-frequency node matrix ,generate , , ;in , , These are the Q matrix, K matrix, and V matrix corresponding to the low-frequency node matrix, respectively. , , All are learnable weight matrices, and all belong to , For low-frequency data sources, d represents the attention dimension; The relevance weights of the high-frequency node matrix are calculated using the following expression: in, for transpose, The attention score, which represents the high-frequency node matrix, reflects the correlation strength of different high-frequency data at that moment. The cross-modal correlation weights for interactions between high-frequency and low-frequency nodes are calculated using the following expression: in, Attention scores, which characterize interactions between high- and low-frequency nodes, are used to capture the correlation between high-frequency and low-frequency data. To each and The high-frequency internal weights are obtained through softmax normalization. and cross-modal weights .
5. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 4, characterized in that: In step S2-5, the high-frequency data is weighted according to the high-frequency internal weights and then input into the high-frequency node feature extraction model. The output high-frequency features are as follows: A 1D convolutional neural network is used to extract high-frequency time series features, and the high-frequency features are output as follows: in, For convolution kernel weights, For bias, This is the weighted high-frequency data; This represents the high-frequency feature map of the c-th feature channel at time step t. For the feature channel, Mapped to high-frequency features with time step t ; In step S2-5, the low-frequency data is weighted according to cross-modal weights and then input into the low-frequency node feature extraction model. The output low-frequency features are as follows: A multilayer perceptron is used to extract the nonlinear features of low-frequency data, and the low-frequency features are output as follows: in, , For the weights of the multilayer perceptron, , For bias, The low-frequency data is weighted. The low-frequency feature of the c-th feature channel at time step t is mapped to a low-frequency feature with time step length t. ; In S2-6, the expression for the fused soil parameter sequence is: ; Represents the weights of high-frequency features. This represents the weight of low-frequency features.
6. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 5, characterized in that: S3 includes: S3-1: Constructing an early warning model for soil parameter anomalies based on dynamic threshold determination and an improved integrated multi-classifier; S3-2: Input the fused soil parameter sequence into the soil parameter anomaly early warning model. The soil parameter anomaly early warning model calls the dynamic threshold judgment to calculate the threshold range of each soil parameter feature based on the historical dataset, and uses EWMA to capture real-time data trends. Based on the EWMA trend, the threshold is corrected to obtain the final dynamic threshold range. S3-3: The soil parameter anomaly early warning model is based on the soil parameter sequence. It calls an improved optimization algorithm to optimize the parameters of the ensemble multi-classifier and outputs the soil anomaly probability according to the final ensemble multi-classifier. S3-4: The soil parameter anomaly early warning model determines the early warning level based on the output soil anomaly probability and the final dynamic threshold range, and outputs the early warning level determination result.
7. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 6, characterized in that: In step S3-2, the fused soil parameter sequence is input into the soil parameter anomaly early warning model. The soil parameter anomaly early warning model calls the dynamic threshold determination function to calculate the threshold range for each soil parameter feature based on the historical dataset, and uses EWMA to capture real-time data trends. Based on the EWMA trend, the threshold is corrected to obtain the final dynamic threshold range, which is as follows: Historical datasets were extracted from the fused soil parameter sequences. ; Calculate the historical quantiles of each feature dimension c in the soil parameter sequence, take the 95% confidence interval as the normal threshold range, and then determine the upper threshold. Lower threshold ; The exponentially weighted moving average is used to capture real-time data trends. The expression is: in, This represents the EWMA value at time t. For smoothing coefficients, This represents the sequence of fused soil parameters at time t. This represents the EWMA value at time t-1; based on Trend correction threshold, if The upper threshold is then corrected as follows: like The lower threshold is then corrected as follows: The final dynamic threshold range is obtained as follows Furthermore, the final dynamic threshold range satisfies the threshold boundary constraints of each parameter.
8. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 7, characterized in that: The soil parameter anomaly early warning model in S3-3 is based on soil parameter sequences. It calls an improved optimization algorithm to optimize the parameters of the ensemble multi-classifier, and the soil anomaly probability is output by the final ensemble multi-classifier as follows: Random forest Gradient boosting tree and Support Vector Machine Build an ensemble multi-classifier; The parameters of the ensemble multi-classifier are optimized based on the improved antlion optimization algorithm, including: Get Random Forest The parameters to be optimized include the number of decision trees. Maximum depth Minimum number of samples for node splitting Obtain the gradient boosting tree The parameters to be optimized include the learning rate. Maximum depth Minimum number of samples for node splitting Obtaining Support Vector Machines The parameters to be optimized, including the penalty coefficient. Kernel function parameters And construct an optimization vector based on the above parameters. The range of values for each parameter is constrained based on the range of values for the parameters to be optimized in each classifier; Based on the anomaly sample recall rate of optimized vectors and soil parameter anomaly early warning, a fitness function is constructed. The expression is: in, To improve the overall classification accuracy of the integrated multi-classifiers, The recall rate for samples with abnormal soil parameters. These are the weighting coefficients. A true positive result indicates that the actual abnormality was correctly detected and warned. A true negative result indicates that the actual normal condition was correctly identified. A false positive indicates that a normal result is misdiagnosed as abnormal. A false negative indicates that an actual abnormality is misdiagnosed as normal. Based on the statistical characteristics of soil parameters, the optimization vector is... Perform mixed initialization, and set the initial population size to [value]. The initial antlion population was obtained. ; Time autocorrelation coefficient based on soil parameter series The expression for calculating the random walk step size of an ant is: in, Let the random walk step size of the ant be . For the number of iterations, For cumulative operation, To optimize variable dimensions, It is a random number; This represents the covariance of the soil parameter sequences at time t and time t-1. This represents the soil parameter sequence at time t. This represents the soil parameter sequence at time t-1. This represents the variance of the soil parameter sequence at time t. The variance of the soil parameter sequence at time t-1; The ant random walk results are mapped to the range of values of the optimization vector. The positions of the ants' random walks are obtained and normalized. The trap radius is calculated based on the fitness value of the antlion, and the position of the ant in the antlion trap is corrected. Calculate the fitness values of all antlions and ants, and select the top K optimal solutions as elite antlions, denoted as . And introduce anomaly sample weighting factors. The expression for updating the position of elite antlions is: in, This represents the j-th dimension parameter value of the k-th elite antlion in the (t+1)-th generation. This represents the j-th dimension parameter value of the k-th elite antlion in the t-th generation. Indicates the weighting factor for outlier samples. Represents the learning factor. This indicates that the mean is 0 and the standard deviation is... Normally distributed random numbers, Indicates the standard deviation of elite variation. , , This indicates the upper and lower limits of the value of the j-th parameter; After each iteration, the corrected ant positions are merged with the original antlion population, sorted by fitness value, and the top N optimal solutions are retained as the (t+1)th generation antlion population. This process continues until the preset number of iterations is reached, at which point the optimal solution in the population is output. Random forest as an ensemble of multi-classifiers Gradient boosting tree and Support Vector Machine The optimal combination of parameters is found, and these are substituted into each classifier to obtain the parameter-optimized ensemble multi-classifier. The optimized ensemble multi-classifier outputs soil anomaly probability results for the soil parameter sequence.
9. The method for early warning of soil parameter anomalies based on multi-source data fusion according to claim 8, characterized in that: The soil parameter anomaly early warning model in S3-4 determines the early warning level based on the output soil anomaly probability and the final dynamic threshold range. The specific output early warning level determination result is as follows: Random forest based on parameter optimization Output soil anomaly probability for soil parameter sequence ; Gradient boosting tree with optimized parameters Output soil anomaly probability for soil parameter sequence ; Support Vector Machine with Optimized Parameters Output soil anomaly probability for soil parameter sequence ; The probability of a single classifier is fused using weighted voting, and the expression is: in, Let be the probability that the sample belongs to class y. The values are 0 for normal, 1 for mild abnormality, and 2 for severe abnormality. Random Forest Weight, Gradient boosting tree Weight, For Support Vector Machines Weight, , , Assignment based on the classifier's F1 score on the validation set, and ; Based on anomaly probability and dynamic threshold range Based on the core objective of prioritizing the recall rate of abnormal samples, the warning level is determined according to the following rules: The preset abnormal probability thresholds are: a normal state determination threshold of 0.7 and an abnormal state determination threshold of 0.
5. Define deviation threshold , This represents the historical threshold of feature c. The historical threshold value represents feature c; the fused soil parameter value is... The judgment rules follow the principle of severe abnormality priority > mild abnormality priority > normal priority, and the following judgments are made: Severe abnormality: If or If so, it is determined to be a severe abnormality, and a level two warning is issued; Mild abnormality: If or If so, it is determined to be a mild abnormality, and a Level 1 warning is issued; normal: like and ; and and ,at the same time ; If any of the above conditions are met, the system is considered normal and no warning is issued. If multiple anomaly probability thresholds are met simultaneously, the one with the highest priority is directly judged as a severe anomaly. If the probability determination and the threshold determination are inconsistent, a logic check will be triggered.
10. A soil parameter anomaly early warning system based on multi-source data fusion, applied to the soil parameter anomaly early warning method based on multi-source data fusion as described in any one of claims 1-9, characterized in that: It includes a data acquisition module, a preprocessing module, a data fusion module, a soil parameter early warning module, and an early warning visualization module, among which: The data acquisition module collects multi-source fused soil data based on soil sensors, remote sensing platforms, weather stations, and geographic information databases in the target area. The preprocessing module preprocesses the multi-source fused soil data to obtain a standardized dataset; The data fusion module is used to divide the standardized dataset into high-frequency node sets and low-frequency node sets by calling the preset collection frequency threshold. After calculating the correlation weight between nodes based on the self-attention mechanism, features are extracted from the high-frequency node sets and low-frequency node sets respectively and then fused to obtain the fused soil parameter sequence. The soil parameter early warning module constructs a soil parameter anomaly early warning model. The soil parameter early warning module is also used to take the fused soil parameter sequence as input to the soil parameter anomaly early warning model. The soil parameter anomaly early warning model outputs early warning results based on dynamic thresholds and an improved ensemble multi-classifier. The early warning visualization module is used to push early warning information and provide visual interaction based on the early warning results.