Cluster task generation method and device based on unmanned aerial vehicle command and control software
Through the cluster task generation method based on the drone command and control software, the task model is built and the task execution sequence is adjusted, and the problem of not being able to create multiple types and multiple same types of tasks at the same time in the existing technology is solved, and the flexibility and efficiency of task execution are achieved.
Patent Information
- Application Number
- CN202510025899.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art cannot create multiple types of tasks and multiple same types of tasks at the same time, resulting in the failure of the task when the drone encounters environmental changes during the execution of tasks.
By providing a cluster task generation method based on drone command and control software, a task type layout file is generated, a task model containing all types of tasks in the cluster task requirements is built, and the execution order of the current task is adjusted through the task execution number of the corresponding task type in the task model.
The ability to re-plan tasks in real-time according to changes in external environment during task execution is realized, the flexibility and customization of task generation is improved, the orderliness and logic of task execution is ensured, and the efficiency and concurrent processing capabilities of task execution are improved.
Smart Images

Figure CN119620785A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of UAV technology, and in particular to a cluster task generation method and device based on UAV command and control software. Background Art
[0002] Swarm drones refer to a collaborative system composed of multiple drones, which can achieve collaborative operations of multiple drones through cluster control and command software. As an important part of the drone system, the performance of cluster control and command software directly affects the collaborative control capability of the drone cluster.
[0003] Cluster task generation technology is mainly divided into fixed area task generation method and pre-planned route task generation method. In the fixed area task generation method, different types of task stages correspond to different fixed areas on the command and control software, and operators need to set the parameters of the tasks to be generated in these fixed areas. However, this method can only generate one cluster task at a time, that is, after the drone performs a task, if it needs to perform the next task, it needs to regenerate the task. In the pre-planned route task generation method, the operator is allowed to select the type of task to be generated and set the parameters, thereby generating pre-planned routes for multiple tasks. This method still does not have the function of generating multiple tasks of the same type and lacks flexibility.
[0004] Therefore, the prior art cannot simultaneously create multiple types of tasks and multiple tasks of the same type, resulting in that when the drone encounters environmental changes during the execution of the task, it is unable to re-plan the task in time, thus causing the mission to fail.
[0005] Therefore, how to develop a method that can flexibly respond to multi-task generation needs and re-plan tasks in real time according to changes in the external environment during task execution has become a problem that needs to be solved urgently. Summary of the invention
[0006] In an embodiment of the present application, a cluster task generation method based on UAV command and control software is provided to solve the problem in the prior art that it is impossible to simultaneously create multiple types of tasks and multiple tasks of the same type, resulting in the inability to re-plan the task in time when the UAV encounters environmental changes during the task execution, thus causing the task to fail.
[0007] In the first aspect, an embodiment of the present application provides a cluster task generation method based on unmanned aerial vehicle command and control software, the method comprising: generating a task type layout file according to cluster task data rules and task type rules; based on the task type layout file, constructing a task model containing all types of tasks in the cluster task requirements, and adjusting the execution order of the current task through the task execution number of the corresponding task type in the task model; generating a set of initial cluster task data according to the task type, and creating a corresponding internal protocol data subset for each task type, wherein the internal protocol data subset is distinguished by an identifier; updating a multidimensional array of the corresponding internal protocol data subset according to the task type and sequence number of the current task model, and adding the current task model to the set of initial cluster task data, and after all task model data are added, clearing the empty elements in the set of initial cluster task data to obtain a final set of cluster task data; based on the final set of cluster task data, generating a task list according to the purpose of task execution, and executing the cluster task in the order in which the task names are arranged in the task list.
[0008] In a possible implementation, it also includes: deleting the model tasks in the model list according to the needs of emergencies during the execution of cluster tasks, generating a new model list, cluster task data and task list; wherein the model list is a collection of all task models.
[0009] In a possible implementation, the task type layout file is generated according to the cluster task data rules and the task type rules, including: the task type layout file includes a takeoff task layout file, a search task layout file, a strike task layout file and a return task layout file; the task data of the task type layout file includes external data and internal protocol data.
[0010] In a possible implementation, the task model including all types of tasks in the cluster task requirements is constructed based on the task type layout file, including: introducing the task layout defined in various task layout files in the form of identifiers, the task layout constituting the framework of the task model, the task layout representing a specific task type, and the task type is assigned an identifier; according to the current task requirements, the corresponding task type is selected through preset judgment rules to construct a task model including all types of tasks in the cluster task requirements; the preset judgment rule is: in a task model, at the same time, only one task type's identifier display status is true, and all other task types' identifier display status are false.
[0011] In one possible implementation, the execution order of the current task is adjusted by the task execution number of the corresponding task type in the task model, including: when the identifier display status of a task type in the task model is true, the task type is selected for execution, and the task execution number under the task type is adjustable; when the identifier display status of a task type in the task model is false, the task type is not selected for execution, and the task execution number under the task type is not adjustable.
[0012] In one possible implementation, adding the current task model to the set of initial cluster task data includes: adding the current task model to the set of initial cluster task data and updating the multidimensional array in the internal protocol data subset; ensuring that the length of the multidimensional array in the internal protocol data subset of each task type matches the total number of current task models; if the total number of current task models changes, adjusting the length of the multidimensional array accordingly.
[0013] In one possible implementation, the updating of the multidimensional array in the internal protocol data subset includes: locating the corresponding internal protocol data subset according to the task type of the current task model; searching the multidimensional array of the subset for a subscript position that matches the serial number of the current task model in the set of initial cluster task data; the serial number is used to uniquely identify each task model and serve as an index in the multidimensional array; adding the data of the current task model to the array element corresponding to the found subscript position; updating the array element to the relevant data of the current task model; and for internal protocol data subsets of other task types, ensuring that the array elements of the corresponding subscripts in their multidimensional arrays remain empty.
[0014] In one possible implementation, the task list is generated based on the final set of cluster task data according to the purpose of task execution, and cluster tasks are executed in the order of task names in the task list, including: constructing a task execution number array according to the task execution numbers of all task models; the subscript of the task execution number array is the current serial number of the task model in the final set of cluster task data; sorting the task execution number array, and merging the same elements in the task execution number array, which represent tasks that need to be executed simultaneously; generating a task list based on the sorted and merged task execution number array; the task names in the task list are arranged according to the transformation rules of the task execution number array, so as to execute cluster tasks in the order of task names in the task list.
[0015] In a possible implementation, the model tasks in the model list are deleted according to the needs of emergencies during the execution of cluster tasks, and a new model list, cluster task data and task list are generated, including: deleting the data and serial number of the current task model from the model list to generate a new model list; if there are other task models after the deleted task model, these models are moved forward to the position of the deleted task, and their serial numbers are updated in sequence to continuous serial numbers; if there are no other task models after the deleted task model, the model list is kept unchanged; according to the task type and serial number of the currently deleted task model, the corresponding internal protocol data subset is found in the final cluster task data set; the elements matching the serial number of the deleted task model in the multidimensional array are deleted from the internal protocol data subset, and the empty elements in the subset are cleared to generate new cluster task data; according to the serial number of the deleted task model, the corresponding elements are deleted from the task execution number array; the task execution number array is sorted and merged to process the order changes or repeated elements caused by deleting the task model; according to the task execution number array after the sorting and merging operations, the task list is updated according to its transformation rules to generate a new task list.
[0016] In the second aspect, an embodiment of the present application provides a cluster task generation device based on unmanned aerial vehicle command and control software, the device comprising: a generation module, used to generate a task type layout file according to cluster task data rules and task type rules; a construction module, used to construct a task model containing all types of tasks in the cluster task requirements based on the task type layout file, and adjust the execution order of the current task through the task execution number of the corresponding task type in the task model; a creation module, used to generate a set of initial cluster task data according to the task type, and create a corresponding internal protocol data subset for each task type, wherein the internal protocol data subset is distinguished by an identifier; an update module, used to update the multidimensional array of the corresponding internal protocol data subset according to the task type and sequence number of the current task model, and add the current task model to the set of initial cluster task data, and after all task model data are added, clean up the empty elements in the set of initial cluster task data to obtain the final set of cluster task data; an execution module, used to generate a task list based on the final set of cluster task data according to the task execution purpose, and execute the cluster task in the order in which the task names are arranged in the task list.
[0017] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects: The embodiment of the present application provides a cluster task generation method based on unmanned aerial vehicle command and control software. By generating a task type layout file according to the cluster task data rule and the task type rule, the relationship between the task type and the task can be quickly and accurately defined. The task model constructed based on the task type layout file includes all types of tasks in the cluster task requirements, and each task model has a specific task execution number, which is convenient for adjustment and optimization during the task execution process, and improves the flexibility and customizability of task generation. The initial cluster task data set is classified according to the task type, and a corresponding internal protocol data subset is created for each task type, which is distinguished by an identifier to achieve refined management of task data. During the task execution process, the multidimensional array of the corresponding internal protocol data subset can be updated in real time according to the task type and sequence number of the current task model, ensuring the accuracy and consistency of the task data. The task list generated based on the final cluster task data set executes the tasks in the order of the task names, ensuring the order and logic of the task execution. At the same time, since the task models are independent of each other and the internal data do not interfere with each other, multiple tasks are supported to be executed simultaneously, which improves the efficiency and concurrent processing capability of task execution. The present application can add new task types or task models according to actual needs without large-scale modification of the existing system. The present application can flexibly respond to the needs of multi-task generation, and the method of re-planning tasks in real time according to changes in the external environment during task execution solves the problem in the prior art that it is impossible to simultaneously create multiple types of tasks and multiple tasks of the same type, resulting in the inability to re-plan the task in time when the drone encounters environmental changes during the task execution, thus causing the mission to fail. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flowchart of a cluster task generation method based on UAV command and control software provided in an embodiment of the present application; Figure 2 A schematic diagram of a cluster task generation device based on UAV command and control software provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0021] The following describes some of the techniques involved in the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, some descriptions of well-known functions and structures are omitted in the following description.
[0022] The present application embodiment provides a cluster task generation method based on UAV command and control software, such as Figure 1 As shown, the method includes steps S101 to S105. Among them, Figure 1 This is only an execution order shown in the embodiment of the present application, and does not represent the only execution order of a cluster task generation method based on UAV command and control software. In the case that the final result can be achieved, Figure 1 The steps shown may be performed in parallel or reversed.
[0023] S101: Generate a task type layout file according to cluster task data rules and task type rules.
[0024] According to the cluster task data rules and task type rules, a task type layout file is generated, including: the task type layout file includes a take-off task layout file, a search task layout file, a strike task layout file and a return task layout file. The task data of the task type layout file includes external data and internal protocol data.
[0025] Specifically, cluster task data rules define the data structures, i.e., multidimensional arrays and contents, required for different types of tasks. These rules are usually divided based on task types and specify corresponding data sets for each type. The mission data is represented in the form of an array of n, where n represents the number of specific parameters, which can vary depending on the mission type. For example, the takeoff mission layout file defines a multidimensional array for the takeoff phase (takeoff) as takeoffDataSum. The search mission layout file defines a multidimensional array for the search phase (search) as areaDataSum. The strike mission layout file defines a multidimensional array for the strike phase (strike) as targetDataSum. The return mission layout file defines a multidimensional array for the return phase (return) as returnSum. Mission type rules define the possible mission types in the cluster and how they are identified. These rules ensure that each mission type can be uniquely identified and associated with the corresponding data set. For example, each mission type has a unique identifier, such as takeoff, search, strike, and return.
[0026] Specifically, external data is mainly used for information such as task display status, task phase name, and task execution number. Among them, the task phase name and task execution number are used to generate task lists in order to manage and track tasks, while the display status is used to determine whether this type of task needs to be displayed in the system. Internal protocol data is specific to different task types. They contain specific information and instructions required during task execution to ensure that the task can proceed as expected. The command and control platform can modify and adjust the external data and internal protocol data accordingly according to the purpose of task execution to adapt to different task requirements and scenarios.
[0027] S102: Based on the task type layout file, a task model including all types of tasks in the cluster task requirements is constructed, and the execution order of the current tasks is adjusted according to the task execution numbers of the corresponding task types in the task model.
[0028] Based on the task type layout file, a task model containing all types of tasks in the cluster task requirements is constructed, including: introducing the task layout defined in various task layout files in the form of identifiers, the task layout constitutes the framework of the task model, introducing the task layout defined in various task layout files in the form of identifiers, the task layout constitutes the framework of the task model, the task layout represents a specific task type, and the task type is assigned an identifier. According to the current task requirements, the corresponding task type is selected through the preset judgment rules to construct a task model containing all types of tasks in the cluster task requirements. The preset judgment rule is: in a task model, at the same time, only one task type's identifier display status is true, and the identifier display status of all other task types is false to ensure the uniqueness of the task type.
[0029] Specifically, the identifier (ID) is not only used to distinguish different task types, but also used as an index to access and modify parameters in various tasks. When building a task model, the corresponding task type is selected according to the current task requirements through preset judgment rules. The core of the preset judgment rules is to ensure the uniqueness of the task type. In order to implement the preset judgment rules, a mutually exclusive relationship is used in the task model to handle the display status of the task type identifier. Specifically, if the identifier index display status of a certain task type in the task model is true, then the identifier index display status of all other task types in the task model will be automatically set to false. This mutually exclusive relationship ensures that in a task model, there is only one form of representation of the task type, thereby avoiding conflicts and confusion between task types.
[0030] The execution order of the current task is adjusted by the task execution number of the corresponding task type in the task model, including: when the identifier display state of a certain task type in the task model is true, the task type is selected for execution, and the task execution number under the task type is adjustable. When the identifier display state of a certain task type in the task model is false, the task type is not selected for execution, and the task execution number under the task type is not adjustable.
[0031] Specifically, each task type has a unique identifier, and the identifier is associated with a task execution number. By adjusting these task execution numbers, the execution order of tasks can be flexibly changed. When the identifier of a task type in the task model shows a true status, it means that the task type is selected for execution. In this case, the task execution numbers under this task type can be adjusted so that their execution order can be rearranged as needed. On the contrary, if the identifier of a task type in the task model shows a false status, it means that the task type is not selected for execution, so the task execution numbers under it are not adjustable. It is worth noting that the minimum value of the task execution number is 1, which represents the first order of task execution.
[0032] In addition, the task execution number can be repeated in the model, which means that different tasks under the same task type can have the same execution number, but they will still be carried out in the adjusted order when actually executed. If the task execution numbers are the same, it means that the task can be executed simultaneously by different drones. This application assigns a specific serial number to each task model to distinguish different task models. These serial numbers are incremented from zero to ensure that each model has a unique serial number. Since the serial number of each task model is different, this makes each task model unique in the system. This design not only facilitates the management and identification of task models, but also ensures the independence between task models. Specifically, each model has its own independent internal data and configuration, and they do not interfere with each other, thereby ensuring the stability and reliability of the system.
[0033] S103: Generate a set of initial cluster task data according to the task type, and create a corresponding internal protocol data subset for each task type, where the internal protocol data subset is distinguished by an identifier.
[0034] S104: Update the multidimensional array of the corresponding internal protocol data subset according to the task type and sequence number of the current task model, and add the current task model to the set of initial cluster task data. After all task model data are added, clean up the empty elements in the set of initial cluster task data to obtain the final set of cluster task data.
[0035] Adding the current task model to the set of initial cluster task data includes: adding the current task model to the set of initial cluster task data and updating the multidimensional array in the internal protocol data subset. Ensure that the length of the multidimensional array in the internal protocol data subset of each task type matches the total number of current task models. If the total number of current task models changes, adjust the length of the multidimensional array accordingly.
[0036] Update the multidimensional array in the internal protocol data subset, including: locating the corresponding internal protocol data subset according to the task type of the current task model. In the multidimensional array of the subset, find the subscript position that matches the serial number of the current task model in the set of initial cluster task data. The serial number is used to uniquely identify each task model and serves as an index in the multidimensional array. Add the data of the current task model to the array element corresponding to the found subscript position. Update the array element to the relevant data of the current task model. For internal protocol data subsets of other task types, ensure that the array elements with corresponding subscripts in their multidimensional arrays remain empty.
[0037] Specifically, the set of initial cluster task data contains relevant information of all task types, and the internal protocol data of each task type is regarded as a subset of the set, namely the internal protocol data subset. In order to distinguish different internal protocol data subsets, English identifiers are used as their unique identifiers.
[0038] In a specific embodiment, the present application further refines the process of constructing the set of initial cluster task data. Specifically, the internal protocol data subset of each task type is in the form of a multidimensional array. In the form of Represents the total number of task models. This multidimensional array design makes it easy to store and access the data of all task models under each task type. The following steps were followed when constructing these multidimensional arrays. 1. Different internal protocol data subsets are distinguished according to the English identifier of the task type. 2. For each internal protocol data subset, create a multidimensional array of length N, where N is equal to the total number of task models. 3. According to the task type and sequence number of each task model, update the multidimensional array of the internal protocol data subset.
[0039] S105: Based on the final set of cluster task data, a task list is generated according to the task execution purpose, and cluster tasks are executed according to the order in which the task names are arranged in the task list.
[0040] Based on the final set of cluster task data, a task list is generated according to the purpose of task execution, and cluster tasks are executed in the order of task names in the task list, including: constructing a task execution number array according to the task execution numbers of all task models. The subscript of the task execution number array is the current sequence number of the task model in the final set of cluster task data. The task execution number array is sorted, and the same elements in the task execution number array are merged, and these same elements represent tasks that need to be executed simultaneously. A task list is generated based on the sorted and merged task execution number array. The task names in the task list are arranged according to the transformation rules of the task execution number array, so that cluster tasks are executed in the order of task names in the task list.
[0041] The application also includes: according to the needs of emergencies during the execution of cluster tasks, the model tasks in the model list are deleted to generate a new model list, cluster task data and task list. The model list is a collection of all task models.
[0042] According to the needs of emergencies during the execution of cluster tasks, the model tasks in the model list are deleted to generate a new model list, cluster task data and task list, including: deleting the data and serial number of the current task model from the model list to generate a new model list. If there are other task models after the deleted task model, these models are moved forward to the position of the deleted task, and their serial numbers are updated in sequence to continuous serial numbers. If there are no other task models after the deleted task model, the model list remains unchanged. According to the task type and serial number of the currently deleted task model, the corresponding internal protocol data subset is found in the final cluster task data set. The elements matching the serial number of the deleted task model in the multidimensional array are deleted from the internal protocol data subset, and the empty elements in the subset are cleared to generate new cluster task data. According to the serial number of the deleted task model, the corresponding elements are deleted from the task execution number array. The task execution number array is sorted and merged to process the order changes or repeated elements caused by deleting the task model. According to the task execution number array after the sorting and merging operations, the task list is updated according to its transformation rules to generate a new task list.
[0043] An embodiment is listed below to illustrate the above steps of the present application. Of course, other embodiments are also possible, and the present application is not limited to this embodiment.
[0044] Step 1: According to the interface document of the takeoff phase, the takeoff protocol data sendTakeoff needs to be generated. The takeoff protocol data is internal protocol data. This data contains various parameters required for takeoff, such as takeoff speed, takeoff altitude, takeoff direction, etc. These parameters will be used to guide the takeoff action of the drone. Through programming means, read the definition in the interface document and build the structure of the takeoff protocol data accordingly. This data will be used as a data packet or object for subsequent communication and command sending. According to the Quick implementation method, the takeoff task layout file takeoff.qml needs to be generated. This file defines the user interface layout of the takeoff phase, including key information such as phase number, display status, and task execution number. In the takeoff.qml file, define the attribute droneIdTask for storing and displaying the phase number of the current takeoff task. This number is used to distinguish different takeoff tasks or phases. Define the attribute takeoffState for displaying the display status of the takeoff phase. Define the attribute taskID for storing and displaying the task execution number of the current takeoff task. The task execution number is used to track and record the execution of the task.
[0045] Step 2: According to the interface document of the search phase, the search protocol data sendSearch needs to be generated. This data contains all the parameters required to perform the search task, such as search range, speed, etc. This data structure will be used for subsequent communication and command sending to start and execute the search task. Generate the search task layout file search.qml to define the user interface layout of the search task. In search.qml, three key attributes are defined: droneIdTask (phase number), searchState (display status of the search phase) and taskID (task execution number).
[0046] Step 3: According to the interface document of the strike phase, the strike protocol data sendStrike needs to be generated. This data contains all the parameters required to execute the strike mission, including the location of the strike target, the strike intensity, the strike mode, etc. Generate the strike mission layout file strike.qml to define the user interface layout of the strike mission. In strike.qml, three key attributes are defined: droneIdTask (the phase number of the strike phase), strikeState (display status) and taskID (task execution number).
[0047] Step 4: According to the interface document of the return phase, the return protocol data sendReturn needs to be generated. This data contains all the parameters and conditions required for the drone to perform the return operation, including the current position of the drone, the coordinates of the return point, the return speed and the return altitude. Generate the return task layout file return.qml to define the user interface layout of the return task. In sendReturn, three key attributes are defined: droneIdTask (phase number), returnState (display status of the return phase) and taskID (task execution number).
[0048] Step 5: Based on the task type layout file, build a task model that includes all types of tasks in the cluster task requirements.
[0049] Step 5.1: In accordance with a specific ID format, introduce qml files of all types of tasks into the mission model model_Mission. Specifically, the takeoff mission layout file takeoff.qml is marked as id_takeoff. The search mission layout file search.qml is marked as id_search. The strike mission layout file strike.qml is marked as id_strike. And the return mission layout file return.qml is marked as id_return. The mission model model_Mission contains the four core mission stages of this application: takeoff, search, strike and return. Each time a mission model model_Mission is established, it is equivalent to instantiating these four mission stages, that is, creating independent copies of each of them in the mission model. It is important that the various mission stages in each mission model model_Mission are independent of each other, which means that they can be configured and executed independently without interfering with each other. Index, as the serial number or serial number of model_Mission, is a built-in attribute used to uniquely identify each mission model.
[0050] Step 5.2: In the fixed area to the right of the task model model_Mission, a delete operation function is set. When this delete operation is triggered, the remove(index) method (a delete method) of the task model model_Mission will be called to remove the task model with the currently specified index index, i.e., the serial number.
[0051] Step 5.3: Outside model_Mission, the task name taskName and the task sequence missionOrder are defined. These two properties can be modified according to external requirements to flexibly adjust the configuration of the mission model. At the same time, in order to store and manage various mission data, multiple data storage arrays, i.e. multidimensional arrays, are also defined: takeoffDataSum is used to store data in the takeoff phase, areaDataSum is used to store data in the search area, targetDataSum is used to store target strike data, and returnSum is used to store data in the return phase.
[0052] Step 6: Generate a layout file addTask.qml specifically for adding subtasks according to the take-off phase, search phase, strike phase, and return phase included in the mission type of this application. This file will allow the operator to add a specific mission model model_Mission for each phase or each type of mission in the drone cluster mission according to mission requirements, and set the corresponding parameters.
[0053] Takeoff: After the operator triggers the takeoff phase, add a new model_Mission in step 5. In this model_Mission, set the takeoffState of id_takeoff to true, indicating that the takeoff phase is active, and set the states of other mission phases to false. Set taskName to "takeoff" plus the value of droneIdTask of id_takeoff in model_Mission, incrementing droneIdTask each time the takeoff phase is triggered. The operator sets the parameters of id_takeoff and generates a new takeoff instruction sendTakeoff. Update takeoffDataSum[index] to sendTakeoff and update the missionOrder[index] to the taskID of the current mission.
[0054] Search phase: After the operator triggers the search phase, also add a new model_Mission in step 5. Set the searchState of id_search (search phase identifier) to true, and the other mission phase states to false. Set taskName (task name) to "search phase" plus the value of droneIdTask (the value of the drone mission identifier) of id_search in model_Mission. The operator sets the parameters of id_search and generates a new search instruction sendSearch. Update areaDataSum[index] (search instruction set) to sendSearch, and update missionOrder[index] (task sequence) to the taskID (identifier) of the current mission.
[0055] Strike phase: After the operator triggers the strike phase, add a new model_Mission. Set the strikeState of id_strike (strike phase identifier) to true. The other mission phase states are false. Set taskName (task name) to "strike phase" plus the droneIdTask value of id_strike (the value of the drone mission identifier). The operator sets the parameters of id_strike and generates a new strike command sendStrike. Update targetDataSum[index] (strike command set) to sendStrike, and update missionOrder[index] (task sequence) to the taskID (identifier) of the current mission.
[0056] Return phase: After the operator triggers the return phase, add a new model_Mission. Set the returnState of id_return (return phase identifier) to true, and the other mission phase states to false. Set taskName to "return phase" plus the droneIdTask value of id_return (the value of the drone mission identifier). The operator sets the parameters of id_return and generates a new return instruction sendReturn. Update returnSum[index] (return instruction set) to sendReturn, and update missionOrder[index] (task sequence) to the taskID (identifier) of the current task.
[0057] Step 7: Cluster task generation, taking the generation of 6 cluster tasks of takeoff phase 1, search phase 1, search phase 2, strike phase 1, strike phase 2, and return phase 1 as an example. The order of task execution is to execute takeoff phase 1 first, then execute search phase 1 and strike phase 1 simultaneously, then execute search phase 2 and strike phase 2 simultaneously, and finally execute return phase 1. Use external data to define cluster task parameters clusterTaskData. ClusterTaskData is in Json data format. The internal protocol data contains key values corresponding to the four task phases. Each type of task data storage array, takeoffDataSum (array for storing takeoff phase task data), areaDataSum (array for storing search phase task data), targetDataSum (array for storing strike phase task data), returnSum (array for storing return phase task data) are stored in the corresponding key values. Since each task type has its own independent array to store data, this actually creates a corresponding internal protocol data subset for each task type. clusterTaskData and its internal four arrays (takeoffDataSum, areaDataSum, targetDataSum, returnSum) together represent the collection of initial cluster task data.
[0058] Step 7.1: Takeoff phase 1 is generated. index is 0 (indicating the position in the task array). Task data takeoffDataSum[index] = sendTakeoff (takeoff instruction). taskID is 1 (unique identifier of the task). Task sequence missionOrder[index] = 1 (indicating that takeoff phase 1 is the first task).
[0059] Step 7.2: Search phase 1 is generated. index is 1. Task data areaDataSum[index] = sendSearch (search instruction). taskID is 2. Task sequence is updated: missionOrder[index] = 2 (indicates that search phase 1 is the second task).
[0060] Step 7.3: Search phase 2 is generated. index is 2. Mission data areaDataSum[index] = sendSearch. taskID is 3. missionOrder[index] = 3 (indicates that search phase 2 is the third mission).
[0061] Step 7.4: Strike Phase 1 is generated. index is 3. Mission data targetDataSum[index] = sendStrike (strike command). taskID is 2. Although 2 is repeated here (same as search phase 1), it should be considered as a different task in missionOrder. Since search phase 1 and strike phase 1 need to be executed at the same time, strike phase 1 should be immediately after search phase 1 in missionOrder. missionOrder[index] = 2 (indicates simultaneous execution with search phase 1).
[0062] Step 7.5: Strike phase 2 is generated. index is 4. Mission data targetDataSum[index]=sendStrike. taskID is 3. missionOrder[index]=3 (indicates simultaneous execution with search phase 2).
[0063] Step 7.6: Return phase 1 is generated. Index is 5. Mission data returnSum[index]=sendReturn (return command). taskID is 4. missionOrder[index]=4 (indicates the last mission).
[0064] It should be noted that taskID is used for identification within the task data, while missionOrder defines the execution order of the tasks.
[0065] Step 7.7: Update the multidimensional array corresponding to the internal protocol data subset. Perform null processing on the takeoffDataSum, areaDataSum, targetDataSum, and returnSum arrays, that is, remove unused or blank task data. Update clusterTaskData and store the processed task data, that is, the array after null processing, into the corresponding key values. clusterTaskData["takeoff"]=takeoffDataSum (store the data of the takeoff phase in the takeoff field of clusterTaskData). clusterTaskData["search"]=areaDataSum (store the data of the search phase in the search field of clusterTaskData). clusterTaskData["strike"]=targetDataSum (store the data of the strike phase in the strike field of clusterTaskData). clusterTaskData["return"]=returnSum (store the data of the return phase in the strike field of clusterTaskData).
[0066] Step 7.8: Generate and sort the cluster mission list. Sort the missionOrder to reflect the actual execution order. The sorting result is missionOrder = [1,2,2,3,3,4], which means that after takeoff, search 1 and strike 1 are executed simultaneously, then search 2 and strike 2 are executed simultaneously, and finally return. Convert the numbers in missionOrder to the corresponding mission phase identifiers to generate the final mission list. missionOrder = [takeoff phase 1, search phase 1, strike phase 1, search phase 2, strike phase 2, return phase 1].
[0067] Step 7.9: Task execution. The command and control software feeds back the sorted missionOrder and updated clusterTaskData to the UAV system flight control unit through data communication. The UAV system flight control unit executes the task according to the missionOrder and cluster task data clusterTaskData.
[0068] Step 8: Cluster task deletion. Taking the deletion of search task 2 as an example, the deletion operation of search 2 in the cluster task layout is triggered, and the remove (index) of model_Mission is triggered to remove the model of the current index. At the same time, areaDataSum.pop[index] generates a new areaDataSum, that is, the pop method of the areaDataSum array is called and the index index is passed in to remove the element at the index position from the array. The pop method will modify the original array while removing the element so that it no longer contains the removed element. Generating a new areaDataSum actually means that the areaDataSum array becomes a new array state after removing an element, that is, it now contains all other elements except the removed element. missionOrder.pop[index] generates a new missionOrder, that is, by calling the pop method of the missionOrder array and passing in the index index, the element at the index position is removed from the array, thereby generating a new missionOrder array state. Update clusterTaskData according to step 7.7, and update missionOrder according to step 7.8. Execute step 7.9 again.
[0069] The present application embodiment also provides a cluster task generation device 200 based on UAV command and control software, such as Figure 2 As shown, the device includes: a generation module 201, a construction module 202, a creation module 203, an update module 204 and an execution module 205.
[0070] The generation module 201 is used to generate a task type layout file according to the cluster task data rule and the task type rule.
[0071] The construction module 202 is used to construct a task model including all types of tasks in the cluster task requirements based on the task type layout file, and adjust the execution order of the current tasks according to the task execution number of the corresponding task type in the task model.
[0072] The creation module 203 is used to generate a set of initial cluster task data according to the task type, and to create a corresponding internal protocol data subset for each task type, where the internal protocol data subset is distinguished by an identifier.
[0073] The update module 204 is used to update the multidimensional array of the corresponding internal protocol data subset according to the task type and sequence number of the current task model, and add the current task model to the set of initial cluster task data. After all task model data are added, the empty elements in the set of initial cluster task data are cleaned up to obtain the final set of cluster task data.
[0074] The execution module 205 is used to generate a task list based on the final set of cluster task data and the task execution purpose, and execute the cluster tasks according to the order in which the task names are arranged in the task list.
[0075] Some modules in the apparatus described in the present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0076] The devices or modules described in the above application embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described in various modules according to their functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, the module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0077] The methods, devices or modules described in this application can be implemented in the form of computer-readable program codes. The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (English: Application Specific Integrated Circuit, referred to as: ASIC), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program codes, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included in it for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0078] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, or it can be reflected in the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the method described in the embodiment of the present application.
[0079] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations.
[0080] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.
Claims
1. A cluster task generation method based on UAV command and control software, characterized in that: include: Generate a task type layout file according to cluster task data rules and task type rules; Based on the task type layout file, a task model containing all types of tasks in the cluster task requirements is constructed, and the execution order of the current tasks is adjusted according to the task execution number of the corresponding task type in the task model; Generate a set of initial cluster task data according to the task type, and create a corresponding internal protocol data subset for each task type, wherein the internal protocol data subset is distinguished by an identifier; According to the task type and sequence number of the current task model, the multidimensional array of the corresponding internal protocol data subset is updated, and the current task model is added to the set of initial cluster task data. After all task model data are added, the empty elements in the set of initial cluster task data are cleaned to obtain the final set of cluster task data; Based on the final set of cluster task data, a task list is generated according to the task execution purpose, and cluster tasks are executed in the order of task names in the task list.
2. The cluster task generation method based on UAV command and control software according to claim 1 is characterized in that: Also includes: According to the needs of emergencies during cluster task execution, the model tasks in the model list are deleted to generate a new model list, cluster task data and task list; wherein the model list is a collection of all task models.
3. The cluster task generation method based on UAV command and control software according to claim 1 is characterized in that: The generating of the task type layout file according to the cluster task data rule and the task type rule includes: The mission type layout files include takeoff mission layout files, search mission layout files, strike mission layout files and return mission layout files; The task data of the task type layout file includes external data and internal protocol data.
4. The cluster task generation method based on UAV command and control software according to claim 1 is characterized in that: The task model containing all types of tasks in the cluster task requirements is constructed based on the task type layout file, including: The task layout defined in various task layout files is introduced in the form of an identifier, wherein the task layout constitutes the framework of the task model, the task layout represents a specific task type, and the task type is assigned an identifier; According to the current task requirements, the corresponding task type is selected through preset judgment rules, and a task model that includes all types of tasks in the cluster task requirements is constructed; The preset judgment rule is: in a task model, at the same time, only one task type's identifier display status is true, and all other task types' identifier display status are false.
5. The cluster task generation method based on UAV command and control software according to claim 4 is characterized in that: The step of adjusting the execution order of the current tasks by the task execution number corresponding to the task type in the task model includes: When the identifier of a task type in the task model shows a true status, the task type is selected for execution, and the task execution number under the task type is adjustable; When the identifier display status of a task type in the task model is false, the task type is not selected for execution and the task execution number under this task type cannot be adjusted.
6. The cluster task generation method based on UAV command and control software according to claim 1 is characterized in that: The step of adding the current task model to the set of initial cluster task data includes: Add the current task model to the set of initial cluster task data and update the multidimensional array in the internal protocol data subset; Ensure that the length of the multidimensional array in the internal protocol data subset of each task type matches the total number of current task models; If the total number of current task models changes, the length of the multidimensional array is adjusted accordingly.
7. The cluster task generation method based on UAV command and control software according to claim 6 is characterized in that: The multidimensional array in the updating internal protocol data subset includes: According to the task type of the current task model, locate the corresponding internal protocol data subset; In the multidimensional array of the subset, find the subscript position that matches the serial number of the current task model in the set of initial cluster task data; the serial number is used to uniquely identify each task model and serves as an index in the multidimensional array; Add the data of the current task model to the array element corresponding to the found subscript position; Update the array elements to the relevant data of the current task model; For the internal protocol data subsets of other task types, ensure that the array elements with corresponding subscripts in their multidimensional arrays remain empty.
8. The cluster task generation method based on UAV command and control software according to claim 1 is characterized in that: The method of generating a task list based on the final cluster task data set according to the task execution purpose, and executing the cluster tasks in the order in which the task names are arranged in the task list, includes: According to the task execution numbers of all task models, construct a task execution number array; The subscript of the task execution number array is the current sequence number of the task model in the set of final cluster task data; Sort the task execution number array and merge the same elements in the task execution number array. These same elements represent tasks that need to be executed simultaneously. Generate a task list based on the sorted and merged task execution number array; The task names in the task list are arranged according to the transformation rule of the task execution number array, so as to execute the cluster tasks according to the arrangement order of the task names inside the task list.
9. The cluster task generation method based on UAV command and control software according to claim 2 is characterized in that: According to the requirements of emergencies during cluster task execution, the model tasks in the model list are deleted to generate a new model list, cluster task data and task list, including: Delete the data and serial number of the current task model from the model list to generate a new model list; If there are other task models after the deleted task model, move these models forward to the position of the deleted task, and update their sequence numbers to consecutive sequence numbers in turn; If there is no other task model after the deleted task model, keep the model list unchanged; According to the task type and sequence number of the currently deleted task model, find the corresponding internal protocol data subset in the final cluster task data set; Deleting the elements in the multidimensional array that match the sequence number of the deleted task model from the internal protocol data subset, and clearing the empty elements in the subset to generate new cluster task data; According to the sequence number of the deleted task model, delete the corresponding element from the task execution number array; Sort and merge the task execution number array to handle order changes or duplicate elements caused by deleting task models; According to the task execution number array after the sorting and merging operations, the task list is updated according to its transformation rule to generate a new task list.
10. A cluster task generation device based on UAV command and control software, characterized in that: include: A generation module, used to generate a task type layout file according to cluster task data rules and task type rules; The construction module is used to build a task model containing all types of tasks in the cluster task requirements based on the task type layout file, and adjust the execution order of the current tasks according to the task execution number of the corresponding task type in the task model; A creation module, used to generate a set of initial cluster task data according to the task type, and to create a corresponding internal protocol data subset for each task type, wherein the internal protocol data subset is distinguished by an identifier; An update module, used to update the multidimensional array of the corresponding internal protocol data subset according to the task type and sequence number of the current task model, and add the current task model to the set of initial cluster task data. After all task model data are added, the empty elements in the set of initial cluster task data are cleaned to obtain the final set of cluster task data; The execution module is used to generate a task list based on the final set of cluster task data and the purpose of task execution, and execute cluster tasks according to the order in which the task names are arranged in the task list.