Agricultural data dynamic sensing scheduling method based on Internet of Things
By deploying IoT sensors and edge computing platforms in the agricultural field, real-time integration and efficient processing of agricultural data is achieved, the subjectivity and inaccuracy of traditional agricultural data perception and scheduling methods are solved, the real-time and accuracy of data processing are improved, and resource allocation is optimized through dynamic cost-benefit analysis.
Patent Information
- Application Number
- CN202411870946.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-28
AI Technical Summary
The existing agricultural data perception and scheduling methods have problems such as strong subjectivity, inaccurate data, poor timeliness and lack of scientific decision-making basis. In addition, traditional data dynamic perception technology is not suitable for the application of complex agricultural fields, and there are problems such as poor data correlation, large processing delay, high resource consumption and lack of real-time.
Adopt the dynamic perception scheduling method of agricultural data based on the Internet of Things to realize real-time data processing and optimization analysis by deploying IoT sensors, edge computing platforms and edge servers. The method includes data integration, cleaning, feature extraction, machine learning model application, task allocation and scheduling, deep learning multidimensional spatial analysis, secure transmission and cost-benefit analysis.
Realize real-time integration and efficient processing of data, eliminate data silos, reduce data transmission delay and central server burden, improve model accuracy and resource utilization, overcome the problems of model complexity, computing resource limitations and data fusion difficulties in traditional solutions, and optimize resource allocation through dynamic cost-benefit analysis.
Smart Images

