A software fault injection method, device and related media for an avionics system
By initializing the fault database, generating operation flows and parsing signals, faults are dynamically injected to solve the efficiency and accuracy problems of software fault injection in existing technologies, thus achieving flexible and comprehensive testing of avionics systems.
Patent Information
- Application Number
- CN202311502888.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-11-13
AI Technical Summary
The software fault injection methods in the existing technology have limitations in hardware platform adaptability and signal coverage, resulting in low test efficiency and accuracy.
By initializing the fault database, generating fault injection signal data, editing the operation flow and configuring the effectiveness rules, using the fault parser to parse the signal, dynamically injecting faults and monitoring the execution results, flexible fault injection into the avionics system is achieved.
It improves the efficiency and accuracy of fault injection testing, adapts to different hardware platforms, comprehensively covers software and hardware signals, and enhances the safety and effectiveness of testing.
Smart Images

Figure CN117555778B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of avionics systems, and in particular to a software fault injection method, device and related media for an avionics system. Background Art
[0002] With the development of electric aviation, fault injection techniques are mainly divided into hardware fault injection and software fault injection. For software fault injection, a common practice is to inject faults through static code instrumentation before software compilation. This requires pre-setting fault conditions during the code writing phase and removing the instrumentation code after testing. Although this method can test the software's fault handling logic without affecting the hardware, it is generally inefficient, especially when a large number of signals need to be covered.
[0003] Several software fault injection methods exist in the existing art, but each has its limitations. For example, fault injection through direct software control of hardware pins is limited to specific hardware platforms and lacks flexibility. Furthermore, hardware-dependent fault injection methods cannot fully cover the system's internal status signals, making it impossible to fully test the system's internal software's fault handling capabilities.
[0004] Dynamic fault injection, an emerging technology, aims to address these issues. Based on the actual operating conditions of a software system, it dynamically injects faults during operation to more realistically simulate fault conditions and test system responses. Therefore, there is an urgent need for a dynamic fault injection method that can flexibly adapt to different hardware platforms, comprehensively cover both software and hardware signals, and improve the efficiency and accuracy of fault injection testing. Summary of the Invention
[0005] The embodiments of the present invention provide a software fault injection method, apparatus and related media for an avionics system, aiming to solve the problems of low efficiency and accuracy of fault injection testing in the prior art.
[0006] In a first aspect, an embodiment of the present invention provides a software fault injection method for an avionics system, comprising:
[0007] Initialize the fault database and obtain fault injection signal data;
[0008] Using the fault injection signal data to edit and generate a fault injection operation flow corresponding to the fault injection target platform;
[0009] Editing a fault injection signal group and configuring a validation rule for the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow;
[0010] Sending a fault signal subscription request to the fault injection target platform, and receiving a fault signal returned by the fault injection target platform;
[0011] Analyzing the fault signal using a fault analyzer to obtain fault analysis data;
[0012] The fault injection operation flow is injected into the fault injection target platform using the fault injection control flow based on the fault analysis data, and an execution result of the fault injection target platform is returned.
[0013] In a second aspect, an embodiment of the present invention provides a software fault injection device for an avionics system, comprising:
[0014] Data initialization unit, used to initialize the fault database and obtain fault injection signal data;
[0015] A data generating unit, configured to generate a fault injection operation flow corresponding to a fault injection target platform by using the fault injection signal data;
[0016] A data configuration unit, configured to edit a fault injection signal group and configure a validation rule for the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow;
[0017] A data subscription unit, configured to send a fault signal subscription request to the fault injection target platform and receive a fault signal returned by the fault injection target platform;
[0018] a data analysis unit, configured to analyze the fault signal using a fault analyzer to obtain fault analysis data;
[0019] A data injection unit is configured to inject the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data, and return an execution result to the fault injection target platform.
[0020] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software fault injection method for the avionics system of the first aspect when executing the computer program.
[0021] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the software fault injection method of the avionics system of the first aspect is implemented.
[0022] An embodiment of the present invention provides a software fault injection method for an avionics system, comprising initializing a fault database to obtain fault injection signal data; editing and generating a fault injection operation flow using the fault injection signal data; configuring the effectiveness rules of the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow; sending a fault signal subscription request to the fault injection target platform and receiving the fault signal; parsing the fault signal using a fault parser to obtain fault parsing data; and injecting the fault injection operation flow into the fault injection target platform based on the fault parsing data using the fault injection control flow. The present invention injects the fault injection operation flow into the fault injection target platform based on the parsed fault parsing data using the fault injection control flow. In this way, the present invention can flexibly adapt to different hardware platforms and comprehensively cover software and hardware signals, thereby greatly improving the efficiency and accuracy of fault injection testing.
[0023] The embodiments of the present invention also provide a software fault injection device, a computer device, and a storage medium for an avionics system, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A flowchart of a software fault injection method for an avionics system provided by an embodiment of the present invention;
[0026] Figure 2 Another flowchart of a software fault injection method for an avionics system provided by an embodiment of the present invention;
[0027] Figure 3 A structural diagram of a fault database provided in an embodiment of the present invention;
[0028] Figure 4 This is a diagram illustrating an application example of a software fault injection method for an avionics system provided by an embodiment of the present invention;
[0029] Figure 5 A schematic block diagram of a software fault injection device for an avionics system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0031] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0032] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0033] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0034] See below Figure 1 , Figure 1 A flowchart of a software fault injection method for an avionics system provided by an embodiment of the present invention specifically includes steps S101 to S106.
[0035] S101, initializing the fault database to obtain fault injection signal data;
[0036] S102, using the fault injection signal data to edit and generate a fault injection operation flow corresponding to the fault injection target platform;
[0037] S103, editing the fault injection signal group and configuring the effectiveness rule of the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow;
[0038] S104, sending a fault signal subscription request to the fault injection target platform, and receiving a fault signal returned by the fault injection target platform;
[0039] S105, analyzing the fault signal using a fault analyzer to obtain fault analysis data;
[0040] S106 : Injecting the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data, and returning the execution result of the fault injection target platform.
[0041] Combine Figure 2 As shown, in step S101, a fault database is initialized. This database contains various predefined fault modes and parameters. The fault database contains various potential fault modes that may affect the avionics system, including but not limited to sensor failure, communication failure, and data processing errors. Specific parameters are set for each fault mode, describing the fault characteristics, such as duration, impact range, and fault intensity. These fault modes and their parameters are entered into the fault database, which is then structured and managed for rapid retrieval and updating. Based on the data in the fault database and the specific hardware and software configuration of the target platform for fault injection, adaptive fault injection signal data is dynamically generated.
[0042] Combine Figure 3 As shown, in one embodiment, step S101 includes:
[0043] Classify the IP signals, actuator signals, and internal control software signals corresponding to the equipment and sensors of the avionics system, and aggregate them to obtain multiple classified signal data;
[0044] Based on the hardware composition of the fault injection target platform, selecting the corresponding classification signal data and setting fault parameters for the classification signal data;
[0045] The set fault parameters are stored in the fault database to obtain the fault injection signal data.
[0046] In this embodiment, the input signals (IP signals), actuator signals (OP signals), and internal control software signals (CLAW signals) related to the avionics system's equipment and sensors are classified to form a structured signal dataset. The hardware composition of the target platform, including components such as the CPU, FPGA, and RAM, is analyzed to select corresponding classified signal data. Fault parameters are set for the selected signal data. These parameters describe the characteristics of the fault, such as duration, intensity, and impact range. The defined fault parameters are stored in a fault database, and fault injection signal data is generated for subsequent testing and verification.
[0047] Specifically, the operator first interacts through the user interface to define and classify signal data. Subsequently, the system automatically analyzes the hardware composition of the target platform and provides the operator with recommended signal data options. Through the user-guided algorithm, the setting of fault parameters becomes simple and intuitive. At the same time, the system ensures the consistency and accuracy of all fault parameters. After completing these steps, the fault database is initialized, and the test engineer can use the database to perform efficient fault injection testing. In addition, the present invention can also integrate machine learning and data analysis tools to optimize the setting of fault parameters and predict the possible consequences of fault injection. This intelligent method improves the effectiveness of the test and reduces the potential risks to the actual system. In this way, the present invention not only enhances the safety of fault injection testing, but also improves the efficiency and accuracy of the testing process.
[0048] In step S102, predefined fault signal data is read from the fault database. This data includes parameters such as fault type, expected impact, fault triggering conditions, and fault duration. The operator uses dedicated editing tools or software to construct the fault injection operation flow. During the editing process, the fault parameters need to be fine-tuned to suit the actual response of the target platform. For example, the fault triggering threshold can be adjusted or the fault duration can be modified to more closely mimic real-world fault behavior.
[0049] In one embodiment, step S102 includes:
[0050] Acquire the data type of the fault injection target platform; wherein the data type includes basic data, binary data and bool data;
[0051] Performing an editing and replacing operation on the basic data to change the original signal value, or performing an editing and accumulating operation to increase a predetermined value on the original signal value;
[0052] Performing a bitwise AND operation or a bitwise OR operation on the binary data to simulate a hardware-level fault;
[0053] Performing an edit enabling operation or a disabling operation on the bool type data to reflect a fault state of the logic control signal;
[0054] The edited basic data, binary data and bool data are integrated into a coherent operation flow based on the fault injection logic sequence to obtain the fault injection operation flow.
[0055] In this embodiment, the system needs to identify the data types supported by the fault injection target platform, including basic data types (such as integer and floating-point types), binary data, and bool data. This identification step is usually completed by analyzing the software interface documentation of the fault injection target platform or directly communicating with the fault injection target platform. For basic data types (such as uint8, int8, uint16, int16, uint32, int32, float, double, etc.), the present invention provides two editing operations:
[0056] Replace operation: Through the user interface or automated scripts, operators can specify new signal values to replace existing original signal values;
[0057] Accumulation operation: The system will add a predetermined value to the original signal value to simulate the fault of the signal value gradually shifting over time.
[0058] For binary data, the present invention provides two editing operations:
[0059] Bitwise AND operation: The system performs a logical AND operation on the original signal value and a specific binary mask to simulate the situation where a hardware failure causes some bits to be permanently set to 0.
[0060] Bit OR operation: Through the logical OR operation, you can simulate the scenario where a bit is permanently set to 1 due to a fault;
[0061] For bool type data, the present invention provides two editing operations:
[0062] Enable operation: The system sets the Bool type signal to true to simulate the activation state of the switch type control signal;
[0063] Disable operation: Instead, set the bool type signal to false to reflect the closed or invalid state.
[0064] After the above editing, the system needs to integrate all edited signals into a continuous fault injection operation flow according to the logical order of fault injection. This integration process takes into account the order and interdependencies of fault occurrence to ensure that the fault injection operation flow accurately simulates the actual manifestation of the fault. To improve the accuracy and reliability of the fault injection operation flow, the system can introduce advanced simulation tools and create a virtual replica of the target platform based on digital twin technology, allowing for comprehensive testing and verification of the fault injection operation flow without affecting the actual operating platform. Through the above steps, a precise and efficient fault injection operation flow that reflects the actual fault state can be generated. This method not only enhances the authenticity of the test process, but also improves the safety and efficiency of fault injection testing, providing strong technical support for the reliability assessment of avionics system software.
[0065] In step S103, the operator needs to edit the fault injection signal group, which includes grouping the signals, with each group simulating one or a series of related fault scenarios; specifying or editing the specific attributes of each signal, such as fault value, duration, and trigger conditions. Subsequently, it is necessary to set the effectiveness rules for each group of fault signals, including establishing the effectiveness time of each signal or signal group, as well as the interdependencies between them; configuring the conditional triggering rules to determine the activation of the fault injection signal group under the specific operating state of the fault injection target platform. Next, the edited fault injection signal group and the configured effectiveness rules are integrated into the fault injection control flow. The specific steps include: using a flowchart or similar tool to visualize the relationship between the fault injection signal group and the effectiveness rules; running the fault injection control flow in a simulation environment to verify its logic and effect; and adjusting and optimizing the fault injection signal group to ensure its accuracy and efficiency.
[0066] In one embodiment, step S103 includes:
[0067] Creating the fault injection signal group;
[0068] Editing the injection operation of the fault injection signal group; wherein the injection operation includes signal value modification and signal state switching;
[0069] Configuring an effectiveness rule for the edited fault injection signal group so that the fault injection signal group automatically takes effect when the fault injection signal group meets the effectiveness conditions;
[0070] The fault injection signal group is integrated to obtain the fault injection control flow.
[0071] In this embodiment, key signals and potential fault points in the avionics system are first identified. Based on the system's actual operating principles and test objectives, a series of fault signals are selected or defined. These signals are then combined into a fault injection signal group for centralized management and operation. Next, injection operations are edited for the created fault injection signal group. Editing injection operations involves modifying signal values, such as setting abnormal values or generating random values based on a specific algorithm; editing signal state transitions, such as transitions from normal to faulty states; and designing operational procedures to ensure that the injection operations accurately reflect the expected failure modes. After editing, activation rules are configured for the fault injection signal group. Activation conditions are set, such as a specific time, the occurrence of a specific event, or when the system state meets preset conditions. Activation logic is defined using conditional expressions or logical triggers to ensure that the fault injection signal group automatically activates when the conditions are met. Finally, the configured fault injection signal groups are integrated to generate a fault injection control flow. This embodiment provides a comprehensive and flexible fault injection method that can adapt to different testing requirements and platforms. Through the editing, configuration, and integration process, the accuracy and effectiveness of fault injection testing are ensured.
[0072] Combine Figure 4 As shown, in step S104, first, the communication unit (such as Figure 4 As shown in the figure, a fault signal subscription request will be sent to the target platform, specifically: defining the format and content of the subscription request, including the requested fault type and the required signal parameters; using a communication protocol (such as TCP / IP, CAN bus, etc.) to send the subscription request from the communication unit to the fault injection target platform; ensuring data security and integrity during the sending process; once the fault injection target platform receives the subscription request, it will return the fault signal according to the requested parameters. Furthermore, to improve the efficiency and intelligence level of fault signal management, advanced data processing algorithms such as streaming processing and event-driven architecture can be integrated to process and respond to fault signals in real time; developing a cloud-based fault signal management system that allows access and management of fault signals from any location and device; introducing machine learning technology to perform pattern recognition and predictive analysis on fault signals, thereby automatically optimizing fault subscription requests.
[0073] In step S105, the fault analyzer is a software tool or module that reads and identifies different types of fault signal data, decodes the fault signal data according to predefined rules and algorithms, and extracts fault characteristics and related parameters from the original fault signal. After receiving the fault signal returned by the fault injection target platform, the fault analyzer needs to analyze the fault signal: loading the received fault signal into the fault analyzer; running the fault analyzer, using data analysis techniques such as pattern recognition and time series analysis to ensure accurate analysis; during the analysis process, the fault analyzer identifies specific characteristics of the fault signal, such as sudden amplitude changes, frequency offsets, or waveform distortion; and generating fault signal feature data based on the analyzed characteristics.
[0074] In one embodiment, step S105 includes:
[0075] Utilizing the fault analyzer to analyze the received fault signal and identify characteristics of the fault signal to obtain fault signal characteristic data;
[0076] Mapping the fault signal to the corresponding fault injection target platform according to the fault signal characteristic data;
[0077] Verify whether the fault signal characteristic data is consistent with the fault processing logic of the fault injection target platform. If the fault processing logic is inconsistent, adjust the fault signal and analyze it again; if the fault processing logic is consistent, store the fault signal characteristic data in the fault database to obtain the fault analysis data.
[0078] In this embodiment, upon receiving a fault signal, the fault analyzer is triggered to begin the analysis process. Through algorithmic and logical analysis, the fault analyzer identifies abnormal features in the fault signal, such as unexpected signal transitions, periodic anomalies, or irregular noise patterns. Each identified feature is encoded as fault signal signature data, ready for subsequent mapping and verification steps. The fault signal signature data is mapped according to the specific requirements of the target platform to ensure that the data format and protocol conform to the platform standard. After mapping, a consistency verification is performed to compare the fault signal signature data with the target platform's fault handling logic. If any inconsistency is found, the fault analyzer adjusts the fault signal, including modifying signal parameters or changing the signal transmission logic, and re-executes the analysis process. If the verification passes, indicating that the fault signal signature data is consistent with the target platform logic, the data is stored in the fault database. The steps for storing the fault signal signature data include reserving sufficient space in the fault database to store the parsed data; using encryption and data integrity verification techniques to ensure the security of the storage process; and associating the fault signal signature data with the fault model and expected response for rapid retrieval and use in future tests.
[0079] Specifically, the numerical types of fault signals are as follows:
[0080] PHY32: 32-bit physical quantity, which can be described as a continuous single-precision floating-point data;
[0081] PHY64: 64-bit physical quantity, which can be described as a double-precision floating-point number;
[0082] BIN: Binary quantity, the signal can be described as a binary data;
[0083] ENUM: enumeration, signals can be described as some class enumeration values;
[0084] BOOL: logical value, the data type of this model can only be bool;
[0085] For additional signal attributes of PHY32 or PHY64 numeric types, only data of the PHY32 or PHY64 numeric type has this attribute. The specific contents of this attribute are: factor, offset, unit; among them, physical value = original value * factor + offset.
[0086] In step S106, the generated fault injection operation flow is synchronized with the fault injection control flow to trigger the predetermined fault at the appropriate time. Conditions and triggers are set in the fault injection control flow. These conditions and triggers are based on the real-time status of the fault injection target platform and the pre-set fault injection strategy. During the fault injection process, the fault injection target platform (corresponding to the fault injection target platform) is monitored in real time. Figure 4 Analyze the returned execution results and compare them with the expected fault impact to confirm the success of the fault injection. If the results do not meet expectations, adjust the fault injection parameters or strategies and re-execute the fault injection test (corresponding to Figure 4 Injection result evaluation unit in ).
[0087] In one embodiment, step S106 includes:
[0088] Retrieving the fault analysis data in the fault database and reading the required fault analysis data;
[0089] activating the fault injection control flow, and writing the read fault analysis data into the activated fault injection control flow;
[0090] The fault injection operation flow is injected into the fault injection target platform by controlling the fault injection control flow.
[0091] In this embodiment, specific fault analysis data is retrieved from a fault database using a database query language or interface, such as SQL or a specific API, to identify and select the required fault analysis data. The retrieved data ensures that it includes the fault type, expected behavior, impact range, and necessary parameters. Subsequently, the fault injection control process is initiated using the system's control software or scripts. The retrieved fault analysis data is loaded into the fault injection control flow, ensuring that each piece of data is correctly associated with the corresponding fault injection step. The specific fault injection operation flow involves executing the fault injection operation step by step according to the logic defined in the fault injection control flow, including software-level exception injection, hardware interface operations, or system configuration changes. The fault injection process is then monitored in real time to ensure that each step is executed according to the predetermined parameters and conditions.
[0092] In one embodiment, the step S106 further includes:
[0093] Creating a fault injection feedback mechanism to capture the current system state of the fault injection target platform and obtain system state data;
[0094] The system status data is received and combined with the execution result to generate a comprehensive fault injection report.
[0095] In this embodiment, the steps for establishing a fault injection feedback mechanism include: configuring monitoring tools and sensors on the fault injection target platform to capture real-time system status data, such as CPU usage, memory usage, and temperature readings; developing or configuring a software module to automatically collect this system status data and standardize it into a unified format. The collected system status data is processed in the following manner: real-time or periodic transmission of the system status data from the fault injection target platform to the system; ensuring the security and accuracy of the data transmission process. A comprehensive fault injection report is generated by combining the system status data and execution results. Specifically, analytical software is used to conduct in-depth analysis of the collected data to identify possible patterns and anomalies; the analysis results are combined with the execution results of the fault injection to assess the impact of the fault injection and the system's response; and a comprehensive report is generated that includes fault injection details, system performance indicators, and recommended actions. To enhance the effectiveness of this implementation, big data analytics and artificial intelligence algorithms can be integrated to more intelligently process and interpret the collected system status data. Cloud services can be used to support large-scale data storage, processing, and remote access to reports. A dynamic feedback system can be developed that not only provides historical data analysis but also enables real-time prediction of possible future system behavior and failure trends.
[0096] In summary, during the preparation phase of the software fault injection method for avionics systems, fault-related data is retrieved from a well-maintained fault database. This data represents various predefined fault modes that may affect avionics system operation. Subsequently, the fault injection control flow is configured and activated. Based on the retrieved fault analysis data, specific fault injection operation processes are pre-set into the system. These operation processes are designed to simulate possible faults in the actual operating environment and prepare for the subsequent test execution phase. During the test execution phase, the fault injection control flow triggers the fault injection operation process based on pre-set conditions. The fault injection operation process includes a series of actions, such as signal value modification and system state switching, which accurately simulate the occurrence of fault scenarios. To ensure the accuracy and effectiveness of the fault injection, the system state during the fault injection process is monitored in real time. The captured system state data is used to evaluate the immediate impact of the fault injection. Finally, during the test feedback phase, the fault injection results are comprehensively analyzed. The system state data, along with the fault injection execution results, are used to generate a comprehensive report that details the fault injection process, the system response, and recommended improvement measures. This feedback mechanism enables a comprehensive assessment of the fault tolerance capability of the avionics system, enabling optimization of the system design and performance. This software fault injection method for avionics systems provides a comprehensive and systematic solution for the testing and evaluation of avionics systems through structured data retrieval, precise fault simulation and in-depth result analysis.
[0097] Combine Figure 5 As shown, Figure 5 A schematic block diagram of a software fault injection device for an avionics system provided by an embodiment of the present invention. The software fault injection device 500 for an avionics system includes:
[0098] The data initialization unit 501 is used to initialize the fault database and obtain fault injection signal data;
[0099] A data generating unit 502 is configured to generate a fault injection operation flow corresponding to a fault injection target platform by using the fault injection signal data;
[0100] A data configuration unit 503 is configured to edit a fault injection signal group and configure a validation rule for the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow;
[0101] The data subscription unit 504 is configured to send a fault signal subscription request to the fault injection target platform and receive a fault signal returned by the fault injection target platform;
[0102] A data analysis unit 505 is configured to analyze the fault signal using a fault analyzer to obtain fault analysis data;
[0103] The data injection unit 506 is configured to inject the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data, and return an execution result to the fault injection target platform.
[0104] In this embodiment, the data initialization unit 501 initializes the fault database to obtain fault injection signal data; the data generation unit 502 uses the fault injection signal data to edit and generate a fault injection operation flow corresponding to the fault injection target platform; the data configuration unit 503 edits the fault injection signal group and configures the effectiveness rules of the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow; the data subscription unit 504 sends a fault signal subscription request to the fault injection target platform and receives the fault signal returned by the fault injection target platform; the data parsing unit 505 uses a fault parser to parse the fault signal to obtain fault parsing data; the data injection unit 506 uses the fault injection control flow to inject the fault injection operation flow into the fault injection target platform based on the fault parsing data, and returns the execution result of the fault injection target platform.
[0105] In one embodiment, the data generating unit 502 includes:
[0106] A type acquisition unit, configured to acquire a data type of the fault injection target platform; wherein the data type includes basic data, binary data, and bool data;
[0107] a first editing unit, configured to perform an editing and replacing operation on the basic data to change the original signal value, or perform an editing and accumulating operation to increase a predetermined value on the original signal value;
[0108] A second editing unit, configured to perform a bitwise AND operation or a bitwise OR operation on the binary data to simulate a hardware-level fault;
[0109] a third editing unit, configured to perform an editing enable operation or a disable operation on the bool type data to reflect a fault state of the logic control signal;
[0110] The data integration unit is used to integrate the edited basic data, binary data and bool data into a coherent operation flow based on the fault injection logic order to obtain the fault injection operation flow.
[0111] In one embodiment, the data configuration unit 503 includes:
[0112] A signal creation unit, configured to create the fault injection signal group;
[0113] A signal editing unit, configured to edit the injection operation of the fault injection signal group; wherein the injection operation includes signal value modification and signal state switching;
[0114] A signal configuration unit, configured to configure an effectiveness rule for the fault injection signal group after editing, so that the fault injection signal group automatically takes effect when the effectiveness condition is met;
[0115] A signal integration unit is used to integrate the fault injection signal group to obtain the fault injection control flow.
[0116] In one embodiment, the data parsing unit 505 includes:
[0117] a signal analysis unit, configured to analyze the received fault signal using the fault analyzer to identify characteristics of the fault signal and obtain fault signal characteristic data;
[0118] A signal mapping unit, configured to map the fault signal to the corresponding fault injection target platform according to the fault signal characteristic data;
[0119] A signal judgment unit is used to verify whether the fault signal characteristic data is consistent with the fault processing logic of the fault injection target platform. If the fault processing logic is inconsistent, the fault signal is adjusted and analyzed again; if the fault processing logic is consistent, the fault signal characteristic data is stored in the fault database to obtain the fault analysis data.
[0120] In one embodiment, the data injection unit 506 includes:
[0121] a fault analysis unit, configured to retrieve the fault analysis data from the fault database and read the required fault analysis data;
[0122] a fault reading unit, configured to activate the fault injection control flow and write the read fault analysis data into the activated fault injection control flow;
[0123] A fault injection unit is configured to inject the fault injection operation flow into the fault injection target platform by controlling the fault injection control flow.
[0124] In one embodiment, the data injection unit 506 further includes:
[0125] a mechanism creation unit, configured to create a fault injection feedback mechanism to capture the current system state of the fault injection target platform and obtain system state data;
[0126] The result returning unit is used to receive the system status data and generate a comprehensive fault injection report in combination with the execution result.
[0127] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0128] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed, the computer program can implement the steps provided in the above embodiments. The storage medium can include a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.
[0129] The present invention also provides a computer device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, the steps provided in the above embodiment can be implemented. Of course, the computer device may also include various network interfaces, a power supply, and other components.
[0130] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0131] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A software fault injection method for an avionics system, characterized in that: include: Initialize the fault database and obtain fault injection signal data; Generating a fault injection operation flow corresponding to a fault injection target platform by editing the fault injection signal data, including obtaining a data type of the fault injection target platform; wherein the data type includes basic data, binary data, and bool data; performing an editing and replacing operation on the basic data to change the original signal value, or performing an editing and accumulating operation to add a predetermined value to the original signal value; performing a bitwise AND operation or a bitwise OR operation on the binary data to simulate a hardware-level fault; performing an enabling operation or a disabling operation on the bool data to reflect the fault state of a logic control signal; and integrating the edited basic data, binary data, and bool data into a coherent operation flow based on a fault injection logic sequence to obtain the fault injection operation flow; Editing a fault injection signal group and configuring an effectiveness rule for the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow, including creating the fault injection signal group; editing the injection operation of the fault injection signal group; wherein the injection operation includes signal value modification and signal state switching; configuring an effectiveness rule for the edited fault injection signal group so that the fault injection signal group automatically takes effect when the effectiveness condition is met; and integrating the fault injection signal group to obtain the fault injection control flow; Sending a fault signal subscription request to the fault injection target platform, and receiving a fault signal returned by the fault injection target platform; Analyzing the fault signal using a fault analyzer to obtain fault analysis data; Injecting the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data, and returning an execution result to the fault injection target platform; The method of injecting the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data includes: retrieving the fault analysis data in the fault database and reading the required fault analysis data; activating the fault injection control flow and writing the read fault analysis data into the activated fault injection control flow; and injecting the fault injection operation flow into the fault injection target platform by controlling the fault injection control flow.
2. The software fault injection method for an avionics system according to claim 1, characterized in that: Initializing the fault database to obtain fault injection signal data includes: Classify the IP signals, actuator signals, and internal control software signals corresponding to the equipment and sensors of the avionics system, and aggregate them to obtain multiple classified signal data; Based on the hardware composition of the fault injection target platform, selecting the corresponding classification signal data and setting fault parameters for the classification signal data; The set fault parameters are stored in the fault database to obtain the fault injection signal data.
3. The software fault injection method for an avionics system according to claim 1, characterized in that: The method of analyzing the fault signal using a fault analyzer to obtain fault analysis data includes: Utilizing the fault analyzer to analyze the received fault signal and identify characteristics of the fault signal to obtain fault signal characteristic data; Mapping the fault signal to the corresponding fault injection target platform according to the fault signal characteristic data; Verify whether the fault signal characteristic data is consistent with the fault processing logic of the fault injection target platform. If the fault processing logic is inconsistent, adjust the fault signal and analyze it again; if the fault processing logic is consistent, store the fault signal characteristic data in the fault database to obtain the fault analysis data.
4. The software fault injection method for an avionics system according to claim 1, characterized in that: The returning the execution result of the fault injection target platform includes: Creating a fault injection feedback mechanism to capture the current system state of the fault injection target platform and obtain system state data; The system status data is received and combined with the execution result to generate a comprehensive fault injection report.
5. A software fault injection device for an avionics system, characterized in that: include: Data initialization unit, used to initialize the fault database and obtain fault injection signal data; A data generation unit is configured to generate a fault injection operation flow corresponding to a fault injection target platform by editing the fault injection signal data, including obtaining a data type of the fault injection target platform; wherein the data type includes basic data, binary data, and bool data; performing an editing and replacing operation on the basic data to change the original signal value, or performing an editing and accumulating operation to add a predetermined value to the original signal value; performing a bitwise AND operation or a bitwise OR operation on the binary data to simulate a hardware-level fault; performing an enabling operation or a disabling operation on the bool data to reflect the fault state of a logic control signal; and integrating the edited basic data, binary data, and bool data into a coherent operation flow based on a fault injection logic sequence to obtain the fault injection operation flow; A data configuration unit is configured to edit a fault injection signal group and configure an effectiveness rule for the fault injection signal group corresponding to the fault injection target platform to obtain a fault injection control flow, including creating the fault injection signal group; editing an injection operation for the fault injection signal group; wherein the injection operation includes signal value modification and signal state switching; configuring an effectiveness rule for the edited fault injection signal group so that the fault injection signal group automatically takes effect when the effectiveness condition is met; and integrating the fault injection signal group to obtain the fault injection control flow; A data subscription unit, configured to send a fault signal subscription request to the fault injection target platform and receive a fault signal returned by the fault injection target platform; a data analysis unit, configured to analyze the fault signal using a fault analyzer to obtain fault analysis data; a data injection unit, configured to inject the fault injection operation flow into the fault injection target platform using the fault injection control flow based on the fault analysis data, and simultaneously return an execution result to the fault injection target platform; The data injection unit is specifically used to retrieve the fault analysis data in the fault database and read the required fault analysis data; activate the fault injection control flow and write the read fault analysis data into the activated fault injection control flow; and inject the fault injection operation flow into the fault injection target platform by controlling the fault injection control flow.
6. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software fault injection method for an avionics system according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the software fault injection method for an avionics system according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Fault injection method and device, storage medium and terminal
CN116909787A