QAR decoding method and system based on ARINC767 standard

By performing data analysis and decoding library parameters analysis on the flight data of the ARINC767 specification, combined with the SIMD optimization function of the numpy structure for decoding, the problem of low decoding efficiency of flight data based on the ARINC767 specification is solved, and more efficient and accurate decoding effects are achieved.

CN119382713BActive Publication Date: 2025-04-15SHENZHEN REDA FLIGHT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411942144.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-15
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The flight data recording structure based on the ARINC767 specification is different from the traditional specification, resulting in low decoding efficiency and the decoding accuracy still need to be improved.

Method used

By obtaining the flight data of ARINC767 specifications for data analysis, building a data frame dictionary, and parsing the pre-set decoding library to build a decoding library dictionary. Combining the data frame dictionary and the decoding library dictionary, the QAR flight data decoding is used using the SIMD optimization function of the numpy structure.

Benefits of technology

The decoding accuracy and decoding efficiency of flight data are improved, and the decoding performance is improved by using numpy's SIMD optimization function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382713B_ABST
    Figure CN119382713B_ABST
Patent Text Reader

Abstract

The present invention discloses a QAR decoding method and system based on ARINC767 specification, the method comprising: obtaining flight data of ARINC767 specification, and performing data parsing on the flight data, so as to construct a data frame dictionary containing flight data according to the result of data parsing; performing parameter parsing on a pre-set decoding library, and obtaining a decoding library dictionary containing parameter attributes according to the result of parameter parsing; combining the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, and performing QAR flight data decoding based on a SIMD optimization function of a numpy structure to obtain real parameter data. The present invention performs decoding based on a SIMD optimization function of a numpy structure, which can effectively improve the decoding accuracy and decoding efficiency of flight data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a QAR decoding method and system based on ARINC767 specification. Background Art

[0002] Modern civil QAR (Quick Access Recorder) flight data is usually stored in accordance with one of the two standards ARINC573 / ARINC717 and ARINC767. The traditional flight data recording specification ARINC573 / ARINC717 is based on subframes, each subframe is one second, and 4 subframes are one frame. Some low-frequency recorded parameters will be recorded once across multiple frames, which is called a super frame. Each subframe has a fixed number of slot positions, and the size of a single slot is 12 bits. When it is necessary to increase parameter recording, if the slot space is not enough, either the hardware needs to be upgraded or other parameters need to be deleted to free up space, that is, the storage space of the ARINC573 / ARINC717 specification is insufficient.

[0003] In this regard, some aircraft models currently use a new data recording specification ARINC767. ARINC767 uses a new storage structure. Compared with the traditional flight data recording specification, it completely abandons the storage structure such as word slots, subframes, frames, and super frames. It uses the parameter acquisition frequency as the basis to group the parameters. The group is called a "frame". The same synchronization word 0xEB90 is used at the beginning of each frame. The parameters in each frame are the same acquisition rate and recorded sequentially. Since there is no concept of word slots, there is no extra space between the parameters, and they are directly spliced ​​in binary. At the same time, a frame is no longer one second, but the concept of "timestamp" is introduced to determine the order and recording time of each frame. In addition, there are some major differences compared to traditional specifications. For example, a word slot in the traditional specification can only store 12 bits, while the ARINC767 specification can store up to 32 bits, a single-precision floating-point type is added, and ARINC767 also uses the big-endian byte order instead of the little-endian.

[0004] However, the flight data record structure based on the ARINC767 specification is completely different from the traditional one. The main problem is that the frame size is different and the parameter data appears in the form of binary splicing, while the processing unit of conventional computers is byte. This results in most decoding programs being able to only decode by traversal processing. In other words, this type of decoding system has average performance, i.e., low decoding efficiency, and the decoding accuracy needs to be improved. Therefore, how to improve the decoding performance based on the ARINC767 specification is a problem that technicians in this field need to solve. Summary of the invention

[0005] The embodiments of the present invention provide a QAR decoding method, system, computer equipment and storage medium based on the ARINC767 specification, aiming to improve the decoding accuracy and decoding efficiency of flight data.

[0006] In a first aspect, an embodiment of the present invention provides a QAR decoding method based on the ARINC767 specification, comprising:

[0007] Acquire flight data in accordance with ARINC767 specification, and perform data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis;

[0008] Parameter parsing is performed on a preset decoding library, and a decoding library dictionary containing parameter attributes is obtained according to the result of the parameter parsing;

[0009] Combined with the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, QAR flight data decoding is performed based on the SIMD optimization function of the numpy structure to obtain real parameter data, and the real parameter data is stored as a decoding parameter result array in a preset decoding result dictionary.

[0010] In a second aspect, an embodiment of the present invention provides a QAR decoding system based on the ARINC767 specification, including:

[0011] A data analysis unit, used for acquiring flight data in accordance with ARINC767 specification, and performing data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis;

[0012] A parameter parsing unit, used to perform parameter parsing on a preset decoding library, and obtain a decoding library dictionary containing parameter attributes according to the result of the parameter parsing;

