Power line anomaly detection method and system based on unmanned aerial vehicle

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 detection efficiency, insufficient intelligence, and weak safety control in existing technologies, and improves detection efficiency and anomaly identification capabilities.

CN120996791AActive Publication Date: 2025-11-21STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST

Patent Information

Application Number
CN202511521552.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-11-21
Estimated Expiration
2045-10-23

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 inspection path 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, 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 CN120996791A_ABST
    Figure CN120996791A_ABST
Patent Text Reader

Abstract

The invention discloses a power line anomaly detection method and system based on an unmanned aerial vehicle. The method comprises the steps that a server analyzes a power line detection request to obtain a detection area and a detection time period; planning an initial detection track, generating a power line detection instruction based on the initial detection track, the detection area and the detection time period, and issuing the instruction to the unmanned aerial vehicle; the unmanned aerial vehicle executes an inspection task in the electronic fence, the initial detection track is dynamically corrected in the inspection process, and a flight time sequence image is collected; analyzing the flight time sequence image through a line anomaly detection model, and outputting a line anomaly detection result; an actual detection track is recorded, and abnormity marking is carried out on the actual detection track; and recording, encrypting and uploading an inspection log to the server. The method has the advantages that the detection efficiency, the intelligent level and the safety management capability of power line anomaly detection are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power facility operation and maintenance and artificial intelligence, in particular to a power line anomaly detection method and system based on a UAV. BACKGROUND

[0002] With the continuous expansion of the scale of the power system and the increasing complexity of the power grid structure, the safe and stable operation of the power line has become a key link to ensure social production and people's life electricity. The power line is in the natural environment for a long time, and is threatened by wind and rain erosion, lightning, icing, external damage and material aging, etc., which can easily cause abnormal states such as broken strands, damaged insulators, corrosion of fittings, and overheating of connecting points. If the above abnormalities are not discovered and handled in time, it may lead to local power interruption, and even cause large-scale power grid failure, resulting in serious economic loss and social impact.

[0003] At present, the inspection and anomaly detection of the power line mainly rely on the following three ways: 1. Manual ground inspection: As the most basic operation and maintenance means, the inspection personnel usually use binoculars, infrared thermometers, ultraviolet imagers and other equipment to walk or drive along the power line. This method has significant limitations: first, the inspection efficiency is low, especially in complex terrain, inconvenient transportation areas (such as mountainous areas, marshes, forest areas, etc.), the cycle is long, and the coverage is limited; second, the detection results are greatly affected by the experience, fatigue state and weather conditions of the personnel, and are highly subjective; third, the inspection personnel need to be close to high-voltage facilities, and face the risk of electric shock and falling.

[0004] 2. Inspection by manned helicopter: To improve the inspection efficiency, some power grid enterprises use manned helicopters to carry high-definition cameras, infrared thermal imagers and other equipment for aerial inspection. Although this method has the advantages of wide inspection range and fast speed, its operation and maintenance cost is high, the scheduling is complex, and it is severely restricted by airspace control and weather conditions. At the same time, the helicopter has large vibration during flight, which leads to poor image acquisition stability, and requires a professional flight and data analysis team, and heavy data processing burden in the later stage.

[0005] 3. Traditional UAV inspection: In recent years, UAV technology has been gradually applied to power line inspection. Through remote control or pre-set flight route, the UAV can carry visible light, infrared and multispectral sensors to obtain line image data. Compared with manual and helicopter inspection, the UAV method has the advantages of high flexibility, low cost, and close-up shooting.

[0006] However, the existing technology still has the following outstanding problems: 1. Insufficient automation level: Most systems still rely on manual remote control or fixed flight routes, and cannot achieve dynamic path planning according to the actual route, which easily leads to missed detection or repeated detection; 2. Limited recognition ability: Image analysis mostly uses post-event manual interpretation or simple threshold alarm, lacks defect recognition ability based on intelligent algorithms such as deep learning, and has low detection rate for subtle abnormalities (such as small cracks and early rust) and high false alarm rate; 3. Dispersed data processing: Massive image data needs to be manually downloaded, stored, screened and archived, lacks a unified data management platform, and it is difficult to achieve traceability and comparative analysis of detection historical data; 4. Lack of intelligent electronic fence and safety control: The flight range of the unmanned aerial vehicle is not effectively electronically restricted, there is a risk of entering a forbidden flight area or being insufficiently away from the line, the detection process lacks standardized trajectory recording, and cannot meet the specification requirements of power grid safety management; 5. Report generation and response mechanism lag: After the abnormality is found, the report needs to be generated after multiple rounds of manual review, which delays maintenance decision-making, and lacks encryption transmission and cloud collaboration mechanism, which is low in information flow efficiency.

[0007] In summary, although the existing power line detection technology is gradually evolving from manual to automation and intelligence, it still has technical bottlenecks such as low detection efficiency, insufficient intelligent recognition ability, dispersed data management, weak safety control, and delayed response.

[0008] Therefore, how to provide a power line anomaly detection method and system based on unmanned aerial vehicles to improve the detection efficiency, intelligent level and safety management capability of power line anomaly detection has become a technical problem that needs to be solved urgently. SUMMARY

[0009] In view of the deficiencies of the prior art, the present application provides a power line anomaly detection method and system based on unmanned aerial vehicles, which aims to improve the detection efficiency, intelligent level and safety management capability of power line anomaly detection.

[0010] To achieve the above-mentioned purpose, the present application provides the following technical scheme: a power line anomaly detection method based on unmanned aerial vehicles, comprising: Step S1: The server decrypts and verifies the input power line detection request to obtain a power line detection work order, and analyzes the power line detection work order to obtain a detection area and a detection period; Step S2: The server assigns unmanned aerial vehicles for power line detection based on the detection area and the detection period, plans the initial detection trajectory of each unmanned aerial vehicle, generates a power line detection instruction based on the initial detection trajectory, the detection area and the detection period, and issues the power line detection instruction to the corresponding unmanned aerial vehicle; Step S3: The UAV sets an electronic fence based on the received power line detection instruction, performs the inspection task within the electronic fence, dynamically corrects the initial detection trajectory based on the reinforcement learning algorithm during the inspection process, and collects flight time sequence images of the power line through the carried multi-spectral sensor; Step S4: The UAV automatically analyzes the flight time sequence images through the pre-trained line anomaly detection model, and outputs a line anomaly detection result; Step S5: The UAV records the actual detection trajectory in real time, marks the actual detection trajectory based on the line anomaly detection result, and the UAVs in the detection area interact with each other the actual detection trajectory and UAV state data, and dynamically adjust the initial detection trajectory based on the actual detection trajectory and UAV state data; Step S6: The UAV records the inspection log in real time, and the inspection log at least includes the UAV number, flight time sequence image, actual detection trajectory, line anomaly detection result, inspection time and UAV state data, after the inspection is completed, the inspection log is encrypted into an encrypted log, the log fingerprint of the encrypted log is stored in the blockchain, and the encrypted log is uploaded to the server; Step S7: The server receives and stores the encrypted log in real time, decrypts the encrypted log to obtain the inspection log, generates a power line anomaly detection report based on the inspection log uploaded by each UAV, 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.

