CN109117125B - Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes - Google Patents

Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes Download PDF

Info

Publication number
CN109117125B
CN109117125B CN201810804156.3A CN201810804156A CN109117125B CN 109117125 B CN109117125 B CN 109117125B CN 201810804156 A CN201810804156 A CN 201810804156A CN 109117125 B CN109117125 B CN 109117125B
Authority
CN
China
Prior art keywords
writing
digital aircraft
source code
files
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810804156.3A
Other languages
Chinese (zh)
Other versions
CN109117125A (en
Inventor
董云峰
李锦辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201810804156.3A priority Critical patent/CN109117125B/en
Publication of CN109117125A publication Critical patent/CN109117125A/en
Application granted granted Critical
Publication of CN109117125B publication Critical patent/CN109117125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses an artificial intelligence writing method for source codes of a digital aircraft in multiple platforms and multiple operation modes, which comprises the following steps: saving a source code general part into a template in advance, storing the template into a source code library, and establishing a template path according to a platform type and a code function which are suitable for a source code; reading a stream design XML file, a stream design database and a packet design database; reading a template according to the running mode information and the template path carried in the packet design database, and writing a multi-running mode source code; reading templates according to platform information and template paths carried in a stream design XML file, a stream design database and a packet design database, and writing application layer and system layer source codes in multi-platform source codes; and according to the source code platform information carried in the package design database, combining the source codes of the multiple operation modes and the application layer and system layer source codes of the multiple platforms to obtain an engineering frame file in the source codes of the multiple platforms, and in conclusion, writing of the source codes of the multiple operation modes of the multiple platforms is completed.

Description

Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes
Technical Field
The invention relates to the technical field of source code writing of a digital aircraft by an artificial intelligence programmer, in particular to an artificial intelligence writing method for source codes of a digital aircraft in multiple platforms and multiple operation modes.
Background
Aircraft include, but are not limited to, airplanes, missiles, satellites, space shuttles. The digital aircraft is a dynamic simulation system which is completely consistent with the functions, compositions, structures, modes, programs and operations of a real aircraft and operates in a software simulation space environment.
The proportion of simulation verification by using the digital world in the current engineering design, research and development and test processes is greatly improved, the test cost of the aircraft is high, and the effect of the digital aircraft is more obvious. The digital aircraft code development amount is large, the repeated workload of people is reduced by the intelligent writing technology of the source code, and the key technology is an artificial intelligence programmer. The artificial intelligence programmer is to decompose the decision process of the human writing program and combine various artificial intelligence methods according to the characteristics of each part. The writing object of the artificial intelligence program source is a digital aircraft source code, the digital aircraft source code can run on different platforms according to different application backgrounds and different service objects, and a single-machine version or a distributed running mode can be adopted.
Therefore, how to provide an artificial intelligence writing method for source codes of multiple platforms and multiple operation modes of a digital aircraft is a problem which needs to be solved urgently by a person skilled in the art.
Disclosure of Invention
In view of the above, the invention provides an artificial intelligence writing method for source codes of a digital aircraft in multiple platforms and multiple operation modes, which reduces repeated source code development for people, reduces subjective factors of people in the process of developing the source codes of the digital aircraft, and is convenient for management and communication.
In order to achieve the purpose, the invention adopts the following technical scheme:
an artificial intelligence writing method for source codes of multiple platforms and multiple operation modes of a digital aircraft comprises the following steps:
s1: performing system level decomposition on a digital aircraft source code, storing a general part of the digital aircraft source code as a template in advance, storing the template into a source code library, and establishing a corresponding template path according to the type of a platform and the function of the code which are suitable for the source code;
s2: reading a stream design XML file, a stream design database and a packet design database;
s3: reading a corresponding template according to the running mode information carried in the package design database and the template path, and performing writing operation on the read template to obtain a source code of the digital aircraft in multiple running modes;
s4: reading corresponding templates according to the platform information and the template paths carried in the stream design XML file, the stream design database and the packet design database, and performing writing operation on the read templates to obtain application layer and system layer source codes in the multi-platform source codes of the digital aircraft;
s5: and according to the source code platform information carried in the package design database, combining the source codes of the multiple operating modes of the digital aircraft and the source codes of the application layer and the system layer of the source codes of the multiple platforms of the digital aircraft to obtain an engineering frame file in the source codes of the multiple platforms of the digital aircraft, and in conclusion, writing of the source codes of the multiple operating modes of the multiple platforms of the digital aircraft is completed.
Preferably, the system-level decomposition of the digital aircraft source code specifically includes: the digital aircraft source code is decomposed into digital aircraft system layer source code and digital aircraft application layer source code.
Preferably, the information stored in the stream design XML file includes but is not limited to: entity type, subsystems included in the aircraft, component types included under each subsystem, component models included in each component type, component number of each component signal, installation information of each component, and granularity of each generated aircraft source code;
the flow design database comprises an attitude and orbit control subsystem mode definition table, a power supply subsystem power supply and distribution logic definition table, a propulsion subsystem pipeline connection and on-off logic table and a measurement and control subsystem link definition table;
the digital package design database includes: an entity definition table, a stand-alone group configuration table, an interface configuration table, a deployment scheme table and a federal configuration table;
wherein, the information stored in the entity definition table comprises: the code number, name and entity type of the digital aircraft; storing component information contained in an entity in a single unit configuration table;
the information stored in the deployment scenario table includes: name, operating mode and real-time non-real-time condition of the scheme; the information stored in the federal configuration table includes: the name of the federation and the name of the project folder that generates the process, the platform on which the federation runs, the implementation of the code in the federation, and the components contained in the federation.
Preferably, the engineering frame files specifically comprise a digital aircraft Windows platform engineering frame file, a digital aircraft Linux platform engineering frame file and a digital aircraft embedded platform engineering frame file.
Preferably, the writing step of the digital aircraft Windows platform engineering framework file comprises the following steps:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under the Windows platform;
acquiring an engineering frame template from a source code library and modifying an engineering name according to information in a deployment scheme table;
and counting all the C files, the cpp files and the resource files in the project, and writing the C files, the cpp files and the resource files into the project frame files respectively.
Preferably, the writing step of the digital aircraft Linux platform engineering framework file comprises the following steps:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
counting all C files and cpp files in the project, and writing the name columns corresponding to the C files and the cpp files into the makefile;
traversing all the C files and the cpp files, searching the h file contained in each file, and writing the relation columns of the C files or the cpp files and the h file into the makefile.
Preferably, the writing step of the digital aircraft embedded platform engineering frame file comprises the following steps:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
generating a makefile empty file under the engineering path, and writing part of the header according to fixed specifications;
and reading all files under the engineering path, removing the path name, the h file and the scc file, and leaving the c file and the s file to finish writing the makefile.
According to the technical scheme, compared with the prior art, the invention discloses and provides the artificial intelligent writing method for the source codes of the digital aircraft in the multiple platforms and the multiple operation modes, the source code system of the digital aircraft is hierarchically decomposed, repeated source code development is reduced, and the utilization rate of the source codes is improved; the method has the advantages that an important decision making process of multi-platform multi-operation-mode source code intelligent development and a multi-platform transplantation deployment process are taught by a computer, the work of people in the source code writing process is reduced, the subjective factors of people in the source code of the digital aircraft are reduced, and the management and the communication are facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a digital aircraft multi-platform multi-operation mode source code artificial intelligence writing method provided by the invention;
fig. 2 is a source code hierarchy diagram of a digital aircraft according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to the attached drawing 1, the embodiment of the invention discloses a source code artificial intelligence writing method for a digital aircraft in multiple platforms and multiple operation modes, which comprises the following steps:
s1: performing system level decomposition on a digital aircraft source code, storing a general part of the digital aircraft source code as a template in advance, storing the template into a source code library, and establishing a corresponding template path according to the type of a platform and the function of the code which are suitable for the source code;
s2: reading a stream design XML file, a stream design database and a packet design database;
s3: reading a corresponding template according to the running mode information carried in the package design database and the template path, and performing writing operation on the read template to obtain a source code of the digital aircraft in multiple running modes;
s4: reading corresponding templates according to the platform information and the template paths carried in the stream design XML file, the stream design database and the packet design database, and performing writing operation on the read templates to obtain application layer and system layer source codes in the multi-platform source codes of the digital aircraft;
s5: and according to the source code platform information carried in the package design database, combining the source codes of the multiple operating modes of the digital aircraft and the source codes of the application layer and the system layer of the source codes of the multiple platforms of the digital aircraft to obtain an engineering frame file in the source codes of the multiple platforms of the digital aircraft, and in conclusion, writing of the source codes of the multiple operating modes of the multiple platforms of the digital aircraft is completed.
According to the artificial intelligent writing method for the source codes of the digital aircraft in the multiple platforms and the multiple operation modes, provided by the invention, the source code system of the digital aircraft is hierarchically decomposed, so that repeated source code development is reduced, and the utilization rate of the source codes is improved; the method has the advantages that an important decision making process of multi-platform multi-operation-mode source code intelligent development and a multi-platform transplantation deployment process are taught by a computer, the work of people in the source code writing process is reduced, the subjective factors of people in the source code of the digital aircraft are reduced, and the management and the communication are facilitated.
In order to further optimize the technical scheme, the system level decomposition of the digital aircraft source code specifically comprises the following steps: the digital aircraft source code is decomposed into digital aircraft system layer source code and digital aircraft application layer source code.
In order to further optimize the above technical solution, the digital package design database includes: an entity definition table, a stand-alone group configuration table, an interface configuration table, a deployment scheme table and a federal configuration table;
wherein, the information stored in the entity definition table comprises: the code number, name and entity type of the digital aircraft; storing component information contained in an entity in a single unit configuration table;
the information stored in the deployment scenario table includes: name, operating mode and real-time non-real-time condition of the scheme; the information stored in the federal configuration table includes: the name of the federation and the name of the project folder that generates the process, the platform on which the federation runs, the implementation of the code in the federation, and the components contained in the federation.
In order to further optimize the technical scheme, the specific steps of the engineering frame file comprise a digital aircraft Windows platform engineering frame file, a digital aircraft Linux platform engineering frame file and a digital aircraft embedded platform engineering frame file.
In order to further optimize the technical scheme, the writing step of the engineering frame file of the Windows platform of the digital aircraft comprises the following steps:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under the Windows platform;
acquiring an engineering frame template from a source code library and modifying an engineering name according to scheme configuration;
and counting all the C files, the cpp files and the resource files in the project, and writing the C files, the cpp files and the resource files into the project frame files respectively.
In order to further optimize the technical scheme, the writing step of the digital aircraft Linux platform engineering framework file comprises the following steps of:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
counting all C files and cpp files in the project, and writing the name columns corresponding to the C files and the cpp files into the makefile;
traversing all the C files and the cpp files, searching the h file contained in each file, and writing the relation columns of the C files or the cpp files and the h file into the makefile.
In order to further optimize the technical scheme, the writing step of the digital aircraft embedded platform engineering frame file comprises the following steps:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
generating a makefile empty file under the engineering path, and writing part of the header according to fixed specifications;
and reading all files under the engineering path, removing the path name, the h file and the scc file, and leaving the c file and the s file to finish writing the makefile.
The technical solution of the present invention is further discussed below in conjunction with.
In step S1, the system level decomposition of the digital aircraft source code mainly includes two levels: digital aircraft system layer source code, digital aircraft application layer source code, as shown in fig. 2.
(1) Digital aircraft system layer source code
The system mainly comprises an operating system and a system service function of the data transmission equipment.
The system service function of data transmission can be decomposed into three parts of data reading, data processing and data output according to the processing flow. The timing of the transmitted signals is similar across different platforms. If the processing flow is decoupled according to time sequence, similar transmission processes are packaged on the same interface function, and the source code of the application layer can be commonly used on various hardware platforms, so that the writing of the source code of the application layer is independent from the operation platform.
The system service functions of the operating system mainly include system input and output functions, system time functions, data types and the like. The macro definition of the system service functions with different operating systems is defined into the same symbol in the header file, and the corresponding codes of the system service functions in the source codes of the application layer are replaced by the macro definition, so that the source codes of the application layer are universal on different operating systems.
Establishing different subfiles for respectively storing the source codes of the system layer in a source code library according to an applied system platform, wherein the subfiles comprise: windows, Linux, Embedded.
In addition, the project frame file template is also stored in the source code base of the corresponding system layer.
(2) Digital aircraft application layer source code
The method mainly comprises a mathematic basic layer, a mechanical basic layer, an algorithm layer and a physical layer.
The first layer is a mathematics base layer, mathematics is a basic subject, the mathematics base layer is a base stone of a software algorithm, and a general algorithm described by main exponential theory comprises contents such as vector, matrix, four-element calculation and the like.
The second layer is a mechanical foundation layer, mechanics is a professional foundation, and mainly refers to a general algorithm described by a mathematical concept, including contents of common coordinate system transformation, celestial body position calculation, geomagnetic field calculation and the like.
The third layer is an algorithm layer, and although the mass inertia of the aircraft is different, the types and the installation positions of the sensor and the actuating mechanism are different, and the electric signal interfaces are different, the sensor and the actuating mechanism are used in the same way. The general algorithm layer encapsulates the data processing flow of the sensor and the actuating mechanism according to the principle, and mainly refers to a general state determination and control algorithm which can be suitable for different aircrafts.
The fourth layer is a physical layer, typically one specific functional mode for each entity. For the spaceborne computer, the entity layer corresponds to a satellite control mode, and the entity is the minimum unit for finishing the attitude determination and control functions.
And the mathematical basic layer and the mechanical basic layer in the application layer are basically unchanged, the source code standard decision execution method is used for writing and warehousing once during expansion, and a mathematical basic library and a mechanical basic library folder are respectively established in the source code library to store the source code template.
And a basic algorithm in an algorithm layer in the application layer utilizes a source code standard decision execution method or an intelligent formula to identify a source code writing method, writes the source code once and stores the source code writing method into a file folder which is associated with the component in a source code library.
The component model source code in the entity layer in the application layer can be written once and put in storage by using a source code standard decision execution method or an intelligent formula recognition source code writing method, and is stored in a folder associated with the component model.
The entity class source codes in the entity layer in the application layer can be written and put in storage at one time by using a source code standard decision execution method and stored in a folder associated with the entity type.
For step S2, the stream design XML file, the stream design database, and the package design database are read, and information such as the digital description, the scheme, the federation, the operation platform, the operation mode, and the like of the digital aircraft system composition and structure is acquired.
The information stored in the stream design XML file includes, but is not limited to: entity type, subsystems included in the aircraft, component types included under each subsystem, component models included in each component type, component number of each component signal, installation information of each component, and granularity of each generated aircraft source code.
The main tables contained in the flow design database comprise an attitude and orbit control subsystem mode definition table, a power supply subsystem power supply and distribution logic definition table, a propulsion subsystem pipeline connection and on-off logic table and a measurement and control subsystem link definition table.
The related table groups in the digital satellite packet design database mainly comprise entity definition, single unit configuration, state quantity definition, bus configuration, transmission protocol definition, deployment scheme and federal configuration.
The information stored in the entity definition in the database comprises the code number, the name and the entity type of the digital aircraft, wherein the entity type comprises a satellite, a missile, an airplane, a naval vessel, a ground station and the like.
The stand-alone group configuration stores component information contained in the entity, such as a gyroscope, a thruster and a momentum wheel contained in a satellite, a steering engine and an engine contained in a missile, and a virtual component of the dynamic environment of the aircraft.
The state quantity definition table stores state quantity information contained in the aircraft component, including state quantity names, types, lengths, processing modes, maximum values, minimum values, optional values and the like.
The bus configuration defines a real bus between the aircraft components, a wireless link between the aircraft, and a virtual bus between the aircraft individual components and the dynamic environment.
The transmission protocol defines a communication protocol that maintains the transmission of information between aircraft components, including the information: sender, receiver, send packet, receive packet, transport bus, etc.
The information stored in the deployment scenario table includes the name of the scenario, the operation mode, real-time and non-real-time information, and the like.
The information stored in the federal configuration chart includes federal names (and names of project folders for generation processing), code implementation modes of federal operation and federal, components included in federal, and the like.
For step S3, the digital aircraft multi-operation mode source code is mainly divided into: the method comprises the following steps that a digital aircraft multi-operation mode fixed source code and a digital aircraft multi-operation mode individual source code are obtained;
(1) multi-operation mode fixed source code writing method for digital aircraft
The writing process is that the fixed source codes of the digital aircraft in the multiple operation modes are searched under the template path in the source code library, the output path is determined according to the template of the source codes and the information in the federal configuration table, and the fixed source codes of the digital aircraft in the multiple operation modes are written under the output path according to the template.
The fixed source code mainly refers to a main function file of the digital aircraft, and the file can be divided into different modules according to the functions of the source code, wherein the different modules comprise a dynamics and environment module, a sensor transfer box module, a controller module, an execution mechanism transfer box module and an execution mechanism module. The dynamics and environment module game is mainly divided into a celestial body module and an aircraft entity module. The sensors and actuators can be subdivided into specific component modules. All modules correspond to a macro definition, relevant codes are wrapped by the macro definition, and codes of each distributed module can be independent.
(2) Digital aircraft multi-operation mode individual source code writing
The method mainly comprises the steps of writing a macro definition head file of a digital aircraft operation mode, writing a transmission file of a digital aircraft information packet in a distributed mode and writing a calling file of a digital aircraft part in a distributed mode.
The macro definition header file is written according to a related federal configuration table in package design data, the macro definition is written when a single unit containing such parts in the federation is inquired, and the used main intelligent writing method is a source code specification decision execution method, for example: if the federation contains the SENSOR component, a macro definition "# define USE _ AS _ SENSOR" is written.
According to a federal configuration related table in package design data, the digital aircraft information package transmission file is written in a distributed mode, and information package transmission source codes of the parts are written when a single unit containing the parts in the federal is inquired. The method comprises header file reference, variable definition, function declaration, initialization function, package sending function, package receiving and unpacking function, subsequent processing function and component state quantity updating or acquiring function. The main process is that firstly, according to the information in the entity definition table and the stand-alone group configuration table, the written file name, the name of the main function and the statement of the function are determined by using a source code standard decision execution method; secondly, writing a header file reference and a variable definition source code by using a source code standard decision execution method according to information in the bus configuration, the transmission protocol definition table and the state quantity definition table; writing a packet sending function and a packet receiving and unpacking function by using a source code standard decision execution method according to the information in the transmission protocol definition table; and reading the template in the corresponding source code library by using the information in the single unit configuration table, and writing an initialization function, a subsequent processing function and a component state quantity updating or acquiring function.
According to a federal configuration related table in package design data, the digital aircraft part calling file is written in a distributed mode, and when a single unit part calling file containing the parts in the federal is inquired, function calling of the corresponding parts is written. The method comprises the steps of initializing function call, receiving function call, sending function call, static processing function call and dynamic stepping function call. The main process is that according to the information in the entity definition table and the stand-alone configuration table, the written file name, the name of the calling function and the writing form of the calling statement contained in each function are determined by using the source code standard decision execution method.
For step S4, the main process is to determine the writing rule of the application layer code according to the relevant information of the digital aircraft stream design XML file, the stream design database, the single unit, the bus, the transmission protocol, and the like in the packet design database assembled by the user, determine the writing rule of the system layer code according to the platform and the deployment scheme in the federal configuration in the packet design database, and write the complete digital aircraft multi-platform source code according to the writing rule.
(1) Intelligent writing of source codes of application layer of digital aircraft
The physical layer source code in the application layer needs to be regenerated by using an intelligent writing technology each time, and the method mainly comprises the following steps: writing a static transmission source code of the digital aircraft and writing a dynamic coupling source code of a subsystem of the digital aircraft.
The writing of the static transmission source code of the digital aircraft can be decomposed into the writing of the transmission source code of the information packet of the digital aircraft, the writing of the remote measurement source code of the digital aircraft and the writing of the remote control source code of the digital aircraft. The method mainly comprises the steps of reading a component model source code template in a physical layer and writing the template according to information carried in an entity definition, single unit configuration, state quantity definition, bus configuration and transmission protocol definition table in an XML file and package design database and a source code library template path, and obtaining a static transmission source code of the digital aircraft by combining a source code specification decision execution method.
The writing of the transmission source code of the digital aircraft information packet mainly comprises a channel and connection relation definition head file writing module, a single machine component information transmission source code writing module, a single machine component and dynamics and environment module information transmission source code writing module and other auxiliary code writing modules. The digital aircraft telemetry source code writing can be divided into satellite AOS protocol telemetry source program writing and satellite channel telemetry source program writing according to a telemetry mode, and both the writing and the writing include an on-satellite coding source code writing module and a ground decoding source code writing module. The writing of the remote control source code of the digital aircraft mainly comprises a writing module of a ground remote control instruction sending source code and a writing module of a satellite remote control instruction decoding source code.
The dynamic coupling source code writing of the digital aircraft subsystem comprises the dynamic coupling source code writing of a digital satellite subsystem, the dynamic coupling source code writing of a digital missile subsystem and the like according to the entity decomposition. The method mainly comprises the steps of reading an entity type source code template in a physical layer and writing the template according to information carried in entity definitions in an XML file, a stream design database and a packet design database and a source code library template path to obtain a dynamic coupling source code of the digital aircraft subsystem.
The dynamic coupling source code of the digital satellite subsystem is decomposed into a posture and orbit control subsystem, a power supply subsystem, a propulsion subsystem, a thermal control subsystem and a measurement and control subsystem coupling source code according to the system dimension. And decomposing the dynamic coupling source code of the digital missile subsystem into a navigation control subsystem and a propulsion subsystem coupling source code according to the system dimension.
(2) Digital aircraft system layer source code writing
Determining a system layer source code template path to be loaded according to platform information contained in package design data, loading a source code template of a corresponding platform from a source code library, determining an output path of source code writing according to a scheme and information in a federal table, and realizing the digital aircraft system layer source code writing by using a source code standard decision execution method.
The written source code mainly comprises various bus information transmission source codes and distributed time synchronization management source codes which are simulated by RTI for Windows and Linux platforms, and the written source code mainly comprises a standard packaging source code based on an embedded hardware communication bottom layer driving source code for embedded platforms.
For step S5:
(1) digital aircraft windows platform engineering framework file writing
The Windows platform engineering framework files mainly refer to sln files, vcxproj files and vcxproj files in VS environment. The main steps of writing the engineering frame file are as follows: firstly, writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Windows platform; secondly, acquiring an engineering frame file template from a source code library and modifying an engineering name according to scheme configuration; and thirdly, counting all c files, cpp files and resource files in the project, and writing the c files, the cpp files and the resource files into corresponding groups in the project frame files respectively.
The artificial intelligence programmer calls a compiling tool carried by VS under Windows to make the source code into an executable program.
(2) Digital aircraft Linux platform engineering framework file writing
The writing method of the makefile on the Linux platform mainly comprises the following steps: writing source codes of an application layer and a system layer to obtain all source files of a digital aircraft Linux platform; secondly, counting all c files and cpp files in the project, and writing the name column into the makefile; and thirdly, traversing all the c files and the cpp files, searching the h file contained in each file, and sequentially listing and writing the relation between the c file/the cpp file and the h file into the makefile.
And calling the makefile in the Linux environment system by an artificial intelligence programmer to complete compiling, namely taking the source code as an executable program.
(3) Digital aircraft embedded platform engineering framework file writing
The method for writing the makefile of the embedded platform mainly comprises the following steps: writing source codes of an application layer and a system layer to obtain all source files of a digital aircraft Linux platform; secondly, producing makefile empty documents under the engineering path, and writing partial headers according to fixed specifications; and thirdly, reading all files under the engineering path, removing the path name, the h file and the scc file, leaving the c file and the s file, and completing the writing of the makefile.
And after the artificial intelligence programmer finishes makefile, automatically opening the case, opening the board card, downloading and automatically deploying the source code to the corresponding embedded board card.
In addition, the source code specification decision execution method and the intelligent formula recognition source code writing method mentioned in the invention need to be further explained;
the method for executing the source code specification decision comprises the following steps:
the method comprises the following steps that firstly, multi-dimensional decomposition is carried out on a digital aircraft source code by using a plurality of dimensional decomposition methods to obtain a minimum decomposition result;
the decomposition method mainly comprises code hierarchy, aircraft type, system dimension, simulation granularity and cross combination among multiple decomposition methods;
clustering the minimum decomposition result, and establishing a digital aircraft source code writing decision tree;
this step can be subdivided into the following two small steps:
(1) and clustering the minimum decomposition result, and giving clustering bases including universality and a working logic mode of the clustered applicable objects and applicable conditions of the branches.
Clustering is carried out according to a working logic mode, a source code of a posture and orbit control subsystem in a satellite mainly comprises a posture determining module, a posture control module and a mode monitoring and switching module, a missile guidance control system comprises a flight event monitoring and switching module, a guidance module and a control module, the working logic modes of two aircrafts are basically consistent, so that the implementation modes are clustered into one class, the source code motion control part of the aircrafts is divided into three parts according to a clustered result, the first part is an aircraft state determining module, the second part is a state monitoring and specific condition meeting switching logic module in the flight process, and the third part is an aircraft motion control module.
(2) Establishing a complete decision tree of source codes of the digital aircraft written by programmers: after clustering the source code decomposition results, establishing a decision tree
Step three, establishing an artificial intelligence programmer for executing standard writing operation according to the branch condition of the decision tree; and selecting a source code writing execution method according to the application range, the change frequency and the change mode factors, and establishing an intelligent programmer.
And fourthly, reading the configuration information of the scene to be generated by the artificial intelligence programmer to generate the digital aircraft simulation source program.
This step can be subdivided into the following two small steps:
(1) intelligent programmer reads that the required generated scene contains aircraft configuration information
The resulting artificial intelligence programmer is used to read the profile input information required to write a digital flight. The configuration file is decomposed according to file types and comprises a database, a formatted file (xml file), a file library and the like. The profiles are broken down according to applicability, including general for all aircraft, general for each type of aircraft, specific for each model, etc.
(2) And judging layer by layer according to the branch applicable conditions of the decision tree, acquiring a source code writing operation execution method, executing the writing operation and automatically generating the source code.
And in the artificial intelligence programmer, judging and screening the satisfaction conditions of branches of each level of the decision tree according to the branch statements of the decision tree, and searching the minimum branch of each step in the writing process.
According to the writing method of each branch, the writing of the source code of the complete digital aircraft system is completed through the modes of writing of a source code generating program, reading and writing of a database, direct copying of a file and replacement and copying of the file.
The intelligent formula recognition source code writing method is a method for describing a writing source program by using a formula, and comprises the following steps:
the method comprises the following steps: establishing a knowledge base and a method base required by inference;
the knowledge base stores variable type identification, calculates a source code writing rule, and processes the relevant knowledge or established fact of the source code writing rule;
the method library stores decision methods for processing complex equation algorithm selection and flow determination, preprocessing methods, and methods for extracting variable values and variable types from formulas.
Step two: matching a solving algorithm in a method library aiming at the complex formula with the solution, and confirming the algorithm flow and the related formula of each step;
matching the most appropriate resolving method in a method library, converting a complex equation which is difficult to directly calculate to obtain a result into an algorithm description form executed according to steps, and determining formulas related to the steps;
step three: identifying the operation type of the formula according to the variable and the type of the formula related to each step in the algorithm flow by the knowledge base and the method base, and converting the key information into a tree structure for storage;
the mathematical expression in the OMML format in each step of the algorithm is subjected to processes of symbol adhesion, variable type identification and conversion of a tree structure into a binary tree structure by removing invalid items, and the mathematical expression is converted into a list form which is convenient to identify by a computer and is stored.
Step four: preprocessing the tree structure; and judging the result variable type of each operation in the binary tree structure according to the relevant knowledge of variable operation in the knowledge base so as to facilitate the subsequent writing work of the source code.
Step five: an operation flow identification process; through keyword extraction, the operation flow among all the steps of the algorithm is identified, and the operation flow comprises sequential operation, a condition judgment process and a circulation process.
Step six: and intelligently writing the source code according to the algorithm flow and the formula processing result. And according to the source code writing rule in the knowledge base, sequentially completing the processes of header file reference writing, function statement writing, variable definition writing and program main body part writing.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. An artificial intelligence writing method for source codes of multiple platforms and multiple operation modes of a digital aircraft is characterized by comprising the following steps:
s1: performing system level decomposition on a digital aircraft source code, storing a general part of the digital aircraft source code as a template in advance, storing the template into a source code library, and establishing a corresponding template path according to the type of a platform and the function of the code which are suitable for the source code;
s2: reading a stream design XML file, a stream design database and a packet design database;
s3: reading a corresponding template according to the running mode information carried in the package design database and the template path, and performing writing operation on the read template to obtain a source code of the digital aircraft in multiple running modes;
s4: reading corresponding templates according to the platform information and the template paths carried in the stream design XML file, the stream design database and the packet design database, and performing writing operation on the read templates to obtain application layer and system layer source codes in the multi-platform source codes of the digital aircraft;
s5: and according to the source code platform information carried in the package design database, combining the source codes of the multiple operating modes of the digital aircraft and the source codes of the application layer and the system layer of the source codes of the multiple platforms of the digital aircraft to obtain an engineering frame file in the source codes of the multiple platforms of the digital aircraft, and in conclusion, writing of the source codes of the multiple operating modes of the multiple platforms of the digital aircraft is completed.
2. The artificial intelligence writing method for source codes of multiple platforms and multiple operating modes of a digital aircraft according to claim 1, wherein the system level decomposition of the source codes of the digital aircraft specifically comprises: the digital aircraft source code is decomposed into digital aircraft system layer source code and digital aircraft application layer source code.
3. The method of claim 1, wherein the information stored in the stream design XML file comprises: entity type, subsystems included in the aircraft, component types included under each subsystem, component models included in each component type, component number of each component signal, installation information of each component, and granularity of each generated aircraft source code;
the flow design database comprises an attitude and orbit control subsystem mode definition table, a power supply subsystem power supply and distribution logic definition table, a propulsion subsystem pipeline connection and on-off logic table and a measurement and control subsystem link definition table;
the digital package design database includes: an entity definition table, a stand-alone group configuration table, an interface configuration table, a deployment scheme table and a federal configuration table;
wherein, the information stored in the entity definition table comprises: the code number, name and entity type of the digital aircraft; storing component information contained in an entity in a single unit configuration table;
the information stored in the deployment scenario table includes: name, operating mode and real-time non-real-time condition of the scheme; the information stored in the federal configuration table includes: the name of the federation and the name of the project folder that generates the process, the platform on which the federation runs, the implementation of the code in the federation, and the components contained in the federation.
4. The method for artificial intelligence writing of source codes of multiple platforms and multiple operation modes of a digital aircraft according to claim 1, wherein the engineering framework files specifically comprise a Windows platform engineering framework file of a digital aircraft, a Linux platform engineering framework file of a digital aircraft, and an embedded platform engineering framework file of a digital aircraft.
5. The method for artificial intelligence writing of source code for multiple platforms and multiple operating modes of a digital aircraft according to claim 4, wherein the step of writing the Windows platform engineering framework files of the digital aircraft comprises:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under the Windows platform;
acquiring an engineering frame template from a source code library and modifying an engineering name according to information in a deployment scheme table;
and counting all the C files, the cpp files and the resource files in the project, and writing the C files, the cpp files and the resource files into the project frame files respectively.
6. The artificial intelligence writing method for source code of multi-platform and multi-operation mode of digital aircraft according to claim 4, wherein the writing step of the Linux platform engineering framework file of the digital aircraft comprises:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
counting all C files and cpp files in the project, and writing the name columns corresponding to the C files and the cpp files into the makefile;
traversing all the C files and the cpp files, searching the h file contained in each file, and writing the relation columns of the C files or the cpp files and the h file into the makefile.
7. The artificial intelligence writing method for source codes of multiple platforms and multiple operating modes of a digital aircraft according to claim 4, wherein the writing step for the embedded platform engineering framework file of the digital aircraft comprises:
writing source codes of an application layer and a system layer to obtain all source files of the digital aircraft under a Linux platform;
generating a makefile empty file under the engineering path, and writing part of the header according to fixed specifications;
and reading all files under the engineering path, removing the path name, the h file and the scc file, and leaving the c file and the s file to finish writing the makefile.
CN201810804156.3A 2018-07-20 2018-07-20 Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes Active CN109117125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810804156.3A CN109117125B (en) 2018-07-20 2018-07-20 Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810804156.3A CN109117125B (en) 2018-07-20 2018-07-20 Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes

Publications (2)

Publication Number Publication Date
CN109117125A CN109117125A (en) 2019-01-01
CN109117125B true CN109117125B (en) 2021-05-25

Family

ID=64863043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810804156.3A Active CN109117125B (en) 2018-07-20 2018-07-20 Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes

Country Status (1)

Country Link
CN (1) CN109117125B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569333B (en) * 2021-06-24 2023-02-17 中国人民解放军63620部队 Method for developing and maintaining multiple aircraft simulation models in parallel based on precompiled instructions
CN113703726A (en) * 2021-08-26 2021-11-26 北京航空航天大学 Iterative method for extracting and zeroing decision knowledge of source code construction of digital aircraft

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5875331A (en) * 1994-09-30 1999-02-23 International Business Machines Corp. System and method for generating target language code utilizing an object oriented code generator
CN101334728B (en) * 2008-07-28 2011-10-19 北京航空航天大学 Interface creating method and platform based on XML document description
CN103019742B (en) * 2012-12-31 2016-02-10 清华大学 A kind of real time workshop method in many DSP platform
US20160196204A1 (en) * 2015-01-04 2016-07-07 International Business Machines Corporation Smart Validated Code Searching System
CN108287959B (en) * 2018-01-15 2021-05-04 北京航空航天大学 Method for executing source code of digital aircraft written by artificial intelligence programmer

Also Published As

Publication number Publication date
CN109117125A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
US7735058B2 (en) Remote component and connection architecture
JP2009283004A (en) Model-based diagnostic interface
CN109117125B (en) Artificial intelligence writing method for source codes of digital aircraft in multiple platforms and multiple operation modes
Passalis et al. Opendr: An open toolkit for enabling high performance, low footprint deep learning for robotics
CN111830861B (en) Deduction method and system for spacecraft task planning
US7174545B2 (en) Apparatus and method for producing display application software for embedded systems
CN109214043B (en) Artificial intelligence writing method for digital aircraft dynamics environment information transmission source code
CN109189376B (en) Artificial intelligence writing method for digital aircraft cluster source code
CN113348764B (en) System and method for overall process digital simulation of lunar aircraft
CN115437763B (en) Task reconstruction method and device after rocket fault, terminal equipment and storage medium
CN112148266B (en) Automatic generation method and application of earth system coupling mode
CN113900388A (en) Spacecraft attitude control physical simulation test system accurate quick-building platform and method
JP2828735B2 (en) Automatic conversion of physical unit system of input / output data for composite program
Shere et al. A methodology for design, test, and evaluation of real-time systems
CN113050451B (en) Modeling method and device of flight control system
Prat et al. The beccal experiment design and control software
Bhattacharyya et al. Animation/simulation of missions for autonomous underwater vehicles with hybrid-model based
Peinze The SUPRENUM preprototype: Status and experiences
O'Connor et al. Horizon 2.1: A space system simulation framework
Newport Fuzzy rule based computer design
Salada et al. Using MathWorks' Simulink® and Real-Time Workshop® Code Generator to Produce Attitude Control Test and Flight Code
Verhoef et al. TASTE for Overture to keep SLIM
Prastowo et al. Tice: A real‐time language compilable using C++ compilers
CN117193806A (en) Method and device for generating environment mirror image for compiling construction
Walton et al. Design automation: Making formal methods relevant

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant