Airborne avionics interface communication data recording method, system and device and storage medium
Through the initialization of the onboard avionics system and the unified data format, the recording problem of diversified communication interfaces is solved, efficient and reliable data recording is achieved, and data integrity and traceability are ensured.
Patent Information
- Application Number
- CN202510309646.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-11
AI Technical Summary
Traditional airborne avionics system data recording methods cannot meet the needs of diversified communication interfaces, resulting in high development difficulty, high cost, and limited storage resources, affecting the continuity and traceability of data.
By initializing the system when powering on, including directory name calibration, hard disk space inspection and data format uniformity, data recording scalability and reliability are achieved, hard disk space inspection is used for efficient memory management, ensuring the integrity and continuity of data records, and ensuring the traceability of data records through directory name calibration mechanism.
It improves the scalability and coupling of data records in airborne avionics systems, ensures the integrity and continuity of the latest data records, and ensures the traceability of data records.
Smart Images

Figure CN120295956A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of interface concentricity, and in particular relates to a method, system, device and storage medium for recording airborne avionics interface communication data. Background Art
[0002] In the context of digitization and intelligence, as the hub of information interaction, embedded systems are widely used in all walks of life. Especially in the application of airborne avionics systems, they have become the core for ensuring flight safety, improving flight efficiency and realizing advanced aviation functions. The airborne avionics system integrates a large number of high-precision sensors, complex control algorithms and high-speed data communication interfaces, and has extremely high requirements for the accuracy, real-time and reliability of data. For complex airborne avionics systems, the data recording function is not only a necessary, common and efficient debugging and development means, but also an important maintenance means. However, with the diversification of communication interface types and the explosive growth of data volume, the traditional data recording method can no longer meet the needs of complex airborne avionics systems.
[0003] Specifically, the airborne avionics system often uses a variety of communication methods, such as serial ports, CAN buses, Ethernet, RapidIO, etc. Sometimes it is also necessary to record the communication data of each device separately, so there are many communication buses and interfaces involved. The communication protocols and data formats of these interfaces are significantly different, resulting in the need for customized development of data recording software for each interface, which not only increases the development difficulty but also raises the cost. At the same time, with the continuous expansion of the application scenarios of airborne avionics systems, new communication interfaces and data types are constantly emerging. Traditional data recording methods are often unable to be flexibly expanded, requiring a large amount of code modification or re-development, which also reduces the development efficiency.
[0004] Secondly, the storage resources of the airborne avionics system are limited. When the system runs for a long time, a large amount of data recording will eventually exhaust the hard disk resources, and the subsequent recorded data will overwrite the previous content, which is very likely to cause the loss of important data and affect the continuity and timeliness of the data.
[0005] Finally, data recording has very high requirements for its traceability. Obtaining the accurate date when the data is generated during debugging or maintenance is a basic condition for analyzing the data. For an embedded system, the accurate date usually comes from an independent timing module. When the system is powered on, it cannot be guaranteed that the timing module is powered on before the data recording module; therefore, the data recording function may obtain inaccurate dates, which affects the traceability of data recording. Summary of the Invention
[0006] In view of this, this application aims to propose a method, system, device and storage medium for recording airborne avionics interface communication data to solve at least one of the above problems.
[0007] To achieve the above object, the technical solution of the present application is implemented as follows: In a first aspect, the present application provides a method for recording airborne avionics interface communication data, including: Initializing the data recording for the current system power-on, where the initialization at least includes calibrating the directory name of the previous power-on data record, checking the hard disk space, creating a directory for the current power-on data record, and creating files and resources required for the data recording function; Parsing the communication data of each interface into a unified format for data recording and sending it to the data recording message list; The data recording task reads the data to be recorded in the message queue and writes it into the data recording file of the corresponding interface under the current recording directory for data storage.
[0008] In a second aspect, based on the same inventive concept, the present application further provides an airborne avionics interface communication data system, including: A data recording initialization module configured to initialize the data recording for the current system power-on, where the initialization at least includes calibrating the directory name of the previous power-on data record, checking the hard disk space, creating a directory for the current power-on data record, and creating files and resources required for the data recording function; A data parsing module configured to parse the communication data of each interface into a unified format for data recording and send it to the data recording message list; A data storage module configured to read the data to be recorded in the message queue by the data recording task and write it into the data recording file of the corresponding interface under the current recording directory for data storage.
[0009] In a third aspect, based on the same inventive concept, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method described in the first aspect when executing the program.
[0010] In a fourth aspect, based on the same inventive concept, the present application further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the method described in the first aspect.
[0011] Compared with the prior art, the airborne avionics interface communication data recording method, system, device, and storage medium of the present application have the following beneficial effects: The airborne avionics interface communication data recording method, system, device and storage medium described in this application can efficiently and reliably record the communication data of multiple interfaces in the avionics system, improve the scalability and coupling of data recording for new interfaces through data parsing; at the same time, perform efficient memory management through hard disk space checking to ensure the integrity and continuity of the latest data recording. In addition, through the data recording directory name calibration mechanism, the traceability of data recording is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings: Figure 1 It is a flowchart of a method for recording airborne avionics interface communication data according to an embodiment of this application; Figure 2 It is a schematic diagram of the data recording processing process according to an embodiment of this application; Figure 3 It is a flowchart of the data recording directory name calibration according to an embodiment of this application; Figure 4 It is a flowchart of the hard disk space check according to an embodiment of this application; Figure 5 It is a structure diagram of the unified format of data recording according to an embodiment of this application; Figure 6 It is a flowchart of the data recording resource creation according to an embodiment of this application; Figure 7 It is a schematic diagram of the content recorded in the interface weight file according to an embodiment of this application; Figure 8 It is a schematic diagram of the structure of an airborne avionics interface communication data recording system according to an embodiment of this application; Figure 9 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0013] To make the objectives, technical solutions and advantages of this application clearer and more understandable, the following further elaborates on this application in detail with reference to specific embodiments and the accompanying drawings.
[0014] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of this application should have the ordinary meanings understood by those with ordinary skills in the field to which this application belongs. The "first", "second" and similar terms used in the embodiments of this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to represent relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0015] The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0016] Please refer to Figure 1 As shown, this embodiment provides an airborne avionics interface communication data recording method, which specifically includes the following steps: Step S101: Initialize the data recording for the current system power-on. Among them, the initialization includes at least calibrating the directory name of the previous power-on data record, checking the hard disk space, creating the directory for the current power-on data record, and creating the files and resources required for the data recording function.
[0017] Step S102: Parse the communication data of each interface into a unified format for data recording, and send it to the data recording message list.
[0018] Step S103: The data recording task reads the data to be recorded in the message queue and writes it into the data record file of the corresponding interface under the current record directory for data storage.
[0019] Specifically, in this embodiment, as Figure 2 shown, the overall design process of this method includes data recording initialization, data acquisition, and data storage; among them, data recording initialization mainly includes calibrating the directory name of the previous power-on data record, checking the hard disk space, creating the directory for the current power-on data record, and creating the files and resources required for the data recording function; the data acquisition process mainly includes that the parsing function of each interface parses the communication data of each interface into a unified format for data recording, and then calls the sending function of data recording to send the data in the unified format to the data recording message queue; data storage is the last step of data recording. The data recording task reads the data to be recorded in the message queue and writes it into the data record file of the corresponding interface under the current record directory.
[0020] An airborne avionics interface communication data recording method described in this embodiment can efficiently and reliably record the communication data of multiple interfaces in the avionics system, improve the scalability and coupling of data recording for new interfaces through data parsing; at the same time, perform efficient memory management through hard disk space checking to ensure the integrity and continuity of the latest data records. In addition, through the data recording directory name calibration mechanism, the traceability of data records is ensured.
[0021] In some embodiments, the data recording directory name calibration includes: In response to successfully obtaining the power-on time information stored during the last system power-on, edit the directory name of the last power-on data log according to the power-on time information, delete the existing data log directory, and rename the directory to the edited last power-on data log directory name; If the acquisition of the power-on time information fails, traverse the data log directory, obtain the last valid power-on time information, and name the directory in the way of the last successfully obtained power-on time + count.
[0022] Specifically, in this embodiment, each time the system is powered on, the name of the data recording directory for the last power-on will be calibrated according to the date file recorded during the last power-on, and the data recording directory for this power-on and the data recording files corresponding to each interface will be created; Furthermore, after the system is powered on, first create a time log file and record the current power-on time. This time file is used for updating the directory name during the next power-on. Then, perform data recording initialization. First, rename the directory name of the data record for the last power-on. The detailed process is as Figure 3 shown. The directory is named in the way of power-on time + count, and the power-on time comes from the time log file stored during the last power-on. When the acquisition of the power-on time fails, obtain the folder name with the latest time, and name the directory in the way of the last successfully obtained power-on time + count.
[0023] In this step, when the system is powered on, renaming the last data record storage directory according to the date file stored during the last power-on can avoid the problem of inaccurate corresponding dates of data records caused by the timing module powering on later than the data recording module, ensuring the traceability of data.
[0024] In some embodiments, the hard disk space check includes: Traverse the hard disk for data record storage, count the number of data record directories, and calculate the directory cleaning threshold according to a preset ratio; Find the data record directory with the latest record date, and calculate the data record weight of each interface during the operation of this flight of the system according to the interface weight file in the current directory; Determine whether the remaining hard disk space is not less than a preset capacity safety threshold. In response to the remaining hard disk space being less than the capacity safety threshold, perform a file deletion operation based on a preset capacity deletion policy until the remaining hard disk capacity is greater than the preset capacity deletion threshold. The capacity deletion policy includes deleting the interface data record file with the lowest weight according to the calculated data record weight result; In response to the remaining hard disk space being greater than or equal to the capacity safety threshold, close the hard disk directory; Among them, the capacity deletion policy includes: Determine whether the remaining hard disk space is greater than a preset capacity deletion threshold. In response to the remaining hard disk space being less than the capacity deletion threshold, traverse the data log directory, find the next earliest created directory according to the current operation directory identifier, and update the current operation directory identifier. Determine whether the data log directory cleaning count has reached the directory cleaning threshold. In response to not reaching the directory cleaning threshold, delete the interface data record file with the lowest weight according to the interface weight file in the current directory until the remaining hard disk space is greater than the capacity deletion threshold. In response to reaching the directory cleaning threshold, initialize the current operation directory identifier and clear the directory cleaning count, and repeat the deletion operation until the remaining hard disk space is greater than the capacity deletion threshold; In response to the remaining hard disk space being greater than the capacity deletion threshold, close the hard disk directory.
[0025] Specifically, in this embodiment, the hard disk space check execution process is as Figure 4 shown. Each time the power is turned on, it is detected whether the remaining storage space meets the requirements, which mainly includes the following steps: Step S201: Traverse the data record storage hard disk, count the number of data record directories, and calculate the directory cleaning threshold according to a preset ratio.
[0026] Among them, the directory cleaning threshold means that in each round of capacity deletion, find the interface data record file with the lowest weight in the earliest N directories created in sequence. If the remaining hard disk space still does not meet the requirements after a round of deletion of N files, repeat the above steps for the second round of hard disk space (i.e., hard disk capacity) cleaning; Step S202: Find the data record directory with the latest record date, and calculate the final weight of each interface during the current operation of the system according to the interface weight file therein.
[0027] Furthermore, in each flight mission, the system will switch multiple task configurations, and the weights of each data interface under each task configuration are different. The interface weight file will detail the weights of each interface under different task configurations, as well as the continuous operation time of each task configuration for each flight. The content recorded in the interface weight file is as attached Figure 5As shown in the figure. According to the formula: The total weight of Interface 1 = (the weight of Interface 1 under Task Configuration 1 × the running time of Task Configuration 1) + (the weight of Interface 1 under Task Configuration 2 × the running time of Task Configuration 2) + …… + (the weight of Interface 1 under Task Configuration N × the running time of Task Configuration N), calculate the final weight of each interface.
[0028] Step S203: Check whether the remaining hard disk space is less than the capacity safety threshold. If the remaining hard disk space is greater than or equal to the capacity safety threshold, exit the hard disk check and continue with the subsequent operations; if the remaining hard disk space is less than the capacity safety threshold, perform the file deletion operation.
[0029] The operation directory identifier represents the data record directory where the previous file deletion operation was performed and is initialized to a fixed value. If the operation directory identifier is equal to the initialization value, it means it is the first time to perform the deletion. Then traverse the data log directory, find the earliest created directory, and update the operation directory identifier to the name of this directory. If the operation directory identifier is not equal to the initialization value, find the data record directory that is only later than the operation directory identifier, and update the operation directory identifier to the name of this directory. Further, according to the interface weight file in the current directory, delete the interface data record file with the lowest weight.
[0030] Repeat the above operations. When the directory cleaning count is less than the directory cleaning threshold, sequentially delete the files with the lowest weight in the relatively earliest directories. After each deletion, perform a hard disk capacity check until the remaining capacity is greater than the capacity deletion threshold. If when reaching the cleaning threshold, the remaining hard disk space still does not meet the requirements, clear the directory cleaning count, re-initialize the operation directory identifier, and start a new round of deletion operations until the remaining hard disk space is greater than the capacity deletion threshold.
[0031] In this step, the method has an efficient two-level storage space management function. When the remaining hard disk space for storing data record content is less than the capacity safety threshold, multiple rounds of hard disk capacity cleaning operations are started. The system will sequentially select multiple data record directories with the earliest creation dates and delete the interface data files with the lowest important weights in each directory. If the remaining hard disk space is still less than the capacity deletion threshold after the first round of deletion, start the second round of cleaning operations according to the same process until the remaining hard disk space is greater than the capacity deletion threshold, where the number of selected directories depends on the directory cleaning threshold.
[0032] This operation step adopts a two - level hard disk capacity management mechanism. It checks the remaining hard disk capacity every time it powers on to ensure that there is enough space to store the content of the latest power - on data record, avoiding the loss of recently recorded data, ensuring the continuity and integrity of the data content. At the same time, it tries to retain the important data of each flight record as much as possible and optimizes the interface data with lower importance first. This not only effectively solves the problem of insufficient storage space but also maximally ensures the preservation of important data and the continuity of the latest data record.
[0033] In some embodiments, the files required to create the data record function include: creating interface weight files in the current power - on data record directory; The resources required to create the data record function include: creating a data record transmission message queue, a data record mutex semaphore, an interface weight file update task, a data record task, and data record files for each interface according to the data record attribute table.
[0034] Specifically, in this embodiment, as Figure 6 shown, a data record transmission message queue, a data record mutex semaphore, an interface weight file update task, a data record task, and data record files for each interface are created according to the data record attribute table.
[0035] In some embodiments, during system operation, the interface weight file update task records the start time and end time of each task configuration during the operation process.
[0036] In some embodiments, the communication data of each interface is parsed into a unified format for data record, and the data with the unified format is sent to the data record transmission message queue by calling the data record sending function.
[0037] Specifically, in this embodiment, the communication data of each interface in the airborne avionics system is parsed into a unified data record format for each interface, reducing the coupling between the interface data parsing function and the main code of the data record function, and greatly improving the scalability of the data record function.
[0038] Based on the above method, the present application provides the following specific embodiments: Step 1: Write the file name for storing the data of the bus or interface to be recorded in the data record attribute table of the main code of the data record function. The format is interface name_device name.dat, providing a basis for creating data record files for each interface later.
[0039] Step 2: Create a time log file after the system powers on, which stores the current power - on time. This file is used for updating the directory name during the next power - on.
[0040] Step 3. Initialize the data recording task, including calibrating the name of the data recording directory from the previous power-on, checking the hard disk capacity, creating the current data recording directory, and creating the files and resources required for the data recording function.
[0041] Step 4. Calibrate the name of the data recording directory. The directory is named in the format of power-on time + count, i.e., yyyymmddhhmmss_xxxxx. First, obtain the power-on time log file stored during the previous power-on. When the power-on time is successfully obtained, the directory name is yyyymmddhhmmss_00000. For example, 20200728155425_00000 represents the data recording file powered on at 15:54:25 on July 28, 2020. When the power-on time acquisition fails, obtain the folder name with the latest time, and name the directory using the last successfully obtained power-on time + count. For example, if the folder name with the latest time is 20200728155425_00000, then the current naming is 20200728155425_00001.
[0042] Step 5. Traverse the hard disk for data recording storage, count the number of data recording directories, and calculate the directory cleaning threshold according to a preset ratio. For example: After counting, the number of directories stored in the hard disk is 20, and the preset ratio in the system configuration file is 20%. Then, after calculation, the directory cleaning threshold is 4. This directory cleaning threshold means that in each round of capacity cleaning, find the interface data recording file with the lowest weight in the four directories with the earliest creation dates in turn and delete it. If the remaining hard disk space still does not meet the requirements after one round of deletion of the four files, repeat the above steps for the second round of hard disk space cleaning.
[0043] Step 6. Find the data recording directory with the latest recording date, and calculate the final weight of each interface during the current operation of the system according to the interface weight file in it. For example, during the current operation of the system, first run in task configuration 1. The weight of interface 1 corresponding to this configuration is and the weight of interface 2 is . The continuous running time of this configuration is . Subsequently, the system switches to task configuration 2. The weight of interface 1 corresponding to this configuration is and the weight of interface 2 is . The continuous running time of this configuration is . After calculation, during the current operation of the system, the total weight of interface 1 is ( × ) + ( × ), and the total weight of interface 2 is ( × ) + ( × ).
[0044] Step 7: Check whether the remaining hard disk space is not less than the capacity safety threshold. If the remaining hard disk space is greater than or equal to the capacity safety threshold, exit the hard disk check and continue with the subsequent operations; if the remaining hard disk space is less than the capacity safety threshold, perform a file deletion operation.
[0045] The operation directory identifier represents the data record directory where the previous file deletion operation was performed, and is initialized to "00000000000000_00000". If the operation directory identifier is equal to "00000000000000_00000", it means that it is the first time to perform the deletion. Then traverse the data log directory, find the earliest created directory, and update the operation directory identifier to the name of this directory. If the operation directory identifier is not equal to "00000000000000_00000", find the data record directory that is only later than the operation directory identifier, and update the operation directory identifier to the name of this directory.
[0046] Further, according to the interface weight file in the current directory, delete the interface data record file with the lowest weight. For example, if the total weight of the CAN bus in the interface weight file is 0.4 and the total weight of the RS422 interface is 0.6, then the CAN bus data record file is preferentially deleted. Repeat the above operations. When the log directory cleaning count is less than the directory cleaning threshold, sequentially delete the files with the lowest weight in the relatively earliest directory. After each deletion, perform a hard disk space check until the remaining hard disk space is greater than the capacity deletion threshold. If the remaining space still does not meet the requirements when reaching the cleaning threshold, clear the directory cleaning count, re-initialize the operation directory identifier, and start a new round of deletion operations until the remaining hard disk space is greater than the capacity deletion threshold.
[0047] Step 8: Create a data record directory for the current power-on, and create interface weight record files in this directory.
[0048] Step 9: Create and initialize the message queue, mutex semaphore, data record interface weight file update task, data record writing and refreshing tasks for each interface data record function.
[0049] Step 10: During system operation, the interface weight file update task will record the start time and end time of each task configuration during operation. For example, when the system powers on and runs under task configuration 1, the update task will record the start time of configuration 1 and the interface weight files written by configuration 1. When the system switches to configuration 2, the update task will record the end time of configuration 1 and repeat the operations of configuration 1 for configuration 2 until the system ends operation and records the end time of the last task configuration.
[0050] Step Eleven: During system operation, taking the CAN bus as an example, when data is sent to the CAN bus within the system, the CAN bus parsing function of data recording will obtain the original data on the CAN bus and encapsulate this data into the unified format of data recording as shown in Figure 7 . Then, it calls the data recording sending function to send the encapsulated data to the data recording transmission message queue.
[0051] Step Twelve: The data recording task reads the data from the message queue and calls the file writing function of the C library to write the data into the data recording file CAN_DEV.dat of the CAN bus. Thus, the entire process of data recording is completed.
[0052] It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0053] Based on the same inventive concept, corresponding to the method of any of the above embodiments, an airborne avionics interface communication data system is further provided in an embodiment of the present application.
[0054] As shown in Figure 8 , the airborne avionics interface communication data system includes: A data recording initialization module 11, configured to initialize the data recording for the current system power-on. Among them, the initialization at least includes calibration of the data recording directory name of the previous power-on, hard disk space check, creation of the data recording directory for the current power-on, and creation of files and resources required for the data recording function; A data parsing module 12, configured to parse the communication data of each interface into the unified format of data recording and send it to the data recording message list; A data storage module 13, configured to read the data to be recorded in the message queue by the data recording task and write it into the data recording file corresponding to the interface under the current recording directory for data storage.
[0055] For the convenience of description, when describing the above system, it is divided into various modules according to functions and described separately. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0056] The system of the above embodiment is used to implement the corresponding method in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be elaborated herein.
[0057] Based on the same inventive concept, corresponding to the method of any of the above embodiments, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in any of the above embodiments is implemented.
[0058] Figure 9 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0059] The processor 1010 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0060] The memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0061] The input / output interface 1030 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0062] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module may implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0063] The bus 1050 includes a path for transmitting information between various components of the device, such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040.
[0064] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0065] The electronic device of the above embodiment is used to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0066] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method described in any of the foregoing embodiments.
[0067] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0068] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the method described in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0069] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.
[0070] In addition, for simplicity of explanation and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application may be implemented without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.
[0071] Although the present application has been described in connection with specific embodiments of the present application, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0072] The embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.
Claims
1. An airborne avionics interface communication data recording method, characterized in that Including: Initializing the data record of the current system power-on, where the initialization at least includes calibration of the last power-on data record directory name, hard disk space check, creation of the current power-on data record directory, and creation of files and resources required for the data record function; Parsing the communication data of each interface into a unified format of data record and sending it to the data record message list; The data record task reads the data to be recorded in the message queue and writes it into the data record file of the corresponding interface under the current record directory for data storage.
2. The method according to claim 1, characterized in that, The calibration of the data record directory name includes: In response to successfully obtaining the power-on time information stored in the last system power-on, editing the last power-on data log directory name according to the power-on time information, deleting the existing data log directory, and renaming the directory to the edited last power-on data log directory name; In response to the failure to obtain the power-on time information, traversing the data log directory, obtaining the last valid power-on time information, and naming the directory in the way of the last successfully obtained power-on time + counting.
3. The method according to claim 1, characterized in that The hard disk space check includes: Traversing the hard disk for data record storage, counting the number of data record directories, and calculating the directory cleaning threshold according to a preset ratio; Searching for the data record directory with the latest record date and calculating the data record weight of each interface during the current flight of the system according to the interface weight file in the current directory; Judging whether the remaining hard disk space is not less than the preset capacity safety threshold. In response to the remaining hard disk space being less than the capacity safety threshold, performing a file cleaning operation based on a preset capacity cleaning policy until the remaining hard disk capacity is greater than the preset capacity cleaning threshold. The capacity cleaning policy includes deleting the interface data record file with the lowest weight according to the calculated data record weight result; In response to the remaining hard disk space being greater than or equal to the capacity safety threshold, closing the hard disk directory.
4. The method according to claim 3, characterized in that, The capacity cleaning policy includes: Judging whether the remaining hard disk space is greater than the preset capacity cleaning threshold. In response to the remaining hard disk space being less than the capacity cleaning threshold, traversing the data log directory, finding the next earliest created directory according to the current operation directory identifier, updating the current operation directory identifier, judging whether the data log directory cleaning count reaches the directory cleaning threshold. In response to not reaching the directory cleaning threshold, deleting the interface data record file with the lowest weight according to the interface weight file in the current directory until the remaining hard disk space is greater than the capacity cleaning threshold. In response to reaching the directory cleaning threshold, initializing the current operation directory identifier and clearing the directory cleaning count, and repeating the cleaning operation until the remaining hard disk space is greater than the capacity cleaning threshold; In response to the remaining hard disk space being greater than the capacity cleaning threshold, closing the hard disk directory.
5. The method according to claim 1, characterized in that: Creating the files required for the data record function includes: creating the interface weight file in the current power-on data record directory; The resources required for creating the data recording function include: creating a data recording transmission message queue, a data recording mutex semaphore, an interface weight file update task, a data recording task, and data recording files for each interface according to the data recording attribute table.
6. The method according to claim 5, wherein: During system operation, the interface weight file update task records the start time and end time of each task configuration during the operation.
7. The method according to claim 1, wherein: Parse the communication data of each interface into a unified format for data recording, and call the data recording sending function to send the data with the unified format to the data recording transmission message queue.
8. An airborne avionics interface communication data system, characterized in that, Including: A data recording initialization module configured to initialize the data recording for the current system power-on, where the initialization at least includes calibrating the data recording directory name of the previous power-on, checking the hard disk space, creating a data recording directory for the current power-on, and creating files and resources required for the data recording function; A data parsing module configured to parse the communication data of each interface into a unified format for data recording and send it to the data recording message list; A data storage module configured to read the data to be recorded in the message queue by the data recording task and write it into the data recording file of the corresponding interface under the current recording directory for data storage.
9. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1-7 is implemented.
10. A non-transitory computer-readable storage medium, characterized in that, Wherein, The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1-7.