[0013] A decoding storage unit is used to combine the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, perform QAR flight data decoding based on the SIMD optimization function of the numpy structure, obtain real parameter data, and store the real parameter data as a decoding parameter result array in a preset decoding result dictionary.

[0014] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the QAR decoding method based on the ARINC767 specification as described in the first aspect is implemented.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the QAR decoding method based on the ARINC767 specification as described in the first aspect is implemented.

[0016] The embodiment of the present invention provides a QAR decoding method, system, computer device and storage medium based on ARINC767 specification, the method comprising: obtaining flight data of ARINC767 specification, and performing data analysis on the flight data to construct a data frame dictionary containing flight data according to the result of data analysis; performing parameter analysis on a preset decoding library, and obtaining a decoding library dictionary containing parameter attributes according to the result of parameter analysis; combining the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, performing QAR flight data decoding based on the SIMD optimization function of the numpy structure to obtain real parameter data, and storing the real parameter data as a decoding parameter result array in a preset decoding result dictionary. The embodiment of the present invention obtains a data frame dictionary and a decoding library dictionary by respectively analyzing the flight data and the decoding library, and then combines the data frame dictionary and the decoding library field, and performs decoding based on the numpy structure, that is, converting the data structure in the data frame dictionary into a numpy array, so that the SIMD optimization function of numpy can be efficiently used to achieve acceleration, so that the decoding accuracy and decoding efficiency of the flight data can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0018] Figure 1 A flowchart of a QAR decoding method based on the ARINC767 standard provided by an embodiment of the present invention;

[0019] Figure 2 A schematic block diagram of a QAR decoding system based on the ARINC767 specification provided in an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of data analysis in a QAR decoding method based on the ARINC767 standard provided in an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of group sorting in a QAR decoding method based on the ARINC767 specification provided in an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of parameter distribution in a QAR decoding method based on the ARINC767 specification provided in an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of parameter analysis in a QAR decoding method based on the ARINC767 specification provided in an embodiment of the present invention;

[0024] Figure 7 A schematic diagram of the data structure of a decoding result dictionary in a QAR decoding method based on the ARINC767 standard provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0027] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0029] See below Figure 1 The embodiment of the present invention provides a QAR decoding method based on the ARINC767 specification, which specifically includes: steps S101~S103.

[0030] Step S101, obtaining flight data in accordance with ARINC767 specification, and performing data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis;

[0031] Step S102, performing parameter parsing on a preset decoding library, and obtaining a decoding library dictionary containing parameter attributes according to the result of the parameter parsing;

[0032] Step S103, combining the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, performing QAR flight data decoding based on the SIMD optimization function of the numpy structure to obtain real parameter data, and storing the real parameter data as a decoding parameter result array in a preset decoding result dictionary.

[0033] In this embodiment, the flight data under the ARINC767 specification is first obtained, and then the flight data is parsed to construct a data frame dictionary. At the same time, the parameters in the decoding library are parsed and a decoding library dictionary is constructed. Subsequently, the data frame dictionary and the decoding library dictionary are combined, and the flight data is decoded under the numpy structure to obtain the corresponding real parameter data, and the real parameter data is stored in the decoding result dictionary.

[0034] This embodiment parses the flight data and the decoding library respectively to obtain the data frame dictionary and the decoding library dictionary, and then combines the data frame dictionary and the decoding library fields and performs decoding based on the numpy structure, that is, converting the data structure in the data frame dictionary into a numpy array. In this way, the SIMD optimization function of numpy can be efficiently used to achieve acceleration, which can effectively improve the decoding accuracy and efficiency of the flight data.

[0035] It can be understood that this embodiment performs decoding based on the SIMD optimization function of the numpy structure, so the QAR decoding method based on the ARINC767 specification provided in this embodiment runs efficiently on one or more processor architectures with single instruction multiple data (ie, SIMD) expansion capabilities.

[0036] In one embodiment, the step of acquiring flight data in accordance with the ARINC767 specification and performing data parsing on the flight data to construct a data frame dictionary containing the flight data according to the result of the data parsing includes:

[0037] Initialize and set a first key-value pair storage, and set the first key-value pair storage to the data frame dictionary; wherein the key in the first key-value pair storage is the data frame sequence number, and the value is a list of all data frames corresponding to the stored data frame sequence number;

[0038] Slicing the flight data using a preset file position pointer, converting the result of the slicing process into a byte of an unsigned short integer type, and then setting a frame header encapsulation object according to the byte of the unsigned short integer type;

[0039] Obtaining the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtaining the frame tail based on the ARINC767 specification, thereby constructing a data frame corresponding to the flight data;

[0040] Convert the data frame into a uint8 type array in a numpy structure;

[0041] The uint8 type array is stored in the list, and the list is stored in the data frame dictionary as the value in the key-value pair storage, and the data frame sequence number corresponding to the uint8 type array is stored in the data frame dictionary as the key in the first key-value pair storage, so as to construct the data frame dictionary.

[0042] Specifically, obtaining the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtaining the frame tail based on the ARINC767 specification, thereby constructing a data frame corresponding to the flight data, includes:

[0043] Obtain the frame_length attribute in the frame header encapsulation object, and obtain the data frame length according to the frame_length attribute;

