Search

CN-121979529-A - Distributed calculation and compiling method and device for flight control software

CN121979529ACN 121979529 ACN121979529 ACN 121979529ACN-121979529-A

Abstract

The invention provides a distributed calculation and compiling method and device of flight control software, wherein a main control node analyzes compiling dependency relations between each model and each manual code in a configuration item of the flight control software; the method comprises the steps of decomposing a model in a configuration item into a plurality of model calculation subtasks and distributing the model calculation subtasks, parallelly calculating the model calculation subtasks of all working nodes and automatically generating model codes, merging all model generation codes with manual codes in the same configuration item after the execution of all model calculation subtasks is finished to form compiling codes of the configuration item, decomposing the compiling codes of the configuration item into a plurality of code compiling subtasks and distributing the code compiling subtasks, parallelly executing the code compiling subtasks of all the working nodes, collecting partition executable target codes returned by all the working nodes by a main control node after the execution of all the code compiling subtasks is finished, and jointly compiling all partition executable target codes to form complete executable target codes of all the configuration items in flight control software.

Inventors

  • JI FENGCAI
  • ZHU LIPING
  • FENG LEI
  • WANG XIAORAN

Assignees

  • 中国航空工业集团公司西安飞行自动控制研究所

Dates

Publication Date
20260505
Application Date
20251224

Claims (9)

  1. 1. The distributed calculation and compiling method for the flight control software is characterized in that equipment for executing the method comprises a main control node and a working node, wherein a configuration file of the flight control software comprises at least one configuration item, and the method comprises the following steps: The method comprises the steps that 1, a master control node analyzes compiling dependency relations between each model and each manual code in a configuration item of flight control software based on a submitted configuration file of the flight control software, wherein each configuration item comprises at least one of a plurality of models and a plurality of manual codes; step 2, the master control node automatically creates and decomposes a plurality of model calculation subtasks for the models in each configuration item according to the analysis result of the compiling dependency relationship in each configuration item, and executes distribution of the distributed tasks so as to distribute the plurality of model calculation subtasks to a group of working nodes on a network; step 3, receiving the model calculation subtasks which are respectively distributed by each working node of the model calculation subtasks in parallel calculation, automatically generating codes corresponding to the model calculation subtasks, and returning an execution result to the main control node; step 4, after judging that the execution of all the model calculation sub tasks is finished, the master control node combines the model generation codes returned by the working node with the manual codes in the same configuration item to form a complete compiling code of the configuration item; Step 5, the master control node automatically creates and decomposes a plurality of code compiling subtasks for the complete compiling code formed by each configuration item according to the analysis result of the compiling dependency relationship in each configuration item, and executes the distribution of the distributed tasks so as to distribute the plurality of code compiling subtasks to a group of working nodes on a network; Step 6, each working node which receives the code compiling subtasks executes the code compiling subtasks allocated to each working node in parallel, and returns an execution result to the main control node; and 7, after judging that the execution of all code compiling subtasks is finished, the main control node collects partition executable target codes returned by all working nodes and performs joint compiling on all partition executable target codes to form complete executable target codes of all configuration items in the flight control software.
  2. 2. The method for distributed computation and compilation of flight control software according to claim 1, wherein in step2 and step 5, the master node performs distribution of distributed tasks, including: The main control node dynamically adjusts the allocation scheme of each model calculation subtask or each code compiling subtask according to the load and the use state of each working node, and particularly allocates each model calculation subtask or each code compiling subtask to an idle working node on a network, and the main control node simultaneously updates the running state of the working node of the allocated task and monitors.
  3. 3. The distributed computing and compiling method for flight control software according to claim 1, wherein, In the step 3, after each working node executes each model calculation subtask, the working node communicates with the main control node through a Remote Procedure Call (RPC) mechanism, and returns an inspection report of the model calculation subtask, a report of a model generation code and a task execution log; In the step 6, after each working node executes the respective code compiling subtask, the working node communicates with the main control node through a remote procedure call RPC mechanism, and returns a compiling log, a compiling product file and a partition executable target code of the code compiling subtask.
  4. 4. The method for distributed computation and compilation of flight control software according to claim 1, characterized in that said step4 is preceded by: Step 4a, the master control node updates the running state of each working node executing parallel computation, extracts the task execution log of the model computation subtask returned by each working node, and uses the model generation code as a basis for judging whether each model computation subtask is completed successfully or not; And 4b, when the master control node judges that the model calculation subtasks with the task execution failure exist, the corresponding working nodes are allocated to the model calculation subtasks with the execution failure again, and the calculation automatic generation codes are re-executed.
  5. 5. The method for distributed computation and compilation of flight control software according to claim 1, characterized in that said step 7 is preceded by: Step 7a, the master control node updates the running state of each working node executing parallel compiling, extracts the compiling log of the code compiling subtasks returned by each working node, extracts log keywords, and judges whether each code compiling subtask is completed or not; and 7b, when the main control node judges that the code compiling subtasks with the task execution failure exist, the corresponding working nodes are allocated to the code compiling subtasks with the execution failure again, and the code compiling is re-executed.
  6. 6. The device for performing the distributed calculation and compilation of the flight control software is characterized by comprising a main control node and a working node, wherein the main control node is used for executing the distributed calculation and compilation of the flight control software according to any one of claims 1-5; The master control node is used for analyzing the compiling dependency relationship between each model and each manual code in the configuration items of the flight control software based on the submitted configuration files of the flight control software, automatically creating and decomposing a plurality of model calculation subtasks for the models in each configuration item according to the analysis result of the compiling dependency relationship in each configuration item, and executing the distribution of distributed tasks so as to distribute the plurality of model calculation subtasks to a group of working nodes on a network, wherein each configuration item comprises at least one of a plurality of models and a plurality of manual codes; each working node of the model calculation subtask is received and used for parallelly calculating the model calculation subtask distributed to each working node, automatically generating codes corresponding to the model calculation subtask, and returning an execution result to the main control node; the master control node is also used for merging the model generation code returned by the working node with the manual code in the same configuration item after judging that the execution of all the model calculation sub tasks is finished to form a complete compiling code of the configuration item; The master control node is further configured to automatically create and decompose a plurality of code compiling sub-tasks for the complete compiling code formed by each configuration item according to an analysis result of the compiling dependency relationship in each configuration item, and execute distribution of the distributed tasks so as to distribute the plurality of code compiling sub-tasks to a group of working nodes on a network; Each working node receiving the code compiling subtasks is used for executing the code compiling subtasks allocated to each working node in parallel and returning an execution result to the main control node; And the main control node is also used for collecting partition executable target codes returned by each working node after judging that the execution of all code compiling subtasks is finished, and carrying out joint compiling on all partition executable target codes to form complete executable target codes of each configuration item in the flight control software.
  7. 7. The fly-control software distributed computing and compiling device of claim 6, wherein the working nodes comprise distributed model computing nodes and code compiling nodes; the model computing node is used for receiving and executing the code compiling subtasks under the dynamic scheduling of the main control node, automatically generating codes corresponding to the model computing subtasks and returning an execution result to the main control node; The code compiling node is used for receiving and executing the model calculation subtasks under the dynamic scheduling of the main control node and returning the execution results to the main control node.
  8. 8. The fly-control software distributed computing and compiling device of claim 7, wherein the master node performs distribution of distributed tasks, comprising: the main control node dynamically adjusts the distribution scheme of each model calculation subtask or each code compiling subtask according to the load and the use state of each model calculation node or each code compiling node, and particularly distributes each model calculation subtask or each code compiling subtask to idle model calculation nodes or code compiling nodes on a network, and the main control node updates the running state of the work node of the distributed task and monitors after one side distribution is completed.
  9. 9. The fly-control software distributed computing and compiling apparatus of claim 7 wherein, The main control node is responsible for managing various information generated by each working node in the calculation operation and compiling operation processes, including a check report of a model calculation subtask, a report of a model generation code and a task calculation subtask execution log, and compiling the compiling log, compiling a product file and a partition executable target code of a subtask by codes.

