Method and device for testing embedded software of airborne equipment

By calculating the clock drift rate and dynamically adjusting the clock frequency, combined with a software lifecycle data management platform, the problem of software and hardware interaction verification in the software testing of civil aircraft airborne equipment was solved, achieving high-precision time synchronization and automated testing, and improving the accuracy and consistency of testing.

CN121979782APending Publication Date: 2026-05-05SUZHOU CHANGFENG AVIATION ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511971819.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing software testing tools for civil aircraft lack specific support for verification at the software-hardware interaction level, resulting in insufficient equipment performance and network latency, which cannot meet the requirements for high time accuracy.

Method used

By calculating the clock deviation drift rate, the clock frequency is dynamically adjusted using a drift adaptive synchronization algorithm and a PID control algorithm to synchronize with the target device. This is combined with a software lifecycle data management platform to achieve automated testing and result uploading.

Benefits of technology

It improves the accuracy and robustness of test cases, reduces manpower and time costs, ensures the accuracy and consistency of testing, and meets the high time accuracy requirements of civil aircraft airborne equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979782A_ABST
    Figure CN121979782A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for testing embedded software of airborne equipment. The method comprises the following steps: calculating a current clock skew drift rate according to time information in a synchronization message sent by target equipment; calculating a predicted clock skew with the target device according to the current clock skew drift rate; dynamically adjusting the clock frequency according to the preset clock skew, and synchronizing with the target equipment; and executing the test case to test the to-be-tested software on the target equipment. According to the high-precision time synchronization method based on the drift adaptive synchronization algorithm, the problems of real-time verification and time synchronization in embedded software testing are solved, the requirement for high time precision of civil aircraft airborne equipment is met, and the precision and robustness of test cases are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to a method and apparatus for testing embedded software in airborne equipment. Background Technology

[0002] Current testing tools for airborne equipment software in civil aircraft focus more on logic verification and lack specific support for verification of the hardware-software interaction layer of airborne embedded software. In particular, the testing tools have low requirements for the synchronization time accuracy of master and slave devices during the testing process, resulting in insufficient equipment performance and network latency, which cannot meet the operational needs of airborne equipment in civil aircraft. Summary of the Invention

[0003] To address at least one technical problem existing in the prior art, embodiments of the present invention provide a method and apparatus for testing embedded software in airborne equipment. The technical solution is as follows:

[0004] Firstly, an airborne embedded software testing method is provided, the method comprising:

[0005] Calculate the current clock drift rate based on the time information in the synchronization message sent by the target device;

[0006] Calculate the predicted clock deviation from the target device based on the current clock deviation drift rate;

[0007] The clock frequency is dynamically adjusted according to the preset clock deviation to synchronize with the target device;

[0008] Execute test cases to test the software under test on the target device.

[0009] Further, the step of calculating the current clock skew rate based on the time information in the synchronization message includes:

[0010] Calculate the current clock offset based on the timestamp in the synchronization message;

[0011] The current clock deviation obtained multiple times is filtered using a weighted moving average algorithm;

[0012] Timing data is generated using the current clock deviation, which is sequentially continuous.

[0013] In the timing data, the current clock deviation drift rate is calculated based on the current clock deviations that are adjacent in timing.

[0014] Further, the current clock offset is calculated based on the timestamp in the synchronization message, including:

[0015] Obtain the synchronization message sending time And record the message reception time of receiving the synchronization message. ;

[0016] Send a delay request message to the target device and record the message sending time. ;

[0017] Obtain the arrival time of the delayed request message to the target device. ;

[0018] The current clock offset is calculated using the following formula:

[0019] .

[0020] Further, the step of calculating the predicted clock deviation from the target device based on the current clock deviation rate includes:

[0021] The clock skew rate is smoothed using exponential smoothing.

[0022] The predicted clock bias is calculated based on the smoothed clock bias drift rate.

[0023] Furthermore, the step of dynamically adjusting the clock frequency based on the predicted clock deviation to synchronize with the target device includes:

[0024] Based on the predicted clock deviation, the clock drift is obtained using a time synchronization model with negative feedback combined with a PID control algorithm.

[0025] Adjust the clock frequency according to the drift amount to synchronize with the target device.

[0026] Furthermore, before receiving the synchronization message from the target device, the method further includes:

[0027] Establish a communication link with the target device;

[0028] Check whether the executable code of the target device is consistent with the executable code in the software lifecycle data management platform. If they are inconsistent, burn the latest executable code.

[0029] The communication protocol is converted with the target device.