[0044] Based on the ARINC767 specification, extract the frame tail according to the data frame length, and encapsulate the frame tail into a Tailer object;

[0045] Determine whether the ID of the Tailer object is consistent with the ID of the frame header encapsulation object;

[0046] If it is determined that the ID of the Tailer object is consistent with the ID of the frame header encapsulation object, constructing the data frame;

[0047] If it is determined that the ID of the Tailer object is inconsistent with the ID of the frame header encapsulation object, the abnormal frames are screened and removed, and then the data frame is constructed.

[0048] ARINC767 flight data is a binary data block, connected as a complete unit with a frame, including 10 bytes of the frame header, intermediate parameter data, and 2 bytes of the frame tail. Since the length of the intermediate parameter data is unknown, it is necessary to parse the length from the frame header each time.

[0049] Specifically, according to the ARINC767 specification, the specific specifications of the 10 bytes of the frame header are as follows:

[0050] It always starts with a 2-byte unsigned short integer as the synchronization word;

[0051] The 3rd and 4th 2-byte unsigned short integers point to the length of the entire current frame, including the head and tail, in bytes;

[0052] The 4-byte unsigned integer from byte 5 to byte 8 is the timestamp of the current frame;

[0053] The 9th Byte is converted to an integer to identify the current frame type;

[0054] The 10th Byte is the current frame ID;

[0055] The specific specifications of the last 2 bytes are as follows:

[0056] The first Byte is converted to an integer to identify the current frame type;

[0057] The second Byte is the current frame ID, which is used to compare with the frame ID in the frame header to ensure that there is no abnormality in the data.

[0058] Based on this, this embodiment uses Python language to implement data parsing after obtaining the flight data of ARINC767 specification. Specifically, first read the flight data into the memory in one block. In actual applications, when the flight lands, the flight data of ARINC767 specification can be packaged and transferred to the ground server from the aircraft automatically or manually. Then initialize a Python key-value pair storage and call it a data frame dictionary, which is used to store the data frames parsed subsequently, where the key corresponds to the data frame number and the value is a Python list, which is used to store all data frames of this data frame number. At the same time, initialize the integer variable file position pointer and set it to 0. Then, process the following steps until the value of file_pos is greater than or equal to the size of the flight data in memory to avoid out-of-bounds access:

[0059] (1) Slice according to [file position pointer: file position pointer + 2] to obtain two bytes and convert them into unsigned short integer type. Here, if these two bytes are equal to the synchronization word 0xEB90, extract the 10 bytes [file position pointer: file position pointer + 10] and extract them as the Header object encapsulated as the frame header according to the ARINC767 standard. Otherwise, continue to loop the above slicing steps according to the file position pointer + = 1 until the end of the file. If the synchronization word is not found in the end, the parsing and decoding operation ends;

[0060] (2) According to the specification, the frame_length of the Header attribute indicates the length of the entire data frame (including the frame header and frame tail), so the entire data frame can be obtained through the slicing method, that is, [file position pointer: file position pointer + Header.frame_length]. The 2 bytes at the end of the frame can be extracted as a Tailer object encapsulated in the frame tail according to the ARINC767 standard. At the same time, it is also necessary to determine whether Tailer.frame_id is consistent with the frame_id of the Header. If not, it indicates that there may be an abnormal data frame;

[0061] (3) Convert the entire data frame into a numpy uint8 type array. uint8 is an 8-bit unsigned integer, corresponding to one Byte.

[0062] (4) Query the value of the key equal to Header.frame_id in the data frame dictionary. If it exists, skip it. If it does not exist, create a Python list list and insert it into the data frame dictionary as a value.

[0063] (5) Use the key equal to Header.frame_id to find the value in the data frame dictionary, that is, the list created in step (4), and put the numpy uint8 type array generated in step (3) into the list, which becomes a numpy uint8 type array wrapped in a python type list;

[0064] (6) Update the file position pointer to the start time of the next frame by: file_pos = file_pos + Header.frame_length.

[0065] Thus, the data analysis of the flight data is realized, and a data frame dictionary containing the flight data is obtained, such as Figure 3 shown.

[0066] Furthermore, the values ​​in the data frame dictionary are traversed, and the values ​​are changed from numpy uint8 type array wrapped in python type list to a two-dimensional array of complete numpy type stacked vertically using numpy.vstack, which is subsequently called two-dimensional flight data. The structure of the two-dimensional flight data is as follows: the row is the total number of the current frame, and the column is numpy uint8 type array.

[0067] In one embodiment, the step of performing parameter parsing on a preset decoding library and obtaining a decoding library dictionary containing parameter attributes according to the result of the parameter parsing comprises:

[0068] Initialize and set a second key-value pair storage, and set the second key-value pair storage as the decoding dictionary;

[0069] Based on the ARINC767 specification, grouping the parameters in the decoding library according to the data frame sequence number to obtain a plurality of parameter groups;

[0070] Creating a same-frame parameter dictionary for each parameter group, and using the same-frame parameter dictionary to store parameter attributes in the parameter group;

