A method and system for detecting power line anomalies based on unmanned aerial vehicles (UAVs)

By using a closed-loop system that integrates drones and servers, combined with reinforcement learning and multispectral sensors, efficient, intelligent, and safe management of power line anomaly detection has been achieved. This solves the problems of low efficiency, insufficient intelligence, and weak safety control in existing technologies, and provides full-process automation and data security assurance.

CN120996791BActive Publication Date: 2026-04-03STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing power line detection technologies suffer from problems such as low detection efficiency, insufficient intelligence, fragmented data management, weak safety control, and response delays, making it difficult to achieve efficient and intelligent anomaly detection and safety management.

Method used

A closed-loop system based on drones is adopted, which combines the collaborative work of servers and drones. The detection trajectory is dynamically corrected through reinforcement learning algorithms, images are collected and automatically analyzed using multispectral sensors, and the entire process of encrypted data transmission and blockchain evidence storage is constructed to realize data interaction and trajectory adjustment between drones and generate intelligent anomaly detection reports.

Benefits of technology

It significantly improves detection efficiency and intelligence, reduces manual intervention, enhances the ability to identify subtle anomalies, ensures data security, shortens report generation time, and achieves full-process automation and security management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996791B_ABST
    Figure CN120996791B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for power line anomaly detection based on unmanned aerial vehicles (UAVs). The method includes: a server parsing a power line detection request to obtain the detection area and detection time period; planning an initial detection trajectory, and generating a power line detection command based on the initial detection trajectory, detection area, and detection time period, which is then issued to the UAV; the UAV performing an inspection task within an electronic fence, dynamically correcting the initial detection trajectory during the inspection, and acquiring flight time-series images; analyzing the flight time-series images using a line anomaly detection model, and outputting line anomaly detection results; recording the actual detection trajectory and marking anomalies on the actual detection trajectory; and recording an encrypted inspection log and uploading it to the server. The advantages of this invention are: it greatly improves the detection efficiency, intelligence level, and safety management capabilities of power line anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power facility operation and maintenance and artificial intelligence, specifically to a method and system for detecting power line anomalies based on unmanned aerial vehicles (UAVs). Background Technology

[0002] With the continuous expansion of power system scale and the increasing complexity of power grid structure, the safe and stable operation of power lines has become a crucial link in ensuring electricity supply for social production and people's daily lives. Power lines are exposed to the natural environment for extended periods, facing threats from multiple factors such as wind and rain erosion, lightning strikes, icing, external damage, and material aging. This makes them prone to abnormal conditions such as strand breakage, insulator damage, hardware corrosion, and overheating at connection points. Failure to detect and address these abnormalities in a timely manner may lead to localized power outages or even large-scale power grid failures, resulting in severe economic losses and social impacts.

[0003] Currently, the inspection and anomaly detection of power lines mainly rely on the following three methods:

[0004] 1. Manual ground inspection:

[0005] As the most basic maintenance method, inspection personnel typically use equipment such as binoculars, infrared thermometers, and ultraviolet imagers to patrol power lines on foot or by car. This method has significant limitations: First, the inspection efficiency is low, especially in areas with complex terrain and inconvenient transportation (such as mountains, swamps, and forests), with long cycles and limited coverage; second, the inspection results are greatly affected by personnel experience, fatigue, and weather conditions, making them highly subjective; and third, inspection personnel need to be in close contact with high-voltage facilities, facing safety risks such as electric shock and falls.

[0006] 2. Manned helicopter inspection:

[0007] To improve inspection efficiency, some power grid companies use manned helicopters equipped with high-definition cameras and infrared thermal imagers for aerial inspections. While this method offers advantages such as wide inspection range and high speed, it also incurs high maintenance costs, complex scheduling, and is severely constrained by airspace control and weather conditions. Furthermore, the significant vibrations during helicopter flight result in poor image acquisition stability, necessitating a dedicated flight and data analysis team, and placing a heavy burden on subsequent data processing.

[0008] 3. Traditional drone inspection:

[0009] In recent years, drone technology has been increasingly applied to power line inspection. By being remotely controlled or flying along pre-set routes, drones can be equipped with visible light, infrared, and multispectral sensors to acquire image data of the power lines. Compared to manual and helicopter inspections, drones offer advantages such as high flexibility, lower cost, and the ability to take close-up photos.

[0010] However, existing technologies still have the following prominent problems:

[0011] 1. Insufficient automation: Most systems still rely on manual remote control or fixed flight routes, and cannot achieve dynamic path planning based on the actual route, which can easily lead to missed detections or duplicate detections.

[0012] 2. Limited recognition capability: Image analysis mostly relies on post-event manual interpretation or simple threshold alarms, lacking the ability to identify defects based on intelligent algorithms such as deep learning. The detection rate of subtle anomalies (such as small cracks and early corrosion) is low, and the false alarm rate is high.

[0013] 3. Dispersed data processing: Massive amounts of image data need to be downloaded, stored, filtered and archived manually. The lack of a unified data management platform makes it difficult to trace and compare historical data.

[0014] 4. Lack of intelligent electronic fences and safety control: The flight range of drones is not effectively electronically constrained, posing a risk of accidentally entering no-fly zones or failing to maintain a safe distance from power lines. The detection process lacks standardized trajectory recording, which fails to meet the regulatory requirements for power grid safety management.

[0015] 5. Delayed report generation and response mechanism: After an anomaly is discovered, multiple rounds of manual review are required to generate a report, which delays maintenance decisions. Furthermore, the lack of encrypted transmission and cloud collaboration mechanisms results in low information flow efficiency.

[0016] In summary, although existing power line inspection technologies are gradually evolving from manual to automated and intelligent methods, they still generally suffer from technical bottlenecks such as low inspection efficiency, insufficient intelligent identification capabilities, fragmented data management, weak safety control, and response delays.

[0017] Therefore, how to provide a method and system for detecting power line anomalies based on drones, so as to improve the detection efficiency, intelligence level and safety management capabilities of power line anomaly detection, has become an urgent technical problem to be solved. Summary of the Invention

[0018] To address the shortcomings of existing technologies, this invention provides a method and system for detecting power line anomalies based on unmanned aerial vehicles (UAVs), aiming to improve the detection efficiency, intelligence level, and safety management capabilities of power line anomaly detection.

[0019] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting power line anomalies based on unmanned aerial vehicles (UAVs), comprising:

[0020] Step S1: The server decrypts and verifies the input power line detection request to obtain a power line detection work order, and parses the power line detection work order to obtain the detection area and detection time period;

[0021] Step S2: The server allocates drones for power line detection based on the detection area and detection time period, plans the initial detection trajectory of each drone, generates power line detection instructions based on the initial detection trajectory, detection area and detection time period, and sends the power line detection instructions to the corresponding drones.

[0022] Step S3: The UAV sets up an electronic fence based on the received power line detection command, performs inspection tasks within the electronic fence, dynamically corrects the initial detection trajectory based on reinforcement learning algorithm during the inspection, and collects flight time-series images of the power line through the onboard multispectral sensor.

[0023] Step S4: The UAV automatically analyzes the flight time-series images using a pre-trained route anomaly detection model and outputs the route anomaly detection results;

[0024] Step S5: The UAV records the actual detection trajectory in real time, marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and the UAVs in the detection area interact with each other to record the actual detection trajectory and UAV status data. The initial detection trajectory is dynamically adjusted based on the interacted actual detection trajectory and UAV status data.

[0025] Step S6: The drone records the inspection log in real time. The inspection log includes at least the drone number, flight sequence image, actual detection trajectory, line anomaly detection result, inspection time and drone status data. After the inspection is completed, the inspection log is encrypted into an encrypted log, the log fingerprint of the encrypted log is calculated and stored on the blockchain, and the encrypted log is uploaded to the server.

[0026] Step S7: The server receives and stores the encrypted logs in real time, decrypts the encrypted logs to obtain inspection logs, generates a power line anomaly detection report based on the inspection logs uploaded by each drone, and displays the power line anomaly detection report.

[0027] Step S8: The server encrypts the power line anomaly detection report into an encrypted report, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time.

[0028] Furthermore, the specific process of step S1 is as follows:

[0029] Step S1.1: The server obtains the input power line inspection work order carrying encrypted work order data; the encrypted work order data is obtained by encrypting the power line inspection work order. The encryption process is as follows: obtain the input power line inspection work order, the device serial number of the local machine, and the current first timestamp; calculate the MAC value of the power line inspection work order, device serial number, and first timestamp using the HMAC algorithm; encrypt the power line inspection work order, device serial number, first timestamp, and MAC value using the AES-256 algorithm to obtain initial encrypted data; create a public key and private key pair using the EdDSA algorithm; calculate the digital signature value of the initial encrypted data using the private key; XOR the public key with the device serial number to obtain the first-level encryption public key; cyclically shift each character of the first-level encryption public key 3 bits to the right to obtain the second-level encryption public key; encrypt the initial encrypted data, digital signature value, second-level encryption public key, and device serial number into encrypted work order data using the AES algorithm.

