A method for airborne software security modeling and automated testing

By extracting and extending the security properties of the SysML model of airborne software, and combining it with a large language model and genetic algorithm to generate test cases, the problem of insufficient security verification at the model layer is solved, achieving efficient security testing and automated test case generation, thus improving the efficiency of security testing of airborne software.

CN119396724BActive Publication Date: 2025-11-18BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411447179.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-11-18
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The model-level security verification of airborne software is insufficient, and existing methods fail to fully cover complex failure modes, resulting in lagging security testing, low efficiency in test case generation, delays in development progress, and high maintenance costs.

Method used

A security property extraction module, an automatic model expansion module, and an automatic test case generation module are employed. The airborne software SysML model is expanded using a large language model (such as Qwen2-72B-Instict) to generate comprehensive test paths and test data. Test cases are generated through edge-first depth traversal and an improved genetic algorithm.

Benefits of technology

It improves the efficiency and coverage of airborne software security testing, reduces user workload, enables automated generation of test cases, and enhances the expressive power of models and the level of automation in security testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396724B_ABST
    Figure CN119396724B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of airborne software security modeling and automated testing method, comprising: according to the field of airborne software, the security property description required for security testing is extracted using security property extraction module, while the SysML model is designed, the XML file of SysML model and security property description are uploaded to model automatic expansion module;Model automatic expansion module is expanded according to the uploaded security property description XML file of SysML model, and the node type and path information of SysML model are supplemented, to generate the extended model;Test case automatic generation module generates the comprehensive test path and test data of the extended model according to the extended model output by model automatic expansion module. Since the scheme adds security testing through security property extraction module, model automatic expansion module and test case automatic generation module, the efficiency of test case generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software security, in particular to a method for airborne software security modeling and automatic testing. BACKGROUND

[0002] With the deepening of informatization and the rapid iteration of software engineering technology, software is increasingly widely used in the fields of aviation, aerospace, electronics, and shipbuilding. In particular, in the field of military aircraft, software plays an increasingly important role. For example, the F-22 and F-35 aircraft have more than 7 million lines of software source code, which realizes more than 80% of the functions of the entire machine, and is responsible for completing core and critical tasks such as flight control, task planning, and navigation recognition. It has become the most core part of the aviation equipment system, and its security level is crucial.

[0003] Airborne software systems are typical complex embedded systems with characteristics such as frequent interface interaction, close software and hardware coupling, complex task scenarios, and strict timing constraints. The fault mechanism is complex, and the security verification work faces great challenges. Standard software security verification work basically follows the process of "system hazard analysis-software fault mode analysis-software security design-software security testing". Through system hazard analysis, software hazards, causes, and effects can be identified. On this basis, software fault modes are analyzed to obtain security requirements. Based on these requirements, software security elements are designed by the development personnel to form analysis criteria for guiding security testing. The complex application scenarios and operating requirements of airborne software result in fault mechanisms that are significantly different from general software. Therefore, it is necessary to combine the security characteristics of airborne software to conduct domain security verification and fully understand the security level of airborne software.

[0004] Currently, the development process is based on the idea of function decomposition. Model-driven development (MDD) is a high-level abstraction development method that uses models as the main artifacts. Its application scope is gradually expanding. However, the current model-driven airborne software development is basically carried out around "requirement analysis-design model-model verification-code generation-code testing-use and maintenance". The goal of model verification is mainly to ensure model integrity and functional correctness. The code testing stage mainly completes functional testing and security testing. The model layer does not fully carry out airborne software security analysis and verification. The model layer focuses on functional safety verification, and only the code layer carries out security verification, which leads to testing lagging behind the development process and high security defect repair costs. Therefore, it is necessary to study the security verification of the SysML model layer of airborne software to ensure the safety and reliability of model design. In addition, the security analysis process relies too much on manual work, which leads to low automation of testing and verification, and the testing efficiency cannot meet the development schedule requirements.

[0005] In summary, there are still the following problems in the airborne software security verification process:

[0006] 1) The security model modeling is not comprehensive: The application of model-driven development method in the field of airborne software development mainly focuses on the rapid construction of demand model and the automatic generation of code. The security problems in the model design and conversion process are not considered. The existing related methods mainly focus on typical security properties, including resource occupation conflict and functional logic security, which cannot cover the complex failure modes of airborne software. Moreover, the existing security analysis mainly depends on the quality department to carry out at the code level, and does not carry out comprehensive security modeling analysis at the model level in time, which leads to delayed security demonstration and high subsequent maintenance cost.

[0007] 2) The security testing process is not efficient: At present, when carrying out security testing, the test cases are designed by the test personnel according to the system hazards and software failure modes identified in the system hazard analysis and software failure mode analysis. The content of the software security test cases (including input, constraint condition, expected output, and passing criterion) is determined. However, this process is mainly designed manually by the test personnel, and the security test case set in the form of table is formed, which leads to the omission of test cases, incomplete coverage of security analysis criteria, long test process, low exposure efficiency of security defects, and delay of airborne software development progress. SUMMARY

[0008] Therefore, the present application provides an airborne software security modeling and automatic testing method, which is based on a security property extraction module, a model automatic expansion module, and a test case automatic generation module to solve the technical problems of insufficient model layer security testing and low test case generation efficiency in the prior art. The airborne software security modeling and automatic testing method comprises:

[0009] According to the field of the airborne software, the security property extraction module extracts the security property description required for security testing, and designs the airborne software SysML model. The XML file of the airborne software SysML model and the security property description are uploaded to the model automatic expansion module.

[0010] The model automatic expansion module expands the XML file of the airborne software SysML model according to the uploaded security property description, and supplements the node type and path information of the airborne software SysML model to generate an expanded model.

[0011] The test case automatic generation module generates comprehensive test paths and test data of the expanded model according to the expanded model output by the model automatic expansion module.

[0012] Furthermore, the safety property extraction module extracts the safety properties applicable to the airborne software from four categories of safety properties, namely, numerical over-limit category, data timing category, data communication category, and fault handling category.

[0013] Furthermore, the automatic model expansion module expands the onboard SysML software model using a large language model.

[0014] Furthermore, the large language model is the Qwen2-72B-Instict model.

[0015] Furthermore, the learning rate of the Qwen2-72B-Instict model is set to 5e-05 and / or 1e-05, the number of training epochs is set to 100 and / or 50, the optimizer is AdamW, the learning rate scheduler type is cosine annealing, and the LoRA dropout rate is 0.1.

[0016] Furthermore, the test case automatic generation module generates hyperparameters for the genetic algorithm and improves the individual mutation process through a large language model.

[0017] Furthermore, the test case automatic generation module generates test paths using an edge-first depth-first traversal method and generates test data using a genetic algorithm improved from a large language model.

[0018] Furthermore, the expanded model includes model elements required for testing the security of airborne software.

[0019] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least:

[0020] The SysML model for airborne software is extended to enhance its expressive power and cover security testing requirements. At the same time, the automated extension based on the large language model reduces the workload for users and enables the automatic generation of test cases, further improving the efficiency of airborne software security testing. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1A flowchart illustrating the method for airborne software security modeling and automated testing provided in this embodiment of the invention;

[0023] Figure 2 A schematic diagram illustrating the classification of security properties of the airborne software security modeling and automated testing method provided in this embodiment of the invention;

[0024] Figure 3 A schematic diagram illustrating the automatic model expansion of the airborne software security modeling and automated testing method provided in an embodiment of the present invention;

[0025] Figure 4 An edge-first traversal diagram illustrating the method for airborne software security modeling and automated testing provided in an embodiment of the present invention.

[0026] Figure 5 This is a schematic diagram illustrating the test data generation method for airborne software security modeling and automated testing provided in an embodiment of the present invention. Detailed Implementation

