A multi-level collaborative agricultural internet of things sensing abnormal data detection and recovery method

CN123020587APending Publication Date: 2026-10-30BAOSHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610933662.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

这些方法在时间序列异常检测中表现出较强的特征提取能力,但通常需要集中的计算资源,无法直接部署于边缘感知节点;同时,现有方法多仅利用单一数值模态,忽略了现场图像等丰富的环境上下文信息,在遇到传感器自身故障与环境物理骤变(如突降冰雹、叶片遮光)共存的复杂场景时,往往无法准确区分异常根因,导致误报或漏报

Benefits of technology

1、本申请构建的感知-边缘-云的三层协同架构,依据各层节点的计算与存储能力差异,将异常检测与恢复任务进行合理分配:感知层执行轻量化初筛,边缘层进行深度特征重构,云端完成跨模态智能校验。通过任务卸载与层间协同,避免了单一节点算力瓶颈,整体数据处理延迟大幅降低。实验表明,感知层改进后的轻量化DBSCAN算法执行耗时较传统DBSCAN下降约81.7%,内存消耗由384Bytes缩减至112Bytes,能够满足农业物联网高频流数据的实时处理需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020587A_ABST
    Figure CN123020587A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multilevel collaborative agricultural internet of things sensing abnormal data detection and recovery method, it is related to agricultural internet of things and intelligent information processing technical field. Including: in sensing layer, preliminary screening and linear interpolation repair are carried out to bottom layer high-frequency flow data using lightweight adaptation strategy, realize efficient low-delay abnormal defense;In edge layer, deploy multiscale physical sensing hybrid expert model, utilize time-frequency double expert network and dynamic routing mechanism, accurately reconstruct and identify abnormal long-period agricultural time series data;In cloud, use multimodal large language model combined with decoupling visual coding and cross-modal logic verification to process high-complexity abnormal data recovery. Through the hierarchical configuration and collaborative processing of computing resources, the data cleaning efficiency and recovery accuracy in complex physical environment are significantly improved, the decision-making errors caused by abnormal data are effectively avoided, and the reliability and stability of agricultural production automation control are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural Internet of Things (IoT) and intelligent information processing technology, specifically to a multi-level collaborative method for detecting and recovering abnormal agricultural IoT sensing data. Background Technology

[0002] In smart agriculture systems, the quality of environmental sensing data directly determines the reliability of automated decision-making and control commands. However, the agricultural environment is complex and ever-changing. Sensor nodes are exposed to adverse factors such as drastic fluctuations in temperature and humidity, electromagnetic interference, physical obstruction, and biological activity for extended periods. As a result, the time-series data collected is highly susceptible to anomalies such as high-frequency noise, sudden outliers, persistent offsets, or jamming distortion. Without effective detection and recovery, this abnormal data will directly flow into the decision-making level, potentially causing malfunctions in irrigation, ventilation, and supplemental lighting equipment, or even leading to production accidents.

[0003] Currently, the methods for handling anomalies in agricultural IoT sensing data can be mainly categorized as follows: Detection methods based on statistical thresholds, such as moving averages and the 3σ principle, are simple to deploy but struggle to adapt to the nonlinear and non-stationary changes in the agricultural environment, and are almost ineffective against persistent, weak drifts and complex pattern anomalies.

[0004] Traditional machine learning-based detection methods, such as Isolation Forest and Single-Class Support Vector Machine, can capture certain data distribution characteristics, but their feature engineering relies on manual design, and their model complexity is limited, making them difficult to run in real time on resource-constrained sensing nodes.

[0005] Deep learning-based methods, such as autoencoders and long short-term memory networks, demonstrate strong feature extraction capabilities in time-series anomaly detection. However, they typically require concentrated computational resources and cannot be directly deployed on edge sensing nodes. Furthermore, existing methods often utilize only a single numerical modality, neglecting rich environmental contextual information such as on-site images. When encountering complex scenarios where sensor malfunctions coexist with sudden physical changes in the environment (such as sudden hail or leaf shading), they often fail to accurately distinguish the root cause of the anomaly, leading to false alarms or missed alarms.

[0006] Layered processing architecture has been studied in the Industrial Internet of Things, but existing layered schemes simply assign multiple different algorithms to different layers (such as lightweight on the edge and heavy on the cloud), lacking inter-layer feedback and dynamic collaboration mechanisms, and failing to give full play to the complementary advantages of computing power gradient and multimodal information.

[0007] Therefore, how to construct an abnormal data detection and recovery method that can balance real-time performance, accuracy, and robustness in an agricultural IoT environment where computing power, storage, and communication are all limited, and how to make full use of multimodal information to eliminate semantic ambiguity, is a technical problem that urgently needs to be solved. Summary of the Invention

[0008] The purpose of this invention is to provide a multi-level collaborative method for detecting and recovering abnormal agricultural IoT sensing data, addressing the aforementioned problems.

