Search

CN-116414671-B - Unmanned aerial vehicle flight control computer distributed test method and device based on DAG

CN116414671BCN 116414671 BCN116414671 BCN 116414671BCN-116414671-B

Abstract

The invention discloses a DAG-based unmanned aerial vehicle flight control computer distributed test method. Step 1, building a distributed test system, step 2, building a DAG task scheduling model based on the distributed test system in step 1, step 3, performing static allocation before scheduling based on the DAG task scheduling model in step 2, and step 4, realizing dynamic scheduling based on the DAG task scheduling model in step 2 and the allocated static state. The method is used for solving the problems that the current unmanned aerial vehicle semi-physical simulation test platform test case scheduling is easily affected by the node state and uneven node resource allocation is easily caused.

Inventors

  • YANG JINGLI
  • WEI CHANGAN
  • ZHANG YUFAN

Assignees

  • 哈尔滨工业大学

Dates

Publication Date
20260505
Application Date
20211227

Claims (7)

  1. 1. The unmanned aerial vehicle flight control computer distributed test method based on the DAG is characterized by comprising the following steps of Step 1, building a distributed test system; step 2, based on the distributed test system in the step 1, constructing a DAG task scheduling model; step 3, based on the DAG task scheduling model in the step 2, static allocation before scheduling is carried out; Step 4, based on the DAG task scheduling model in the step 2 and the allocated static state, realizing dynamic scheduling; the construction of the DAG task scheduling model of step 2 specifically includes the following steps, Assuming that a distributed test system comprises N test nodes, and a test task to be distributed comprises M test cases; The test tasks to be distributed are expressed as Wherein T is the vertex set in the task set E is a set of directed edges R is the set of execution times of the fixed point task W is the set of timing overheads between test cases ; Assuming that the communication cost between tasks distributed on the same processing core is zero, after one task is executed, transmitting newly generated data to all subsequent nodes of the task; The target f of task scheduling is represented as follows Max which is required to be met by a task scheduling target f is the utilization rate of system resources, and min is the total running time of the system; the static allocation of step3 comprises in particular the steps of, Step 3.1, generating a test case by using a DAG task scheduling model, namely forming a test case database; Step 3.2, extracting a test case set to be tested from the test case database in the step 3.1; Step 3.3, analyzing each test case based on the test case set to be tested in the step 3.2; Step 3.4, screening and dividing the test cases analyzed in the step 3.3 for the first time; step 3.5, forming a classification subset based on the screening and dividing of step 3.4 The size of the corresponding classification subset is ; Step 3.6 based on roulette wheel algorithm from subset of step 3.5 Respectively selects the scale quantity as The test case composition set of (1) to obtain a first test case entity set , ,.... ; Step 3.7, evaluating the integrity of the test case by adopting a formula (1), ...........................................(1) Wherein the method comprises the steps of For the integrity of the ith test case, For the real sum of the descriptors of the integrity factor, For the maximum value of the degree of descriptive of the integrity factor, The method comprises the steps of setting a proportion parameter for a user; Step 3.8, evaluating the complexity of the test case by adopting a formula (2), ...........................................(2) Wherein the method comprises the steps of Representing the integrity of the ith test case, The real sum representing the descriptive degree of the complexity factor, Representing the maximum value of the descriptive degree of the complexity factor, The method comprises the steps of setting a proportion parameter for a user; step 3.9, evaluating the priority of the test cases by adopting a formula (3), ...................................(3) Wherein the method comprises the steps of , Representing the i-th test case requirement integrity and requirement complexity respectively, , Weights respectively representing test case requirement integrity and requirement complexity; Step 3.10, screening the test cases for the second time, and sorting the test cases in the set according to the principle that the higher the priority is, the more preferentially selected, so as to form a second batch of test case entity sets; And 3.11, distributing the test tasks, and distributing the divided tasks to each node by using a non-preemptive distribution strategy under the condition that the test nodes are deployed.
  2. 2. The method is characterized in that the step 1 is used for building a distributed test system, specifically, a plurality of test nodes are connected with a management node through buses, test cases are input through intranet buses and distributed and scheduled through execution engines of all the test nodes, a reasonable number of test cases are distributed for each test node, and timing synchronization is always kept among all the test nodes through a communication strategy.
  3. 3. The distributed test method of unmanned aerial vehicle flight control computer based on DAG according to claim 2, wherein when a certain test node in the system test system fails, the execution engines of the rest test nodes immediately adjust the scheduling method of the test cases; And after the failed test node is recovered, a synchronous signal is requested to the intranet, so that the states of all the test nodes in the current system are synchronized, and the state of the whole system is recovered.
  4. 4. The method for distributed testing of unmanned aerial vehicle flight control computers based on DAG according to claim 1, wherein the dynamic scheduling in step 4 is specifically, Step 4.1, initializing pheromone by an ant colony algorithm; step 4.2, selecting test cases for the ant colony based on the pheromone of step 1 Finding in TDD Is dependent on (2) ; Step 4.3 if step 4.2 If the test node exists and has been allocated, go to step 4.4, if If the test node does not exist and is not distributed, performing step 4.5; step 4.4 of Distribution and distribution The same test node; step 4.5, constructing a solution; step 4.6, updating the local pheromone of the test node based on the step 4.4 and the step 4.5; step 4.7, updating the test case pheromone based on the step 4.6; step 4.8, repeating the steps 4.2-4.7 until all test cases are distributed with test nodes; Step 4.9, calculating whether the test node allocated by the test case in the step 4.8 is optimal, if so, performing the step 4.10, and if not, returning to the step 4.2 to perform the ant colony algorithm again; Step 4.10, updating the shortest execution time of the test case; Step 4.11, updating the global pheromone of the test node based on the result of the step 4.10; Step 4.12, checking whether the iteration condition is satisfied, if not, returning to step 4.6, and if so, performing step 4.13; and 4.13, outputting the test case allocation condition of the test node.
  5. 5. The unmanned aerial vehicle flight control computer distributed test apparatus of claim 3, wherein the test apparatus comprises a plurality of test nodes and management nodes, The test node is used for processing the test cases and outputting the processing results to the unmanned aerial vehicle flight control computer; And the implementation management node is used for monitoring the states of all the test nodes, ensuring the time sequence synchronization among the test nodes and carrying out static allocation and dynamic scheduling on the test cases.
  6. 6. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1-4 when the computer program is executed by the processor.
  7. 7. A non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the method according to any of claims 1-4.