[0071] The data frame sequence number corresponding to the parameter group is stored as the key in the second key-value pair storage in the decoding library dictionary, and the same-frame parameter dictionary corresponding to the parameter group is stored as the value in the second key-value pair storage in the decoding library dictionary, thereby constructing the decoding library dictionary.

[0072] Specifically, creating a same-frame parameter dictionary for each parameter group, and using the same-frame parameter dictionary to store parameter attributes in the parameter group includes:

[0073] Initialize and set a third key-value pair storage, and set the third key-value pair storage to the same-frame parameter dictionary;

[0074] Obtaining parameter attributes of the parameter; wherein the parameter attributes include a parameter mnemonic code;

[0075] Acquire the target type of the flight data, and store the target type in the parameter attribute;

[0076] Respectively calculating the index starting point and index ending point of the parameter group and the number of right shifts, and storing the index starting point and index ending point and the number of right shifts in the parameter attribute;

[0077] The parameter mnemonic code is stored as a key in the third key-value pair storage in the same-frame parameter dictionary, and the parameter attribute is constructed as a Param object, and the Param object is stored as a value in the third key-value pair storage in the same-frame parameter dictionary, thereby constructing the same-frame parameter dictionary.

[0078] The ARINC767 specification is the same as the traditional recording standard. It is configured in the "parameter definition system" on the ground to confirm which parameters need to be recorded and where the corresponding parameters need to be stored, etc., and then transferred to the flight data recorder on the aircraft through software. The flight data recorder collects data according to this "definition" and stores it. The "parameter definition system" can export the specification content such as which parameters to record and where the corresponding parameters are to be stored, and the objects used for export and storage are generally called decoding libraries or parameter databases. In the ARINC767 standard, the decoding library can provide the following information for each parameter:

[0079] The frame_id where the parameter is located;

[0080] The serial number of the parameter in the frame;

[0081] The bit length of the parameter data part;

[0082] Whether there is a sign bit and the position of the sign bit is usually the bit length of the parameter data part + 1;

[0083] The recording frequency of the parameter, such as 1 / 60Hz (record once in 60 seconds), 1Hz (record once in 1 second), 5Hz (record 5 times in 1 second), 10Hz (record 10 times in 1 second);

[0084] The parameter conversion method and the new single-precision floating-point type introduced by ARINC767 are the same as the traditional ARINC573 / 717 types, including BCD, BNR, ASCII, etc.

[0085] According to the ARINC767 specification, parameter data is spliced ​​in the same frame in an orderly manner in units of bits, and our previous steps divide the data into two-dimensional flight data. Since the position of the first byte where the start_bit is located can be 0 to 8, plus the total length of the parameter data dlen, the parameter data bits may exist in a single byte or span multiple bytes, and subsequent calculations need to be based on the complete data type. Therefore, it is necessary to extract the data of the entire parameter and calculate the start and end positions of the slice of the extracted type length. In addition, because the extracted data may contain part of the data that is not the current parameter, the right shift operation and the dlen bitwise AND operation are performed through the right shift bit right_shift, so that only the data bits of the current parameter are left. Specifically:

[0086] First, initialize a dictionary to store subsequent structures, called the decoding library dictionary. Then, according to the ARINC767 specification, the parameters appear in the corresponding data frame in a fixed order. Therefore, grouping according to the frame sequence can ensure that the parameters in the same data frame are grouped together. Therefore, the grouping attribute is frame_id (frame sequence number), and the sorting attribute is order ascending sorting. The completed data is as follows Figure 4 shown. Figure 4 In the grouping order (the grouping is rate+frame_id, and the order attribute is order), for example, the frame number of 1Hz is 2 as a group, and the definition of each parameter in the group is sorted in ascending order. Figure 5 As shown in the figure, the parameter data is sequentially spliced ​​in the same frame in units of bits. In the example here, the bit view represents 6 continuously distributed parameter data. However, when operating in the byte view, it is necessary to consider that the data may span multiple bytes or start at a bit position other than the first bit position of a byte.

[0087] Next, traverse each group after grouping and sorting, and create a separate dictionary for each group, called the same-frame parameter dictionary, to store the following attributes.

[0088] Set the start_bit of each group to 80 (because the header is a Header with a fixed length of 10 bytes), and start traversing each parameter in the group:

[0089] (1) Since we know that each parameter has the following attributes: unique name mnemonic (parameter mnemonic code, such as wind direction, wind speed, ground speed, etc.), recording frequency rate, unique frame ID-frame_id, order of the parameter in the frame, total data length (unit: bit, +1 if signed) dlen, parameter conversion method convert_type, we can construct a Param object to store the above attributes;

[0090] (2) Calculate the target type dtype:

[0091] dlen is divided by 8 to get byte_size;

[0092] dlen modulo 8, if the result is not 0, byte_size += 1;

[0093] Use byte_size to get dtype from the type comparison table; the type comparison table is shown in Table 1;

[0094] Store the dtype into the parameter attribute.

[0095] For example, if the total length of the parameter data dlen is 17, 17 is divisible by 8 and we get byte_size=2, but 17 modulo 8 leaves 1, so byte_size plus 1 equals 3. Using byte_size=3 to look up the table, we get that dtype is uint32.

[0096] Table 1

[0097]