[0030] Step S1.2: The server parses the power line inspection work order to obtain the encrypted work order data. It then decrypts the encrypted work order data using the AES algorithm to obtain initial encrypted data, a digital signature value, a secondary encryption public key, and a device serial number. The server cyclically shifts each character of the secondary encryption public key three bits to the left to obtain the primary encryption public key. It then performs an XOR operation on the primary encryption public key using the device serial number to obtain the public key. After verifying the digital signature value using the public key, the server decrypts the initial encrypted data using the AES-256 algorithm to obtain the power line inspection work order, the device serial number, a first timestamp, and a MAC value. The server performs integrity verification on the power line inspection work order, the device serial number, and the first timestamp using the MAC value, timeliness verification using the first timestamp, and legality verification using the device serial number. Finally, the server parses the power line inspection work order to obtain the inspection area and inspection time period.

[0031] Furthermore, the specific process of step S2 is as follows:

[0032] Step S2.1: The server retrieves spatial topology data of power lines from the database based on the detection area, and obtains information on drones that are currently idle;

[0033] Step S2.2: The server inputs the information of the UAV, spatial topology data and detection time period into the pre-trained UAV inspection planning model to obtain the UAV allocation result and the initial detection trajectory;

[0034] Step S2.3: The server encrypts the initial detection trajectory, detection area, and detection time period into encrypted instruction data, generates a power line detection instruction based on the encrypted instruction data, and sends the power line detection instruction to the corresponding drone via HTTPS protocol based on the drone number carried in the drone allocation result.

[0035] In step S2.2, the UAV inspection planning model is constructed based on a data preprocessing layer, a feature fusion layer, a path generation layer, an allocation optimization layer, and a result output layer.

[0036] The data preprocessing layer is constructed based on a UAV feature extraction module, a spatial topology feature extraction module, and a temporal feature extraction module. The UAV feature extraction module is used to extract UAV feature vectors from UAV information through a fully connected neural network. The spatial topology feature extraction module is used to extract graph feature vectors from spatial topology data through a graph convolutional network. The temporal feature extraction module is used to extract temporal feature vectors from the detection period through a recurrent neural network.

[0037] The feature fusion layer is used to fuse UAV feature vectors, graph feature vectors, and temporal feature vectors through a cross-attention mechanism, and output a unified environmental representation feature.

[0038] The path generation layer is used to infer environmental representation features through a deep Q-network and output preliminary candidate paths;

[0039] The allocation optimization layer is constructed based on a resource allocation module and an optimization adjustment module. The resource allocation module is used to reason about the preliminary candidate paths and UAV feature vectors using a greedy algorithm and a neural network, and output an initial allocation result carrying the correspondence between the UAV number and the preliminary candidate path. The optimization adjustment module is used to optimize the initial allocation result and the preliminary candidate path using a policy gradient method to obtain the UAV allocation result and the initial detection trajectory.

[0040] The result output layer is used to smooth the initial detection trajectory through a sequence generation network, and then output the UAV allocation result and the smoothed initial detection trajectory.

[0041] Specifically, in step S2.3, encrypting the initial detection trajectory, detection area, and detection time period into instruction ciphertext data involves: obtaining the current second timestamp; concatenating the initial detection trajectory, detection area, detection time period, and second timestamp into concatenated data based on a preset separator; calculating the first hash value of the concatenated data using the HASH256 algorithm; taking the first 128 bits from the first hash value as a dynamic key; encrypting the concatenated data using the dynamic key via the SM4 algorithm to obtain a first layer of encrypted data; encrypting the first layer of encrypted data and the first hash value into a second layer of encrypted data using the IDEA algorithm; inserting a random string of a specified length at a specified position in the second layer of encrypted data to obtain a third layer of encrypted data; and encrypting the third layer of encrypted data into instruction ciphertext data using the RC6 algorithm.

[0042] Furthermore, the specific process of step S3 is as follows:

[0043] Step S3.1: The UAV receives the power line detection command in real time, parses the power line detection command to obtain command ciphertext data, decrypts the command ciphertext data using the RC6 algorithm to obtain three-layer encrypted data, locates and removes a random string in the three-layer encrypted data based on a specified position and length to obtain two-layer encrypted data, decrypts the two-layer encrypted data using the IDEA algorithm to obtain one-layer encrypted data and a first hash value, takes the first 128 bits from the first hash value as a dynamic key, calls the dynamic key using the SM4 algorithm to decrypt the one-layer encrypted data to obtain concatenated data, performs integrity verification on the concatenated data using the first hash value, parses the concatenated data based on a preset separator to obtain the initial detection trajectory, detection area, detection period and second timestamp, and performs timeliness verification using the second timestamp;

[0044] Step S3.2: After the verification is passed, the UAV sets up an electronic fence based on the detection area and the initial detection trajectory. When the detection time arrives, it performs an inspection task within the electronic fence based on the initial detection trajectory.

[0045] Step S3.3: During the inspection, the Beidou locator collects positioning data in real time, and the LiDAR technology collects three-dimensional spatial information in real time. The electronic fence is dynamically updated based on the positioning data and the three-dimensional spatial information.

[0046] Step S3.4: During the inspection, the initial detection trajectory is dynamically corrected based on the reinforcement learning algorithm, and the flight time sequence image of the power line is acquired by the onboard multispectral sensor; the reinforcement learning algorithm adopts the Q-Learning model.

[0047] Furthermore, in step S4, the line anomaly detection model is constructed based on a feature extraction layer, a modality fusion layer, a feature enhancement layer, an anomaly prediction layer, and a feedback optimization layer;

[0048] The feature extraction layer is constructed based on a 3D convolutional neural network unit, a Transformer unit, and an attention gating mechanism unit. The 3D convolutional neural network unit is used to extract spatial-spectral features from flight time-series images using 3D convolutional kernels. The Transformer unit is used to integrate global contextual information of spatial-spectral features through a multi-head self-attention mechanism to obtain contextual features. The attention gating mechanism unit is used to filter key features from contextual features through learnable attention weights to obtain image features.

[0049] The modality fusion layer is constructed based on a band alignment module and a multi-scale feature fusion module. The band alignment module is used to perform spatial alignment operations on image features through a deformable convolutional network. The multi-scale feature fusion module is used to extract inter-band correlation features from the spatially aligned image features through a cross-attention mechanism, dynamically adjust the weights of each correlation feature through a gated fusion unit, and fuse them to obtain fused features.

[0050] The feature enhancement layer is constructed based on a self-supervised contrastive learning module and a knowledge graph enhancement module. The self-supervised contrastive learning module is used to construct positive and negative sample pairs based on the fused features through data enhancement. The feature representation of the positive and negative sample pairs is optimized using a contrastive loss function to obtain first-level enhanced features. The knowledge graph enhancement module is used to integrate the semantic information of the first-level enhanced features through a preset power line knowledge graph and use a graph neural network to propagate knowledge to obtain second-level enhanced features.

[0051] The anomaly prediction layer is constructed based on an anomaly classification module and an uncertainty estimation module. The anomaly classification module is used to infer the secondary enhancement features through a fully connected layer and a Softmax activation function to predict the anomaly probability distribution of each anomaly category. The uncertainty estimation module is used to predict the uncertainty of the anomaly probability distribution through a Bayesian neural network, and output the line anomaly detection result based on the anomaly probability distribution and the uncertainty.

[0052] The feedback optimization layer is used to optimize the model parameters of the feature extraction layer, modality fusion layer, feature enhancement layer, and anomaly prediction layer through backpropagation of the anomaly detection loss function; the anomaly detection loss function adopts the weighted cross-entropy loss function.

[0053] Furthermore, the specific process of step S5 is as follows: the UAV records the actual detection trajectory based on the positioning data collected in real time by the Beidou locator, marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line, each UAV in the detection area forms a local area network based on wireless network technology, and interacts with each other based on the actual detection trajectory and UAV status data. When it is determined that there is a UAV that cannot complete the inspection task based on the interacted actual detection trajectory and UAV status data, the initial detection trajectory is dynamically adjusted.

[0054] The drone status data includes identity and basic information, real-time flight status data, energy and power system status, mission execution and progress data, equipment and sensor health status, environmental and perception data, and collaboration and decision-making data.

[0055] Furthermore, the specific process of step S6 is as follows:

[0056] Step S6.1: The UAV records an inspection log in real time, including at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data.

[0057] Step S6.2: After the inspection is completed, separate image data and text data from the inspection log. Compress the image data using the ZSTD algorithm to obtain compressed image data, and compress the text data using the Brotli algorithm to obtain compressed text data. Calculate the first MD5 value of the compressed image data using the MD5 algorithm, calculate the second MD5 value of the compressed text data using the MD5 algorithm, encrypt the compressed image data and the first MD5 value into first encrypted data using the AES-256 algorithm, encrypt the compressed text data and the second MD5 value into second encrypted data using the SM9 algorithm, encrypt the first encrypted data and the second encrypted data into an encrypted log using the AES algorithm, calculate the log fingerprint of the encrypted log using the HMAC algorithm and store it on the blockchain, and upload the encrypted log to the server via the TLS protocol.