[0009] The technical solution of the present invention is as follows: A multi-level collaborative method for detecting and recovering abnormal agricultural IoT sensing data includes the following steps: At the perception layer, based on the computing power and storage constraints of the perception nodes, the DBSCAN outlier detection algorithm is subjected to a lightweight adaptation strategy, and the linear interpolation algorithm is used to achieve initial screening of outliers and data filling for high-frequency streaming data. At the edge layer, the physical perception deep anomaly detection model PA-DMoE is deployed, and a multi-scale time-frequency dual expert network, dynamic routing mechanism and residual gating module are introduced to accurately reconstruct and identify anomalies in long-cycle agricultural time-series data. In the cloud, a multimodal large language model with decoupled visual coding characteristics is introduced, combined with structured prompt words and cross-modal logic verification, and the association between image information and sensor values ​​is established through low-rank adaptation to complete anomaly handling in complex scenarios.

[0010] Through a three-layer collaborative architecture of perception, edge computing, and cloud, computing resources are precisely matched with processing tasks: the perception layer filters out obvious outliers, the edge layer reconstructs complex anomalies, and the cloud utilizes cross-modal information to verify difficult samples, progressively improving data confidence. Compared with centralized processing on a single node, the overall data cleaning efficiency is significantly improved, effectively preventing abnormal data from flowing into the decision-making layer and enhancing the reliability and stability of automated regulation in agricultural production.

[0011] Furthermore, the introduction of a multimodal large language model with decoupled visual encoding characteristics, combined with structured prompt words and cross-modal logic verification, specifically includes: The time-series data processed by the edge layer and the synchronously acquired on-site visual image data are uploaded to the cloud in a collaborative manner, and organized according to the structured prompt word format to construct a multimodal agricultural anomaly analysis input; Low-rank adaptation technique is used to fine-tune the pre-trained multimodal large language model Janus-pro-7B in the domain, and a cross-modal feature mapping benchmark is established. By using a finely tuned multimodal large language model, semantic features of the field environment are extracted by decoupling the visual encoder, eliminating semantic ambiguity of a single numerical modality, and realizing data anomaly judgment and accurate recovery in complex fault scenarios. The system generates high-confidence perception data after final cleaning and feeds it back to the smart agriculture decision-making level to complete the closed-loop control of the entire chain of anomaly defense.

[0012] A multimodal large language model with decoupled visual coding characteristics was introduced into the cloud. Through fine-tuning with structured cue words and LoRA low-rank adaptation, a cross-modal logical relationship between image semantics and sensor values ​​was established. When sensor readings are abnormal, the model can simultaneously analyze the environmental context in the field image (such as cloud thickness, leaf condition, soil moisture appearance, etc.) to accurately determine the root cause of the anomaly (whether it is a sensor malfunction or a sudden environmental change), thereby eliminating semantic ambiguity in a single numerical modality. Experiments show (see...) Figure 15 , Figure 16 The finely tuned multimodal model demonstrates significantly higher accuracy in identifying typical agricultural anomalies such as probe obstruction, abnormal environmental conditions, hardware aging, and sudden changes in microclimate than the untuned or purely numerical modal model. The resulting high-confidence data is then fed back to the decision-making level, forming a closed-loop process.

[0013] Furthermore, the edge layer also includes a dynamic residual gating mechanism: Introducing learnable dynamic residual control parameters ,through After activation and global dynamic mutation weights Multiplying them together yields the dynamic gating coefficients: , in, Used to adaptively adjust the residual propagation ratio between anomalous features and normal seasonal features. Local standard deviation; Finally, the seasonal and trend terms modulated by the dynamic residuals are fused to obtain the complete reconstruction result: , in, The result of the reconstruction of the seasonal term. To reflect the seasonal term that reflects local fluctuations, It is an adaptive residual modulation.

[0014] By introducing learnable dynamic residual control parameters and multiplying them with dynamic routing weights to generate dynamic gating coefficients, the residual propagation ratio between anomalous and normal seasonal features can be adaptively adjusted. When a data segment is determined by the routing weights to have a high probability of mutation, the dynamic gating coefficients increase, allowing more original seasonal terms to pass directly and preserving the true physical fluctuations; conversely, it relies more on the reconstructed seasonal terms, truncating the path of anomalous propagation. This mechanism enables the final reconstructed sequence to maintain a normal periodic pattern while effectively suppressing various anomalous distortions. Experiments show (see...) Figure 10-12 The reconstruction error of this model under multiple mixed anomaly injection conditions is significantly lower than that of a single LSTM-Autoencoder or the standard MoE model.

[0015] Furthermore, the dynamic routing mechanism specifically includes: Extracting the local standard deviation of the sequence First-order difference and second-order difference As statistical routing features, dynamic routing weights are generated: , , in This represents the result of the physical statistical feature mapping. Based on dynamic routing weights, the time-domain expert output and the frequency-domain expert output are adaptively fused to obtain the single-branch seasonal term reconstruction result: , in, Output results for time-domain experts. Output results for frequency domain experts.

