Autonomous Inspection Method and System for Unmanned Aerial Vehicles Based on Large Language Model and Simulation Verification

The method of generating standardized DSL descriptions by large language models and verifying them in a digital twin simulation environment solves the problems of low automation and poor safety of UAV inspection, realizes the autonomy and intelligence of substation inspection, and ensures the safety and reliability of UAV flight.

CN122086780APending Publication Date: 2026-05-26XUANCHENG POWER SUPPLY OF ANHUI ELECTRIC POWER CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XUANCHENG POWER SUPPLY OF ANHUI ELECTRIC POWER CORP
Filing Date
2026-02-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing drone inspection technology has a low degree of automation in substations, poor security due to direct control by large language models, and lack of effective conversion bridges and real-time verification methods, resulting in limited intelligence and potential safety hazards.

Method used

A large language model is used to parse natural language commands and generate standardized DSL descriptions. These descriptions are then mapped to executable UAV code through a model control protocol. The code is then pre-run and simulated in a high-fidelity digital twin simulation environment to form a closed-loop control system, ensuring the safety and reliability of the commands.

Benefits of technology

It achieves autonomous, intelligent, and highly safe drone inspection, lowers the technical threshold for operators, avoids the risk of collisions and crashes during actual flight, and improves the system's scalability and equipment compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086780A_ABST
    Figure CN122086780A_ABST
Patent Text Reader

Abstract

This invention provides an autonomous inspection method and system for unmanned aerial vehicles (UAVs) based on a large language model and simulation verification. It includes: parsing natural language commands into a structured domain-specific language (DSL) description using a large language model; mapping the DSL to executable code for the UAV via a Model Control Protocol (MCP); performing multi-dimensional verification of the code in a digital twin simulation environment, including collision and logic checks; if verification fails, feedback error information triggers automatic correction by the large language model until successful; deploying the verified code to a physical UAV for inspection, and implementing dynamic deviation circuit breaking based on virtual-real-time airflow alignment and MCP feedback replanning. This invention solves the problem of safe conversion from natural language to precise control through a DSL intermediate layer and simulation verification closed loop, constructing a semantic-control two-layer decoupled architecture, achieving full-process automation from high-level commands to safe autonomous flight, and significantly improving the intelligence level and operational safety of the inspection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) power line inspection technology, specifically to an autonomous UAV inspection method and system based on large language models and simulation verification. Background Technology

[0002] As a critical hub in the power system, the safe and stable operation of equipment in substations is of paramount importance. Currently, drone inspections of substations mainly rely on the following two traditional methods: Manual inspection involves operators holding a remote control and visually or via video transmission to operate drones for equipment checks. This method is not only inefficient and the quality of inspections is greatly affected by the operator's experience, but it also poses significant safety hazards to operators in the high-voltage, high-risk substation environment, and blind spots are easily created in the inspection area.

[0003] Automated inspection based on preset waypoints involves pre-planning the flight waypoints and routes of drones via ground station software, with the drones automatically executing flight and photography tasks according to preset programs. While this method improves efficiency to some extent, its paths are fixed and lack intelligence. If the on-site environment changes temporarily (such as equipment failure or the addition of obstacles) or the mission requirements change, the entire waypoint sequence needs to be manually replanned and set, failing to achieve dynamic adaptive adjustment and exhibiting limited intelligence.

[0004] In recent years, with the development of artificial intelligence technology, especially the powerful potential of Large Language Models (LLMs) in task understanding and planning, the industry has begun to explore their application in the autonomous control of unmanned aerial vehicles (UAVs). However, directly applying LLMs to UAV flight control faces severe challenges: First, the output of LLMs is probabilistic and nondeterministic. Directly generating low-level control commands may produce factual errors or nondeterministic outputs, causing UAVs to perform dangerous actions such as collisions or crashes, resulting in extremely high safety risks. Second, LLMs are good at processing high-level natural language semantics, while the underlying UAV drive requires precise and structured code commands (such as ROS nodes and coordinate parameters). There is a huge modal gap between the two, lacking a reliable and interpretable conversion bridge. Finally, existing solutions generally lack a step for dynamic and comprehensive verification of generated commands before actual flight, making it impossible to expose and correct potential logical errors and safety hazards in advance. This constitutes open-loop control, and reliability is difficult to guarantee.