[0030] Furthermore, after testing the target device using the test class, the method further includes:

[0031] After the test is completed, test data and a test report are generated, and the test data and the test report are uploaded to the software lifecycle data management platform.

[0032] When the testing requirements for the target device change, test cases are automatically filtered and test requests are generated.

[0033] Secondly, an airborne embedded software testing device is provided, the device comprising:

[0034] The clock skew drift rate calculation module is used to calculate the current clock skew drift rate based on the time information in the synchronization message sent by the target device.

[0035] The clock skew prediction module is used to calculate the preset clock skew relative to the target device based on the current clock skew drift rate;

[0036] The synchronization adjustment module is used to dynamically adjust the clock frequency according to the preset clock deviation to synchronize with the target device;

[0037] The test execution module is used to execute test cases on the software under test on the target device.

[0038] In one embodiment, the clock skew drift rate calculation module specifically includes:

[0039] The current clock skew calculation module is used to calculate the current clock skew based on the timestamp in the synchronization message;

[0040] The filtering module is used to filter the current clock deviation obtained multiple times using a weighted moving average algorithm.

[0041] The timing data generation module is used to generate timing data using the current clock deviation that is timing continuous;

[0042] The drift rate calculation module is used to calculate the clock drift rate in timing data based on the current clock drift of adjacent timing data.

[0043] Furthermore, the current clock skew calculation module is specifically used for:

[0044] Obtain the synchronization message sending time And record the message reception time of receiving the synchronization message. ;

[0045] Send a delay request message to the target device and record the message sending time. ;

[0046] Obtain the arrival time of the delayed request message to the target device. ;

[0047] The current clock offset is calculated using the following formula:

[0048] .

[0049] Furthermore, the clock skew prediction module includes:

[0050] A smoothing module is used to smooth the clock skew drift rate using exponential smoothing;

[0051] The predicted clock deviation calculation module is used to calculate the predicted clock deviation based on the smoothed clock deviation drift rate.

[0052] Furthermore, the synchronization adjustment module is specifically used for:

[0053] Based on the predicted clock deviation, the clock drift is obtained using a time synchronization model with negative feedback combined with a PID control algorithm.

[0054] Adjust the clock frequency according to the drift amount to synchronize with the target device.

[0055] Furthermore, the apparatus disclosed in this invention further includes:

[0056] A communication module is used to establish a communication link with the target device;

[0057] The executable code checking module is used to check whether the executable code of the target device is consistent with the executable code in the software lifecycle data management platform. If they are inconsistent, the latest executable code is burned in.

[0058] The protocol conversion module is used to perform communication protocol conversion with the target device.

[0059] Furthermore, the apparatus disclosed in this invention further includes:

[0060] The test result generation module is used to generate test data and test reports after the test is completed, and upload the test data and test reports to the software lifecycle data management platform.

[0061] The test case filtering module is used to automatically filter test cases and generate test requests when the test requirements of the target device change.

[0062] Thirdly, an electronic device is provided, comprising:

[0063] One or more processors; and

[0064] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the method as described in any of the first aspects.

[0065] Fourthly, a computer-readable medium is provided having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any of the first aspects.

[0066] The beneficial effects of the technical solution provided by the embodiments of the present invention are as follows:

[0067] 1. The method disclosed in this invention is a high-precision time synchronization method based on the drift adaptive synchronization algorithm, which solves the real-time verification and time synchronization problem in software testing, meets the high time accuracy requirements of civil aircraft airborne equipment, and improves the accuracy and robustness of test cases;

[0068] 2. The method disclosed in this embodiment of the invention, in cooperation with a software lifecycle data management platform, realizes the automatic execution of software testing and automatically uploads test results and reports after testing, reducing labor and time costs, ensuring high test reproducibility, and improving the accuracy and consistency of verification work. Attached Figure Description

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

[0070] Figure 1 This is a flowchart of a testing method for embedded software in airborne equipment provided in an embodiment of the present invention;

[0071] Figure 2 This is a flowchart of a testing method for embedded software in airborne equipment provided in another embodiment of the present invention;

[0072] Figure 3 This is a schematic diagram of the structure of the airborne equipment embedded software testing device provided in an embodiment of the present invention;

[0073] Figure 4 This is a schematic diagram of the framework structure of the airborne equipment embedded software testing system provided in an embodiment of the present invention;

