Livestock manure field application environmental risk dynamic monitoring and grade evaluation system
Patent Information
- Application Number
- CN202610450474.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-07
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-04-07
AI Technical Summary
这类方法忽略了各风险因子之间的非线性耦合作用,例如降雨与土壤质地对污染物迁移的协同影响、运输车辆与敏感点距离的动态变化与粪污成分的联合作用等
第一,本发明通过构建基于数字孪生的虚拟地理场景,实现了物理世界与信息世界的高保真实时同步。数字孪生虚拟地理场景构建模块将静态基础地理数据与物联网感知设备采集的动态实时数据深度融合,按照固定频率导出包含运输车辆状态、地块状态和环境敏感点状态的场景快照数据包。该场景不仅为后续风险因子提取提供了统一时空基准的数据源,还支持历史时刻的场景回溯与多视角可视化展示,使环境管理人员能够直观掌握区域风险态势,显著提升了监管的直观性和便捷性。
Smart Images

Figure CN122347332B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of agricultural non-point source pollution control technology and data processing technology, specifically to a dynamic monitoring and grading system for environmental risks of livestock and poultry manure returning to the field. Background Technology
[0002] With the increasing scale and intensification of livestock and poultry farming, the amount of livestock and poultry manure produced has increased dramatically. Returning manure to the fields, as a mainstream resource-based treatment method, can reuse nutrients such as nitrogen, phosphorus, and potassium in manure for farmland, achieving resource recycling of waste. However, if excessive amounts are applied, the timing is inappropriate, or leaks occur during transportation, it can lead to serious non-point source pollution problems such as excessive accumulation of soil nutrients, groundwater nitrate nitrogen pollution, and eutrophication of surface water bodies.
[0003] Currently, environmental monitoring of livestock and poultry manure returning to farmland mainly relies on manual sampling and simple GPS tracking. Manual sampling typically involves monthly or quarterly sampling and analysis of soil and groundwater, a method with significant time lag, failing to promptly detect ongoing pollution risks. GPS tracking only records the transport vehicle's route, making it difficult to determine if there are leaks along the way or if the application rate exceeds environmental carrying capacity. While some IoT-based online monitoring methods have emerged, they usually only collect data from a single type of sensor, failing to effectively integrate multi-dimensional spatiotemporal information such as transport operation dynamics, soil conditions, meteorological conditions, and the distribution of environmentally sensitive points.
[0004] Regarding risk assessment models, existing technologies mostly employ simple logical judgment methods based on thresholds, such as setting a maximum single application rate or a minimum safe distance from a river, triggering an early warning when the monitored value exceeds the threshold. These methods neglect the nonlinear coupling effects between various risk factors, such as the synergistic impact of rainfall and soil texture on pollutant migration, and the combined effects of dynamic changes in the distance between transport vehicles and sensitive points and the composition of fecal matter. Because they cannot uncover the complex risk evolution patterns under the coupling of multiple factors, the assessment accuracy is low, and the false alarm and false negative rates are high, making it difficult to provide accurate and reliable decision-making basis for environmental management departments.
[0005] To address the aforementioned issues, there is an urgent need for a dynamic monitoring and grading system for the environmental risks of livestock and poultry manure returning to the fields, which can solve the problems associated with traditional methods. Summary of the Invention
[0006] The purpose of this invention is to provide a dynamic monitoring and grading system for environmental risks of livestock and poultry manure returning to the field. This system enables dynamic assessment and precise source tracing of risks throughout the entire process of manure returning to the field. Through the deep integration of digital twins and improved graph attention networks, the accuracy and interpretability of the assessment are significantly improved.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A dynamic monitoring and grading system for environmental risks of livestock and poultry manure returning to fields includes: The digital twin virtual geographic scene construction module is used to acquire static basic geographic data of the target area and deploy IoT sensing devices to collect dynamic real-time data. After preprocessing the static basic geographic data and dynamic real-time data, a digital twin virtual geographic scene synchronized with the physical world in real time is constructed based on the game engine and the 3D geographic information system platform. The digital twin virtual geographic scene exports scene snapshot data packages including the status sets of transport vehicles, the status sets of land parcels, and the status sets of environmentally sensitive points at a fixed frequency. The multi-source spatiotemporal risk impact factor extraction module is connected to the digital twin virtual geographic scene construction module. It is used to receive scene snapshot data packets, extract transportation risk chain factors from the transportation vehicle status set and construct a transportation risk chain feature matrix, extract application risk chain factors from the land parcel status set and construct an application risk chain feature matrix, extract environmental background factors from the environmental sensitive point status set and static basic geographic data and construct an environmental background feature matrix, calculate spatial impact weights based on the spatial distance between vehicles and land parcels, perform spatial weighted aggregation of transportation risk chain factors to obtain the transportation risk aggregation vector associated with each land parcel, and concatenate the application risk chain factors, environmental background factors and transportation risk aggregation vector of each land parcel to form a multi-source spatiotemporal risk impact factor tensor. The spatiotemporal risk coupling model module is connected to the multi-source spatiotemporal risk impact factor extraction module. The spatiotemporal risk coupling model module is deployed with a pre-trained feature differential graph attention network. The feature differential graph attention network includes a node feature importance module and an enhanced graph attention layer module. The node feature importance module is used to adaptively weight the features of each dimension inside each node in the input feature tensor. The enhanced graph attention layer module is used to aggregate neighbor node information and update node representation. The feature differential graph attention network receives the multi-source spatiotemporal risk impact factor tensor and outputs the environmental risk index of each plot. The dynamic risk level assessment and source tracing module is connected to the spatiotemporal risk coupling model module. It is used to classify risk levels according to the environmental risk index to obtain risk level labels, and to calculate the contribution of feature factors and risk propagation using the feature attention coefficients and edge attention weights generated by the intermediate layer of the feature-differentiated graph attention network. It generates source tracing information containing the main risk factors and the neighbors of the main risk sources, and outputs the final risk assessment result data package.
[0008] Furthermore, the digital twin virtual geographic scene construction module includes a static data preprocessing unit, a dynamic data acquisition unit, and a data preprocessing unit; The static data preprocessing unit performs depression filling and flow direction analysis on the acquired digital elevation model data to generate depression-free digital elevation model data, performs geometric fine correction and fusion processing on remote sensing images, rasterizes soil type vector data to generate soil attribute parameter raster map with the same grid spacing as the digital elevation model data, and converts the vector surface data of water system, water source protection area and settlement into raster distance field to calculate the distance from the center point of each raster to the nearest river, the distance to the boundary of the nearest water source protection area and the distance to the nearest settlement. The dynamic data acquisition unit specifically includes: The first type of equipment deployed on sewage transport vehicles includes a Beidou dual-mode positioning module, vehicle-mounted weighing sensors, near-infrared sensors for sewage composition, and tank sealing pressure sensors. The second type of equipment deployed on land returned to its original state includes soil multi-parameter sensors and miniature weather stations; Category III equipment, including AI cameras, is deployed at the exit of manure treatment centers and the entrances of land return plots. All sensor data is transmitted to the central cloud platform via in-vehicle intelligent terminals or field gateways using message queue telemetry transmission protocols or long-distance low-power wide area network protocols.
[0009] The data preprocessing unit uses the Kalman filter algorithm to denoise and smooth the GPS trajectory data to obtain the smoothed position, uses the moving average filter to obtain the smoothed weight for the vehicle weighing data, uses the linear interpolation method to fill missing values for the sensor time series data, calculates the distance from the vehicle to the nearest river and the distance to the nearest water source protection area boundary based on the smoothed position, accumulates the single application amount for each unloading of the plot to obtain the cumulative application amount for the plot, and calculates the nitrogen and phosphorus surplus in the plot soil.
[0010] Furthermore, the transportation risk chain factors include the vehicle's real-time location longitude and latitude, instantaneous speed, real-time remaining weight, airtightness status indicator, distance to the nearest river, distance to the nearest water source protection zone boundary, distance to the nearest settlement, total nitrogen content of sewage, total phosphorus content of sewage, and moisture content of sewage.
[0011] Furthermore, the application risk chain factors include soil volumetric moisture content, soil nitrate nitrogen content, soil available phosphorus content, cumulative application amount per plot, soil nitrogen and phosphorus surplus, cumulative rainfall in the next 24 hours, maximum hourly rainfall intensity in the next 24 hours, and plot topographic slope.
[0012] Furthermore, the environmental background factors include soil saturated hydraulic conductivity, soil texture classification index, groundwater level depth, distance of the plot from the nearest water source protection area, and density of sensitive points around the plot.
[0013] Furthermore, the enhanced graph attention layer module of the feature-differentiated graph attention network adopts a multi-head attention mechanism. The first graph attention layer sets the number of attention heads K1=8, the input dimension 23, and the output dimension 64. The second graph attention layer sets the number of attention heads K2=4, the input dimension 64, and the output dimension 32. Skip connections are introduced after each graph attention layer. Finally, the 32-dimensional node representation is mapped to a 1-dimensional environmental risk index through a fully connected output layer.
[0014] Furthermore, the spatiotemporal risk coupling model module is trained using a weighted cross-entropy loss function.
[0015] Furthermore, the dynamic risk level assessment and tracing module generates a dynamic risk map in the digital twin virtual geographic scene, renders the surface of the plots in different colors according to the risk level, displays the risk index value floating above the plots, and allows users to view a detailed tracing information list containing the contribution of major risk factors and the propagation contribution of major neighboring plots by clicking on the plot.
[0016] In summary, the present invention has at least one of the following beneficial technical effects: First, this invention achieves high-fidelity real-time synchronization between the physical and information worlds by constructing a virtual geographic scene based on digital twins. The digital twin virtual geographic scene construction module deeply integrates static basic geographic data with dynamic real-time data collected by IoT sensing devices, exporting scene snapshot data packages containing the status of transport vehicles, land parcels, and environmentally sensitive points at a fixed frequency. This scene not only provides a unified spatiotemporal benchmark data source for subsequent risk factor extraction but also supports historical scene retrospectives and multi-view visualization, enabling environmental management personnel to intuitively grasp the regional risk situation and significantly improving the intuitiveness and convenience of supervision.
[0017] Secondly, this invention comprehensively characterizes the environmental risks of manure application to the field from three dimensions: transportation operations, application to the field, and environmental background, through a multi-source spatiotemporal risk impact factor extraction module. The extracted transportation risk chain factors include real-time vehicle location, speed, remaining weight, airtightness, distance to various sensitive points, and manure component content, comprehensively covering the risk of leakage and spillage that may occur during transportation. Application risk chain factors include soil moisture and nutrient content, cumulative application amount, nitrogen and phosphorus surplus, rainfall forecast, and terrain slope, accurately reflecting the direct pressure of manure application on soil and groundwater. Environmental background factors include soil hydraulic conductivity, texture type, groundwater level depth, distance to water source protection areas, and density of sensitive points, characterizing the sensitivity and buffering capacity of the regional environmental system to pollution. By using a spatial weighted aggregation method to correlate transportation risks with different plots, the dynamic quantification of source-sink relationships is achieved, overcoming the shortcomings of traditional methods that separately assess transportation and manure application.
[0018] Third, the feature-differentiated graph attention network proposed in this invention possesses significant technological advantages. The node feature importance module adaptively assigns differentiated weights to features within each dimension of a node by calculating global and local bias scores, enabling the model to automatically focus on key risk factors that deviate from the norm, avoiding the blindness and subjectivity of manual feature selection. The enhanced graph attention layer module introduces prior knowledge of edge weights based on the traditional graph attention mechanism, incorporating spatial distance information into the calculation of attention coefficients, thus explicitly modeling the impact of geographical proximity on risk propagation. The design of multi-head attention mechanisms and skip connections enhances the model's expressive power and training stability, effectively alleviating the oversmoothing problem in deep networks. This network structure can deeply explore the nonlinear coupling relationships of multiple risk factors in high-dimensional space, capturing the propagation path of risk along the spatial graph structure, significantly improving the accuracy and reliability of risk assessment.
[0019] Fourth, this invention transforms continuous risk indices into discrete levels with clear management significance through a dynamic risk level assessment and source tracing module. The grading threshold setting method based on the cumulative distribution of historical data provides statistical basis and adaptability for level classification, allowing for dynamic adjustment according to changes in regional environmental capacity. The source tracing analysis function uses node feature attention coefficients to calculate the contribution of each risk factor and edge attention weights to trace the main neighboring plots of risk propagation, achieving transparency and interpretability of the assessment results. Environmental managers can not only identify which plots are in a high-risk state but also clearly identify the key driving factors leading to high risk and the direction of risk sources, providing a scientific basis for precise policy implementation.
[0020] Fifth, the dynamic risk map generated by this invention in a digital twin scenario intuitively displays the risk distribution across the entire region, making the risk situation readily apparent through color coding and floating numerical values. The automatically generated daily risk assessment report summarizes the risk overview, evolution trends, and statistics of key driving factors, providing data support for environmental regulatory departments to formulate medium- and long-term management strategies. The data interfaces between the system's modules are clear, and the output results are stored in a structured manner, facilitating integration with other environmental management information systems and demonstrating good scalability and compatibility. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0023] like Figure 1 As shown, this invention provides a dynamic monitoring and assessment system for the environmental risks of livestock and poultry manure returned to the field, comprising: The digital twin virtual geographic scene construction module is used to acquire static basic geographic data of the target area and deploy IoT sensing devices to collect dynamic real-time data. After preprocessing the static basic geographic data and dynamic real-time data, a digital twin virtual geographic scene synchronized with the physical world in real time is constructed based on the game engine and the 3D geographic information system platform. The digital twin virtual geographic scene exports scene snapshot data packages including the status sets of transport vehicles, the status sets of land parcels, and the status sets of environmentally sensitive points at a fixed frequency. The multi-source spatiotemporal risk impact factor extraction module is connected to the digital twin virtual geographic scene construction module. It is used to receive scene snapshot data packets, extract transportation risk chain factors from the transportation vehicle status set and construct a transportation risk chain feature matrix, extract application risk chain factors from the land parcel status set and construct an application risk chain feature matrix, extract environmental background factors from the environmental sensitive point status set and static basic geographic data and construct an environmental background feature matrix, calculate spatial impact weights based on the spatial distance between vehicles and land parcels, perform spatial weighted aggregation of transportation risk chain factors to obtain the transportation risk aggregation vector associated with each land parcel, and concatenate the application risk chain factors, environmental background factors and transportation risk aggregation vector of each land parcel to form a multi-source spatiotemporal risk impact factor tensor. The spatiotemporal risk coupling model module is connected to the multi-source spatiotemporal risk impact factor extraction module. The spatiotemporal risk coupling model module is deployed with a pre-trained feature differential graph attention network. The feature differential graph attention network includes a node feature importance module and an enhanced graph attention layer module. The node feature importance module is used to adaptively weight the features of each dimension inside each node in the input feature tensor. The enhanced graph attention layer module is used to aggregate neighbor node information and update node representation. The feature differential graph attention network receives the multi-source spatiotemporal risk impact factor tensor and outputs the environmental risk index of each plot. The dynamic risk level assessment and source tracing module is connected to the spatiotemporal risk coupling model module. It is used to classify risk levels according to the environmental risk index to obtain risk level labels, and to calculate the contribution of feature factors and risk propagation using the feature attention coefficients and edge attention weights generated by the intermediate layer of the feature-differentiated graph attention network. It generates source tracing information containing the main risk factors and the neighbors of the main risk sources, and outputs the final risk assessment result data package.
[0024] The specific methods executed by each module will be explained in detail below: 1. Construct a virtual geographic scene for returning manure to the field based on the digital twin virtual geographic scene construction module, specifically as follows: (1) Acquisition and preprocessing of static basic geographic scene data Static basic geographic scenes provide spatial positioning and background information, including topography, hydrological network, soil type, and distribution of sensitive targets.
[0025] Acquire the following basic geographic data for the target area: First, digital elevation model (DEM) data, using a high-precision DEM with a 5-meter grid spacing, derived from UAV aerial photogrammetry or lidar point cloud data provided by surveying departments, used to extract terrain slope, aspect, and runoff accumulation. Second, high-resolution remote sensing imagery, using 0.5-meter resolution aerial or satellite imagery, used to identify land parcel boundaries, village settlements, and linear features such as ditches and roads. Third, spatial data of soil types, using a 1:50,000 soil survey vector map, with attribute fields including soil name, texture classification (i.e., sand content, silt content, clay content), organic matter content, and saturated hydraulic conductivity (K). s The unit is millimeters per hour. Fourth, hydrogeological data, including river and lake vector surface data, groundwater isohyetal data, and vector surface data of centralized drinking water source protection areas.
[0026] The aforementioned multi-source heterogeneous data underwent preprocessing. All vector and raster data were uniformly converted to the CGCS2000 National Geodetic Coordinate System, with a Gauss-Kruger 3-degree projection. Depression filling and flow direction analysis were performed on the digital elevation model data to generate depression-free digital elevation model data. This represents the digital elevation model (DEM) data after depression filling. Geometric correction, fusion, and color balancing of the remote sensing imagery are performed to ensure accurate registration between the imagery and the DEM data. Soil type vector data is rasterized to generate a soil type distribution raster map and raster maps of various soil attribute parameters with the same grid spacing as the DEM data. Vector surface data for water systems, water source protection areas, and settlements are converted into raster distance fields, and the distance from the center point of each raster to the nearest river is calculated. Distance to the nearest water source protection area boundary and distance to the nearest settlement , This represents the distance from the center of the grid to the nearest river. This indicates the distance from the center point of the grid to the nearest water source protection zone boundary. This represents the distance from the grid center point to the nearest settlement, in meters. This preprocessing process is executed automatically using a geospatial data abstraction library and the ArcPy script toolchain, outputting a basic geographic raster dataset with a unified spatial reference and uniform grid size.
[0027] (2) Dynamic real-time data sensing and acquisition Dynamic real-time data reflects the instantaneous status of manure transportation and return to the field, and is collected by deploying IoT sensing layer devices.
[0028] The first type of equipment is deployed on sewage transport vehicles. It includes the following components: a BeiDou dual-mode positioning module, model UM980, with a sampling frequency of 1 Hz, and output data including longitude (Lng). v Latitude v Instantaneous velocity v v The units are kilometers per hour, heading angle, and positioning status. The vehicle-mounted load cell is a pin-type load cell with a range of 0 to 20 tons and an accuracy of 0.5%, collecting the real-time weight (W) of the remaining waste in the tank. t The unit is tons, and the weight loss during each unloading is recorded by the on-board controller as the single application amount. The unit is tons. A near-infrared sensor for manure composition is installed in the unloading port pipeline of the transport vehicle. Utilizing transmission near-infrared spectroscopy technology, it automatically scans during each unloading and outputs the total nitrogen content of the manure in real time. The unit is milligrams per liter, total phosphorus content The units are milligrams per liter and water content. The unit is a percentage. A tank sealing pressure sensor monitors the internal pressure; when the pressure drop rate exceeds a threshold of 10 Pa per second, a sealing anomaly is detected. All vehicle-mounted sensor data is integrated through an onboard intelligent terminal and transmitted to the central cloud platform per second via message queue telemetry transmission protocol using fourth-generation and fifth-generation mobile communication technology.
[0029] The second type of equipment is deployed inside the returned-to-field plots. It includes the following components: a multi-parameter soil sensor, employing a soil temperature and humidity sensor based on the frequency domain reflectometry method and a soil nitrogen, phosphorus, and potassium sensor based on the ion-selective electrode method. These sensors are deployed at a density of one monitoring point per 50 mu (approximately 3.3 hectares) in each returned-to-field plot, buried at a depth of 20 cm, and automatically collect soil volumetric moisture content data once per hour. The unit is percentage, soil nitrate nitrogen content The unit is milligrams per kilogram, soil available phosphorus content. The unit is milligrams per kilogram. A miniature weather station is deployed in each plot of land returned to its natural state to monitor rainfall in real time. The data is measured in millimeters every 5 minutes, including wind speed and direction, air temperature and humidity, and light intensity. All field sensor data is aggregated to the field gateway via a long-range low-power wide-area network protocol. The gateway then uploads data to the cloud platform every 5 minutes via fourth-generation mobile communication technology.
[0030] The third type of equipment is video surveillance and artificial intelligence recognition equipment. Artificial intelligence cameras with 8-megapixel resolution and night vision capabilities are installed at the exit of the manure treatment center and the entrance of the main land return plots. The built-in algorithm can identify the license plates of transport vehicles, the sealing status of the cargo compartment, and whether there is any leakage along the way. When a violation is detected, it will trigger the capture and upload of images and event tags.
[0031] (3) Data preprocessing and feature engineering The raw sensory data needs to be cleaned, aligned, and feature-calculated before it can be input into the digital twin engine and subsequent models.
[0032] For GPS trajectory data, a Kalman filter algorithm is used for denoising and smoothing to eliminate positioning jumps. The filtered state vector is longitude, latitude, and velocity, while the observation vector is the longitude, latitude, and velocity output by the GPS. The smoothed position is obtained through iterative updates of the state transition matrix and the observation matrix. The Kalman filter update equation is as follows: ; in, Indicates based on The state prediction vector at time k, F k B represents the state transition matrix. k Represents the control matrix, u k Represents the control vector. Let Q represent the prediction error covariance matrix. k K represents the process noise covariance matrix. k H represents the Kalman gain matrix. k Let R represent the observation matrix. k Let z represent the observation noise covariance matrix. k Represents the actual observed vector. This represents the updated state estimate vector. Let I represent the updated error covariance matrix, and let I represent the identity matrix. Through this iterative calculation, the smoothed longitude is obtained. with latitude as a state vector The corresponding components in.
[0033] For the weighing data, a moving average filter is used with a window size of 10 sampling points to eliminate noise caused by vehicle vibration and obtain a smoothed weight. The formula for calculating the moving average is as follows: ; in, This represents the weight value after moving average filtering at time t, where N represents the size of the moving window, which is 10. This represents the original weight sample value at time ti.
[0034] For sensor time-series data, a linear interpolation method is used to fill in missing values caused by communication failures. For the missing value x at time t... t Using data from two valid observation times, t0 and t1 and The intermediate interpolation is calculated as follows: ; Where, x t This represents the sensor data at time t to be interpolated. This represents the sensor data at the previous valid observation time t0. This represents the sensor data at the next valid observation time t1, where t represents the missing time, and t0 and t1 represent the previous and next valid observation times, respectively.
[0035] Further calculations are performed on key feature variables. The spatial relationship between the vehicle's real-time position and the sensitive target is calculated through spatial connectivity, specifically for the smoothed vehicle position points at each time step. and Calculate its distance to the nearest river. The formula for Euclidean distance is: ; in, This indicates the distance from the vehicle's current location to the nearest river. This indicates the smoothed vehicle longitude. This represents the smoothed vehicle latitude. This represents the longitude of the j-th node on the river vector line. This represents the latitude of the j-th node on the river vector line, where C represents the conversion factor for converting coordinate units to meters, with a value of [value missing]. Cumulative application amount of land The amount of material applied at each unloading point at this site The cumulative calculation is as follows: ; in, M(t) represents the cumulative application amount of the plot up to time t, and M(t) represents the total number of unloading operations of the plot up to time t. This represents the single application rate at the k-th unloading. Soil nitrogen and phosphorus surplus in the plot. Defined as real-time nitrate nitrogen content in soil Suitable nitrogen content threshold for crops The difference is: ; in, Indicates the nitrogen and phosphorus surplus in the soil. This indicates the real-time nitrate nitrogen content in the soil. This indicates the appropriate nitrogen content threshold for crops, which is determined by agricultural experts based on the main crop types and planting systems in the area, and is, for example, 120 mg per kilogram.
[0036] Rainfall forecast data for the next 24 hours is obtained by accessing the meteorological bureau's application programming interface (API), and is in the format of an hourly rainfall array. , where i from 1 to 24 represents the next 1 to 24 hours.
[0037] (4) Construction of digital twin virtual geographic scene The construction of digital twin scenarios is based on the integrated development environment of the game engine Unreal Engine and the 3D geographic information system platform MapGIS.
[0038] Load the preprocessed basic geographic raster dataset onto the MapGIS platform. Generate a high-precision terrain grid using digital elevation model data, and map remote sensing imagery as texture maps onto the terrain surface. Convert vector data such as soil type maps, water system maps, and water source protection area maps into 3D layers, rendering them with different colors and transparency levels. Store the soil attribute parameter raster map as attributes of the terrain grid vertex shader for subsequent visualization and analysis.
[0039] Import the basic scene 3D model file exported from MapGIS into Unreal Engine, including terrain meshes and textures. Build a dynamic object model library in Unreal Engine, including a high-precision 3D model of a manure transport vehicle, 3D icon models of field sensors, and wireframe models of plot boundaries. Establish a data-driven animation mechanism using Unreal Engine's Blueprint Scripting system. Bind a unique device identifier to each transport vehicle object, and use Blueprint Scripting to read the smoothed position coordinates of the vehicle from the cloud platform database in real time. and It also drives the 3D model to move within the scene. A vehicle identifier and real-time remaining weight are displayed floating above the vehicle model. And an icon indicating the airtightness status. Each plot object is also bound to a device identifier, and the latest soil moisture content of that plot is read via blueprint scripts. and cumulative application rate And it is visualized in the scene through the color gradient of the land surface.
[0040] To achieve smooth rendering of large-scale real-time data, multi-level detail technology and instantiation rendering technology are employed. For terrain meshes, different resolution mesh models are dynamically switched based on the viewpoint distance. For vehicle models, a simplified model with a low polygon count is used when the distance exceeds 500 meters. All sensor icons of the same type are rendered using instantiation, submitting the drawing command once, significantly reducing the consumption of the graphics processor.
[0041] The final virtual geographic scene has the following output capabilities: First, it can output high-definition scene renderings and video streams at any time and from any perspective. Second, it can obtain the attribute list of all dynamic objects within a specified spatial range through a spatial query interface. Third, it can export a snapshot data package of the entire scene once per second at a fixed frequency. This data package contains structured data on the locations of all vehicles, land parcel status, and environmentally sensitive points. It will serve as a direct data source for subsequent multi-source spatiotemporal risk impact factors. (Snapshot data package) The data structure is defined as follows: ; in, V represents the scene snapshot data packet at time t. t Let represent the set of states of all transport vehicles at time t. This represents the state of the i-th transport vehicle at time t, including the vehicle identifier. Smoothed longitude Smoothed latitude Instantaneous velocity Real-time remaining weight Airtightness status indicator Real-time river distance Real-time distance to water source Real-time distance to residential areas F t Let be the set of states of all plots at time t. This represents the state of the j-th land parcel at time t, including the land parcel identifier (id). j Soil moisture content Soil nitrate nitrogen content Soil available phosphorus content Cumulative application rate Soil nitrogen and phosphorus surplus Rainfall forecast array for the next 24 hours S t This represents the set of states of all environmentally sensitive points at time t. , This represents the state of the k-th sensitive point at time t, including the sensitive point identifier id. k Sensitive Point Type k Current number of vehicles under warning .
[0042] 2. Extract multi-source spatiotemporal risk impact factors based on the multi-source spatiotemporal risk impact factor extraction module, specifically as follows: (1) Extraction of transportation risk chain factors The transportation risk chain factors reflect the potential leakage, spillage, and threats to sensitive targets along the route that may occur during the transportation of manure from the farm to the farmland. All of these factors are derived from scene snapshot data packages. The set of transport vehicle states V t .
[0043] For the i-th transport vehicle at time t, its state... Extract the following factors: First, the vehicle's real-time location longitude. and latitude The unit is degrees. This data is the positioning result after Kalman filtering smoothing mentioned above, and is used as a reference for spatial positioning.
[0044] Second, vehicle instantaneous speed The unit is kilometers per hour, which is directly collected by the vehicle-mounted Beidou dual-mode positioning module and smoothed by Kalman filtering.
[0045] Third, the vehicle's real-time remaining weight The unit is tons, which is collected by the vehicle-mounted weighing sensor and processed by moving average filtering to reflect the current amount of sewage on the vehicle.
[0046] Fourth, vehicle airtightness indicator , is a binary variable, with a value of 0 indicating normal airtightness and a value of 1 indicating abnormal airtightness, which is determined by the tank airtightness pressure sensor.
[0047] Fifth, the distance of the vehicle to the nearest river. The unit is meters, and this factor was obtained through spatial connection calculations mentioned above.
[0048] Sixth, the distance of the vehicle to the nearest water source protection zone boundary. The unit is meters, and the calculation method is similar to that for river distances.
[0049] Seventh, the distance from the vehicle to the nearest residential area. The unit is meters.
[0050] Eighth, total nitrogen content of vehicle waste The unit is milligrams per liter, which is collected and recorded in the vehicle status by a near-infrared sensor of manure composition during each unloading, reflecting the nitrogen concentration in the manure.
[0051] Ninth, total phosphorus content in vehicle waste The unit is milligrams per liter, collected by a near-infrared sensor of fecal composition.
[0052] Tenth, the moisture content of vehicle waste. The values are in percentages and are collected by a near-infrared sensor of fecal composition.
[0053] For time t, all N v The above factors of the transport vehicles are organized into a transport risk chain feature matrix. Each row of the matrix corresponds to a 10-dimensional feature vector of a car.
[0054] (2) Application of risk chain factor extraction The application risk chain factor reflects the direct pressure on soil and groundwater pollution caused by the application of manure to farmland, and it is entirely derived from the set of plot states F in the scene snapshot data package. t .
[0055] For the j-th plot at time t, its state Extract the following factors.
[0056] First, the soil volumetric moisture content of the plot The data, expressed as a percentage, is collected hourly by a multi-parameter soil sensor and reflects the current soil moisture status, influencing the ability of pollutants to migrate with water.
[0057] Second, the nitrate nitrogen content of the soil in the plot. The unit is milligrams per kilogram, which is collected hourly by a multi-parameter soil sensor to reflect the accumulated available nitrogen content in the soil.
[0058] Third, the available phosphorus content of the soil in the plot The unit is milligrams per kilogram, which is collected hourly by a multi-parameter soil sensor to reflect the accumulated available phosphorus content in the soil.
[0059] Fourth, cumulative application volume of land parcels The unit is tons, representing the total amount of manure and sewage applied to the plot up to time t.
[0060] Fifth, the nitrogen and phosphorus surplus in the soil of the plot. The unit is milligrams per kilogram, reflecting the degree to which the current soil nitrate nitrogen content exceeds the suitable threshold for crops. Sixth, the cumulative rainfall in the next 24 hours The unit is millimeters, derived from the 24-hour rainfall forecast array. get.
[0061] Seventh, the maximum hourly rainfall intensity in the next 24 hours The unit is millimeters per hour, which reflects the concentration of rainfall.
[0062] Eighth, the slope of the land plot. The unit is degrees. This factor is a static attribute and originates from the digital elevation model data generated during the preprocessing process described above. The slope is obtained by averaging the slope across all grid cells within the plot. Slope affects surface runoff velocity and pollutant transport capacity.
[0063] For time t, all N f The above-mentioned factors for each plot are organized into an application risk chain feature matrix. Each row of the matrix corresponds to an 8-dimensional feature vector of a land parcel.
[0064] (3) Extraction of environmental background factors Environmental background factors reflect the sensitivity and buffering capacity of a regional environmental system to pollution. They are derived partly from the static basic geographic raster dataset generated by the preprocessing described above, and partly from the environmentally sensitive point state set S in the scene snapshot data package. t .
[0065] For each plot j, the following environmental background factors are extracted.
[0066] First, soil saturated hydraulic conductivity The unit is millimeters per hour, derived from the soil property parameter raster map mentioned above, reflecting the soil's water infiltration capacity and influencing the rate at which pollutants migrate into groundwater. This factor is a static attribute, extracted from the preprocessed soil parameter raster using the coordinates of the plot's center point.
[0067] Second, the soil texture classification index T j The variable is a categorical variable, classifying soils into three types—sandy, loamy, and clay—based on sand, silt, and clay content, respectively, and assigning values of 1, 2, and 3, derived from a soil type distribution raster map. This factor affects the soil's ability to adsorb pollutants and its runoff generation capacity.
[0068] Third, the depth of the groundwater level The unit is meters, derived from groundwater isohyet data in hydrogeological data, and the groundwater depth at the center point of the plot is calculated through interpolation. The shallower the groundwater level, the higher the risk of pollutants entering the groundwater.
[0069] Fourth, the distance of the plot from the nearest water source protection area. The unit is meters, derived from the basic geographic raster dataset, directly from the raster distance field. Extract from.
[0070] Fifth, the density of sensitive points in the area where the plot is located. The unit is per square kilometer, based on the state set S of environmentally sensitive points. t Calculate the number of sensitive points such as residential areas within a 2-kilometer radius of the land parcel, centered on the water source protection area.
[0071] For time t, all N f The aforementioned environmental background factors for each plot of land are organized into an environmental background feature matrix. Since most of these factors are static attributes, they change slowly over time and can be updated hourly or assigned only during initial load.
[0072] (4) Fusion of multi-source spatiotemporal risk influencing factors The feature matrices of the above three dimensions are fused to construct a complete input feature tensor, which serves as the input data for the spatiotemporal risk coupling model.
[0073] First, for each plot j at time t, it is necessary to correlate its own application risk chain factor, environmental background factor, and the transportation risk chain factor among all transport vehicles at the current time that may affect that plot. Since the transport vehicles are in motion, their impact on a specific plot depends on the spatial relationship between the vehicle's location and the plot. Define spatial influence weights. This represents the risk contribution weight of the i-th transport vehicle to the j-th plot, calculated based on the distance between the vehicle and the plot: ; in, This represents the risk impact weight of the i-th transport vehicle on the j-th plot at time t. This represents the Euclidean distance from the position of the i-th transport vehicle at time t to the center point of the j-th plot. This indicates that the distance attenuation parameter is set to 500 meters. This weighting function ensures that vehicles closer to the site contribute more to the risk, while the impact of vehicles beyond a certain distance is negligible.
[0074] Then, spatial weighted aggregation of the transportation risk chain factors is performed to obtain the transportation risk aggregation vector associated with each land parcel. for: ; in, This indicates that the dimension of the transportation risk feature vector obtained by aggregating the j-th plot at time t is 10. Let represent the 10-dimensional transportation risk feature vector of the i-th transport vehicle at time t.
[0075] Finally, the application risk chain factor, environmental background factor, and aggregated transportation risk factor for each plot are concatenated to form a complete input feature vector. ,for: ; in, The dimension of the complete input feature vector of the j-th plot at time t is... , This represents the 8-dimensional application risk chain feature vector of the j-th plot at time t. This represents the 5-dimensional environmental background feature vector of the j-th plot. This represents the 10-dimensional transportation risk feature vector obtained by aggregating the j-th plot at time t.
[0076] All N f By stacking the feature vectors of each land parcel, the multi-source spatiotemporal risk impact factor tensor at time t is obtained. This tensor serves as the input data for the spatiotemporal risk coupling model, used to calculate the environmental risk index for each plot.
[0077] 3. Construct and train a spatiotemporal risk coupling model based on the spatiotemporal risk coupling model module. The specific steps include: (1) Graph structure construction All plots within the study area are defined as graph nodes, and the node set V contains N. f Each plot of land. Node feature matrix. Directly using multi-source spatiotemporal risk impact factor tensors Each row corresponds to a 23-dimensional feature vector of a plot of land, including 8 dimensions of application risk chain factors, 5 dimensions of environmental background factors, and 10 dimensions of aggregated transportation risk factors.
[0078] Let the edge set E represent the spatial proximity between plots. For any two plots i and j, calculate the Euclidean distance between their centers. ,like If a distance threshold is found, an undirected edge is added between nodes i and j to indicate a potential environmental risk interaction between the two locations. The value is set to 500 meters, determined based on the typical impact range of pollutants migrating via surface runoff. (Edge weight) The result, calculated using the Gaussian kernel function, is: ; in, This represents the weight of the edge between node i and node j. This represents the Euclidean distance between the center points of node i and node j. This indicates that the distance attenuation parameter is set to 300 meters. This weighting function ensures that the closer the plots are, the stronger the mutual influence of risks; beyond a certain distance, the influence becomes negligible. The final constructed graph structure is... , where E is the weighted set of undirected edges.
[0079] (2) Improved graph attention network structure design This invention proposes a Feature-Differentiated Graph Attention Network (FD-GAT). Based on conventional graph attention networks, this network introduces a mechanism for differentiating the importance of node features. By assigning differentiated weights to risk factors of different dimensions within a node through feature-level attention, it enhances the model's sensitivity to key risk factors.
[0080] The FD-GAT network consists of two core modules: a node feature importance module and an enhanced graph attention layer module, which will be described in detail below: ① Node Feature Importance Module The node feature importance module borrows the idea of intra-node attention mechanism, weighting the importance of the 23-dimensional features within each node. The core assumption of this module is that, among all feature dimensions of the same node, certain features that deviate from the norm often carry stronger risk discrimination information, such as abnormally high soil nitrate nitrogen content or extremely low distance from water sources. By adaptively amplifying these key features and suppressing redundant or noisy features, the discriminative power of node representation can be improved.
[0081] For the feature vector of node i Calculate its global bias score for: ; in, This represents the global bias score of node i. This represents the k-th eigenvalue of node i. Indicates that all nodes are at the 1st rank. Mean of the feature in dimension, This represents the standard deviation of all nodes on the k-th dimension feature. The value of the small constant indicating that division by zero is... This score reflects the degree to which the node as a whole deviates from the average level.
[0082] Further calculate the local deviation score The relative importance of node i in the k-th dimension feature is: ; in, The local bias score represents the feature of the k-th dimension of node i. This represents the k-th eigenvalue of node i. Let represent the mean of all 23 features of node i. This represents the standard deviation of all 23 features of node i. This score reflects the degree of relative difference between the various feature dimensions within a node.
[0083] Based on global and local bias scores, the comprehensive attention coefficient of the k-th dimension feature of node i is calculated. for: ; in, This represents the comprehensive attention coefficient of the k-th dimension feature of node i. and Let represent the trainable parameters, and b represent the trainable bias term. This represents the Sigmoid activation function. This module introduces only 3 trainable parameters, meeting the lightweight requirements of low-parameter design.
[0084] We apply feature importance weighting to obtain the weighted node feature vector. for: ; in, Let x represent the feature vector of node i after weighting by feature importance. i Let i represent the original feature vector of node i. This represents the 23-dimensional feature attention coefficient vector of node i. This represents element-wise multiplication. This operation enables differential enhancement of the internal features of a node.
[0085] ② Enhanced Graph Attention Layer The enhanced graph attention layer, based on the graph attention network, combines a multi-head attention mechanism and a skip connection design to aggregate information from neighboring nodes and update node representations.
[0086] For the l-th graph attention layer, the input is the node feature matrix output from the previous layer. ,in, This represents the feature dimension of the previous layer. The input to the first layer is the feature matrix after being weighted by the node feature importance module. .
[0087] First, apply a trainable linear transformation matrix to each node. This maps the input features to a higher-dimensional representation space, as follows: ; in, This represents the intermediate representation of node i after a linear transformation at level l. This represents the output representation of node i at layer (l-1). This represents the weight matrix of the l-th layer.
[0088] For node i and its neighboring nodes Calculate the attention coefficient Let represent the importance of neighbor node j to node i, as follows: ; in, Let represent the attention coefficient of neighbor node j to node i in layer l. The dimension of the trainable attention parameter vector of the l-th layer is . , This represents a vector concatenation operation. This represents the weight of the edge between node i and node j. This indicates that the negative slope of the activation function for the linear correction unit with leakage is 0.2. Edge weights. The introduction of this concept allows plots that are spatially closer to each other to receive higher attention weight, reflecting prior knowledge of geographical proximity.
[0089] The attention coefficients are normalized using softmax to obtain the final attention weights. for: ; in, Let represent the attention weight of neighbor node j to node i after normalization at layer l. Let i represent the set of all neighboring nodes of node i.
[0090] A multi-head attention mechanism is employed to stabilize the learning process and enhance the model's expressive power. K independent attention heads are set up, each independently calculating attention weights and generating new node representations. The outputs of all heads are then concatenated or averaged. For layers other than the last, a concatenation operation is used, as follows: ; in, This represents the output representation of node i at layer l. This represents a vector concatenation operation, where K represents the number of attention heads. This represents the attention weight calculated by the k-th attention head in the l-th layer. Let represent the linear transformation result of the k-th attention head in the l-th layer on node j. This represents the ELU activation function. The concatenated feature dimension is... .
[0091] For the last layer, an averaging operation is performed and the output dimension is mapped to the target dimension, as follows: ; in, L represents the output representation of node i in the last layer, and L represents the total number of layers in the network.
[0092] ③ Jump connections and residual structures To alleviate the oversmoothing problem in deep networks, a skip connection is introduced after each graph attention layer to add the input features to the output features, resulting in: ; in, This represents the final output of node i after it has undergone a skip connection at level l. This represents the output of the l-th graph attention layer. This represents the output of the (l-1)th layer. This indicates that the trainable skip connection weight matrix is used for dimension matching. This design ensures that deep networks still retain the original feature information of shallow layers.
[0093] ④ Overall network structure The FD-GAT network employs a two-layer graph attention structure, with the following specific parameter configurations: First layer of enhanced graph attention layer: Input dimension 23, output dimension 64, number of attention heads Each head outputs an 8-dimensional value, which is concatenated to obtain a 64-dimensional output. A dropout rate of 0.6 is used to prevent overfitting. The activation function is ELU.
[0094] Second layer: Enhanced graph attention layer; input dimension 64, output dimension 32, number of attention heads... Each head outputs have an 8-dimensional dimension, and the multi-head outputs are fused using an averaging method to obtain a 32-dimensional vector. The dropout rate is 0.6. The activation function used is ELU.
[0095] After two graph attention layers, a fully connected output layer is connected to map the 32-dimensional node representation to a 1-dimensional environmental risk index r. i ,for: ; Where, r i This indicates that the environmental risk index of node i ranges from 0 to 1. The output layer weight matrix has a dimension of 1. , This represents the output of node i after passing through the second graph attention layer and the skip connection. This represents the output layer bias term. The Sigmoid activation function ensures that the output value is between 0 and 1, which facilitates subsequent risk level classification.
[0096] (3) Model training process ① Training dataset construction The training dataset is constructed based on historical environmental monitoring data. It collects daily scene snapshot data packages of the study area over the past three years. And the corresponding actual environmental monitoring consequences data. The actual environmental consequences include three types of indicators: events where the concentrations of chemical oxygen demand, ammonia nitrogen, and total phosphorus exceed the standards at downstream water quality monitoring sections; events where the nitrate nitrogen content in groundwater around the site increases abnormally; and events where surface runoff pollution spread is identified by remote sensing images.
[0097] For each plot j at each time t, extract the multi-source spatiotemporal risk impact factor. And construct a graph structure At the same time, labels are defined based on actual environmental consequences data. If any abnormal environmental event occurs on the site within 72 hours after time t, it will be marked as a high-risk sample. Otherwise, it is marked as a low-risk sample. .
[0098] Historical data was divided into training, validation, and test sets. The training set contained 70% of the data from randomly selected time points over the past three years, the validation set contained 15%, and the test set contained 15%. The final training set consisted of approximately 50,000 graph snapshots, each containing... Node characteristics and tags of individual plots ②Loss Function The model is trained using a weighted cross-entropy loss function to address the class imbalance problem (high-risk samples are far fewer than low-risk samples), as follows: ; in, This represents the total loss value. This represents the set of time points in the training set. This indicates the number of time points in the training set. Indicates the number of land parcels. This represents the true label of plot j at time t. This indicates the risk index predicted by the model. That is, the probability of predicting it as positive. The weighting coefficient for positive class samples is the inverse of the ratio of the number of high-risk samples to the number of low-risk samples, multiplied by a magnification factor, typically set between 5 and 10. This weighting strategy makes the model focus more on the minority of high-risk samples.
[0099] ③ Optimize the algorithm and set hyperparameters The Adam optimizer is used for parameter updates, with an initial learning rate of 0.005. The learning rate is dynamically adjusted using a cosine annealing strategy, decaying to 0.5 times its original value every 50 epochs. The L2 regularization weight decay factor is set to 0.0005 to prevent overfitting.
[0100] The training epochs are set to 200, with an early stopping mechanism: if the validation set loss does not decrease within 30 consecutive epochs, training is terminated early. The batch size is set to 32, meaning that 32 snapshots of the graph are randomly selected for computation in each iteration.
[0101] The dropout rate is set to 0.6, randomly dropping 60% of neurons during training to enhance the model's generalization ability.
[0102] ④ Model evaluation indicators The following metrics were used to evaluate model performance on the validation and test sets: accuracy, precision, recall, and F1 score. Recall is particularly important for risk warning tasks, as missing high-risk events can have serious environmental consequences. The model was required to achieve a recall of at least 0.85 and a precision of at least 0.75 on the test set.
[0103] (4) Model output and application The trained FD-GAT model receives multi-source spatiotemporal risk influence factor tensors. Output the environmental risk index for each plot j. This index serves as input for risk level assessment. Simultaneously, attention weights are calculated for each layer of the model. The data is saved for subsequent risk tracing analysis. By analyzing neighboring nodes with high attention weights and feature dimensions with high feature attention coefficients, the main factors leading to high risks and the risk propagation paths can be identified.
[0104] The model undergoes an incremental update every 24 hours, adding newly added actual environmental monitoring data to the training set and fine-tuning the model parameters to achieve adaptive evolution, enabling it to continuously adapt to changes in regional environmental conditions.
[0105] 4. Based on the dynamic risk level assessment and source tracing module, perform dynamic risk level assessment and source tracing, specifically as follows: (1) Risk level classification For time t, the FD-GAT model outputs the environmental risk index for each plot j. This index represents the probability that an abnormal environmental event will occur at the current moment for the site. To convert continuous probability values into actionable risk levels, a quartile thresholding method based on cumulative probability distribution is used to set the grading thresholds.
[0106] First, a cumulative distribution function for the risk index is constructed based on historical data. All risk indices *r* output by the model on the validation set over the past year are collected, and their empirical cumulative distribution function F(r) is calculated. F(r) represents the proportion of samples with a risk index less than or equal to *r*. Based on the refined requirements of environmental management, risks are divided into four levels: low risk, moderate risk, relatively high risk, and high risk. The thresholds for each level are defined as follows: Low risk: A risk index below the median of historical data indicates a stable environmental condition and an extremely low probability of pollution events.
[0107] General risks: A risk index between the 50th and 75th percentiles of historical data indicates a potential risk, but one that has not yet reached the level requiring immediate intervention.
[0108] Higher risk: A risk index between the 75th and 90th percentiles of historical data indicates a higher risk, requiring enhanced monitoring and the implementation of preventative measures.
[0109] High risk: If the risk index exceeds the 90th percentile of historical data, it indicates that a pollution event is imminent or has already occurred, and immediate countermeasures must be taken.
[0110] in, , , These represent the 50th, 75th, and 90th percentiles of the historical risk index, obtained by calculating the quantiles of the risk index on the validation set. This threshold can be adjusted periodically based on regional environmental capacity and management objectives, for example, updated quarterly. For newly deployed systems, if sufficient historical data is unavailable, an initial threshold can be set based on expert experience. , , We will make corrections after accumulating enough data.
[0111] For each plot j, the risk index at time t Risk level labels are assigned based on the aforementioned thresholds. These correspond to low risk, moderate risk, relatively high risk, and high risk, respectively. This risk level label is one of the final outputs.
[0112] (2) Source tracing of risk factor contribution To explain the causes of risk level assessment results and identify key driving factors leading to high risk, a source analysis was conducted using two types of attention weight information generated by the FD-GAT model: the feature attention coefficients output by the node feature importance module. And the edge attention weights of the enhanced graph attention layer output. .
[0113] ① Calculation of factor contribution based on feature attention coefficients Feature attention coefficient This coefficient reflects the importance of the k-th dimension feature of node i within the node; it is adaptively calculated by the node feature importance module based on the degree of feature deviation. For high-risk plot j, it represents the contribution of its k-th dimension risk factor to the plot's risk. Defined as: ; in, This represents the contribution of the k-th dimension feature factor to the j-th plot. The feature attention coefficient represents the k-th dimension feature of node j. This represents the actual value of the k-th dimension feature of node j. This represents the mean of all nodes on the k-th dimension feature. This represents the standard deviation of all nodes on the k-th dimension feature. This contribution factor comprehensively considers both the importance coefficient of the feature itself and the degree to which the feature value deviates from the normal level; a larger value indicates a greater contribution of the factor to the increased risk. Normalize the contributions of all 23 features to obtain the relative contribution percentages: ; in, This represents the relative contribution percentage of the k-th dimension feature factor for the j-th plot.
[0114] ② Risk propagation path tracing based on edge attention weights Side attention weights This is reflected in the k-th attention head of layer l, indicating the importance of neighbor node j to node i. This weight is dynamically calculated by the enhanced graph attention layer based on node characteristics and spatial distance, reflecting the intensity of risk propagation between parcels through spatial proximity. For high-risk parcel j, the neighboring parcels that contribute the most to its risk can be traced, i.e., which neighboring parcels' risk status affects the risk assessment of this parcel.
[0115] Calculate the risk propagation contribution received by plot j from its neighboring plot i. ,for: ; in, This represents the risk propagation contribution of neighboring plot i to plot j, and K represents the number of attention heads in the last graph attention layer, which is 4. This represents the attention weight from node i to node j in the k-th attention head of the second-layer graph attention layer. The larger this value, the greater the influence of the characteristics of plot i on the risk assessment of plot j, suggesting that the risk may propagate from plot i to plot j.
[0116] For each high-risk plot j, select... The top three neighboring plots are considered the primary sources of risk.
[0117] ③ Output of comprehensive source tracing results The contribution of feature factors and the contribution of neighbor propagation are integrated to form complete source information. For each plot j identified as high-risk or relatively high-risk, the following source information is output: Key risk factors: According to Sort the top five feature factors by contribution, from largest to smallest, and list their percentage contribution. The feature factor names correspond to the 23-dimensional features, such as soil nitrate nitrogen content. Accumulated rainfall in the next 24 hours wait.
[0118] The main source of risk is the neighbor: according to Sort by size from largest to smallest, list the top three neighboring plots by contribution and their spread contribution, and indicate the risk level of these neighboring plots themselves.
[0119] Brief description of risk causes: Combining the main risk factors and neighbor information, a natural language description is generated. For example, the risk of this plot mainly stems from the excessive accumulation of nitrogen and phosphorus in the local soil, and is also affected by the spread of high-risk plots upstream through runoff.
[0120] (3) Risk map generation and visualization Based on the risk level of all land parcels and risk index Dynamic risk maps are generated within a digital twin virtual geographic scene. Land parcel surfaces are rendered in different colors according to risk level: green for low risk, blue for moderate risk, yellow for higher risk, and red for high risk. The transparency of land parcels can be adjusted based on the risk index; the higher the risk, the less transparent the map, highlighting high-risk areas.
[0121] Meanwhile, a risk index value is displayed floating above the plot, and clicking on the plot allows access to a detailed list of source information, including the contribution of major risk factors, major neighboring plots, and their propagation contributions. This risk map is updated in real time within the digital twin scenario, providing environmental managers with an intuitive understanding of the overall risk situation in the region.
[0122] (4) Risk reports are generated automatically. The system automatically generates a risk assessment report every 24 hours, summarizing the day's risk dynamics. The report includes: Risk Overview: Statistics on the number and proportion of land parcels with different risk levels on the same day, and a list of high-risk land parcels and their location distribution.
[0123] Risk evolution trend: Plot the curve of the change in the number of high-risk land parcels over the past week to analyze the upward or downward trend of risk.
[0124] Statistics on major risk factors: The frequency of the top five contributing characteristic factors in all high-risk plots is statistically analyzed to identify the risk drivers that are prevalent at the current stage. For example, if the cumulative rainfall in the next 24 hours frequently appears in the major factors, it indicates that meteorological conditions are the current major risk trigger.
[0125] Typical high-risk case analysis: Select the three plots with the highest risk index on the day and display their source information details, including factor contribution and neighbor propagation impact.
[0126] Recommended measures: Based on the statistical results of the main risk factors, we propose targeted management recommendations. For example, in response to the risks induced by rainfall, we recommend suspending fertilization operations on high-risk plots.
[0127] The report is exported in PDF format and pushed to environmental regulatory authorities via email or system message.
[0128] Embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0132] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.
Claims
1. A system for dynamic monitoring and grade evaluation of environmental risks of livestock and poultry manure field application, characterized in that, include: The digital twin virtual geographic scene construction module is used to acquire static basic geographic data of the target area and deploy IoT sensing devices to collect dynamic real-time data. After preprocessing the static basic geographic data and dynamic real-time data, a digital twin virtual geographic scene synchronized with the physical world in real time is constructed based on the game engine and the 3D geographic information system platform. The digital twin virtual geographic scene exports scene snapshot data packages including the status sets of transport vehicles, the status sets of land parcels, and the status sets of environmentally sensitive points at a fixed frequency. The multi-source spatiotemporal risk impact factor extraction module is connected to the digital twin virtual geographic scene construction module. It is used to receive scene snapshot data packets, extract transportation risk chain factors from the transportation vehicle status set and construct a transportation risk chain feature matrix, extract application risk chain factors from the land parcel status set and construct an application risk chain feature matrix, extract environmental background factors from the environmental sensitive point status set and static basic geographic data and construct an environmental background feature matrix, calculate spatial impact weights based on the spatial distance between vehicles and land parcels, perform spatial weighted aggregation of transportation risk chain factors to obtain the transportation risk aggregation vector associated with each land parcel, and concatenate the application risk chain factors, environmental background factors and transportation risk aggregation vector of each land parcel to form a multi-source spatiotemporal risk impact factor tensor. The spatiotemporal risk coupling model module is connected to the multi-source spatiotemporal risk impact factor extraction module. The spatiotemporal risk coupling model module is deployed with a pre-trained feature differential graph attention network. The feature differential graph attention network includes a node feature importance module and an enhanced graph attention layer module. The node feature importance module is used to adaptively weight the features of each dimension inside each node in the input feature tensor. The enhanced graph attention layer module is used to aggregate neighbor node information and update node representation. The feature differential graph attention network receives the multi-source spatiotemporal risk impact factor tensor and outputs the environmental risk index of each plot. The dynamic risk level assessment and source tracing module is connected to the spatiotemporal risk coupling model module. It is used to classify risk levels according to the environmental risk index to obtain risk level labels, and to calculate the contribution of feature factors and risk propagation using the feature attention coefficients and edge attention weights generated by the intermediate layer of the feature-differentiated graph attention network. It generates source tracing information containing the main risk factors and the neighbors of the main risk sources, and outputs the final risk assessment result data package. The transportation risk chain factors include the vehicle's real-time location (longitude and latitude), instantaneous speed, real-time remaining weight, airtightness status indicator, distance to the nearest river, distance to the nearest water source protection zone boundary, distance to the nearest settlement, total nitrogen content of sewage, total phosphorus content of sewage, and moisture content of sewage. The application risk chain factors include soil volumetric moisture content, soil nitrate nitrogen content, soil available phosphorus content, cumulative application amount per plot, soil nitrogen and phosphorus surplus, cumulative rainfall in the next 24 hours, maximum hourly rainfall intensity in the next 24 hours, and plot topographic slope. The environmental background factors include soil saturated hydraulic conductivity, soil texture classification index, groundwater level depth, distance of the plot from the nearest water source protection area, and density of sensitive points around the plot.
2. The livestock manure field application environmental risk dynamic monitoring and grade evaluation system according to claim 1, characterized in that, The digital twin virtual geographic scene construction module includes a static data preprocessing unit, a dynamic data acquisition unit, and a data preprocessing unit. The static data preprocessing unit performs depression filling and flow direction analysis on the acquired digital elevation model data to generate depression-free digital elevation model data, performs geometric fine correction and fusion processing on remote sensing images, rasterizes soil type vector data to generate soil attribute parameter raster map with the same grid spacing as the digital elevation model data, and converts the vector surface data of water system, water source protection area and settlement into raster distance field to calculate the distance from the center point of each raster to the nearest river, the distance to the boundary of the nearest water source protection area and the distance to the nearest settlement. The dynamic data acquisition unit specifically includes: The first type of equipment deployed on sewage transport vehicles includes a Beidou dual-mode positioning module, vehicle-mounted weighing sensors, near-infrared sensors for sewage composition, and tank sealing pressure sensors. The second type of equipment deployed on land returned to its original state includes soil multi-parameter sensors and miniature weather stations; Category III equipment, including AI cameras, is deployed at the exit of manure treatment centers and the entrances of land return plots. All sensor data are sent to the central cloud platform via the vehicle-mounted intelligent terminal or field gateway using message queue telemetry transmission protocol or long-distance low-power wide area network protocol. The data preprocessing unit uses the Kalman filter algorithm to denoise and smooth the GPS trajectory data to obtain the smoothed position, uses the moving average filter to obtain the smoothed weight for the vehicle weighing data, uses the linear interpolation method to fill missing values for the sensor time series data, calculates the distance from the vehicle to the nearest river and the distance to the nearest water source protection area boundary based on the smoothed position, accumulates the single application amount for each unloading of the plot to obtain the cumulative application amount for the plot, and calculates the nitrogen and phosphorus surplus in the plot soil.
3. The livestock manure field application environmental risk dynamic monitoring and grade evaluation system according to claim 2, characterized in that, The enhanced graph attention layer module of the feature-differentiated graph attention network adopts a multi-head attention mechanism. The first graph attention layer sets the number of attention heads K1=8, the input dimension 23, and the output dimension 64. The second graph attention layer sets the number of attention heads K2=4, the input dimension 64, and the output dimension 32. Skip connections are introduced after each graph attention layer. Finally, the 32-dimensional node representation is mapped to a 1-dimensional environmental risk index through a fully connected output layer.
4. The livestock manure field application environmental risk dynamic monitoring and grade evaluation system according to claim 3, characterized in that, The spatiotemporal risk coupling model module is trained using a weighted cross-entropy loss function.
5. The livestock manure field application environmental risk dynamic monitoring and grade evaluation system according to claim 4, characterized in that, The dynamic risk level assessment and tracing module generates a dynamic risk map in the digital twin virtual geographic scene, rendering the surface of the plots in different colors according to the risk level, and displaying the risk index value floating above the plots. By clicking on the plots, users can view a detailed tracing information list containing the contribution of the main risk factors and the propagation contribution of the main neighboring plots.
Citation Information
Patent Citations
Power grid security defense system based on artificial intelligence and block chain
CN121333665A
Geospatial ai method and system for area-based risk and value assessment
US20250061352A1