[0005] Therefore, current technologies lack a method that can effectively integrate the intelligent decision-making capabilities of large language models with the safety requirements of UAV execution. An innovative technical solution is urgently needed that can leverage the advantages of large language models in understanding complex natural language commands, while also reliably transforming them into safe and verifiable UAV control commands, thereby achieving true autonomy, intelligence, and high safety in substation inspection. Summary of the Invention

[0006] The purpose of this invention is to provide an autonomous inspection method and system for unmanned aerial vehicles (UAVs) based on large language models and simulation verification, which solves the problems of low automation level and poor safety of direct control by large language models in the existing technology.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: An autonomous inspection method for unmanned aerial vehicles (UAVs) based on large language models and simulation verification includes the following steps: S1. Receive inspection task instructions described in natural language, and parse the instructions using a large language model to convert them into a standardized domain-specific language (DSL) description that conforms to a predefined grammatical structure; the grammatical structure includes task objectives, action sequences, and constraints. S2. Based on the Model Control Protocol (MCP), the standardized DSL description is mapped and converted into low-level control code executable by the UAV. S3. Inject the underlying control code into a high-fidelity digital twin simulation environment for pre-running, detect collision risks and logic errors during code execution, and obtain simulation verification results; S4. If the simulation verification result is abnormal, the abnormal information will be fed back to the large language model to trigger code correction and re-perform simulation verification until the verification is passed. S5. Deploy the verified underlying control code to the physical drone and control it to perform autonomous inspections in the real environment. During this period, keep the digital twin simulation environment running in parallel in shadow mode and perform closed-loop control based on virtual-real comparison.

[0008] Furthermore, the process of parsing and transforming instructions into standardized DSL descriptions through a large language model involves: using a large language model fine-tuned with domain knowledge to extract key elements from natural language instructions, and generating a structured script containing task identifiers, target device coordinates, ordered action lists, and spatial obstacle avoidance constraints according to predefined DSL syntax rules.

[0009] Furthermore, the process of mapping and converting the standardized DSL description into executable code for the UAV specifically includes: mapping the motion elements in the DSL to the corresponding control instructions or SDK function calls of the Robot Operating System (ROS) through the standard interface defined by the Model Control Protocol (MCP); and automatically generating a complete executable script containing environment configuration, dependency libraries, and exception handling logic.

[0010] Furthermore, the pre-running and detection in the simulation environment includes: using the physics engine of the simulation environment to simulate the dynamics of the drone, detecting whether the virtual drone collides with obstacles or flies out of the safety boundary; verifying whether the inspection path planned by the underlying control code covers all target devices, and whether the operation actions meet the preset detection requirements.

[0011] Furthermore, the trigger code correction specifically involves the large language model adaptively adjusting the path points, action parameters, or constraints in the DSL description based on the error logs fed back from the simulation environment, or directly rewriting the underlying control code.

[0012] Furthermore, the closed-loop control based on virtual-real comparison includes: during the actual execution process, maintaining strict synchronization between the simulation environment and the actual machine on the time axis, using the predicted state data generated by the simulation environment as the dynamic truth value, and performing differential comparison with the real-time telemetry data transmitted back by the UAV; if the deviation exceeds a preset threshold, the system constructs a reverse feedback channel through the Model Control Protocol (MCP), semantically reports the abnormal state, triggers the upper-level large language model to perform cognitive-level task replanning based on the current environmental characteristics, and realizes the leap from bottom-level reflexive risk avoidance to top-level cognitive self-healing.

