Intelligent soil monitoring platform and method based on cloud algorithm compensation
The intelligent soil monitoring platform, which uses cloud-based algorithms for compensation, solves the problems of high hardware dependence and poor environmental adaptability in existing technologies. It enables low-cost, high-precision soil monitoring and forward-looking prediction, and provides scientific agricultural decision-making suggestions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-27
AI Technical Summary
Existing soil monitoring technologies rely on high-cost hardware, have poor environmental adaptability, are difficult to maintain, have low data application value, lack in-depth cleaning and forward-looking prediction, and are difficult to achieve large-scale deployment and scientific decision support.
A cloud-based intelligent soil monitoring platform is adopted, including a data import module, an anomaly data cleaning submodule, a missing value intelligent imputation submodule, a trend prediction submodule, and a multidimensional decision-making submodule. The platform uses the isolated forest algorithm to clean noise, linear interpolation to imput missing values, an improved Prophet model combined with meteorological data for prediction, and Pearson correlation analysis to generate scientific decision-making recommendations.
It reduces hardware costs, improves data accuracy and fault tolerance, has forward-looking predictive capabilities, provides in-depth agricultural decision support, and lowers the threshold for agricultural intelligence.
Smart Images

Figure CN121744151A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of precision agriculture and smart agriculture, and particularly to a soil intelligent monitoring platform and method based on cloud algorithm compensation. BACKGROUND
[0002] With the rapid development of precision agriculture and smart agriculture, real-time and high-precision monitoring of soil physical and chemical properties (such as pH value, nitrogen, phosphorus and potassium content, etc.) has become a key link to improve agricultural production efficiency and optimize resource allocation. Accurate acquisition of soil environment data is directly related to the control of agricultural production cost and the improvement of yield and quality, and is also a core component of modern agricultural Internet of Things system.
[0003] The existing mainstream soil monitoring technology path is still in the traditional stage of "hardware determines precision". The closest existing technology is to rely heavily on high-cost industrial or scientific research sensor hardware systems. These systems generally use high-sensitivity special sensor probes, and need to be matched with complex local special data acquisition terminals to effectively filter out environmental noise. In addition, in order to ensure the stability of massive data in transmission, expensive Internet of Things gateway devices are often needed. The core idea of this technology path is to directly obtain accurate data by relying on the physical performance and precise circuit design of the hardware itself, and to ensure the effectiveness of the data by continuously improving the hardware specifications and cost.
[0004] In actual agricultural applications, this technology path has obvious disadvantages. First, the high hardware cost forms a barrier to popularization, and the price of a single set of high-precision equipment makes it difficult for ordinary farmers to afford, making it difficult to carry out large-scale deployment in vast farmland, resulting in sparse data collection points and difficulty in reflecting the overall situation of the farmland. Secondly, the high-precision probe has poor environmental adaptability and is difficult to maintain. For complex farmland environments, such as mud immersion and poor physical contact, it is extremely sensitive and prone to false alarms. Due to the lack of effective software automatic calibration mechanism, once the sensor hardware ages or the zero point drifts, the data will be invalid immediately, and the cost of manual calibration and maintenance is very high. Furthermore, the data application value is low, and the existing technology is mostly limited to real-time display of data and simple threshold alarm with a lag, lacking deep cleaning of data and being unable to make forward-looking predictions in combination with future weather data and crop growth cycles, resulting in a serious lag in decision support capabilities.
[0005] Therefore, a new solution is needed to solve the above problems. SUMMARY
[0006] The purpose of the present application is to provide a soil intelligent monitoring platform and method based on cloud algorithm compensation to solve the technical problems raised in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a cloud-based intelligent soil monitoring platform, comprising a data import module, an abnormal data cleaning submodule, a missing value intelligent filling submodule, a trend prediction submodule, a multi-dimensional decision-making submodule, and an interactive output module;
[0008] The data import module supports CSV / JSON format and external API data upload. It imports data into the network by grouping, sorting, and constructing data, and combines max-min scaling to standardize the data, outputting a compatible and uniformly scaled dataset.
[0009] The abnormal data cleaning submodule is based on the isolated forest algorithm, calculates the path length of data points and the anomaly score, removes artifact data caused by transmission errors, environmental interference, etc., and outputs the cleaned data.
[0010] The missing value intelligent filling submodule uses linear interpolation to fit short-term missing values and combines historical data from the same period to estimate long-term missing values. Iterative adjustments are made to ensure that the deviation is ≤5% and output a complete dataset.
[0011] The trend prediction submodule uses an improved Prophet model, incorporating crop growth cycle and meteorological data. It extracts spatiotemporal features through RCF and STGCN, and predicts soil index changes 7 days in advance with an error ≤10%.
[0012] The trend prediction submodule is a multi-task trend prediction model, which includes a spatiotemporal feature extraction module and a feature fusion module.
[0013] The multidimensional decision-making submodule uses Pearson correlation analysis to explore the coupling relationship of soil parameters. When |r|>0.6, it triggers an early warning and generates scientific decision-making suggestions and priority reports such as "soil adjustment before fertilization".
[0014] The interactive output module is used to divide and store data by time slot, visualize the data and prediction curves through ECharts, push early warnings when a threshold is triggered, support API export, and has a response time of <1s.
[0015] Furthermore, the application of the data import module includes at least the following steps:
[0016] S1.1: Extract imported data, represented as tuples. ;
[0017] in, A unique identifier representing a user; Identifiers representing soil indicators; Indicates the timestamp of the data upload; Numerical values representing soil indicators;
[0018] S1.2: Arrange the data according to... Group the data to ensure that records for the same user are grouped together.
[0019] S1.3: Based on the timestamps in each data set Sort the data in ascending order to accurately track the data sequence;
[0020] S1.4: For the same user, that is, the same If the time interval between two consecutive data points is less than one hour, the data is considered normal, forming a data sequence. ;
[0021] in, and These represent the start and end index points of the sequence, respectively. and These represent the timestamps at the start and end points, respectively. Numerical values representing soil indicators;
[0022] S1.5: Extract different indicator pairs from each data sequence. Forming a sequence, represented as ;
[0023] S1.6: Perform statistics on all sequences and calculate the results for each sequence. The number of times a sequence appears in all data sequences, i.e., the frequency of sequence imports;
[0024] S1.7: Select sequences with high import frequency from all sequences and ensure that these sequences are interconnected. Construct a data import network using these high-frequency, interconnected sequences.
[0025] The platform serves as a simple data processing service, simplifying the input design.
[0026] It forms an API interface and integrates with external data.
[0027] Furthermore, the application of the abnormal data cleaning submodule includes at least the following steps:
[0028] S2.1: Following the processing method in S1.4, extract the sequence data from the imported data, in the following format:
[0029]
[0030] S2.2: For each sequence of data, the indicator pairs Perform the following operations:
[0031] Determine whether the sequence composed of this indicator exists in the imported network;
[0032] If it exists, then the data is considered to have passed through the sequence;
[0033] Determine the date corresponding to this data. minute ,Right now The date and minute;
[0034] In the imported network, the sequence exist day, Increment the anomaly score of the time slot by 1;
[0035] S2.3: Process all sequence data sequentially. Through the steps described above, match and update each data point to identify anomalies. This will ultimately yield the anomaly data for all sequences across 1440 time slots per day. The specific formula is as follows:
[0036]
[0037]
[0038] in, For sequence exist Abnormal traffic at any given time; q represents a single subsequence or data point (query point); S represents the entire set of sequences (high-frequency sequences in the data imported into the network).
[0039] Since external data is susceptible to noise, the platform constructs an isolated forest model to calculate the path length of the input real-time soil data points in the feature space.
[0040] Judgment mechanism: The path length of abnormal data in the tree is significantly shorter than that of normal data;
[0041] Execution: Build There are 10 isolation trees, and each tree randomly splits the data until an isolation point is reached;
[0042] Path length Let x be the number of nodes from the root to the leaf.
[0043] Abnormal scores:
[0044]
[0045] in, This represents the average path length. The average path of the binary search tree. For harmonic numbers, if threshold Then remove .
[0046] Furthermore, the application of the missing value intelligent imputation submodule includes at least the following steps:
[0047] S3.1: Initialize an empty temporary missing sequence to store the missing trajectory of the current data;
[0048] S3.2: Based on the user The identifier is derived from all the user's data imported into the database, forming a sequence of indicator trajectories. Each indicator point The timestamp satisfies That is, the indicator points are arranged in ascending order of time;
[0049] S3.3: Every two adjacent index points in the trajectory sequence and To form a missing sequence of data, in the form of ;
[0050] S3.4: For each missing sequence data s, check the sequence Does it exist in the imported network?
[0051] If sequence If the data exists in the imported network and the time interval between indicator points is less than 1 hour, the data is considered valid, and the current sequence data is added to the temporary missing sequence.
[0052] If the sequence does not exist in the imported network or the time interval is greater than 1 hour, the data trajectory is considered to have ended. Save the current temporary missing sequence T and clear the temporary missing sequence to begin processing new missing data;
[0053] S3.5: Process the entire indicator trajectory sequence sequentially to obtain one or more missing sequences for the user, in the form of... ;
[0054] in, Representing the network Missing sequences;
[0055] S3.6: For all Perform the above operations to obtain missing sequence data for all users, and then import the data for potential missing sequences:
[0056] enter: It may contain missing points;
[0057] For short-time missing data (<1 hour), a linear interpolation algorithm is used to fit the median value based on normal data points from before and after the missing time periods. The formula is as follows:
[0058] For missing values at time t ;
[0059] For data missing for extended periods (>1 hour), a weighted estimate is used to fill the gap, incorporating historical data from the same period for that site. The formula is as follows:
[0060] in, For time similarity weights; ,and The Middle The time of each historical data point comes from the collection timestamp of historical data from the same period; For smoothing parameters; The first in The actual values of each historical data point are derived from the historical data of the same period for that plot of land.
[0061] Furthermore, the application of the trend prediction submodule includes at least the following steps:
[0062] S4.1: The spatiotemporal feature extraction module is based on the periodic feature extraction module and the spatiotemporal graph convolutional network;
[0063] The periodic feature extraction module, or RCF module, is used to extract periodic features from data.
[0064] Spatiotemporal Graph Convolutional Network (STGCN) is used to capture the spatiotemporal features of residual data.
[0065] S4.2: STGCN is used as the backbone network of the spatiotemporal feature extraction module. STGCN consists of multiple spatiotemporal convolutional blocks. Each spatiotemporal convolutional block forms a sandwich structure with two temporal convolutional layers and one graph convolutional layer in the middle.
[0066] S4.2.1: The input to the STGCN module is... , Indicates the length of the historical sequence. It refers to the number of indicators. These are characteristic dimensions of soil indicators (such as pH value, nitrogen content, etc.).
[0067] S4.2.2: Graph Convolutional CN, assuming graph From the set of nodes Sum of edges Composition, in which, Representative indicators; Represents the connectivity between indicators; the basic form of graph convolution is:
[0068]
[0069] in, It is the weight matrix of the spatial graph convolution; It is the adjacency matrix of the graph. Add self-connection matrix ; yes The degree matrix; that is ; It is an activation function;
[0070] S4.2.3: Temporal Convolution (TCN). Temporal convolution can be implemented using one-dimensional convolution operations, as shown in the following formula:
[0071]
[0072] in, It is the size of the convolution kernel; These are the weights of the convolution kernel; It is a bias term; Indicates the convolution operation; It is an activation function;
[0073] S4.2.4: The output of STGCN is represented as follows:
[0074]
[0075] S4.3: Combining RCF and STGCN to extract spatiotemporal features of the data, the specific training process is as follows:
[0076] S4.3.1: Instance Normalization. An instance normalization strategy is introduced, which normalizes the sequence after input and denormalizes it before output, as shown below:
[0077]
[0078]
[0079] S4.3.2: Generate learnable cycle time and initialize it to zero, where, For the number of indicators, 1440 corresponds to 1440 minutes in a day, matrix Used to capture the periodicity of values for all indicators throughout the day;
[0080] S4.3.3: By performing a loop copy, from Obtain the input sequence Cyclic components of the same length ;
[0081] S4.3.4: From raw input Subtract the loop component Obtain residual components ;
[0082]
[0083] S4.3.5: Will Enter STGCN to obtain the prediction results of the residual components. ;
[0084] S4.3.6: Will Add to The final predicted value is obtained from the above. ,in For length and output sequence Equal cyclic components;
[0085]
[0086] S4.3.7: Training together with the backbone network, the periodic characteristics of the daily values of different indicators are finally obtained;
[0087] S4.3.8: Use mean squared error (MSE) as the loss function;
[0088] To enable decision-making functionality, the platform incorporates the Facebook Prophet time series model and makes scenario-specific improvements:
[0089] enter: ;
[0090] Add "crop growth cycle" as a custom seasonal factor to the model and integrate external meteorological API data as a regression value;
[0091] Model equations:
[0092]
[0093] in, This is a trend item; It is seasonal; Due to the holiday effect; For regression parameters; For noise;
[0094] Crop cycle factors are modeled as follows:
[0095]
[0096] in, The period length; and For the integer period of learning.
[0097] Furthermore, the multidimensional decision-making submodule uses the predicted sequence data obtained by the missing value intelligent imputation submodule. Where B represents ; The number of indicators in the sequence; Represents the feature dimension;
[0098] Combining the features extracted by the spatiotemporal feature extraction module in the trend prediction submodule, a multi-task decision model is constructed. The specific steps are as follows:
[0099] S5.1: Extracting the periodic feature sequence of data from the RCF module Extracting spatiotemporal features of data residuals from STGCN ;
[0100] S5.2: Input the predicted sequence data T and the data feature sequence data into the model;
[0101] S5.3: Discrete Feature Embedding. The estimation model processes multiple discrete features in the prediction sequence. Each discrete feature is transformed into a fixed-dimensional vector representation through an independent embedding layer. ;
[0102]
[0103] in, The number of discrete feature types. For the dimension of embedding;
[0104] S5.4: Continuous feature embedding; the model incorporates distance, numerical, and periodic features. These continuous features are embedded through a fully connected layer and transformed into a fixed-dimensional vector representation:
[0105]
[0106] in, Represents continuous features of the input; This is the weight matrix; It is the bias vector; Features after embedding; For activation functions;
[0107] S5.5: Feedforward Neural Network (FFN): Concatenates all embedded features to form a comprehensive feature vector, and performs nonlinear transformation through the feedforward neural network;
[0108]
[0109]
[0110] in, Spatiotemporal characteristics of data residuals; For the output of the feedforward network; and This is the weight matrix; and It is the bias vector;
[0111] S5.6: Transformer encoder, which takes the output of the feedforward network and inputs it into the Transformer encoder to capture temporal dependencies and obtain the features of each index in the sequence;
[0112]
[0113] in, Representative indicators; This represents the local index features obtained through the transformer encoder;
[0114] S5.7: Attention mechanism: After obtaining local indicator features, the attention mechanism is used to weight and sum the local indicator features to obtain the overall features of the sequence.
[0115]
[0116] in, Indicates the index; k is the length of the index; Characteristics representing local indicators; Represents attention weight;
[0117] In the attention mechanism, the spatiotemporal features of data residuals are incorporated. The data periodic feature H is fused with the data periodic feature H through a fully connected layer to obtain the data spatiotemporal feature H as the query vector;
[0118]
[0119]
[0120]
[0121] Where · represents the inner product operator;
[0122] S5.8: Using Mean Squared Error As a loss function;
[0123] The platform calculates the Pearson correlation coefficient between different variables within the sliding window in real time, using the following formula:
[0124]
[0125] when When this occurs, a correlation warning is triggered, and comprehensive soil adjustment suggestions are generated.
[0126] Furthermore, the application of the interactive output module includes at least the following steps:
[0127] S6.1: Extract all data from the last day of the period from the sequence data file obtained from the data import module, and use it as the output historical sequence data;
[0128] S6.2: Based on the start timestamp of the sequence The data is divided according to time slots and stored in different folders;
[0129] S6.3: Starting from the first time slot, retrieve the data file of the current time slot 0t. Process it;
[0130] S6.4: Repeat the above steps in time slot order to output the data for all time slots;
[0131] S6.5: After the output is complete, begin calculating the decision features for all time slots, using the numerical values of the sequence. Sequence length and numerical flow Find the current time slot Decision density and decision speed The formula is as follows:
[0132]
[0133]
[0134] Through the above steps, the output method based on the decision model can dynamically simulate the numerical flow in the data, providing a scientific basis for agricultural management and planning.
[0135] Visualization uses ECharts to display real-time data and forecast curves, and uses red, yellow and green blocks to intuitively display soil health scores.
[0136] Alarm push notifications: When a predicted or real-time value reaches a threshold, an early warning and emergency response plan will be pushed via cloud SMS service.
[0137] It provides detailed explanations, supports API export, and has a response time of less than 1 second, ensuring real-time user interaction.
[0138] A cloud-based algorithm-based intelligent soil monitoring method includes at least the following steps:
[0139] The front end only collects and transmits data, while the core data processing logic is all placed on the cloud platform, and the problem of insufficient accuracy of low-cost hardware is solved by software algorithms.
[0140] A noise cleaning mechanism based on isolated forests is adopted, and the path length anomaly score of data points is calculated using the isolated forest algorithm to distinguish between real environmental changes and random noise generated by inexpensive hardware, thereby realizing software calibration of low-cost sensors.
[0141] A time-series prediction model integrating growth cycles is adopted, and crop growth stage is introduced as a custom regression variable into the Prophet prediction model to achieve dynamic prediction of future soil conditions.
[0142] Furthermore, a multidimensional correlation decision generation method was adopted, using Pearson correlation coefficient to analyze the coupling relationship between soil physicochemical parameters, and based on this, comprehensive agricultural management recommendations were generated.
[0143] Compared with the prior art, the beneficial effects of the present invention are:
[0144] 1. This invention designs a data cleaning module, using software to compensate for hardware limitations, significantly reducing costs. This invention abandons expensive hardware filtering and calibration circuits, innovatively utilizing the Isolation Forest algorithm to handle noise issues in imported data. This enables the platform to handle low-cost external data sources (such as user-uploaded CSV files or third-party APIs), keeping overall service costs extremely low and greatly lowering the barrier to entry for agricultural intelligence.
[0145] 2. This invention designs a data repair module with high data fault tolerance and accuracy. Utilizing isolated forest anomaly detection and linear interpolation imputation technology, the platform can automatically identify and remove artifact data caused by external interference (such as data transmission errors) and automatically repair missing values, ensuring that the integrity can still maintain a high level even with low-quality input data.
[0146] 3. This invention designs a predictive analysis module with forward-looking and accurate predictive capabilities. Unlike the lag of traditional threshold alarms, this application uses an improved Prophet model and introduces "crop growth cycle" as a custom seasonal factor. It can combine historical data to predict soil environmental change trends (such as drought warnings and fertility decline) 7 days in advance, with prediction errors controlled within 10%.
[0147] 4. This invention designs a decision support module that provides in-depth decision-making suggestions. Through Pearson correlation analysis, it explores the implicit relationships between soil physicochemical properties (such as the effect of pH on nitrogen fertilizer absorption rate) and provides users with scientific decision-making suggestions such as "soil conditioning before fertilization" rather than simple numerical readings. Attached Figure Description
[0148] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0149] Figure 1 This is a flowchart of the overall platform of the present invention;
[0150] Figure 2 This is a flowchart of the data import process for this invention;
[0151] Figure 3 This is a flowchart of the abnormal data cleaning process of the present invention;
[0152] Figure 4 This is a flowchart of the intelligent missing value filling process of the present invention;
[0153] Figure 5 This is a flowchart of the trend prediction process of the present invention;
[0154] Figure 6 This is a flowchart of the multidimensional decision-making and output process of this invention. Detailed Implementation
[0155] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0156] This invention completely eliminates reliance on expensive hardware, innovatively employing a pure software architecture of data import + cloud algorithm cluster, achieving software-assisted hardware improvement. Specifically, it utilizes the Isolation Forest algorithm to cleanse the coarse data input from low-cost sensors, effectively removing artifacts caused by environmental interference; and intelligently repairs missing data caused by unstable transmission through linear interpolation and weighted estimation, thus achieving high-precision monitoring at extremely low hardware costs. More importantly, this invention introduces an improved Prophet model and integrates crop growth cycle factors, possessing the forward-looking ability to predict soil change trends in advance, and utilizes Pearson correlation analysis to uncover the coupling relationships between physicochemical parameters, providing users with in-depth scientific decision-making suggestions such as prioritizing soil conditioning over fertilization.
[0157] In summary, this invention fundamentally changes the traditional monitoring approach that relies on high-precision hardware. It compensates for and mines low-cost input data through a purely cloud-based high-dimensional algorithm model. This not only significantly lowers the entry barrier to agricultural intelligence and solves hardware maintenance problems, but also achieves a leap from simple data monitoring to intelligent prediction and scientific decision-making, demonstrating extremely high application value.
[0158] The core idea of this invention is to clean and repair externally imported data using a purely cloud-based algorithm model, without relying on any hardware features. The platform adopts a modular design, with each module capable of independent deployment and supporting cloud service expansion. Specific implementation details are as follows:
[0159] Please see Figures 1-6 A cloud-based intelligent soil monitoring platform with algorithm compensation is characterized by including a data import module, an abnormal data cleaning submodule, a missing value intelligent filling submodule, a trend prediction submodule, a multi-dimensional decision-making submodule, and an interactive output module.
[0160] The data import module supports uploading data in CSV / JSON format and external API. It imports data into the network for processing by grouping, sorting, and building data, and combines max-min scaling to standardize the data, outputting a compatible and uniformly scaled dataset.
[0161] The outlier data cleaning submodule is based on the Isolation Forest algorithm. It calculates the path length of data points and the outlier score, removes artifact data caused by transmission errors, environmental interference, etc., and outputs the cleaned data.
[0162] The missing value intelligent imputation submodule uses linear interpolation to fit short-term missing values and combines historical data from the same period to estimate long-term missing values. Iterative adjustments are made to ensure that the deviation is ≤5% and output a complete dataset.
[0163] The trend prediction submodule uses an improved Prophet model, incorporating crop growth cycle and meteorological data. It extracts spatiotemporal features through RCF and STGCN, and predicts soil index changes 7 days in advance with an error ≤10%.
[0164] The trend prediction submodule is a multi-task trend prediction model, which includes a spatiotemporal feature extraction module and a feature fusion module.
[0165] The multidimensional decision-making submodule uses Pearson correlation analysis to explore the coupling relationship of soil parameters. When |r|>0.6, it triggers an early warning and generates scientific decision-making suggestions and priority reports such as "soil adjustment before fertilization".
[0166] The interactive output module is used to divide and store data by time slot, visualize the data and prediction curves through ECharts, push alerts when thresholds are triggered, support API export, and has a response time of <1s.
[0167] The application of the data import module includes at least the following steps:
[0168] S1.1: Extract imported data, represented as tuples. ;
[0169] in, A unique identifier representing a user; Identifiers for soil indicators (such as pH, nitrogen content, etc.); Indicates the timestamp of the data upload; Numerical values representing soil indicators;
[0170] S1.2: Arrange the data according to... Group the data to ensure that records for the same user are grouped together.
[0171] S1.3: Based on the timestamps in each data set Sort the data in ascending order to accurately track the data sequence;
[0172] S1.4: For the same user, that is, the same If the time interval between two consecutive data points is less than one hour, the data is considered normal, forming a data sequence. ;
[0173] in, and These represent the start and end index points of the sequence, respectively. and These represent the timestamps at the start and end points, respectively. Numerical values representing soil indicators;
[0174] S1.5: Extract different indicator pairs from each data sequence. Forming a sequence, represented as ;
[0175] S1.6: Perform statistics on all sequences and calculate the results for each sequence. The number of times a sequence appears in all data sequences, i.e., the frequency of sequence imports;
[0176] S1.7: Select sequences with high import frequency from all sequences and ensure that these sequences are interconnected. Construct a data import network using these high-frequency, interconnected sequences.
[0177] The platform serves as a simple data processing service, simplifying the input design.
[0178] It consists of an API interface (supporting CSV / JSON upload) and external data integration (meteorological API, crop database).
[0179] Working principle: Users upload soil data (such as temperature, humidity, pH, nitrogen, phosphorus, and potassium) via Web / APP, and the platform parses the data in the specified format. The input is the raw data stream. ,in For time series points Processing steps: Check the format; if it is valid JSON / CSV, pass it directly; otherwise, return an error. The output is a standardized dataset. .
[0180] Detailed explanation: This module ensures data compatibility and supports batch import.
[0181] Formula: Data Normalization Scaling To unify the scale of data from different sources.
[0182] The application of the abnormal data cleaning submodule includes at least the following steps:
[0183] To identify outliers from the data processed by the data import module, see the process below. Figure 3 .
[0184] S2.1: Following the processing method in S1.4, extract the sequence data from the imported data, in the following format:
[0185]
[0186] S2.2: For each sequence of data, the indicator pairs Perform the following operations:
[0187] Determine whether the sequence composed of this indicator exists in the imported network;
[0188] If it exists, then the data is considered to have passed through the sequence;
[0189] Determine the date corresponding to this data. minute ,Right now The date and minute;
[0190] In the imported network, the sequence exist day, Increment the anomaly score of the time slot by 1;
[0191] S2.3: Process all sequence data sequentially. Through the steps described above, match and update each data point to identify anomalies. This will ultimately yield the anomaly data for all sequences across 1440 time slots per day. The specific formula is as follows:
[0192]
[0193]
[0194] in, For sequence exist Abnormal traffic at any given time; q represents a single subsequence or data point (query point); S represents the entire set of sequences (high-frequency sequences in the data imported into the network).
[0195] Since external data is susceptible to noise, the platform constructs an isolated forest model to calculate the path length in the feature space for input real-time soil data points (such as pH value).
[0196] Judgment mechanism: Abnormal data (such as mutations caused by transmission errors) has a significantly shorter path length in the tree than normal data;
[0197] Execution: Build There are 10 isolation trees, and each tree randomly splits the data until an isolation point is reached;
[0198] Path length Let x be the number of nodes from the root to the leaf.
[0199] Abnormal scores:
[0200]
[0201] in, This represents the average path length. The average path of the binary search tree. For harmonic numbers, if threshold (Dynamically set, such as 0.5), then exclude. ;
[0202] Detailed Explanation: The model is trained using historical data, iteratively building the tree until convergence. The output is a cleaned dataset. It can achieve over 95%. The algorithm's time complexity is... Suitable for large-scale data.
[0203] The application of the missing value intelligent imputation submodule includes at least the following steps:
[0204] The missing sequence data is obtained from the imported data processed by the data import module. See the flowchart below. Figure 4 .
[0205] S3.1: Initialize an empty temporary missing sequence to store the missing trajectory of the current data;
[0206] S3.2: Based on the user The identifier is derived from all the user's data imported into the database, forming a sequence of indicator trajectories. Each indicator point The timestamp satisfies That is, the indicator points are arranged in ascending order of time;
[0207] S3.3: Every two adjacent index points in the trajectory sequence and To form a missing sequence of data, in the form of ;
[0208] S3.4: For each missing sequence data s, check the sequence Does it exist in the imported network?
[0209] If sequence If the data exists in the imported network and the time interval between indicator points is less than 1 hour, the data is considered valid, and the current sequence data is added to the temporary missing sequence.
[0210] If the sequence does not exist in the imported network or the time interval is greater than 1 hour, the data trajectory is considered to have ended. Save the current temporary missing sequence T and clear the temporary missing sequence to begin processing new missing data;
[0211] S3.5: Process the entire indicator trajectory sequence sequentially to obtain one or more missing sequences for the user, in the form of... ;
[0212] in, Representing the network Missing sequences;
[0213] S3.6: For all Perform the above operations to obtain missing sequence data for all users, and then import the data for potential missing sequences:
[0214] enter: It may contain missing points;
[0215] For short-time missing data (<1 hour), a linear interpolation algorithm is used to fit the median value based on normal data points from before and after the missing time periods. The formula is as follows:
[0216] For missing values at time t ;
[0217] For data missing for extended periods (>1 hour), a weighted estimate is used to fill the gap, incorporating historical data from the same period for that site. The formula is as follows:
[0218] in, For time similarity weights; ,and The Middle The time of each historical data point comes from the collection timestamp of historical data from the same period; For smoothing parameters; The first in The actual values of each historical data point are derived from the historical data of the same period for that plot of land.
[0219] Detailed Explanation: After imputation, verify continuity; if the deviation > 5%, iteratively adjust. The output is the complete dataset. The accuracy rate for filling in the gaps is >90%.
[0220] The application of the trend prediction submodule includes at least the following steps:
[0221] This invention utilizes complete data extracted from the abnormal data cleaning submodule for training. This module will be described in detail below; the process is described in [link to flowchart]. Figure 5 ;
[0222] S4.1: The spatiotemporal feature extraction module is based on the periodic feature extraction module and the spatiotemporal graph convolutional network;
[0223] The periodic feature extraction module, or RCF module, is used to extract periodic features from data.
[0224] Spatiotemporal Graph Convolutional Network (STGCN) is used to capture the spatiotemporal features of residual data.
[0225] S4.2: STGCN is used as the backbone network of the spatiotemporal feature extraction module. STGCN consists of multiple spatiotemporal convolutional blocks. Each spatiotemporal convolutional block forms a sandwich structure with two temporal convolutional layers and one graph convolutional layer in the middle.
[0226] S4.2.1: The input to the STGCN module is... , Indicates the length of the historical sequence. It refers to the number of indicators. These are characteristic dimensions of soil indicators (such as pH value, nitrogen content, etc.).
[0227] S4.2.2: Graph Convolutional CN, assuming graph From the set of nodes Sum of edges Composition, in which, Representative indicators; Represents the connectivity between indicators; the basic form of graph convolution is:
[0228]
[0229] in, It is the weight matrix of the spatial graph convolution; It is the adjacency matrix of the graph. Add self-connection matrix ; yes The degree matrix; that is ; It is an activation function;
[0230] S4.2.3: Temporal Convolution (TCN). Temporal convolution can be implemented using one-dimensional convolution operations, as shown in the following formula:
[0231]
[0232] in, It is the size of the convolution kernel; These are the weights of the convolution kernel; It is a bias term; Indicates the convolution operation; It is an activation function;
[0233] S4.2.4: The output of STGCN is represented as follows:
[0234]
[0235] S4.3: Combining RCF and STGCN to extract spatiotemporal features of the data, the specific training process is as follows:
[0236] S4.3.1: Instance Normalization. An instance normalization strategy is introduced, which normalizes the sequence after input and denormalizes it before output, as shown below:
[0237]
[0238]
[0239] S4.3.2: Generate learnable cycle time and initialize it to zero, where, For the number of indicators, 1440 corresponds to 1440 minutes in a day, matrix Used to capture the periodicity of values for all indicators throughout the day;
[0240] S4.3.3: By performing a loop copy, from Obtain the input sequence Cyclic components of the same length ;
[0241] S4.3.4: From raw input Subtract the loop component Obtain residual components ;
[0242]
[0243] S4.3.5: Will Enter STGCN to obtain the prediction results of the residual components. ;
[0244] S4.3.6: Will Add to The final predicted value is obtained from the above. ,in For length and output sequence Equal cyclic components;
[0245]
[0246] S4.3.7: Training together with the backbone network, the periodic characteristics of the daily values of different indicators are finally obtained;
[0247] S4.3.8: Use mean squared error (MSE) as the loss function;
[0248] To enable decision-making functionality, the platform incorporates the Facebook Prophet time series model and makes scenario-specific improvements:
[0249] enter: ;
[0250] Add "crop growth cycle" (such as seedling stage and flowering stage) as a custom seasonality factor (SeasonalityMode) to the model, and integrate external meteorological API data (rainfall and temperature) as regression parameters;
[0251] Model equations:
[0252]
[0253] in, For the trend term (piecewise linear); Seasonal (Fourier series); Due to the holiday effect; The regression parameters are (crop cycle + weather). For noise;
[0254] Crop cycle factors are modeled as follows:
[0255]
[0256] in, The period length; and For the integer period of learning.
[0257] Results: The model outputs the confidence interval of soil indicators for the next 7 days, which can accurately predict the numerical changes caused by crop growth consumption or rainfall.
[0258] Detailed Explanation: Training uses historical data to detect and automatically adjust trends. Prediction Steps: Fitting → Simulating Future Scenarios → Outputting Predicted Sequences .
[0259] The multidimensional decision-making submodule uses the missing value intelligent imputation submodule to obtain the predicted sequence data. Where B represents ; The number of indicators in the sequence; Represents the feature dimension; in this platform It is 128. The maximum sequence length is 16. It is 12;
[0260] By combining the features extracted by the spatiotemporal feature extraction module in the trend prediction submodule, a multi-task decision model is constructed. The process is as follows: Figure 6 The specific steps are as follows:
[0261] S5.1: Extracting the periodic feature sequence of data from the RCF module Extracting spatiotemporal features of data residuals from STGCN ;
[0262] S5.2: Combine the predicted sequence data T and the data feature sequence data ( , Input model;
[0263] S5.3: Discrete Feature Embedding. The estimation model handles various discrete features in the predicted sequence, including the index ID ( ), Time ID ( Date ID () ), crop type ( ), soil type ( and uncertainty () Each discrete feature is transformed into a fixed-dimensional vector representation through an independent embedding layer. ;
[0264]
[0265] in, The number of discrete feature types. For the dimension of embedding;
[0266] S5.4: Continuous feature embedding, the model for distance ( ), numerical value ( ) and periodic characteristics These continuous features are embedded through a fully connected layer and transformed into a fixed-dimensional vector representation:
[0267]
[0268] in, Represents continuous features of the input; This is the weight matrix; It is the bias vector; Features after embedding; For activation functions;
[0269] S5.5: Feedforward Neural Network (FFN): Concatenates all embedded features to form a comprehensive feature vector, and performs nonlinear transformation through the feedforward neural network;
[0270]
[0271]
[0272] in, Spatiotemporal characteristics of data residuals; For the output of the feedforward network; and This is the weight matrix; and It is the bias vector;
[0273] S5.6: Transformer encoder, which takes the output of the feedforward network and inputs it into the Transformer encoder to capture temporal dependencies and obtain the features of each index in the sequence;
[0274]
[0275] in, Representative indicators; This represents the local index features obtained through the transformer encoder;
[0276] S5.7: Attention mechanism: After obtaining local indicator features, the attention mechanism is used to weight and sum the local indicator features to obtain the overall features of the sequence.
[0277]
[0278] in, Indicates the index; k is the length of the index; Characteristics representing local indicators; Represents attention weight;
[0279] In the attention mechanism, the spatiotemporal features of data residuals are incorporated. The data periodic feature H is fused with the data periodic feature H through a fully connected layer to obtain the data spatiotemporal feature H as the query vector;
[0280]
[0281]
[0282]
[0283] Where · represents the inner product operator, the overall multi-task decision model process is as follows: Figure 5 As shown;
[0284] S5.8: Using Mean Squared Error As a loss function;
[0285] The platform calculates the Pearson correlation coefficient between different variables (such as "soil pH" and "nitrogen fertilizer absorption rate") within a sliding window in real time. The formula is as follows:
[0286]
[0287] when When there is a strong correlation, a correlation warning is triggered, and comprehensive soil adjustment suggestions are generated (e.g., "It is recommended to adjust the pH value first to improve nitrogen fertilizer utilization").
[0288] Detailed explanation: Window size =30 days, calculated on a rolling basis. Decision rule: If Generate positively correlated suggestions; Generate a negative correlation alert. The output is a JSON decision report, including suggested text and priority.
[0289] The application of the interactive output module includes at least the following steps:
[0290] This invention uses the decision model in the multidimensional decision-making submodule as the core to construct the output method. The process is as follows: Figure 6 ;
[0291] S6.1: Extract all data from the last day of the period from the sequence data file obtained from the data import module, and use it as the output historical sequence data;
[0292] S6.2: Based on the start timestamp of the sequence The data is divided according to time slots and stored in different folders, such as the first... The data in the time slot is stored The file contains the following information:
[0293] The data path (the metrics it passes through);
[0294] Sequence start timestamp ;
[0295] External information about some data (such as crop information, usage type, etc.);
[0296] S6.3: Starting from the first time slot, retrieve the data file of the current time slot 0t. Process it;
[0297] S6.3.1: Assume that data A will depart in this time slot, with the following sequence: ;
[0298] S6.3.2: In time slot 0t, count the numerical stream data of all sequences in the current time slot, that is, the number of numerical values flowing into each sequence in the current time slot;
[0299] S6.3.3: Combining numerical flow characteristics, And the dynamic spatiotemporal characteristics of the data are used to estimate the data A through a decision model. Given the time required, we can deduce that A will... The time slot starts from sequence 1 second;
[0300] S6.3.4: The remaining sequence of data A Stored in middle;
[0301] S6.3.5: Perform the above operation on all data triggered in the current time slot;
[0302] S6.4: Repeat the above steps in time slot order to output the data for all time slots;
[0303] S6.5: After the output is complete, begin calculating the decision features for all time slots, using the numerical values of the sequence. Sequence length and numerical flow Find the current time slot Decision density and decision speed The formula is as follows:
[0304]
[0305]
[0306] Through the above steps, the output method based on the decision model can dynamically simulate the numerical flow in the data, providing a scientific basis for agricultural management and planning.
[0307] Visualization: ECharts is used to display real-time data and forecast curves, and red, yellow and green blocks are used to visually represent soil health analysis.
[0308] Alarm push notifications: When a predicted or real-time value reaches a threshold, an early warning and emergency response plan will be pushed via cloud SMS service.
[0309] It provides detailed explanations, supports API export, and has a response time of less than 1 second, ensuring real-time user interaction.
[0310] Example 2:
[0311] A cloud-based algorithm-compensated intelligent soil monitoring method, used in the cloud-based algorithm-compensated intelligent soil monitoring platform of Embodiment 1 above, includes at least the following steps:
[0312] The front end only collects and transmits data, while the core data processing logic is all placed on the cloud platform, and the problem of insufficient accuracy of low-cost hardware is solved by software algorithms.
[0313] A noise cleaning mechanism based on isolated forests is adopted, and the path length anomaly score of data points is calculated using the isolated forest algorithm to distinguish between real environmental changes and random noise generated by inexpensive hardware, thereby realizing software calibration of low-cost sensors.
[0314] A time-series prediction model integrating growth cycles is adopted, and crop growth stage is introduced as a custom regression variable into the Prophet prediction model to achieve dynamic prediction of future soil conditions.
[0315] Furthermore, a multidimensional correlation decision generation method was adopted, using Pearson correlation coefficient to analyze the coupling relationship between soil physicochemical parameters, and based on this, comprehensive agricultural management recommendations were generated.
[0316] The following technical differences exist in different embodiments:
[0317] 1. Algorithm replacement: The trend prediction model can use LSTM (Long Short-Term Memory Network) or ARIMA model to replace Prophet, but the parameters need to be readjusted to adapt to non-linear data.
[0318] 2. Anomaly detection alternatives: The Isolation Forest algorithm can be replaced by One-Class SVM or DBSCAN clustering algorithms for identifying outliers.
[0319] 3. Hardware form replacement: The sensor probe can adopt different physical forms such as tube type, pin type or buried type, as long as it outputs a standard electrical signal, it can be connected to this system.
[0320] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A cloud-based intelligent soil monitoring platform with algorithm compensation, characterized in that: It includes a data import module, an abnormal data cleaning submodule, a missing value intelligent imputation submodule, a trend prediction submodule, a multi-dimensional decision-making submodule, and an interactive output module; The data import module supports CSV / JSON format and external API data upload. It imports data into the network by grouping, sorting, and constructing data, and combines max-min scaling to standardize the data, outputting a compatible and uniformly scaled dataset. The abnormal data cleaning submodule is based on the isolated forest algorithm, calculates the path length of data points and the anomaly score, removes the artifact data caused by anomalies, and outputs the cleaned data. The missing value intelligent filling submodule uses linear interpolation to fit short-term missing values and combines historical data from the same period to estimate long-term missing values. Iterative adjustments are made to ensure that the deviation is ≤5% and output a complete dataset. The trend prediction submodule uses an improved Prophet model, incorporating crop growth cycle and meteorological data. It extracts spatiotemporal features through RCF and STGCN, and predicts soil index changes 7 days in advance with an error ≤10%. The trend prediction submodule is a multi-task trend prediction model, which includes a spatiotemporal feature extraction module and a feature fusion module. The multidimensional decision-making submodule uses Pearson correlation analysis to explore the coupling relationship of soil parameters. When |r|>0.6, it triggers an early warning and generates scientific decision-making suggestions and priority reports. The interactive output module is used to divide and store data by time slot, visualize the data and prediction curves through ECharts, push early warnings when a threshold is triggered, support API export, and has a response time of <1s.
2. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 1, characterized in that: The application of the data import module includes at least the following steps: S1.1: Extract imported data, represented as tuples. ; in, A unique identifier representing a user; Identifiers representing soil indicators; Indicates the timestamp of the data upload; Numerical values representing soil indicators; S1.2: Arrange the data according to... Group the data to ensure that records for the same user are grouped together. S1.3: Based on the timestamps in each data set Sort the data in ascending order to accurately track the data sequence; S1.4: For the same user, that is, the same If the time interval between two consecutive data points is less than one hour, the data is considered normal, forming a data sequence. ; in, and These represent the start and end index points of the sequence, respectively. and These represent the timestamps at the start and end points, respectively. Numerical values representing soil indicators; S1.5: Extract different indicator pairs from each data sequence. Forming a sequence, represented as ; S1.6: Perform statistics on all sequences and calculate the results for each sequence. The number of times a sequence appears in all data sequences, i.e., the import frequency of the sequence; S1.7: Select sequences with high import frequency from all sequences and ensure that these sequences are interconnected. Construct a data import network using these high-frequency, interconnected sequences. The platform serves as a simple data processing service, simplifying the input design. It forms an API interface and integrates with external data.
3. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 2, characterized in that: The application of the abnormal data cleaning submodule includes at least the following steps: S2.1: Following the processing method in S1.4, extract the sequence data from the imported data, in the following format: S2.2: For each sequence of data, the indicator pairs Perform the following operations: Determine whether the sequence composed of this index exists in the imported network; If it exists, then the data is considered to have passed through the sequence; Determine the date corresponding to this data. minute ,Right now The date and minute; In the imported network, the sequence exist day, Increment the anomaly score of the time slot by 1; S2.3: Process all sequence data sequentially. Through the steps described above, match and update each data point to identify anomalies. This will ultimately yield the anomaly data for all sequences across 1440 time slots per day. The specific formula is as follows: in, For sequence exist Abnormal flow at time step; q represents a single subsequence or data point; S represents the set of all sequences; Since external data is susceptible to noise, the platform constructs an isolated forest model to calculate the path length of the input real-time soil data points in the feature space. Judgment mechanism: The path length of abnormal data in the tree is significantly shorter than that of normal data; Execution: Build There are 10 isolation trees, and each tree randomly splits the data until an isolation point is reached; Path length Let x be the number of nodes from the root to the leaf. Abnormal scores: in, This represents the average path length. The average path of the binary search tree. For harmonic numbers, if threshold Then remove .
4. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 3, characterized in that: The application of the intelligent missing value imputation submodule includes at least the following steps: S3.1: Initialize an empty temporary missing sequence to store the missing trajectory of the current data; S3.2: Based on the user The identifier is derived from all the user's data imported into the database, forming a sequence of indicator trajectories. Each indicator point timestamp satisfies That is, the indicator points are arranged in ascending order of time; S3.3: Every two adjacent index points in the trajectory sequence and To form a missing sequence of data, in the form of ; S3.4: For each missing sequence data s, check the sequence Does it exist in the imported network? when sequence If the data exists in the imported network and the time interval between indicator points is less than 1 hour, the data is considered valid, and the current sequence data is added to the temporary missing sequence. If the sequence does not exist in the imported network or the time interval is greater than 1 hour, the data trajectory is considered to have ended. The current temporary missing sequence T is saved and the temporary missing sequence is cleared in order to start the processing of new missing data. S3.5: Process the entire indicator trajectory sequence sequentially to obtain one or more missing sequences for the user, in the form of... ; in, Representing the network Missing sequences; S3.6: For all Perform the above operations to obtain the missing sequence data for all users, and address the missing data during data import: enter: It includes missing points; For short-time missing data (<1 hour), a linear interpolation algorithm is used to fit the median value based on normal data points from before and after the missing time periods. The formula is as follows: For missing values at time t ; For long-term missing data (>1 hour), a weighted estimation is used to fill the gap, combining historical data from the same period for the site. The formula is as follows: in, For time similarity weights; ,and The Middle The time of each historical data point comes from the collection timestamp of historical data from the same period; For smoothing parameters; The first in The actual values of each historical data point are derived from the historical data of the same period for that plot of land.
5. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 4, characterized in that: The application of the trend prediction submodule includes at least the following steps: S4.1: The spatiotemporal feature extraction module is based on the periodic feature extraction module and the spatiotemporal graph convolutional network; The periodic feature extraction module, or RCF module, is used to extract periodic features from data. Spatiotemporal Graph Convolutional Network (STGCN) is used to capture the spatiotemporal features of residual data. S4.2: STGCN is used as the backbone network of the spatiotemporal feature extraction module. STGCN consists of multiple spatiotemporal convolutional blocks. Each spatiotemporal convolutional block forms a sandwich structure with two temporal convolutional layers and one graph convolutional layer in the middle. S4.2.1: The input to the STGCN module is... , Indicates the length of the historical sequence. It refers to the number of indicators. These are characteristic dimensions of soil indicators; S4.2.2: Graph Convolutional CN, assuming graph From the set of nodes Sum of edges Composition, in which, Representative indicators; Represents the connectivity between indicators; the basic form of graph convolution is: in, It is the weight matrix of the spatial graph convolution; It is the adjacency matrix of the graph Add self-connection matrix ; yes The degree matrix; that is ; It is an activation function; S4.2.3: Temporal Convolution (TCN). Temporal convolution is implemented through one-dimensional convolution operations, as shown in the following formula: in, It is the size of the convolution kernel; These are the weights of the convolution kernel; It is a bias term; Indicates the convolution operation; It is an activation function; S4.2.4: The output of STGCN is represented as follows: S4.3: Combining RCF and STGCN to extract spatiotemporal features of the data, the specific training process is as follows: S4.3.1: Instance Normalization. An instance normalization strategy is introduced, which normalizes the sequence after input and denormalizes it before output, as shown below: S4.3.2: Generate learnable cycle time and initialize it to zero, where, For the number of indicators, 1440 corresponds to 1440 minutes in a day, matrix Used to capture the periodicity of values for all indicators throughout the day; S4.3.3: By performing a loop copy, from Obtain the input sequence Cyclic components of the same length ; S4.3.4: From raw input Subtract the loop component Obtain residual components ; S4.3.5: Will Enter STGCN to obtain the prediction results of the residual components. ; S4.3.6: Will Add to The final predicted value is obtained. ,in For length and output sequence Equal cyclic components; S4.3.7: Training together with the backbone network, the periodic characteristics of the daily values of different indicators are finally obtained; S4.3.8: Use mean squared error (MSE) as the loss function; To enable decision-making functionality, the platform incorporates the Facebook Prophet time series model and makes scenario-specific improvements: enter: ; Add "crop growth cycle" as a custom seasonal factor to the model and integrate external meteorological API data as a regression value; Model equations: in, This is a trend item; It is seasonal; Due to the holiday effect; For regression parameters; For noise; Crop cycle factors are modeled as follows: in, The period length; and For the integer period of learning.
6. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 5, characterized in that: The multidimensional decision-making submodule uses the predicted sequence data obtained by the missing value intelligent imputation submodule. Where B represents ; The number of indicators in the sequence; Represents the feature dimension; Combining the features extracted by the spatiotemporal feature extraction module in the trend prediction submodule, a multi-task decision model is constructed. The specific steps are as follows: S5.1: Extracting the periodic feature sequence of data from the RCF module Extracting spatiotemporal features of data residuals from STGCN ; S5.2: Input the predicted sequence data T and the data feature sequence data into the model; S5.3: Discrete Feature Embedding. The estimation model processes multiple discrete features in the prediction sequence. Each discrete feature is transformed into a fixed-dimensional vector representation through an independent embedding layer. ; in, The number of discrete feature types. For the dimension of embedding; S5.4: Continuous feature embedding; the model incorporates distance, numerical, and periodic features. These continuous features are embedded through a fully connected layer and transformed into a fixed-dimensional vector representation: in, Represents continuous features of the input; This is the weight matrix; It is the bias vector; Features after embedding; For activation functions; S5.5: Feedforward Neural Network (FFN): Concatenates all embedded features to form a comprehensive feature vector, and performs nonlinear transformation through the feedforward neural network; in, Spatiotemporal characteristics of data residuals; For the output of the feedforward network; and This is the weight matrix; and It is the bias vector; S5.6: Transformer encoder, which takes the output of the feedforward network and inputs it into the Transformer encoder to capture temporal dependencies and obtain the features of each index in the sequence; in, Representative indicators; This represents the local index features obtained through the transformer encoder; S5.7: Attention mechanism: After obtaining local indicator features, the attention mechanism is used to weight and sum the local indicator features to obtain the overall features of the sequence. in, Indicates the index; k is the length of the index; Characteristics representing local indicators; Represents attention weight; In the attention mechanism, the spatiotemporal features of data residuals are incorporated. The data periodic feature H is fused with the data periodic feature H through a fully connected layer to obtain the data spatiotemporal feature H as the query vector; Where · represents the inner product operator; S5.8: Using Mean Squared Error As a loss function; The platform calculates the Pearson correlation coefficient between different variables within the sliding window in real time, using the following formula: when When this occurs, a correlation warning is triggered, and comprehensive soil adjustment suggestions are generated.
7. The intelligent soil monitoring platform based on cloud-based algorithm compensation according to claim 6, characterized in that: The application of the interactive output module includes at least the following steps: S6.1: Extract all data from the last day of the period from the sequence data file obtained from the data import module, and use it as the output historical sequence data; S6.2: Based on the start timestamp of the sequence The data is divided according to time slots and stored in different folders; S6.3: Starting from the first time slot, retrieve the data file of the current time slot 0t. Process it; S6.4: Repeat the above steps in time slot order to output the data for all time slots; S6.5: After the output is complete, begin calculating the decision features for all time slots, using the numerical values of the sequence. Sequence length and numerical flow Find the current time slot Decision density and decision speed The formula is as follows: Through the above steps, the output method based on the decision model can dynamically simulate the numerical flow in the data, providing a scientific basis for agricultural management and planning. Visualization uses ECharts to display real-time data and forecast curves, and uses red, yellow and green blocks to intuitively display soil health scores. Alarm push notifications: When a predicted or real-time value reaches a threshold, an early warning and emergency response plan will be pushed via cloud SMS service. It provides detailed explanations, supports API export, and has a response time of less than 1 second, ensuring real-time user interaction.
8. A method for intelligent soil monitoring based on cloud-based algorithm compensation, used in the intelligent soil monitoring platform based on cloud-based algorithm compensation as described in any one of claims 1-7, characterized in that: At least the following steps are included: The front end only collects and transmits data, while the core data processing logic is all placed on the cloud platform, and the problem of insufficient accuracy of low-cost hardware is solved by software algorithms. A noise cleaning mechanism based on isolated forests is adopted, and the path length anomaly score of data points is calculated using the isolated forest algorithm to distinguish between real environmental changes and random noise generated by inexpensive hardware, thereby realizing software calibration of low-cost sensors. A time-series prediction model integrating growth cycles is adopted, and crop growth stage is introduced as a custom regression variable into the Prophet prediction model to achieve dynamic prediction of future soil conditions. Furthermore, a multidimensional correlation decision generation method was adopted, using Pearson correlation coefficient to analyze the coupling relationship between soil physicochemical parameters, and based on this, comprehensive agricultural management recommendations were generated.