[0011] Further, the specific process of step S1 is: Step S1.1: The server obtains the input power line detection work order carrying work order ciphertext data; the work order ciphertext data is obtained by encrypting the power line detection work order, and the encryption process is as follows: obtaining the input power line detection work order, the device serial number of the local device and the current first timestamp, calculating the MAC value of the power line detection work order, the device serial number and the first timestamp through the HMAC algorithm, encrypting the power line detection work order, the device serial number, the first timestamp and the MAC value through the AES-256 algorithm to obtain the initial encrypted data, creating a pair of public key and private key through the EdDSA algorithm, calculating the digital signature value of the initial encrypted data through the private key, XORing the device serial number to obtain a first-level encrypted public key, shifting each character of the first-level encrypted public key to the right by 3 bits to obtain a second-level encrypted public key, and encrypting the initial encrypted data, the digital signature value, the second-level encrypted public key and the device serial number through the AES algorithm to obtain the work order ciphertext data; Step S1.2: The server parses the power line detection work order to obtain work order ciphertext data, decrypts the work order ciphertext data by the AES algorithm to obtain initial encrypted data, a digital signature value, a secondary encryption public key, and a device serial number, cyclically shifts each character of the secondary encryption public key left by 3 bits to obtain a primary encryption public key, performs XOR on the primary encryption public key by the device serial number to obtain a public key, verifies the digital signature value by the public key, decrypts the initial encrypted data by the AES-256 algorithm to obtain a power line detection work order, a device serial number, a first timestamp, and a MAC value, performs integrity verification on the power line detection work order, the device serial number, and the first timestamp by the MAC value, performs time validity verification by the first timestamp, performs legality verification by the device serial number, and finally parses the power line detection work order to obtain a detection area and a detection period.

[0012] Further, the specific process of step S2 is: Step S2.1: The server obtains spatial topology data of the power line from the database based on the detection area, and obtains information of a current idle unmanned aerial vehicle; Step S2.2: The server inputs the information of the unmanned aerial vehicle, the spatial topology data, and the detection period into a pre-trained unmanned aerial vehicle inspection planning model to obtain an unmanned aerial vehicle allocation result and an initial detection trajectory; Step S2.3: The server encrypts the initial detection trajectory, the detection area, and the detection period into instruction ciphertext data, generates a power line detection instruction based on the instruction ciphertext data, and carries the power line detection instruction to the corresponding unmanned aerial vehicle through the HTTPS protocol based on the unmanned aerial vehicle number carried by the unmanned aerial vehicle allocation result; In step S2.2, the unmanned aerial vehicle 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 an unmanned aerial vehicle feature extraction module, a spatial topology feature extraction module, and a time feature extraction module; the unmanned aerial vehicle feature extraction module is used to extract an unmanned aerial vehicle feature vector from the unmanned aerial vehicle information through a fully connected neural network; the spatial topology feature extraction module is used to extract a graph feature vector from the spatial topology data through a graph convolution network; and the time feature extraction module is used to extract a time feature vector from the detection period through a recurrent neural network; The feature fusion layer is used to fuse the unmanned aerial vehicle feature vector, the graph feature vector, and the time feature vector through a cross-attention mechanism to output a unified environment representation feature; The path generation layer is used to infer the environment representation feature through a deep Q network to output a preliminary candidate path; The distribution optimization layer is constructed based on a resource distribution module and an optimization adjustment module; the resource distribution module is configured to infer the preliminary candidate paths and the UAV feature vector by using a greedy algorithm and a neural network, and output an initial distribution result carrying a UAV number and a preliminary candidate path correspondence; and the optimization adjustment module is configured to optimize the initial distribution result and the preliminary candidate path by using a policy gradient method, to obtain a UAV distribution result and an initial detection trajectory. The result output layer is configured to perform smoothing processing on the initial detection trajectory by using a sequence generation network, and then output the UAV distribution result and the initial detection trajectory after the smoothing processing. In step S2.3, the initial detection trajectory, the detection area, and the detection time period are encrypted into instruction ciphertext data by: obtaining a current second timestamp, concatenating the initial detection trajectory, the detection area, the detection time period, and the second timestamp based on a preset separator to obtain concatenated data, calculating a first hash value of the concatenated data by using a HASH256 algorithm, taking the first 128 bits of the first hash value as a dynamic key, encrypting the concatenated data by using an SM4 algorithm to obtain one layer of encrypted data by using the dynamic key, encrypting the one layer of encrypted data and the first hash value into two layers of encrypted data by using an IDEA algorithm, inserting a random string of a specified length at a specified position of the two layers of encrypted data to obtain three layers of encrypted data, and encrypting the three layers of encrypted data into instruction ciphertext data by using an RC6 algorithm.

[0013] Further, the specific process of step S3 is as follows: Step S3.1: The UAV receives the power line detection instruction in real time, parses the power line detection instruction to obtain instruction ciphertext data, decrypts the instruction ciphertext data by using an RC6 algorithm to obtain three layers of encrypted data, locates and removes the random string in the three layers of encrypted data based on the specified position and the specified length, obtains two layers of encrypted data, decrypts the two layers of encrypted data by using an IDEA algorithm to obtain one layer of encrypted data and a first hash value, takes the first 128 bits of the first hash value as a dynamic key, decrypts the one layer of encrypted data by using an SM4 algorithm to obtain concatenated data by using the dynamic key, performs integrity verification on the concatenated data by using the first hash value, parses the concatenated data based on a preset separator to obtain an initial detection trajectory, a detection area, a detection time period, and a second timestamp, and performs time validity verification by using the second timestamp. Step S3.2: After the verification, the UAV sets an electronic fence based on the detection area and the initial detection trajectory, and performs a patrol task in the electronic fence based on the initial detection trajectory when the detection time arrives. Step S3.3: During the inspection process, real-time positioning data is collected by the Beidou locator, real-time three-dimensional spatial information is collected based on LiDAR technology, and the electronic fence is dynamically updated based on the positioning data and the three-dimensional spatial information; Step S3.4: During the inspection process, the initial detection trajectory is dynamically corrected based on a reinforcement learning algorithm, and flight time sequence images of the power line are collected through a multi-spectral sensor mounted thereon; the reinforcement learning algorithm uses a Q-Learning model.