[0098] (3) Calculate the index starting point start_loc, that is, start_loc = start_bit divided by 8;

[0099] (4) Calculate the coverable type byte size cover_byte_size, and use cover_byte_size to obtain dtype and dtype_len from the type comparison table:

[0100] Set dtype to coverable type cover_dtype;

[0101] Set dtype_len to coverable type length cover_dtype_len.

[0102] As shown in Table 2, the calculation method of the coverable type byte size cover_byte_size of the parameter is specifically to compare the start bit start_bit of the parameter with the start bit start_bit plus the total data length dlen. When these two are viewed in Byte view, the following judgment is made at the position where they fall, and the coverable type byte size cover_byte_size is returned.

[0103] Table 2

[0104]

[0105] (5) Calculate the index end point end_loc = start_loc + coverable type length cover_dtype_len;

[0106] (6) Calculate the right shift bit number right_shift (because the data obtained by the extracted type may contain part of the data that is not the current parameter, the right shift operation and dlen AND operation can be performed by the right shift number right_shift to leave only the data bits of the current parameter). The calculation method is:

[0107] Calculate the remainder of the temporary variable index start point start_remain_bit, that is, the start bit start_bit modulo 8;

[0108] Calculate the right shift number right_shift, that is, right_shift = cover_dtype_len*8 - start_remain_bit - dlen;

[0109] (7) Set the new attributes obtained by the above calculation: target type dtype, offset coverable type cover_dtype, index start point start_loc, index end point end_loc and right shift number right_shift back to the attributes of the parameter Param object;

[0110] (8) Store the current parameter’s unique name, mnemonic (parameter mnemonic code), into the same frame parameter dictionary with the Param object as the key and the value;

[0111] (9) Continue to move start_bit to access the next parameter, that is, start_bit += the total data length dlen of the current parameter;

[0112] (10) Continue to traverse other parameters in the group and repeat steps (1)-(9).

[0113] The frame sequence frame_id of each group is used as the key, and the same frame parameter dictionary of each group is used as the value, which is stored in the decoding library dictionary, such as Figure 6 And as shown in Table 3, the parameters in the decoding library dictionary may include the attributes shown in Table 3.

[0114] Table 3

[0115]

[0116] In one embodiment, the SIMD optimization function includes a first SIMD optimization function and a second SIMD optimization function; the SIMD optimization function based on the numpy structure performs QAR flight data decoding based on the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary to obtain real parameter data, and stores the real parameter data as a decoding parameter result array in a preset decoding result dictionary, including:

[0117] stacking the flight data in the data frame dictionary into two-dimensional flight data;

[0118] Traverse the same-frame parameter dictionary to obtain a third key-value pair storage whose key is the parameter mnemonic code and whose value is the Param object;

[0119] Based on the third key-value pair storage, the two-dimensional flight data is sliced ​​using a first SIMD optimization function in a numpy structure, and the result of the slicing process is set as data to be decoded;

[0120] performing view conversion and one-dimensional conversion on the data to be decoded in sequence;

[0121] The second SIMD optimization function in the numpy structure is used to sequentially perform right shift operation and bitwise AND operation on the data to be decoded after one-dimensional conversion;

[0122] Use numpy.astype method to decode the data to be decoded after bitwise AND operation into parameter integer data;

[0123] The parameter integer data is converted into real parameter data, and the real parameter data is used as a decoding parameter result array.

[0124] Here, the numpy.astype method is used to decode the data to be decoded after the bitwise AND operation into parameter integer data, including:

[0125] Determine whether the data to be decoded is a single-precision floating-point number type;

[0126] If it is determined that the parameter integer data is a single-precision floating-point type, the processing type of the numpy.astype method is converted to a single-precision floating-point type, and the data to be decoded is decoded using the numpy.astype method of the single-precision floating-point type.

[0127] After constructing the data frame dictionary and the decoding library dictionary, this embodiment first uses the data frame serial number frame_id to obtain the two-dimensional flight data of the numpy structure in the data frame dictionary and names it frame_data, then traverses the same frame parameter dictionary in the decoding library dictionary, obtains the key as the unique parameter name mnemonic, the value is the Param object type, and names it param to facilitate subsequent attribute access. Specifically:

[0128] (1) Use numpy's first SIMD optimization function to cut out all the data of the parameter at one time. The syntax of numpy's first SIMD optimization function is: frame_data[: param.start_loc: param.end_loc], which means to obtain all uint8 arrays from param.start_loc to param.end_loc in the two-dimensional column direction. The obtained structure is still two-dimensional and is named param_raw_data, that is, the data to be decoded.

[0129] (2)Convert the obtained param_raw_data to the type of param.cover_dtype using the view method, and replace param_raw_data. Using the view method avoids underlying type conversion and incurs no overhead. The operation syntax of numpy is: param_raw_data = param_raw_data.view(param.cover_dtype);

[0130] (3)Convert param_raw_data to one-dimensional and replace param_raw_data. The syntax of numpy is: param_raw_data = param_raw_data.reshape(-1);