[0016] Local standard deviation, first-order difference, and second-order difference of the sequence are extracted as physical statistical routing features. Dynamic routing weights are generated using Softmax to achieve adaptive fusion of the outputs of time-domain experts (adept at capturing transient abrupt changes) and frequency-domain experts (adept at capturing periodic energy distributions). When the sequence exhibits drastic transient fluctuations, the routing weights favor the time-domain experts; when the sequence exhibits periodic noise or drift, the routing weights favor the frequency-domain experts. This physical feature-driven dynamic routing mechanism allows the model to effectively capture different hidden anomalies without requiring manual expert selection, significantly improving the reconstruction robustness in complex anomaly scenarios.

[0017] Furthermore, the multi-scale time-frequency dual expert network specifically includes: Constructing parallel branches is important for time-domain experts. Local temporal abrupt change features are extracted through encoders and gating mechanisms: , , in, for The latent time-domain feature representation obtained after encoding and nonlinear mapping the input time-series data. For activation function, For coding layer; for The gate weight vector, It is the Sigmoid activation function. for The gated linear mapping layer in the middle; The output is: , in, for The decoding layer in the middle; For frequency domain experts Periodic frequency features are extracted using Fast Fourier Transform: , Generate frequency domain gated weights: , in, for The gated linear mapping layer in the middle; The input seasonal sequence is mapped to a latent space feature representation, and the latent features are dynamically modulated using frequency domain gating information. , in, for The coding layer in; The frequency domain expert output results are obtained: , in, for The decoding layer in This is the regularization module.

[0018] The time-domain expert extracts local temporal abrupt change features through encoders and gating mechanisms, making it sensitive to transient pulse-like anomalies. The frequency-domain expert extracts periodic frequency features through Fast Fourier Transform (FFT) and generates frequency-domain gating weights, achieving dynamic suppression of anomalous frequency components and enhancement of normal periodic components. The dual-expert parallel structure combined with gating modulation allows the model to utilize complementary information from both the time and frequency domains simultaneously, overcoming the shortcomings of incomplete feature extraction in a single domain. Experiments show (see...) Figure 10-12 This model outperforms single-domain models in detecting complex abnormal samples such as persistent data drift, continuous high-frequency noise, and stuck hysteresis.

[0019] Furthermore, the edge layer also includes trend term decomposition and reconstruction: The raw data sequence uploaded by the perception layer Decomposed into trend terms representing long-term changes and seasonal terms reflecting local fluctuations ,Right now: , The input trend term is mapped to a low-dimensional latent space for feature compression, and then restored to the original temporal dimension by the decoder to obtain the preliminary trend reconstruction result: , in, For decoding layer; Dynamic routing weights generated using multi-scale expert networks Adaptive residual modulation is applied to the original trend information: .

[0020] First, the original sequence is decomposed into a trend term and a seasonal term, thus decoupling long-term variations from local fluctuations. The trend term is then compressed and reconstructed using an encoder-decoder, and further processed using dynamic routing weights. Adaptive residual modulation is employed. When the sequence is in a stable trend phase, more original trend information is allowed to pass through, preserving the true long-term evolution; when the sequence is in a high-abrupt phase, the contribution of the original trend is reduced, avoiding the contamination of the reconstruction results by anomalous trends. This mechanism enables the trend term reconstruction to both follow the true physical evolution and resist anomalous interference.

[0021] Furthermore, in the edge layer, anomalies are determined by calculating the reconstruction error between the original input sequence and the reconstructed sequence: , When the reconstruction error exceeds the preset threshold, it is determined that there is abnormal data at the corresponding time position, and the abnormal detection result and the corresponding restored reconstruction sequence are output.

[0022] This invention determines anomalies based on reconstruction errors, wherein... The complete reconstructed sequence is obtained after trend-seasonal decomposition, dual-expert dynamic fusion, and residual gating modulation. Because this reconstruction process fully considers the multi-scale characteristics and anomaly type diversity of time-series data, the reconstruction error of normal data is much smaller than that of anomaly data. Therefore, a fixed threshold or a dynamic quantile threshold can be used to achieve high-precision anomaly localization. Experiments show that the detection rate of the temporal location of composite anomalies using this method is significantly higher than that of methods based on moving averages or isolated forests.

[0023] Furthermore, the perception layer specifically includes the following steps: Data storage and window sliding are implemented using a circular buffer, simplifying the high-dimensional Euclidean distance of traditional DBSCAN into a one-dimensional scalar absolute value difference, defining two data points. , In the neighborhood radius The conditions within are: , By eliminating floating-point operations, the density connection relationship between data points is determined using only integer subtraction and logical comparison instructions. Using a length of Circular buffer Carrying streaming data, when new data points When entering the window, the oldest data point is overwritten by the circular pointer. and update the neighborhood cardinality. Old data stripping phase: If Then for the retention point Execute base decreasing New data fusion stage: If Then for the retention point Execution base increment ; With density threshold As an anomaly detection criterion, if new data points neighborhood cardinality Then determine For outlier points, perform linear interpolation reconstruction: , in , For the effective neighboring normal data points within the sliding window, For abnormal data points to be reconstructed The corresponding timestamp, Normal data points The corresponding timestamp, Normal data points The corresponding timestamp.