[0013] An autonomous UAV inspection system based on a large language model and simulation verification is disclosed to implement the aforementioned autonomous UAV inspection method based on a large language model and simulation verification. The system includes a language understanding and task planning module, a code generation and mapping module, a simulation verification and closed-loop correction module, and a virtual-to-real migration and field execution module. The language understanding and task planning module receives natural language commands and parses them into standardized DSL descriptions using a large language model. The code generation and mapping module converts the DSL descriptions into executable code for the UAV based on the Model Control Protocol (MCP). The simulation verification and closed-loop correction module verifies code security in a digital twin environment and triggers automatic correction based on the large language model when verification fails. The virtual-to-real migration and field execution module deploys the verified code to the physical UAV and manages execution monitoring and safety fault tolerance during the field inspection process.

[0014] Furthermore, the system adopts a layered and decoupled architecture, including a language model layer at the top, a model control middleware in the middle layer, and an execution control layer at the bottom. The language model layer is responsible for semantic understanding and DSL generation. The model control middleware is implemented based on the Model Control Protocol (MCP) and is responsible for protocol conversion and tool invocation. The execution control layer is responsible for the real-time flight control, navigation, and obstacle avoidance of the UAV.

[0015] As can be seen from the above technical solutions, the present invention has the following technical advantages compared with the prior art: 1. This invention directly understands natural language commands through a large language model, eliminating the need for complex waypoint programming or script writing by humans, thus lowering the technical threshold for operators and making task assignment and changes extremely flexible and efficient; 2. This invention introduces a simulation verification closed loop as a mandatory safety sandbox. Before the actual flight, all generated instructions are verified and iteratively optimized in the digital twin environment in a full-process, multi-dimensional manner, which fundamentally eliminates the safety risks of actual aircraft collisions and crashes caused by the non-deterministic output of large language models or planning omissions. 3. The system of this invention adopts a layered decoupled architecture of DSL and MCP. DSL, as a platform-independent intermediate description layer, ensures the accurate expression of task intent; MCP, as a standardized middleware, realizes the decoupling of high-level planning and various low-level UAV control platforms, giving the system good scalability and device compatibility. 4. This invention innovatively constructs a semantic-control dual-layer control architecture, combining the strong semantic understanding, task planning and generation capabilities of large language models with the real-time and stability advantages of traditional control algorithms. By utilizing a virtual-real-time alignment mechanism, it not only eliminates potential code logic vulnerabilities before actual flight but also solves the problem of robust execution of nondeterministic AI models in a deterministic physical world during flight, achieving an organic unity between intelligent decision-making and safety bottom line. Attached Figure Description

[0016] Figure 1 This is a schematic diagram illustrating the steps of the UAV autonomous inspection method of the present invention; Figure 2 This is a flowchart illustrating the autonomous inspection system for unmanned aerial vehicles (UAVs) of the present invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0018] like Figure 2As shown, this invention provides an autonomous UAV inspection system based on a large language model and simulation verification. Its core lies in constructing an intelligent closed loop encompassing "natural language understanding → structured task planning → executable code generation → virtual simulation verification → physical safety execution." The system includes the following core functional modules: The Language Understanding and Task Planning module receives and parses user-input natural language inspection commands. This module integrates a large language model fine-tuned with knowledge of the power industry. Based on a general large-scale pre-trained model, this model utilizes specialized corpora such as substation equipment maps, inspection procedures, and historical logs for supervised fine-tuning or efficient parameter fine-tuning, enabling it to deeply understand the semantics, terminology, and standards of power inspection scenarios. When parsing commands, the model can call embedded or associated substation equipment knowledge graphs to obtain contextual information, ultimately transforming ambiguous natural language commands into precise, structured Domain Specific Language (DSL) descriptions. The generated DSL descriptions include task objectives, action sequences, and constraints.