[0014] Further, in step S4, the line anomaly detection model is constructed based on a feature extraction layer, a modal 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 Transforme unit, and an attention gate mechanism unit; the 3D convolutional neural network unit is used to extract spatial-spectral features from the flight time sequence images through a 3D convolution kernel; the Transforme unit is used to integrate global context information of the spatial-spectral features through a multi-head self-attention mechanism to obtain context features; and the attention gate mechanism unit is used to filter key features from the context features through learnable attention weights to obtain image features; The modal fusion layer is constructed based on a waveband alignment module and a multi-scale feature fusion module; the waveband alignment module is used to perform a spatial alignment operation on the image features through a deformable convolutional network; and the multi-scale feature fusion module is used to extract inter-waveband correlation features from the spatially aligned image features through a cross-attention mechanism, dynamically adjust the weights of the correlation features through a gating fusion unit, and fuse to obtain fused features; The feature enhancement layer is constructed based on a self-supervised contrast learning module and a knowledge graph enhancement module; the self-supervised contrast learning module is used to construct positive sample pairs and negative sample pairs through data augmentation based on the fused features; a contrast loss function is used to optimize the feature representations of the positive sample pairs and the negative sample pairs to obtain first-level enhanced features; and the knowledge graph enhancement module is used to integrate semantic information of the first-level enhanced features through a pre-set power line knowledge graph, propagate knowledge using a graph neural network, and obtain second-level enhanced 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 second-level enhanced features through a fully connected layer and a Softmax activation function to predict an abnormal probability distribution of each anomaly class; and the uncertainty estimation module is used to predict the uncertainty of the abnormal probability distribution through a Bayesian neural network, and output a line anomaly detection result based on the abnormal probability distribution and the uncertainty; The feedback optimization layer is used to optimize the model parameters of the feature extraction layer, the modal fusion layer, the feature enhancement layer and the anomaly prediction layer through the back propagation of the anomaly detection loss function; the anomaly detection loss function adopts a weighted cross-entropy loss function.

[0015] Further, the specific process of step S5 is that the unmanned aerial vehicle records an actual detection track based on the positioning data collected by the Beidou positioner in real time, performs anomaly marking on the actual detection track based on the line anomaly detection result, each unmanned aerial vehicle in the detection area forms a local area network based on wireless network technology, and interacts with each other based on the local area network to obtain the actual detection track and unmanned aerial vehicle state data, and when it is determined that there is an unmanned aerial vehicle that cannot complete the inspection task based on the actual detection track and the unmanned aerial vehicle state data, the initial detection track is dynamically adjusted. The unmanned aerial vehicle state data includes identity and basic information, real-time flight state data, energy and power system state, task execution and progress data, device and sensor health state, environment and perception data, and coordination and decision data.

[0016] Further, the specific process of step S6 is that: Step S6.1: The unmanned aerial vehicle records an inspection log in real time, which includes at least the unmanned aerial vehicle number, the flight time sequence image, the actual detection track, the line anomaly detection result, the inspection time, and the unmanned aerial vehicle state data. Step S6.2: After the inspection is completed, the image data and the text data are separated from the inspection log, the image data is compressed by the ZSTD algorithm to obtain image compression data, the text data is compressed by the Brotli algorithm to obtain text compression data, the first MD5 value of the image compression data is calculated by the MD5 algorithm, the second MD5 value of the text compression data is calculated by the MD5 algorithm, the image compression data and the first MD5 value are encrypted into first encrypted data by the AES-256 algorithm, the text compression data and the second MD5 value are encrypted into second encrypted data by the SM9 algorithm, the first encrypted data and the second encrypted data are encrypted into encrypted logs by the AES algorithm, the log fingerprint of the encrypted logs is calculated by the HMAC algorithm and stored in the blockchain, and the encrypted logs are uploaded to the server through the TLS protocol.

[0017] Further, the specific process of step S7 is that: Step S7.1: The server receives the encrypted logs in real time, and after the integrity of the encrypted logs is verified by the log fingerprint stored in the blockchain, the encrypted logs are stored in a preset path. Step S7.2: The server decrypts the encrypted log by the AES algorithm to obtain first encrypted data and second encrypted data, decrypts the first encrypted data by the AES-256 algorithm to obtain image compression data and a first MD5 value, and performs integrity verification on the image compression data by the first MD5 value; decrypts the second encrypted data by the SM9 algorithm to obtain text compression data and a second MD5 value, and performs integrity verification on the text compression data by the second MD5 value; Step S7.3: The server decompresses the image compression data by the ZSTD algorithm to obtain image data, decompresses the text compression data by the Brotli algorithm to obtain text data, and restores the inspection log based on the image data and the text data; Step S7.4: The server collects and statistically analyzes the inspection logs uploaded by each unmanned aerial vehicle to generate a power line anomaly detection report, and displays the power line anomaly detection report in real time by a display screen.

[0018] Further, the specific process of step S8 is as follows: the server obtains a current third timestamp, calculates a second hash value of the power line anomaly detection report and the third timestamp by the HASH256 algorithm, performs XOR operation on 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 by the SM4 algorithm, converts the first-level encrypted data into hexadecimal data, and reverses the numbers 8 and the letter B and the numbers 9 and the letter A in the hexadecimal data to obtain second-level encrypted data, encrypts the second-level encrypted data into an encrypted report by the Twofish algorithm, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time by the TLS protocol.