[0024] The high-dimensional Euclidean distance of traditional DBSCAN is simplified to one-dimensional absolute value difference, eliminating floating-point operations and utilizing only integer subtraction and logical comparison instructions. Simultaneously, a circular buffer is used to implement incremental neighborhood cardinality updates with O(N) complexity (stripping old data and merging new data), avoiding rescanning the entire window every time new data arrives. Experimental data shows that the improved DBSCAN algorithm reduces execution time by approximately 81.7% and memory consumption from 384 bytes to 112 bytes, enabling real-time operation on MCU-level nodes. The linear interpolation formula utilizes nearby normal points within the window for immediate recovery, preventing abnormal data from propagating to higher layers.

[0025] Furthermore, the lightweight adaptation strategy reduces the computational complexity of the anomaly detection algorithm to [value missing]. ,in The length of the circular buffer is reduced, and the execution time of the improved DBSCAN algorithm is reduced by 81.7%, while the memory consumption is reduced from 384 bytes to 112 bytes.

[0026] This application, while ensuring detection accuracy, strictly controls the computational complexity of the algorithm to O(N) (where N is the length of the circular buffer). In actual testing, the execution time was reduced by 81.7%, and the memory consumption was only 112 bytes. This enables even resource-constrained agricultural IoT sensing nodes (such as 8-bit MCUs and KB-level memory) to deploy effective anomaly screening and recovery functions, filling the gap in existing technologies for "high-precision detection under extreme resource constraints".

[0027] Furthermore, it also includes an inter-layer collaborative processing architecture: the data processed by the perception layer is uploaded to the edge layer, the time-series data processed by the edge layer and the synchronously collected on-site visual image data are collaboratively uploaded to the cloud, and the high-confidence perception data generated by the cloud is fed back to the smart agriculture decision-making layer, forming a closed-loop processing of perception-edge-cloud full link.

[0028] A closed-loop processing architecture was constructed, encompassing perception, edge computing, cloud computing, and the decision-making layer. This architecture not only achieves task offloading through computational power gradient adaptation but, more importantly, establishes a collaborative mechanism for progressive refinement and feedback verification: the initial screening results from the perception layer reduce the computational load on the edge layer, the reconstruction results from the edge layer improve the input quality to the cloud, and the multimodal verification results from the cloud are fed back to the decision-making layer to prevent erroneous actions. This closed-loop structure ensures that abnormal data cannot flow into the final decision, significantly enhancing the stability and security of automated agricultural production control.

[0029] Compared with existing technologies, the advantages of this invention are: 1. The three-layer collaborative architecture of perception-edge-cloud constructed in this application rationally allocates anomaly detection and recovery tasks based on the differences in computing and storage capabilities of nodes at each layer: the perception layer performs lightweight initial screening, the edge layer performs deep feature reconstruction, and the cloud layer completes cross-modal intelligent verification. Through task offloading and inter-layer collaboration, the bottleneck of computing power of a single node is avoided, and the overall data processing latency is significantly reduced. Experiments show that the execution time of the improved lightweight DBSCAN algorithm in the perception layer is reduced by approximately 81.7% compared to the traditional DBSCAN, and the memory consumption is reduced from 384 bytes to 112 bytes, which can meet the real-time processing needs of high-frequency streaming data in agricultural IoT.

[0030] 2. Addressing the extremely limited computing resources of agricultural sensing nodes, this application simplifies the traditional DBSCAN algorithm by applying one-dimensional distance and incremental updates via a circular buffer, completely eliminating floating-point operations in high-dimensional Euclidean distance calculations. Density determination can be completed using only integer subtraction and logical comparison instructions. This design enables real-time anomaly screening on resource-constrained MCU-level nodes, while linear interpolation allows for immediate filling of anomalous data, effectively preventing the propagation of anomalous data to higher layers and reducing unnecessary computational load on the edge and cloud.

[0031] 3. Addressing the challenge of diverse and coupled anomaly types (instantaneous impulses, persistent drift, high-frequency noise, deadlock, etc.) in long-term agricultural time-series data, this application proposes the PA-DMoE model. This model achieves adaptive capture of anomalies with different physical characteristics through trend-seasonal decoupling, a time-frequency dual-expert network, and a dynamic routing mechanism. The time-domain expert excels at capturing instantaneous changes, while the frequency-domain expert extracts periodic distribution features based on FFT. Dynamic routing automatically adjusts the fusion ratio of the two based on physical statistical features such as local standard deviation and difference. Combined with a residual gating module to truncate the anomaly propagation path, the reconstruction accuracy and robustness under complex anomaly scenarios are significantly improved. Experimental comparisons show that the detection accuracy and recovery accuracy of this model are superior to those of single LSTM-Autoencoder and standard MoE models under conditions of multiple mixed anomaly injections.