[0019] Code generation and mapping module: Receives standardized DSL descriptions and performs instruction mapping and conversion based on the Model Control Protocol (MCP). MCP predefines standardized mapping rules from DSL elements to various UAV low-level control interfaces (such as ROS control commands and specific SDK function calls). Based on this, the module automatically generates low-level control code (such as Python scripts) that the UAV can directly execute, and automatically encapsulates necessary environment initialization, dependency libraries, exception handling, and logging logic, thus forming a complete, robust task execution package adaptable to different UAV models.

[0020] Simulation Verification and Closed-Loop Correction Module: This module incorporates a high-fidelity digital twin simulation environment (typically based on physics engines such as Gazebo or Unity) that is 1:1 mapped to a real substation. The task execution package output by the code generation module is first injected into this simulation environment for full-process pre-running. While the simulation engine simulates the drone's flight dynamics, this module performs multi-dimensional real-time detection, including physics-based collision detection, flight boundary detection, task logic integrity verification (such as path coverage and compliance of shooting actions), and performance evaluation (such as endurance estimation). If any anomalies are detected (such as collision risk or logical errors), the module automatically generates a structured error diagnosis report and immediately feeds it back to the large language model in the language understanding and task planning module. Based on the feedback, the large language model reflects on and corrects the original DSL description or generation logic. The corrected DSL triggers a new round of code generation and simulation verification, thus forming an automated "generation → simulation verification → feedback → correction" iterative optimization closed loop until all verification indicators pass.

[0021] The virtual-to-real migration and field execution module deploys the final mission execution package to the physical UAV on-site via an encrypted communication link. During actual execution, this module performs full-process status monitoring, continuously receiving real telemetry data from the UAV (position, attitude, battery level, etc.) and comparing it in real time with the predicted data at the corresponding time points in the simulation environment. Once the comparison finds that the deviation between the actual state and the simulation prediction exceeds a preset safety threshold (e.g., position shift due to sudden wind disturbance), the module will determine it as an abnormal situation and immediately trigger a safety takeover mechanism: a low-level, independent, high-priority flight safety controller (such as a stabilizer using Model Predictive Control, MPC) takes over the immediate control of the UAV, executing preset strategies such as hovering, avoidance, or emergency landing to ensure physical safety. Simultaneously, this abnormal event is reported to the system planning layer via the MCP protocol, which can request mission replanning or await manual decision-making.

[0022] The above modules are tightly coupled with standardized interfaces (such as MCP) through software middleware, forming an integrated autonomous inspection system that integrates intelligent task parsing, secure code generation, virtual forced verification, and reliable entity execution.

[0023] The following describes the specific implementation of this invention using a typical substation inspection task: "Performing infrared thermometry and visual inspection of main transformer No. 1". based on Figure 1 The UAV autonomous inspection method based on a large language model and simulation verification is shown in this embodiment. The application scenario is a 500kV substation, and the inspection target is the No. 1 main transformer within the substation. The system deployment mainly includes: a large language model (LLM) fine-tuned with knowledge from the power inspection field, middleware based on a model control protocol (MCP), a high-fidelity substation digital twin simulation environment, and an inspection UAV equipped with an onboard computing unit.

[0024] Step 1: Natural Language Instruction Parsing and Domain-Specific Language (DSL) Intermediate State Generation The inspection personnel or monitoring system issued a natural language command: "Conduct infrared temperature measurement and visual inspection of main transformer No. 1."

[0025] Command Reception and High-Level Parsing: After receiving the text command, the system inputs it into a dedicated large language model. This model has been fine-tuned using corpora such as substation equipment diagrams and inspection procedures, and possesses knowledge of the power industry.

[0026] Semantic understanding and element structuring: The model understands the deep intent of instructions, identifies and structures key business elements. Core task: Equipment inspection.

[0027] Target device: Main_Transformer_01 (mapped to a unique identifier and spatial coordinates in the knowledge base).

[0028] Testing requirements: Use a thermal imaging sensor to measure temperature and a visible light sensor to capture appearance images.