[0019] A power line anomaly detection system based on an unmanned aerial vehicle, comprising: A power line detection request analysis module, configured to decrypt and verify an input power line detection request by a server to obtain a power line detection work order, and analyze the power line detection work order to obtain a detection area and a detection period; A power line detection instruction issuing module, configured to assign an unmanned aerial vehicle for power line detection by the server based on the detection area and the detection period, plan an initial detection trajectory of each unmanned aerial vehicle, generate a power line detection instruction based on the initial detection trajectory, the detection area and the detection period, and issue the power line detection instruction to a corresponding unmanned aerial vehicle; The inspection task execution module is configured to set an electronic fence based on the received power line detection instruction, perform an inspection task within the electronic fence, dynamically correct the initial detection trajectory based on a reinforcement learning algorithm during the inspection process, and collect flight time sequence images of the power line through a multi-spectral sensor carried by the unmanned aerial vehicle. The line anomaly detection module is configured to automatically analyze the flight time sequence images through a pre-trained line anomaly detection model, and output a line anomaly detection result. The detection trajectory adjustment module is configured to record an actual detection trajectory in real time, mark anomalies on the actual detection trajectory based on the line anomaly detection result, and interact the actual detection trajectory and unmanned aerial vehicle state data with each other, and dynamically adjust the initial detection trajectory based on the actual detection trajectory and unmanned aerial vehicle state data. The inspection log encryption upload module is configured to record an inspection log in real time, the inspection log at least including a unmanned aerial vehicle number, flight time sequence images, an actual detection trajectory, a line anomaly detection result, an inspection time, and unmanned aerial vehicle state data, encrypt the inspection log into an encrypted log after the inspection is completed, store a log fingerprint of the encrypted log in a blockchain, and upload the encrypted log to a server. The power line anomaly detection report generation module is configured to receive and store the encrypted log in real time, decrypt the encrypted log to obtain an inspection log, generate a power line anomaly detection report based on the inspection log uploaded by each unmanned aerial vehicle, and display the power line anomaly detection report. The power line anomaly detection report pushing module is configured to encrypt the power line anomaly detection report into an encrypted report, store the encrypted report, and push the encrypted report to an operation and maintenance terminal in real time.

[0020] Compared with the prior art, the present application has the following advantages: (1) The closed-loop system of the server and the unmanned aerial vehicle significantly improves the detection efficiency; the server automatically allocates equipment and plans an initial trajectory based on power line spatial topology data and unmanned aerial vehicle state, the unmanned aerial vehicle dynamically corrects the path based on reinforcement learning during the inspection, multiple unmanned aerial vehicles can also interact data and adjust tasks through Wi-FiMesh networking, avoiding missed detection and false detection, and the whole process is automated, greatly reducing manual intervention, compared with manual inspection, vehicle inspection and manned helicopter inspection, the coverage is wider, the time is shorter, and the problems of low efficiency and high cost of traditional inspection are effectively solved.

[0021] (2) The application improves the level of anomaly detection through a high-precision intelligent model. The line anomaly detection model fuses technologies such as 3D convolutional neural network and Transformer, accurately extracts spatial-spectral features and global information from multi-spectral flight time series images, combines self-supervised contrast learning and power knowledge graph to enhance feature discriminability, and can also estimate the uncertainty of the results through a Bayesian neural network, with a higher detection rate and lower false alarm rate for subtle anomalies such as insulator damage and conductor breakage, solving the problems of poor recognition ability and strong subjectivity of traditional methods.

[0022] (3) The application constructs a full-process data security and flight control system; on the data side, detection work orders, instructions, and inspection logs are all encrypted through multiple layers, and log fingerprints are stored in a blockchain, ensuring that data is not leaked, tampered with, and traceable, solving the problems of data dispersion, easy loss, and tampering; on the flight side, the unmanned aerial vehicle sets up an electronic fence according to the instructions and dynamically updates it combined with Beidou positioning and LiDAR data, and uses reinforcement learning to guide the avoidance of dangerous areas, avoiding the misentry of unmanned aerial vehicles into no-fly zones or collisions with obstacles, solving the problem of lack of effective safety constraints for traditional unmanned aerial vehicles.

[0023] (4) The application analyzes the detection request, issues instructions, inspects the unmanned aerial vehicle, analyzes anomalies, uploads logs, and then automatically generates reports on the server and pushes them to the operation and maintenance terminal after encryption, without the need for manual review and statistics throughout the entire process, greatly shortening the report generation time, facilitating the timely acquisition of anomaly information by operation and maintenance personnel and the development of maintenance, and solving the problem of lagging report generation and delayed maintenance decisions in traditional inspection. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 The method flowchart of the application.

[0025] Figure 2 The system structure diagram of the application. DETAILED DESCRIPTION

[0026] As shown in Figure 1 , the application provides a technical solution: a power line anomaly detection method based on an unmanned aerial vehicle, comprising the following steps: Step S1: The server decrypts and verifies the input power line detection request to obtain a power line detection work order, and analyzes the power line detection work order to obtain a detection area and a detection period; Step S2: The server assigns an unmanned aerial vehicle for power line detection based on the detection area and the detection period, plans an initial detection trajectory for each unmanned aerial vehicle, generates a power line detection instruction based on the initial detection trajectory, the detection area, and the detection period, and issues the power line detection instruction to the corresponding unmanned aerial vehicle; Step S3: The UAV sets an electronic fence based on the received power line detection instruction, performs the inspection task within the electronic fence, dynamically corrects the initial detection trajectory based on the reinforcement learning algorithm during the inspection process, and collects flight time sequence images of the power line through the carried multi-spectral sensor; Step S4: The UAV automatically analyzes the flight time sequence images through the pre-trained line anomaly detection model, and outputs a line anomaly detection result; Step S5: The UAV records the actual detection trajectory in real time, marks the actual detection trajectory based on the line anomaly detection result, and dynamically adjusts the initial detection trajectory based on the actual detection trajectory and the UAV state data; Step S6: The UAV records the inspection log in real time, which at least includes the UAV number, flight time sequence images, actual detection trajectory, line anomaly detection result, inspection time and UAV state data, after the inspection is completed, the inspection log is encrypted into an encrypted log, the log fingerprint of the encrypted log is stored in the blockchain, and the encrypted log is uploaded to the server; Step S7: The server receives and stores the encrypted log in real time, decrypts the encrypted log to obtain the inspection log, generates a power line anomaly detection report based on the inspection log uploaded by each UAV, 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.

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

