A natural language flight mission temporal logic compiling method
By using structured task intermediate representation and a deterministic compiler, the large language model and the trajectory execution layer are isolated, solving the problems of reliable conversion and semantic traceability in natural language flight tasks, and realizing the standardization and executability of deterministic signal logic tasks.
Patent Information
- Application Number
- CN202611626961.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-21
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies struggle to reliably convert natural language flight missions into grammatically valid, semantically traceable signal-time logic mission specifications that meet aircraft capability constraints. Furthermore, control commands generated by large language models lack determinism and traceability when directly fed into the trajectory planner.
By setting up a structured task intermediate representation, a deterministic compiler, and model predictive control, the large language model is isolated from the trajectory execution layer. Entity consistency, temporal relationships, task dependencies, and aircraft capability verification are performed to generate deterministic signal timing logic task specifications and form a structured correction feedback loop when infeasibility occurs.
It achieves reliable conversion and semantic traceability of natural language flight missions, avoids the probabilistic influence of language model output, reduces invalid trajectory planning, and improves the executability and optimizability of mission planning.
Smart Images

Figure CN123137634A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing, aircraft mission planning, formal methods, and model predictive control, specifically a temporal logic compilation method for natural language flight missions. Background Technology
[0002] Flight mission instructions typically contain colloquial expressions, ellipsis, implicit priorities, multi-step dependencies, and conditional triggering relationships. Parsing methods based on fixed keywords or syntactic templates have limited coverage and struggle to handle synonymous expressions and complex task combinations.
[0003] Large language models possess strong natural language understanding capabilities, but their outputs are probabilistic. Directly using large language models to generate flight control commands or signal timing logic formulas may lead to problems such as missing required fields, non-existent references, inconsistent units, time window conflicts, formal syntax errors, and dynamic infeasibility. If the language model output is directly fed into the trajectory planner without verification, it is difficult to guarantee the determinism and traceability of execution constraints.
[0004] Existing methods lack a closed loop from the cause of failure to task correction. When a task has semantic conflicts or is uncontrollable, the system usually only returns a natural language error, which cannot locate the failure field, infeasible constraint, or adjustable parameter, making it difficult to support automatic correction.
[0005] Therefore, it is necessary to set up a structured task intermediate representation, a deterministic compiler, formal verification, and model predictive control feasibility test between the large language model and the trajectory execution layer, so that the language model is only responsible for semantic parsing, the execution constraints are generated by the deterministic module, and a repeatable correction closed loop is formed when the test fails. Summary of the Invention
[0006] The technical problem to be solved by this invention is to reliably convert natural language flight missions into grammatically valid, semantically traceable signal-time logic mission specifications that meet the constraints of aircraft capabilities, prevent unverified formulas or control commands generated by language models from directly entering the execution layer, and automatically generate structured correction feedback when the mission is not feasible.
[0007] To address the aforementioned technical problems, this invention proposes a temporal logic compilation method for natural language flight missions, comprising the following steps:
[0008] S1, acquire natural language flight mission instructions, controlled aircraft status, mission environment data, and mission entity registry;
[0009] S2, input the natural language flight mission instructions, mission environment data and structured output pattern into the large language model to obtain the mission intermediate representation, which includes action type, mission object, spatial parameters, time window, priority, triggering condition and prior dependency;
[0010] S3, perform structural pattern verification, entity consistency verification, time relationship verification, task dependency verification, task conflict detection, and spacecraft capability verification on the intermediate representation of the task;
[0011] S4, after the intermediate representation of the task passes the verification, a deterministic compiler isolated from the large language model converts the intermediate representation of the task into a signal-temporal logic task specification according to the predicate mapping table and the temporal logic template. The deterministic compiler does not use the signal-temporal logic formula directly generated by the large language model as an execution constraint.
[0012] S5, perform syntax verification and model predictive control feasibility test on the signal timing logic task specification, and generate the aircraft trajectory according to the task specification when the test passes.
[0013] S6. If the verification in step S3 or step S5 fails, generate a structured task correction feedback containing failure fields, failure reasons and candidate correction methods. Input the structured task correction feedback and the natural language flight mission instructions into the large language model, regenerate the intermediate task representation and repeat steps S3 to S6.
[0014] Furthermore, the structured output mode adopts JSON Schema, function call parameter mode, or restricted domain-specific language mode, and specifies the data type, required conditions, enumerated values, numerical range, and inter-field dependencies for each field.
[0015] Furthermore, the intermediate representation of the task also includes a task identifier, an original text fragment index, and a parsing confidence level; the original text fragment index records the start and end character positions of the corresponding task field in the natural language flight task instruction, which is used to trace the correspondence between the task field and the original instruction fragment.
[0016] Furthermore, the task entity registry includes an aircraft identifier, a target point identifier, a task area identifier, a restricted area identifier, and a dynamic object identifier; the entity consistency check is used to determine whether the entity referenced by the intermediate representation of the task exists in the task entity registry and whether the entity type matches the action type.
[0017] Furthermore, the aircraft capability verification includes at least two of the following: maximum speed, minimum speed, maximum acceleration, minimum turning radius, maximum range, allowable altitude range, and minimum safe interval; the shortest reachable time of the mission is calculated based on the mission space distance, time window, and aircraft capability; when the shortest reachable time is greater than the allowable time of the time window, an aircraft capability constraint conflict is determined to have occurred.
[0018] Furthermore, the action types include target arrival, area cruise, area avoidance, spacing maintenance, cooperative arrival, attitude alignment, task pause, task resumption, and condition-triggered tasks; the predicate mapping table records the atomic predicate template, timing operator template, parameter field, and combination rules corresponding to each action type.
[0019] Furthermore, the deterministic compiler sequentially performs unit normalization, task dependency topological sorting, predicate template instantiation, timing interval writing, priority conversion, conditional triggering connection, abstract syntax tree construction, and formula serialization; the same task intermediate representation generates the same signal timing logic task specification.
[0020] Furthermore, the feasibility verification of the model predictive control includes: under the constraints of aircraft dynamics, control boundaries, region boundaries, and safety intervals, determining the maximum robustness of the signal timing logic task specification relative to the predicted trajectory; the robustness is the real-valued robustness of the predicted trajectory satisfying the signal timing logic task specification, and the task is deemed feasible when the maximum robustness is not less than the feasibility threshold.
[0021] Furthermore, the task dependency verification includes detecting the formation of directed cycles in task dependency relationships; the task conflict detection includes at least one of the following: region arrival tasks and region avoidance tasks with overlapping time windows point to the same region, time windows of tasks with the same priority are mutually exclusive, and synchronization time windows of multiple aircraft collaborative tasks do not overlap.
[0022] Furthermore, the task correction feedback includes candidate correction methods, which include expanding the time window, adjusting the task order, replacing the spatial region, reducing the priority of non-critical tasks, splitting tasks, or requesting supplementary task object information; the candidate correction method is determined from the correction rule table based on the failure type.
[0023] During the execution of the trajectory, the online robustness of the mission specification is calculated; when the online robustness is lower than the recompilation threshold, an online mission correction feedback containing the violated atomic predicate, the violation time, and the field that allows adjustment is generated, and steps S2 to S6 are re-executed.
[0024] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0025] 1. This invention enables the large language model to output only the intermediate representation of the task constrained by the structured output pattern, instead of directly outputting the execution control quantity. This isolates the semantic parsing capability of the language model from the aircraft control commands, avoiding the impact of the probabilistic nature of the language model output on flight control safety.
[0026] 2. This invention uses a deterministic compiler to construct signal timing logic task specifications using only verified fields and predefined templates, so that the same intermediate representation of the same task can produce the same task specification output, thus structurally avoiding syntax and semantic errors caused by freely generated formulas in the language model.
[0027] 3. This invention uses multi-level checks, including entity consistency, time relationship, task dependency, task conflict and aircraft capability, to block incomplete or unexecutable tasks before planning, thereby reducing invalid trajectory planning calculations.
[0028] 4. This invention traces the correspondence between structured fields and spoken instruction fragments by indexing the original text fragments in the intermediate representation of the task, making the parsing results of natural language task instructions interpretable.
[0029] 5. This invention locates the failed fields, failure reasons, and candidate correction methods through structured task correction feedback, and inputs them together with natural language task instructions into a large language model to form a closed loop of re-parsing and re-compiling, thereby improving the executability of task planning in cases of semantic conflict or control infeasibility.
[0030] 6. This invention connects task semantic verification with trajectory feasibility verification through signal timing logic robustness, enabling the degree of task satisfaction to be continuously quantified, and providing an optimizable formal objective for trajectory planning. Attached Figure Description
[0031] Figure 1 This is a flowchart of the closed-loop compilation and verification of the timing logic for the natural language flight mission of this invention. Detailed Implementation
[0032] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0033] like Figure 1 As shown, natural language instructions sequentially undergo structured parsing, task verification, deterministic temporal logic compilation, model predictive control feasibility verification, and feedback regeneration. Only the verified task specifications enter the trajectory planning and execution layer. Figure 1In this context, STL (Signal Temporal Logic) stands for Signal Temporal Logic, and MPC (Model Predictive Control) stands for Model Predictive Control.
[0034] A temporal logic compilation method for natural language flight missions includes the following steps:
[0035] S1, acquires natural language flight mission instructions, controlled aircraft status, mission environment data, and mission entity registry.
[0036] The language parsing layer includes a large language model interface and a structured output constraint unit for extracting task fields from natural language instructions. The deterministic compilation layer includes a structure pattern validator, entity validator, conflict detector, capability validator, predicate map, template instantiator, and abstract syntax tree generator. The verification execution layer includes a signal-timing logic syntax validator, a model predictive control feasibility checker, and a trajectory planner.
[0037] The language parsing layer cannot directly call the aircraft control interface. The deterministic compilation layer only reads the validated fields in the intermediate representation of the task, and does not read the free text formulas generated by the large language model. The validation execution layer only accepts the abstract syntax tree or its serialized formulas that have passed the syntax validation and are output by the deterministic compiler.
[0038] S2, input the natural language flight mission instructions, mission environment data and structured output pattern into the large language model to obtain the mission intermediate representation. The mission intermediate representation includes action type, mission object, spatial parameters, time window, priority, triggering condition and prior dependencies.
[0039] One implementation of the structured output mode is as follows:
[0040] {
[0041] "tasks": [
[0042] {
[0043] "id": "T1",
[0044] "action": "reach",
[0045] "object": "UAV_A",
[0046] "target": "REGION_A",
[0047] "time_window": [0, 60],
[0048] "priority": 5,
[0049] "condition": null,
[0050] "predecessors": [],
[0051] "source_span": [0, 15],
[0052] "confidence": 0.96
[0053] } ]
[0055] }
[0056] The meaning of the above English code segment is as follows: "tasks" represents the task list; "id" represents the task number, where "T1" represents the first task; "action" represents the action type, where "reach" represents target arrival; "object" represents the object performing the task, where "UAV_A" represents UAV A; "target" represents the target entity, where "REGION_A" represents region A; "time_window" represents the time window relative to the start time of the task, [0,60] represents from second 0 to second 60; "priority" represents the task priority, with a value of 5 being the example priority; "condition" represents the trigger condition, with a value of null indicating no additional trigger condition; "predecessors" represents the list of preceding task numbers, with an empty array indicating no preceding tasks; "source_span" represents the index of the original text segment, [0,15] representing the 0th to 15th characters in the original instruction corresponding to this task; "confidence" represents the resolution confidence, with 0.96 indicating a confidence level of 0.96.
[0057] Among them, source_span is used to highlight the corresponding instruction fragment in the manual review interface and locate the original text when entity or time errors occur; confidence is used to determine whether to enter the manual confirmation process without directly changing the task specifications.
[0058] Structured output can adopt JSON Schema (JSON Schema Specification), function call parameter schema, or restricted domain-specific language schema. When using JSON Schema, object fields, array fields, and numeric fields define data types, required conditions, enumeration values, numeric ranges, and inter-field dependencies, respectively. When using function call parameter schema, constraints on the same field are written into the schema definition of the function parameters. When using restricted domain-specific language schema, it is parsed into the same intermediate representation of the task according to predefined lexical, syntactic, and semantic rules. Action types use enumeration values; task object and target fields must reference the task entity registry; time windows use a time value relative to the task start time; priority uses a preset range of values or levels; and pre-dependency fields use task identifier arrays.
[0059] The mission entity registry includes at least the aircraft identifier, target point identifier, mission area identifier, restricted area identifier, and dynamic object identifier, and records the entity type, spatial parameters, status index, and validity period. The entity type can also be expanded to threat object, cooperative formation, or sensor object according to mission needs; expanded entities are still validated according to the matching rules between entity type and action type.
[0060] The above structure is only used as an example to illustrate one form of data organization in the structured output mode. In actual implementation, the field names and nesting levels can be adjusted by the structured output mode and do not constitute a limitation on the present invention.
[0061] S3, perform structural pattern verification, entity consistency verification, time relationship verification, task dependency verification, task conflict detection, and spacecraft capability verification on the intermediate representation of the task.
[0062] The structural schema validation checks required fields, field types, enumerated values, and numerical ranges in sequence. Entity consistency validation checks the existence of object identifiers and whether the entity type meets the action requirements. Time relationship validation checks that the time window meets the start-end sequence constraints and that the end time of a preceding task is not later than the end time of a subsequent task. Dependency validation uses directed graph topology sorting to detect circular dependencies.
[0063] Task conflict detection includes: the same aircraft being required to simultaneously enter and avoid the same area within overlapping time windows; the same aircraft performing hard-constrained tasks with overlapping timeframes in non-overlapping areas; multiple cooperating aircraft having no overlap in their synchronous arrival time windows; and two tasks of the same priority that cannot be satisfied simultaneously without a given order. The mutual exclusion of time windows refers to situations where the time intervals of two tasks overlap but their hard constraints cannot be satisfied simultaneously at the same time.
[0064] Aircraft capabilities include maximum speed Minimum speed Maximum acceleration Minimum turning radius Maximum range Permissible altitude range and minimum safety interval. For the current location To the target area The task is to calculate the lower bound time:
[0065]
[0066] in, The position of the spacecraft at the start of the mission. For the target area, The shortest distance from the location to the target area. For maximum speed, For maximum acceleration, To provide a lower bound for reachability time when obstacles and turning constraints are ignored. For the task time window. When When a conflict arises between the time window and the aircraft's capabilities, the corresponding constraint verification is performed based on the lower bound when considering minimum turning radius, range, or altitude constraints.
[0067] S4, after the intermediate representation of the task passes the verification, a deterministic compiler isolated from the large language model converts the intermediate representation of the task into a signal-temporal logic task specification based on the predicate mapping table and the temporal logic template. The deterministic compiler does not use the signal-temporal logic formula directly generated by the large language model as an execution constraint.
[0068] The table below shows the mapping relationship between action types and signal timing logic templates.
[0069]
[0070] The core symbols involved in the action type and template mapping table are defined as follows:
[0071] set up The target region predicate robustness is non-negative when the aircraft is located within the target region; one implementation of the circular target region is as follows:
[0072]
[0073] in, For the aircraft's position, and These are the center and radius of the target area, respectively.
[0074] set up To constrain the robustness of the predicate, it is non-negative when the aircraft is outside the constrained region; let... This is the task enable state variable, taking the value 0 or 1. The cosine of the aircraft's current direction and the target direction:
[0075]
[0076] in, Let V be the velocity vector of the aircraft. For the aircraft's position, The target point location, To prevent positive numbers with a denominator of zero.
[0077] When the priority is marked as a hard constraint, the corresponding formula is included in the model prediction control constraint set; when the priority is marked as a soft constraint, the priority value is mapped to robustness weights. Precedence dependencies are rearranged through time windows or connected by the "until" operator.
[0078] A deterministic compiler performs the following operations:
[0079] 1. Convert distance, time, angle, and speed into standardized system units;
[0080] 2. Sort the tasks topologically based on their pre-dependencies;
[0081] 3. Retrieve unique predicate templates based on action enumeration;
[0082] 4. Write the region, status index, and capability parameters corresponding to the entity into the template;
[0083] 5. Write time window and priority;
[0084] 6. Convert conditional triggering relationships into implied equivalent logical expressions;
[0085] 7. Construct an abstract syntax tree with atomic predicate nodes, logical nodes, and temporal operator nodes;
[0086] 8. Serialize the abstract syntax tree into signal timing logic formulas in a fixed traversal order.
[0087] Let the intermediate representation of the task be... The compiler function is ,but:
[0088]
[0089] in, This serves as an intermediate representation for tasks that validate structural patterns, entities, time, dependencies, conflicts, and capabilities. For deterministic compilation functions; The number of atomic tasks in the task; For the first The signal timing logic formula obtained by instantiating an atomic task using a template; This is the logical conjunction of all sub-formulas. The compiler function does not include random sampling; the same version of the predicate map pairs the same... Generate the same By constraining the node types of the abstract syntax tree, the serialization result only contains nodes allowed by the syntax definition, structurally avoiding errors in brackets, operators, and parameters caused by large language models freely generating formulas.
[0090] S5, perform syntax verification and model predictive control feasibility test on the signal timing logic task specification, and generate the aircraft trajectory according to the task specification when the test passes.
[0091] After passing syntax validation, the solution is obtained under aircraft dynamics and control constraints:
[0092]
[0093] in, To predict candidate control sequences in the time domain, The feasible control set is determined by the combined constraints of aircraft dynamics, control boundaries, region boundaries, and safety intervals. For control sequence Predicted trajectory under the influence of the action, For trajectory Meet the task specifications Real-valued robustness, To maximize robustness within the feasible control set, This is the feasibility threshold. This indicates satisfaction. This indicates a violation. In the example, the feasibility threshold... ,when If the time is right, enter the track execution layer; otherwise, generate mission correction feedback.
[0094] S6. If the verification in step S3 or step S5 fails, generate a structured task correction feedback containing failure fields, failure reasons and candidate correction methods. Input the structured task correction feedback and the natural language flight mission instructions into the large language model, regenerate the intermediate task representation and repeat steps S3 to S6.
[0095] One possible structure for task correction feedback is as follows:
[0096] {
[0097] "stage": "mpc_feasibility",
[0098] "task_id": "T1",
[0099] "field_path": "tasks[0].time_window",
[0100] "reason": "minimum_reachable_time_exceeds_window",
[0101] "current_value": [0, 20],
[0102] "allowed_minimum": [0, 36],
[0103] "candidates": [
[0104] {"operation": "expand_time_window", "value": [0, 40]},
[0105] {"operation": "replace_target", "value": "REGION_B"} ]
[0107] } The meaning of the above English code segment is as follows: "stage" indicates the stage at which the test failed; "mpc_feasibility" indicates the model prediction control feasibility test stage; "task_id" indicates the task number where the failure occurred; "T1" indicates task 1; "field_path" indicates the path of the failed field in the intermediate representation of the task; "tasks[0].time_window" indicates the time window field of the first task in the task list; "reason" indicates the reason for the failure; "minimum_reachable_time_exceeds_window" indicates that the minimum reachable time exceeds the current time window; "current_value" indicates the current value of the field, [ [0,20] indicates that the current time window is from second 0 to second 20; "allowed_minimum" indicates the minimum allowed time window to meet the reachability requirements, and [0,36] indicates that the termination time should be extended to at least second 36; "candidates" indicates the list of candidate correction operations; "operation" indicates the type of correction operation; "expand_time_window" indicates expanding the time window, and its "value" is [0,40], indicating that it is recommended to adjust the time window to from second 0 to second 40; "replace_target" indicates replacing the target entity, and its "value" is "REGION_B", indicating that it is recommended to replace the target with region B.
[0108] The rule table was revised to establish a correspondence between failure types and candidate operations: missing fields or missing task object information correspond to requesting supplementation; unknown entities correspond to entity replacement or manual confirmation; unreachable time corresponds to expanding the time window; circular dependencies correspond to deleting dependency edges or adjusting task order; soft task conflicts correspond to reducing the priority of non-critical tasks; complex combinations are not feasible correspond to splitting tasks.
[0109] Task correction feedback and the original instructions are input into the large language model. The model can only modify the allowed fields listed in the feedback. The new task intermediate indicates that it has undergone complete validation, compilation, and feasibility testing again, and formulas that failed validation are not reused.
[0110] During the execution of the trajectory, the online robustness of the current task specification is continuously calculated. When the online robustness is lower than the preset recompilation threshold, or when the robustness of a certain hard constraint atomic predicate is lower than zero, an online task correction feedback containing the violated atomic predicate, the violation time, and the fields that can be adjusted is generated, and the task parsing, verification, compilation, and feasibility check are re-executed.
[0111] The above structure is only used as an example to illustrate one form of data organization for task correction feedback. In actual implementation, the field names and values can be adjusted by the task correction feedback protocol and do not constitute a limitation on the present invention.
[0112] The technical solution of the present invention will be further described in detail below through specific embodiments.
[0113] Example 1:
[0114] This embodiment illustrates a timing logic compilation process for a single aircraft in a time-limited arrival and area avoidance scenario.
[0115] The original instruction was "Instruct UAV A to reach area A within 60 seconds, avoiding area Z throughout the process." The task entity registry registers UAV_A (UAV A), REGION_A (area A), and REGION_Z (area Z). Language parsing layer output:
[0116] {
[0117] "tasks": [
[0118] {"id":"T1","action":"reach","object":"UAV_A","target":"REGION_A","time_window":[0,60],"priority":5,"condition":null,"predecessors":[],"source_span":[0,14]},
[0119] {"id":"T2","action":"avoid","object":"UAV_A","target":"REGION_Z","time_window":[0,60],"priority":10,"condition":null,"predecessors":[],"source_span":[15,22]} ]
[0121] } The meaning of the above English code segment is as follows: "tasks" represents the task list; "id" represents the task number, "T1" and "T2" represent the first and second tasks respectively; "action" represents the action type, "reach" represents target arrival, and "avoid" represents area avoidance; "object" represents the object performing the task, "UAV_A" represents drone A; "target" represents the target entity, "REGION_A" represents area A, and "REGION_Z" represents area Z; "time_window" represents the time window, [0,60] represents the time from second 0 to second 60; "priority" represents the priority, with a larger value indicating higher priority; "condition" represents the trigger condition, null indicates no additional trigger condition; "predecessors" represents the list of preceding task numbers, an empty array indicates no preceding tasks; "source_span" represents the index of the original text segment; the source_span of task T1 is [0,14], corresponding to the arrival task segment in the original instruction; the source_span of task T2 is [15,22], corresponding to the area avoidance task segment in the original instruction.
[0122] After the two tasks pass structure, entity, time, and capability checks, the deterministic compiler generates:
[0123]
[0124] in, The machine is in state A. For machine A entering region A, the region predicate robustness is given. Let A be the robustness of the evasion predicate when it is located outside region Z. This indicates that the final satisfaction will occur within 0 to 60 seconds. This indicates that the condition is always met within 0 to 60 seconds. The formula is submitted to the trajectory planner when the maximum robustness of the model predictive control feasibility test is not less than zero. The execution log saves the task fields, the formula abstract syntax tree, the robustness, and the first control variable.
[0125] Example 2:
[0126] This embodiment illustrates a timing logic compilation process in a closed-loop scenario for automatic correction of conflicting tasks.
[0127] The original instruction is "Machine A enters region C within 30 seconds, while avoiding region C throughout the entire process." The language parsing layer generates an arrival task and a region avoidance task, with their time windows overlapping and both pointing to the same region. The conflict detector outputs a reach_avoid_same_region error (the arrival task and avoidance task in the same region conflict), and provides three candidate correction methods: adjusting the time order, replacing the avoidance region, or canceling one of the tasks.
[0128] Based on the feedback, the large language model rewrote the task as "first avoid region C and fly for 30 seconds, then enter region C," and the time window for reaching the task in the intermediate representation was adjusted to... The evasion task is then set as its preceding task. After re-verification, it is compiled as follows:
[0129]
[0130] in, Let A be the robustness of the avoidance predicate when it is located outside region C. Let A be the robustness of the arrival predicate when it is located within region C. and These represent the conditions that are always met and the conditions that are eventually met within the corresponding time intervals, respectively. This process fully records the original instructions, the initial intermediate representation, the conflict type, the candidate correction methods, the corrected intermediate representation, and the final formula.
[0131] Example 3:
[0132] This embodiment illustrates a timing logic compilation process in a multi-aircraft collaboration, pause, and resume scenario.
[0133] The original command was: "Aircraft A and Aircraft B maintain a distance of 10 to 20 kilometers and arrive at area D simultaneously within 120 seconds; if a pause signal is received, maintain a safe state; upon receiving a recovery signal, continue the mission and make the noses of both aircraft point to target point P when they enter area D."
[0134] The task intermediate representation includes five types of actions: keep_distance (maintain distance), co_reach (co-reach), pause (pause the task), resume (resume the task), and align (align the attitude). Deterministic compiler generation:
[0135]
[0136] in, The distance between machine A and machine B. and Let's consider the region predicate robustness of machines A and B entering region D, respectively. and These are the pause signal and the resume signal, respectively. and These are the robustness of the two-engine safety predicates, The task is enabled. and These are the cosine values of the current direction and the target direction of the two aircraft, respectively. The direction cosine threshold is used. The model predictive controller uses the joint state and joint control variables of the two aircraft for feasibility verification. When the pause signal is activated, the weights of the non-safe soft tasks are reset to zero, while the safe and spacing tasks remain active; after the recovery signal is activated, the weights of the arrival and alignment tasks are restored.
[0137] Deterministic and traceability verification:
[0138] For each intermediate representation of a task that passes verification, the compiler executes the process multiple times, comparing the sequence of abstract syntax tree nodes with the serialized formula result; if they are completely identical, the deterministic check passes. Each formula undergoes parsing—serialization—re-parsing, comparing the two abstract syntax trees to verify consistency between the formula syntax and structure. Each task field, atomic predicate, and formula node is associated with the original instruction fragment via source_span (original text fragment index), thus forming a traceability chain between natural language, task fields, formal constraints, and track execution records.
[0139] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A temporal logic compilation method for a natural language flight mission, characterized in that, Includes the following steps: S1, acquire natural language flight mission instructions, controlled aircraft status, mission environment data, and mission entity registry; S2, input the natural language flight mission instructions, mission environment data and structured output pattern into the large language model to obtain the mission intermediate representation, which includes action type, mission object, spatial parameters, time window, priority, triggering condition and prior dependency; S3, perform structural pattern verification, entity consistency verification, time relationship verification, task dependency verification, task conflict detection, and spacecraft capability verification on the intermediate representation of the task; S4, after the intermediate representation of the task passes the verification, a deterministic compiler isolated from the large language model converts the intermediate representation of the task into a signal-temporal logic task specification according to the predicate mapping table and the temporal logic template. The deterministic compiler does not use the signal-temporal logic formula directly generated by the large language model as an execution constraint. S5, perform syntax verification and model predictive control feasibility test on the signal timing logic task specification, and generate the aircraft trajectory according to the task specification when the test passes. S6. If the verification in step S3 or step S5 fails, generate a structured task correction feedback containing failure fields, failure reasons and candidate correction methods. Input the structured task correction feedback and the natural language flight mission instructions into the large language model, regenerate the intermediate task representation and repeat steps S3 to S6.
2. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The structured output mode adopts JSON Schema, function call parameter mode or restricted domain-specific language mode, and specifies the data type, required conditions, enumerated values, numerical range and inter-field dependencies for each field.
3. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The intermediate representation of the task also includes a task identifier, an original text fragment index, and a parsing confidence level; the original text fragment index records the start and end character positions of the corresponding task field in the natural language flight task instruction, which is used to trace the correspondence between the task field and the original instruction fragment.
4. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The task entity registry includes aircraft identifier, target point identifier, task area identifier, restricted area identifier, and dynamic object identifier; the entity consistency check is used to determine whether the entity referenced by the intermediate representation of the task exists in the task entity registry and whether the entity type matches the action type.
5. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The aircraft capability verification includes at least two of the following: maximum speed, minimum speed, maximum acceleration, minimum turning radius, maximum range, allowable altitude range, and minimum safety interval; the shortest reachable time of the mission is calculated based on the mission space distance, time window, and aircraft capability; when the shortest reachable time is greater than the allowable time of the time window, an aircraft capability constraint conflict is determined to have occurred.
6. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The action types include target arrival, area patrol, area avoidance, spacing maintenance, cooperative arrival, attitude alignment, mission pause, mission resumption, and condition-triggered mission; the predicate mapping table records the atomic predicate template, timing operator template, parameter field, and combination rules corresponding to each action type.
7. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The deterministic compiler sequentially performs unit normalization, task dependency topological sorting, predicate template instantiation, timing interval writing, priority conversion, conditional triggering connection, abstract syntax tree construction, and formula serialization; the same task intermediate representation generates the same signal timing logic task specification.
8. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The feasibility verification of the model predictive control includes: under the constraints of aircraft dynamics, control boundaries, region boundaries, and safety intervals, determining the maximum robustness of the signal timing logic task specification relative to the predicted trajectory; the robustness is the real-valued robustness of the predicted trajectory satisfying the signal timing logic task specification, and the task is deemed feasible when the maximum robustness is not less than the feasibility threshold.
9. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The task dependency verification includes detecting the formation of directed cycles in task dependency relationships; the task conflict detection includes at least one of the following: the region arrival task and the region avoidance task with overlapping time windows point to the same region, the time windows of tasks with the same priority are mutually exclusive, and the synchronization time windows of multiple aircraft collaborative tasks have no overlap.
10. The temporal logic compilation method for natural language flight missions according to claim 1, characterized in that, The task correction feedback includes candidate correction methods, which include expanding the time window, adjusting the task order, replacing the spatial region, reducing the priority of non-critical tasks, splitting tasks, or requesting supplementary task object information. Candidate correction methods are determined from the correction rule table based on the type of test failure; During the execution of the trajectory, the online robustness of the mission specification is calculated; when the online robustness is lower than the recompilation threshold, an online mission correction feedback containing the violated atomic predicate, the violation time, and the field that allows adjustment is generated, and steps S2 to S6 are re-executed.