[0074] Figure 5 This is a schematic diagram of the electronic device structure provided in an embodiment of the present invention. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0076] As described in the background section, in order to address the problems existing in the prior art, this embodiment of the invention provides a method, apparatus, device, and computer-readable medium for testing embedded software in airborne equipment. The specific technical solution is as follows:

[0077] like Figure 1 As shown, an embedded software testing method for airborne equipment includes:

[0078] S1. Calculate the current clock offset drift rate based on the time information in the synchronization message sent by the target device.

[0079] As described above, the target device is an airborne device loaded with the software under test (SDP), acting as the master device sending the request. The test device simulates the actual operating environment of the SDP, acting as the slave device receiving the request. The Sync message is a message that identifies the start of the communication process; the master and slave devices synchronize data transmission through Sync messages.

[0080] The aforementioned time information can specifically be a timestamp. The current clock drift rate is primarily calculated based on the current time deviation between the master device's reference clock and the slave device's reference clock. For example, to ensure that the adapter in the automated physical testing system meets real-time requirements and avoids time errors caused by insufficient computer performance or network fluctuations, a drift-adaptive synchronization method can be used for active device clock synchronization. This method employs the PTP protocol's bidirectional timestamp mechanism for master-slave device clock synchronization, combines a clock drift compensation algorithm to predict the time drift between the master and slave devices, and finally dynamically adjusts the slave clock using a PID algorithm.

[0081] In one embodiment, step S1 includes:

[0082] S101. Calculate the current clock offset based on the timestamp in the synchronization message;

[0083] S102. Filter the current clock deviation obtained multiple times using a weighted moving average algorithm.

[0084] S103. Generate timing data based on the current clock deviation that is continuous in timing;

[0085] S104. In the timing data, calculate the current clock deviation drift rate based on the current clock deviation of adjacent timing data.

[0086] The process described above, which calculates the current clock offset, is a synchronization process between the master and slave devices. Specifically, it can be based on the PTP protocol for exchanging timestamp information. A weighted moving average algorithm is used to filter the multiple current clock offsets acquired, specifically including: using a weighted moving average algorithm to filter the current clock offsets acquired at least twice.

[0087] In one embodiment, step S101 includes:

[0088] Get the synchronization message sending time And record the message reception time of the received synchronization message. ;

[0089] Send a delay request message to the target device and record the message sending time. ;

[0090] Get the arrival time of the delayed request message to the target device. ;

[0091] The current clock offset is calculated using the following formula:

[0092] .

[0093] The above, exemplarily speaking, describes the calculation process for the current clock offset during PTP synchronization as follows:

[0094] The master clock of the automated testing system sends Sync messages over the network to mark the current timestamp. ;

[0095] Receive Sync messages from the clock and record the received timestamp. ;

[0096] After the Sync message is sent, the master clock will send a Follow_up message containing a timestamp. ;

[0097] Send a Delay_Req message from the slave clock and record the timestamp of the message leaving the slave clock. ;

[0098] The master clock records the timestamps of the arrival of the Delay_Req message. .

[0099] Calculate data transmission delay and clock skew using the following formulas:

[0100]

[0101]

[0102] In the formula, For data transmission delay, The current clock offset between the master and slave clocks.

[0103] As described above, the master clock periodically sends Sync messages, which contain the master clock's timestamp (originTimestamp) at the time of transmission. However, due to network transmission delays or processing time, the slave clock may not be accurate enough to directly use the timestamp in the Sync message. Therefore, after sending the Sync message, the master clock immediately sends a Follow_Up message, which carries more accurate timestamp information (e.g., supplementary information about the master clock's actual transmission time) to help the slave clock correct for deviations. Therefore, in this embodiment, when calculating data transmission delay and current clock deviation, the timestamp... The timestamp carried in the Follow_Up message can be used.

[0104] Regarding step S102, since the master clock periodically sends synchronization messages, multiple current clock deviations can be calculated based on step S101. A weighted moving average algorithm is used to filter the multiple collected current clock deviations to reduce the impact of jitter.

[0105]

[0106] In the formula, This is the weight value.

[0107] As described above, in step S203, a set of time series data is formed based on the continuous Offset values ​​collected in S202: .

[0108] Regarding step S104 above, the current clock offset drift rate between two adjacent data acquisitions is calculated:

[0109]

[0110] in, This represents the current clock skew drift rate. This is based on the difference in the current clock offset obtained from two consecutive synchronization messages. The time difference between adjacent current clock offsets is collected, for example, the current clock offset is collected at a sampling frequency of once per second.

[0111] S2. Calculate the predicted clock deviation of the target device based on the current clock deviation drift rate.