[0027] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0028] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] This invention provides a method for airborne software security modeling and automated testing. By extracting the security properties of airborne software, extending the SysML model of airborne software using a large language model, generating test paths using an edge-first traversal method, and generating test data using a genetic algorithm improved from the large language model, the method achieves automation of airborne software security analysis, thereby further improving the efficiency of airborne software security testing.

[0030] like Figure 1 As shown, in this embodiment of the invention, a method for airborne software security modeling and automated testing is implemented based on a security property extraction module, a model automatic expansion module, and a test case automatic generation module, specifically including:

[0031] Step S100: Based on the domain of the airborne software, extract the security properties required for security testing using the security property extraction module. At the same time, design the SysML model of the airborne software and upload the SysML model XML file and security property description to the model automatic expansion module.

[0032] Furthermore, in step S100, uploading the security properties and the SysML model XML file to the model auto-expansion module includes:

[0033] Step S101: The safety property extraction module extracts the safety properties applicable to the airborne software from four categories of safety properties, including numerical over-limit category, data timing category, data communication category, and fault handling category.

[0034] Specifically, in this embodiment, safety-related specifications were extracted from safety standard documents such as DO-178C and APR 4754A, and the failure mode characteristics of airborne software were systematically analyzed to form safety properties supporting safety testing. The corresponding classifications are as follows: Figure 2 As shown.

[0035] Step S102: The automatic model expansion module reads the security properties and SysML model XML file and completes the upload.

[0036] Step S200: The automatic model expansion module expands the SysML model XML file according to the uploaded security nature description, and supplements the model node type and path information. The expanded model includes the model elements required for airborne software security testing.

[0037] Furthermore, in step S200, the large language model is the Qwen2-72B-Instict model. In order to better adapt the large language model to this domain, it is necessary to fine-tune the model to understand and generate complex models related to security. The LoRA (Low-Rank Adaptation) parameter efficient fine-tuning technique is adopted, and two different learning rates (5e-05 and 1e-05), training epochs (100 and 50), optimizer (AdamW), learning rate scheduler type (cosine annealing), and LoRA dropout rate (0.1) are selected to introduce a low-rank structure into the weight matrix of the pre-trained model, so as to better adapt to the specific task or domain.

[0038] Furthermore, in step S200, the Prompt guides the model to more accurately understand user needs, significantly improving the relevance and quality of the generated content. The model's generation performance is compared using both Prompts with and without contextual text as input to the large language model. The process of expanding the model using the large language model is as follows: Figure 3 As shown.

[0039] In step S300, the test case automatic generation module generates a comprehensive test path and test data for the extended SysML model generated in step S200 based on the extended model output by the model automatic extension module. The test case automatic generation module generates the test path using the edge-first depth-first traversal method and generates the test data using a genetic algorithm improved from a large language model. The genetic algorithm is an optimization algorithm based on natural selection and genetic mechanisms. The standard steps include initializing hyperparameters, generating an initial population, calculating individual fitness, individual mutation, individual crossover, selecting individuals, and determining whether individuals meet the requirements.

[0040] Furthermore, the edge-first and depth-first traversal method recursively traverses all nodes and edges in the graph, recording all independent paths and edges traversed. Starting from the initial node, it gradually delves deeper into each unvisited edge until all edges have been visited. During the traversal, the current path and visited edges are dynamically updated, and a backtracking mechanism ensures the comprehensiveness and completeness of the traversal. The traversal algorithm is as follows: Figure 4 As shown.

[0041] Furthermore, the improved genetic algorithm method based on the large language model utilizes LLMs (Large Language Models) to optimize the hyperparameter selection and individual mutation process of the genetic algorithm. By training LLMs to recognize historical test data and corresponding algorithm performance data, the model can learn which hyperparameter settings are more effective in specific test scenarios, helping to automatically adjust the parameters of the genetic algorithm to adapt to different test requirements. Simultaneously, LLMs can propose more targeted mutation strategies based on a deep understanding of test data and system behavior, thereby improving the algorithm's global search capability. The test data generation process is as follows... Figure 5 As shown.