[0131] (4)Use the second SIMD optimization function of numpy to perform a right shift operation and a bitwise AND operation on param_raw_data, and replace param_raw_data. This operation is used to ensure the removal of data that is not this parameter. The specific syntax for using the second SIMD optimization function is:

[0132] param_raw_data = (param_raw_data >> param.right_shift) & ((1 << param.dlen) - 1).

[0133] Among them, ((1 << param.dlen) - 1) is the operation syntax of python to ensure that all bits are 1 in the binary form of the length of param.dlen;

[0134] (5)Use the numpy.astype method to decode param_raw_data into the complete parameter integer data and name it param_integer_data. The operation syntax of numpy is: param_integer_data = param_raw_data.astype(param.dtype);

[0135] (6)Convert param_integer_data to the real parameter data and store it in the param_real_data variable.

[0136] Here, judge the type of param.convert_type. If it is a single-precision floating-point type, convert numpy's astype to a single-precision floating-point number. The syntax of numpy is: param_real_data = param_integer_data.astype(np.float32);

[0137] Otherwise, use the traditional conversion method to convert and store the conversion result in the variable param_real_data;

[0138] (7) param_real_data is still a numpy array type after the above conversion, with the parameter mnemonic code param.mnemonic as the key and the decoded parameter result array param_real_data as the value, and is stored in the decoding result dictionary;

[0139] (8) Repeat the above steps (1) to (7) until all parameters in the current frame parameter dictionary are decoded.

[0140] Based on the above (1)-(8), the final decoding parameter result array can be obtained, and the decoding parameter result array is stored in the decoding result dictionary, as shown in Figure 7.

[0141] Figure 2 A schematic block diagram of a QAR decoding system 200 based on the ARINC767 specification provided in an embodiment of the present invention, the device 200 includes:

[0142] The data analysis unit 201 is used to obtain flight data in accordance with the ARINC767 specification, and to perform data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis;

[0143] The parameter parsing unit 202 is used to perform parameter parsing on a preset decoding library and obtain a decoding library dictionary containing parameter attributes according to the result of the parameter parsing;

[0144] The decoding storage unit 203 is used to combine the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, perform QAR flight data decoding based on the SIMD optimization function of the numpy structure, obtain real parameter data, and store the real parameter data as a decoding parameter result array in a preset decoding result dictionary.

[0145] In one embodiment, the data parsing unit 201 includes:

[0146] A first initialization unit is used to initialize and set a first key-value pair storage, and set the first key-value pair storage to the data frame dictionary; wherein the key in the first key-value pair storage is the data frame sequence number, and the value is a list of all data frames corresponding to the stored data frame sequence number;

[0147] A slicing processing unit, used for slicing the flight data using a preset file position pointer, converting the result of the slicing processing into a byte of an unsigned short integer type, and then setting a frame header encapsulation object according to the byte of the unsigned short integer type;

[0148] A data frame construction unit, used to obtain the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtain the frame tail based on the ARINC767 specification, so as to construct a data frame corresponding to the flight data;

[0149] A data frame conversion unit, used for converting the data frame into a uint8 type array in a numpy structure;

[0150] The first construction unit is used to store the uint8 type array in the list, store the list as the value in the key-value pair storage in the data frame dictionary, and store the data frame sequence number corresponding to the uint8 type array as the key in the first key-value pair storage in the data frame dictionary, so as to construct the data frame dictionary.

[0151] In one embodiment, the data frame construction unit includes:

[0152] A length obtaining unit, used to obtain a frame_length attribute in the frame header encapsulation object, and obtain the data frame length according to the frame_length attribute;

[0153] A frame tail extraction unit, configured to extract the frame tail according to the data frame length based on the ARINC767 specification, and encapsulate the frame tail into a Tailer object;

[0154] An object determination unit, configured to determine whether the ID of the Tailer object is consistent with the ID of the frame header encapsulation object;

[0155] A first determination unit, configured to construct the data frame if it is determined that the ID of the Tailer object is consistent with the ID of the frame header encapsulation object;

[0156] The second determination unit is configured to screen and remove abnormal frames if it is determined that the ID of the Tailer object is inconsistent with the ID of the frame header encapsulation object, and then construct the data frame.

[0157] In one embodiment, the parameter parsing unit 202 includes:

[0158] A second initialization unit, used for initializing and setting a second key-value pair storage, and setting the second key-value pair storage as the decoding dictionary;

[0159] A parameter grouping unit, used for grouping the parameters in the decoding library according to the data frame sequence number based on the ARINC767 specification to obtain a plurality of parameter groups;

[0160] an attribute storage unit, configured to create a same-frame parameter dictionary for each parameter group, and store parameter attributes in the parameter group using the same-frame parameter dictionary;

[0161] The second construction unit is used to store the data frame sequence number corresponding to the parameter group as the key in the second key-value pair storage into the decoding library dictionary, and store the same-frame parameter dictionary corresponding to the parameter group as the value in the second key-value pair storage into the decoding library dictionary, so as to construct the decoding library dictionary.

[0162] In one embodiment, the attribute storage unit includes:

[0163] A third initialization unit, used for initializing and setting a third key-value pair storage, and setting the third key-value pair storage as the same-frame parameter dictionary;