[0029] Spatial constraints: The flight path must avoid the circuit breaker area within the specified coordinate range.

[0030] Implicit requirement: Multi-angle coverage shooting of the equipment is required.

[0031] Generate a standardized DSL description: Based on predefined DSL syntax rules specifically for substation inspection, the model transforms the above structured elements into a precise and unambiguous intermediate task description file. This DSL description includes a unique task identifier, target location coordinates, sensor configuration, ordered sequence of actions (such as takeoff, navigation to a designated point, hovering, shooting, circling flight, and return), as well as constraints such as geofencing and maximum endurance.

[0032] This step introduces a DSL as an intermediate bridge to transform flexible but ambiguous natural language instructions into structured descriptions that combine semantic information with precise control parameters. This retains the powerful semantic understanding and generalization capabilities of large language models while the strict syntax of the DSL constrains the randomness of the large language model's output, laying a solid foundation for generating reliable and interpretable control instructions and solving the modal gap problem.

[0033] Step 2: Generation of executable control instructions based on Model Control Protocol (MCP) The DSL description file is passed to the code generation module, the core of which is the Model Control Protocol (MCP) middleware.

[0034] Protocol Mapping: The MCP middleware pre-configures standardized tool function interfaces corresponding to the underlying UAV control system (such as the ROS navigation stack and flight control SDK), including functions for takeoff, navigation to coordinates, gimbal control for shooting, and performing orbiting maneuvers. The system automatically maps each action element and parameter in the DSL to the corresponding MCP tool call command.

[0035] Command Synthesis and Encapsulation: After mapping, the system synthesizes a series of MCP calls into a complete sequence of control commands that can be directly parsed and executed by the UAV's onboard computer, based on the target UAV platform's communication protocol and control interface specifications. Simultaneously, it automatically encapsulates necessary robust logic such as system initialization, status monitoring, and communication anomaly retries to form the final task execution package.

[0036] In this step, MCP, as the core middleware, decouples the high-level task description (DSL) from the underlying heterogeneous hardware control platform. It provides a standardized set of parsing rules, enabling the same DSL task description to flexibly generate control instructions adapted to different UAV or robot operating systems, greatly enhancing the system's versatility and scalability.

[0037] Step 3: The "Generate-Verify-Correct" Closed Loop in the Digital Twin Simulation Environment Before being deployed to a physical drone, the generated control command package must undergo mandatory verification in a high-fidelity digital twin simulation environment.

[0038] Virtual environment injection: The system synchronously loads the task execution package and a 1:1 replica of the real substation 3D model (containing the precise geometric and physical properties of all buildings, equipment, pipelines, and roads) into the simulation engine (such as Gazebo or Unity engine).

[0039] Sandbox simulation and multi-dimensional detection: The simulation engine drives the virtual drone to strictly execute the entire mission process according to instructions. Simultaneously, the verification module performs real-time, comprehensive detection. Physical collision detection: Based on physics engine calculations, it determines in real time whether the drone's trajectory and attitude interfere with any obstacles in the scene, or whether the distance is lower than the preset safety margin.

[0040] Task logic verification: Verify whether the flight path completely covers all required checkpoints, and whether the parameters of the shooting action (such as hovering time, orbiting radius and speed) can ensure that the image acquisition quality meets the preset analysis standards.

[0041] Performance and Constraint Assessment: Estimate the total mission time and energy consumption, and check whether it exceeds the drone's endurance or mission time constraints.

[0042] Anomaly feedback and automatic correction guided by a large language model: Suppose that when the simulation reaches the "navigation to the side shooting point of the main transformer" stage, the collision detection algorithm detects that the planned path is too close to an overhead lead wire, triggering a "collision risk" alarm. The simulation environment is immediately stopped, and a structured error diagnosis report is generated, indicating the risk type, location, related objects, and suggested modification directions.