Description

Unmanned aerial vehicle flight control computer distributed test method and device based on DAG Technical Field The invention belongs to the field of testing, and particularly relates to a DAG-based unmanned aerial vehicle flight control computer distributed testing method. Background The unmanned aerial vehicle flight control computer is a strong real-time embedded system with higher complexity, not only comprises a software system composed of flight control software, an operating system and the like, but also comprises a hardware circuit composed of a high-performance processor, an optical fiber communication chip and the like, and has strict constraint on combination logic and sequential logic during the coordination operation of software and hardware in the working process. Especially, the method is very important for the near unmanned aerial vehicle with the characteristics of long working period, complex and changeable working environment and the like, and the flight control computer is fully tested in the development stage. In the unmanned aerial vehicle test system, the situation that constraint relations exist among values of the same sensor parameters and different sensor parameters exists greatly, generated test excitation data are invalid even test coverage rate is reduced due to the fact that constraint conditions are ignored, an unmanned aerial vehicle flight control computer has strict time sequence requirements on multi-task scheduling of the system, different processing results are caused by different parameter input sequences and the same value input of the same parameter at different moments, if a single test node is used for processing the same, and the single-machine test mode is often dependent on the upper limit of a test tool, so that the requirement of the unmanned aerial vehicle test system on test performance cannot be met completely. Disclosure of Invention The invention provides a distributed test method of an unmanned aerial vehicle flight control computer based on a DAG (digital access gateway), which is used for solving the problems that the existing unmanned aerial vehicle semi-physical simulation test platform is susceptible to node state and uneven node resource allocation is caused when test cases are scheduled, namely solving the problems that the unmanned aerial vehicle flight control computer is strict in combination logic and sequential logic constraint and difficult to process. The invention provides a DAG-based unmanned aerial vehicle flight control computer distributed testing device. The invention provides a computer device. The present invention provides a non-transitory computer readable storage medium. The invention is realized by the following technical scheme: a DAG-based unmanned aerial vehicle flight control computer distributed test method, the distributed test method comprising the steps of: Step 1, building a distributed test system; step 2, based on the distributed test system in the step 1, constructing a DAG task scheduling model; step 3, based on the DAG task scheduling model in the step 2, static allocation before scheduling is carried out; and 4, based on the DAG task scheduling model and the allocated static state in the step 2, realizing dynamic scheduling. Furthermore, the step 1 builds a distributed test system, specifically, a plurality of test nodes are connected with a management node through buses, test cases are input through intranet buses and distributed and scheduled through execution engines of all the test nodes, and all the test nodes keep timing synchronization all the time through a communication strategy. Further, when a certain test node in the system test system fails, the execution engines of the rest test nodes immediately adjust the scheduling method of the test cases; And after the failed test node is recovered, a synchronous signal is requested to the intranet, so that the states of all the test nodes in the current system are synchronized, and the state of the whole system is recovered. Further, the construction of the DAG task scheduling model in the step 2 specifically comprises the following steps, Assuming that a distributed test system comprises N test nodes, and a test task to be distributed comprises M test cases; The test tasks to be distributed are expressed as G= (T, E, R, W), wherein T is a vertex set { T i } in a task set, E is a set of directed edges { E i }, R is a set of execution time of a fixed point task { R i }, and W is a set of time sequence overheads between test cases { W i }; Assuming that the communication cost between tasks distributed on the same processing core is zero, after one task is executed, transmitting newly generated data to all subsequent nodes of the task; The target f of task scheduling is represented as follows f:{Ti}→{Ci},i=0,1,2,...,j=0,1,2,... Max which is required to be met by the target f of task scheduling is the utilization rate of system resources, and min is the total runni