[0058] Furthermore, the specific process of step S7 is as follows:

[0059] Step S7.1: The server receives the encrypted log in real time, performs integrity verification on the encrypted log using the log fingerprint stored on the blockchain, and then stores the encrypted log in a preset path;

[0060] Step S7.2: The server decrypts the encrypted log using the AES algorithm to obtain first encrypted data and second encrypted data. It then decrypts the first encrypted data using the AES-256 algorithm to obtain image compressed data and a first MD5 value. The first MD5 value is used to verify the integrity of the image compressed data. Finally, the server decrypts the second encrypted data using the SM9 algorithm to obtain text compressed data and a second MD5 value. The second MD5 value is used to verify the integrity of the text compressed data.

[0061] Step S7.3: The server decompresses the image compressed data using the ZSTD algorithm to obtain image data, decompresses the text compressed data using the Brotli algorithm to obtain text data, and reconstructs the inspection log based on the image data and text data;

[0062] Step S7.4: The server summarizes and statistically analyzes the inspection logs uploaded by each drone to generate a power line anomaly detection report, which is then displayed in real time on a large screen.

[0063] Further, the specific process of step S8 is as follows: The server obtains the current third timestamp, calculates the second hash value of the power line anomaly detection report and the third timestamp using the HASH256 algorithm, XORs the power line anomaly detection report and the second hash value to obtain obfuscated data, encrypts the obfuscated data, the third timestamp, and the second hash value into first-level encrypted data using the SM4 algorithm, converts the first-level encrypted data into hexadecimal data, swaps the number 8 with the letter B and the number 9 with the letter A in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted report using the Twofish algorithm, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time via the TLS protocol.

[0064] A UAV-based power line anomaly detection system includes:

[0065] The power line inspection request parsing module is used by the server to decrypt and verify the input power line inspection request to obtain the power line inspection work order, and to parse the power line inspection work order to obtain the inspection area and inspection time period;

[0066] The power line detection instruction issuing module is used by the server to allocate drones for power line detection based on the detection area and detection time period, plan the initial detection trajectory of each drone, generate power line detection instructions based on the initial detection trajectory, detection area and detection time period, and issue the power line detection instructions to the corresponding drones.

[0067] The inspection task execution module is used for the UAV to set up an electronic fence based on the received power line detection command, and to perform inspection tasks within the electronic fence. During the inspection, the initial detection trajectory is dynamically corrected based on a reinforcement learning algorithm, and the flight time sequence images of the power line are collected by the onboard multispectral sensor.

[0068] The line anomaly detection module is used by the UAV to automatically analyze the flight time sequence image through a pre-trained line anomaly detection model and output the line anomaly detection result.

[0069] The detection trajectory adjustment module is used for the UAV to record the actual detection trajectory in real time, mark the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and allow the UAVs in the detection area to interact with each other to view the actual detection trajectory and UAV status data, and dynamically adjust the initial detection trajectory based on the interacted actual detection trajectory and UAV status data.

[0070] The inspection log encryption upload module is used for the UAV to record inspection logs in real time. The inspection logs include at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data. After the inspection is completed, the inspection logs are encrypted into encrypted logs, the log fingerprint of the encrypted logs is calculated and stored on the blockchain, and the encrypted logs are uploaded to the server.

[0071] The power line anomaly detection report generation module is used to receive and store the encrypted logs in real time, decrypt the encrypted logs to obtain the inspection logs, generate a power line anomaly detection report based on the inspection logs uploaded by each drone, and display the power line anomaly detection report.

[0072] The power line anomaly detection report push module is used by the server to encrypt the power line anomaly detection report into an encrypted report, store the encrypted report, and push the encrypted report to the operation and maintenance terminal in real time.

[0073] Compared with existing technologies, the present invention has the following advantages:

[0074] (1) This invention significantly improves detection efficiency through a closed-loop system that combines server and drone collaboration. The server combines power line spatial topology data with drone status to automatically allocate equipment and plan initial trajectories. During inspection, drones dynamically correct their paths using reinforcement learning. Multiple drones can also interact with each other and adjust tasks through Wi-Fi Mesh networking to avoid missed or false detections. The fully automated process greatly reduces human intervention. Compared with manual inspection on foot, driving, and manned helicopter inspection, it has a wider coverage and shorter time consumption, effectively solving the problems of low efficiency and high cost of traditional inspection.

[0075] (2) This invention improves the level of anomaly detection through a high-precision intelligent model. The line anomaly detection model integrates technologies such as 3D convolutional neural networks and Transformer to accurately extract spatial-spectral features and global information from multispectral flight time-series images. It combines self-supervised comparative learning and power knowledge graph to enhance feature discriminativeness. It can also estimate the uncertainty of the result through Bayesian neural network, resulting in a higher detection rate and a lower false alarm rate for minor anomalies such as insulator damage and conductor strand breakage. This solves the problem of poor ability to identify minor anomalies and strong subjectivity in traditional methods.

[0076] (3) This invention constructs a full-process data security and flight control system; on the data end, the detection work order, instructions and inspection logs are all encrypted in multiple layers, and the log fingerprint is stored on the blockchain to ensure that the data is not leaked, not tampered with and is traceable, thus solving the problem of data being scattered, easily lost and tampered with; on the flight end, the UAV sets up an electronic fence according to the instructions and combines Beidou positioning and LiDAR data to dynamically update, strengthen learning guidance to avoid dangerous areas, and prevent the UAV from accidentally entering the no-fly zone or colliding with obstacles, thus solving the problem of traditional UAVs lacking effective safety constraints.

[0077] (4) The present invention, from parsing the detection request and issuing the instruction to the UAV inspection, anomaly analysis and log upload, and then to the server automatically summarizing the logs to generate a report and encrypting and pushing it to the operation and maintenance terminal, does not require manual review and statistics throughout the entire process, which greatly shortens the report generation time and makes it easier for operation and maintenance personnel to obtain anomaly information and carry out maintenance in a timely manner. It solves the problem of the traditional inspection report generation delay and maintenance decision delay. Attached Figure Description

[0078] Figure 1 This is a flowchart of the method of the present invention.

[0079] Figure 2 This is a system structure diagram of the present invention. Detailed Implementation

[0080] like Figure 1 As shown, the present invention provides a technical solution: a method for detecting power line anomalies based on unmanned aerial vehicles (UAVs), comprising the following steps:

[0081] Step S1: The server decrypts and verifies the input power line detection request to obtain a power line detection work order, and parses the power line detection work order to obtain the detection area and detection time period;

[0082] Step S2: The server allocates drones for power line detection based on the detection area and detection time period, plans the initial detection trajectory of each drone, generates power line detection instructions based on the initial detection trajectory, detection area and detection time period, and sends the power line detection instructions to the corresponding drones.

[0083] Step S3: The UAV sets up an electronic fence based on the received power line detection command, performs inspection tasks within the electronic fence, dynamically corrects the initial detection trajectory based on reinforcement learning algorithm during the inspection, and collects flight time-series images of the power line through the onboard multispectral sensor.

[0084] Step S4: The UAV automatically analyzes the flight time-series images using a pre-trained route anomaly detection model and outputs the route anomaly detection results;

[0085] Step S5: The UAV records the actual detection trajectory in real time, marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and the UAVs in the detection area interact with each other to record the actual detection trajectory and UAV status data. The initial detection trajectory is dynamically adjusted based on the interacted actual detection trajectory and UAV status data.

[0086] Step S6: The drone records the inspection log in real time. The inspection log includes at least the drone number, flight sequence image, actual detection trajectory, line anomaly detection result, inspection time and drone status data. After the inspection is completed, the inspection log is encrypted into an encrypted log, the log fingerprint of the encrypted log is calculated and stored on the blockchain, and the encrypted log is uploaded to the server.

[0087] Step S7: The server receives and stores the encrypted logs in real time, decrypts the encrypted logs to obtain inspection logs, generates a power line anomaly detection report based on the inspection logs uploaded by each drone, and displays the power line anomaly detection report.

[0088] Step S8: The server encrypts the power line anomaly detection report into an encrypted report, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time.

[0089] The specific process of step S1 is as follows:

[0090] Step S1.1: The server obtains the input power line inspection work order carrying encrypted work order data; the encrypted work order data is obtained by encrypting the power line inspection work order. The encryption process is as follows: obtain the input power line inspection work order, the device serial number of the local machine, and the current first timestamp; calculate the MAC value of the power line inspection work order, device serial number, and first timestamp using the HMAC algorithm; encrypt the power line inspection work order, device serial number, first timestamp, and MAC value using the AES-256 algorithm to obtain initial encrypted data; create a public key and private key pair using the EdDSA algorithm; calculate the digital signature value of the initial encrypted data using the private key; XOR the public key with the device serial number to obtain the first-level encryption public key; cyclically shift each character of the first-level encryption public key 3 bits to the right to obtain the second-level encryption public key; encrypt the initial encrypted data, digital signature value, second-level encryption public key, and device serial number into encrypted work order data using the AES algorithm.