[0043] Closed-loop iterative optimization: The diagnostic report is fed back to the large language model. The model initiates an error analysis and replanning mechanism, intelligently correcting the original DSL description based on the error context, such as inserting an obstacle avoidance waypoint into the action sequence or adjusting the spatial coordinates of the original waypoint. The corrected DSL will automatically repeat steps two and three, forming a rapid iterative "generation-simulation verification-feedback correction" closed loop until all simulation test indicators are fully met.

[0044] This step involves constructing a digital twin-based security sandbox (an isolated simulation and verification environment) to expose and resolve high-risk issues such as collisions and logical errors that may occur during actual flight in the virtual environment. Combined with the error analysis and replanning capabilities of a large language model, an automated code optimization loop is formed. This fundamentally eliminates the safety risks of the nondeterministic output of the large language model directly impacting the physical world, achieving a qualitative leap from code generation to successful code verification, and is the core mechanism for ensuring system reliability.

[0045] Step Four: Security Monitoring and Takeover During Virtual-to-Physical Migration and On-Site Implementation The instruction packages that have passed simulation verification are authorized for deployment on live machines.

[0046] Secure Deployment and Launch: The command package is sent to the drone at the substation site via a secure communication link. After power-on, the drone autonomously loads and begins executing the verified task script.

[0047] Real-time status monitoring and virtual-real consistency comparison: During field execution, the virtual-real migration and field execution modules run continuously. The system activates shadow mode, which runs the digital twin simulation environment in parallel in the background. It receives two data streams in parallel: one is the real sensor data (position, attitude, battery level, etc.) transmitted back by the UAV, and the other is the predicted status data at the corresponding task time point in the simulation environment. The system compares these two sets of data in real time.

