AI intelligent inspection method and system applied to water conservancy engineering operation and maintenance
By integrating multi-source meteorological data and multispectral imaging optimization technology, combined with real-time illumination calibration and deep learning models, the problems of low efficiency and low accuracy in traditional water conservancy project inspections have been solved, achieving intelligent and refined operation and maintenance management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZENGCHENG DONGJIN WATER SUPPLY CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional water conservancy project inspection methods rely on manual surveys, which are inefficient and pose high safety risks. Existing technologies lack multi-source data fusion and real-time illumination calibration, resulting in low accuracy in defect identification and failing to meet the needs of refined operation and maintenance.
By employing a multi-source meteorological data fusion and prediction mechanism, combined with multispectral imaging optimization and image restoration technology, and through a dual-feature constrained deep learning model and a real-time illumination dynamic calibration module, dynamic calibration of sensors and accurate extraction and differentiation of defect features are achieved. A hierarchical processing architecture and hybrid transmission scheme are constructed to break down data barriers and support cross-regional collaborative diagnosis and model iterative optimization.
It significantly improves the accuracy of defect identification under complex lighting conditions, ensures the reliability and transmission stability of inspection data, realizes intelligent, refined and efficient operation and maintenance of water conservancy projects, and reduces the reliance on manual inspection.
Smart Images