[0032] 4. To address the shortcomings of existing methods that rely solely on numerical modalities and cannot distinguish between sensor malfunctions and sudden environmental physical changes (such as hail or leaf obstruction), this application introduces a multimodal large language model with decoupled visual coding characteristics in the cloud. Through fine-tuning with structured cue words and LoRA low-rank adaptation, a cross-modal logical association between image semantics and sensor values ​​is established. When sensor readings are abnormal, the model can simultaneously analyze the environmental context in the field image (such as cloud thickness, leaf condition, and soil moisture appearance) to accurately identify the root cause of the anomaly, thereby achieving high-confidence data recovery. Experiments show that the fine-tuned multimodal model significantly outperforms pure numerical modalities or the untuned general model in determining typical agricultural anomalies such as probe obstruction, media anomalies, hardware aging, and sudden micro-meteorological changes.

[0033] 5. The three-layer architecture of this application is not a simple stacking of functions, but rather a collaborative mechanism of task offloading and progressive refinement that constructs a full-link anomaly defense line from data acquisition to final output. The perception layer filters obvious outliers, the edge layer reconstructs complex pattern anomalies, and the cloud utilizes cross-modal information to verify difficult samples, progressively improving data confidence. The final high-reliability perception data directly serves the smart agriculture decision-making layer, effectively avoiding malfunctions of irrigation, ventilation, supplemental lighting, and other execution equipment caused by abnormal data, significantly enhancing the stability and security of automated agricultural production control. Attached Figure Description

[0034] Figure 1 This is a flowchart illustrating the overall architecture of the multi-level collaborative agricultural IoT sensing anomaly data detection and recovery method proposed in this application.

[0035] Figure 2 This is a comparison chart showing the execution time of the lightweight DBSCAN algorithm for the perception layer in this application and the existing DBSCAN algorithm.

[0036] Figure 3This is a comparison chart showing the memory usage of the lightweight DBSCAN algorithm for the perception layer in this application and existing DBSCAN algorithms.

[0037] Figure 4 This is a comparison chart showing the accuracy of the linear interpolation method in the perception layer of this application with other interpolation methods (such as spline interpolation and polynomial interpolation) in recovering abnormal data.

[0038] Figure 5 The graph shows the anomaly detection accuracy and recall of the perception layer method in this application under different anomaly injection ratios.

[0039] Figure 6 This is a schematic diagram of the overall network structure of the edge layer physical perception depth anomaly detection model PA-DMoE in this application.

[0040] Figure 7 This is a schematic diagram illustrating the decomposition of the original time-series data into trend and seasonal components in this application.

[0041] Figure 8 This is a schematic diagram of the internal structure of the time-domain expert and frequency-domain expert in this application.

[0042] Figure 9 This is a schematic diagram of the trend term reconstruction and dynamic residual modulation structure of this application.

[0043] Figure 10 The figure shows the comparison results of the anomaly detection accuracy between the PA-DMoE model of the edge layer of this application and various existing deep models (including LSTM-Autoencoder, standard MoE, single temporal expert model, etc.).

[0044] Figure 11 The figure shows the comparison results of the PA-DMoE edge layer model of this application with various existing depth models in terms of outlier data recovery error (such as root mean square error RMSE).

[0045] Figure 12 This is a schematic diagram illustrating the reconstruction effect of the PA-DMoE model at the edge layer of this application under different types of anomalies (instantaneous impulses, persistent drift, high-frequency noise, and stuck hysteresis).

[0046] Figure 13 This is an example diagram of the structured prompts used in the cloud-based multimodal large language model of this application.

[0047] Figure 14 This is a schematic diagram illustrating the use of low-rank adaptation (LoRA) technology in this application to perform domain fine-tuning on a pre-trained multimodal large language model.

[0048] Figure 15This is a comparison chart showing the anomaly detection accuracy of the fine-tuned multimodal large language model, the untuned model, and the pure numerical modal model in typical agricultural anomaly scenarios (probe obstruction, abnormal environmental medium, hardware aging, and sudden changes in micro-weather).

[0049] Figure 16 This is a comparison chart showing the data recovery performance of the fine-tuned multimodal large language model in this application under different abnormal scenarios, and the recovery performance without using image information. Detailed Implementation

[0050] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0051] The features and performance of the present invention will be further described in detail below with reference to embodiments.