[0028] Step S1.1: The server obtains the input power line detection work order carrying work order ciphertext data; the work order ciphertext data is obtained by encrypting the power line detection work order, and the encryption process is as follows: obtaining the input power line detection work order, the device serial number of the local device and the current first timestamp, calculating the MAC value of the power line detection work order, the device serial number and the first timestamp through the HMAC algorithm, encrypting the power line detection work order, the device serial number, the first timestamp and the MAC value through the AES-256 algorithm to obtain the initial encrypted data, creating a pair of public key and private key through the EdDSA algorithm, calculating the digital signature value of the initial encrypted data through the private key, obtaining the first-level encrypted public key by performing XOR operation on the device serial number and the public key, obtaining the second-level encrypted public key by cyclically shifting the characters of the first-level encrypted public key to the right by 3 bits, and encrypting the initial encrypted data, the digital signature value, the second-level encrypted public key and the device serial number through the AES algorithm to obtain the work order ciphertext data; Step S1.2: The server parses the power line detection work order to obtain work order ciphertext data, decrypts the work order ciphertext data by the AES algorithm to obtain initial encrypted data, a digital signature value, a secondary encryption public key, and a device serial number, cyclically shifts each character of the secondary encryption public key left by 3 bits to obtain a primary encryption public key, performs XOR on the primary encryption public key through the device serial number to obtain a public key, verifies the digital signature value through the public key, decrypts the initial encrypted data through the AES-256 algorithm to obtain a power line detection work order, a device serial number, a first timestamp, and a MAC value, performs integrity verification on the power line detection work order, the device serial number, and the first timestamp through the MAC value, performs time validity verification through the first timestamp, performs legality verification through the device serial number, and finally parses the power line detection work order to obtain a detection area and a detection period.

[0029] The specific process of step S2 is as follows: Step S2.1: The server obtains the spatial topology data of the power line from the database based on the detection area, and obtains the information of the current unmanned aerial vehicle in the idle state (unmanned aerial vehicle number, remaining power, and unit mileage energy consumption).

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

[0031] Step S2.3: The server encrypts the initial detection trajectory, the detection area, and the detection period into instruction ciphertext data, generates a power line detection instruction based on the instruction ciphertext data, and carries the power line detection instruction to the corresponding unmanned aerial vehicle through the HTTPS protocol based on the unmanned aerial vehicle number carried by the unmanned aerial vehicle allocation result.

[0032] In step S2.1, the spatial topology data includes tower position (coordinate point), line connection relationship (line segment), line length, area boundary, and other information, which defines the "total amount of work" that needs to be covered.

[0033] In step S2.2, the unmanned aerial vehicle 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 time feature extraction module; the UAV feature extraction module is configured to extract a UAV feature vector from UAV information through a fully connected neural network (FCN); the spatial topology feature extraction module is configured to extract a graph feature vector from spatial topology data through a graph convolution network (GCN); and the time feature extraction module is configured to extract a time feature vector from a detection period through a recurrent neural network (RNN).

[0034] The UAV feature extraction module performs nonlinear transformation through a hidden layer (using a ReLU activation function) to output a UAV feature vector (one-dimensional vector), which serves to convert original UAV information into high-dimensional feature representation, and has the advantage of being able to capture the complex relationship between power and energy consumption. The spatial topology feature extraction module aggregates neighbor information through GCN, i.e., extracts structural features between regions from spatial topology data, i.e., a graph feature vector (one-dimensional vector), which has the advantage of being able to process graph data and capture spatial dependencies. The time feature extraction module captures time series dependencies through RNN, i.e., extracts a time feature vector (one-dimensional vector) from a detection period, such as period length and periodicity, which has the advantage of being able to process time series data and avoid gradient disappearance.

[0035] The feature fusion layer is configured to fuse the UAV feature vector, the graph feature vector, and the time feature vector through a cross-attention mechanism to output a unified environment representation feature. The feature fusion layer calculates the relevance of each feature through attention weights to output a fused environment representation feature (one-dimensional vector), i.e., dynamically fuses multi-modal features to enhance the model's overall understanding of the environment, and has the advantage of being able to adaptively adjust the contribution of each feature.

[0036] The path generation layer is configured to infer the environment representation feature through a deep Q network (DQN) to output a preliminary candidate path; the preliminary candidate path generation process of the path generation layer is: input environment representation feature → Q network (fully connected layer) → output action value → path generator; i.e., exploring the optimal path based on reinforcement learning, which has the advantage of being able to process high-dimensional state space and learn through rewards.

[0037] The allocation optimization layer is constructed based on a resource allocation module and an optimization adjustment module; the resource allocation module is configured to infer the preliminary candidate path and the UAV feature vector through a greedy algorithm and a neural network to output an initial allocation result carrying the correspondence between the UAV number and the preliminary candidate path; and the optimization adjustment module is configured to optimize the initial allocation result and the preliminary candidate path through a policy gradient method to obtain a UAV allocation result and an initial detection trajectory.

[0038] The allocation process of the resource allocation module is: inputting the preliminary candidate path and the UAV feature vector → allocating network (full connection layer) → outputting the initial allocation result; that is, allocating the UAV to the path according to the UAV power and other information, and the advantage is to realize fast initial allocation. The optimization adjustment module calculates the reward through the reward function, optimizes the network parameters, and the specific process is: inputting the initial allocation result and the preliminary candidate path → reward calculation (based on minimizing energy consumption and maximizing coverage) → strategy network adjustment → outputting the optimized UAV allocation result and the initial detection trajectory; that is, reducing conflicts and energy consumption through iterative optimization, and the advantage is to realize dynamic adjustment and convergence to the optimal solution.

[0039] The result output layer is used for smoothing the initial detection trajectory by the sequence generation network (such as spline interpolation), and then outputting the UAV allocation result and the smoothed initial detection trajectory.

[0040] In step S2.3, the initial detection trajectory, the detection area, and the detection period are encrypted into instruction ciphertext data, specifically: obtaining a current second timestamp, concatenating the initial detection trajectory, the detection area, the detection period, and the second timestamp based on a preset separator to obtain concatenated data, calculating a first hash value of the concatenated data through a HASH256 algorithm, taking the first 128 bits of the first hash value as a dynamic key, encrypting the concatenated data through an SM4 algorithm by using the dynamic key to obtain one layer of encrypted data, encrypting the one layer of encrypted data and the first hash value into two layers of encrypted data through an IDEA algorithm, inserting a random string of a specified length at a specified position of the two layers of encrypted data to obtain three layers of encrypted data, and encrypting the three layers of encrypted data into instruction ciphertext data through an RC6 algorithm.

[0041] The specific process of step S3 is as follows: Step S3.1: The UAV receives the power line detection instruction in real time, parses the power line detection instruction to obtain instruction ciphertext data, decrypts the instruction ciphertext data through an RC6 algorithm to obtain three layers of encrypted data, positions the random string in the three layers of encrypted data based on the specified position and the specified length and removes it, obtains two layers of encrypted data, decrypts the two layers of encrypted data through an IDEA algorithm to obtain one layer of encrypted data and a first hash value, takes the first 128 bits of the first hash value as a dynamic key, decrypts the one layer of encrypted data through an SM4 algorithm by using the dynamic key to obtain concatenated data, performs integrity verification on the concatenated data through the first hash value, parses the concatenated data based on a preset separator to obtain an initial detection trajectory, a detection area, a detection period, and a second timestamp, and performs time validity verification through the second timestamp.