[0042] Furthermore, the method of improving genetic algorithms using large language models can significantly optimize the hyperparameter generation and individual mutation process of genetic algorithms. Through a deep understanding of the context, large language models can consider more comprehensive contextual information when generating hyperparameters, thereby improving the performance of genetic algorithms. Moreover, large language models can preserve and utilize the contextual relationships of the original data during the individual mutation process, ensuring that mutated individuals still meet the transformation triggering conditions.

[0043] Furthermore, a large language model is used to generate hyperparameters (POPULATIONIZE, CROSSOV-RATE, MUTATION-RATE, MAX GENERATES) for the genetic algorithm and improve the individual mutation process. Here, POPULATIONIZE is the number of candidate solutions retained and processed by the algorithm in each generation, CROSSOV-RATE is the probability that two individuals (parents) in the genetic algorithm exchange gene segments to generate new individuals (offspring), MUTATION-RATE is the probability that individual genes undergo random mutation in each generation, and MAX GENERATES is the maximum number of generations the genetic algorithm can run.

[0044] In summary, the embodiments of the present invention achieve the following technical effects:

[0045] The airborne software security modeling and automated testing method of this invention has higher development performance and efficiency. It realizes the extraction of security properties, and based on this, it extends the airborne software SysML model, enhancing the model's expressive power and covering security testing requirements. At the same time, the automated extension based on the large language model reduces the user's workload, and realizes the automatic generation of test cases, further improving the efficiency of airborne software security testing.

[0046] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for airborne software security modeling and automated testing, characterized in that, The method for airborne software security modeling and automated testing is based on a security property extraction module, an automatic model expansion module, and an automatic test case generation module, and includes: Based on the domain of the airborne software, the security property description required for security testing is extracted using the security property extraction module. At the same time, the airborne software SysML model is designed, and the XML file of the airborne software SysML model and the security property description are uploaded to the model automatic expansion module. The automatic model expansion module expands the XML file of the airborne software SysML model based on the uploaded security property description, and supplements the node type and path information of the airborne software SysML model to generate the expanded model. The automatic model expansion module expands the onboard software SysML model using a large language model, including: The design includes a Prompt with contextual text and a Prompt without contextual text. The model auto-expansion module takes the Prompt with contextual text, the Prompt without contextual text, and the security criteria as input to the large language model, expands the XML file of the airborne software SysML model, and outputs a security status diagram. The test case automatic generation module generates a comprehensive test path and test data for the extended model based on the extended model output by the model automatic extension module. The test case automatic generation module generates hyperparameters for the genetic algorithm and improves the individual mutation process through a large language model.

2. The method for airborne software security modeling and automated testing according to claim 1, characterized in that, The safety property extraction module extracts the safety properties applicable to the airborne software from four categories of safety properties, namely, numerical over-limit category, data timing category, data communication category, and fault handling category.

3. The method for airborne software security modeling and automated testing according to claim 1, characterized in that, The large language model is the Qwen2-72B-Instruct model.

4. The method for airborne software security modeling and automated testing according to claim 3, characterized in that, The learning rate of the Qwen2-72B-Instruct model is set to 5e-05 and / or 1e-05, the number of training epochs of the Qwen2-72B-Instruct model is set to 100 and / or 50, the optimizer of the Qwen2-72B-Instruct model is AdamW, the learning rate scheduler type of the Qwen2-72B-Instruct model is cosine annealing, and the dropout rate of the LoRA of the Qwen2-72B-Instruct model is 0.

1.

5. The method for airborne software security modeling and automated testing according to claim 1, characterized in that, The test case automatic generation module generates test paths using an edge-first depth-first traversal method and generates test data using a genetic algorithm improved from a large language model.

6. The method for airborne software security modeling and automated testing according to claim 1, characterized in that, The expanded model includes model elements required for testing the security of the airborne software.

Citation Information

Patent Citations

  • SysML security extension and automatic conversion method from SysML security extension to AADL fault model

    CN110286902A

  • Security-critical software verification method and device, equipment and medium

    CN114385501A