[0112] In order to improve the stability of clock skew prediction, the embodiments of the present invention use smoothing processing on the current clock skew drift rate.

[0113] In one embodiment, step S2 includes:

[0114] S201. Use exponential smoothing to smooth the current clock skew drift rate.

[0115] S202. Calculate the predicted time deviation from the target device based on the current clock deviation drift rate after smoothing.

[0116] As described above, step S201 uses exponential smoothing of the most recent drift rate to improve prediction stability. The current clock skew drift rate after smoothing is:

[0117]

[0118] In the formula, For the smoothing exponent, preferably, Take 0.2.

[0119] In step S202 above, assuming the drift rate remains constant for a short period of time, the future drift value is estimated using the smoothed current clock deviation drift rate prediction model, resulting in the predicted clock deviation value:

[0120] .

[0121] S3. Dynamically adjust the clock frequency based on the predicted clock deviation to synchronize with the target device.

[0122] As mentioned above, although S2 predicts the clock skew, directly adjusting the slave device's clock based on the skew would introduce errors from the clock skew measurement device itself, leading to excessive time fluctuations and decreased time accuracy in the slave device. Therefore, this embodiment treats the master-slave device time synchronization model as a control system model with negative feedback, and defines its control input using a PID control algorithm:

[0123]

[0124] in, , , , These are the PID control parameters (proportional, integral, and derivative gain).

[0125] The output u(t) of the PID control system is directly used to adjust the slave clock frequency, gradually bringing it closer to the master clock time. The adjusted slave clock frequency is:

[0126]

[0127] in, For the adjusted slave clock frequency, This is the current slave clock frequency.

[0128] S4. Execute test cases to test the software under test on the target device.

[0129] As described above, step S4, testing the target device, includes executing a test program, capturing the target device's output data and the corresponding timestamps, comparing the output data with the expected output data, and comparing the timestamps with the expected time, thereby obtaining the real-time verification result. For example, a Python interpreter is selected to execute the test program, and the test is waited for to complete.

[0130] In one embodiment, prior to step S1, the method disclosed in this embodiment of the invention further includes:

[0131] Establish a communication link with the target device;

[0132] Check whether the executable code of the target device is consistent with the executable code in the software lifecycle data management platform. If they are inconsistent, burn the latest executable code.

[0133] Complete the communication protocol conversion with the target device.

[0134] The above embodiments of the present invention disclose the process of completing the communication protocol conversion with the target device before testing. A communication link is established with the target device, simulating the physical connection between the target device and external devices using a specified communication protocol (such as USART, IIC, SPI, etc.) through an interface. Using the checksum generated after software compilation, the executable target code of the target machine is compared with the version controlled by the software lifecycle management platform. If they are inconsistent, the latest version of the controlled executable target code is burned using a programmer. The automated test program calls a communication function (if the specified communication protocol is IIC, the communication function can be USB2IIC) to receive protocol data, causing it to generate data line and clock line levels according to the specified communication protocol (such as USART, IIC, SPI, etc.) specifications, thus completing the data protocol conversion.

[0135] As described above, the Software Lifecycle Data Management (ALM) platform is a visual platform for storing and managing test cases, test results, and test reports. The platform can automatically export all automated test cases and their corresponding IDs, create a test class for each test case, and create a test function for each step in each test case and procedure, assigning each function to the corresponding test class.

[0136] In one embodiment, after step S4, the method disclosed in this embodiment of the invention further includes:

[0137] After the test is completed, test data and test reports are generated and uploaded to the software lifecycle data management platform.

[0138] When the testing requirements for the target device change, test cases are automatically filtered and test requests are generated.

[0139] As described above, after the test is completed, corresponding test data and a test report are generated based on the test case ID. The test report, along with the test data, is uploaded to the Software Lifecycle Data System (ALM) to achieve data control. Furthermore, when any high-level software requirement in the ALM changes, the automated physical testing system, based on the software test case ID traced back to the high-level software requirement ID, selects the software test cases that need to be re-executed, re-executes the test cases, and updates the test report. Thus, this embodiment of the invention automates software testing, reducing manual intervention.

[0140] like Figure 2 As shown, based on the two embodiments described above, the sequential process of the testing method disclosed in this invention includes:

[0141] S1' connects to the target device, simulates the input data of the specified communication protocol, and sets the expected output data and expected time;

[0142] S2' synchronizes with the target device's startup time, automatically executes test cases, captures output data and data timestamps, and compares them with the expected output and expected time;