[0164] An attribute acquisition unit, used to acquire parameter attributes of the parameter; wherein the parameter attributes include parameter mnemonics;

[0165] a type acquisition unit, used for acquiring a target type of the flight data, and storing the target type in the parameter attribute;

[0166] A point calculation unit, used for respectively calculating the index starting point and index ending point of the parameter group and the number of right shifts, and storing the index starting point and index ending point and the number of right shifts in the parameter attribute;

[0167] The third construction unit is used to store the parameter mnemonic code as the key in the third key-value pair storage in the same-frame parameter dictionary, and to construct the parameter attribute as a Param object, and to store the Param object as the value in the third key-value pair storage in the same-frame parameter dictionary, thereby constructing the same-frame parameter dictionary.

[0168] In one embodiment, the SIMD optimization function includes a first SIMD optimization function and a second SIMD optimization function; the decoding storage unit 203 includes:

[0169] A data stacking unit, used for stacking the flight data in the data frame dictionary into two-dimensional flight data;

[0170] A dictionary traversal unit, used for traversing the same-frame parameter dictionary to obtain a third key-value pair storage in which the key is the parameter mnemonic code and the value is the Param object;

[0171] a slice setting unit, configured to perform slice processing on the two-dimensional flight data based on the third key-value pair storage by using a first SIMD optimization function in a numpy structure, and set the result of the slice processing as data to be decoded;

[0172] A data conversion unit, configured to sequentially perform view conversion and one-dimensional conversion on the data to be decoded;

[0173] A point processing unit, used for sequentially performing right shift operation and bitwise AND operation on the to-be-decoded data after one-dimensional conversion by using the second SIMD optimization function in the numpy structure;

[0174] A data decoding unit is used to decode the data to be decoded after the bitwise AND operation into parameter integer data by using the numpy.astype method;

[0175] The parameter setting unit is used to convert the parameter integer data into real parameter data, and use the real parameter data as a decoding parameter result array.

[0176] In one embodiment, the data decoding unit includes:

[0177] A type determination unit, used to determine whether the data to be decoded is a single-precision floating-point number type;

[0178] A method conversion unit is used to convert the processing type of the numpy.astype method into the single-precision floating-point type if it is determined that the parameter integer data is a single-precision floating-point type, and decode the data to be decoded using the numpy.astype method of the single-precision floating-point type.

[0179] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0180] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0181] The embodiment of the present invention also provides a computer device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the computer device may also include various network interfaces, power supplies and other components.

[0182] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0183] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A QAR decoding method based on ARINC767 specification, characterized in that: include: Acquire flight data in accordance with ARINC767 specification, and perform data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis; Parsing parameters of a preset decoding library, and constructing a decoding library dictionary containing parameter attributes according to the result of the parameter parsing; Combining the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, performing QAR flight data decoding based on the SIMD optimization function of the numpy structure to obtain real parameter data, and storing the real parameter data as a decoding parameter result array in a preset decoding result dictionary; The step of acquiring flight data in accordance with the ARINC767 specification and performing data parsing on the flight data to construct a data frame dictionary containing the flight data according to the result of the data parsing includes: Initialize and set a first key-value pair storage, and set the first key-value pair storage to the data frame dictionary; wherein the key in the first key-value pair storage is the data frame sequence number, and the value is a list of all data frames corresponding to the stored data frame sequence number; Slicing the flight data using a preset file position pointer, converting the result of the slicing process into a byte of an unsigned short integer type, and then setting a frame header encapsulation object according to the byte of the unsigned short integer type; Obtaining the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtaining the frame tail based on the ARINC767 specification, thereby constructing a data frame corresponding to the flight data; Convert the data frame into a uint8 type array in a numpy structure; The uint8 type array is stored in the list, and the list is stored in the data frame dictionary as the value in the key-value pair storage, and the data frame sequence number corresponding to the uint8 type array is stored in the data frame dictionary as the key in the first key-value pair storage, so as to construct the data frame dictionary.

2. The QAR decoding method based on the ARINC767 specification according to claim 1, characterized in that: The step of obtaining the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtaining the frame tail based on the ARINC767 specification, so as to construct a data frame corresponding to the flight data, includes: Obtain the frame_length attribute in the frame header encapsulation object, and obtain the data frame length according to the frame_length attribute; Based on the ARINC767 specification, extract the frame tail according to the data frame length, and encapsulate the frame tail into a Tailer object; Determine whether the ID of the Tailer object is consistent with the ID of the frame header encapsulation object; If it is determined that the ID of the Tailer object is consistent with the ID of the frame header encapsulation object, constructing the data frame; If it is determined that the ID of the Tailer object is inconsistent with the ID of the frame header encapsulation object, the abnormal frames are screened and removed, and then the data frame is constructed.