Figure CN122198931A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of AI intelligent inspection methods, and particularly relates to AI intelligent inspection methods and systems applied to the operation and maintenance of water conservancy projects. Background Technology
[0002] As a vital infrastructure of the national economy, the operation and maintenance of water conservancy projects directly impacts their safety and operational stability. Traditional inspection methods rely primarily on manual on-site surveys, which are not only labor-intensive and inefficient but also pose safety risks due to complex terrain and inclement weather. Furthermore, manual judgment is susceptible to subjective experience, changes in lighting conditions, and meteorological factors, making it difficult to accurately identify hidden defects such as minute cracks and leaks. Simultaneously, existing inspection technologies largely depend on single data sources for collection and processing, lacking effective fusion of multi-source meteorological and sensor data. In complex lighting scenarios such as strong backlighting, low light, and shadow obstruction, it is difficult to distinguish defects from interference information, resulting in low accuracy and failing to meet the needs of refined operation and maintenance.
[0003] Current technical solutions in the field of water conservancy project inspection still have many limitations: On the one hand, existing sensor equipment models are complex and communication protocols are not unified. Existing old equipment has poor compatibility with new systems, data transmission stability is insufficient, and there is a lack of dynamic calibration mechanisms. The accuracy of sensors degrades after long-term operation, affecting data reliability. On the other hand, mainstream defect identification models lack targeted feature constraints and real-time illumination calibration capabilities. Model training relies on a large amount of labeled data, resulting in poor cross-regional adaptability. At the same time, data processing often adopts a single architecture, making it difficult to balance real-time performance and analytical depth. Cross-regional collaborative diagnosis and model iterative optimization capabilities are weak, making it impossible to efficiently support the intelligent operation and maintenance management of large-scale water conservancy projects. Summary of the Invention
[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide an AI-powered intelligent inspection method for the operation and maintenance of water conservancy projects, the method comprising: Furthermore, embodiments of the present invention also provide an AI-powered intelligent inspection system for the operation and maintenance of water conservancy projects, characterized in that it includes: A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to execute the aforementioned AI-powered intelligent inspection method for operation and maintenance of water conservancy projects by executing the machine-executable instructions.
[0005] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, the processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to execute the above-mentioned AI intelligent inspection method applied to the operation and maintenance of water conservancy projects.
[0006] The beneficial effects of this invention are: By integrating and predicting multi-source meteorological data, adaptive adaptation of inspection flight parameters is achieved. Combined with multispectral imaging optimization and image inpainting techniques, the impact of severe weather on imaging quality is effectively addressed, ensuring the reliability of inspection data from the source. A dual-feature constrained deep learning model and a real-time dynamic illumination calibration module work synergistically to accurately eliminate interference caused by illumination changes, enhance the extraction and differentiation of core defect features, and significantly improve the accuracy of defect identification in complex lighting scenarios, solving the problem of easily confusing defects with shadows in traditional methods. Simultaneously, a standardized sensor communication system achieves seamless compatibility between existing equipment and the new system through protocol adaptation technology. Dynamic calibration of sensor accuracy is completed through collaborative learning, ensuring the stability of data transmission and the reliability of data quality for various types of sensors.
[0007] The combination of a hierarchical processing architecture and a hybrid transmission scheme achieves a balance between data processing efficiency and analytical depth. It enables rapid response to on-site needs through real-time processing at both onboard and edge terminals, while leveraging cloud-based deep analysis and global optimization to uncover the value of data correlations. A distributed data platform and multimodal fusion technology break down data silos, and the distributed learning architecture supports cross-regional collaborative diagnosis and iterative model optimization. Coupled with a closed-loop optimization mechanism, it continuously improves the system's adaptability and recognition accuracy. The overall technical solution significantly reduces reliance on manual inspections and labor intensity, enabling intelligent, refined, and efficient operation and maintenance inspections of water conservancy projects, providing solid technical support for the safe operation of these projects. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of the execution flow of the AI intelligent inspection method for water conservancy project operation and maintenance provided in an embodiment of the present invention.
[0009] Figure 2 This is a schematic diagram of exemplary hardware and software components of an AI intelligent inspection system for water conservancy project operation and maintenance provided in an embodiment of the present invention. Detailed Implementation
[0010] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1This is a flowchart illustrating an AI-powered intelligent inspection method for water conservancy project operation and maintenance, provided by an embodiment of the present invention. The following is a detailed description of this AI-powered intelligent inspection method for water conservancy project operation and maintenance.
[0011] Step S110: Integrate multi-source meteorological data to make predictions before inspections, adaptively adapt flight parameters, and ensure imaging quality through multispectral imaging optimization and image restoration technology under severe weather conditions; In this embodiment, multi-source meteorological data specifically includes three categories: First, real-time data collected by the UAV's onboard meteorological sensors (including wind speed, wind direction, temperature, humidity, and light intensity). Second, satellite meteorological data (using atmospheric profile data from MODIS satellite and precipitation forecast data from Fengyun-4 satellite). Thirdly, historical and real-time data from ground meteorological stations (from two automatic ground meteorological stations within 5km of the inspection area, including meteorological data for the same period over the past three years, real-time air pressure and precipitation data). The specific process of adaptive flight parameter adaptation is as follows: a meteorological environment level and initial flight parameter mapping table are pre-constructed. The flight parameters include flight altitude (range 50-200m), flight speed (3-15m / s), gimbal pitch angle (-30° to 0°), and camera exposure time (1 / 100s-1 / 1000s). Combining the meteorological warning results and environment level output in step S112, the basic flight parameters in the mapping table are called up, and then the parameters are dynamically fine-tuned using a PID control algorithm based on real-time feedback from the airborne GPS and IMU sensors (for example, when the predicted wind speed is ≥6m / s, the flight speed is automatically reduced by 30% and the flight altitude is increased by 20% to avoid strong winds near the ground). Imaging quality assurance solution under severe weather conditions (defined as: wind speed ≥8m / s, visibility <1km or hourly precipitation ≥5mm): Integrate a multispectral imaging unit (including visible light, near-infrared, and thermal infrared bands, focal length 25mm, sensor pixel 12 million) and a lidar (range range 0.5-200m, range accuracy ±2cm), and simultaneously acquire multispectral images and lidar point cloud data; For image blurring caused by rain and snow, enable the near-infrared band enhancement mode of the multispectral image (increase the near-infrared band weight to 0.4); For image degradation caused by haze, activate the image restoration module in subsequent step S115, prioritizing the restoration of image edge and texture information.
[0012] Step S111: Collect multi-source meteorological data and perform standardized preprocessing that includes time-series alignment and coordinate unification. The airborne sensors are a SHT30 temperature and humidity sensor (measurement range -40℃ to 125℃, accuracy ±0.1℃) and an FS3000-100 wind speed sensor (range 0-60m / s, accuracy ±0.1m / s), with a sampling frequency of 1Hz. Satellite meteorological data is acquired through the National Meteorological Satellite Data Center interface, with a time resolution of 15 minutes and a spatial resolution of 1km. Ground meteorological station data is accessed through an RS485 interface, with a sampling frequency of 10 minutes / time.
[0013] Using the UAV's onboard clock as the reference clock (accuracy ±1ms), time synchronization is performed on data from different sampling frequencies—satellite data and ground station data are interpolated to 1Hz using linear interpolation to ensure that the timestamps of all data are consistent (format: "YYYY-MM-DDHH:MM:SS.XXX"); for satellite data with time delay (approximately 5 minutes), alignment is achieved through timestamp offset correction. All spatially correlated meteorological data (satellite grid data and ground station location data) were uniformly converted to the WGS-84 geodetic coordinate system. The original coordinates (latitude and longitude) of the satellite grid data were directly used, while the Gaussian plane coordinates of the ground stations were converted to latitude and longitude coordinates through coordinate transformation formulas, with the conversion error controlled within ±5m. Outliers are eliminated using the 3σ criterion (for example, instantaneous wind speed values exceeding the 0-60 m / s range or deviating from the mean by 3 times the standard deviation are considered outliers); all numerical meteorological parameters (wind speed, temperature, humidity, etc.) are subjected to minimum-maximum normalization and mapped to the [0,1] interval to eliminate dimensional differences.
[0014] Step S112: Construct a fusion model based on the Transformer architecture, input preprocessed data to output weather warning results and environmental levels, and the prediction is completed before takeoff; In this embodiment, the Transformer fusion model is deployed on the UAV's onboard edge computing unit (model NVIDIA Jetson Xavier NX). The model inference is started 10 minutes before takeoff (triggered by the UAV completing its power-on self-test and having a battery level ≥80%). The entire prediction process takes ≤60 seconds, ensuring that it does not affect the inspection takeoff plan. The weather warning results output by the model include the specific values of four core parameters for the next hour: wind speed, wind direction, precipitation, and visibility. The environmental level is divided into four levels: normal, mildly severe, moderately severe, and severely severe, and is directly pushed to the display interface of the ground control terminal.
[0015] Step S1121: Build a Transformer fusion architecture adapted to multi-source data, unify data features through independent embedding and layer normalization, and use the encoding layer to mine cross-source associations and enhance feature representation; It adopts a structure of multiple input branches, shared encoder and hierarchical decoder, and the number of input branches matches the type of meteorological data (a total of 3 input branches, corresponding to time series, spatial and statistical meteorological data respectively).
[0016] Each input branch is configured with an independent fully connected embedding layer. The temporal data embedding layer has an input dimension of 10 (including 10 features such as timestamp, wind speed, and wind direction) and an output dimension of 512. The spatial data embedding layer has an input dimension of 8 (including 8 features such as grid latitude and longitude and precipitation) and an output dimension of 512. The statistical data embedding layer has an input dimension of 6 (including 6 features such as historical mean and extreme values) and an output dimension of 512. The GELU function is used as the activation function for the embedding layers to avoid the gradient vanishing problem.
[0017] A layer normalization module is connected to the output of each embedding layer to normalize the embedded feature vectors (calculate the mean and variance of the feature vectors, and adjust the feature values to a mean of 0 and a variance of 1) to ensure that the feature distribution of different input branches is consistent and to improve the stability of model training.
[0018] The shared encoder consists of six stacked coding sub-layers, each including a multi-head self-attention sub-layer and a feedforward neural network sub-layer. The multi-head self-attention sub-layer has eight attention heads, each with a dimension of 64. It calculates the correlation weights between feature vectors of different input branches through a scaled dot product attention mechanism to uncover the intrinsic correlations between cross-source data. The feedforward neural network sub-layer adopts a structure of linear transformation, ReLU activation + linear transformation, and has a hidden layer dimension of 2048 to enhance the non-linear expressive power of features.
[0019] Step S1122: Design feature enhancement strategies for meteorological data with different characteristics, add corresponding location coding modules, and generate global fusion features through a shared encoder; Step S11221: Classify and categorize the preprocessed multi-source meteorological data, identify the three types, label the feature dimensions, and sort out the feature expression requirements; The preprocessed meteorological data is identified into three core types: time-series data (real-time data such as wind speed, wind direction, temperature and humidity collected by UAV onboard sensors, with the core feature being time-series fluctuation patterns); spatial data (satellite grid meteorological data, with the core feature being geographic spatial distribution correlation); and statistical data (historical statistical data such as average temperature and maximum precipitation of the same period in the past 3 years from ground meteorological stations, with the core feature being historical implicit patterns).
[0020] The core feature dimensions of time-series data include: collection timestamp, wind speed, wind direction angle, air temperature, relative humidity, and light intensity, totaling 6 dimensions; the core feature dimensions of spatial data include: grid cell latitude and longitude, precipitation within the grid, cloud coverage, and visibility, totaling 4 dimensions; the core feature dimensions of statistical data include: monthly average temperature, monthly maximum wind speed, annual average precipitation, and probability of extreme precipitation during the same period, totaling 4 dimensions.
[0021] Time-series data should highlight the changing trends of meteorological parameters at different times (such as the rising / falling pattern of wind speed); spatial data should strengthen the meteorological correlation between the core area of the inspection area (such as 3km around the dam) and the surrounding grid; statistical data should explore the matching degree between historical data and current meteorological conditions (such as whether it is close to the historical extreme weather threshold).
[0022] Step S11222: Perform temporal location encoding enhancement on time-series data, and strengthen the temporal features through module concatenation, residual fusion and layer normalization; Based on the sine and cosine position coding framework, and combined with the time window of "prediction 1 hour before takeoff" in this embodiment, the coding period is adjusted to 3600 seconds; the absolute timestamp of the time series data is converted into a relative time step (with the prediction start time as 0, each minute is 1 time step, for a total of 60 time steps), generating a time series position coding vector with the same dimension as the feature vector (512 dimensions).
[0023] The temporal location coding module is connected in series after the embedding layer of the temporal data input branch. The location coding vector and the embedded feature vector are added element by element using the residual connection method, which preserves the numerical characteristics of the meteorological parameters themselves, while incorporating the sequential correlation information of the time dimension.
[0024] The normalization module of the input layer after fusion of feature vectors eliminates feature distribution offset during the fusion process, ensures the stability of temporal features, and lays the foundation for cross-source association mining of the shared encoder.
[0025] Step S11223: Implement spatial location coding enhancement on spatial data, and optimize spatial features through coordinate processing, learnable coding, and neighborhood attention aggregation; The original latitude and longitude coordinates of the satellite grid meteorological data are analyzed. Taking the center point of the inspection area (preset by the user on the ground control terminal) as the origin, the latitude and longitude coordinates of each grid unit are converted into relative coordinates (x,y). The relative coordinates are then mapped to the [-1,1] interval through minimum-maximum normalization to ensure that the coordinate range is consistent.
[0026] A learnable two-dimensional spatial location coding matrix (initialized to random values, dimension 512×512) is used to replace the fixed sine and cosine coding method. The spatial correlation characteristics of satellite grid data are adaptively adapted through subsequent model training, thereby improving the relevance of spatial features.
[0027] A spatial neighborhood attention submodule is added after the spatial location encoding module. It defines eight neighborhood grids (top, bottom, left, right and four corners) of the grid unit. The weights are dynamically assigned according to the distance between the grid unit and the inspection core area (the weight of the core area grid is 0.8 and the weight of the edge area grid is 0.2). The neighborhood features are weighted and aggregated to enhance the spatial feature expression of the core area.
[0028] Step S11224: For statistical data, construct an enhanced sublayer using a multilayer perceptron to achieve feature transformation, dimension adaptation, and distribution alignment; Since statistical data lacks strong temporal or spatial characteristics, a feature enhancement sublayer consisting of two perceptron (MLP) layers is added after the embedding layer in its input branch. The first perceptron has an input dimension of 512 and an output dimension of 1024, and uses ReLU as the activation function to achieve nonlinear transformation of statistical features and uncover implicit correlations between statistical features (such as the negative correlation between average temperature and precipitation). The second perceptron has an input dimension of 1024 and an output dimension of 512, and maps the transformed features back to a unified dimension.
[0029] A batch normalization module is connected to the output of the second-layer sensor to perform distribution calibration on historical ground station data of different batches, ensuring that the feature distribution of statistical data is consistent with the feature distribution of temporal and spatial data, and avoiding the decline in fusion effect due to distribution differences.
[0030] Step S11225: Verify and unify the dimension, data type, and normalization range of the feature vectors of each branch to adapt to subsequent fusion requirements; The dimension of the feature vectors of the three types of data after location encoding / feature enhancement is checked. If there is a dimension deviation (such as the dimension of a certain branch feature vector being 511 due to abnormal data collection), it is mapped to a preset unified dimension (512 dimensions) through a linear projection layer. The weights of the linear projection layer are optimized through model training.
[0031] The data type of all feature vectors is unified to 32-bit floating point; the numerical range of the feature vectors is checked twice to ensure that all feature values are in the range [0,1]. If they are outside the range, the minimum-maximum normalization process is re-executed to avoid the suppression of low-value features by high-value features.
[0032] Step S11226: The concatenated feature sequence is input into the Transformer shared encoder, and correlations are captured through differential attention. After processing, a global fusion feature is generated.
[0033] The feature vectors of time-series, spatial, and statistical data are concatenated into a feature sequence in the order of "time-series-spatial-statistical". The sequence length is 3×512=1536.
[0034] The feature sequence is input into the Transformer shared encoder built in step S1121, and differentiated association capture targets are assigned to the 8 attention heads of the multi-head self-attention sublayer: the 1st and 2nd attention heads focus on capturing the association between temporal and spatial data (such as the association between wind speed change and cloud coverage); the 3rd and 4th attention heads focus on capturing the association between spatial and statistical data (such as the association between current precipitation and historical average for the same period); and the 5th to 8th attention heads focus on capturing the association between temporal and statistical data (such as the association between real-time temperature and humidity and historical extreme weather thresholds).
[0035] After the feature sequence is processed by 6 layers of coding sub-layers, the output feature sequence is compressed into a one-dimensional vector (512 dimensions) through mean pooling operation, which is the global fusion feature vector. This vector integrates the temporal, spatial and statistical correlation features of multi-source meteorological data.
[0036] Step S1123: Construct a hierarchical decoding module with shared fusion features, and output meteorological warning results and environmental levels through regression and classification branches respectively; Step S11231: Build a hierarchical decoding architecture and establish a global fusion feature sharing mechanism. Strengthen the feature association between regression and classification branches through unified input, dimension adaptation and residual connection. A hierarchical structure is adopted, consisting of a shared feature projection layer, a regression decoding branch, and a classification decoding branch. The global fusion feature vector (512 dimensions) is used as a common input source and mapped to 256 dimensions through the shared feature projection layer (to adapt to the computational requirements of the decoding layer). This ensures that the regression decoding branch and the classification decoding branch use the same feature basis with the same dimensions.
[0037] A feature residual connection path is added to the architecture to feed back the output (128 dimensions) of the first fully connected layer of the regression decoding branch to the input of the classification decoding branch. This is then fused with the output vector of the shared feature projection layer to strengthen the feature association between the two branches and avoid the contradiction between the warning results and the environment level logic caused by feature fragmentation.
[0038] Step S11232: Design a regression decoding layer, determine the output dimension according to the warning parameters, adopt a multi-layer fully connected structure and regularization strategy, and output normalized meteorological warning results; Based on the inspection requirements, the output dimension of the regression decoding layer is set to 4, which correspond to the four core meteorological warning parameters of wind speed, precipitation, visibility, temperature and humidity in the next hour.
[0039] The regression decoding layer consists of two fully connected layers stacked together. The first fully connected layer has an input dimension of 256 and an output dimension of 128. The activation function is ReLU, which is used to discover the complex correlation between features and meteorological parameters. The second fully connected layer has an input dimension of 128 and an output dimension of 4, which directly corresponds to the predicted values of the four warning parameters.
[0040] A Dropout regularization module (with a dropout probability of 0.2) is connected between the two fully connected layers to avoid model overfitting; the output prediction values are normalized to the actual physical range of each parameter (wind speed: 0-60m / s; precipitation: 0-50mm / h; visibility: 0-10km; temperature and humidity: 0-100%) by using the Sigmoid activation function, and standardized weather warning results are output.
[0041] Step S11233: Construct an adaptive threshold comparison unit, dynamically adjust the threshold based on industry standards and regional characteristics, connect regression output and classification input, and provide quantitative basis; Based on the "Technical Specifications for Unmanned Aerial Vehicle Inspection of Water Conservancy Projects" and the meteorological risk characteristics of the inspection area, a basic threshold database is constructed: Standard Level Threshold: Wind speed < 6 m / s, precipitation < 2 mm / h, visibility > 5 km; Slightly Severe Threshold: 6 m / s ≤ wind speed < 10 m / s, 2 mm / h ≤ precipitation < 5 mm / h, 2 km < visibility ≤ 5 km; Moderately Severe Threshold: 10 m / s ≤ wind speed < 15 m / s, 5 mm / h ≤ precipitation < 10 mm / h, 1 km < visibility ≤ 2 km; Severely Severe Threshold: Wind speed ≥ 15 m / s, precipitation ≥ 10 mm / h, visibility ≤ 1 km.
[0042] A regional characteristic correction factor is introduced to adjust the basic threshold in real time according to the geographical characteristics of the inspection area (such as mountains, plains, and watersheds). In mountainous inspection areas, the wind speed threshold is lowered by 20% (e.g., the normal level wind speed threshold is changed to <4.8m / s); in rainy watersheds, the precipitation threshold is lowered by 30% (e.g., the normal level precipitation threshold is changed to <1.4mm / h). The correction factor is obtained by training with historical meteorological disaster data.
[0043] The warning parameter values output by the regression decoding layer are input into this unit and compared with the adaptively adjusted thresholds dimension by dimension to generate a binary judgment result of each parameter being within or exceeding the standard (e.g., if the wind speed is ≥4.8m / s, it is judged as exceeding the standard). At the same time, the number of parameters exceeding the standard and the magnitude of exceeding the standard are calculated (e.g., wind speed exceeding the standard magnitude = (actual value - threshold) / threshold), which serves as the quantitative basis for classification decoding.
[0044] Step S11234: Design a classification decoding layer, integrate multi-source input features, output environment level probability through a multi-layer fully connected structure, and add feature interaction channels to enhance cross-branch complementarity; The input to the classification decoding layer includes three types of data: the four warning parameter values output by the regression decoding layer, the binary judgment result (4-dimensional) of the adaptive threshold comparison unit, and the 256-dimensional feature vector of the shared feature projection layer; the three types of input are fused into a one-dimensional vector (4+4+256=264-dimensional) through the feature splicing layer.
[0045] The classification decoding layer consists of two fully connected layers. The first fully connected layer has an input dimension of 2^64 and an output dimension of 64, and uses ReLU as the activation function. The second fully connected layer has an input dimension of 64 and an output dimension of 4 (corresponding to 4 environment levels). It is connected to the Softmax activation function to output the probability values of each environment level (the sum of the probabilities is 1). The level corresponding to the maximum probability is selected as the final environment level output.
[0046] A feature interaction channel is added between the first fully connected layer of the classification decoding layer and the first fully connected layer of the regression decoding layer. An attention mechanism is used to dynamically allocate the weights of cross-branch features, so as to achieve complementarity between regression features and classification features and improve the accuracy of environmental level determination.
[0047] Step S11235: Employ a joint loss function and dynamic weight strategy, combined with end-to-end training and early stopping strategy, to achieve collaborative training between the decoding module and upstream and downstream modules; The regression loss and classification loss are integrated. The regression loss uses mean squared error (MSE) loss to calculate the error between the warning parameter value output by the regression decoding layer and the actual observation value. The classification loss uses cross-entropy loss to calculate the error between the level probability output by the classification decoding layer and the actual level label. The joint loss function is: total loss = ω1 × regression loss + ω2 × classification loss (ω1 and ω2 are weight coefficients).
[0048] The model training process is divided into three stages: the initial training stage (first 30 epochs): ω1=0.6, ω2=0.4, prioritizing the regression accuracy of the warning parameters; the middle training stage (31-60 epochs): ω1=0.5, ω2=0.5, balancing regression and classification effects; and the later training stage (61-100 epochs): ω1=0.4, ω2=0.6, focusing on optimizing the accuracy of environmental level classification. Weight adjustments are made using linear interpolation for a smooth transition, avoiding training oscillations.
[0049] The hierarchical decoding module is integrated with the feature enhancement module and Transformer encoder module mentioned above into a complete model. End-to-end training is performed based on the labeled dataset (containing 100,000 sets of multi-source meteorological data and corresponding real labels). An early stopping strategy is adopted to monitor the validation set loss. If the validation set loss does not decrease for 10 consecutive epochs, training is stopped, the current optimal model parameters are saved, and overfitting is avoided.
[0050] Step S11236: Optimize the inference output logic by verifying the rationality of parameters, the consistency of levels, and correcting anomalies to ensure the reliability and logic of the output results.
[0051] The physical rationality of the warning parameter values output by the regression decoding layer is verified. If a parameter value exceeds the physical extreme range (e.g., wind speed > 60m / s, visibility < 0km), the anomaly correction mechanism is triggered, and the output is re-inferred based on the global fusion feature vector. If the re-inference is still abnormal, the best similar data from the same period in history is called to replace it and marked as pending verification.
[0052] Compare the environmental level output results of two adjacent inferences (with a 1-minute interval). If there is a sudden change in the level (such as jumping directly from "normal" to "severely severe"), the parameter change range of the regression decoding layer is retrieved. If the parameter change range does not reach the level change threshold (such as wind speed change < 5 m / s), the previous level result is output and marked as abnormal. At the same time, it is pushed to the ground control terminal to remind the operation and maintenance personnel to check.
[0053] The final output weather warning results and environmental levels are accompanied by a confidence score (range 0-100). Results with a confidence score ≥80 are directly used for flight parameter adaptation; results with a confidence score <80 need to be judged in conjunction with human experience to ensure the reliability and logic of the output results.
[0054] Step S1124: Train the model using a joint loss function based on the labeled dataset, and combine multiple techniques to perform lightweight optimization of the model to improve inference efficiency; The dataset covers multi-source meteorological data from different regions (mountains, plains, watersheds), different seasons (spring, summer, autumn, winter), and different weather types (sunny, cloudy, rainy, snowy, haze), totaling 100,000 samples. Each sample includes preprocessed multi-source meteorological data, manually labeled real meteorological parameter values, and environmental level labels. The dataset is divided into training set, validation set, and test set in a 7:2:1 ratio.
[0055] Using the joint loss function and dynamic weight strategy described in step S11235, the model is trained using the Adam optimizer (with an initial learning rate of 1e-4, which decays to 0.9 of the original rate every 20 epochs). The training iterations are 100 epochs, and the batch size is set to 32 to ensure model convergence.
[0056] Three core technologies are employed to improve inference efficiency: first, model pruning: structured pruning of the fully connected layers of the Transformer encoder and decoder layers, removing connections with absolute weight values less than a threshold (1e-5), reducing model parameters by 40%; second, quantization optimization: quantizing model parameters from 32-bit floating-point to 16-bit integer, reducing memory usage and computation; and third, operator fusion: fusing consecutive operators such as "convolution + batch normalization" and "fully connected + activation function" into a single operator, reducing inference latency. The optimized model's inference time is reduced from 500ms to less than 100ms, meeting the real-time requirements of airborne edge units.
[0057] Step S1125: Deploy the lightweight model on the airborne edge unit, trigger inference before takeoff, and implement backup and verification mechanisms to ensure that the process is completed on time and the results are reliable.
[0058] The lightweight Transformer fusion model was converted to ONNX format and deployed on an onboard edge computing unit (NVIDIA Jetson XavierNX) in a drone. This unit is equipped with a quad-core Cortex-A57 CPU and a Volta architecture GPU, supporting INT8 quantization inference to meet the computing power requirements for model operation.
[0059] The inference process is triggered when the UAV completes its power-on self-test, the battery level is ≥80%, and the ground control terminal issues a "takeoff preparation" command. After triggering, the edge computing unit automatically reads the pre-processed multi-source meteorological data and starts model inference. The entire process must be completed within 10 minutes before takeoff. If the time limit is exceeded, an emergency warning will be triggered to remind the operator to check the equipment.
[0060] Dual backup is configured: Local backup: The edge unit stores two versions of the model (the current best version + the historical stable version). If the current version fails to infer, it will automatically switch to the historical version. Cloud backup: Preprocessed data is synchronized to the cloud server via 5G communication. If the onboard edge unit fails, the cloud server will complete the inference and send the results back. Verification mechanism: The local inference results are compared with the cloud inference results (if the cloud is available). If the error is ≤5%, it is considered reliable. Otherwise, a second inference is triggered to ensure the accuracy of the results.
[0061] Step S113: Construct a mapping library between weather levels and flight parameters and call the basic configuration. Combine real-time feedback with the control algorithm to dynamically adjust the parameters. An environmental level and flight parameter mapping library was constructed to define the basic flight parameter configurations for different environmental levels: Normal level: flight altitude 100m, speed 10m / s, gimbal pitch angle -15°, camera exposure time 1 / 500s; Slightly severe level: flight altitude 120m, speed 7m / s, gimbal pitch angle -10°, exposure time 1 / 300s; Moderately severe level: flight altitude 150m, speed 5m / s, gimbal pitch angle -5°, exposure time 1 / 200s; Severely severe level: flight altitude 200m, speed 3m / s, gimbal pitch angle 0°, exposure time 1 / 100s; The mapping library supports manual updates via ground control terminal.
[0062] Based on the environment level output in step S112, the edge computing unit automatically retrieves the corresponding basic flight parameters from the mapping library and sends them to the drone flight control system (such as the DJI A3 flight control system) to complete the initial parameter configuration.
[0063] By combining real-time feedback from airborne sensors (such as the fuselage attitude collected by the IMU and the position information collected by GPS), a PID control algorithm is used to dynamically fine-tune flight parameters. For example, when the fuselage attitude angle deviation is greater than 3°, the flight speed is reduced by 20%; when the GPS signal strength is less than -100dBm, the flight altitude is increased by 10m to enhance the signal; and the frequency is adjusted to 10Hz to ensure the stability of the UAV flight.
[0064] Step S114: Integrate the multispectral imaging unit and lidar and collect data synchronously, optimize parameters according to weather type and ensure image alignment accuracy through gimbal stabilization; The multispectral imaging unit (model Parrot Sequoia) and the lidar (model Velodyne VLP-16) are integrated through the standard interface of the UAV body. The sampling clocks of the two are synchronized through the GPIO interface to ensure that the timing alignment error between the image and the point cloud data is ≤10ms. The multispectral imaging unit acquires images in three bands: visible light (450-500nm), near-infrared (770-810nm), and red edge (660-680nm). The lidar has a ranging range of 0.5-100m and a point cloud density of 300,000 points / second.
[0065] Based on the weather warning results output in step S112, optimize the imaging parameters: for sunny days: increase the weight of the visible light band (0.6) and reduce the exposure time (1 / 1000s) to avoid overexposure; for cloudy days: increase the weight of the near-infrared band (0.5) and increase the exposure time (1 / 200s) to improve image brightness; for rainy or snowy days: enable the anti-reflection mode of the multispectral imaging unit and enable the raindrop filtering algorithm of the lidar to reduce rain and snow interference.
[0066] The system employs a three-axis mechanical gimbal (model DJIRonin-S) equipped with a multispectral imaging unit and a lidar. The gimbal has a built-in gyroscope and accelerometer to detect changes in the pitch, roll, and yaw angles of the aircraft in real time, and compensates for attitude deviations through motor drive (compensation accuracy ±0.01°). At the same time, it generates a terrain elevation map based on the point cloud data of the lidar and dynamically adjusts the gimbal pitch angle to ensure that the shooting angle of the multispectral image is always perpendicular to the surface of the inspected target, with an image alignment accuracy error of ≤2 pixels.
[0067] Step S115: Generate a fused image using a CNN pixel-level fusion algorithm, and automatically identify and repair image distortion using a diffusion model repair module; A CNN fusion model with a U-Net structure is adopted as input, taking three bands of multispectral image data and a depth map generated by LiDAR point cloud. The encoder of the model extracts the features of each input data (such as texture features of visible light image, vegetation features of near-infrared image, and three-dimensional structural features of depth map). The decoder assigns weights to different inputs through a pixel-level attention mechanism (such as increasing the weight of visible light in areas with clear texture and increasing the weight of near-infrared in areas with vegetation), generating a fused image with a resolution of 1280×960. The information entropy of the fused image is increased by more than 30% compared with the single-band image.
[0068] A repair module based on the Denoising Diffusion Probability Model (DDPM) is employed. After inputting the fused image, a noise prediction network automatically identifies distorted areas (such as those caused by rain / snow occlusion, fog / haze blurring, and uneven lighting). Differentiated repair strategies are adopted for different types of distortion: rain / snow occlusion: texture information of the occluded area is filled in using a generative model; fog / haze blurring: detail enhancement is achieved using a multi-scale dehazing algorithm combined with a diffusion model; uneven lighting: shadow areas are repaired through brightness equalization processing. During the repair process, the 3D structure of the LiDAR point cloud is used as a constraint to ensure that the repaired image is consistent with the actual scene.
[0069] Step S116: Verify the image quality indicators after repair. If the indicators meet the standards, the image is transmitted to subsequent modules. If the indicators do not meet the standards, a secondary optimization is triggered or an early warning is output to adjust the inspection strategy.
[0070] Three core quality indicators were defined: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Information Entropy. The thresholds for achieving these indicators were: PSNR ≥ 30dB, SSIM ≥ 0.8, and Information Entropy ≥ 7.5. The OpenCV open-source library was used to calculate the three indicators of the restored image, and the verification process took ≤ 50ms.
[0071] If all three indicators meet the standards, the fused image and repair results are transmitted to the ground control terminal and cloud server via 5G communication for subsequent defect identification modules (such as crack and leakage detection).
[0072] If any indicator fails to meet the standard, a secondary optimization is triggered first—adjusting the repair parameters of the diffusion model (such as increasing the number of denoising iterations from 100 to 150) to repair the image again; if the secondary optimization still fails to meet the standard (PSNR < 25dB, SSIM < 0.7), an early warning message (including the non-compliant indicators and reasons) is output to the ground control terminal, prompting the operator to adjust the inspection strategy. Optional strategies include: increasing the flight altitude to avoid areas with severe weather, adjusting the flight route to areas with better lighting conditions, and suspending the inspection until the weather improves before restarting.
[0073] Step S120: Construct a dual-feature constrained deep learning model, and combine real-time illumination dynamic calibration and transfer learning to improve the accuracy of defect identification in illumination change scenarios; In this embodiment, a dual-feature constraint deep learning model is deployed on the UAV's onboard edge computing unit (model: NVIDIA Jetson Orin NX, equipped with a 1024-core CUDA GPU, computing power 200 TOPS). The real-time illumination dynamic calibration module is deployed in parallel with the model, and data interaction is achieved through a standardized interface. Transfer learning is optimized based on publicly available pre-trained models to adapt to the specific scenario of water conservancy defect identification. The overall technical logic is as follows: the images collected by the UAV are first processed by the real-time illumination calibration module to eliminate illumination interference, and then input into the dual-feature constraint model to extract core features. Combined with the parameters optimized by transfer learning, defect identification is completed, and finally the defect type (crack, honeycomb surface, leakage), location coordinates, and confidence level are output. For complex illumination scenarios such as strong backlight, weak light, and shadow occlusion, the collaborative optimization of the calibration module and the model ensures that the recognition accuracy is improved by ≥15% compared with traditional models.
[0074] Step S121: Identify defect features, build a dual-branch lightweight convolutional neural network architecture, and achieve preliminary differentiation between defects and shadows by fusing dual-branch features; The core features of surface defects in hydraulic engineering projects are divided into two categories: ① Geometric features: linear continuity of cracks, width gradient range (0.1-5mm), and irregular contour; pore distribution density and pore size (2-20mm) of honeycomb-like pitted surfaces; irregular diffusion pattern and edge blurring of leakage traces. ② Illumination-independent features: gray-level gradient difference between the defect area and the background, texture entropy value, and local contrast (inherent features unaffected by changes in illumination intensity). By manually annotating 10,000 typical defect images, the quantization ranges of these two types of features were statistically analyzed, serving as a reference benchmark for model feature learning.
[0075] Based on the MobileNetV3-Small backbone network (with ≤3 million parameters, adaptable to edge computing power), a parallel dual-branch structure is designed: After the last convolutional layer of the backbone network, the edge detection sub-network (using the improved Canny operator and adaptively adjusting the threshold) is connected in series with the skeleton extraction layer (based on the Zhang-Suen thinning algorithm) to extract the geometric topological features of the defects and output a 256-dimensional geometric feature vector. Replace the light-sensitive max pooling layer in the backbone network with an adaptive mean pooling layer, and add a feature extraction sub-layer based on the CIELAB color space (convolution operation is only performed on the ab channels to shield the light interference of the brightness L channel), outputting a 256-dimensional light-independent texture feature vector. A channel attention weighted fusion layer (SE module) is used to integrate the dual-branch feature vectors (total dimension 512). The core features are strengthened by adaptively allocating weights (geometric feature weight 0.4-0.6, illumination-independent feature weight 0.4-0.6, dynamically adjusted according to illumination intensity). The fused feature vector is input into the classification head (containing 1 fully connected layer + Softmax activation) and outputs preliminary judgment results of three categories: defects, shadows, and background, laying the foundation for subsequent accurate recognition.
[0076] Step S122: Design a real-time illumination calibration module, which reduces the interference of illumination changes on defect identification by collecting parameters by sensors, dynamic threshold segmentation, and branch calibration sub-layers. Step S1221: Deploy a multi-dimensional illumination parameter acquisition unit and perform preprocessing. Integrate illumination-related sensors at the drone's adaptation location to synchronize the sensor sampling frequency with the image acquisition frame rate to achieve time alignment. Perform filtering, noise reduction, and normalization processing on the acquired illumination parameters in sequence, while removing abnormal parameter values to ensure parameter validity. At the unobstructed front end of the drone gimbal, a light intensity sensor (model: TSL2591, range 0-188000 lux, accuracy ±1%) and a color temperature sensor (model: TCS34725, range 2000-10000K, accuracy ±50K) are integrated. The sensor sampling frequency is synchronized with the drone's image acquisition frame rate (15fps) and communicates with the onboard edge unit via an I2C interface to ensure that the illumination parameters and image data are time-series aligned (timestamp error ≤1ms).
[0077] ① Filtering and denoising: A moving average filtering algorithm (window size of 5 frames) is used to remove high-frequency noise in the illumination parameters and smooth data fluctuations; ② Normalization: Light intensity (0-188000 lux) and color temperature (2000-10000K) are mapped to the [0,1] range through minimum-maximum normalization to eliminate dimensional differences; ③ Outlier removal: Anomalies (such as invalid values with instantaneous light intensity > 200000 lux and color temperature < 1800K) are removed using the 3σ criterion. If anomalies occur in 3 consecutive frames, the valid parameters of the previous frame are automatically used as a temporary substitute.
[0078] Step S1222: Construct a dynamic mapping model between illumination parameters and image grayscale thresholds. Collect image samples covering multiple time periods, multiple weather conditions, and multiple illumination angles. Associate the illumination parameters corresponding to the samples with the manually labeled optimal grayscale thresholds. Train the mapping model with the preprocessed illumination parameters as input and the optimal grayscale thresholds as output. Optimize the model through cross-validation. Solidify the model into an incrementally updatable mapping table and store it. A total of 50,000 images of water conservancy facilities were collected, covering multiple scenarios including: ① Time periods: early morning (6:00-8:00), noon (12:00-14:00), and evening (18:00-20:00); ② Weather: sunny, cloudy, partly cloudy, and light rain; ③ Lighting angles: front lighting (0°), side lighting (90°), and backlighting (180°). Each sample was associated with corresponding lighting parameters (light intensity and color temperature) and a manually annotated optimal grayscale threshold (a critical value used to accurately distinguish between defects and shadows, with an annotation accuracy of ±1 grayscale level).
[0079] Using normalized light intensity and color temperature as input features and the optimal grayscale threshold as the output label, a dynamic mapping model is trained using Gradient Boosting Tree (GBDT). The model's hyperparameters are optimized through 5-fold cross-validation (100 decision trees, maximum depth 8) to ensure the model's prediction error is ≤2 grayscale levels. The trained model is then stored as a "lighting parameter-grayscale threshold" mapping table in the local flash memory of the onboard edge unit (capacity ≥16GB), supporting incremental updates to the mapping table based on new samples (every 1000 samples accumulated).
[0080] Step S1223: Perform dynamic thresholding and false defect removal before image input. In real time, retrieve the grayscale threshold that matches the current illumination parameters. Use an improved adaptive thresholding algorithm combined with dynamic window adjustment to perform binarization segmentation on the image. Remove small-area false defect regions through morphological operations, retain connected regions that meet the defect characteristics, and generate an effective image. After the raw images (1920×1080 resolution) captured by the drone are transmitted to the edge unit, the preprocessed illumination parameters are read in real time, and the appropriate grayscale threshold is quickly retrieved by looking up a table (query time ≤1ms).
[0081] An improved OTSU adaptive threshold segmentation algorithm is adopted, which uses the retrieved grayscale threshold as the initial threshold and dynamically adjusts the segmentation window size by combining the local grayscale mean of the image (the window for high-defect areas is set to 3×3, and the window for the background area is set to 9×9) to improve the segmentation accuracy; the image is binarized (the foreground is the candidate area for defects, and the background is the non-defect area).
[0082] Morphological opening operations (convolution kernel size 5×5) are used to remove small gray-scale abnormal regions (pseudo-defects such as shadow spots and noise points with an area of <20 pixels); connected regions that conform to the geometric characteristics of defects (such as the linear connectivity of cracks and the closure of holes) are retained to generate effective images (containing only candidate defect regions and background), reducing the amount of data processed by subsequent models.
[0083] Step S1224: Design the calibration sub-layer of the illumination feature branch and implement feature processing. The calibration sub-layer includes parameter encoding, feature fusion and attention weight adjustment modules. The parameter encoding module converts the normalized illumination parameters into feature vectors of the appropriate dimension. The feature fusion module fuses the feature vectors with the illumination-independent texture feature vectors. The attention weight adjustment module then dynamically allocates the fused feature weights based on the illumination intensity to counteract the effects of illumination distortion. The calibration sublayer is integrated at the end of the illumination-independent feature constraint branch and contains three core modules: The normalized lighting parameters are converted into a lighting feature vector with the same dimensions as the texture feature vector (256 dimensions) by a single fully connected layer (input dimension 2, output dimension 256), and the activation function is GELU. The illumination feature vector and the texture feature vector extracted from the CIELAB color space ab channels are fused by element-wise addition, preserving the core texture information while incorporating illumination-related features; Attention weight adjustment module: Based on real-time light intensity values, the fusion feature weights are dynamically allocated. When the light intensity is <500 lux (weak light), the texture feature weight is set to 0.8 and the illumination feature weight is set to 0.2; when the light intensity is 500-50000 lux (normal light), the weight is balanced at 0.5; when the light intensity is >50000 lux (strong light), the texture feature weight is set to 0.6 and the illumination feature weight is set to 0.4, thereby offsetting texture distortion under different lighting conditions.
[0084] Step S1225: Build a module integration architecture and optimize the real-time adaptation logic. Integrate the acquisition unit, segmentation module and calibration sub-layer to build an end-to-end calibration module. Design a complete data flow link. Perform lightweight optimization on the threshold segmentation algorithm and calibration sub-layer to meet real-time requirements. At the same time, set up a parameter caching mechanism to ensure continuous operation of the module when the sensor fails. The illumination parameter acquisition unit, dynamic threshold segmentation module, and calibration sub-layer are integrated into an end-to-end real-time illumination calibration module through a standardized data bus (PCIe4.0). The data flow link is designed as follows: sensor acquisition parameters, preprocessing module, mapping table lookup, dynamic threshold segmentation, effective image generation, input dual feature model, calibration sub-layer feature fusion, and output calibrated feature vector.
[0085] To address the computational limitations of edge units, the threshold segmentation algorithm (quantized to INT8 precision) and the fully connected calibration sublayer (optimized with sparse matrix) are lightweighted to ensure that the calibration time for a single frame image is ≤15ms (meeting the real-time processing requirement of 15fps).
[0086] A parameter caching mechanism is set up to cache the illumination parameters and adaptation thresholds of the most recent 5 frames. If the sensor experiences a temporary failure (such as a communication interruption), the average value of the cached parameters is automatically called to complete the threshold matching, ensuring continuous operation of the module. After the failure is resolved, the latest parameters are automatically synchronized.
[0087] Step S1226: Conduct calibration effect verification and dynamic iterative optimization, set verification indicators, select multiple typical lighting scenarios for actual measurement; supplement samples based on actual measurement results to update the mapping model, adjust weight allocation rules, and periodically calibrate the sensor.
[0088] ① False defect removal rate (target ≥95%); ② Feature extraction stability under varying illumination (passing grade is defined as the cosine similarity between the calibrated feature vector and the feature vector under standard illumination ≥0.9). Ten typical illumination scenarios (weak dawn, strong midday, backlit dusk, hazy days, etc.) were selected for testing, with 1000 images tested for each scenario.
[0089] If the false defect removal rate of a certain scene is <95%, extract the misjudged samples of that scene (such as shadows being misjudged as defects) to supplement the training set of the mapping model, retrain and update the mapping table; if the feature similarity is <0.9, adjust the attention weight allocation rule of the calibration sub-layer (such as further increasing the texture feature weight to 0.9 in low light scenes); calibrate the light intensity and color temperature sensors once every quarter (using a standard light source calibrator) to correct parameter acquisition deviations.
[0090] Step S123: Construct a comparison dataset, adopt a transfer learning strategy of pre-training and incremental fine-tuning, and combine difficult example mining to optimize the recognition accuracy of easily confused samples; A total of 150,000 images of water conservancy facilities were collected under different lighting conditions (low light, normal light, strong light, backlight) and different defect types (cracks, honeycomb pitting, leakage). These included 80,000 defect samples, 40,000 shadow samples, and 30,000 background samples. All samples were manually labeled (labeling accuracy ±2 pixels) and divided into training, validation, and test sets in a 7:2:1 ratio. An additional 10,000 easily confused samples (such as fine cracks and shallow shadows, wet surfaces and leakage marks) were collected to construct a separate difficult-example sample library.
[0091] ① Pre-training stage: The MobileNetV3-Small model pre-trained on the ImageNet dataset was selected as the initial weights. The first 8 layers of the backbone network were frozen (preserving general feature extraction capabilities). Only the dual-branch feature extraction layer, fusion layer, and classification head were trained. The model was pre-trained on the comparison dataset for 20 epochs to learn the basic feature differences between defects and shadows. ② Incremental fine-tuning stage: The training set was divided into 3 subsets according to the light intensity range (weak light <1000 lux, normal light 1000-50000 lux, strong light >50000 lux). Fine-tuning was performed sequentially—first, the weights of the light feature constraint branch were fixed, and only the geometric feature constraint branch was fine-tuned (10 epochs); then, the dual-branch joint fine-tuning was unlocked (20 epochs) to adapt to the feature distribution under different lighting conditions.
[0092] During training, a hard example mining mechanism is introduced to select samples with a classification head output probability between 0.4 and 0.6 (easily confused samples that are difficult for the model to distinguish), retrieve them from the hard example sample library and expand them into the training set (updating hard example samples every 5 epochs). By increasing the training weight of hard example samples (weight coefficient 1.5), the recognition accuracy of easily confused samples such as fine cracks and shallow shadows is optimized.
[0093] Step S124: Design a joint loss function containing multiple types of losses, and combine it with a dynamic weight adjustment strategy to collaboratively constrain the model and enhance feature learning; Integrating three types of loss components, the collaborative constraint model learning direction: We employ weighted Dice loss, assigning a 1.5x weight to defect edge pixels to penalize pixel-level deviations in geometric feature extraction and ensure accurate defect contour extraction. Contrast loss is used to calculate the similarity of feature vectors of the same defective sample after calibration under different lighting conditions, penalizing cases with low similarity, and ensuring feature stability under changes in lighting. Focus loss (focus parameter γ=2, class balance coefficient α=0.25) is adopted to reduce the loss weight of easily classified samples (such as obvious defects and large-area shadows) and increase the learning priority of difficult-to-classify samples.
[0094] The model training process is divided into three stages, with dynamic allocation of loss weights (total weights sum to 1): ① Early training phase (1-20 epochs): Geometric feature constraint loss weight 0.5, illumination feature constraint loss weight 0.3, classification loss weight 0.2, prioritizing the strengthening of core feature extraction capabilities; ② Mid-training phase (21-40 epochs): Weights are adjusted to 0.3, 0.4, and 0.3, balancing feature stability and classification accuracy; ③ Late training phase (41-60 epochs): Weights are adjusted to 0.2, 0.3, and 0.5, focusing on optimizing the classification of difficult examples. Linear interpolation is used for smooth transitions in weight adjustments to avoid training oscillations.
[0095] Step S125: Optimize the inference process. First, perform illumination calibration before inputting into the model. Then, make judgments based on probability interval differences. Feedback of erroneous samples enables continuous model optimization. The design incorporates a three-tiered inference chain: calibration, identification, and verification. ① First tier: The raw images captured by the UAV are input into the real-time illumination calibration module to complete threshold segmentation and feature calibration. ② Second tier: The calibrated valid images are input into a dual-feature constraint model. Features are extracted and fused from both branches, and the classification head outputs three probability values: "defect," "shadow," and "background." ③ Third tier: Differentiated judgment logic is triggered based on probability intervals—high probability intervals (≥0.8) directly output the judgment result; medium probability intervals (0.4-0.8) call the defect geometric feature template library (containing standard geometric parameters for different defects) for secondary verification (e.g., matching the linearity of cracks and the roundness of holes); low probability intervals (<0.4) are directly judged as non-defects (shadow or background).
[0096] During inference, incorrectly judged samples are manually reviewed and marked (e.g., defects are misjudged as shadows, and shadows are misjudged as defects). These samples are automatically stored in the temporary cache of the airborne edge unit. After the UAV completes the inspection mission and returns, it uploads the incorrect samples to the cloud server via Ethernet to supplement the comparison dataset. Every 5,000 incorrect samples are accumulated, the model incremental fine-tuning is initiated (5 epochs) to update the model parameters of the airborne edge unit and achieve continuous optimization of model performance.
[0097] Step S126: Construct a performance verification and closed-loop optimization mechanism through indicator testing, sample supplementation, equipment calibration, and architecture iteration.
[0098] ① Defect recognition accuracy (target ≥ 92%); ② Shadow false positive rate (target ≤ 3%); ③ Inference latency (target ≤ 30ms / frame). Tests were conducted using measured data (30,000 images) from different lighting scenarios (low light, strong light, backlight) and different types of water conservancy facilities (earth-rock dam, concrete dam, hydropower plant), covering harsh environments such as high temperature (>40℃), high humidity (relative humidity > 90%), and strong electromagnetic interference.
[0099] ① Sample Supplementation and Optimization: If the recognition accuracy in a certain lighting range (such as backlight) is <85%, extract all test samples in that range, supplement them to the comparison dataset, and fine-tune the model; ② Equipment Calibration: Perform a comprehensive calibration of the airborne light intensity sensor, color temperature sensor, and multispectral imaging unit every quarter to correct hardware acquisition deviations; ③ Architecture Iteration: Optimize the model architecture based on test results, such as adding an infrared feature extraction sublayer for low-light scenarios and further lightweighting the backbone network for high-concurrency scenarios (such as using MobileNetV4-Nano); ④ Operation and Maintenance Monitoring: Build a cloud monitoring platform to collect real-time statistics on the recognition indicators and equipment working status of each inspection task. When the indicators fail to meet the standards or the equipment is abnormal, automatically push alarm information to the operation and maintenance terminal to guide on-site optimization.
[0100] Step S130: Establish a standardized sensor communication system, use protocol adaptation technology to be compatible with existing equipment, and rely on collaborative learning to achieve dynamic calibration of sensor accuracy and collaborative operation; In this embodiment, the standardized sensor communication system is adapted to various types of sensors (light, temperature and humidity, wind speed, strain, displacement sensors, etc.) in water conservancy inspection scenarios, covering newly purchased standardized sensors and existing old sensors (such as early deployed analog sensors). The collaborative learning is based on the federated learning framework to realize the accuracy self-calibration and collaborative operation of the distributed sensor network. The overall architecture is deployed on three levels of nodes: sensors, edge gateways, and cloud servers, ensuring stable data transmission, device compatibility and adaptation, and accurate collaborative operation of sensors.
[0101] Step S131: Establish a standardized communication system framework, clarify protocols, formats and processes, and build a three-level communication architecture to ensure stable transmission; The MQTT 3.1.1 protocol is selected as the basic communication protocol (low power consumption, suitable for IoT scenarios), supplemented by the OPCUA protocol to achieve highly reliable data interaction between the cloud and the edge. A unified data transmission format is defined: data is encapsulated in JSON format, with clearly defined fields including "Device ID, Sensor Type, Acquisition Timestamp (format: YYYY-MM-DDHH:MM:SS.XXX), Acquisition Value, Data Quality Code (0-Normal / 1-Abnormal), Checksum". Standard processes are established: ① Device registration process (after the sensor connects to the edge gateway, it automatically reports device information, and after review by the cloud, a unique ID is assigned); ② Data reporting process (the sensor reports data at a preset frequency, and the edge preprocesses the data before synchronizing it to the cloud); ③ Command issuance process (the cloud / edge issues calibration and parameter adjustment commands according to permissions, and the sensor executes the commands and provides feedback on the results); Protocol extension fields (such as sensor health status) are reserved to adapt to future additions of sensor types.
[0102] ① Perception Layer (Sensor End): Various sensors connect to the edge gateway via RS485, CAN, WiFi, and other interfaces; ② Network Layer (Edge Gateway): Employs an industrial-grade edge computing gateway (model: Huawei AR550), integrating a multi-protocol conversion module and a local caching unit to achieve sensor data aggregation and preprocessing; ③ Application Layer (Cloud): Deploys a distributed server cluster (Alibaba Cloud ECS, 8-core 16GB configuration) responsible for data storage, model training, and global management. The architecture adopts a redundant design, with a local cache capacity of ≥32GB at the edge, supporting caching of 12 hours of data during network outages and automatic retransmission after network recovery.
[0103] Step S132: Develop multi-protocol adaptation middleware to adapt to existing device protocols, and verify through testing that it achieves seamless integration with the new system; A comprehensive review of existing sensor equipment in water conservancy projects was conducted to identify the supported communication protocol types, including Modbus RTU (approximately 40%), ZigBee (approximately 25%), LoRa (approximately 20%), and three types of proprietary protocols (old strain sensors and displacement sensors). Core parameters such as frame structure, baud rate, data bits, and verification methods for each protocol were recorded.
[0104] Adopting a modular design, the middleware is deployed at the edge gateway and includes a protocol identification module, a parsing plugin library, a data conversion module, and a logging module. ① Protocol identification module: Automatically identifies the protocol type of the access device through port scanning and frame header feature matching (such as Modbus RTU frame header 0x01), with an accuracy rate of ≥99%. ② Parsing plugin library: Develops dedicated parsing plugins for each protocol (such as the Modbus RTU plugin supporting coil register and input register parsing). For three types of private protocols, it obtains communication data through packet capture tools, reverse analyzes the frame structure (including address code, function code, data length, and checksum), and develops dedicated adaptation modules. ③ Data conversion module: Maps the parsed non-standard data (such as analog voltage values) to the standardized JSON format to ensure consistency with the new system's data format.
[0105] A compatibility testing platform was built to simulate communication scenarios of existing devices (different baud rates, transmission distances, and interference environments). Twenty typical existing sensors were selected for testing. Test indicators included protocol recognition success rate (target ≥ 99.5%), data parsing accuracy (error ≤ 0.5%), and access latency (≤ 100ms). For parsing anomalies that occurred during testing (such as frame loss due to long-distance transmission), the fault tolerance mechanism of the plugin was optimized (by adding frame retransmission and verification logic), ultimately achieving seamless integration between existing devices and the new communication system.
[0106] Step S133: Construct a collaborative learning framework, divide core and edge nodes, and design a hierarchical data sharing mechanism to support calibration model training; ① Core nodes: Deployed on a cloud server cluster, equipped with high-performance GPUs (NVIDIA A100), responsible for training, parameter aggregation, and distribution of the global calibration model; ② Edge nodes: Deployed at edge gateways in each water conservancy inspection area (one per area), equipped with lightweight computing units (Intel Core i5), undertaking local sensor data preprocessing, model fine-tuning, and feature extraction tasks; Sensor terminals, as data acquisition nodes, are only responsible for data acquisition and basic preprocessing (denoising), and do not participate in model training, reducing the computing power pressure on the terminals.
[0107] ① Local Preprocessing Layer: Edge nodes clean (remove outliers using the 3σ criterion), normalize, and extract data features (such as sensor error trends and environmental correlation features) from the raw data collected by the sensors. Only the feature data is uploaded to the core node to avoid bandwidth consumption caused by the large-scale transmission of raw data, while protecting data privacy. ② Feature Aggregation Layer: The core node integrates the feature data uploaded by each edge node to build a global feature dataset for training the global calibration model. ③ Data Feedback Layer: The core node distributes the trained model parameters to each edge node, and the edge nodes further fine-tune them by combining them with local data, forming a closed-loop data flow of "local-global-local".
[0108] Step S134: Implement dynamic calibration based on federated learning, and optimize accuracy through model distribution, local fine-tuning, parameter aggregation and updating; The basic calibration model (using a gradient boosting tree model) is trained using historical calibration data (calibration records from the past 3 years, including standard and measured values) from each sensor. The model inputs are sensor measurements and environmental parameters (temperature, humidity, and light intensity), and the output is the accurate calibrated values. The basic model parameters are distributed to each edge node as initial parameters for local fine-tuning.
[0109] ① Local Fine-tuning: Each edge node uses real-time data collected by local sensors (accumulating 1000 sets per hour) to fine-tune the basic model locally, calculates the calibration error (the deviation between the measured value and the calibrated value), and only uploads the model parameters (not the raw data) to the core node once per hour; ② Parameter Aggregation: The core node uses a weighted average algorithm to aggregate the model parameters of each edge node. The weighting coefficients are dynamically allocated based on the historical accuracy performance of the sensors (sensors with high accuracy have a weight ≥0.8) and data quality (sensors with data integrity ≥95% have a 20% weight increase) to generate the globally optimal calibration model; ③ Model Update: The core node distributes the global model parameters to each edge node, and the edge nodes update their local models for subsequent calibration, realizing dynamic optimization of sensor accuracy; if the sensor data of a certain edge node is abnormal (e.g., 10 consecutive sets of data with an error >5%), its parameter weight is temporarily increased (+0.1), prioritizing the optimization of the calibration accuracy of that sensor.
[0110] Step S135: Design a collaborative scheduling mechanism to manage sensor operating parameters and combine correlation analysis and load balancing to ensure system stability; Based on the needs of water conservancy inspection tasks (such as dam crack monitoring and reservoir water level monitoring), the core node sends collaborative instructions to each sensor through the standardized MQTT protocol, specifying the sensor's sampling frequency (e.g., 10Hz for crack monitoring strain sensors and 1Hz for conventional temperature and humidity sensors), data reporting priority (high priority: defect-related data, reporting cycle 1s; low priority: environmental background data, reporting cycle 30s), and working sequence (to avoid network congestion caused by multiple sensors reporting simultaneously).
[0111] Establish a sensor data correlation analysis model to explore the inherent correlations between different types of sensor data (such as the correlation between wind speed sensor and light sensor data, and the coordinated change patterns of strain sensor and displacement sensor data); when a sensor shows data anomalies (such as sudden changes in strain values), cross-validation is performed by combining the data of related sensors—if the related data are synchronously abnormal, it is determined to be a device failure and a maintenance alarm is triggered; if only a single sensor is abnormal, the data is corrected through a collaborative calibration model to ensure data reliability.
[0112] Edge nodes monitor the workload (sampling frequency, data transmission volume) of each sensor in real time. When some sensors are under high load (e.g., sampling frequency of 10Hz for 1 hour), the operating parameters of other idle sensors are dynamically adjusted (e.g., the sampling frequency of temperature and humidity sensors in adjacent areas is increased from 1Hz to 2Hz) to share the data acquisition task. At the same time, the data forwarding queue of the edge gateway is optimized (using a priority queue, with high-priority data being forwarded first) to avoid transmission delays caused by excessive gateway load.
[0113] Step S136: Build a monitoring platform to realize status monitoring, anomaly alarms and remote upgrades, and continuously optimize protocol and model parameters; A cloud-based monitoring platform built on a B / S architecture supports access from both web and mobile devices. Its core functional modules include: ① Status Monitoring Module: Real-time display of communication status (connection status, transmission latency, data loss rate), protocol compatibility (protocol type, parsing success rate), and calibration accuracy (calibration error, accuracy level) for each sensor, with a data refresh rate of 1 second / time; ② Anomaly Alarm Module: Setting alarm thresholds (e.g., communication latency > 500ms, calibration error > 3%, protocol parsing failure > 3 times). When a threshold is triggered, alarm information is automatically pushed to maintenance personnel via SMS and the app, while simultaneously recording alarm logs (including time, device ID, and anomaly type); ③ Remote Upgrade Module: Supporting remote OTA upgrades for protocol adaptation middleware and collaborative learning models. After maintenance personnel upload the upgrade package, the platform upgrades in batches according to the order of "edge node → sensor terminal," retaining backup versions during the upgrade process. If the upgrade fails, it automatically rolls back to prevent device failure.
[0114] The platform regularly (weekly) collects communication logs, calibration data, and parsing error data from sensors. Through the data analysis module, it identifies areas for optimization. If the parsing error of a certain protocol is too high (>1%), the algorithm logic of the corresponding parsing plugin is optimized. If the accuracy of the collaborative calibration model decreases in a certain environment (e.g., high temperature >40℃), the model is retrained with sample data from that environment, and the model parameters are updated. An optimization report is generated every quarter to guide the iterative upgrade of protocol adaptation algorithms and collaborative learning models.
[0115] Step S137: Conduct full-scenario verification, optimize the system for the problems, and supplement the adaptation types to expand the coverage of the communication system.
[0116] Deployment tests were conducted in different water conservancy scenarios (earth-rock dams, concrete dams, hydropower plant buildings, reservoir areas) and different environmental conditions (high temperature, high humidity, strong electromagnetic interference, remote areas without public network). The test equipment included newly purchased standardized sensors (15 types) and existing sensors (20 types). The core test indicators included: communication stability (data transmission success rate ≥99.8%), protocol adaptation success rate (≥99.5%), sensor calibration accuracy (error ≤2%), and collaborative work efficiency (gateway latency ≤200ms after load balancing).
[0117] The following optimizations were made to address the issues identified during testing: ① Unstable communication in remote areas: A new satellite communication module interface was added, and the communication switching logic of the edge gateway was optimized; ② Difficulty in adapting some outdated proprietary protocols: The reverse parsing algorithm was further optimized, and a dedicated adaptation module was added; ③ Decreased sensor calibration accuracy in high-temperature environments: The environmental adaptability characteristics of the collaborative learning model were optimized, and high-temperature scenario samples were added; In conjunction with the new sensor requirements of water conservancy projects (such as water quality sensors and vibration sensors), corresponding protocol adaptation plugins and data format definitions were added to expand the coverage of the standardized communication system and achieve compatibility with all types of sensors used in water conservancy inspections.
[0118] Step S140: Adopt an onboard preprocessing, edge, and cloud-based hierarchical processing architecture, coupled with a hybrid transmission scheme; In this embodiment, the hierarchical processing architecture is adapted to the drone water conservancy inspection scenario. The airborne end is deployed on the drone (DJI M300 RTK) and is responsible for front-end data reduction and preprocessing. The edge end is deployed on the edge gateway near the inspection area and is responsible for real-time processing and decision-making. The cloud end is deployed in a remote data center and is responsible for in-depth analysis and global optimization. The hybrid transmission scheme combines 5G, WiFi, satellite communication and wired Ethernet, and dynamically adapts according to data priority to balance real-time performance and bandwidth cost.
[0119] Step S141: Build the hardware and interface foundation for the hierarchical architecture, clarify the hardware configuration of each layer, build standardized interfaces and reserve communication interfaces; ① Onboard: Employs an embedded processing module adapted to UAV payloads (NVIDIA Jetson Orin NX, 200 TOPS computing power), running a lightweight real-time operating system (Ubuntu 22.04 LTS Server), and equipped with a low-power CPU and miniaturized GPU to meet the preprocessing computing power requirements of image and sensor data; ② Edge: Uses an industrial-grade edge computing gateway (Huawei AR650, 4-core 16G configuration), integrating a multi-core processor, local solid-state drive (1TB capacity), and multi-protocol communication module to support real-time data processing and local caching; ③ Cloud: Deploys a distributed server cluster (8 Alibaba Cloud ECS instances, each with 16 cores, 32G RAM, and an NVIDIA A100 GPU), equipped with a large-capacity distributed storage array (100TB capacity) to handle deep analysis, model training, and data storage.
[0120] ① Airborne and edge terminals: Equipped with LVDS interface (for transmitting image data) and USB 3.0 interface (for transmitting sensor data), with a reserved 5G module interface (model: Huawei MH5000-31); ② Edge and cloud terminals: Equipped with Gigabit Ethernet interface and 5G / satellite communication interface (compatible with BeiDou short message communication), supporting multi-link redundant transmission; ③ Sensors and airborne terminals: Equipped with RS485 and SPI interfaces, compatible with various inspection sensors (light, temperature and humidity, lidar); All interfaces comply with industry standards (e.g., RS485 complies with IEC 61158-2) to ensure seamless interoperability between devices.
[0121] Step S142: The airborne end performs load reduction preprocessing, processes image and sensor data, and transmits only valid data after classification and hierarchical classification; Images of water conservancy facilities (resolution 1920×1080) acquired by UAVs were first processed using a lightweight median filtering algorithm (window size 3×3) to remove noise. Then, invalid background areas (such as the sky and distant mountains) were cropped based on the Canny edge detection algorithm, retaining the effective areas containing the main objects such as dams and factories. The images were compressed to a suitable size using the JPEG2000 compression algorithm (compression ratio 10:1, balancing quality and volume). The structural similarity (SSIM) of the compressed images was ≥0.9.
[0122] Data collected by airborne sensors (light intensity, temperature and humidity, wind speed) is filtered by moving average (window size 5 frames) to remove outliers, and time alignment (based on the UAV clock, timestamp error ≤ 1ms) and normalization (mapped to the [0,1] interval) are completed; redundant data (such as duplicate data with no change in value for 3 consecutive frames) are removed.
[0123] Data is categorized by data type and priority: ① High priority: suspected defect images (including cracks and leaks), emergency alarm data (such as excessive wind speed); ② Medium priority: routine sensor data (temperature, humidity, light intensity), and images of the main body without defects; ③ Low priority: background images and historical cached data. Only high and medium priority valid data are transmitted to the edge, while low priority data is temporarily stored in the onboard local storage (64GB capacity) and processed in batches after the drone returns to base, reducing wireless transmission bandwidth usage.
[0124] Step S143: Real-time core processing is carried out at the edge, and the initial inspection and analysis push are completed. The data is then filtered and classified for processing. After receiving valid data transmitted from the airborne terminal, the edge terminal calls a lightweight deep learning model (MobileNetV3-Small) to perform preliminary inspection of suspected defect images, outputting defect candidate regions (boundary accuracy ±2 pixels) and preliminary judgment results (defect type, confidence level); it performs real-time correlation analysis on sensor data (such as combining illumination and temperature and humidity data to assess environmental risks), and generates environmental risk assessment results (normal / concern / alarm); the preliminary inspection results and risk assessment results are pushed to the ground control terminal in real time via 5G communication (latency ≤500ms) to support rapid decision-making by on-site personnel.
[0125] The edge device performs secondary screening on the received data, retaining valuable data such as suspected defect images, key sensor data (such as illumination and strain data corresponding to defect areas), and processing results, and packages and compresses them in batches (ZIP format); ordinary background images and redundant sensor data are stored on the local solid-state drive of the edge device, and uploaded to the cloud in batches via wired Ethernet after the drone returns, reducing the pressure on wireless transmission.
[0126] Step S144: Implement in-depth analysis and global optimization in the cloud, accurately identify trends, and be responsible for storage and model iteration distribution; After receiving the core data uploaded from the edge device, the cloud calls a high-precision deep learning model (ResNet50+Transformer) to accurately identify and classify the candidate defect regions, and outputs the defect type (crack, honeycomb surface, leakage), size (crack width, hole diameter), location coordinates (WGS-84 coordinate system) and confidence level (≥95%). It also combines multi-source historical data (inspection data and equipment maintenance records of the past year) to carry out trend analysis, such as predicting the defect development speed through time series data of crack width, and analyzing the environmental causes of defect generation through meteorological data correlation analysis.
[0127] A global database (using a MySQL+Redis architecture) is built to store all processing results, raw core data, model versions, and inspection task information, supporting data backtracking and statistical queries (such as querying defect distribution by region and time). The cloud uses accumulated big data (every 100,000 images + 1 million sets of sensor data) to train and optimize deep learning models. Through lightweight techniques such as model pruning and quantization, the optimized models are converted into versions adapted for edge and airborne terminals, and regularly distributed to edge and airborne terminals to achieve a hierarchical architecture for upgrading processing capabilities.
[0128] Step S145: Design a hybrid transmission scheme, adapt the transmission mode according to priority, and use a switching controller and encryption to ensure security; ① High-priority data (suspected defect images, emergency alarms): 5G communication is used for transmission (downlink speed ≥100Mbps, latency ≤20ms), leveraging its low latency and high bandwidth characteristics to ensure real-time performance; ② Medium-priority data (regular sensor data, defect-free images): When the drone is in signal coverage areas such as urban areas or reservoir areas, WiFi 6 / 4G transmission is used; when in remote areas without public network such as mountainous areas, it automatically switches to satellite communication (BeiDou short message + broadband satellite, suitable for small batch data transmission); ③ Low-priority data (locally cached background images, redundant data): "Near-range batch transmission" mode is adopted. After the drone returns to the ground, it is uploaded in batches to the edge / cloud via wired Ethernet, saving wireless bandwidth costs.
[0129] A transmission switching controller is set up to monitor the bandwidth, latency, signal strength, and other indicators of each transmission link in real time. When the signal of the current transmission mode weakens (e.g., 5G signal strength < -100dBm) or is interrupted, it automatically switches to the backup transmission mode (e.g., 5G switches to WiFi / satellite), with a switching latency of ≤1s. All transmitted data is encrypted end-to-end using the AES-256 encryption algorithm, and the encryption key is dynamically allocated and updated periodically (every 24 hours) through the cloud. VPN tunnel communication is used between the edge terminal and the cloud to prevent theft or tampering during data transmission.
[0130] Step S146: Build a collaborative scheduling system, monitor and schedule at the edge, dynamically allocate resources and adaptively adjust data flow; The core scheduling module is deployed at the edge to monitor the status of each level in real time, including the computing load (CPU utilization, GPU utilization) of the onboard end, the processing progress of the edge end (task queue length, single frame processing time), the response status of the cloud (data reception latency, model deployment progress), and network transmission quality (bandwidth utilization, packet loss rate). The scheduling module supports remote configuration via the web interface, and maintenance personnel can manually adjust the scheduling strategy.
[0131] ① Resource Allocation: In high-concurrency scenarios (such as simultaneous inspection by multiple drones), increase the number of processing threads at the edge (from 8 threads to 16 threads) and offload some non-real-time tasks (such as historical data statistics) to the cloud to reduce the pressure on the edge; when the preprocessing time on the airborne end is too long (>20ms / frame), automatically adjust the complexity of the preprocessing algorithm (such as reducing the image compression ratio and simplifying the edge detection logic); ② Data Flow Adjustment: The preprocessing parameters of the airborne end (such as the defect area clipping range) can be dynamically adjusted according to the initial inspection results fed back by the edge end (such as focusing on areas with high crack incidence and narrowing the clipping range); the frequency of data upload by the edge end is adaptively adjusted according to the cloud storage pressure (when the cloud storage utilization rate is >80%, reduce the upload frequency to once every 30 minutes).
[0132] Step S147: Conduct full-scenario testing, optimize the system for issues, and supplement functions to improve the system based on requirements.
[0133] Typical water conservancy scenarios such as urban dams, mountain hydropower stations, and reservoir areas were selected to simulate network conditions with strong, weak, and no signals. The core indicators (single / multiple UAV inspections) under different task intensities were tested: ① Processing latency (airborne preprocessing ≤20ms / frame, edge initial inspection ≤100ms / frame, cloud-based accurate identification ≤500ms / frame); ② Transmission success rate (high priority data ≥99.9%, medium priority data ≥99.5%); ③ Defect identification accuracy (accuracy rate ≥92%). The test covered harsh environments such as high temperature (>40℃), high humidity (relative humidity >90%), and strong electromagnetic interference.
[0134] To address the issues identified during testing, optimizations were made as follows: ① Airborne preprocessing time exceeded limits: the filtering and compression algorithms were further lightweighted; ② Edge node load was too high: the computing power of edge nodes was expanded (GPU modules were added); ③ High packet loss rate in remote areas: the modulation and demodulation strategies for satellite communication were optimized, and a data retransmission mechanism was added. In conjunction with the actual needs of water conservancy inspection, functions such as multi-drone collaborative processing (data sharing and task division among multiple drones) and cross-regional data sharing (interoperability of inspection data from different river basins) were added to continuously improve the hierarchical processing and hybrid transmission system.
[0135] Step S150: Based on the standardized multi-source data of the distributed data platform, data correlation is mined through multimodal fusion technology, and cross-regional collaborative diagnosis and model optimization are achieved with the help of the distributed learning architecture.
[0136] ① Data Platform Architecture: The data platform is built using a distributed microservice architecture, comprising a data access layer, a data governance layer, a data storage layer, and a data service layer. The data access layer supports multi-source data access (UAV images, sensor data, ground station logs, manual inspection reports, and meteorological data). ② Data Standardization: The data governance layer achieves standardized processing of multi-source data—image data is standardized in resolution (1920×1080), format (JPEG2000), and annotation specifications (using COCO format); sensor data is standardized in field definitions, units, and timestamp formats; text data (manual reports) is processed through natural language processing (NLP) to extract key information (defect type, location, and processing suggestions) and converted into structured data; all standardized data is stored in a distributed storage layer (HDFS+ClickHouse), supporting efficient reading and writing of massive amounts of data.
[0137] A multimodal fusion model is constructed using a CNN+Transformer fusion architecture, taking three types of data as input: images (visual modality), sensor data (numerical modality), and text reports (textual modality). The CNN extracts visual features (defect texture, contour) from the images, the fully connected layer extracts numerical features (environmental parameters, equipment status) from the sensor data, and the BERT model extracts semantic features (defect description, processing experience) from the text data. The fusion layer uses a cross-attention mechanism to capture the inherent correlations between different modalities of data (such as the correlation between the width of cracks in the image and strain sensor data, and the correlation between the description of "leakage" in the text and the temperature anomaly in the infrared image), and outputs fused features for subsequent diagnosis.
[0138] ① Distributed Learning Architecture: A federated learning + distributed training architecture is adopted, using edge nodes of various water conservancy inspection areas (such as the Yangtze River Basin and the Yellow River Basin) as distributed training nodes, with core nodes in the cloud responsible for parameter aggregation. Each region only uploads model parameters, without disclosing raw data, thus protecting data privacy. ② Cross-Regional Collaborative Diagnosis: The cloud utilizes multimodal fusion features to construct a global collaborative diagnosis model. Edge nodes in each region call this model to diagnose local inspection data, while simultaneously uploading feature data of local difficult samples (such as rare defects) to the cloud. The cloud combines difficult samples from multiple regions to optimize the model, achieving cross-regional sharing of defect diagnosis experience (e.g., adapting freeze-thaw defect diagnosis experience from cold northern regions to high-humidity southern regions). ③ Model Iteration and Optimization: A global model iteration is initiated quarterly, integrating new data and diagnostic feedback from each region to optimize the feature extraction and correlation mining capabilities of the fusion model. The optimized model is then distributed to edge nodes in each region, continuously improving the accuracy of cross-regional collaborative diagnosis.
[0139] Based on the same inventive concept, please refer to Figure 2 This diagram illustrates a schematic block diagram of an AI intelligent inspection system 100 for water conservancy project operation and maintenance, provided in an embodiment of this application, for executing the aforementioned AI intelligent inspection method for water conservancy project operation and maintenance. The AI intelligent inspection system 100 may include a communication unit 110, a machine-readable storage medium 120, and a processor 130. Alternatively, the machine-readable storage medium 120 may be integrated into the processor 130 and can communicate and interact with external systems through the communication unit 110. The machine-readable storage medium 120 stores machine-executable instructions for executing the scheme of this application, and the processor 130 executes the machine-executable instructions stored in the machine-readable storage medium 120 to implement the AI intelligent inspection method for water conservancy project operation and maintenance provided in the aforementioned method embodiment.
[0140] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An AI-powered intelligent inspection method for the operation and maintenance of water conservancy projects, characterized by: Includes the following steps: Integrating multi-source meteorological data to make pre-inspection predictions, adaptively adapting flight parameters, and ensuring imaging quality through multispectral imaging optimization and image restoration technology under severe weather conditions; A dual-feature constrained deep learning model is constructed, which combines real-time illumination dynamic calibration and transfer learning to improve the accuracy of defect identification in scenarios with changing illumination. Establish a standardized sensor communication system, use protocol adaptation technology to be compatible with existing equipment, and rely on collaborative learning to achieve dynamic calibration of sensor accuracy and collaborative operation. It adopts a hierarchical processing architecture of airborne preprocessing, edge processing, and cloud processing, combined with a hybrid transmission scheme; Based on the standardized multi-source data of the distributed data platform, the data correlation is explored through multimodal fusion technology, and cross-regional collaborative diagnosis and model optimization are achieved with the help of the distributed learning architecture.
2. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 1, characterized in that: The system integrates multi-source meteorological data for pre-inspection prediction, adaptively adapts flight parameters, and ensures imaging quality under adverse weather conditions through multispectral imaging optimization and image restoration techniques, including: Collect meteorological data from multiple sources and implement standardized preprocessing that includes time-series alignment and coordinate unification. A fusion model is built based on the Transformer architecture, which takes preprocessed data as input and outputs weather warning results and environmental levels, and the prediction is completed before takeoff. A mapping library between weather levels and flight parameters is constructed and basic configurations are called. The parameters are dynamically adjusted through control algorithms in combination with real-time feedback. It integrates a multispectral imaging unit and lidar for synchronous data acquisition, optimizes parameters according to weather type, and ensures image alignment accuracy through gimbal stabilization. A CNN pixel-level fusion algorithm is used to generate fused images, and a diffusion model repair module automatically identifies and repairs image distortions. Verify the image quality indicators after repair. If the indicators meet the standards, the image is transmitted to subsequent modules. If the indicators do not meet the standards, a second optimization is triggered or an early warning is issued to adjust the inspection strategy.
3. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 2, characterized in that: The aforementioned fusion model, built based on the Transformer architecture, takes preprocessed data as input and outputs weather warning results and environmental levels, with the prediction completed before takeoff, including: A Transformer fusion architecture adapted to multi-source data is built, which unifies data features through independent embedding and layer normalization, and uses the encoding layer to mine cross-source associations and enhance feature expression. Feature enhancement strategies are designed for meteorological data with different characteristics, and corresponding location coding modules are added to generate global fusion features through a shared encoder. A hierarchical decoding module with shared and integrated features is constructed, which outputs meteorological warning results and environmental levels through regression and classification branches respectively; The model is trained using a joint loss function based on a labeled dataset, and multiple techniques are combined to optimize the model for lightweight performance in order to improve inference efficiency. The lightweight model is deployed on the airborne edge unit, and inference is triggered before takeoff. The accompanying backup and verification mechanism ensures that the process is completed on time and the results are reliable.
4. The AI intelligent inspection method and system for operation and maintenance of water conservancy projects according to claim 3, characterized in that: The aforementioned feature enhancement strategy designed for meteorological data with different characteristics includes adding a corresponding location encoding module and generating global fusion features via a shared encoder, including: The preprocessed multi-source meteorological data were classified and categorized, with three types identified, feature dimensions defined, and feature expression requirements sorted out. Temporal location encoding enhancement is implemented for time-series data, and temporal features are strengthened through module concatenation, residual fusion, and layer normalization. Spatial data is enhanced by spatial location coding, and spatial features are optimized through coordinate processing, learnable coding, and neighborhood attention aggregation. For statistical data, an enhanced sublayer is constructed using a multilayer perceptron to achieve feature transformation, dimension adaptation, and distribution alignment. Verify and unify the dimension, data type, and normalization range of the feature vectors of each branch to adapt to subsequent fusion requirements; The concatenated feature sequence is input into the Transformer shared encoder, and correlations are captured through differential attention. After processing, a globally fused feature is generated.
5. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 3, characterized in that: The hierarchical decoding module that constructs shared and fused features outputs meteorological warning results and environmental levels through regression and classification branches, respectively, including: A hierarchical decoding architecture was built and a global fusion feature sharing mechanism was established. The feature association between regression and classification branches was strengthened through unified input, dimension adaptation and residual connection. The design of the regression decoding layer determines the output dimension according to the warning parameters. It adopts a multi-layer fully connected structure and a regularization strategy to output normalized meteorological warning results. Construct an adaptive threshold comparison unit, dynamically adjust the threshold based on industry standards and regional characteristics, connect regression output and classification input, and provide quantitative basis; The design incorporates a classification decoding layer that integrates multi-source input features and outputs the environment level probability through a multi-layer fully connected structure. It also adds a feature interaction channel to enhance cross-branch complementarity. By employing a joint loss function and dynamic weight strategy, combined with end-to-end training and early stopping strategy, collaborative training between the decoding module and upstream and downstream modules is achieved. Optimize the inference output logic, and ensure the reliability and logic of the output results through parameter rationality verification, level consistency verification and anomaly correction.
6. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 1, characterized in that: The construction of a dual-feature constrained deep learning model, combined with real-time illumination dynamic calibration and transfer learning, improves the accuracy of defect identification in scenarios with changing illumination, including: By identifying the characteristics of defects, a lightweight dual-branch convolutional neural network architecture is built, and the dual-branch features are fused to achieve a preliminary distinction between defects and shadows. A real-time illumination calibration module is designed to reduce the interference of illumination changes on defect identification by collecting parameters by sensors, dynamic threshold segmentation, and branch calibration sub-layers. A comparative dataset was constructed, and a transfer learning strategy of pre-training and incremental fine-tuning was adopted. The recognition accuracy of easily confused samples was optimized by mining difficult examples. Design a joint loss function that includes multiple types of losses, and combine it with a dynamic weight adjustment strategy to collaboratively constrain the model and enhance feature learning; The inference process is optimized by first calibrating the lighting before inputting it into the model, making judgments based on probability intervals, and feeding back erroneous samples to achieve continuous model optimization. Build a performance verification and closed-loop optimization mechanism through indicator testing, sample supplementation, equipment calibration and architecture iteration.
7. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 6, characterized in that: The aforementioned real-time illumination calibration module, through sensor parameter acquisition, dynamic threshold segmentation, and branch calibration sub-layers, reduces the interference of illumination changes on defect identification, including: Deploy multi-dimensional illumination parameter acquisition units and perform preprocessing. Integrate illumination-related sensors at the drone's adaptation location to synchronize the sensor sampling frequency with the image acquisition frame rate to achieve time alignment. Perform filtering, noise reduction, and normalization processing on the acquired illumination parameters in sequence, while eliminating abnormal parameter values to ensure parameter validity. A dynamic mapping model between illumination parameters and image grayscale thresholds is constructed. Image samples covering multiple time periods, weather conditions, and illumination angles are collected, and the illumination parameters corresponding to the samples are associated with the optimal grayscale thresholds manually labeled. The mapping model is trained using preprocessed illumination parameters as input and the optimal grayscale thresholds as output. The model is then optimized through cross-validation and solidified into an incrementally updatable mapping table and stored. Before image input, dynamic thresholding and false defect removal are performed. The grayscale threshold adapted to the current illumination parameters is retrieved in real time. An improved adaptive thresholding algorithm combined with dynamic window adjustment is used to perform binarization segmentation of the image. Small-area false defect regions are removed through morphological operations, while connected regions that meet the defect characteristics are retained to generate a valid image. The calibration sub-layer of the illumination feature branch is designed and feature processing is implemented. The calibration sub-layer includes parameter encoding, feature fusion and attention weight adjustment modules. The parameter encoding module converts the normalized illumination parameters into feature vectors of the appropriate dimension. The feature fusion module fuses them with the illumination-independent texture feature vectors. Then, the attention weight adjustment module dynamically allocates the fused feature weights based on the illumination intensity to counteract the effects of illumination distortion. A modular integration architecture was built and the real-time adaptation logic was optimized. An end-to-end calibration module was constructed by integrating the acquisition unit, segmentation module and calibration sub-layer. A complete data flow link was designed. The threshold segmentation algorithm and calibration sub-layer were optimized to meet the real-time requirements. At the same time, a parameter caching mechanism was set to ensure the continuous operation of the module when the sensor fails. Conduct calibration effect verification and dynamic iterative optimization, set verification indicators, select multiple typical lighting scenarios for actual measurement; supplement samples based on actual measurement results to update the mapping model and adjust weight allocation rules, and regularly calibrate the sensor.
8. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 6, characterized in that: The establishment of a standardized sensor communication system, which is compatible with existing devices through protocol adaptation technology and relies on collaborative learning to achieve dynamic calibration and collaborative operation of sensor accuracy, includes: Establish a standardized communication system framework, clarify protocols, formats and processes, and build a three-tier communication architecture to ensure stable transmission; Develop multi-protocol adaptation middleware to adapt to existing device protocols, and verify through testing that it achieves seamless integration with the new system; Construct a collaborative learning framework, divide core and edge nodes, and design a hierarchical data sharing mechanism to support calibration model training; Dynamic calibration is achieved based on federated learning, and accuracy is optimized through model distribution, local fine-tuning, parameter aggregation, and updates. Design a collaborative scheduling mechanism to manage sensor operating parameters, and combine correlation analysis and load balancing to ensure system stability; Build a monitoring platform to achieve status monitoring, anomaly alarms and remote upgrades, and continuously optimize protocol and model parameters; Conduct full-scenario verification, optimize the system to address issues, and supplement the adaptation types to expand the coverage of the communication system.
9. The AI-powered intelligent inspection method for water conservancy project operation and maintenance according to claim 1, characterized in that: The aforementioned architecture employs a hierarchical processing approach, encompassing onboard preprocessing, edge computing, and cloud-based processing, coupled with a hybrid transmission scheme, including: Establish the hardware and interface foundation for a hierarchical architecture, clarify the hardware configuration of each level, build standardized interfaces and reserve communication interfaces; The airborne unit performs load reduction preprocessing, processes image and sensor data, and transmits only the valid data after classification and hierarchical classification. Real-time core processing is carried out at the edge, completing initial inspection and analysis push, secondary data screening and classification processing; The cloud-based system performs in-depth analysis and global optimization, accurately identifies and analyzes trends, and is responsible for storage and model iteration deployment. Design a hybrid transmission scheme that adapts transmission methods according to priority, and combines a switching controller with encryption to ensure security; Build a collaborative scheduling system, monitor and schedule at the edge, dynamically allocate resources and adaptively adjust data flow; Conduct full-scenario testing, optimize the system to address issues, and supplement functions to improve the system based on requirements.
10. An AI-powered intelligent inspection system for the operation and maintenance of water conservancy projects, characterized in that: include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the AI-powered intelligent inspection method for operation and maintenance of water conservancy projects as described in any one of claims 1 to 9 by executing the machine-executable instructions.