Figure CN119721772A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dynamic perception of agricultural data, and in particular to a dynamic perception scheduling method of agricultural data based on the Internet of Things. Background Art
[0002] Agricultural data refers to various data related to agricultural production, management, scientific research and other activities, including but not limited to soil moisture, temperature, light intensity, and meteorological data including wind speed and rainfall, crop height, leaf area, pest and disease conditions, and yield growth conditions. Therefore, these data are an important basis for agricultural production decision-making and are of great significance for improving agricultural production efficiency, optimizing resource allocation, reducing environmental pollution, and improving the quality of agricultural products.
[0003] However, the general perception and scheduling of agricultural data mainly rely on manual observation and recording, which has problems such as strong subjectivity, inaccurate data, and poor timeliness. Scheduling is based on experience-based decision-making, lacks scientific basis, and is difficult to achieve optimal resource allocation. The existing data dynamic perception technology using machine learning and related algorithms is obviously not adaptable when applied to complex agricultural fields. First of all, the single algorithm or model in the traditional solution has poor data correlation, large processing delay, high resource consumption and lack of real-time performance, which leads to insufficient model accuracy, computing resource limitations and difficulty in data fusion. Therefore, in the application process of dynamic perception of agricultural data, traditional solutions lack dynamism, incomplete considerations and limited optimization methods.
[0004] In summary, it is necessary to propose a dynamic perception and scheduling method of agricultural data based on the Internet of Things to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to provide an agricultural data dynamic perception scheduling method based on the Internet of Things to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions: The method for dynamic perception and scheduling of agricultural data based on the Internet of Things is implemented based on Internet of Things sensors, edge computing platforms and edge servers, and includes the following steps: S1. Deploy IoT sensors including weather stations, soil moisture monitors, and drone inspection systems; S2. Deploy real-time data processing modules on edge servers through edge computing platforms; S3. Integrate data from different IoT sensors to establish and continuously strengthen the perception layer; S4. Construct an optimization analysis layer including a data access layer, a data analysis layer, and a result output layer, clean the data obtained from the perception layer and extract soil moisture, temperature, and light intensity characteristics, then use machine learning algorithms to perform pattern recognition on the extracted crop growth cycle identification and pest and disease warning characteristics, and perform task allocation and scheduling in the optimization analysis layer; S5. Use deep learning for multidimensional spatial analysis; S6. Securely transmit data to the cloud through VPN tunnel; S7. Implement multi-layered security measures; S8. Establish a cost-benefit analysis model; S9. Build an open source community through online learning platforms and establish an interdisciplinary communication and cooperation mechanism.
[0007] Preferably, the implementation steps of step S1 are: S1.1. Select a suitable location to install a weather station to monitor temperature, humidity, and wind speed. The data collection frequency is set to collect data once every minute; S1.2. Install soil moisture sensors at different depths in the farmland, and set the data collection cycle to collect data once every hour; S1.3. Deploy the drone inspection system, set the drone flight route and shooting frequency, collect image data and perform compression processing; S1.4. Use MQTT protocol to transmit data to the central server and unify data representation in JSON format; S1.5. Use the Pandas library to remove invalid or outliers and standardize the data through normalization.
[0008] Preferably, the implementation steps of step S2 are: S2.1. Deploy edge servers, select AWS Greengrass or Azure IoT Edge as the edge computing platform, and install and configure the edge computing environment; S2.2. Outlier detection and setting thresholds to identify outliers; S2.3. Use TensorFlowLite to deploy lightweight models for preliminary identification of crop pests and diseases; S2.4. Manage the lifecycle of tasks through the edge computing platform, including deployment, update, and withdrawal.
[0009] Preferably, the implementation steps of step S3 are: S3.1. Receive data from each sensor to the central processing unit and use KafkaStreams or Flink to process real-time data streams; S3.2. Perform state estimation and continuous equation update through Kalman filter algorithm; S3.3. Combine uncertain information from multiple sources to calculate trust; S3.4. Dynamically adjust weights according to data quality and output fusion results.
[0010] Preferably, the implementation steps of step S4 are: S4.1. Use the API interface to receive data from the perception layer and ensure that the data format is unified in JSON or XML for subsequent processing; S4.2. Use the Pandas library combined with custom cleaning rules to remove null values, duplicate values, and outliers. For outliers, use the boxplot method or Z-score method to identify and replace them with the mean or median. S4.3. Directly read the sensor value as the soil moisture feature, use the linear regression model to smooth the time series data, reduce the temperature feature noise, calculate the daily average value through the sliding window average method, and reduce the instantaneous fluctuation of the light intensity feature; S4.4. Use the random forest classifier to identify crop growth cycles. The input features are the soil moisture features, temperature features, and light intensity features of the time series in step S4.3. The outputs are the seedling, flowering, and mature growth stages. The time series segmentation method is introduced to subdivide the growth cycle into more detailed sub-stages. S4.5. Construct a support vector machine model, with the input being the soil moisture characteristics, temperature characteristics, light intensity characteristics and crop growth stage of the pest and disease historical data set, and the output being the probability of pest and disease occurrence. Introduce transfer learning, use pest and disease data from other crops or regions to pre-train the model and improve generalization ability; S4.6. Image processing and data analysis tasks are abstracted into task nodes. Each node contains the computational load and required resource attributes. Genetic algorithm optimization is performed. The steps are as follows: Randomly generate a set of task allocation schemes; Select outstanding individuals based on task completion time and resource consumption evaluation indicators; Generate new individuals by exchanging some task nodes and randomly changing the order of task execution; When the optimal solution of the population no longer changes significantly, the optimal task allocation plan is output; S4.7. Use the RLlib reinforcement learning framework to define the state as the current system resource status and the length of the task queue, the action as the choice of which task to execute, and the reward function as the weighted sum of task completion efficiency and resource utilization.
[0011] Preferably, the implementation steps of step S5 are: S5.1. Construct a multi-layer convolutional neural network with crop images obtained by drone inspection as input and pest types and locations as output. Introduce an attention mechanism to improve the model's attention to pest areas, and use a transfer learning pre-training model to reduce training time and improve recognition accuracy. S5.2. Use gated recurrent units to process meteorological data time series, predict future temperature and humidity trends, introduce sequence-to-sequence models, and improve long-term prediction capabilities; S5.3. Use principal component analysis to reduce the dimensionality of high-dimensional features and extract key information. Through multimodal learning, image features are integrated with time series features to improve the model's comprehensive understanding of the crop growth environment.
[0012] Preferably, the implementation steps of step S6 are: S6.1. Establish a VPN tunnel to build a data security transmission mechanism; S6.2. Use SparkMLlib for large-scale data analysis; S6.3. Use Hadoop or Spark to store and process massive amounts of data, and use AWS or Azure to provide computing and storage resources.
[0013] Preferably, the implementation steps of step S7 are: S7.1. Use TLS / SSL protocol to encrypt the data transmission in step S1 to step S6; S7.2. Use homomorphic encryption techniques to allow analysis in an encrypted state; S7.3. Deploy Fortinet or CheckPoint security solutions; S7.4. Use Ethereum or Hyperledger to record data transactions and ensure that the blockchain ensures that the data cannot be tampered with.
[0014] Preferably, the implementation steps of step S8 are: S8.1. Use R language to construct a cost-benefit analysis table, including the input costs of sensor purchase and cloud service fees, and the output benefits of increased crop yields and reduced pest control costs; S8.2. Apply the non-dominated sorting genetic algorithm-II for multi-objective optimization. The objective functions include minimizing cost, maximizing yield, and minimizing environmental impact. Fuzzy mathematical methods are introduced to deal with uncertain factors such as crop market price fluctuations and the probability of pests and diseases. S8.3. Based on the optimization results, adjust the sensor deployment density, data collection frequency, and cloud service resource configuration to maximize cost-effectiveness. Introduce a dynamic programming algorithm to dynamically adjust the resource allocation strategy based on seasonal changes and crop growth cycle factors.
[0015] Preferably, the implementation steps of step S9 are: S9.1. Use Coursera and edX platforms to share technical documents and cases; S9.2. Build an open source community and share code and experience in GitHub and StackOverflow communities; S9.3. Encourage team collaborative learning through community learning algorithms.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention realizes the real-time integration and efficient processing of data, which not only eliminates the data island phenomenon, but also greatly reduces the data transmission delay and the burden on the central server, and solves the problems of poor data correlation, large processing delay, high resource consumption and lack of real-time performance in traditional solutions. At the same time, the present invention uses deep learning and convolutional neural networks to build an efficient model to process multidimensional data, and through multimodal learning and feature fusion technology, it realizes the effective association and integration of data from different sources and types, overcoming the problems of insufficient model complexity and accuracy, limited computing resources and difficult data fusion in traditional solutions.
[0017] 2. The present invention also comprehensively considers various factors and dynamic changes in agricultural production by constructing a dynamic cost-benefit analysis model, and applies multi-objective optimization algorithms and dynamic programming techniques to achieve optimization of resource allocation and maximization of long-term benefits. In addition, by introducing fuzzy mathematics methods to deal with uncertain factors, the robustness and reliability of the analysis are improved, solving the problems of lack of dynamics, incomplete consideration of factors and limited optimization means in traditional solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The flowchart of the method for dynamic perception and scheduling of agricultural data based on the Internet of Things of the present invention is shown. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] See also Figure 1 The present invention proposes a method for dynamic perception and scheduling of agricultural data based on the Internet of Things. The method is implemented based on an Internet of Things sensor, an edge computing platform, and an edge server, and includes the following steps: S1. Deploy IoT sensors including weather stations, soil moisture monitors, and drone inspection systems; It should be noted that the implementation steps of step S1 are: S1.1. Select a suitable location to install a weather station to monitor temperature, humidity, and wind speed. The data collection frequency is set to collect data once every minute; S1.2. Install soil moisture sensors at different depths in the farmland, and set the data collection cycle to collect data once every hour; S1.3. Deploy the drone inspection system, set the drone flight route and shooting frequency, collect image data and perform compression processing; S1.4. Use MQTT protocol to transmit data to the central server and unify data representation in JSON format; S1.5. Use the Pandas library to remove invalid or outliers and standardize the data through normalization.
[0021] S2. Deploy real-time data processing modules on edge servers through edge computing platforms; It should be noted that the implementation steps of step S2 are: S2.1. Deploy edge servers, select AWS Greengrass or Azure IoT Edge as the edge computing platform, and install and configure the edge computing environment; S2.2. Outlier detection and setting thresholds to identify outliers; S2.3. Use TensorFlowLite to deploy lightweight models for preliminary identification of crop pests and diseases; S2.4. Manage the lifecycle of tasks through the edge computing platform, including deployment, update, and withdrawal.
[0022] S3. Integrate data from different IoT sensors to establish and continuously strengthen the perception layer; It should be noted that the implementation steps of step S3 are: S3.1. Receive data from each sensor to the central processing unit and use KafkaStreams or Flink to process real-time data streams; S3.2. Perform state estimation and continuous equation update through Kalman filter algorithm; S3.3. Combine uncertain information from multiple sources to calculate trust; S3.4. Dynamically adjust weights according to data quality and output fusion results.
[0023] S4. Construct an optimization analysis layer including a data access layer, a data analysis layer, and a result output layer, clean the data obtained from the perception layer and extract soil moisture, temperature, and light intensity characteristics, then use machine learning algorithms to perform pattern recognition on the extracted crop growth cycle identification and pest and disease warning characteristics, and perform task allocation and scheduling in the optimization analysis layer; It should be noted that the implementation steps of step S4 are: S4.1. Use the API interface to receive data from the perception layer and ensure that the data format is unified in JSON or XML for subsequent processing; S4.2. Use the Pandas library combined with custom cleaning rules to remove null values, duplicate values, and outliers. For outliers, use the boxplot method or Z-score method to identify and replace them with the mean or median. S4.3. Directly read the sensor value as the soil moisture feature, use the linear regression model to smooth the time series data, reduce the temperature feature noise, calculate the daily average value through the sliding window average method, and reduce the instantaneous fluctuation of the light intensity feature; S4.4. Use the random forest classifier to identify crop growth cycles. The input features are the soil moisture features, temperature features, and light intensity features of the time series in step S4.3. The outputs are the seedling, flowering, and mature growth stages. The time series segmentation method is introduced to subdivide the growth cycle into more detailed sub-stages. S4.5. Construct a support vector machine model, with the input being the soil moisture characteristics, temperature characteristics, light intensity characteristics and crop growth stage of the pest and disease historical data set, and the output being the probability of pest and disease occurrence. Introduce transfer learning, use pest and disease data from other crops or regions to pre-train the model and improve generalization ability; S4.6. Image processing and data analysis tasks are abstracted into task nodes. Each node contains the computational load and required resource attributes. Genetic algorithm optimization is performed. The steps are as follows: Randomly generate a set of task allocation schemes; Select outstanding individuals based on task completion time and resource consumption evaluation indicators; Generate new individuals by exchanging some task nodes and randomly changing the order of task execution; When the optimal solution of the population no longer changes significantly, the optimal task allocation plan is output; S4.7. Use the RLlib reinforcement learning framework to define the state as the current system resource status and the length of the task queue, the action as the choice of which task to execute, and the reward function as the weighted sum of task completion efficiency and resource utilization.
[0024] S5. Use deep learning for multidimensional spatial analysis; It should be noted that the implementation steps of step S5 are: S5.1. Construct a multi-layer convolutional neural network with crop images obtained by drone inspection as input and pest types and locations as output. Introduce an attention mechanism to improve the model's attention to pest areas, and use a transfer learning pre-training model to reduce training time and improve recognition accuracy. S5.2. Use gated recurrent units to process meteorological data time series, predict future temperature and humidity trends, introduce sequence-to-sequence models, and improve long-term prediction capabilities; S5.3. Use principal component analysis to reduce the dimensionality of high-dimensional features and extract key information. Through multimodal learning, image features are integrated with time series features to improve the model's comprehensive understanding of the crop growth environment.
[0025] S6. Securely transmit data to the cloud through VPN tunnel; It should be noted that the implementation steps of step S6 are: S6.1. Establish a VPN tunnel to build a data security transmission mechanism; S6.2. Use SparkMLlib for large-scale data analysis; S6.3. Use Hadoop or Spark to store and process massive amounts of data, and use AWS or Azure to provide computing and storage resources.
[0026] S7. Implement multi-layered security measures; It should be noted that the implementation steps of step S7 are: S7.1. Use TLS / SSL protocol to encrypt the data transmission in step S1 to step S6; S7.2. Use homomorphic encryption techniques to allow analysis in an encrypted state; S7.3. Deploy Fortinet or CheckPoint security solutions; S7.4. Use Ethereum or Hyperledger to record data transactions and ensure that the blockchain ensures that the data cannot be tampered with.
[0027] S8. Establish a cost-benefit analysis model; S9. Build an open source community through online learning platforms and establish an interdisciplinary communication and cooperation mechanism.
[0028] It should be noted that the implementation steps of step S8 are: S8.1. Use R language to construct a cost-benefit analysis table, including the input costs of sensor purchase and cloud service fees, and the output benefits of increased crop yields and reduced pest control costs; S8.2. Apply the non-dominated sorting genetic algorithm-II for multi-objective optimization. The objective functions include minimizing cost, maximizing yield, and minimizing environmental impact. Fuzzy mathematical methods are introduced to deal with uncertain factors such as crop market price fluctuations and the probability of pests and diseases. S8.3. Based on the optimization results, adjust the sensor deployment density, data collection frequency, and cloud service resource configuration to maximize cost-effectiveness. Introduce a dynamic programming algorithm to dynamically adjust the resource allocation strategy based on seasonal changes and crop growth cycle factors.
[0029] It should be noted that the implementation steps of step S9 are: S9.1. Use Coursera and edX platforms to share technical documents and cases; S9.2. Build an open source community and share code and experience in GitHub and StackOverflow communities; S9.3. Encourage team collaborative learning through community learning algorithms.
[0030] Example
[0031] See also Figure 1 ,In the specific application process, the above ,specifically, includes the following steps: (1)Deploy IoT sensors Choose a suitable location to install a weather station to monitor temperature, humidity, wind speed, etc. Set the frequency of data collection: for example, collect data once every minute; Its data format: {"sensor_id":"weather_station_1","timestamp":"2023-04-01T12:00:00","temperature": 20.5, "humidity": 60, "wind_speed": 5.4}; Among them, in this step, the above JSON format only represents a format and is not a fixed value. The meaning of each data in the above format is: sensor_id: unique identifier of the sensor, here "soil_moisture_1", indicating that this is the first soil moisture sensor; timestamp: the timestamp of the data record. Here, it is "2023-04-01T12:00:00", which means the data was recorded at 12:00:00 on April 1, 2023; depth: the soil depth measured by the sensor. Here "10cm" means the soil moisture is measured 10 centimeters underground. moisture: The soil moisture reading, here 45, usually this value will have a corresponding unit or range, such as percentage (%), indicating the relative size of the soil moisture. In this example, no unit is given directly, but we can assume that this is a percentage value, that is, the soil moisture is 45%; In summary, the above JSON format example means: at 12:00 on April 1, 2023, the first soil moisture sensor measured the soil moisture 10 cm underground, and the reading was 45% (assuming the unit is percentage), and the subsequent steps are similar; Install soil moisture sensors at different depths in the fields; Data collection cycle setting: For example, collection is done every hour; Its data format: {"sensor_id":"soil_moisture_1","timestamp":"2023-04-01T12:00:00", "depth": "10cm", "moisture": 45}; Set the drone flight route and shooting frequency; Collect image data and perform preliminary processing (such as compression); Image metadata: {"drone_id":"drone_1","timestamp":"2023-04-01T12:00:00", "location":{"lat": 34.0522, "lon": -118.2437}, "image_hash": "abc123..."}; Use MQTT protocol to transmit data to the central server, use JSON format to unify data representation for subsequent processing, and use Pandas library to remove invalid or abnormal values; cleaned_data = data.dropna().query('temperature > -50 & temperature <50') Normalization processing example code: normalized_data = (data - data.min()) / (data.max() - data.min()); It should also be noted that this step is data cleaning, specifically: cleaned_data=data.dropna().query('temperature>-50&temperature<50'); In the formula, data represents the original data set collected from sensors such as weather stations and soil moisture monitors. The dropna() method is used to remove missing values (NaN) in the data set. query('temperature>-50&temperature<50') is used to filter the records with temperature data within a reasonable range. Assume that we consider temperatures below -50°C or above 50°C to be invalid or abnormal; Assume that the data set data contains a temperature column T. Then the cleaned data set cleaned_data is the set of records that satisfy -50 < T < 50 and have no missing values; Data normalization expression: normalized_data=(data-data.min()) / (data.max()-data.min()), which is used to scale the data to the range [0,1]; In the formula, data represents the data set of temperature, humidity, and wind speed to be normalized. data.min() and data.max() represent the minimum and maximum values in the data set respectively; For the temperature data T, the normalized data T_normalized is: T_normalized=(T-T_min) / (T_max-T_min); Among them, T_min and T_max are the minimum and maximum values in the temperature data set respectively; (2). Edge computing platform deployment Select AWS Greengrass or Azure IoT Edge as the edge computing platform, and install and configure the edge computing environment; Use the Z-score algorithm example code: z_score = (x - μ) / σ, where x is the data point, μ is the mean, and σ is the standard deviation. Set the threshold as |z_score| > 3 to identify outliers; Use TensorFlow Lite to deploy a lightweight model for preliminary identification of crop pests and diseases; Simplified example code: prediction = model.predict(input_data). Manage the life cycle of tasks through the edge computing platform, including deployment, update, and revocation; (3). Data integration and fusion Receive data from each sensor to the central processing unit, and use Kafka Streams or Flink to process real-time data streams. State estimation example code: x_hat = A*x + B*u; In the formula, A is the state transfer matrix, x is the current state, B is the control matrix, and u is the control vector; The update equation is: P = (I - K*H)*P; In the formula, K is the Kalman gain, H is the observation matrix, and P is the covariance matrix. The multi-source uncertain information is combined to calculate the trust: m(A) = ∑(m1(A) * m2(B)); In the formula, A and B are events from different data sources, and the weights are dynamically adjusted according to the data quality: w_i = f(quality_i); Where quality_i is the quality index of the i-th data source, and the fusion result is: fused_data = ∑(w_i *data_i); (4) Build an optimized analysis layer and task allocation and scheduling (4.1) Data access and preprocessing (4.1.1) Data access layer Use RESTful API or GraphQL interface to receive data from the perception layer, and the data format is unified as JSON or XML; The received data include soil moisture (SM), temperature (Temp), light intensity (LI), etc. (4.1.2) Data cleaning Apply the Pandas library combined with custom cleaning rules; Remove empty values and duplicate values; Use the box plot method or Z-score method to identify outliers and replace them with the mean (μ_SM, μ_Temp, μ_LI) or median (M_SM, M_Temp, M_LI): if: |x_SM-μ_SM|>k_SM*σ_SM or Z_SM>threshold_S; Then x_SM'=μ_SM or M_SM; if: |x_Temp-μ_Temp|>k_Temp*σ_Temp or Z_Temp>threshold_Temp; Then x_Temp'=μ_Temp or M_Temp; If |x_LI-μ_LI|>k_LI*σ_LI or Z_LI>threshold_LI; Then x_LI'=μ_LI or M_LI; Among them, x_SM, x_Temp, x_LI are original data; μ_SM,μ_Temp,μ_LI are means; σ_SM,σ_Temp,σ_LI are standard deviations; k_SM, k_Temp, k_LI are constants; Z_SM, Z_Temp, Z_LI are Z-score values; threshold_SM,threshold_Temp,threshold_LI are the set thresholds; (4.1.3) Feature extraction Soil moisture (SM): directly read the sensor value SM=sensor_value_SM; Temperature (Temp): Use linear regression model to smooth time series data: Temp'=β0_Temp+β1_Temp*Temp+ϵ_Temp Light intensity (LI): The daily average value is calculated using the sliding window averaging method: LI'=(1 / N)*Σ(LI_i), where N is the size of the sliding window and LI_i is the light intensity value within the window; (4.2) Machine Learning and Pattern Recognition (4.2.1) Identification of crop growth cycle Using Random Forest Classifier: P(Y|X)=(1 / n)*Σ(T_i(X)) Where X=(Temp,SM,LI), Y is the growth stage, Ti(X) is the prediction result of the i-th decision tree, and n is the number of trees; A time series segmentation algorithm is introduced to subdivide the growth cycle into sub-stages; (4.2.2) Pest and disease early warning Construct SVM model: f(x)=Σ(α_i*K(x_i,x))+b Where x=(Temp,SM,LI,Growth_Stage), α_i is the Lagrange multiplier, K(x_i,x) is the Gaussian kernel function, and b is the bias term; Introducing transfer learning to pre-train models using data from other crops or regions; (4.3) Task allocation and scheduling (4.3.1) Task definition Abstract tasks such as image processing and data analysis into task nodes, each of which contains attributes such as the amount of calculation (Comp_Amount) and the required resources (Res_Req); (4.3.2) Genetic algorithm optimization Initialize the population: randomly generate a set of task allocation schemes; Select operation: Calculate fitness based on task completion time (Comp_Time) and resource consumption (Res_Util): Fitness=1 / Comp_Time*Res_Util; Crossover and mutation: Generate new individuals by exchanging some task nodes, randomly changing the order of task execution, etc. Convergence judgment: When the optimal solution of the population no longer changes significantly, the optimal task allocation solution is output; (4.3.3) Dynamic Scheduling Using the reinforcement learning framework RLlib, we define the state s as the current system resource state (Res_State), task queue length (Task_Queue_Len), etc. Action a is to choose which task to execute. The reward function r is the weighted sum of task completion efficiency and resource utilization. We introduce the Q-learning algorithm and iteratively update the Q value table: Q(s,a)←Q(s,a)+α[r+γ*max(Q(s',a'))-Q(s,a)] Among them, α is the learning rate and γ is the discount factor; (5) Deep learning multidimensional space analysis (5.1) Image recognition of crop pests and diseases (5.1.1).CNN model construction: Design a multi-layer convolutional neural network: Y = σ(W⋅X+b); Among them, W is the convolution kernel weight, X is the input image, b is the bias term, σ is the ReLU activation function, and Y is the output of the pest type and location. The attention mechanism is introduced to improve the model's attention to the pest area, and the transfer learning ResNet and VGG pre-trained models are used; (5.1.2) Meteorological data time series forecasting RNN Model: Use LSTM or GRU to process meteorological data time series: h t =σ(W h ⋅h t−1 +W x ⋅x t ); Among them, ht is the hidden layer state, xt is the input sequence, Wh and Wx are weight matrices, σ is the tanh activation function, and the sequence-to-sequence (Seq2Seq) model is introduced to improve the long-term prediction ability; (5.3) Feature extraction and fusion: Use Autoencoder or PCA to reduce the dimensionality of high-dimensional features, and fuse image features with time series features through multimodal learning; (6) Secure transmission and big data processing Establish a secure VPN tunnel to ensure data transmission security, use Spark MLlib for large-scale data analysis, distributed training sample code: model = distributed_train(data, model_config), use Hadoop or Spark to store and process massive data, and use AWS or Azure to provide computing and storage resources; (7) Safety measures Use TLS / SSL protocol to encrypt data transmission, use homomorphic encryption technology to allow analysis in an encrypted state, homomorphic addition sample code: Enc(a + b) = Enc(a) ⊕ Enc(b), deploy security solutions such as Fortinet or Check Point, and use Ethereum or Hyperledger to record data transactions; (8) Cost-benefit analysis model (8.1) Model construction Use Excel or R language to construct a cost-benefit analysis table. The input cost includes the sensor purchase cost (C_sensor) and cloud service fee (C_cloud). The output benefit includes the increase in crop yield (B_yield) and the reduction in pest control cost (B_pest). (8.2) Multi-objective optimization Apply NSGA-II algorithm for multi-objective optimization: Fitness=Σ(w_i*f_i(x)) ; Among them, w_i is the weight of the i-th objective, f_i(x) is the i-th objective function, including cost, output, and environmental impact; Fuzzy mathematics methods are introduced to deal with uncertain factors, including crop market price fluctuations (P_fluct) and the probability of pests and diseases (Prob_pest); (8.3) Resource optimization configuration According to the optimization results, the sensor deployment density (Density_sensor), data collection frequency (Freq_data), and cloud service resource configuration (Config_cloud) are adjusted. The dynamic programming algorithm is introduced to dynamically adjust the resource configuration strategy according to factors such as seasonal changes (Season) and crop growth cycle (Growth_stage); Define the state: S_t=(Season,Growth_stage,Resource_level); Decision variables: D_t=(Deploy_decision,Freq_decision,Cloud_decision); State transfer equation: S_{t+1}=f(S_t,D_t); The objective function is to maximize long-term benefits: maxΣ(TB-TC); Among them, TB is the total output benefit, TC is the total input cost; (9) Establish an open source community and communication mechanism Use platforms such as Coursera and edX to share technical documents and cases, share codes and experiences in communities such as GitHub and Stack Overflow, organize offline technical training, seminars and hackathon activities, encourage team collaborative learning, improve team capabilities, and learn sample codes in the community: team_knowledge = ∑(individual_knowledge_i), where i is the team member.
[0032] Through the above steps, the agricultural data dynamic perception and scheduling method based on the Internet of Things of the present invention can overcome the shortcomings of traditional agricultural data perception and scheduling methods, improve the intelligence, automation and refinement level of agricultural production, and bring significant economic and social benefits to agricultural production.
[0033] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for dynamic perception and scheduling of agricultural data based on the Internet of Things, which is implemented based on Internet of Things sensors, edge computing platforms and edge servers, and is characterized in that: The following steps are involved: S1. Deploy IoT sensors including weather stations, soil moisture monitors, and drone inspection systems; S2. Deploy real-time data processing modules on edge servers through edge computing platforms; S3. Integrate data from different IoT sensors to establish and continuously strengthen the perception layer; S4. Construct an optimization analysis layer including a data access layer, a data analysis layer, and a result output layer, clean the data obtained from the perception layer and extract soil moisture, temperature, and light intensity characteristics, then use machine learning algorithms to perform pattern recognition on the extracted crop growth cycle identification and pest and disease warning characteristics, and perform task allocation and scheduling in the optimization analysis layer; S5. Use deep learning for multidimensional spatial analysis; S6. Securely transmit data to the cloud through VPN tunnel; S7. Implement multi-layered security measures; S8. Establish a cost-benefit analysis model; S9. Build an open source community through online learning platforms and establish an interdisciplinary communication and cooperation mechanism.
2. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 1 is characterized in that: The implementation steps of step S1 are: S1.
1. Select a suitable location to install a weather station to monitor temperature, humidity, and wind speed. The data collection frequency is set to collect data once every minute; S1.
2. Install soil moisture sensors at different depths in the farmland, and set the data collection cycle to collect data once every hour; S1.
3. Deploy the drone inspection system, set the drone flight route and shooting frequency, collect image data and perform compression processing; S1.
4. Use MQTT protocol to transmit data to the central server and unify data representation in JSON format; S1.
5. Use the Pandas library to remove invalid or outliers and standardize the data through normalization.
3. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 2 is characterized in that: The implementation steps of step S2 are: S2.
1. Deploy edge servers, select AWS Greengrass or Azure IoT Edge as the edge computing platform, and install and configure the edge computing environment; S2.
2. Outlier detection and setting thresholds to identify outliers; S2.
3. Use TensorFlowLite to deploy lightweight models for preliminary identification of crop pests and diseases; S2.
4. Manage the lifecycle of tasks through the edge computing platform, including deployment, update, and withdrawal.
4. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 3 is characterized in that: The implementation steps of step S3 are: S3.
1. Receive data from each sensor to the central processing unit and use KafkaStreams or Flink to process real-time data streams; S3.
2. Perform state estimation and continuous equation update through Kalman filter algorithm; S3.
3. Combine uncertain information from multiple sources to calculate trust; S3.
4. Dynamically adjust weights according to data quality and output fusion results.
5. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 4 is characterized in that: The implementation steps of step S4 are: S4.
1. Use the API interface to receive data from the perception layer and ensure that the data format is unified in JSON or XML for subsequent processing; S4.
2. Use the Pandas library combined with custom cleaning rules to remove null values, duplicate values, and outliers. For outliers, use the boxplot method or Z-score method to identify and replace them with the mean or median. S4.
3. Directly read the sensor value as the soil moisture feature, use the linear regression model to smooth the time series data, reduce the temperature feature noise, calculate the daily average value through the sliding window average method, and reduce the instantaneous fluctuation of the light intensity feature; S4.
4. Use the random forest classifier to identify crop growth cycles. The input features are the soil moisture features, temperature features, and light intensity features of the time series in step S4.
3. The outputs are the seedling, flowering, and mature growth stages. The time series segmentation method is introduced to subdivide the growth cycle into more detailed sub-stages. S4.
5. Construct a support vector machine model, with the input being the soil moisture characteristics, temperature characteristics, light intensity characteristics and crop growth stage of the pest and disease historical data set, and the output being the probability of pest and disease occurrence. Introduce transfer learning, use pest and disease data from other crops or regions to pre-train the model and improve generalization ability; S4.
6. Image processing and data analysis tasks are abstracted into task nodes. Each node contains the computational load and required resource attributes. Genetic algorithm optimization is performed. The steps are as follows: Randomly generate a set of task allocation schemes; Select outstanding individuals based on task completion time and resource consumption evaluation indicators; Generate new individuals by exchanging some task nodes and randomly changing the order of task execution; When the optimal solution of the population no longer changes significantly, the optimal task allocation plan is output; S4.
7. Use the RLlib reinforcement learning framework to define the state as the current system resource status and the length of the task queue, the action as the choice of which task to execute, and the reward function as the weighted sum of task completion efficiency and resource utilization.
6. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 5 is characterized in that: The implementation steps of step S5 are: S5.
1. Construct a multi-layer convolutional neural network with crop images obtained by drone inspection as input and pest types and locations as output. Introduce an attention mechanism to improve the model's attention to pest areas, and use a transfer learning pre-training model to reduce training time and improve recognition accuracy. S5.
2. Use gated recurrent units to process meteorological data time series, predict future temperature and humidity trends, introduce sequence-to-sequence models, and improve long-term prediction capabilities; S5.
3. Use principal component analysis to reduce the dimensionality of high-dimensional features and extract key information. Through multimodal learning, image features are integrated with time series features to improve the model's comprehensive understanding of the crop growth environment.
7. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 6 is characterized in that: The implementation steps of step S6 are: S6.
1. Establish a VPN tunnel to build a data security transmission mechanism; S6.
2. Use SparkMLlib for large-scale data analysis; S6.
3. Use Hadoop or Spark to store and process massive amounts of data, and use AWS or Azure to provide computing and storage resources.
8. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 7 is characterized in that: The implementation steps of step S7 are: S7.
1. Use TLS / SSL protocol to encrypt the data transmission in step S1 to step S6; S7.
2. Use homomorphic encryption techniques to allow analysis in an encrypted state; S7.
3. Deploy Fortinet or CheckPoint security solutions; S7.
4. Use Ethereum or Hyperledger to record data transactions and ensure that the blockchain ensures that the data cannot be tampered with.
9. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 8 is characterized in that: The implementation steps of step S8 are: S8.
1. Use R language to construct a cost-benefit analysis table, including the input costs of sensor purchase and cloud service fees, and the output benefits of increased crop yields and reduced pest control costs; S8.
2. Apply the non-dominated sorting genetic algorithm-II for multi-objective optimization. The objective functions include minimizing cost, maximizing yield, and minimizing environmental impact. Fuzzy mathematical methods are introduced to deal with uncertain factors such as crop market price fluctuations and the probability of pests and diseases. S8.
3. Based on the optimization results, adjust the sensor deployment density, data collection frequency, and cloud service resource configuration to maximize cost-effectiveness. Introduce a dynamic programming algorithm to dynamically adjust the resource allocation strategy based on seasonal changes and crop growth cycle factors.
10. The method for dynamic perception and scheduling of agricultural data based on the Internet of Things according to claim 9 is characterized in that: The implementation steps of step S9 are: S9.
1. Use Coursera and edX platforms to share technical documents and cases; S9.
2. Build an open source community and share code and experience in GitHub and StackOverflow communities; S9.
3. Encourage team collaborative learning through community learning algorithms.
Citation Information
Cited By
Intelligent land survey data real-time processing system and method based on edge calculation
CN120278524A
Low-altitude logistics distribution decision-making method and system based on multi-source data fusion
CN121526465A
A low-altitude logistics distribution decision-making method and system based on multi-source data fusion
CN121526465B
Real-time detection and three-dimensional perception reconstruction inspection method, system and equipment for agriculture and forestry assets
CN122492105A