[0052] Please see Figure 1-16 A multi-level collaborative method for detecting and recovering abnormal agricultural IoT sensing data, such as... Figure 1 As shown, it includes the following steps: Based on the computing power and storage constraints of the sensing nodes, the DBSCAN outlier detection algorithm is implemented with a lightweight adaptation strategy, and a linear interpolation algorithm is used to achieve initial screening of outliers and data filling in high-frequency streaming data. The physical sensing deep anomaly detection model PA-DMoE is deployed at the edge, and a multi-scale time-frequency dual expert network, dynamic routing mechanism and residual gating module are introduced to accurately reconstruct and identify anomalies in long-cycle agricultural time-series data. The cloud introduces a multimodal large language model with decoupled visual coding characteristics, combines structured prompt words with cross-modal logic verification, and establishes the association between image information and sensor values ​​through low-rank adaptation to complete anomaly handling in complex scenarios. This paper describes a method for initial screening of anomalies and data imputation in high-frequency streaming data using linear interpolation algorithms. Specifically, it includes: Data storage and window sliding are implemented using a circular buffer, and the high-dimensional Euclidean distance of traditional DBSCAN is simplified to a one-dimensional scalar absolute value difference, defining two data points. , In the neighborhood radius The conditions within are: , By eliminating floating-point operations, the density connection relationship between data points is determined using only integer subtraction and logical comparison instructions. Using a length of Circular buffer Carrying streaming data. When new data points... When entering the window, the oldest data point is overwritten by the circular pointer. and update the neighborhood cardinality. (i.e., data points) In radius (Number of neighbors within): Old data stripping phase: If Then for the retention point Execute a decreasing base: New data fusion phase: If Then for the retention point Execution of incremental base: .

[0053] With density threshold As an anomaly detection criterion, if new data points neighborhood cardinality Then determine This is an outlier. Linear interpolation reconstruction is performed on this point: , in, , To find the effective neighboring normal data points within the sliding window, the computational complexity of the above operation is O(n). Initial screening and data repair for anomalies. For abnormal data points to be reconstructed The corresponding timestamp, Normal data points The corresponding timestamp, Normal data points The corresponding timestamp.

[0054] The improved DBSCAN algorithm reduced execution time by approximately 81.7% and memory consumption from 384 bytes to 112 bytes. To verify its performance, artificial anomaly injection was used to perturb the original normal time-series data, with the injected anomaly type being sharp anomalies. Comparisons with other machine learning methods in anomaly detection are also provided. Figure 2 , Figure 3 As shown. A comparison of linear interpolation with other interpolation methods in anomaly recovery. Figure 4, Figure 5 As shown.

[0055] The Physical Aware Deep Anomaly Detection Model (PA-DMoE) is deployed at the edge. The overall architecture of the PA-DMoE model is as follows: Figure 6 As shown, it specifically includes: like Figure 7 As shown, the original data sequence uploaded by the perception layer Decomposed into trend terms representing long-term changes and seasonal terms reflecting local fluctuations ,Right now: , Building parallel branches Each branch performs a specific feature extraction task. For time-domain experts... and frequency domain experts ,like Figure 8 As shown, the time-domain expert extracts local temporal abrupt change features through the encoder and gating mechanism. The calculation process is as follows: , , in, for The latent time-domain feature representation obtained after encoding and nonlinear mapping the input time-series data. For activation function, For coding layer; for The gate weight vector, It is the Sigmoid activation function. for The gated linear mapping layer in the middle; The output is: , in, for Output results for The decoding layer in the middle.

[0056] Frequency domain experts extract periodic frequency features using Fast Fourier Transform: , in, For the corresponding spectral amplitude characteristics, For Fast Fourier Transform.

[0057] And generate frequency domain gating weights: , in, For frequency domain gated weight vectors, for The coding layer in the middle.

[0058] This achieves dynamic suppression of abnormal frequency components and enhancement of normal periodic components.

[0059] The input seasonal sequence is further mapped to a latent space feature representation, and the latent features are dynamically modulated using frequency domain gating information: , in, For frequency domain latent feature representation, for The coding layer in the middle.

[0060] Subsequently, the modulated latent features are regularized and decoded for reconstruction, yielding the frequency domain expert output: , in, Output results for frequency domain experts. for The decoding layer in This is the regularization module.

[0061] Extracting the local standard deviation of the sequence First-order difference and second-order difference As statistical routing features, dynamic routing weights are generated: , in, This represents the result of the physical statistical feature mapping.

[0062] Based on dynamic routing weights, the time-domain expert output and the frequency-domain expert output are adaptively fused to obtain the single-branch seasonal term reconstruction result: , Introducing learnable fusion parameter vectors The system uses the Softmax function to convert this parameter into a corresponding dynamic weighting coefficient, thereby adaptively weighting and fusing the outputs of each scale branch to generate a unified seasonal term reconstruction result. .

[0063] , , in The reconstruction result of the seasonal term for the i-th scale branch, These are the fusion weights for the corresponding scale; This mechanism can automatically adjust the contribution ratio of branches at different scales based on the dynamic characteristics of the input sequence, thereby improving the reconstruction robustness and generalization ability in complex and abnormal scenarios.