[0143] The S3' real-time verification results and test report are uploaded together to the software lifecycle data management platform;

[0144] S4' When requirements change, it automatically filters out test cases related to the changed requirements and prompts the user to re-execute the relevant tests.

[0145] Based on the above-described airborne device embedded software testing method disclosed in the embodiments of the present invention, such as Figure 3 As shown, this embodiment of the invention also provides an airborne equipment embedded software testing device, comprising:

[0146] The clock skew drift rate calculation module 301 is used to calculate the current clock skew drift rate based on the time information in the synchronization message sent by the target device.

[0147] The clock deviation prediction module 302 is used to calculate the preset clock deviation from the target device based on the current clock deviation drift rate.

[0148] The synchronization adjustment module 303 is used to dynamically adjust the clock frequency according to the preset clock deviation to synchronize with the target device;

[0149] Test execution module 304 is used to execute test cases to test the software under test on the target device.

[0150] In one embodiment, the clock skew drift rate calculation module specifically includes:

[0151] The current clock skew calculation module is used to calculate the current clock skew based on the timestamp in the synchronization message;

[0152] The filtering module is used to filter the current clock deviation obtained multiple times using a weighted moving average algorithm.

[0153] The timing data generation module is used to generate timing data using the current clock deviation that is timing continuous;

[0154] The drift rate calculation module is used to calculate the clock drift rate in timing data based on the current clock drift of adjacent timing data.

[0155] In one embodiment, the current clock skew calculation module is specifically used for:

[0156] Obtain the synchronization message sending time And record the message reception time of receiving the synchronization message. ;

[0157] Send a delay request message to the target device and record the message sending time. ;

[0158] Obtain the arrival time of the delayed request message to the target device. ;

[0159] The current clock offset is calculated using the following formula:

[0160] .

[0161] In one embodiment, the clock skew prediction module includes:

[0162] A smoothing module is used to smooth the clock skew drift rate using exponential smoothing;

[0163] The predicted clock deviation calculation module is used to calculate the predicted clock deviation based on the smoothed clock deviation drift rate.

[0164] In one embodiment, the synchronization adjustment module is specifically used for:

[0165] Based on the predicted clock deviation, the clock drift is obtained using a time synchronization model with negative feedback combined with a PID control algorithm.

[0166] Adjust the clock frequency according to the drift amount to synchronize with the target device.

[0167] In one embodiment, the apparatus disclosed in this invention further includes:

[0168] A communication module is used to establish a communication link with the target device;

[0169] The executable code checking module is used to check whether the executable code of the target device is consistent with the executable code in the software lifecycle data management platform. If they are inconsistent, the latest executable code is burned in.

[0170] The protocol conversion module is used to perform communication protocol conversion with the target device.

[0171] In one embodiment, the apparatus disclosed in this invention further includes:

[0172] The test result generation module is used to generate test data and test reports after the test is completed, and upload the test data and test reports to the software lifecycle data management platform.

[0173] The test case filtering module is used to automatically filter test cases and generate test requests when the test requirements of the target device change.

[0174] The above, exemplarily, such as Figure 4 As shown, the system architecture of the airborne equipment embedded software testing device disclosed in this invention specifically includes:

[0175] Hardware layer: mainly includes adapters with high-precision time synchronization mechanisms, used to simulate other devices that interact with the avionics equipment under test.

[0176] Driver layer: Provides drivers for the adapter, supports its parsing of communication protocols such as USART, IIC, and SPI, controls its operation, including data transmission, reception, and logical operations, and provides driver support for time synchronization.

[0177] Framework Layer: Based on the Pytest testing framework, this layer extends test management functionality, adding a time synchronization module, a test result annotation information collection module, and a test report customization module. During test execution, the framework layer captures data and its timestamps returned by the hardware layer, compares them with expected time constraints, automatically generates test reports, and determines whether the test passes or fails.

[0178] The logic layer contains specific test cases and business logic. Test cases define the adapter's behavior (i.e., sending and receiving data through the interface), assertion conditions, and the execution order of test steps. The logic for the high-precision time synchronization method is also included.

[0179] Application layer: Provides test management and analysis tools, including test case management, test report generation and uploading, test result visualization, executable object code version confirmation and burning functions, and requirement and test case change notification functions.

[0180] In the above framework, the clock skew rate calculation module, clock skew prediction module, and synchronization adjustment module are all located at the framework layer. The communication module and protocol conversion module are located at the hardware layer, specifically as an adapter. The executable code inspection module, test result generation module, and test case filtering module are located at the application layer. The test execution module is located at the logic layer.