[0048] Dynamic Anomaly Takeover: If a significant deviation is found between the actual data and the simulation prediction (e.g., a sudden crosswind causing the drone's position to deviate beyond a set threshold), the system determines that an unsimulated anomaly has occurred. At this point, to ensure absolute safety, the underlying independent safety controller (such as a stabilization module using a model predictive control algorithm) immediately acquires the highest priority, taking over immediate control of the drone and executing preset safety strategies such as hovering or emergency avoidance. Simultaneously, this anomaly event is reverse-engineered into a semantic description by the MCP protocol and transmitted back to the large language model via a feedback channel. The large language model no longer simply reports an error but dynamically generates new DSL commands based on the remaining battery power and environmental information, achieving task-level adaptive repair.

[0049] Mission Completion and Data Archiving: After returning to a normal or safe state, the drone continues or re-executes the mission until all inspection actions are completed and it automatically returns to base. All data throughout the process, including execution logs, collected images, and records of abnormal events, is synchronously transmitted back and archived, forming a structured digital inspection report.

[0050] This invention utilizes a DSL intermediate presentation layer to achieve precise and structured control intentions while retaining the convenience of natural language interaction. Through the MCP middleware, it decouples high-level planning from low-level control and enables efficient communication. Digital twin simulation closed-loop verification prioritizes security verification, ensuring the reliability of generated code. Virtual-real migration and real-time monitoring ensure the adaptive execution of verified strategies in complex real-world environments. Ultimately, it constructs a complete, reliable, and efficient intelligent inspection system, from "one-sentence requirements" to "safe automated execution," effectively addressing the industry pain points of inflexible traditional inspection methods and unreliable existing AI inspection methods, significantly improving the intelligence level and safety grade of power facility operation and maintenance.

[0051] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for autonomous inspection of unmanned aerial vehicles (UAVs) based on large language models and simulation verification, characterized in that, Includes the following steps: S1. Receive the inspection task instruction described in natural language, and parse the instruction through a large language model and convert it into a standardized domain-specific language (DSL) description that conforms to a predefined grammatical structure. The grammatical structure includes the task objective, action sequence, and constraints. S2. Based on the Model Control Protocol (MCP), the standardized DSL description is mapped and converted into low-level control code executable by the UAV. S3. Inject the underlying control code into a high-fidelity digital twin simulation environment for pre-running, detect collision risks and logic errors during code execution, and obtain simulation verification results; S4. If the simulation verification result is abnormal, the abnormal information will be fed back to the large language model to trigger code correction and re-perform simulation verification until the verification is passed. S5. Deploy the verified underlying control code to the physical drone and control it to perform autonomous inspections in the real environment. During this period, keep the digital twin simulation environment running in parallel in shadow mode and perform closed-loop control based on virtual-real comparison.

2. The UAV autonomous inspection method based on large language model and simulation verification according to claim 1, characterized in that, The instruction parsing and transformation into a standardized DSL description through a large language model is specifically as follows: By leveraging a large language model fine-tuned with domain knowledge, key elements in natural language instructions are extracted, and a structured script containing task identifiers, target device coordinates, ordered action lists, and spatial obstacle avoidance constraints is generated according to predefined DSL syntax rules.

3. The UAV autonomous inspection method based on large language model and simulation verification according to claim 1, characterized in that, The process of mapping and converting standardized DSL descriptions into executable code for UAVs specifically includes: Through the standard interface defined by the Model Control Protocol (MCP), the motion elements in the DSL are mapped to the corresponding control instructions or SDK function calls of the Robot Operating System (ROS). Automatically generate a complete executable script that includes environment configuration, dependency libraries, and exception handling logic.

4. The UAV autonomous inspection method based on large language model and simulation verification according to claim 1, characterized in that, The pre-simulation and testing in the simulation environment includes: The simulation environment's physics engine is used to simulate drone dynamics and detect whether the virtual drone collides with obstacles or flies out of the safety boundary. Verify whether the inspection path planned by the underlying control code covers all target equipment and whether the operation actions meet the preset detection requirements.

5. The UAV autonomous inspection method based on large language model and simulation verification according to claim 1, characterized in that, The specific modification of the trigger code is as follows: The large language model adaptively adjusts the path points, action parameters, or constraints in the DSL description based on the error logs fed back from the simulation environment, or directly rewrites the underlying control code.

6. The UAV autonomous inspection method based on large language model and simulation verification according to claim 1, characterized in that, The closed-loop control based on virtual-real comparison includes: During actual operation, the simulation environment and the actual aircraft are kept strictly synchronized on the time axis. The predicted state data generated by the simulation environment is used as the dynamic true value and compared with the real-time telemetry data transmitted back by the UAV. If the deviation exceeds the preset threshold, the system constructs a reverse feedback channel through the Model Control Protocol (MCP) to report the abnormal state semantically, triggering the upper-level large language model to perform cognitive-level task replanning based on the current environmental characteristics, thereby achieving a leap from bottom-level reflexive risk avoidance to top-level cognitive self-healing.

7. An autonomous UAV inspection system based on a large language model and simulation verification, used to implement the autonomous UAV inspection method based on a large language model and simulation verification as described in any one of claims 1 to 6, characterized in that, The system includes: The language understanding and task planning module is used to receive natural language instructions and parse the natural language instructions into standardized DSL descriptions through a large language model. The code generation and mapping module is capable of converting the DSL description into executable code for the UAV based on the Model Control Protocol (MCP). The simulation verification and closed-loop correction module is used to verify code security in a digital twin environment and trigger automatic correction based on a large language model when verification fails. The virtual-to-physical migration and field execution module is used to deploy verified code to physical drones and manage execution monitoring and security fault tolerance during field inspections.

8. The UAV autonomous inspection system based on large language model and simulation verification according to claim 7, characterized in that, The system adopts a layered decoupled architecture, including: The upper-level language model layer is responsible for semantic understanding and DSL generation. The model control middleware located in the middle layer is based on the Model Control Protocol (MCP) and is responsible for protocol conversion and tool invocation. The execution control layer, located at the bottom layer, is responsible for the real-time flight control, navigation, and obstacle avoidance of the UAV.