[0042] Step S3.2: After the verification, the UAV sets an electronic fence based on the detection area and the initial detection trajectory (i.e., the electronic fence is set by expanding the preset range outside the initial detection trajectory, and the electronic fence cannot exceed the detection area), and performs the inspection task based on the initial detection trajectory within the electronic fence when the detection time arrives.

[0043] Step S3.3: During the inspection process, real-time positioning data is collected by the Beidou locator, real-time three-dimensional spatial information is collected based on LiDAR technology, and the electronic fence is dynamically updated based on the positioning data and three-dimensional spatial information (i.e., a no-fly zone is further set within the electronic fence to avoid collisions with power lines or buildings).

[0044] Step S3.4: During the inspection process, the initial detection trajectory is dynamically corrected based on a reinforcement learning algorithm, and flight time sequence images of the power line are collected by the multi-spectral sensor.

[0045] In step S3.4, the reinforcement learning algorithm uses a Q-Learning model, and the state space of the Q-Learning model includes: Self-state information (current position coordinates (x, y, z): provided by the Beidou locator, which is the most core spatial information for decision-making; remaining power / flight time: obtained from the UAV information, which is crucial to avoid task failure due to power depletion; current speed and heading angle: determine the instantaneous motion state of the UAV); Environmental perception information (distance / position from the nearest power line: calculated by LiDAR or multi-spectral sensor, which is the core of performing the inspection task; distance to the nearest obstacle (such as a tower, tree, or building): monitored in real time by LiDAR technology, which is a key state input to ensure flight safety; local map information of the current detection area); Task progress information (proportion of the inspected trajectory / line segment completed: encourages the UAV to cover more undetected areas; deviation from the preset detection waypoint: distance and directional deviation of the UAV's current actual position from 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 the remaining time is sufficient).

[0046] The action space of the Q-Learning model includes: Discrete action space (e.g.: {maintain current heading and altitude}, {accelerate}, {decelerate}, {turn left 10 degrees}, {turn right 10 degrees}, {rise 5 meters}, {lower 5 meters}, {fly straight to the next target waypoint}); Continuous action space (output is a continuous adjustment amount, e.g.: [Δ heading angle, Δ speed, Δ altitude]), and the reward function is dynamically optimized based on detection coverage and risk avoidance indicators.

[0047] Through the reinforcement learning algorithm, the unmanned aerial vehicle can learn to maximize the coverage of the detection area in an efficient (power saving, time saving) manner while ensuring safety (avoiding obstacles, not flying out of the electronic fence), and effectively collecting data, thereby realizing dynamic and intelligent power line inspection.

[0048] 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 of different spectral bands, solving the problem of spatial offset and scale difference between bands), a feature enhancement layer (enhancing feature representation and improving robustness to noise and deformation), an anomaly prediction layer (predicting anomaly results and estimating uncertainty), and a feedback optimization layer (optimizing model parameters and improving generalization ability).

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

[0050] The 3D convolutional neural network unit is used to capture local spatial patterns and cross-band correlations, avoiding ignoring spectral dimension information. The advantage is that it can efficiently process high-dimensional data and reduce information loss. The Transforme unit is used to model long-range dependencies and enhance the understanding of the global structure of the power line (such as conductor continuity). The advantage is to improve the completeness of feature representation and adapt to image scale changes. The attention gate mechanism unit is used to focus on abnormal related areas (such as insulators or connection points) and suppress background noise. The advantage is to improve feature discriminability and reduce computational redundancy.

[0051] 2. The modal 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 convolution 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 gating fusion unit, and fuse to obtain fused features.

[0052] The waveband alignment module is used to align the spatial positions of different wavebands (such as compensating for thermal expansion offset of infrared and visible light wavebands), to ensure that the waveband features are consistent in space, and has the advantages of strong adaptability and processing 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 the abnormal sensitive features, and has the advantages of improving the fusion efficiency and retaining complementary information.

[0053] 3. The feature enhancement layer is constructed based on a self-supervised contrast learning module and a knowledge graph enhancement module; the self-supervised contrast learning module is used to construct positive sample pairs (similar abnormal patterns) and negative sample pairs (different patterns) based on the fusion features through data enhancement (such as random cropping and rotation); a contrast loss function is used to optimize the feature representations of the positive sample pairs and the negative sample pairs, 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 pre-set power line knowledge graph (containing semantic relationships of common abnormal types such as “insulator crack”), to propagate knowledge using a graph neural network, to obtain second-level enhanced features.

[0054] The feature enhancement layer is used to enhance the robustness of features, to improve the generalization ability through unsupervised learning and domain knowledge integration; the self-supervised contrast learning module is used to learn invariance representation, to reduce overfitting, and has the advantages of not requiring additional labeled data and improving the robustness of the model to changes in illumination and angle; the knowledge graph enhancement module is used to inject domain knowledge, to enhance the explainability of features, and has the advantages of improving the detection ability for rare abnormalities and reducing false positives.

[0055] In order to further understand the self-supervised contrast learning module, the learning process is described as follows: First, make some small changes to the image (such as random cropping and rotation), which will not change the essential content of the image, but only change the angle of viewing it; Treat these changed images as “positive sample pairs” - they are actually the same image, just a little different, so the model should consider them “very similar”; Pick some completely different images as “negative sample pairs” - they have no relationship with each other, and the model should learn to “distinguish” them; Use a “contrast loss function” to train the model to pull the positive sample pairs closer and push the negative sample pairs further apart; Finally, the obtained feature is the “first-level enhanced feature” - it is smarter than the original feature and can distinguish which are of the same type and which are of different types.