[0181] For example Figure 4 As shown, in the actual testing process, the hardware layer adapter first acts as the device interconnected with the device under test (DUT), simulating the actual operating environment of the DUT. After ensuring the correct executable code version in the target machine, the application layer enables the master-slave clock synchronization function and drives the test program to execute. After the test is completed, the application layer automatically generates a test report that meets the DO-178C target requirements, recording each step of the test and its results in detail, and automatically uploads it to the Lifecycle Data Management (ALM) platform for control.

[0182] In addition, this invention also provides an electronic device, including:

[0183] One or more processors; and

[0184] A memory associated with the one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the airborne embedded software testing method disclosed in the above embodiments.

[0185] Among them, such as Figure 5 As shown, computer device 12 is represented as a general-purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing units 16). Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0186] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0187] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (not shown, commonly referred to as a "hard disk drive"). Although not shown in the figures, disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disk drives for reading and writing to removable non-volatile optical discs (e.g., CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.

[0188] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0189] The computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via the input / output (I / O) interface 22. Furthermore, in this embodiment, the display 24 of the computer device 12 is not an independent entity, but is embedded in a mirror, so that when the display surface of the display 24 is not displayed, the display surface of the display 24 and the mirror surface visually blend together. Moreover, the computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0190] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28.

[0191] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0192] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

[0193] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of the present invention, and will not be described in detail here.

[0194] The above description is only a preferred embodiment of the present invention and is not intended to limit 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 testing embedded software in airborne equipment, characterized in that, include: Calculate the current clock drift rate based on the time information in the synchronization message sent by the target device; Calculate the predicted clock deviation from the target device based on the current clock deviation drift rate; The clock frequency is dynamically adjusted according to the preset clock deviation to synchronize with the target device; Execute test cases to test the software under test on the target device.

2. The method for testing embedded software in airborne equipment as described in claim 1, characterized in that, The step of calculating the current clock offset drift rate based on the time information in the synchronization message includes: Calculate the current clock offset based on the timestamp in the synchronization message; The current clock deviation obtained multiple times is filtered using a weighted moving average algorithm; Timing data is generated using the current clock deviation, which is sequentially continuous. In the timing data, the current clock deviation drift rate is calculated based on the current clock deviations that are adjacent in timing.

3. The method for testing embedded software in airborne equipment as described in claim 2, characterized in that, Calculate the current clock offset based on the timestamp in the synchronization message, including: Obtain the synchronization message sending time And record the message reception time of receiving the synchronization message. ; Send a delay request message to the target device and record the message sending time. ; Obtain the arrival time of the delayed request message to the target device. ; The current clock offset is calculated using the following formula: 。 4. The method for testing embedded software in airborne equipment as described in claim 1, characterized in that, The step of calculating the predicted clock deviation from the target device based on the current clock deviation rate includes: The clock skew rate is smoothed using exponential smoothing. The predicted clock bias is calculated based on the smoothed clock bias drift rate.

5. The method for testing embedded software in airborne equipment as described in claim 4, characterized in that, The step of dynamically adjusting the clock frequency based on the predicted clock deviation to synchronize with the target device includes: Based on the predicted clock deviation, the clock drift is obtained using a time synchronization model with negative feedback combined with a PID control algorithm. Adjust the clock frequency according to the drift amount to synchronize with the target device.

6. The method for testing embedded software in airborne equipment as described in claim 1, characterized in that, Before receiving the synchronization message from the target device, the method further includes: Establish a communication link with the target device; Check whether the executable code of the target device is consistent with the executable code in the software lifecycle data management platform. If they are inconsistent, burn the latest executable code. The communication protocol is converted with the target device.

7. The method for testing embedded software in airborne equipment as described in claim 6, characterized in that, After testing the target device using the test class, the method further includes: After the test is completed, test data and a test report are generated, and the test data and the test report are uploaded to the software lifecycle data management platform. When the testing requirements for the target device change, test cases are automatically filtered and test requests are generated.

8. An embedded software testing device for airborne equipment, characterized in that, include: The clock skew drift rate calculation module is used to calculate the current clock skew drift rate based on the time information in the synchronization message sent by the target device. A clock skew prediction module is used to calculate the predicted clock skew with the target device based on the current clock skew drift rate. A synchronization adjustment module is used to dynamically adjust the clock frequency according to the preset clock deviation to synchronize with the target device; The test execution module is used to execute test cases to test the software under test on the target device.

9. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the method as described in any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.