3. The QAR decoding method based on the ARINC767 specification according to claim 1, characterized in that: The parameter parsing of the preset decoding library and constructing a decoding library dictionary containing parameter attributes according to the result of the parameter parsing include: Initialize and set a second key-value pair storage, and set the second key-value pair storage as the decoding library dictionary; Based on the ARINC767 specification, grouping the parameters in the decoding library according to the data frame sequence number to obtain a plurality of parameter groups; Creating a same-frame parameter dictionary for each parameter group, and using the same-frame parameter dictionary to store parameter attributes in the parameter group; The data frame sequence number corresponding to the parameter group is stored as the key in the second key-value pair storage in the decoding library dictionary, and the same-frame parameter dictionary corresponding to the parameter group is stored as the value in the second key-value pair storage in the decoding library dictionary, thereby constructing the decoding library dictionary.

4. The QAR decoding method based on the ARINC767 specification according to claim 3, characterized in that: The step of creating a same-frame parameter dictionary for each parameter group and using the same-frame parameter dictionary to store parameter attributes in the parameter group includes: Initialize and set a third key-value pair storage, and set the third key-value pair storage to the same-frame parameter dictionary; Obtaining parameter attributes of the parameter; wherein the parameter attributes include a parameter mnemonic code; Acquire the target type of the flight data, and store the target type in the parameter attribute; Respectively calculating the index starting point and index ending point of the parameter group and the number of right shifts, and storing the index starting point and index ending point and the number of right shifts in the parameter attribute; The parameter mnemonic code is stored as a key in the third key-value pair storage in the same-frame parameter dictionary, and the parameter attribute is constructed as a Param object, and the Param object is stored as a value in the third key-value pair storage in the same-frame parameter dictionary, thereby constructing the same-frame parameter dictionary.

5. The QAR decoding method based on the ARINC767 specification according to claim 4, characterized in that: The SIMD optimization function includes a first SIMD optimization function and a second SIMD optimization function; the SIMD optimization function based on the numpy structure performs QAR flight data decoding based on the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary to obtain real parameter data, and stores the real parameter data as a decoding parameter result array in a preset decoding result dictionary, including: stacking the flight data in the data frame dictionary into two-dimensional flight data; Traverse the same-frame parameter dictionary to obtain a third key-value pair storage whose key is the parameter mnemonic code and whose value is the Param object; Based on the third key-value pair storage, the two-dimensional flight data is sliced ​​using a first SIMD optimization function in a numpy structure, and the result of the slicing process is set as data to be decoded; performing view conversion and one-dimensional conversion on the data to be decoded in sequence; The second SIMD optimization function in the numpy structure is used to sequentially perform right shift operations and bitwise AND operations on the data to be decoded after the one-dimensional conversion; Use numpy.astype method to decode the data to be decoded after bitwise AND operation into parameter integer data; The parameter integer data is converted into real parameter data, and the real parameter data is used as a decoding parameter result array.

6. The QAR decoding method based on the ARINC767 specification according to claim 5, characterized in that: The method of using numpy.astype to decode the data to be decoded after the bitwise AND operation into parameter integer data includes: Determine whether the data to be decoded is a single-precision floating-point number type; If it is determined that the parameter integer data is a single-precision floating-point type, the processing type of the numpy.astype method is converted to a single-precision floating-point type, and the data to be decoded is decoded using the numpy.astype method of the single-precision floating-point type.

7. A QAR decoding system based on ARINC767 specification, characterized in that: include: A data analysis unit, used for acquiring flight data in accordance with ARINC767 specification, and performing data analysis on the flight data, so as to construct a data frame dictionary containing the flight data according to the result of the data analysis; A parameter parsing unit, used to parse the parameters of a preset decoding library, and construct a decoding library dictionary containing parameter attributes according to the result of the parameter parsing; A decoding storage unit, used for combining the flight data in the data frame dictionary and the parameter attributes in the decoding library dictionary, performing QAR flight data decoding based on the SIMD optimization function of the numpy structure, obtaining real parameter data, and storing the real parameter data as a decoding parameter result array in a preset decoding result dictionary; The data parsing unit comprises: A first initialization unit is used to initialize and set a first key-value pair storage, and set the first key-value pair storage to the data frame dictionary; wherein the key in the first key-value pair storage is the data frame sequence number, and the value is a list of all data frames corresponding to the stored data frame sequence number; A slicing processing unit, used for slicing the flight data using a preset file position pointer, converting the result of the slicing processing into a byte of an unsigned short integer type, and then setting a frame header encapsulation object according to the byte of the unsigned short integer type; A data frame construction unit, used to obtain the data frame length corresponding to the flight data according to the frame header encapsulation object, and obtain the frame tail based on the ARINC767 specification, so as to construct a data frame corresponding to the flight data; A data frame conversion unit, used for converting the data frame into a uint8 type array in a numpy structure; The first construction unit is used to store the uint8 type array in the list, store the list as the value in the key-value pair storage in the data frame dictionary, and store the data frame sequence number corresponding to the uint8 type array as the key in the first key-value pair storage in the data frame dictionary, so as to construct the data frame dictionary.

8. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the QAR decoding method based on the ARINC767 specification as claimed in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the QAR decoding method based on the ARINC767 specification as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and system for decoding flight recorder data based on ARINC767 specification

    CN110782549A

  • Method for parallel computing and decoding of bus data by utilizing GPU (Graphics Processing Unit)

    CN115567166A

  • Fakecatcher: detection of synthetic portrait videos using biological signals

    US20210209388A1