[0091] Step S1.2: The server parses the power line inspection work order to obtain the encrypted work order data. It then decrypts the encrypted work order data using the AES algorithm to obtain initial encrypted data, a digital signature value, a secondary encryption public key, and a device serial number. The server cyclically shifts each character of the secondary encryption public key three bits to the left to obtain the primary encryption public key. It then performs an XOR operation on the primary encryption public key using the device serial number to obtain the public key. After verifying the digital signature value using the public key, the server decrypts the initial encrypted data using the AES-256 algorithm to obtain the power line inspection work order, the device serial number, a first timestamp, and a MAC value. The server performs integrity verification on the power line inspection work order, the device serial number, and the first timestamp using the MAC value, timeliness verification using the first timestamp, and legality verification using the device serial number. Finally, the server parses the power line inspection work order to obtain the inspection area and inspection time period.

[0092] The specific process of step S2 is as follows:

[0093] Step S2.1: The server obtains the spatial topology data of the power lines from the database based on the detection area, and obtains the information of the drones that are currently in an idle state (drone number, remaining power and energy consumption per unit distance).

[0094] Step S2.2: The server inputs the information of the UAV, spatial topology data and detection time period into the pre-trained UAV inspection planning model to obtain the UAV allocation result and the initial detection trajectory.

[0095] Step S2.3: The server encrypts the initial detection trajectory, detection area, and detection time period into encrypted instruction data, generates a power line detection instruction based on the encrypted instruction data, and sends the power line detection instruction to the corresponding drone via HTTPS protocol based on the drone number carried in the drone allocation result.

[0096] In step S2.1, the spatial topology data includes information such as tower locations (coordinate points), line connection relationships (line segments), line lengths, and area boundaries, defining the "total workload" that needs to be covered.

[0097] In step S2.2, the UAV inspection planning model is constructed based on a data preprocessing layer, a feature fusion layer, a path generation layer, an allocation optimization layer, and a result output layer.

[0098] The data preprocessing layer is constructed based on a UAV feature extraction module, a spatial topology feature extraction module, and a temporal feature extraction module. The UAV feature extraction module is used to extract UAV feature vectors from UAV information through a fully connected neural network (FCN). The spatial topology feature extraction module is used to extract graph feature vectors from spatial topology data through a graph convolutional network (GCN). The temporal feature extraction module is used to extract temporal feature vectors from the detection period through a recurrent neural network (RNN).

[0099] The UAV feature extraction module performs a non-linear transformation through hidden layers (using the ReLU activation function) to output a UAV feature vector (one-dimensional vector). Its function is to convert the raw UAV information into a high-dimensional feature representation, with the advantage of capturing the complex relationship between battery power and energy consumption. The spatial topology feature extraction module aggregates neighbor information through a graph network (GCN), extracting structural features between regions from spatial topology data, i.e., graph feature vectors (one-dimensional vectors). Its advantage is its ability to handle graph data and capture spatial dependencies. The temporal feature extraction module captures time-series dependencies through an RNN, extracting temporal feature vectors (one-dimensional vectors) from the detection period, such as period length and periodicity. Its advantage is its ability to handle time-series data and avoid gradient vanishing.

[0100] The feature fusion layer is used to fuse UAV feature vectors, graph feature vectors, and temporal feature vectors through a cross-attention mechanism, outputting a unified environmental representation feature. The feature fusion layer calculates the correlation of each feature through attention weights and outputs the fused environmental representation feature (a one-dimensional vector), thus dynamically fusing multimodal features to enhance the model's overall understanding of the environment. Its advantage is that it can adaptively adjust the contribution of each feature.

[0101] The path generation layer is used to reason about the environmental representation features through a deep Q-network (DQN) and output preliminary candidate paths. The preliminary candidate path generation process of the path generation layer is as follows: input environmental representation features → Q-network (fully connected layer) → output action value → path generator. That is, it explores the optimal path based on reinforcement learning. Its advantage is that it can handle high-dimensional state spaces and learn through rewards.

[0102] The allocation optimization layer is constructed based on a resource allocation module and an optimization adjustment module. The resource allocation module is used to reason about the preliminary candidate paths and UAV feature vectors using a greedy algorithm and a neural network, and output an initial allocation result carrying the correspondence between the UAV number and the preliminary candidate path. The optimization adjustment module is used to optimize the initial allocation result and the preliminary candidate path using a policy gradient method to obtain the UAV allocation result and the initial detection trajectory.

[0103] The resource allocation module's allocation process is as follows: input initial candidate paths and UAV feature vectors → allocation network (fully connected layer) → output initial allocation results; that is, allocating UAVs to paths based on information such as UAV battery level, with the advantage of achieving fast initial allocation. The optimization and adjustment module calculates rewards through a reward function and optimizes network parameters. The specific process is as follows: input initial allocation results and initial candidate paths → reward calculation (based on minimizing energy consumption and maximizing coverage) → policy network adjustment → output optimized UAV allocation results and initial detection trajectories; that is, reducing conflicts and energy consumption through iterative optimization, with the advantage of achieving dynamic adjustment and convergence to the optimal solution.

[0104] The result output layer is used to smooth the initial detection trajectory through a sequence generation network (such as spline interpolation), and then output the UAV allocation result and the smoothed initial detection trajectory.

[0105] Specifically, in step S2.3, encrypting the initial detection trajectory, detection area, and detection time period into instruction ciphertext data involves: obtaining the current second timestamp; concatenating the initial detection trajectory, detection area, detection time period, and second timestamp into concatenated data based on a preset separator; calculating the first hash value of the concatenated data using the HASH256 algorithm; taking the first 128 bits from the first hash value as a dynamic key; encrypting the concatenated data using the dynamic key via the SM4 algorithm to obtain a first layer of encrypted data; encrypting the first layer of encrypted data and the first hash value into a second layer of encrypted data using the IDEA algorithm; inserting a random string of a specified length at a specified position in the second layer of encrypted data to obtain a third layer of encrypted data; and encrypting the third layer of encrypted data into instruction ciphertext data using the RC6 algorithm.

[0106] The specific process of step S3 is as follows:

[0107] Step S3.1: The UAV receives the power line detection command in real time, parses the command to obtain command ciphertext data, decrypts the command ciphertext data using the RC6 algorithm to obtain three-layer encrypted data, locates and removes a random string from the three-layer encrypted data based on a specified position and length to obtain two-layer encrypted data, decrypts the two-layer encrypted data using the IDEA algorithm to obtain one-layer encrypted data and a first hash value, takes the first 128 bits from the first hash value as a dynamic key, calls the dynamic key using the SM4 algorithm to decrypt the one-layer encrypted data to obtain concatenated data, performs integrity verification on the concatenated data using the first hash value, parses the concatenated data based on a preset separator to obtain the initial detection trajectory, detection area, detection period, and second timestamp, and performs timeliness verification using the second timestamp.

[0108] Step S3.2: After the verification is passed, the UAV sets up an electronic fence based on the detection area and the initial detection trajectory (that is, the electronic fence is set by expanding the initial detection trajectory by a preset range, and the electronic fence cannot exceed the detection area). When the detection time arrives, the UAV performs the inspection task within the electronic fence based on the initial detection trajectory.

[0109] Step S3.3: During the inspection, the Beidou locator collects positioning data in real time, and the LiDAR technology collects three-dimensional spatial information in real time. The electronic fence is dynamically updated based on the positioning data and three-dimensional spatial information (that is, a no-fly zone is further set within the electronic fence to prevent drones from colliding with power lines or buildings).

[0110] Step S3.4: During the inspection, the initial detection trajectory is dynamically corrected based on the reinforcement learning algorithm, and the flight time sequence images of the power line are acquired by the onboard multispectral sensor.

[0111] In step S3.4, the reinforcement learning algorithm uses the Q-Learning model, and the state space of the Q-Learning model includes:

[0112] Self-state information (current position coordinates (x, y, z): provided by the Beidou locator, which is the most critical spatial information for decision-making; remaining battery power / endurance: obtained from the drone's information, which is crucial to avoid mission failure due to battery depletion; current speed and heading angle: determine the drone's instantaneous motion state).

[0113] Environmental perception information (distance / direction to the nearest power line: calculated by LiDAR or multispectral sensors, which is the core of performing inspection tasks; distance to the nearest obstacle (such as poles, trees, buildings): monitored in real time by LiDAR technology, which is a key status input to ensure flight safety; local map information of the current detection area).

