Search

CN-121979782-A - Method and device for testing embedded software of airborne equipment

CN121979782ACN 121979782 ACN121979782 ACN 121979782ACN-121979782-A

Abstract

The invention discloses a method and a device for testing embedded software of airborne equipment. The method comprises the steps of calculating a current clock deviation drift rate according to time information in a synchronous message sent by target equipment, calculating a predicted clock deviation with the target equipment according to the current clock deviation drift rate, dynamically adjusting clock frequency according to the preset clock deviation to be synchronous with the target equipment, and executing test cases to test software to be tested on the target equipment. The high-precision time synchronization method based on the drift self-adaptive synchronization algorithm solves the problems of real-time verification and time synchronization in the embedded software test, meets the requirement of high time precision of civil aircraft airborne equipment, and improves the accuracy and the robustness of test cases.

Inventors

  • Qiao Senqi
  • LI GUOCHAO
  • QU ZUNZUN
  • WANG KUN

Assignees

  • 苏州长风航空电子有限公司

Dates

Publication Date
20260505
Application Date
20251225

Claims (10)

  1. 1. An embedded software testing method for an airborne device is characterized by comprising the following steps: Calculating the current clock deviation drift rate according to the time information in the synchronous message sent by the target equipment; calculating a predicted clock bias with the target device according to the current clock bias drift rate; Dynamically adjusting the clock frequency according to the preset clock deviation and synchronizing with the target equipment; and executing the test case to test the software to be tested on the target equipment.
  2. 2. The method for testing embedded software of an on-board device according to claim 1, wherein calculating a current clock bias drift rate according to time information in the synchronization message comprises: Calculating the current clock deviation according to the time stamp in the synchronous message; Filtering the current clock deviation acquired for a plurality of times by using a weighted moving average algorithm; forming time sequence data by using the current clock deviation with continuous time sequence; and in the time sequence data, calculating the current clock deviation drift rate according to the current clock deviation adjacent to time sequence.
  3. 3. The method for testing embedded software of an on-board device according to claim 2, wherein calculating a current clock bias from a timestamp in the synchronization message comprises: Acquiring the sending time of the synchronous message And recording the message receiving time for receiving the synchronous message ; Sending a delay request message to the target equipment, and recording the message sending time ; Obtaining the message arrival time of the delay request message to the target device ; Calculating the current clock bias according to the following formula: 。
  4. 4. the method of testing embedded software of an on-board device of claim 1, wherein the calculating a predicted clock bias from the target device based on the current clock bias rate comprises: Smoothing the clock deviation drift rate by utilizing exponential smoothing; and calculating the predicted clock deviation according to the clock deviation drift rate after the smoothing processing.
  5. 5. The method for testing embedded software of an on-board device according to claim 4, wherein dynamically adjusting a clock frequency according to the predicted clock bias, synchronizing with the target device, comprises: according to the predicted clock deviation, a time synchronization model with negative feedback is utilized and a PID control algorithm is combined to obtain the drift amount of the clock; and adjusting the clock frequency according to the drift amount, and synchronizing with the target equipment.
  6. 6. The method for testing embedded software of an on-board device according to claim 1, wherein before the receiving the synchronization message sent by the target device, the method further comprises: Establishing a communication link with the target device; checking whether the executable code of the target equipment is consistent with the executable code in the software lifecycle data management platform, and if not, burning the latest executable code; And completing communication protocol conversion with the target equipment.
  7. 7. The method of testing embedded software of an on-board device of claim 6, wherein after said testing the target device with the test class, the method further comprises: after the test is completed, generating test data and a test report, and uploading the test data and the test report to the software life cycle data management platform; and automatically screening test cases after the test requirements of the target equipment are changed, and generating a test request.
  8. 8. An embedded software testing device for an airborne device, comprising: the clock deviation drift rate calculation module is used for calculating the current clock deviation drift rate according to the time information in the synchronous message sent by the target equipment; the clock deviation prediction module is used for calculating the predicted clock deviation with the target equipment according to the current clock deviation drift rate; The synchronous adjustment module is used for dynamically adjusting the clock frequency according to the preset clock deviation and synchronizing with the target equipment; and the test execution module is used for executing the test case to test the software to be tested on the target equipment.
  9. 9. An electronic device, comprising: One or more processors, and A memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the method of any of claims 1-7.
  10. 10. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1 to 7.

Description

Method and device for testing embedded software of airborne equipment Technical Field The invention relates to the technical field of software testing, in particular to an embedded software testing method and device for airborne equipment. Background The existing testing tool for the civil aircraft airborne equipment software focuses more on logic verification, lacks special support for interactive level verification of the software and hardware of the airborne embedded software, particularly has lower requirement on the synchronous time precision of master-slave equipment in the testing process, causes the problem of insufficient equipment performance and network delay, and cannot meet the operation requirement of the civil aircraft airborne equipment. Disclosure of Invention In order to solve at least one technical problem in the prior art, the embodiment of the invention provides an embedded software testing method and device for airborne equipment. The technical scheme is as follows: In a first aspect, there is provided an on-board embedded software testing method, the method comprising: Calculating the current clock deviation drift rate according to the time information in the synchronous message sent by the target equipment; calculating a predicted clock bias with the target device according to the current clock bias drift rate; Dynamically adjusting the clock frequency according to the preset clock deviation and synchronizing with the target equipment; and executing the test case to test the software to be tested on the target equipment. Further, the calculating the current clock deviation drift rate according to the time information in the synchronous message includes: Calculating the current clock deviation according to the time stamp in the synchronous message; Filtering the current clock deviation acquired for a plurality of times by using a weighted moving average algorithm; forming time sequence data by using the current clock deviation with continuous time sequence; and in the time sequence data, calculating the current clock deviation drift rate according to the current clock deviation adjacent to time sequence. Further, calculating the current clock deviation according to the timestamp in the synchronous message includes: Acquiring the sending time of the synchronous message And recording the message receiving time for receiving the synchronous message; Sending a delay request message to the target equipment, and recording the message sending time; Obtaining the message arrival time of the delay request message to the target device; Calculating the current clock bias according to the following formula: 。 further, the calculating the predicted clock bias with the target device according to the current clock bias rate includes: Smoothing the clock deviation drift rate by utilizing exponential smoothing; and calculating the predicted clock deviation according to the clock deviation drift rate after the smoothing processing. Further, the dynamically adjusting the clock frequency according to the predicted clock bias, synchronizing with the target device, includes: according to the predicted clock deviation, a time synchronization model with negative feedback is utilized and a PID control algorithm is combined to obtain the drift amount of the clock; and adjusting the clock frequency according to the drift amount, and synchronizing with the target equipment. Further, before the receiving the synchronization message sent by the target device, the method further includes: Establishing a communication link with the target device; checking whether the executable code of the target equipment is consistent with the executable code in the software lifecycle data management platform, and if not, burning the latest executable code; And completing communication protocol conversion with the target equipment. Further, after the testing of the target device with the test class, the method further comprises: after the test is completed, generating test data and a test report, and uploading the test data and the test report to the software life cycle data management platform; and automatically screening test cases after the test requirements of the target equipment are changed, and generating a test request. In a second aspect, there is provided an on-board embedded software testing apparatus, the apparatus comprising: And the clock deviation drift rate calculation module is used for calculating the current clock deviation drift rate according to the time information in the synchronous message sent by the target equipment. The clock deviation prediction module is used for calculating the preset clock deviation with the target equipment according to the current clock deviation drift rate; The synchronous adjusting module is used for dynamically adjusting the clock frequency according to the preset clock deviation and synchronizing with the target equipment; and the test execution module is used for executing the