[0056] 4. 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 enhanced features through a fully connected layer and a Softmax activation function to predict the anomaly probability distribution of each anomaly class (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 the uncertainty.

[0057] The anomaly classification module is used to directly output the detection result, which has the advantages of simplicity and efficiency, and supports multi-class anomaly recognition; the uncertainty estimation module is used to predict the uncertainty of each result, and based on the threshold to filter high confidence results, i.e. quantifying the prediction reliability and filtering low quality outputs, which has the advantages of improving the credibility of the model and is suitable for safety critical scenarios.

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

[0059] The feedback optimization layer is constructed based on a gradient descent optimizer, which is used to minimize the prediction error and prevent overfitting, and has the advantages of adaptive learning and improving the generalization of the model.

[0060] Power line anomaly detection is a key task of power system maintenance, which aims to detect insulator damage, conductor breakage, thermal anomaly and other faults through multi-spectral sensor images (such as visible light, infrared and other wavebands). Multi-spectral sensor images (flight time series images) contain rich spatial and spectral information, but there are challenges such as differences between wavebands, noise interference and diverse anomaly patterns. To solve these problems, a line anomaly detection model is created, which consists of multiple modules, introduces technologies such as Transformer, attention mechanism, self-supervised contrastive learning and knowledge graph enhancement, and improves the robustness of feature extraction, adaptability of fusion and accuracy of prediction. The core of the model is to handle the unique characteristics of flight time series images, and to achieve efficient anomaly detection through an end-to-end architecture.

[0061] The line anomaly detection model has the following significant advantages: High-efficiency processing of multi-spectral data: By integrating spatial-spectral information through 3D convolution and Transformer, the model fully utilizes the advantages of multi-band (such as infrared band for detecting thermal anomalies) and improves the comprehensiveness of feature extraction. Robustness: The modal fusion layer addresses the inter-band bias, and the feature enhancement layer introduces self-supervised contrastive learning and knowledge graph, effectively resisting noise, illumination changes, and rare anomalies, and reducing false detection rates. Innovation: Creatively combining Transformer, attention mechanism, and knowledge graph to enhance feature expression; 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 customized loss functions, and the model is lightweight and easy to deploy on edge devices. Practical application value: Directly addresses practical problems in power line maintenance, reduces manual inspection costs, and supports real-time monitoring.

[0062] In step S5, the UAV records the actual detection trajectory based on the positioning data collected by the Beidou locator in real time, marks the anomalies on the actual detection trajectory based on the line anomaly detection results, and forms a local area network based on Wi-Fi Mesh technology. The actual detection trajectory and UAV state data are interacted based on the local area network, and when it is determined that there is a UAV that cannot complete the inspection task based on the actual detection trajectory and UAV state data, the initial detection trajectory is dynamically adjusted.

[0063] When a UAV that cooperates with the work fails or delays the progress due to weather, etc., the initial detection trajectory of the remaining UAVs is dynamically adjusted to complete the scheduled inspection task within the detection period; the adjustment of the initial detection trajectory only adjusts the part that has not completed the inspection, which can be executed by the UAV inspection planning model deployed by the server.

[0064] The UAV state data includes identity and basic information, real-time flight state data, energy and power system state, task execution and progress data, device and sensor health state, environment and perception data, and cooperation and decision data.

[0065] Identity and basic information includes: 1. UAV number / ID: a unique identifier used to distinguish different UAVs; 2. Team / formation information: task group number, used to distinguish different task groups; 3. Model and hardware configuration: for example, UAV model, types of sensors carried (such as infrared thermal imager, visible light camera, LiDAR specifications), which will affect its task execution capability (such as some UAVs are more suitable for detailed detection, and some are more suitable for rapid patrol).

[0066] Real-time flight state data: 1. Current position coordinates: high-precision latitude and longitude, altitude (from Beidou); 2. Speed and heading: current flight speed vector (horizontal speed, vertical speed), yaw angle (Yaw), pitch angle (Pitch), roll angle (Roll); 3. Flight mode: current mode of automatic cruise, manual control, hovering, return to home (RTH), or failsafe mode.

[0067] Energy and power system status: 1. Remaining power: current battery power percentage or voltage, one of the most important state data; 2. Estimated endurance time: remaining flight time dynamically calculated based on current power consumption rate and task load; 3. Battery health status: number of battery cycles, current maximum capacity percentage; 4. Power system status: motor speed, motor temperature, whether the propeller has abnormal vibration information.

[0068] Task execution and progress data: 1. Sequence of flown waypoints and deviation from the initial planned trajectory; 2. Proportion of detected route mileage or area size to total task volume; 3. Detected anomalies and their precise position coordinates, timestamps, anomaly types, and confidence levels, which can help other drones avoid or review confirmed dangerous areas; 4. Coordinates of the next checkpoint to be visited.

[0069] Device and sensor health status: 1. Sensor status: whether the camera focus is normal, whether the laser radar is online, gimbal working status, remaining storage space; 2. Communication link status: signal strength (RSSI), packet loss rate of communication with the server or other drones; 3. Beidou satellite status: number of locked satellites, positioning accuracy factor (HDOP / VDOP).

[0070] Environmental and perception data: 1. Local obstacle map: local map of the surrounding environment or key obstacle point cloud (such as temporarily appearing cranes, trees growing too high) constructed in real time by LiDAR, which can be shared to update the public electronic fence; 2. Weather information: local measurement of wind speed, wind direction, temperature, humidity by the drone, which is crucial for determining whether the drone can safely fly (e.g., sudden strong crosswind in a certain area can warn other drones to avoid).

[0071] Coordination and decision data: 1. Self-state summary: a summary information generated by the on-board computer for coordination decision, for example: "sufficient power, can take over additional tasks", "sensor failure, can only perform basic line inspection", "returning, please take over my unfinished area"; 2. Decision intention: the next scheduled action, for example: "I will go to coordinates (X, Y)", "I plan to conduct a close review of abnormal point A", "I will start returning in 5 minutes".

[0072] The specific process of step S6 is: Step S6.1: The unmanned aerial vehicle records a patrol log in real time, which at least includes the unmanned aerial vehicle number, flight time sequence image, actual detection trajectory, line anomaly detection result, patrol time and unmanned aerial vehicle state data.

[0073] Step S6.2: After the patrol is completed, separate the image data and text data from the patrol log, compress the image data by ZSTD algorithm to obtain image compression data, compress the text data by Brotli algorithm to obtain text compression data, calculate the first MD5 value of the image compression data by MD5 algorithm, calculate the second MD5 value of the text compression data by MD5 algorithm, encrypt the image compression data and the first MD5 value into first encrypted data by AES-256 algorithm, encrypt the text compression data and the second MD5 value into second encrypted data by SM9 algorithm, encrypt the first encrypted data and the second encrypted data into encrypted log by AES algorithm, calculate the log fingerprint of the encrypted log by HMAC algorithm and store it in the blockchain, and upload the encrypted log to the server through the TLS protocol.

[0074] By recording the patrol log in real time by the unmanned aerial vehicle and using an efficient data processing chain, the 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 value is used to ensure data integrity, and multi-layer encryption strategy of AES-256, SM9 and AES is used to enhance security; finally, the log fingerprint is calculated by HMAC and stored in the blockchain to realize tamper-proof audit tracking, and uploaded securely through the TLS protocol, which realizes reliable and efficient log management from end to end, suitable for key infrastructure inspection and other scenarios.

[0075] The specific process of step S7 is: Step S7.1: The server receives the encrypted log in real time, and after integrity verification of the encrypted log by the log fingerprint stored in the blockchain, stores the encrypted log in a preset path.

[0076] Step S7.2: The server decrypts the encrypted log by the AES algorithm to obtain first encrypted data and second encrypted data, decrypts the first encrypted data by the AES-256 algorithm to obtain image compression data and a first MD5 value, and performs integrity verification on the image compression data by the first MD5 value; decrypts the second encrypted data by the SM9 algorithm to obtain text compression data and a second MD5 value, and performs integrity verification on the text compression data by the second MD5 value.

[0077] Step S7.3: The server decompresses the image compression data by the ZSTD algorithm to obtain image data, decompresses the text compression data by the Brotli algorithm to obtain text data, and restores the inspection log based on the image data and the text data.

[0078] Step S7.4: The server aggregates and statistically analyzes the inspection logs uploaded by each unmanned aerial vehicle to generate a power line anomaly detection report, and displays the power line anomaly detection report in real time by a large screen display.

[0079] By combining blockchain storage to ensure data tamper resistance, using AES-256 and SM9 multi-layer encryption to improve security, and using MD5 verification and efficient compression algorithms (ZSTD and Brotli) to ensure data integrity and processing efficiency, real-time decryption, decompression and data analysis are ultimately achieved to generate a visual power line anomaly detection report, with high reliability, low cost and industry applicability.

[0080] The specific process of step S8 is as follows: the server obtains a current third timestamp, calculates a second hash value of the power line anomaly detection report and the third timestamp by the HASH256 algorithm, performs XOR on 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 encrypted data by the SM4 algorithm, converts the first encrypted data into hexadecimal data, and reverses the numbers 8 and the letter B in the hexadecimal data and the numbers 9 and the letter A to obtain second encrypted data, encrypts the second encrypted data into an encrypted report by the Twofish algorithm, stores the encrypted report, and pushes the encrypted report to the operation and maintenance terminal in real time by the TLS protocol.

[0081] By combining multiple encryption algorithms (such as HASH256, SM4 and Twofish), data obfuscation operations (such as XOR and character reversal), and timestamps, the high security, integrity and anti-replay attack capability of the power line anomaly detection report are ensured; at the same time, the TLS protocol is used to realize real-time encryption transmission, ensuring the confidentiality and timeliness of the data in the storage and pushing process, and the overall design is efficient and highly compatible.

[0082] Through the highly automated unmanned aerial vehicle cooperative inspection system, the whole-process intelligent management of power line anomaly detection is realized, and the core advantages are that a multi-level encryption security mechanism, intelligent trajectory planning and anomaly identification algorithm based on reinforcement learning and deep learning, real-time data interaction and dynamic fault tolerance adjustment of multiple unmanned aerial vehicles, and block chain storage to ensure data tamper resistance are combined, thereby significantly improving the detection efficiency, accuracy and security, reducing the operation and maintenance cost and the need for manual intervention, and providing an efficient, reliable and scalable solution for the reliable operation of power infrastructure.

[0083] As shown in Figure 2 , a power line anomaly detection system based on unmanned aerial vehicles includes: A power line detection request analysis module is configured to decrypt and verify an input power line detection request by a server to obtain a power line detection work order, and analyze the power line detection work order to obtain a detection area and a detection period. A power line detection instruction issuing module is configured to assign unmanned aerial vehicles for power line detection by the server based on the detection area and the detection period, plan initial detection trajectories for each unmanned aerial vehicle, generate power line detection instructions based on the initial detection trajectories, the detection area and the detection period, and issue the power line detection instructions to the corresponding unmanned aerial vehicles. An inspection task execution module is configured to set an electronic fence by the unmanned aerial vehicle based on the received power line detection instructions, execute an inspection task within the electronic fence, dynamically correct the initial detection trajectories based on a reinforcement learning algorithm during the inspection process, and collect flight time sequence images of the power line by a multi-spectral sensor. A line anomaly detection module is configured to automatically analyze the flight time sequence images by a pre-trained line anomaly detection model, and output a line anomaly detection result. A detection trajectory adjustment module is configured to record actual detection trajectories by the unmanned aerial vehicle in real time, mark anomalies on the actual detection trajectories based on the line anomaly detection result, and interact the actual detection trajectories and unmanned aerial vehicle state data among the unmanned aerial vehicles within the detection area, and dynamically adjust the initial detection trajectories based on the actual detection trajectories and unmanned aerial vehicle state data. An inspection log encryption uploading module is configured to record inspection logs by the unmanned aerial vehicle in real time, and the inspection logs at least include a unmanned aerial vehicle number, flight time sequence images, actual detection trajectories, line anomaly detection results, inspection time and unmanned aerial vehicle state data, encrypt the inspection logs into encrypted logs after the inspection is completed, store the log fingerprints of the encrypted logs to a block chain, and upload the encrypted logs to a server. The power line anomaly detection report generation module is configured to receive and store the encrypted log in real time by the server, decrypt the encrypted log to obtain an inspection log, generate a power line anomaly detection report based on the inspection log uploaded by each unmanned aerial vehicle, and display the power line anomaly detection report. The power line anomaly detection report pushing module is configured to encrypt the power line anomaly detection report into an encrypted report by the server, store the encrypted report, and push the encrypted report to an operation and maintenance terminal in real time.

[0084] Although the embodiments of the present application have been shown and described, it is to be understood that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present application, 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.

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: 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 Transforme 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. 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.

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 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.

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 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.

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 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.

9. A method for detecting power line anomalies based on unmanned aerial vehicles (UAVs) according to claim 8, 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.

10. 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.

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

  • Insulator defect detection method based on multi-modal feature fusion

    CN119169354A

  • Small unmanned aerial vehicle inspection data management method

    CN119322941A

  • Electric power AI intelligent auxiliary control and inspection system

    CN120258758A

Cited By

  • Unmanned aerial vehicle intelligent inspection method for power transmission line

    CN116400724A

  • Power inspection unmanned aerial vehicle accident tracing method and system based on multi-source data fusion

    CN122133042A