[0114] Task progress information (percentage of inspected trajectories / sections of lines that have been inspected: encourages the drone to cover more uninspected areas; deviation from preset detection waypoints: the distance and direction deviation between the drone's current actual position and the nearest target waypoint on the initial detection trajectory; relationship between current time and detection period: whether it is within the specified detection period and whether there is enough time remaining).

[0115] The action space of the Q-Learning model includes:

[0116] Discrete maneuver space (e.g., {maintain current heading and altitude}, {accelerate}, {decelerate}, {turn 10 degrees left}, {turn 10 degrees right}, {ascend 5 meters}, {descend 5 meters}, {fly directly to the next target waypoint});

[0117] The continuous action space (outputting a continuous adjustment, such as [Δ heading angle, Δ velocity, Δ altitude]) and the reward function are dynamically optimized based on detection coverage and risk aversion metrics.

[0118] Through reinforcement learning algorithms, drones can learn to maximize coverage of the detection area and effectively collect data in a way that is efficient (saving power and time) while ensuring safety (avoiding obstacles and not flying out of the electronic fence), thereby achieving dynamic and intelligent power line inspection.

[0119] In step S4, the line anomaly detection model is constructed based on a feature extraction layer (extracting spatial and spectral features from flight time-series images), a modal fusion layer (aligning and fusing features from different spectral bands to solve the problems of spatial offset and scale difference between bands), a feature enhancement layer (enhancing feature representation to improve robustness to noise and deformation), an anomaly prediction layer (predicting anomaly results and estimating uncertainty), and a feedback optimization layer (optimizing model parameters to improve generalization ability).

[0120] 1. The feature extraction layer is constructed based on a 3D convolutional neural network unit, a Transformer unit, and an attention gating mechanism unit. The 3D convolutional neural network unit is used to extract spatial-spectral features from flight time-series images through 3D convolutional kernels. The Transformer unit is used to integrate global contextual information of spatial-spectral features through a multi-head self-attention mechanism to obtain contextual features. The attention gating mechanism unit is used to filter key features from contextual features through learnable attention weights to obtain image features.

[0121] 3D convolutional neural network units are used to capture local spatial patterns and cross-band correlations, avoiding the neglect of spectral dimension information. Their advantage lies in their ability to efficiently process high-dimensional data and reduce information loss. Transformer units are used to model long-distance dependencies and enhance the understanding of the global structure of power lines (such as conductor continuity). Their advantage lies in improving the completeness of feature representation and adapting to changes in image scale. Attention gating mechanism units are used to focus on abnormally correlated regions (such as insulators or connection points) and suppress background noise. Their advantage lies in improving feature discriminativeness and reducing computational redundancy.

[0122] 2. The modality fusion layer is constructed based on a band alignment module and a multi-scale feature fusion module. The band alignment module is used to perform spatial alignment operations on image features through a deformable convolutional network. The multi-scale feature fusion module is used to extract inter-band correlation features from the spatially aligned image features through a cross-attention mechanism, dynamically adjust the weights of each correlation feature through a gated fusion unit, and fuse them to obtain fused features.

[0123] The band alignment module is used to align the spatial positions of different bands (such as compensating for thermal expansion offset between infrared and visible bands) to ensure that band features are consistent in space. Its advantages are strong adaptability and handling of nonlinear deformation. The multi-scale feature fusion module is used to integrate multi-scale information (such as local details and global structure) to enhance anomaly-sensitive features. Its advantages are improved fusion efficiency and preservation of complementary information.

[0124] 3. The feature enhancement layer is constructed based on a self-supervised contrastive learning module and a knowledge graph enhancement module. The self-supervised contrastive learning module is used to construct positive sample pairs (similar anomaly patterns) and negative sample pairs (different patterns) based on the fused features through data enhancement (such as random pruning and rotation). The contrastive loss function is used to optimize the feature representation of the positive sample pairs and negative sample pairs to obtain the first-level enhanced features. The knowledge graph enhancement module is used to integrate the semantic information of the first-level enhanced features through a preset power line knowledge graph (containing the semantic relationship of common anomaly types such as "insulator cracks"), and use a graph neural network to propagate knowledge to obtain the second-level enhanced features.

[0125] The feature enhancement layer is used to enhance feature robustness and improve generalization ability through unsupervised learning and domain knowledge integration; the self-supervised contrastive learning module is used to learn invariant representations to reduce overfitting. Its advantage is that it does not require additional labeled data and improves the model's robustness to changes in illumination and angle; the knowledge graph enhancement module is used to inject domain knowledge to enhance the interpretability of features. Its advantage is that it improves the ability to detect rare anomalies and reduces false positives.

[0126] To further understand the self-supervised contrastive learning module, its learning process is explained:

[0127] First, make some minor modifications to the image (such as random cropping or rotation). These modifications will not change the essential content of the image; they simply change the perspective from which you view it.

[0128] Treat these modified images as "positive sample pairs"—they are actually the same image, just looking slightly different, so the model should consider them "very similar";

[0129] Then select some completely different images as "negative sample pairs"—they are unrelated, and the model should learn to "distinguish" them;

[0130] The model is trained using a "contrastive loss function" to bring positive sample pairs closer together and push negative sample pairs further apart.

[0131] The final feature obtained is the "first-level enhanced feature"—it is smarter than the original feature and can distinguish which are of the same kind and which are different kinds.

[0132] 4. The anomaly prediction layer is constructed based on the anomaly classification module and the uncertainty estimation module. The anomaly classification module is used to infer the secondary enhanced features through a fully connected layer and a Softmax activation function to predict the anomaly probability distribution of each anomaly category (such as normal, insulator damage, conductor breakage, etc.). The uncertainty estimation module is used to predict the uncertainty of the anomaly probability distribution through a Bayesian neural network, and output the line anomaly detection result based on the anomaly probability distribution and uncertainty.

[0133] The anomaly classification module is used to directly output detection results. Its advantages are simplicity and efficiency, and it supports the identification of multiple anomalies. The uncertainty estimation module is used to predict the uncertainty of each result. It filters high-confidence results based on thresholds, that is, it quantifies the reliability of prediction and filters low-quality outputs. Its advantage is to improve the credibility of the model and it is suitable for safety-critical scenarios.

[0134] 5. The feedback optimization layer is used to optimize the model parameters of the feature extraction layer, modality fusion layer, feature enhancement layer and anomaly prediction layer through backpropagation of the anomaly detection loss function; the anomaly detection loss function adopts the weighted cross-entropy loss function.

[0135] The feedback optimization layer is built on the gradient descent optimizer to minimize prediction error and prevent overfitting. Its advantage lies in adaptive learning and improved model generalization.

[0136] Power line anomaly detection is a critical task in power system maintenance, aiming to detect faults such as insulator damage, conductor breakage, and thermal anomalies using multispectral sensor images (e.g., visible light, infrared bands). Multispectral sensor images (time-series flight images) contain rich spatial and spectral information, but face challenges such as inter-band differences, noise interference, and diverse anomaly patterns. To address these issues, a power line anomaly detection model was created. This model consists of multiple modules and incorporates techniques such as Transformer, attention mechanisms, self-supervised contrastive learning, and knowledge graph augmentation to improve the robustness of feature extraction, the adaptability of feature fusion, and the accuracy of prediction. The core of the model is processing the unique characteristics of time-series flight images, achieving efficient anomaly detection through an end-to-end architecture.

[0137] The line anomaly detection model has the following significant advantages:

[0138] Efficiently processes multispectral data: Integrates spatial-spectral information through 3D convolution and Transformer, fully leveraging the advantages of multiple bands (such as infrared band detection of thermal anomalies) to improve the comprehensiveness of feature extraction. Highly robust: The modality fusion layer addresses inter-band offsets, and the feature enhancement layer introduces self-supervised contrastive learning and knowledge graphs, effectively resisting noise, illumination changes, and rare anomalies, reducing false detection rates. Highly innovative: Creatively combines Transformer, attention mechanisms, and knowledge graphs to enhance feature representation; the uncertainty estimation module provides reliable output, suitable for power system safety-critical applications. End-to-end optimization: The feedback optimization layer achieves efficient training through a customized loss function; the model is lightweight and easily deployed to edge devices. Practical application value: Directly solves practical problems in power line maintenance, reduces manual inspection costs, and supports real-time monitoring.

[0139] The specific process of step S5 is as follows: the UAV records the actual detection trajectory based on the positioning data collected in real time by the Beidou locator, marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and the UAVs in the detection area form a local area network based on wireless network technology (Wi-Fi Mesh). The actual detection trajectory and UAV status data are exchanged with each other based on the local area network. When it is determined that there is a UAV that cannot complete the inspection task based on the exchanged actual detection trajectory and UAV status data, the initial detection trajectory is dynamically adjusted.

[0140] When a drone involved in collaborative operations malfunctions or is delayed due to weather or other reasons, the initial detection trajectory of the remaining drones is dynamically adjusted to complete the predetermined inspection task within the detection period. The adjustment of the initial detection trajectory only adjusts the part that has not been inspected and can be executed through the drone inspection planning model deployed on the server.

[0141] The drone status data includes identity and basic information, real-time flight status data, energy and power system status, mission execution and progress data, equipment and sensor health status, environmental and perception data, and collaboration and decision-making data.

[0142] Identity and basic information include:

[0143] 1. Drone Number / ID: A unique identifier used to distinguish different drones;

[0144] 2. Crew / Formation Information: The task group number to which the aircraft belong, used to distinguish the aircraft groups performing different tasks;

[0145] 3. Model and hardware configuration: For example, the drone model and the type of sensors it carries (such as the specifications of infrared thermal imagers, visible light cameras, and LiDAR), which will affect its mission execution capabilities (for example, some drones are more suitable for fine inspection, while others are more suitable for rapid patrol).

[0146] Real-time flight status data:

[0147] 1. Current location coordinates: high-precision latitude and longitude, altitude (from BeiDou);

[0148] 2. Speed ​​and Heading: Current flight speed vector (horizontal speed, vertical speed), heading angle (Yaw), pitch angle (Pitch), roll angle (Roll);

[0149] 3. Flight Mode: Currently in auto cruise, manual control, hover, return to home (RTH), or fault protection mode.

[0150] Energy and power system status:

[0151] 1. Remaining power: Current battery percentage or voltage, this is one of the most important status data;

[0152] 2. Estimated flight time: The remaining flight time dynamically calculated based on the current power consumption rate and mission load;

[0153] 3. Battery health status: battery cycle count, current maximum capacity percentage;

[0154] 4. Power system status: motor speed, motor temperature, and whether there is any abnormal vibration information of the propeller.

[0155] Task execution and progress data:

[0156] 1. The sequence of waypoints already flown, and their deviation from the initial planned trajectory;

[0157] 2. The proportion of the inspected line mileage or area to the total task volume;

[0158] 3. The detected anomalies, along with their precise location coordinates, timestamps, anomaly types, and confidence levels, can help other drones avoid or verify confirmed danger zones;

[0159] 4. The coordinates of the next checkpoint you are about to visit.

[0160] Equipment and sensor health status:

[0161] 1. Sensor status: such as whether the camera is focusing properly, whether the LiDAR is online, the gimbal's working status, and the remaining storage space;

[0162] 2. Communication link status: Signal strength (RSSI) and packet loss rate when communicating with the server or other drones;

[0163] 3. BeiDou satellite status: number of locked satellites, positioning accuracy factor (HDOP / VDOP).

[0164] Environmental and Sensing Data:

[0165] 1. Local obstacle map: Local maps of the surrounding environment or point clouds of key obstacles (such as temporary cranes or trees that have grown too tall) built in real time using LiDAR can be shared to update public electronic fences.

[0166] 2. Meteorological information: Local measurements of wind speed, wind direction, temperature, and humidity by the drone are crucial for determining whether the drone can fly safely (for example, if a strong crosswind suddenly appears in a certain area, it can warn other drones to take evasive action).

[0167] Collaboration and Decision Data:

[0168] 1. Self-status summary: A summary of information generated by the onboard computer for collaborative decision-making, such as: "Battery is sufficient, can take over additional tasks", "Sensor failure, can only perform basic line inspection", "Returning to base, please take over the area I have not completed";

[0169] 2. Decision Intent: The planned next action, such as: "I will go to coordinates (X,Y)", "I plan to conduct a close-up review of anomaly point A", "I will begin the return journey in 5 minutes".

[0170] The specific process of step S6 is as follows:

[0171] Step S6.1: The UAV records an inspection log in real time, including at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data.

[0172] Step S6.2: After the inspection is completed, separate image data and text data from the inspection log. Compress the image data using the ZSTD algorithm to obtain compressed image data, and compress the text data using the Brotli algorithm to obtain compressed text data. Calculate the first MD5 value of the compressed image data using the MD5 algorithm, calculate the second MD5 value of the compressed text data using the MD5 algorithm, encrypt the compressed image data and the first MD5 value into first encrypted data using the AES-256 algorithm, encrypt the compressed text data and the second MD5 value into second encrypted data using the SM9 algorithm, encrypt the first encrypted data and the second encrypted data into an encrypted log using the AES algorithm, calculate the log fingerprint of the encrypted log using the HMAC algorithm and store it on the blockchain, and upload the encrypted log to the server via the TLS protocol.

[0173] By using drones to record inspection logs in real time and employing an efficient data processing chain, data security, integrity, and transmission efficiency are significantly improved: ZSTD and Brotli algorithms are used to compress image and text data respectively, reducing storage and bandwidth requirements; MD5 hash values ​​ensure data integrity, and a multi-layered encryption strategy combining AES-256, SM9, and AES enhances confidentiality; finally, HMAC is used to calculate log fingerprints and store them on a blockchain to achieve tamper-proof audit trails, and the data is securely uploaded via the TLS protocol. Overall, this achieves reliable and efficient end-to-end log management, suitable for scenarios such as critical infrastructure inspections.

[0174] The specific process of step S7 is as follows:

[0175] Step S7.1: The server receives the encrypted log in real time, performs integrity verification on the encrypted log using the log fingerprint stored on the blockchain, and then stores the encrypted log in a preset path.

[0176] Step S7.2: The server decrypts the encrypted log using the AES algorithm to obtain first encrypted data and second encrypted data. It then decrypts the first encrypted data using the AES-256 algorithm to obtain image compressed data and a first MD5 value. The first MD5 value is used to verify the integrity of the image compressed data. Finally, the server decrypts the second encrypted data using the SM9 algorithm to obtain text compressed data and a second MD5 value. The second MD5 value is used to verify the integrity of the text compressed data.

[0177] Step S7.3: The server decompresses the image compressed data using the ZSTD algorithm to obtain image data, decompresses the text compressed data using the Brotli algorithm to obtain text data, and reconstructs the inspection log based on the image data and text data.

[0178] Step S7.4: The server summarizes and statistically analyzes the inspection logs uploaded by each drone to generate a power line anomaly detection report, which is then displayed in real time on a large screen.

[0179] By combining blockchain notarization to ensure data immutability, employing multi-layer encryption with AES-256 and SM9 to enhance security, and utilizing MD5 checksum and efficient compression algorithms (ZSTD and Brotli) to guarantee data integrity and processing efficiency, the system ultimately achieves real-time decryption, decompression, and data analysis, generating visualized power line anomaly detection reports. This approach combines high reliability, low cost, and industry applicability.

[0180] The specific process of step S8 is as follows: The server obtains the current third timestamp, calculates the second hash value of the power line anomaly detection report and the third timestamp using the HASH256 algorithm, XORs the power line anomaly detection report and the second hash value to obtain obfuscated data, encrypts the obfuscated data, the third timestamp, and the second hash value into first-level encrypted data using the SM4 algorithm, converts the first-level encrypted data into hexadecimal data, swaps the number 8 with the letter B and the number 9 with the letter A in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted report using the Twofish algorithm, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time via the TLS protocol.

[0181] By combining multiple encryption algorithms (such as HASH256, SM4, and Twofish), data obfuscation operations (such as XOR and character swapping), and timestamp integration, the high security, integrity, and resistance to replay attacks of power line anomaly detection reports are ensured. At the same time, the TLS protocol is used to achieve real-time encrypted transmission, ensuring the confidentiality and timeliness of data during storage and push. The overall design is efficient and highly compatible.

[0182] The highly automated drone-based collaborative inspection system enables intelligent management of the entire process of power line anomaly detection. Its core advantages lie in the integration of multi-layered encryption security mechanisms, intelligent trajectory planning and anomaly recognition algorithms based on reinforcement learning and deep learning, real-time data interaction and dynamic fault-tolerant adjustment among multiple drones, and blockchain-based evidence storage to ensure data immutability. This significantly improves detection efficiency, accuracy, and security, while reducing operation and maintenance costs and the need for manual intervention, providing an efficient, reliable, and scalable solution for the reliable operation of power infrastructure.

[0183] like Figure 2 As shown, a power line anomaly detection system based on unmanned aerial vehicles (UAVs) includes:

[0184] The power line inspection request parsing module is used by the server to decrypt and verify the input power line inspection request to obtain the power line inspection work order, and to parse the power line inspection work order to obtain the inspection area and inspection time period;

[0185] The power line detection instruction issuing module is used by the server to allocate drones for power line detection based on the detection area and detection time period, plan the initial detection trajectory of each drone, generate power line detection instructions based on the initial detection trajectory, detection area and detection time period, and issue the power line detection instructions to the corresponding drones.

[0186] The inspection task execution module is used for the UAV to set up an electronic fence based on the received power line detection command, and to perform inspection tasks within the electronic fence. During the inspection, the initial detection trajectory is dynamically corrected based on a reinforcement learning algorithm, and the flight time sequence images of the power line are collected by the onboard multispectral sensor.

[0187] The line anomaly detection module is used by the UAV to automatically analyze the flight time sequence image through a pre-trained line anomaly detection model and output the line anomaly detection result.

[0188] The detection trajectory adjustment module is used for the UAV to record the actual detection trajectory in real time, mark the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and allow the UAVs in the detection area to interact with each other to view the actual detection trajectory and UAV status data, and dynamically adjust the initial detection trajectory based on the interacted actual detection trajectory and UAV status data.

[0189] The inspection log encryption upload module is used for the UAV to record inspection logs in real time. The inspection logs include at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data. After the inspection is completed, the inspection logs are encrypted into encrypted logs, the log fingerprint of the encrypted logs is calculated and stored on the blockchain, and the encrypted logs are uploaded to the server.

[0190] The power line anomaly detection report generation module is used to receive and store the encrypted logs in real time, decrypt the encrypted logs to obtain the inspection logs, generate a power line anomaly detection report based on the inspection logs uploaded by each drone, and display the power line anomaly detection report.

[0191] The power line anomaly detection report push module is used by the server to encrypt the power line anomaly detection report into an encrypted report, store the encrypted report, and push the encrypted report to the operation and maintenance terminal in real time.

[0192] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for detecting power line anomalies based on unmanned aerial vehicles (UAVs), characterized in that, include: Step S1: The server decrypts and verifies the input power line detection request to obtain a power line detection work order, and parses the power line detection work order to obtain the detection area and detection time period; Step S2: The server allocates drones for power line detection based on the detection area and detection time period, plans the initial detection trajectory of each drone, generates power line detection instructions based on the initial detection trajectory, detection area and detection time period, and sends the power line detection instructions to the corresponding drones. Step S3: The UAV sets up an electronic fence based on the received power line detection command, performs inspection tasks within the electronic fence, dynamically corrects the initial detection trajectory based on reinforcement learning algorithm during the inspection, and collects flight time-series images of the power line through the onboard multispectral sensor. Step S4: The UAV automatically analyzes the flight time-series images using a pre-trained route anomaly detection model and outputs the route anomaly detection results; Step S5: The UAV records the actual detection trajectory in real time, marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and the UAVs in the detection area interact with each other to record the actual detection trajectory and UAV status data. The initial detection trajectory is dynamically adjusted based on the interacted actual detection trajectory and UAV status data. Step S6: The drone records the inspection log in real time. The inspection log includes at least the drone number, flight sequence image, actual detection trajectory, line anomaly detection result, inspection time and drone status data. After the inspection is completed, the inspection log is encrypted into an encrypted log, the log fingerprint of the encrypted log is calculated and stored on the blockchain, and the encrypted log is uploaded to the server. Step S7: The server receives and stores the encrypted logs in real time, decrypts the encrypted logs to obtain inspection logs, generates a power line anomaly detection report based on the inspection logs uploaded by each drone, and displays the power line anomaly detection report. Step S8: The server encrypts the power line anomaly detection report into an encrypted report, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time; In step S4, the line anomaly detection model is constructed based on a feature extraction layer, a modality fusion layer, a feature enhancement layer, an anomaly prediction layer, and a feedback optimization layer. The feature extraction layer is constructed based on a 3D convolutional neural network unit, a Transformer unit, and an attention gating mechanism unit; the 3D convolutional neural network unit is used to extract spatial-spectral features from flight time-series images through 3D convolutional kernels. The Transformer unit is used to integrate global contextual information of spatial-spectral features through a multi-head self-attention mechanism to obtain contextual features; the attention gating mechanism unit is used to filter key features from the contextual features through learnable attention weights to obtain image features. The modality fusion layer is constructed based on a band alignment module and a multi-scale feature fusion module. The band alignment module is used to perform spatial alignment operations on image features through a deformable convolutional network. The multi-scale feature fusion module is used to extract inter-band correlation features from the spatially aligned image features through a cross-attention mechanism, dynamically adjust the weights of each correlation feature through a gated fusion unit, and fuse them to obtain fused features. The feature enhancement layer is constructed based on a self-supervised contrastive learning module and a knowledge graph enhancement module; the self-supervised contrastive learning module is used to construct positive and negative sample pairs based on the fused features through data enhancement; the feature representation of the positive and negative sample pairs is optimized using a contrastive loss function to obtain first-level enhanced features; The knowledge graph enhancement module is used to integrate the semantic information of the first-level enhancement features through a preset power line knowledge graph, and use a graph neural network to propagate knowledge to obtain the second-level enhancement features; The anomaly prediction layer is constructed based on an anomaly classification module and an uncertainty estimation module. The anomaly classification module is used to infer the secondary enhancement features through a fully connected layer and a Softmax activation function to predict the anomaly probability distribution of each anomaly category. The uncertainty estimation module is used to predict the uncertainty of the anomaly probability distribution through a Bayesian neural network, and output the line anomaly detection result based on the anomaly probability distribution and the uncertainty. The feedback optimization layer is used to optimize the model parameters of the feature extraction layer, modality fusion layer, feature enhancement layer, and anomaly prediction layer through backpropagation of the anomaly detection loss function; the anomaly detection loss function adopts the weighted cross-entropy loss function.

2. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that: The specific process of step S1 is as follows: Step S1.1: The server obtains the input power line inspection work order carrying encrypted work order data; the encrypted work order data is obtained by encrypting the power line inspection work order. The encryption process is as follows: obtain the input power line inspection work order, the device serial number of the local machine, and the current first timestamp; calculate the MAC value of the power line inspection work order, device serial number, and first timestamp using the HMAC algorithm; encrypt the power line inspection work order, device serial number, first timestamp, and MAC value using the AES-256 algorithm to obtain initial encrypted data; create a public key and private key pair using the EdDSA algorithm; calculate the digital signature value of the initial encrypted data using the private key; XOR the public key with the device serial number to obtain the first-level encryption public key; cyclically shift each character of the first-level encryption public key 3 bits to the right to obtain the second-level encryption public key; encrypt the initial encrypted data, digital signature value, second-level encryption public key, and device serial number into encrypted work order data using the AES algorithm. Step S1.2: The server parses the power line inspection work order to obtain the encrypted work order data. It then decrypts the encrypted work order data using the AES algorithm to obtain initial encrypted data, a digital signature value, a secondary encryption public key, and a device serial number. The server cyclically shifts each character of the secondary encryption public key three bits to the left to obtain the primary encryption public key. It then performs an XOR operation on the primary encryption public key using the device serial number to obtain the public key. After verifying the digital signature value using the public key, the server decrypts the initial encrypted data using the AES-256 algorithm to obtain the power line inspection work order, the device serial number, a first timestamp, and a MAC value. The server performs integrity verification on the power line inspection work order, the device serial number, and the first timestamp using the MAC value, timeliness verification using the first timestamp, and legality verification using the device serial number. Finally, the server parses the power line inspection work order to obtain the inspection area and inspection time period.

3. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 2, characterized in that: The specific process of step S2 is as follows: Step S2.1: The server retrieves spatial topology data of power lines from the database based on the detection area, and obtains information on drones that are currently idle; Step S2.2: The server inputs the information of the UAV, spatial topology data and detection time period into the pre-trained UAV inspection planning model to obtain the UAV allocation result and the initial detection trajectory; Step S2.3: The server encrypts the initial detection trajectory, detection area, and detection time period into encrypted instruction data, generates a power line detection instruction based on the encrypted instruction data, and sends the power line detection instruction to the corresponding drone via HTTPS protocol based on the drone number carried in the drone allocation result. In step S2.2, the UAV inspection planning model is constructed based on a data preprocessing layer, a feature fusion layer, a path generation layer, an allocation optimization layer, and a result output layer. The data preprocessing layer is constructed based on a UAV feature extraction module, a spatial topology feature extraction module, and a temporal feature extraction module. The UAV feature extraction module is used to extract UAV feature vectors from UAV information through a fully connected neural network. The spatial topology feature extraction module is used to extract graph feature vectors from spatial topology data through a graph convolutional network. The temporal feature extraction module is used to extract temporal feature vectors from the detection period through a recurrent neural network. The feature fusion layer is used to fuse UAV feature vectors, graph feature vectors, and temporal feature vectors through a cross-attention mechanism, and output a unified environmental representation feature. The path generation layer is used to infer environmental representation features through a deep Q-network and output preliminary candidate paths; The allocation optimization layer is constructed based on a resource allocation module and an optimization adjustment module. The resource allocation module is used to reason about the preliminary candidate paths and UAV feature vectors using a greedy algorithm and a neural network, and output an initial allocation result carrying the correspondence between the UAV number and the preliminary candidate path. The optimization adjustment module is used to optimize the initial allocation result and the preliminary candidate path using a policy gradient method to obtain the UAV allocation result and the initial detection trajectory. The result output layer is used to smooth the initial detection trajectory through a sequence generation network, and then output the UAV allocation result and the smoothed initial detection trajectory. Specifically, in step S2.3, encrypting the initial detection trajectory, detection area, and detection time period into instruction ciphertext data involves: obtaining the current second timestamp; concatenating the initial detection trajectory, detection area, detection time period, and second timestamp into concatenated data based on a preset separator; calculating the first hash value of the concatenated data using the HASH256 algorithm; taking the first 128 bits from the first hash value as a dynamic key; encrypting the concatenated data using the dynamic key via the SM4 algorithm to obtain a first layer of encrypted data; encrypting the first layer of encrypted data and the first hash value into a second layer of encrypted data using the IDEA algorithm; inserting a random string of a specified length at a specified position in the second layer of encrypted data to obtain a third layer of encrypted data; and encrypting the third layer of encrypted data into instruction ciphertext data using the RC6 algorithm.

4. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 3, characterized in that: The specific process of step S3 is as follows: Step S3.1: The UAV receives the power line detection command in real time, parses the power line detection command to obtain command ciphertext data, decrypts the command ciphertext data using the RC6 algorithm to obtain three-layer encrypted data, locates and removes a random string in the three-layer encrypted data based on a specified position and length to obtain two-layer encrypted data, decrypts the two-layer encrypted data using the IDEA algorithm to obtain one-layer encrypted data and a first hash value, takes the first 128 bits from the first hash value as a dynamic key, calls the dynamic key using the SM4 algorithm to decrypt the one-layer encrypted data to obtain concatenated data, performs integrity verification on the concatenated data using the first hash value, parses the concatenated data based on a preset separator to obtain the initial detection trajectory, detection area, detection period and second timestamp, and performs timeliness verification using the second timestamp; Step S3.2: After the verification is passed, the UAV sets up an electronic fence based on the detection area and the initial detection trajectory. When the detection time arrives, it performs an inspection task within the electronic fence based on the initial detection trajectory. Step S3.3: During the inspection, the Beidou locator collects positioning data in real time, and the LiDAR technology collects three-dimensional spatial information in real time. The electronic fence is dynamically updated based on the positioning data and the three-dimensional spatial information. Step S3.4: During the inspection, the initial detection trajectory is dynamically corrected based on the reinforcement learning algorithm, and the flight time sequence image of the power line is acquired by the onboard multispectral sensor; The reinforcement learning algorithm uses the Q-Learning model.

5. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 4, characterized in that: The specific process of step S5 is as follows: The UAV records the actual detection trajectory based on the positioning data collected in real time by the Beidou locator, and marks the abnormality on the actual detection trajectory based on the abnormality detection result of the line. Each UAV in the detection area forms a local area network based on wireless network technology. Based on the local area network, the actual detection trajectory and UAV status data are exchanged with each other. When it is determined that there is a UAV that cannot complete the inspection task based on the exchanged actual detection trajectory and UAV status data, the initial detection trajectory is dynamically adjusted. The drone status data includes identity and basic information, real-time flight status data, energy and power system status, mission execution and progress data, equipment and sensor health status, environmental and perception data, and collaboration and decision-making data.

6. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 5, characterized in that: The specific process of step S6 is as follows: Step S6.1: The UAV records an inspection log in real time, including at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data. Step S6.2: After the inspection is completed, separate image data and text data from the inspection log. Compress the image data using the ZSTD algorithm to obtain compressed image data, and compress the text data using the Brotli algorithm to obtain compressed text data. Calculate the first MD5 value of the compressed image data using the MD5 algorithm, calculate the second MD5 value of the compressed text data using the MD5 algorithm, encrypt the compressed image data and the first MD5 value into first encrypted data using the AES-256 algorithm, encrypt the compressed text data and the second MD5 value into second encrypted data using the SM9 algorithm, encrypt the first encrypted data and the second encrypted data into an encrypted log using the AES algorithm, calculate the log fingerprint of the encrypted log using the HMAC algorithm and store it on the blockchain, and upload the encrypted log to the server via the TLS protocol.

7. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 6, characterized in that: The specific process of step S7 is as follows: Step S7.1: The server receives the encrypted log in real time, performs integrity verification on the encrypted log using the log fingerprint stored on the blockchain, and then stores the encrypted log in a preset path; Step S7.2: The server decrypts the encrypted log using the AES algorithm to obtain first encrypted data and second encrypted data. It then decrypts the first encrypted data using the AES-256 algorithm to obtain image compressed data and a first MD5 value. The first MD5 value is used to verify the integrity of the image compressed data. Finally, the server decrypts the second encrypted data using the SM9 algorithm to obtain text compressed data and a second MD5 value. The second MD5 value is used to verify the integrity of the text compressed data. Step S7.3: The server decompresses the image compressed data using the ZSTD algorithm to obtain image data, decompresses the text compressed data using the Brotli algorithm to obtain text data, and reconstructs the inspection log based on the image data and text data; Step S7.4: The server summarizes and statistically analyzes the inspection logs uploaded by each drone to generate a power line anomaly detection report, which is then displayed in real time on a large screen.

8. The method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 7, characterized in that: The specific process of step S8 is as follows: The server obtains the current third timestamp, calculates the second hash value of the power line anomaly detection report and the third timestamp using the HASH256 algorithm, XORs the power line anomaly detection report and the second hash value to obtain obfuscated data, encrypts the obfuscated data, the third timestamp, and the second hash value into first-level encrypted data using the SM4 algorithm, converts the first-level encrypted data into hexadecimal data, swaps the number 8 with the letter B and the number 9 with the letter A in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted report using the Twofish algorithm, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time via the TLS protocol.

9. A power line anomaly detection system based on unmanned aerial vehicles (UAVs), characterized in that, include: The power line inspection request parsing module is used by the server to decrypt and verify the input power line inspection request to obtain the power line inspection work order, and to parse the power line inspection work order to obtain the inspection area and inspection time period; The power line detection instruction issuing module is used by the server to allocate drones for power line detection based on the detection area and detection time period, plan the initial detection trajectory of each drone, generate power line detection instructions based on the initial detection trajectory, detection area and detection time period, and issue the power line detection instructions to the corresponding drones. The inspection task execution module is used for the UAV to set up an electronic fence based on the received power line detection command, and to perform inspection tasks within the electronic fence. During the inspection, the initial detection trajectory is dynamically corrected based on a reinforcement learning algorithm, and the flight time sequence images of the power line are collected by the onboard multispectral sensor. The line anomaly detection module is used by the UAV to automatically analyze the flight time sequence image through a pre-trained line anomaly detection model and output the line anomaly detection result. The detection trajectory adjustment module is used for the UAV to record the actual detection trajectory in real time, mark the abnormality on the actual detection trajectory based on the abnormality detection result of the line, and allow the UAVs in the detection area to interact with each other to view the actual detection trajectory and UAV status data, and dynamically adjust the initial detection trajectory based on the interacted actual detection trajectory and UAV status data. The inspection log encryption upload module is used for the UAV to record inspection logs in real time. The inspection logs include at least the UAV number, flight sequence images, actual detection trajectory, line anomaly detection results, inspection time, and UAV status data. After the inspection is completed, the inspection logs are encrypted into encrypted logs, the log fingerprint of the encrypted logs is calculated and stored on the blockchain, and the encrypted logs are uploaded to the server. The power line anomaly detection report generation module is used to receive and store the encrypted logs in real time, decrypt the encrypted logs to obtain the inspection logs, generate a power line anomaly detection report based on the inspection logs uploaded by each drone, and display the power line anomaly detection report. The power line anomaly detection report push module is used by the server to encrypt the power line anomaly detection report into an encrypted report, store the encrypted report, and push the encrypted report to the operation and maintenance terminal in real time; In the line anomaly detection module, the line anomaly detection model is constructed based on a feature extraction layer, a modality fusion layer, a feature enhancement layer, an anomaly prediction layer, and a feedback optimization layer. The feature extraction layer is constructed based on a 3D convolutional neural network unit, a Transformer unit, and an attention gating mechanism unit; the 3D convolutional neural network unit is used to extract spatial-spectral features from flight time-series images through 3D convolutional kernels. The Transformer unit is used to integrate global contextual information of spatial-spectral features through a multi-head self-attention mechanism to obtain contextual features; the attention gating mechanism unit is used to filter key features from the contextual features through learnable attention weights to obtain image features. The modality fusion layer is constructed based on a band alignment module and a multi-scale feature fusion module. The band alignment module is used to perform spatial alignment operations on image features through a deformable convolutional network. The multi-scale feature fusion module is used to extract inter-band correlation features from the spatially aligned image features through a cross-attention mechanism, dynamically adjust the weights of each correlation feature through a gated fusion unit, and fuse them to obtain fused features. The feature enhancement layer is constructed based on a self-supervised contrastive learning module and a knowledge graph enhancement module; the self-supervised contrastive learning module is used to construct positive and negative sample pairs based on the fused features through data enhancement; the feature representation of the positive and negative sample pairs is optimized using a contrastive loss function to obtain first-level enhanced features; The knowledge graph enhancement module is used to integrate the semantic information of the first-level enhancement features through a preset power line knowledge graph, and use a graph neural network to propagate knowledge to obtain the second-level enhancement features; The anomaly prediction layer is constructed based on an anomaly classification module and an uncertainty estimation module. The anomaly classification module is used to infer the secondary enhancement features through a fully connected layer and a Softmax activation function to predict the anomaly probability distribution of each anomaly category. The uncertainty estimation module is used to predict the uncertainty of the anomaly probability distribution through a Bayesian neural network, and output the line anomaly detection result based on the anomaly probability distribution and the uncertainty. The feedback optimization layer is used to optimize the model parameters of the feature extraction layer, modality fusion layer, feature enhancement layer, and anomaly prediction layer through backpropagation of the anomaly detection loss function; the anomaly detection loss function adopts the weighted cross-entropy loss function.

Citation Information

Patent Citations

  • Power grid cloud edge collaborative inspection system and method based on 5G intelligent network connection unmanned aerial vehicle

    CN115209379A

  • Urban high-voltage transmission line unmanned aerial vehicle cooperative network communication method and system

    CN118195274A

  • Electric power AI intelligent auxiliary control and inspection system

    CN120258758A

  • Unmanned aerial vehicle cruise detection method and device, electronic equipment and storage medium

    CN120595861A