Description

Distributed calculation and compiling method and device for flight control software Technical Field The invention relates to the technical field of airborne flight control software development based on model design, in particular to a distributed calculation and compiling method and equipment of flight control software. Background The large-scale, multi-partition and multi-configuration-item complex flight control system software project based on model design faces the challenges of embedded airborne software development and large-scale complex software project in the process of realizing agile development, and meanwhile, the conditions of large-scale coupling integration of design model, model generation code and manual coding exist, so that model calculation and code compiling of complete software are difficult to realize within an acceptable limited time (30 minutes are generally considered to be a reasonable upper limit), and the calculation and compiling of the software are often as long as several hours, so that the efficiency is low. With the increase of the geometric level of the code scale of the flight control software project based on the model design, a large number of models are adopted for design, and model calculation, model generation code and code compiling of the flight control software need more huge calculation resources such as memories, CPUs, nodes and the like, so as to face increasingly huge software scale and problems. The existing serial model calculation and code compiling method has the problem that model calculation and code compiling work cannot be completed efficiently under the integrated scenes of multiple models and a large number of functional codes in complex flight control software. Disclosure of Invention The invention aims to provide a distributed calculation and compiling method and equipment for flight control software, which are used for solving the problem that model calculation and code compiling work cannot be completed efficiently under the integrated scene of multiple models and a large number of functional codes in complex flight control software. The technical scheme of the invention is that in a first aspect, the invention provides a distributed calculation and compiling method of flight control software, equipment for executing the method comprises a main control node and a working node, a configuration file of the flight control software comprises at least one configuration item, and the method comprises the following steps: The method comprises the steps that 1, a master control node analyzes compiling dependency relations between each model and each manual code in a configuration item of flight control software based on a submitted configuration file of the flight control software, wherein each configuration item comprises at least one of a plurality of models and a plurality of manual codes; step 2, the master control node automatically creates and decomposes a plurality of model calculation subtasks for the models in each configuration item according to the analysis result of the compiling dependency relationship in each configuration item, and executes distribution of the distributed tasks so as to distribute the plurality of model calculation subtasks to a group of working nodes on a network; step 3, receiving the model calculation subtasks which are respectively distributed by each working node of the model calculation subtasks in parallel calculation, automatically generating codes corresponding to the model calculation subtasks, and returning an execution result to the main control node; step 4, after judging that the execution of all the model calculation sub tasks is finished, the master control node combines the model generation codes returned by the working node with the manual codes in the same configuration item to form a complete compiling code of the configuration item; Step 5, the master control node automatically creates and decomposes a plurality of code compiling subtasks for the complete compiling code formed by each configuration item according to the analysis result of the compiling dependency relationship in each configuration item, and executes the distribution of the distributed tasks so as to distribute the plurality of code compiling subtasks to a group of working nodes on a network; Step 6, each working node which receives the code compiling subtasks executes the code compiling subtasks allocated to each working node in parallel, and returns an execution result to the main control node; and 7, after judging that the execution of all code compiling subtasks is finished, the main control node collects partition executable target codes returned by all working nodes and performs joint compiling on all partition executable target codes to form complete executable target codes of all configuration items in the flight control software. Optionally, in the foregoing method for distributed computation and compilation of flight control s