[0064] like Figure 9 As shown, the input trend term is first mapped to a low-dimensional latent space for feature compression, and then enhanced with nonlinear transformation to improve the expressive power of the trend pattern. Subsequently, the decoder restores it to the original temporal dimension, yielding a preliminary trend reconstruction result. , in, This is a preliminary trend reconstruction result. This is the decoding layer.

[0065] And utilize the dynamic routing weights generated by the aforementioned multi-scale expert network Adaptive residual modulation is applied to the original trend information: , in, This is the final result of the trend term reconstruction.

[0066] Introducing learnable dynamic residual control parameters ,through After activation and global dynamic mutation weights Multiplying them together yields the dynamic gating coefficients: , in, Used to adaptively adjust the residual propagation ratio between anomalous features and normal seasonal features.

[0067] Finally, the seasonal and trend terms modulated by the dynamic residuals are fused to obtain the complete reconstruction result: , Calculate the reconstruction error between the original input sequence and the reconstructed sequence: , When the reconstruction error exceeds the preset threshold, it is determined that there is abnormal data at the corresponding time position.

[0068] Output anomaly detection results and corresponding reconstructed sequences after recovery, enabling anomaly identification and data recovery of complex agricultural time-series data.

[0069] To verify its performance, artificial anomaly injection was used to perturb the original normal time-series data. The injected anomaly types included complex anomaly samples such as persistent data drift, continuous high-frequency noise, and deadlock / hysteresis. After implementation, the performance of this application was compared with other deep learning models. The anomaly detection results are as follows: Figure 10 As shown, the abnormal recovery result is as follows: Figure 11 , Figure 12 As shown.

[0070] A multimodal large language model with decoupled visual encoding characteristics is introduced into the cloud, combined with structured prompt words and cross-modal logic verification, specifically including: The cloud server receives sensor time-series data and on-site image information uploaded from the edge side and constructs multimodal agricultural anomaly analysis input.

[0071] The input for multimodal agricultural anomaly analysis is organized according to a structured prompt word format, such as... Figure 13 As shown, low-rank adaptation technique is used to fine-tune the pre-trained multimodal large language model Janus-pro-7B for domain-specific optimization. Figure 14 As shown, a cross-modal feature mapping benchmark is established; The time-series data processed by the edge layer is uploaded to the cloud in conjunction with the synchronously acquired on-site visual image data, and then used to form a multimodal large model input. The input is fed into a finely tuned multimodal large language model, and the semantic features of the scene environment are extracted by decoupling the visual encoder. This eliminates the semantic ambiguity of a single numerical modality and enables the accurate judgment and recovery of data anomalies in complex fault scenarios. The system generates high-confidence perception data after final cleaning and feeds it back to the smart agriculture decision-making level to complete the closed-loop control of the entire chain of anomaly defense.

[0072] To verify its performance, artificial anomaly injection was used to perturb the original normal time-series data. The injected anomaly scenarios included typical scenarios such as probe physical obstruction, abnormal environmental media, hardware aging, and sudden changes in microclimate. The performance of this application was compared with that of the multimodal large model before fine-tuning after implementation. The anomaly detection effect compared to the model before fine-tuning is as follows: Figure 15 As shown, the abnormal recovery effect is as follows: Figure 16 As shown.

[0073] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.

Claims

1. A multi-level collaborative method for detecting and recovering abnormal agricultural IoT sensing data, characterized in that, Includes the following steps: At the perception layer, based on the computing power and storage constraints of the perception nodes, the DBSCAN outlier detection algorithm is subjected to a lightweight adaptation strategy, and the linear interpolation algorithm is used to achieve initial screening of outliers and data filling for high-frequency streaming data. At the edge layer, the physical perception deep anomaly detection model PA-DMoE is deployed, and a multi-scale time-frequency dual expert network, dynamic routing mechanism and residual gating module are introduced to accurately reconstruct and identify anomalies in long-cycle agricultural time-series data. In the cloud, a multimodal large language model with decoupled visual coding characteristics is introduced, combined with structured prompt words and cross-modal logic verification, and the association between image information and sensor values ​​is established through low-rank adaptation to complete anomaly handling in complex scenarios.

2. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The introduction of a multimodal large language model with decoupled visual encoding characteristics, combined with structured prompt words and cross-modal logic verification, specifically includes: The time-series data processed by the edge layer and the synchronously acquired on-site visual image data are uploaded to the cloud in a collaborative manner, and organized according to the structured prompt word format to construct a multimodal agricultural anomaly analysis input; Low-rank adaptation technique is used to fine-tune the pre-trained multimodal large language model Janus-pro-7B in the domain, and a cross-modal feature mapping benchmark is established. By using a finely tuned multimodal large language model, semantic features of the field environment are extracted by decoupling the visual encoder, eliminating semantic ambiguity of a single numerical modality, and realizing data anomaly judgment and accurate recovery in complex fault scenarios. The system generates high-confidence perception data after final cleaning and feeds it back to the smart agriculture decision-making level to complete the closed-loop control of the entire chain of anomaly defense.

3. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The edge layer also includes a dynamic residual gating mechanism: Introducing learnable dynamic residual control parameters ,through After activation and global dynamic mutation weights Multiplying them together yields the dynamic gating coefficients: , in, Used to adaptively adjust the residual propagation ratio between anomalous features and normal seasonal features. Local standard deviation; Finally, the seasonal and trend terms modulated by the dynamic residuals are fused to obtain the complete reconstruction result: , in, The result of the reconstruction of the seasonal term. To reflect the seasonal term that reflects local fluctuations, It is an adaptive residual modulation.

4. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The dynamic routing mechanism specifically includes: Extracting the local standard deviation of the sequence First-order difference and second-order difference As statistical routing features, dynamic routing weights are generated: , , in This represents the result of the physical statistical feature mapping. Based on dynamic routing weights, the time-domain expert output and the frequency-domain expert output are adaptively fused to obtain the single-branch seasonal term reconstruction result: , in, Output results for time-domain experts. Output results for frequency domain experts.

5. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The multi-scale time-frequency dual expert network specifically includes: Constructing parallel branches is important for time-domain experts. Local temporal abrupt change features are extracted through encoders and gating mechanisms: , , in, for The latent time-domain feature representation obtained after encoding and nonlinear mapping of the input time-series data. For activation function, For coding layer; for The gate weight vector, It is the Sigmoid activation function. for The gated linear mapping layer in the middle; The output is: , in, for The decoding layer in the middle; For frequency domain experts Periodic frequency features are extracted using Fast Fourier Transform: , Generate frequency domain gated weights: , in, for The gated linear mapping layer in the middle; The input seasonal sequence is mapped to a latent space feature representation, and the latent features are dynamically modulated using frequency domain gating information. , in, for The coding layer in; The frequency domain expert output results are obtained: , in, for The decoding layer in This is the regularization module.

6. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The edge layer also includes trend term decomposition and reconstruction: The raw data sequence uploaded by the perception layer Decomposed into trend terms representing long-term changes and seasonal terms reflecting local fluctuations ,Right now: , The input trend term is mapped to a low-dimensional latent space for feature compression, and then restored to the original temporal dimension by the decoder to obtain the preliminary trend reconstruction result: , in, For decoding layer; Dynamic routing weights generated using multi-scale expert networks Adaptive residual modulation is applied to the original trend information: 。 7. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, In the edge layer, anomalies are determined by calculating the reconstruction error between the original input sequence and the reconstructed sequence: , When the reconstruction error exceeds the preset threshold, it is determined that there is abnormal data at the corresponding time position, and the abnormal detection result and the corresponding restored reconstruction sequence are output.

8. The method for detecting and recovering abnormal agricultural IoT sensing data in a multi-level collaborative manner according to claim 1, characterized in that, The perception layer specifically includes the following steps: Data storage and window sliding are implemented using a circular buffer, simplifying the high-dimensional Euclidean distance of traditional DBSCAN into a one-dimensional scalar absolute value difference, defining two data points. , In the neighborhood radius The conditions within are: , By eliminating floating-point operations, the density connection relationship between data points is determined using only integer subtraction and logical comparison instructions. Using a length of Circular buffer Carrying streaming data, when new data points When entering the window, the oldest data point is overwritten by the circular pointer. and update the neighborhood cardinality. Old data stripping phase: If Then for the retention point Execute base decreasing New data fusion stage: If Then for the retention point Execution base increment ; With density threshold As an anomaly detection criterion, if new data points neighborhood cardinality Then determine For outlier points, perform linear interpolation reconstruction: , in , For the effective neighboring normal data points within the sliding window, For abnormal data points to be reconstructed The corresponding timestamp, Normal data points The corresponding timestamp, Normal data points The corresponding timestamp.

9. A multi-level collaborative agricultural IoT sensing anomaly data detection and recovery method according to claim 8, characterized in that, The lightweight adaptation strategy reduces the computational complexity of the anomaly detection algorithm to O(n). ,in The length of the circular buffer is reduced, and the execution time of the improved DBSCAN algorithm is reduced by 81.7%, while the memory consumption is reduced from 384 bytes to 112 bytes.

10. A multi-level collaborative agricultural IoT sensing anomaly data detection and recovery method according to claim 1, characterized in that, It also includes an inter-layer collaborative processing architecture: the data processed by the perception layer is uploaded to the edge layer, the time-series data processed by the edge layer and the synchronously collected on-site visual image data are collaboratively uploaded to the cloud, and the high-confidence perception data generated by the cloud is fed back to the smart agriculture decision-making layer, forming a closed-loop processing of perception-edge-cloud.